5 #include "ERBeamDetTargetPoint.h" 11 fX_out(0.), fY_out(0.), fZ_out(0.),
12 fPx_out(0.), fPy_out(0.), fPz_out(0.),
21 TVector3 posOut, TVector3 momIn, TVector3 momOut,
22 Double_t tof, Double_t length, Double_t eLoss, Double_t lightYield)
23 : FairMCPoint(trackID, -1., posIn, momIn, tof, length, eLoss),
26 fX_in(posIn.X()), fY_in(posIn.Y()), fZ_in(posIn.Z()),
27 fPx_in(momIn.X()), fPy_in(momIn.Y()), fPz_in(momIn.Z()),
28 fX_out(posOut.X()), fY_out(posOut.Y()), fZ_out(posOut.Z()),
29 fPx_out(momOut.X()), fPy_out(momOut.Y()), fPz_out(momOut.Z()),
30 fLightYield(lightYield)
40 cout <<
"-I- ERBeamDetTargetPoint: track " << fTrackID <<
" mother track = " << fMot0TrackID << endl;
41 cout <<
" particle ID " << fPid << endl;
42 cout <<
" Position (" << fX <<
", " << fY <<
", " << fZ <<
") cm" << endl;
43 cout <<
" Momentum (" << fPx <<
", " << fPy <<
", " << fPz <<
") MeV" << endl;
44 cout <<
" Time " << fTime <<
" ns, Length " << fLength <<
" cm" << endl;
45 cout <<
" Energy loss " << fELoss <<
" MeV "<< endl;
51 if ( (fZ_out-z)*(fZ-z) >= 0. )
return (fX_out+fX)/2.;
52 Double_t dz = fZ_out - fZ;
53 return ( fX + (z-fZ) / dz * (fX_out-fX) );
57 Double_t ERBeamDetTargetPoint::GetY(Double_t z)
const 59 if ( (fZ_out-z)*(fZ-z) >= 0. )
return (fY_out+fY)/2.;
60 Double_t dz = fZ_out - fZ;
62 return ( fY + (z-fZ) / dz * (fY_out-fY) );
68 Double_t dz = fZ_out - fZ;
69 if ( TMath::Abs(dz) < 1.e-4 )
return kFALSE;
Double_t GetX(Double_t z) const
virtual void Print(const Option_t *opt=0) const
virtual ~ERBeamDetTargetPoint()