44 #include "G4TrackVector.hh" 50 #include "G4StepPoint.hh" 51 #include "G4TrackStatus.hh" 52 #include "G4TrackVector.hh" 91 if( aStep->GetTrack()->GetVolume()->GetName() ==
"NewDetectorPhys"){
93 G4double secondaryParticleKineticEnergy = aStep->GetTrack()->
97 if(particleType ==
"nucleus") {
100 G4double posX = aStep->GetTrack()->GetPosition().x() /
cm;
101 G4double posY = aStep->GetTrack()->GetPosition().y() /
cm;
102 G4double posZ = aStep->GetTrack()->GetPosition().z() /
cm;
107 }
else if(particleName ==
"proton") {
108 G4double posX = aStep->GetTrack()->GetPosition().x() /
cm ;
109 G4double posY = aStep->GetTrack()->GetPosition().y() /
cm ;
110 G4double posZ = aStep->GetTrack()->GetPosition().z() /
cm ;
115 G4String secondaryParticleName = def -> GetParticleName();
120 if(secondaryParticleName ==
"proton") {
123 if(secondaryParticleName ==
"deuteron") {
126 if(secondaryParticleName ==
"triton") {
129 if(secondaryParticleName ==
"alpha") {
132 if(secondaryParticleName ==
"He3"){
136 aStep->GetTrack()->SetTrackStatus(fKillTrackAndSecondaries);
141 if ((aStep -> GetTrack() -> GetTrackID() == 1) &&
142 (aStep -> GetTrack() -> GetVolume() -> GetName() ==
"PhantomPhys") &&
143 (aStep -> GetPostStepPoint() -> GetProcessDefinedStep() != NULL))
145 G4String process = aStep -> GetPostStepPoint() ->
146 GetProcessDefinedStep() -> GetProcessName();
148 if ((process ==
"Transportation") || (process ==
"StepLimiter")) {;}
151 if ((process ==
"msc") || (process ==
"hLowEIoni") || (process ==
"hIoni"))
159 if ( (process !=
"LElastic") && (process !=
"ProtonInelastic") && (process !=
"hElastic") )
160 G4cout <<
"Warning! Unknown proton process: "<< process <<
G4endl;
173 G4TrackVector* fSecondary = steppingManager -> GetfSecondary();
175 for(
size_t lp1=0;lp1<(*fSecondary).size(); lp1++)
177 G4String volumeName = (*fSecondary)[lp1] -> GetVolume() -> GetName();
179 if (volumeName ==
"phantomPhys")
181 G4String secondaryParticleName = (*fSecondary)[lp1]->GetDefinition() -> GetParticleName();
182 G4double secondaryParticleKineticEnergy = (*fSecondary)[lp1] -> GetKineticEnergy();
186 if (secondaryParticleName ==
"e-")
187 analysis -> electronEnergyDistribution(secondaryParticleKineticEnergy/
MeV);
189 if (secondaryParticleName ==
"gamma")
190 analysis -> gammaEnergyDistribution(secondaryParticleKineticEnergy/
MeV);
192 if (secondaryParticleName ==
"deuteron")
193 analysis -> deuteronEnergyDistribution(secondaryParticleKineticEnergy/
MeV);
195 if (secondaryParticleName ==
"triton")
196 analysis -> tritonEnergyDistribution(secondaryParticleKineticEnergy/
MeV);
198 if (secondaryParticleName ==
"alpha")
199 analysis -> alphaEnergyDistribution(secondaryParticleKineticEnergy/
MeV);
201 G4double z = (*fSecondary)[lp1]-> GetDynamicParticle() -> GetDefinition() -> GetPDGCharge();
204 G4int a = (*fSecondary)[lp1]-> GetDynamicParticle() -> GetDefinition() -> GetBaryonNumber();
205 G4int electronOccupancy = (*fSecondary)[lp1] -> GetDynamicParticle() -> GetTotalOccupancy();
209 analysis -> genericIonInformation(a, z, electronOccupancy, secondaryParticleKineticEnergy/
MeV);
IORTRunAction * runAction
G4int GetBaryonNumber() const
const G4String & GetParticleType() const
void hydrogenEnergy(G4double secondaryParticleKineticEnergy)
Energy distribution of the hydrogen (proton, d, t) particles after the phantom.
void FillFragmentTuple(G4int A, G4double Z, G4double energy, G4double posX, G4double posY, G4double posZ)
Energy ntuple.
void UserSteppingAction(const G4Step *)
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
G4SteppingManager * fpSteppingManager
static IORTAnalysisManager * GetInstance()
IORTSteppingAction(IORTRunAction *)
G4double GetPDGCharge() const
void heliumEnergy(G4double secondaryParticleKineticEnergy)
Energy distribution of the helium (He3 and alpha) particles after the phantom.