StripKG Class Reference

#include <StripKG.h>

List of all members.

Public Member Functions

 StripKG ()
virtual ~StripKG ()
CandStripHandleGetHandle () const
void Set (CandStripHandle *stp, UgliGeomHandle *ugh, Int_t lp)
void Print ()
Int_t Timing () const
Bool_t XTalk (AlgConfig &ac)
void TimePos (AlgConfig &ac, Bool_t oneStp, Float_t &dt, Float_t &timpos, Float_t &halflen) const

Public Attributes

CandStripHandlehandle
Int_t index
Int_t strip
Int_t plane
Int_t planeview
Int_t digit
Float_t tpos
Float_t zpos
Double_t rawE
Double_t rawW
Double_t siglinE
Double_t siglinW
Double_t sigcorE
Double_t sigcorW
Double_t peE
Double_t peW
Double_t timerawbE
Double_t timerawbW
Double_t timeraweE
Double_t timeraweW
Double_t timeE
Double_t timeW
Double_t timephE
Double_t timephW
Float_t hwidth
Float_t hlength
Float_t hthick
Int_t clusternb
Bool_t xtalk
Int_t ambig

Detailed Description

Definition at line 29 of file StripKG.h.


Constructor & Destructor Documentation

StripKG::StripKG (  ) 

Definition at line 22 of file StripKG.cxx.

References Msg::kVerbose, and MSG.

00022                 :handle(0),index(0),strip(0),plane(0),planeview(0),
00023 digit(0),tpos(0.),zpos(0.),rawE(0.),rawW(0.),
00024 siglinE(0.),siglinW(0.),sigcorE(0.),sigcorW(0.),
00025 peE(0.),peW(0.),timerawbE(0.),timerawbW(0.),timeraweE(0.),
00026 timeraweW(0.),timeE(0.),timeW(0.),timephE(0.),
00027 timephW(0.),hwidth(0.),hlength(0.),hthick(0.),clusternb(999),xtalk(false),
00028 ambig(0){
00029 //
00030 //  Purpose:  Default constructor
00031 //
00032   MSG("Cluster3D", Msg::kVerbose)
00033     << "Default constructor " << endl;
00034 }

virtual StripKG::~StripKG (  )  [inline, virtual]

Definition at line 66 of file StripKG.h.

00066 {};


Member Function Documentation

CandStripHandle * StripKG::GetHandle (  )  const

Definition at line 246 of file StripKG.cxx.

References handle.

00246                                          {
00247 //
00248 //  Purpose:  return handle to a strip
00249 //
00250 //  Arguments: n/a
00251 //              
00252 //  Return:  CandStripHandle* handle 
00253 //
00254 //  Contact:   K.Grzelak1@physics.ox.ac.uk
00255 //
00256 //
00257 //  Program Notes:-
00258 //  =============
00259   
00260   return handle;
00261 }

void StripKG::Print (  ) 

Definition at line 37 of file StripKG.cxx.

References digit, index, plane, planeview, and strip.

00037                    {
00038 //
00039 //  Purpose:  Prints contents of the strip object.
00040 //
00041 //  Arguments: n/a
00042 //
00043 //  Return:  n/a
00044 //
00045 //  Contact:   K.Grzelak1@physics.ox.ac.uk
00046 //
00047 
00048   cout << "Content of the Strip object" << endl;
00049   cout << "index= " << index 
00050        << "strip= " << strip
00051        << "plane= " << plane
00052        << "planeview= " << planeview
00053        << "digit= " << digit  
00054        << endl;
00055 }

void StripKG::Set ( CandStripHandle stp,
UgliGeomHandle ugh,
Int_t  lp 
)

Definition at line 59 of file StripKG.cxx.

References Munits::c_light, UgliStripHandle::ClearFiber(), digit, CandStripHandle::GetBegTime(), CandStripHandle::GetCharge(), CandStripHandle::GetEndTime(), UgliStripHandle::GetHalfLength(), UgliStripHandle::GetHalfThickness(), UgliStripHandle::GetHalfWidth(), CandStripHandle::GetNDigit(), CandStripHandle::GetPlane(), CandStripHandle::GetPlaneView(), CandStripHandle::GetStrip(), CandStripHandle::GetStripEndId(), UgliGeomHandle::GetStripHandle(), CandStripHandle::GetTime(), CandStripHandle::GetTPos(), CandStripHandle::GetZPos(), handle, hlength, hthick, hwidth, index, StripEnd::kNegative, CalDigitType::kNone, CalDigitType::kPE, StripEnd::kPositive, CalDigitType::kSigCorr, CalDigitType::kSigLin, Munits::ns, peE, peW, plane, planeview, rawE, rawW, sigcorE, sigcorW, siglinE, siglinW, strip, timeE, timephE, timephW, timerawbE, timerawbW, timeraweE, timeraweW, timeW, tpos, UgliStripHandle::WlsPigtail(), and zpos.

Referenced by StripListKG::CreateStrips().

00059                                                                     {
00060 //
00061 //  Purpose: Set StripKG data members 
00062 //
00063 //  Arguments: 
00064 //           stp   in  - strip handle   
00065 //           ugh   in  - UgliGeom handle
00066 //            lp   in  - serial strip number
00067 //              
00068 //  Return:  n/a
00069 //
00070 //  Contact:   K.Grzelak1@physics.ox.ac.uk
00071 //
00072 //
00073 //  Program Notes:-
00074 //  =============
00075 
00076   // Light propagation velocity in a clear fiber in m/ns
00077   Double_t cClear = 0.56*Munits::c_light*Munits::ns; 
00078   // Light propagation velocity in a Wls  fiber in m/ns
00079   Double_t cWls = 0.73*Munits::c_light*Munits::ns; 
00080   // Light propagation velocity in a scintillator in m/ns
00081   //Double_t cScint = 0.56*Munits::c_light*Munits::ns; 
00082 
00083   // Two ends of strip
00084   StripEnd::StripEnd_t stpend[2] = {StripEnd::kNegative,StripEnd::kPositive};
00085 
00086   handle=stp; 
00087   index=lp;
00088   strip=stp->GetStrip();  
00089   plane=stp->GetPlane();
00090   planeview=(Int_t)(stp->GetPlaneView());
00091   digit=stp->GetNDigit();
00092   tpos=stp->GetTPos();
00093   zpos=stp->GetZPos();
00094   rawE=stp->GetCharge(CalDigitType::kNone,stpend[0]);
00095   rawW=stp->GetCharge(CalDigitType::kNone,stpend[1]);
00096   siglinE=stp->GetCharge(CalDigitType::kSigLin,stpend[0]);
00097   siglinW=stp->GetCharge(CalDigitType::kSigLin,stpend[1]);
00098   sigcorE=stp->GetCharge(CalDigitType::kSigCorr,stpend[0]);
00099   sigcorW=stp->GetCharge(CalDigitType::kSigCorr,stpend[1]);
00100   peE=stp->GetCharge(CalDigitType::kPE,stpend[0]);
00101   peW=stp->GetCharge(CalDigitType::kPE,stpend[1]);
00102   timerawbE=stp->GetBegTime(stpend[0])/Munits::ns;
00103   timerawbW=stp->GetBegTime(stpend[1])/Munits::ns; 
00104   timeraweE=stp->GetEndTime(stpend[0])/Munits::ns;
00105   timeraweW=stp->GetEndTime(stpend[1])/Munits::ns;
00106 
00107   PlexStripEndId stripid = stp->GetStripEndId();
00108   UgliStripHandle stph = ugh->GetStripHandle(stripid);
00109 
00110   Double_t tClearE = stph.ClearFiber(stpend[0])/cClear;
00111   Double_t tWlsE = stph.WlsPigtail(stpend[0])/cWls;
00112   timeE=timerawbE-tWlsE-tClearE;
00113 
00114   Double_t tClearW = stph.ClearFiber(stpend[1])/cClear;
00115   Double_t tWlsW = stph.WlsPigtail(stpend[1])/cWls;
00116   timeW=timerawbW-tWlsW-tClearW;
00117 
00118   timephE=stp->GetTime(stpend[0])/Munits::ns;
00119   timephW=stp->GetTime(stpend[1])/Munits::ns;
00120 
00121   hwidth=stph.GetHalfWidth();
00122   hlength=stph.GetHalfLength();
00123   hthick=stph.GetHalfThickness();
00124 }

void StripKG::TimePos ( AlgConfig ac,
Bool_t  oneStp,
Float_t &  dt,
Float_t &  timpos,
Float_t &  halflen 
) const

Definition at line 128 of file StripKG.cxx.

References Registry::GetDouble(), planeview, timeE, timeW, and Timing().

00128                                                                                                           {
00129 //
00130 //  Purpose:  Return hit position from timing information.
00131 //
00132 //  Arguments: 
00133 //           ac           in  -  AlgConfig 
00134 //           oneStp       in  -  true = one hit per plane => use timing info
00135 //                               false = more than one hit => do not use timing
00136 //           dt          out  -  time difference [ns] 
00137 //           timpos      out  -  position from time [strips]
00138 //           halflength  out  -  half of the length of the cell [strips]
00139 //              
00140 //  Return:  n/a
00141 //
00142 //  Contact:   K.Grzelak1@physics.ox.ac.uk
00143 //
00144 //
00145 //  Program Notes:-
00146 //  =============
00147 //
00148 // Fit results: mean strip & velocity in the scintillator in strips/ns
00149 // avStp = mean strip/length of half of the strip in strips
00150 // vScint/2 = velocity in the scintillator [strip/ns]
00151 // dtRes = time resolution [ns] 
00152 // widthStp = strip width [m]
00153 
00154   const Double_t vScint = ac.GetDouble("vLightInScint");
00155   const Double_t t1t2Res = ac.GetDouble("t1-t2ResolutionInNs");
00156 
00157   Double_t dtRes;
00158 
00159   if(oneStp==true){
00160     dtRes = 3.*t1t2Res;
00161   }
00162   else {
00163     dtRes = t1t2Res;   
00164   } 
00165 
00166   Float_t avStp = 96.0;
00167 
00168   dt=timeE-timeW; 
00169 
00170   if(Timing()==2 && planeview==2 && oneStp==true){
00171     timpos=avStp-vScint*dt;
00172     halflength=dtRes*vScint;
00173   }
00174   else if(Timing()==2 && planeview==3 && oneStp==true){
00175     timpos=avStp+vScint*dt;
00176     halflength=dtRes*vScint;
00177   }
00178   else{
00179     timpos=avStp;
00180     halflength=avStp;
00181   }
00182 }

Int_t StripKG::Timing (  )  const

Definition at line 186 of file StripKG.cxx.

References timeE, and timeW.

Referenced by TimePos().

00186                            {   
00187 //
00188 //  Purpose:  Return 
00189 //
00190 //  Arguments: 
00191 //              
00192 //  Return:  n/a
00193 //
00194 //  Contact:   K.Grzelak1@physics.ox.ac.uk
00195 //
00196 //
00197 //  Program Notes:-
00198 //  =============
00199 
00200   Int_t nbEnd;
00201   if(timeE>-1000. && timeW>-1000.){
00202     nbEnd=2; 
00203   }
00204   else if(timeE>-1000. || timeW>-1000.){
00205     nbEnd=1;
00206   }
00207   else{
00208     nbEnd=0;
00209   }
00210   return nbEnd;
00211 }

Bool_t StripKG::XTalk ( AlgConfig ac  ) 

Definition at line 215 of file StripKG.cxx.

References digit, Registry::GetDouble(), Msg::kVerbose, MSG, peE, peW, and xtalk.

00215                                   {
00216 //
00217 //  Purpose:  Is it a crosstalk hit ?
00218 //
00219 //  Arguments: 
00220 //           ac         in  -  AlgConfig
00221 //              
00222 //  Return:  Bool_t crosstalk hit or not ?
00223 //
00224 //  Contact:   K.Grzelak1@physics.ox.ac.uk
00225 //
00226 //
00227 //  Program Notes:-
00228 //  =============
00229 
00230   const Double_t peCut = ac.GetDouble("xTalkPeCut");
00231   MSG("Cluster3D", Msg::kVerbose)
00232    << "pe cut = " << peCut << endl;
00233 
00234   if(digit==1 && peE<peCut && peW<peCut){
00235     xtalk=true;
00236     return true;    
00237   }
00238   else{
00239     return false;
00240     xtalk=false;
00241   }
00242 }


Member Data Documentation

Definition at line 63 of file StripKG.h.

Definition at line 61 of file StripKG.h.

Definition at line 37 of file StripKG.h.

Referenced by Print(), Set(), and XTalk().

Definition at line 32 of file StripKG.h.

Referenced by GetHandle(), and Set().

Definition at line 58 of file StripKG.h.

Referenced by Set().

Float_t StripKG::hthick

Definition at line 59 of file StripKG.h.

Referenced by Set().

Float_t StripKG::hwidth

Definition at line 57 of file StripKG.h.

Referenced by Set().

Definition at line 33 of file StripKG.h.

Referenced by Print(), and Set().

Double_t StripKG::peE

Definition at line 46 of file StripKG.h.

Referenced by Set(), and XTalk().

Double_t StripKG::peW

Definition at line 47 of file StripKG.h.

Referenced by Set(), and XTalk().

Definition at line 35 of file StripKG.h.

Referenced by Print(), and Set().

Definition at line 36 of file StripKG.h.

Referenced by Print(), Set(), and TimePos().

Double_t StripKG::rawE

Definition at line 40 of file StripKG.h.

Referenced by Set().

Double_t StripKG::rawW

Definition at line 41 of file StripKG.h.

Referenced by Set().

Double_t StripKG::sigcorE

Definition at line 44 of file StripKG.h.

Referenced by Set().

Double_t StripKG::sigcorW

Definition at line 45 of file StripKG.h.

Referenced by Set().

Double_t StripKG::siglinE

Definition at line 42 of file StripKG.h.

Referenced by Set().

Double_t StripKG::siglinW

Definition at line 43 of file StripKG.h.

Referenced by Set().

Definition at line 34 of file StripKG.h.

Referenced by Print(), and Set().

Double_t StripKG::timeE

Definition at line 52 of file StripKG.h.

Referenced by Set(), TimePos(), and Timing().

Double_t StripKG::timephE

Definition at line 54 of file StripKG.h.

Referenced by Set().

Double_t StripKG::timephW

Definition at line 55 of file StripKG.h.

Referenced by Set().

Definition at line 48 of file StripKG.h.

Referenced by Set().

Definition at line 49 of file StripKG.h.

Referenced by Set().

Definition at line 50 of file StripKG.h.

Referenced by Set().

Definition at line 51 of file StripKG.h.

Referenced by Set().

Double_t StripKG::timeW

Definition at line 53 of file StripKG.h.

Referenced by Set(), TimePos(), and Timing().

Float_t StripKG::tpos

Definition at line 38 of file StripKG.h.

Referenced by Set().

Definition at line 62 of file StripKG.h.

Referenced by XTalk().

Float_t StripKG::zpos

Definition at line 39 of file StripKG.h.

Referenced by Set().


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1