14 #include "FairLogger.h" 19 fX_out(0.), fY_out(0.), fZ_out(0.),
20 fPx_out(0.), fPy_out(0.), fPz_out(0.)
29 TVector3 posIn, TVector3 posInLoc,
30 TVector3 posOut, TVector3 momIn, TVector3 momOut,
31 Double_t timeIn, Double_t timeOut, Double_t trackLength, Double_t eLoss, Double_t lightYield, Int_t pid, Double_t charge)
32 : FairMCPoint(trackID, -1., posIn, momIn, timeIn, 0., eLoss),
35 fXlocal(posInLoc.X()),fYlocal(posInLoc.Y()), fZlocal(posInLoc.Z()),
36 fX_out(posOut.X()), fY_out(posOut.Y()), fZ_out(posOut.Z()),
37 fPx_out(momOut.X()), fPy_out(momOut.Y()), fPz_out(momOut.Z()),
38 fLightYield(lightYield), fPID(pid), fCharge(charge),fTimeIn(timeIn), fTimeOut(timeOut),
39 fTrackLength(trackLength)
50 fX_out(right.fX_out), fY_out(right.fY_out), fZ_out(right.fZ_out),
51 fPx_out(right.fPx_out), fPy_out(right.fPy_out), fPz_out(right.fPz_out),
52 fLightYield(right.fLightYield), fPID(right.fPID), fCharge(right.fCharge),
53 fTimeIn(right.fTimeIn),fTimeOut(right.fTimeOut), fTrackLength(right.fTrackLength)
71 LOG(INFO) <<
"-I- ERPoint: track " << fTrackID <<
" mother track = " << fMot0TrackID << FairLogger::endl;
72 LOG(INFO) <<
" Position (" << fX <<
", " << fY <<
", " << fZ <<
") cm" << FairLogger::endl;
73 LOG(INFO) <<
" Momentum (" << fPx <<
", " << fPy <<
", " << fPz <<
") GeV" << FairLogger::endl;
74 LOG(INFO) <<
" Time " << fTime <<
" ns, Length " << fLength <<
" cm" << FairLogger::endl;
75 LOG(INFO) <<
" Energy loss " << fELoss <<
" keV, Light yield " << fLightYield <<
" MeV "<< FairLogger::endl;
76 LOG(INFO) <<
" Vol number " << fVolNb << FairLogger::endl;
86 if ( (fZ_out-z)*(fZ-z) >= 0. )
return (fX_out+fX)/2.;
87 Double_t dz = fZ_out - fZ;
88 return ( fX + (z-fZ) / dz * (fX_out-fX) );
95 Double_t ERPoint::GetY(Double_t z)
const 97 if ( (fZ_out-z)*(fZ-z) >= 0. )
return (fY_out+fY)/2.;
98 Double_t dz = fZ_out - fZ;
100 return ( fY + (z-fZ) / dz * (fY_out-fY) );
109 Double_t dz = fZ_out - fZ;
110 if ( TMath::Abs(dz) < 1.e-4 )
return kFALSE;
116 Double_t ERPoint::GetPIn()
const{
117 return sqrt(fPx*fPx + fPy*fPy + fPz*fPz);
122 Double_t ERPoint::GetPOut()
const{
123 return sqrt(fPx_out*fPx_out + fPy_out*fPy_out + fPz_out*fPz_out);
126 Double_t ERPoint::GetP(Double_t pointLen)
const{
127 return GetPIn() + (GetPOut() - GetPIn())*pointLen/GetLength();
130 Double_t ERPoint::GetTime(Double_t pointLen)
const{
131 return fTime + (fTimeOut - fTime)*pointLen/GetLength();
134 Double_t ERPoint::GetLength()
const{
135 return sqrt((fX_out-fX)*(fX_out-fX) + (fY_out-fY)*(fY_out-fY) + (fZ_out-fZ)*(fZ_out-fZ) );
Double_t GetX(Double_t z) const
virtual void Print(const Option_t *opt=0) const
The data class for storing pieces of charged tracks in sensitive volumes in NeuRad.