6 #include "ERGadastStep.h" 8 #include "TVirtualMC.h" 13 : fX(0.), fY(0.), fZ(0.),
14 fPx(0.), fPy(0.), fPz(0.)
22 Int_t fiberInBundleNb,
29 ExpertTrackingStatus trackStatus,
33 : fEventID(eventID), fStepNr(stepNr), fTrackID(trackID), fMot0TrackID(mot0trackID),
34 fFiberInBundleNb(fiberInBundleNb),
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),
50 : fEventID(right.fEventID), fStepNr(right.fStepNr), fTrackID(right.fTrackID),
51 fMot0TrackID(right.fMot0TrackID), fFiberInBundleNb(right.fFiberInBundleNb),
52 fX(right.fX), fY(right.fY), fZ(right.fZ),
53 fPx(right.fPx), fPy(right.fPy), fPz(right.fPz),
54 fTOF(right.fTOF), fLength(right.fLength), fPID(right.fPID),fMass(right.fMass),
55 fTrackStatus(right.fTrackStatus),
56 fEloss(right.fEloss), fCharge(right.fCharge), fProcessID(right.fProcessID)
70 void ERGadastStep::Print()
73 const char *sParticle;
76 case 2212: sParticle=
"proton" ;
break;
77 case 2112: sParticle=
"neutron" ;
break;
78 case 22: sParticle=
"gamma" ;
break;
79 case 50000050: sParticle=
"ckov" ;
break;
80 case 111: sParticle=
"pi0" ;
break;
81 case 211: sParticle=
"pi+" ;
break;
82 case -211: sParticle=
"Pi-" ;
break;
83 case 1000010020: sParticle=
"deuteron" ;
break;
84 case 1000010030: sParticle=
"triton" ;
break;
85 case 1000020030: sParticle=
"he3" ;
break;
86 case 1000020040: sParticle=
"alpha" ;
break;
87 default: sParticle=
"not known" ;
break;
90 std::cout <<
"-I- STEPINFO:" << std::endl;
92 switch (fTrackStatus) {
93 case Entering : flag=
"enters to";
break;
94 case Exiting : flag=
"exits from";
break;
95 case Inside : flag=
"inside";
break;
96 case Stop : flag=
"stopped in";
break;
97 default: flag=
"unknown tracking status";
break;
100 std::cout <<
"STEP = " << fStepNr <<
" particle="<< sParticle <<
"(" << fPID <<
") Edep = " 101 << fEloss <<
"[KeV]" << std::endl;
102 std::cout <<
"track_status = " << flag.Data() <<
" track_charge = " << fCharge
103 <<
"track_nb = " << fTrackID << std::endl;
104 std::cout <<
"track_pos = " << fX <<
" " << fY <<
" " << fZ << std::endl;
105 std::cout <<
"track_mom = " << fPx <<
" " << fPy <<
" " << fPz << std::endl;
107 for (
int i = 0 ; i < fProcessID.GetSize(); i++){
109 std::cout <<
"process: " << fProcessID.At(i) <<
" "<< TMCProcessName[fProcessID.At(i)]
112 std::cout << std::endl;
117 ExpertTrackingStatus ERGadastStep::GetTrackStatus(){
118 if(gMC->IsTrackAlive()) {
119 if(gMC->IsTrackEntering())
121 else if(gMC->IsTrackExiting())
123 else if(gMC->IsTrackInside())