FarDetStripHandle Class Reference

#include <FarDetStripHandle.h>

Inheritance diagram for FarDetStripHandle:
CandStripHandle CandHandle

List of all members.

Public Member Functions

 FarDetStripHandle ()
 FarDetStripHandle (const FarDetStripHandle &csh)
 FarDetStripHandle (FarDetStrip *cs)
virtual ~FarDetStripHandle ()
virtual FarDetStripHandleDupHandle () const
virtual void Trace (const char *c) const
void SetPlane (Int_t plane)
void SetStrip (Int_t strip)
void SetTime (CalTimeType::CalTimeType_t caltype_t, Double_t *time)
void SetCharge (CalDigitType::CalDigitType_t caltype_t, Double_t *charge)
void SetFibreLengths (Double_t *green, Double_t *wls, Double_t *clear, Double_t half)
void SetXtalk (Int_t *xtalk)
Int_t GetPlane () const
Int_t GetStrip () const
Double_t GetTime () const
Double_t GetTime (StripEnd::StripEnd_t stripend_t) const
Double_t GetTime (CalTimeType::CalTimeType_t caltype_t) const
Double_t GetTime (StripEnd::StripEnd_t stripend_t, CalTimeType::CalTimeType_t caltype_t) const
Double_t GetTime (CalTimeType::CalTimeType_t caltype_t, StripEnd::StripEnd_t stripend_t) const
Double_t GetBegTime () const
Double_t GetBegTime (StripEnd::StripEnd_t stripend_t) const
Double_t GetBegTime (CalTimeType::CalTimeType_t caltype_t) const
Double_t GetBegTime (StripEnd::StripEnd_t stripend_t, CalTimeType::CalTimeType_t caltype_t) const
Double_t GetBegTime (CalTimeType::CalTimeType_t caltype_t, StripEnd::StripEnd_t stripend_t) const
Double_t GetEndTime () const
Double_t GetEndTime (StripEnd::StripEnd_t stripend_t) const
Double_t GetEndTime (CalTimeType::CalTimeType_t caltype_t) const
Double_t GetEndTime (StripEnd::StripEnd_t stripend_t, CalTimeType::CalTimeType_t caltype_t) const
Double_t GetEndTime (CalTimeType::CalTimeType_t caltype_t, StripEnd::StripEnd_t stripend_t) const
Double_t GetCharge () const
Double_t GetCharge (StripEnd::StripEnd_t stripend_t) const
Double_t GetCharge (CalDigitType::CalDigitType_t caltype_t) const
Double_t GetCharge (StripEnd::StripEnd_t stripend_t, CalDigitType::CalDigitType_t caltype_t) const
Double_t GetCharge (CalDigitType::CalDigitType_t caltype_t, StripEnd::StripEnd_t stripend_t) const
Double_t GetGreenFibre (StripEnd::StripEnd_t stripend_t) const
Double_t GetWlsPigtail (StripEnd::StripEnd_t stripend_t) const
Double_t GetClearFibre (StripEnd::StripEnd_t stripend_t) const
Double_t GetHalfLength () const
Int_t IsXtalk (StripEnd::StripEnd_t stripend_t) const

Detailed Description

Definition at line 13 of file FarDetStripHandle.h.


Constructor & Destructor Documentation

FarDetStripHandle::FarDetStripHandle (  ) 

Definition at line 6 of file FarDetStripHandle.cxx.

Referenced by DupHandle().

00007 {
00008 
00009 }

FarDetStripHandle::FarDetStripHandle ( const FarDetStripHandle csh  ) 

Definition at line 11 of file FarDetStripHandle.cxx.

00011                                                                  :
00012   CandStripHandle(csh)
00013 {
00014 
00015 }  

FarDetStripHandle::FarDetStripHandle ( FarDetStrip cs  ) 

Definition at line 17 of file FarDetStripHandle.cxx.

00017                                                     :
00018   CandStripHandle(cs)
00019 {
00020 
00021 }
  

FarDetStripHandle::~FarDetStripHandle (  )  [virtual]

Definition at line 23 of file FarDetStripHandle.cxx.

00024 {
00025 
00026 }


Member Function Documentation

FarDetStripHandle * FarDetStripHandle::DupHandle (  )  const [virtual]

Reimplemented from CandStripHandle.

Definition at line 28 of file FarDetStripHandle.cxx.

References FarDetStripHandle().

00029 {
00030   return (new FarDetStripHandle(*this));
00031 }

Double_t FarDetStripHandle::GetBegTime ( CalTimeType::CalTimeType_t  caltype_t,
StripEnd::StripEnd_t  stripend_t 
) const

Definition at line 200 of file FarDetStripHandle.cxx.

References GetTime().

00201 {
00202   return this->GetTime(caltype_t,stripend_t);
00203 }

Double_t FarDetStripHandle::GetBegTime ( StripEnd::StripEnd_t  stripend_t,
CalTimeType::CalTimeType_t  caltype_t 
) const

Definition at line 195 of file FarDetStripHandle.cxx.

References GetTime().

00196 {
00197   return this->GetTime(stripend_t,caltype_t);
00198 }

Double_t FarDetStripHandle::GetBegTime ( CalTimeType::CalTimeType_t  caltype_t  )  const

Definition at line 190 of file FarDetStripHandle.cxx.

References GetTime().

00191 {
00192   return this->GetTime(caltype_t);
00193 }

Double_t FarDetStripHandle::GetBegTime ( StripEnd::StripEnd_t  stripend_t  )  const [virtual]

Returns the earliest time in the strip

Reimplemented from CandStripHandle.

Definition at line 185 of file FarDetStripHandle.cxx.

References GetTime().

00186 {
00187   return this->GetTime(stripend_t);
00188 }

Double_t FarDetStripHandle::GetBegTime (  )  const

Definition at line 180 of file FarDetStripHandle.cxx.

References GetTime().

00181 {
00182   return this->GetTime();
00183 }

Double_t FarDetStripHandle::GetCharge ( CalDigitType::CalDigitType_t  caltype_t,
StripEnd::StripEnd_t  stripend_t 
) const [virtual]

alternate form of GetCharge

Reimplemented from CandStripHandle.

Definition at line 288 of file FarDetStripHandle.cxx.

References GetCharge().

00289 {
00290   return this->GetCharge(stripend_t,caltype_t);
00291 }

Double_t FarDetStripHandle::GetCharge ( StripEnd::StripEnd_t  stripend_t,
CalDigitType::CalDigitType_t  caltype_t 
) const [virtual]

returns charge for an individual strip end, or entire strip. Default is entire strip. Charge units are set by CalDigitType. Possibilities are kNone, kPE, kSigLin, kSigCorr,

Reimplemented from CandStripHandle.

Definition at line 246 of file FarDetStripHandle.cxx.

References FarDetStrip::fChargeAdc, FarDetStrip::fChargePE, FarDetStrip::fChargeSigCorr, FarDetStrip::fChargeSigLin, CandHandle::GetCandBase(), StripEnd::kNegative, CalDigitType::kNone, CalDigitType::kPE, StripEnd::kPositive, CalDigitType::kSigCorr, and CalDigitType::kSigLin.

00247 {
00248   const FarDetStrip* mystrip = dynamic_cast<const FarDetStrip*>(GetCandBase());
00249 
00250   Double_t charge[2];
00251 
00252   switch (caltype_t) {
00253     case CalDigitType::kNone:
00254       charge[0] = mystrip->fChargeAdc[0];
00255       charge[1] = mystrip->fChargeAdc[1];
00256       break;
00257     case CalDigitType::kPE:
00258       charge[0] = mystrip->fChargePE[0];
00259       charge[1] = mystrip->fChargePE[1];
00260       break;
00261     case CalDigitType::kSigLin:
00262       charge[0] = mystrip->fChargeSigLin[0];
00263       charge[1] = mystrip->fChargeSigLin[1];
00264       break;
00265     case CalDigitType::kSigCorr:
00266       charge[0] = mystrip->fChargeSigCorr[0];
00267       charge[1] = mystrip->fChargeSigCorr[1];
00268       break;
00269     default:    
00270       charge[0] = mystrip->fChargePE[0];
00271       charge[1] = mystrip->fChargePE[1];
00272       break;  
00273   }
00274 
00275   switch (stripend_t) {
00276     case StripEnd::kNegative:
00277       return charge[0];
00278       break;
00279     case StripEnd::kPositive:
00280       return charge[1];
00281       break;
00282     default:
00283       return charge[0]+charge[1];
00284       break;
00285   }
00286 }

Double_t FarDetStripHandle::GetCharge ( CalDigitType::CalDigitType_t  caltype_t  )  const [virtual]

Reimplemented from CandStripHandle.

Definition at line 241 of file FarDetStripHandle.cxx.

References GetCharge(), and StripEnd::kWhole.

00242 {
00243   return this->GetCharge(StripEnd::kWhole,caltype_t); 
00244 }

Double_t FarDetStripHandle::GetCharge ( StripEnd::StripEnd_t  stripend_t  )  const [virtual]

Reimplemented from CandStripHandle.

Definition at line 236 of file FarDetStripHandle.cxx.

References GetCharge(), and CalDigitType::kPE.

00237 {
00238   return this->GetCharge(stripend_t,CalDigitType::kPE); 
00239 }

Double_t FarDetStripHandle::GetCharge (  )  const [virtual]

Reimplemented from CandStripHandle.

Definition at line 230 of file FarDetStripHandle.cxx.

References CalDigitType::kPE, and StripEnd::kWhole.

Referenced by FarDetStripListModule::Ana(), GetCharge(), and AlgFarDetStrip::RunAlg().

00231 {
00232   return this->GetCharge(StripEnd::kWhole,CalDigitType::kPE);
00233 
00234 }

Double_t FarDetStripHandle::GetClearFibre ( StripEnd::StripEnd_t  stripend_t  )  const

Definition at line 327 of file FarDetStripHandle.cxx.

References FarDetStrip::fClearFibre, CandHandle::GetCandBase(), StripEnd::kNegative, and StripEnd::kPositive.

Referenced by FarDetStripListModule::Ana().

00328 {
00329   const FarDetStrip* mystrip = dynamic_cast<const FarDetStrip*>(GetCandBase());
00330 
00331   switch (stripend_t) {
00332     case StripEnd::kNegative:
00333       return mystrip->fClearFibre[0];
00334       break;
00335     case StripEnd::kPositive:
00336       return mystrip->fClearFibre[1];
00337       break;
00338     default:
00339       return 0.0;
00340       break;
00341   }
00342 }

Double_t FarDetStripHandle::GetEndTime ( CalTimeType::CalTimeType_t  caltype_t,
StripEnd::StripEnd_t  stripend_t 
) const

Definition at line 225 of file FarDetStripHandle.cxx.

References GetTime().

00226 {
00227   return this->GetTime(caltype_t,stripend_t);
00228 }

Double_t FarDetStripHandle::GetEndTime ( StripEnd::StripEnd_t  stripend_t,
CalTimeType::CalTimeType_t  caltype_t 
) const

Definition at line 220 of file FarDetStripHandle.cxx.

References GetTime().

00221 {
00222   return this->GetTime(stripend_t,caltype_t);
00223 }

Double_t FarDetStripHandle::GetEndTime ( CalTimeType::CalTimeType_t  caltype_t  )  const

Definition at line 215 of file FarDetStripHandle.cxx.

References GetTime().

00216 {
00217   return this->GetTime(caltype_t);
00218 }

Double_t FarDetStripHandle::GetEndTime ( StripEnd::StripEnd_t  stripend_t  )  const [virtual]

Returns latest time in the strip.

Reimplemented from CandStripHandle.

Definition at line 210 of file FarDetStripHandle.cxx.

References GetTime().

00211 {
00212   return this->GetTime(stripend_t);
00213 }

Double_t FarDetStripHandle::GetEndTime (  )  const

Definition at line 205 of file FarDetStripHandle.cxx.

References GetTime().

00206 {
00207   return this->GetTime();
00208 }

Double_t FarDetStripHandle::GetGreenFibre ( StripEnd::StripEnd_t  stripend_t  )  const

Definition at line 293 of file FarDetStripHandle.cxx.

References FarDetStrip::fGreenFibre, CandHandle::GetCandBase(), StripEnd::kNegative, and StripEnd::kPositive.

Referenced by FarDetStripListModule::Ana().

00294 {
00295   const FarDetStrip* mystrip = dynamic_cast<const FarDetStrip*>(GetCandBase());
00296 
00297   switch (stripend_t) {
00298     case StripEnd::kNegative:
00299       return mystrip->fGreenFibre[0];
00300       break;
00301     case StripEnd::kPositive:
00302       return mystrip->fGreenFibre[1];
00303       break;
00304     default:
00305       return 0.0;
00306       break;
00307   }
00308 }

Double_t FarDetStripHandle::GetHalfLength (  )  const

Definition at line 344 of file FarDetStripHandle.cxx.

References CandHandle::GetCandBase().

Referenced by FarDetStripListModule::Ana().

00345 {
00346   return dynamic_cast<const FarDetStrip*>(GetCandBase())->fHalfLength;
00347 }

Int_t FarDetStripHandle::GetPlane (  )  const [virtual]

Reimplemented from CandStripHandle.

Definition at line 113 of file FarDetStripHandle.cxx.

References CandHandle::GetCandBase().

Referenced by FarDetStripListModule::Ana(), and AlgFarDetStrip::RunAlg().

00114 {
00115   return dynamic_cast<const FarDetStrip*>(GetCandBase())->fPlane; 
00116 }

Int_t FarDetStripHandle::GetStrip (  )  const [virtual]

Reimplemented from CandStripHandle.

Definition at line 118 of file FarDetStripHandle.cxx.

References CandHandle::GetCandBase().

Referenced by FarDetStripListModule::Ana(), and AlgFarDetStrip::RunAlg().

00119 {
00120   return dynamic_cast<const FarDetStrip*>(GetCandBase())->fStrip; 
00121 }

Double_t FarDetStripHandle::GetTime ( CalTimeType::CalTimeType_t  caltype_t,
StripEnd::StripEnd_t  stripend_t 
) const

Definition at line 175 of file FarDetStripHandle.cxx.

References GetTime().

00176 {
00177   return this->GetTime(stripend_t,caltype_t);
00178 }

Double_t FarDetStripHandle::GetTime ( StripEnd::StripEnd_t  stripend_t,
CalTimeType::CalTimeType_t  caltype_t 
) const

Definition at line 138 of file FarDetStripHandle.cxx.

References FarDetStrip::fCalTime, FarDetStrip::fRawTime, CandHandle::GetCandBase(), StripEnd::kNegative, CalTimeType::kNone, StripEnd::kPositive, and CalTimeType::kT0.

00139 {
00140   const FarDetStrip* mystrip = dynamic_cast<const FarDetStrip*>(GetCandBase());
00141 
00142   Double_t time[3];
00143 
00144   switch (caltype_t) {
00145     case CalTimeType::kNone:
00146       time[0] = mystrip->fRawTime[0];
00147       time[1] = mystrip->fRawTime[1];
00148       time[2] = mystrip->fRawTime[2];
00149       break;
00150     case CalTimeType::kT0:
00151       time[0] = mystrip->fCalTime[0];
00152       time[1] = mystrip->fCalTime[1];
00153       time[2] = mystrip->fCalTime[2];
00154       break;
00155     default:    
00156       time[0] = mystrip->fCalTime[0];
00157       time[1] = mystrip->fCalTime[1];
00158       time[2] = mystrip->fCalTime[2];
00159       break;  
00160   }
00161 
00162   switch (stripend_t) {
00163     case StripEnd::kNegative:
00164       return time[0];
00165       break;
00166     case StripEnd::kPositive:
00167       return time[1];
00168       break;
00169     default:
00170       return time[2];
00171       break;
00172   }
00173 }

Double_t FarDetStripHandle::GetTime ( CalTimeType::CalTimeType_t  caltype_t  )  const

Definition at line 133 of file FarDetStripHandle.cxx.

References GetTime(), and StripEnd::kWhole.

00134 {
00135   return this->GetTime(StripEnd::kWhole,caltype_t);
00136 }

Double_t FarDetStripHandle::GetTime ( StripEnd::StripEnd_t  stripend_t  )  const [virtual]

Calculates charge-weighted average time for strip, or individual strip end if input parameter is set. Default is over entire strip.

Reimplemented from CandStripHandle.

Definition at line 128 of file FarDetStripHandle.cxx.

References GetTime(), and CalTimeType::kT0.

00129 {
00130   return this->GetTime(stripend_t,CalTimeType::kT0);
00131 }

Double_t FarDetStripHandle::GetTime (  )  const
Double_t FarDetStripHandle::GetWlsPigtail ( StripEnd::StripEnd_t  stripend_t  )  const

Definition at line 310 of file FarDetStripHandle.cxx.

References FarDetStrip::fWlsPigtail, CandHandle::GetCandBase(), StripEnd::kNegative, and StripEnd::kPositive.

Referenced by FarDetStripListModule::Ana().

00311 {
00312   const FarDetStrip* mystrip = dynamic_cast<const FarDetStrip*>(GetCandBase());
00313 
00314   switch (stripend_t) {
00315     case StripEnd::kNegative:
00316       return mystrip->fWlsPigtail[0];
00317       break;
00318     case StripEnd::kPositive:
00319       return mystrip->fWlsPigtail[1];
00320       break;
00321     default:
00322       return 0.0;
00323       break;
00324   }
00325 }

Int_t FarDetStripHandle::IsXtalk ( StripEnd::StripEnd_t  stripend_t  )  const

Definition at line 349 of file FarDetStripHandle.cxx.

References FarDetStrip::fXtalk, CandHandle::GetCandBase(), StripEnd::kNegative, and StripEnd::kPositive.

Referenced by FarDetStripListModule::Ana().

00350 {
00351   const FarDetStrip* mystrip = dynamic_cast<const FarDetStrip*>(GetCandBase());
00352 
00353   switch (stripend_t) {
00354     case StripEnd::kNegative:
00355       return mystrip->fXtalk[0];
00356       break;
00357     case StripEnd::kPositive:
00358       return mystrip->fXtalk[1];
00359       break;
00360     default:
00361       return mystrip->fXtalk[2];
00362       break;
00363   }
00364 }

void FarDetStripHandle::SetCharge ( CalDigitType::CalDigitType_t  caltype_t,
Double_t *  charge 
)

Definition at line 68 of file FarDetStripHandle.cxx.

References FarDetStrip::fChargeAdc, FarDetStrip::fChargePE, FarDetStrip::fChargeSigCorr, FarDetStrip::fChargeSigLin, CandHandle::GetOwnedCandBase(), CalDigitType::kNone, CalDigitType::kPE, CalDigitType::kSigCorr, and CalDigitType::kSigLin.

Referenced by AlgFarDetStrip::RunAlg().

00069 {
00070   FarDetStrip* mystrip = dynamic_cast<FarDetStrip*>(GetOwnedCandBase());
00071   switch (caltype_t) {
00072     case CalDigitType::kNone:
00073       mystrip->fChargeAdc[0] = charge[0];
00074       mystrip->fChargeAdc[1] = charge[1];
00075       break;
00076     case CalDigitType::kPE:
00077       mystrip->fChargePE[0] = charge[0];
00078       mystrip->fChargePE[1] = charge[1];
00079       break;
00080     case CalDigitType::kSigLin:
00081       mystrip->fChargeSigLin[0] = charge[0];
00082       mystrip->fChargeSigLin[1] = charge[1];
00083       break;
00084     case CalDigitType::kSigCorr:
00085       mystrip->fChargeSigCorr[0] = charge[0];
00086       mystrip->fChargeSigCorr[1] = charge[1];
00087       break;  
00088     default:
00089       break;
00090   }
00091 }  

void FarDetStripHandle::SetFibreLengths ( Double_t *  green,
Double_t *  wls,
Double_t *  clear,
Double_t  half 
)

Definition at line 93 of file FarDetStripHandle.cxx.

References FarDetStrip::fClearFibre, FarDetStrip::fGreenFibre, FarDetStrip::fHalfLength, FarDetStrip::fWlsPigtail, and CandHandle::GetOwnedCandBase().

Referenced by AlgFarDetStrip::RunAlg().

00094 {
00095   FarDetStrip* mystrip = dynamic_cast<FarDetStrip*>(GetOwnedCandBase());
00096   for(Int_t i=0;i<2;i++){
00097     mystrip->fGreenFibre[i]=green[i];
00098     mystrip->fWlsPigtail[i]=wls[i];
00099     mystrip->fClearFibre[i]=clear[i];
00100   }
00101   mystrip->fHalfLength = half;
00102 }

void FarDetStripHandle::SetPlane ( Int_t  plane  ) 

Definition at line 38 of file FarDetStripHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgFarDetStrip::RunAlg().

00039 {
00040   dynamic_cast<FarDetStrip*>(GetOwnedCandBase())->fPlane=plane;
00041 }

void FarDetStripHandle::SetStrip ( Int_t  strip  ) 

Definition at line 43 of file FarDetStripHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgFarDetStrip::RunAlg().

00044 {
00045   dynamic_cast<FarDetStrip*>(GetOwnedCandBase())->fStrip=strip;
00046 }

void FarDetStripHandle::SetTime ( CalTimeType::CalTimeType_t  caltype_t,
Double_t *  time 
)

Definition at line 48 of file FarDetStripHandle.cxx.

References FarDetStrip::fCalTime, FarDetStrip::fRawTime, CandHandle::GetOwnedCandBase(), CalTimeType::kNone, and CalTimeType::kT0.

Referenced by AlgFarDetStrip::RunAlg().

00049 {
00050   FarDetStrip* mystrip = dynamic_cast<FarDetStrip*>(GetOwnedCandBase());
00051   
00052   switch (caltype_t) {
00053     case CalTimeType::kNone:
00054       mystrip->fRawTime[0]=time[0];
00055       mystrip->fRawTime[1]=time[1];
00056       mystrip->fRawTime[2]=time[2];
00057       break;
00058     case CalTimeType::kT0:
00059       mystrip->fCalTime[0]=time[0];
00060       mystrip->fCalTime[1]=time[1];
00061       mystrip->fCalTime[2]=time[2];
00062       break;
00063     default:
00064       break;
00065   }
00066 }

void FarDetStripHandle::SetXtalk ( Int_t *  xtalk  ) 

Definition at line 104 of file FarDetStripHandle.cxx.

References FarDetStrip::fXtalk, and CandHandle::GetOwnedCandBase().

Referenced by AlgFarDetStrip::RunAlg().

00105 {
00106   FarDetStrip* mystrip = dynamic_cast<FarDetStrip*>(GetOwnedCandBase());
00107   
00108   mystrip->fXtalk[0]=xtalk[0];
00109   mystrip->fXtalk[1]=xtalk[1];
00110   mystrip->fXtalk[2]=xtalk[2];
00111 }

void FarDetStripHandle::Trace ( const char *  c  )  const [virtual]

Reimplemented from CandStripHandle.

Definition at line 33 of file FarDetStripHandle.cxx.

00034 {
00035   CandHandle::Trace(c);
00036 }


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1