Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CalDetTOFId Class Reference

#include <CalDetTOFId.h>

List of all members.

Public Member Functions

 CalDetTOFId ()
 CalDetTOFId (Double_t paddleSeparation, Double_t tdcGain1, Double_t tdcGain2, Int_t tdcPedestal1, Int_t tdcPedestal2, Int_t firstPaddle, Int_t secondPaddle, RawTOFDigit rtofd)
virtual ~CalDetTOFId ()
Double_t GetParticleMassSquared (Double_t momentum) const
Double_t GetTOF () const
Double_t GetBeta () const

Private Attributes

Double_t fBeta
RawTOFDigit fTOFDigit
Double_t fTOF


Constructor & Destructor Documentation

CalDetTOFId::CalDetTOFId  ) 
 

Definition at line 23 of file CalDetTOFId.cxx.

00024 {
00025 }

CalDetTOFId::CalDetTOFId Double_t  paddleSeparation,
Double_t  tdcGain1,
Double_t  tdcGain2,
Int_t  tdcPedestal1,
Int_t  tdcPedestal2,
Int_t  firstPaddle,
Int_t  secondPaddle,
RawTOFDigit  rtofd
 

Definition at line 28 of file CalDetTOFId.cxx.

References fBeta, fTOF, and MSG.

00032                                             :
00033   fBeta(0.),
00034   fTOFDigit(rtofd),
00035   fTOF(0.)
00036 {
00037   //insert code that takes the raw time of flight digit and gets the 
00038   //time values here.  when the actual digit layout is known, you can
00039   //put in an if statement to pick out the right tdc values based on 
00040   //the paddle's to used given by firstPaddle and secondPaddle
00041 
00042   //i am assuming that the conversion give times in units of ns.
00043   
00044   Double_t tdc1=0;
00045   Double_t tdc2=0;
00046 
00047   // warn that we've set tdc1/tdc2 to zero (as opposed to completely unset),
00048   // firstPaddle/secondPaddle are unused and that the ctor look unfinished.
00049   MSG("CalDetTOFId",Msg::kError)
00050     << "CalDetTOFId ctor code is incomplete!" << endl;
00051 
00052   Double_t time1 = tdcGain1 * (tdc1 - (1.0*tdcPedestal1));
00053   Double_t time2 = tdcGain2 * (tdc2 - (1.0*tdcPedestal2));
00054  
00055   //find the time of flight
00056 
00057   Double_t fTOF = (time1 - time2);
00058 
00059   //calculate beta here
00060 
00061   fBeta = paddleSeparation / (fTOF * Munits::c_light);
00062 }

CalDetTOFId::~CalDetTOFId  )  [virtual]
 

Definition at line 65 of file CalDetTOFId.cxx.

00066 {
00067   //destructor
00068 }


Member Function Documentation

Double_t CalDetTOFId::GetBeta  )  const
 

Definition at line 95 of file CalDetTOFId.cxx.

00096 {
00097   return fBeta;
00098 }

Double_t CalDetTOFId::GetParticleMassSquared Double_t  momentum  )  const
 

Definition at line 71 of file CalDetTOFId.cxx.

References fBeta.

Referenced by CalDetPIDModule::Reco().

00072 {
00073   Double_t massSquared = -1.;
00074 
00075   //use momentum and beta to get the particle's energy
00076   Double_t energy = 0.;
00077   if(fBeta > 0.){ 
00078     energy = momentum / fBeta;
00079 
00080     //solve for mass using E = Sqrt(p*p + m*m);
00081     massSquared = (energy*energy) - (momentum*momentum);
00082   }
00083 
00084   return massSquared;
00085 
00086 }

Double_t CalDetTOFId::GetTOF  )  const
 

Definition at line 89 of file CalDetTOFId.cxx.

00090 {
00091   return fTOF;
00092 }


Member Data Documentation

Double_t CalDetTOFId::fBeta [private]
 

Definition at line 37 of file CalDetTOFId.h.

Referenced by CalDetTOFId(), and GetParticleMassSquared().

Double_t CalDetTOFId::fTOF [private]
 

Definition at line 39 of file CalDetTOFId.h.

Referenced by CalDetTOFId().

RawTOFDigit CalDetTOFId::fTOFDigit [private]
 

Definition at line 38 of file CalDetTOFId.h.


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:08:50 2010 for loon by  doxygen 1.3.9.1