5 #include "ERNeuRadStep.h" 7 #include "TVirtualMC.h" 9 #include "FairLogger.h" 13 : fX(0.), fY(0.), fZ(0.),
14 fPx(0.), fPy(0.), fPz(0.)
22 Int_t fiberNb, Int_t pixelNb, Int_t moduleNb,
29 ExpertTrackingStatus trackStatus,
33 : fEventID(eventID), fStepNr(stepNr), fTrackID(trackID), fMot0TrackID(mot0trackID),
34 fFiberNb(fiberNb),fPixelNb(pixelNb),fModuleNb(moduleNb),
35 fX(pos.X()), fY(pos.Y()), fZ(pos.Z()),
36 fPx(mom.X()), fPy(mom.Y()), fPz(mom.Z()),
37 fTOF(tof), fLength(length), fPID(pid), fMass(mass),
38 fTrackStatus(trackStatus),
48 : fEventID(right.fEventID), fStepNr(right.fStepNr), fTrackID(right.fTrackID),
49 fMot0TrackID(right.fMot0TrackID), fFiberNb(right.fFiberNb),fPixelNb(right.fPixelNb),
50 fModuleNb(right.fModuleNb),fX(right.fX), fY(right.fY), fZ(right.fZ),
51 fPx(right.fPx), fPy(right.fPy), fPz(right.fPz),
52 fTOF(right.fTOF), fLength(right.fLength), fPID(right.fPID),fMass(right.fMass),
53 fTrackStatus(right.fTrackStatus),
54 fEloss(right.fEloss), fCharge(right.fCharge), fProcessID(right.fProcessID)
66 void ERNeuRadStep::Print()
69 const char *sParticle;
72 case 2212: sParticle=
"proton" ;
break;
73 case 2112: sParticle=
"neutron" ;
break;
74 case 22: sParticle=
"gamma" ;
break;
75 case 50000050: sParticle=
"ckov" ;
break;
76 case 111: sParticle=
"pi0" ;
break;
77 case 211: sParticle=
"pi+" ;
break;
78 case -211: sParticle=
"Pi-" ;
break;
79 case 1000010020: sParticle=
"deuteron" ;
break;
80 case 1000010030: sParticle=
"triton" ;
break;
81 case 1000020030: sParticle=
"he3" ;
break;
82 case 1000020040: sParticle=
"alpha" ;
break;
83 default: sParticle=
"not known" ;
break;
86 std::cout <<
"-I- STEPINFO:" << std::endl;
88 switch (fTrackStatus) {
89 case Entering : flag=
"enters to";
break;
90 case Exiting : flag=
"exits from";
break;
91 case Inside : flag=
"inside";
break;
92 case Stop : flag=
"stopped in";
break;
93 default: flag=
"unknown tracking status";
break;
96 LOG(INFO) <<
"STEP = " << fStepNr <<
" particle="<< sParticle <<
"(" << fPID <<
") Edep = " 97 << fEloss <<
"[KeV]" << FairLogger::endl;
98 LOG(INFO) <<
"track_status = " << flag.Data() <<
" track_charge = " << fCharge
99 <<
"track_nb = " << fTrackID << FairLogger::endl;
100 LOG(INFO) <<
"track_pos = " << fX <<
" " << fY <<
" " << fZ << FairLogger::endl;
101 LOG(INFO) <<
"track_mom = " << fPx <<
" " << fPy <<
" " << fPz << FairLogger::endl;
103 for (
int i = 0 ; i < fProcessID.GetSize(); i++){
105 LOG(INFO) <<
"process: " << fProcessID.At(i) <<
" "<< TMCProcessName[fProcessID.At(i)]
112 ExpertTrackingStatus ERNeuRadStep::GetTrackStatus() {
113 if(gMC->IsTrackAlive()) {
114 if(gMC->IsTrackEntering())
116 else if(gMC->IsTrackExiting())
118 else if(gMC->IsTrackInside())