36 #include "SteppingAction.hh"
37 #include "AnalysisManager.hh"
53 G4Track* theTrack = aStep -> GetTrack();
56 if(theTrack-> GetTrackStatus() ==
fAlive) {
return; }
59 fSecondary = steppingManager -> GetfSecondary();
62 for(
size_t lp1=0;lp1<(*fSecondary).size(); lp1++)
65 G4String volumeName = (*fSecondary)[lp1] -> GetVolume() -> GetName();
66 G4String secondaryParticleName = (*fSecondary)[lp1]->GetDefinition() -> GetParticleName();
67 G4double secondaryParticleKineticEnergy = (*fSecondary)[lp1] -> GetKineticEnergy();
69 G4double charge = (*fSecondary)[lp1] -> GetDynamicParticle() -> GetDefinition() -> GetPDGCharge();
70 G4int AA = (*fSecondary)[lp1] -> GetDynamicParticle() -> GetDefinition() -> GetBaryonNumber();
72 if (volumeName ==
"SV_phys1")
76 if ((secondaryParticleName ==
"proton") ||
77 (secondaryParticleName ==
"neutron")||
78 (secondaryParticleName ==
"alpha") ||
79 (secondaryParticleName ==
"deuton") ||
80 (secondaryParticleName ==
"triton") ||
81 (secondaryParticleName ==
"He3") ||
82 (secondaryParticleName ==
"GenericIon"))
83 analysis -> FillSecondaries(AA, charge, secondaryParticleKineticEnergy/
MeV);
G4TrackVector * fSecondary
static constexpr double MeV
AnalysisManager * analysis
void UserSteppingAction(const G4Step *)
G4SteppingManager * fpSteppingManager