7 #include "ERNeuRadPoint.h" 8 #include "FairLogger.h" 15 fX_out(0.), fY_out(0.), fZ_out(0.),
16 fPx_out(0.), fPy_out(0.), fPz_out(0.)
24 Int_t fiberNb, Int_t pixelNb, Int_t moduleNb,
26 TVector3 posIn, TVector3 posInLoc,
27 TVector3 posOut, TVector3 momIn, TVector3 momOut,
28 Double_t timeIn, Double_t timeOut, Double_t trackLength,
29 Double_t eLoss, Double_t lightYield, Int_t pid, Double_t charge)
30 : FairMCPoint(trackID, -1., posIn, momIn, timeIn, 0., eLoss),
32 fFiberNb(fiberNb), fPixelNb(pixelNb),fModuleNb(moduleNb),
33 fXlocal(posInLoc.X()),fYlocal(posInLoc.Y()), fZlocal(posInLoc.Z()),
34 fX_out(posOut.X()), fY_out(posOut.Y()), fZ_out(posOut.Z()),
35 fPx_out(momOut.X()), fPy_out(momOut.Y()), fPz_out(momOut.Z()),
36 fLightYield(lightYield), fPID(pid), fCharge(charge),fTimeIn(timeIn), fTimeOut(timeOut),
37 fTrackLength(trackLength)
45 fFiberNb(right.fFiberNb),fPixelNb(right.fPixelNb),fModuleNb(right.fModuleNb),
46 fX_out(right.fX_out), fY_out(right.fY_out), fZ_out(right.fZ_out),
47 fPx_out(right.fPx_out), fPy_out(right.fPy_out), fPz_out(right.fPz_out),
48 fLightYield(right.fLightYield), fPID(right.fPID), fCharge(right.fCharge),
49 fTimeIn(right.fTimeIn),fTimeOut(right.fTimeOut), fTrackLength(right.fTrackLength)
63 LOG(INFO) <<
"-I- ERNeuRadPoint: track " << fTrackID <<
" mother track = " << fMot0TrackID << FairLogger::endl;
64 LOG(INFO) <<
" Position (" << fX <<
", " << fY <<
", " << fZ <<
") cm" << FairLogger::endl;
65 LOG(INFO) <<
" Momentum (" << fPx <<
", " << fPy <<
", " << fPz <<
") GeV" << FairLogger::endl;
66 LOG(INFO) <<
" Time " << fTime <<
" ns, Length " << fLength <<
" cm" << FairLogger::endl;
67 LOG(INFO) <<
" Energy loss " << fELoss <<
" keV, Light yield " << fLightYield <<
" MeV "<< FairLogger::endl;
68 LOG(INFO) <<
" Fiber number " << fFiberNb <<
" Pixel number " << fPixelNb <<
" Module number " << fModuleNb << FairLogger::endl;
76 if ( (fZ_out-z)*(fZ-z) >= 0. )
return (fX_out+fX)/2.;
77 Double_t dz = fZ_out - fZ;
78 return ( fX + (z-fZ) / dz * (fX_out-fX) );
83 Double_t ERNeuRadPoint::GetY(Double_t z)
const 85 if ( (fZ_out-z)*(fZ-z) >= 0. )
return (fY_out+fY)/2.;
86 Double_t dz = fZ_out - fZ;
88 return ( fY + (z-fZ) / dz * (fY_out-fY) );
95 Double_t dz = fZ_out - fZ;
96 if ( TMath::Abs(dz) < 1.e-4 )
return kFALSE;
102 Double_t ERNeuRadPoint::GetPIn()
const {
103 return sqrt(fPx*fPx + fPy*fPy + fPz*fPz);
108 Double_t ERNeuRadPoint::GetPOut()
const {
109 return sqrt(fPx_out*fPx_out + fPy_out*fPy_out + fPz_out*fPz_out);
112 Double_t ERNeuRadPoint::GetP(Double_t pointLen)
const {
113 return GetPIn() + (GetPOut() - GetPIn())*pointLen/GetLength();
116 Double_t ERNeuRadPoint::GetTime(Double_t pointLen)
const {
117 return fTime + (fTimeOut - fTime)*pointLen/GetLength();
120 Double_t ERNeuRadPoint::GetLength()
const {
121 return sqrt((fX_out-fX)*(fX_out-fX) + (fY_out-fY)*(fY_out-fY) + (fZ_out-fZ)*(fZ_out-fZ) );
virtual void Print(const Option_t *opt=0) const
Double_t GetX(Double_t z) const
The data class for storing pieces of charged tracks in sensitive volumes in NeuRad.