97 #ifdef G4ANALYSIS_USE_ROOT
102 if(particleType ==
"nucleus") {
111 analysisMgr->FillFragmentTuple(A, Z, energy, posX, posY, posZ);
112 }
else if(particleName ==
"proton") {
120 G4String secondaryParticleName = def -> GetParticleName();
125 if(secondaryParticleName ==
"proton") {
126 analysis->hydrogenEnergy(secondaryParticleKineticEnergy /
MeV);
128 if(secondaryParticleName ==
"deuteron") {
129 analysis->hydrogenEnergy((secondaryParticleKineticEnergy/2) /
MeV);
131 if(secondaryParticleName ==
"triton") {
132 analysis->hydrogenEnergy((secondaryParticleKineticEnergy/3) /
MeV);
134 if(secondaryParticleName ==
"alpha") {
135 analysis->heliumEnergy((secondaryParticleKineticEnergy/4) /
MeV);
137 if(secondaryParticleName ==
"He3"){
138 analysis->heliumEnergy((secondaryParticleKineticEnergy/3) /
MeV);
147 if ((aStep -> GetTrack() -> GetTrackID() == 1) &&
148 (aStep -> GetTrack() -> GetVolume() -> GetName() ==
"PhantomPhys") &&
149 (aStep -> GetPostStepPoint() -> GetProcessDefinedStep() != NULL))
151 G4String process = aStep -> GetPostStepPoint() ->
152 GetProcessDefinedStep() -> GetProcessName();
154 if ((process ==
"Transportation") || (process ==
"StepLimiter")) {;}
157 if ((process ==
"msc") || (process ==
"hLowEIoni") || (process ==
"hIoni"))
159 runAction -> AddEMProcess();
163 runAction -> AddHadronicProcess();
165 if ( (process !=
"LElastic") && (process !=
"ProtonInelastic") && (process !=
"hElastic") )
166 G4cout <<
"Warning! Unknown proton process: "<< process <<
G4endl;
179 G4TrackVector* fSecondary = steppingManager -> GetfSecondary();
181 for(
size_t lp1=0;lp1<(*fSecondary).size(); lp1++)
183 G4String volumeName = (*fSecondary)[lp1] -> GetVolume() -> GetName();
185 if (volumeName ==
"phantomPhys")
187 #ifdef G4ANALYSIS_USE_ROOT
188 G4String secondaryParticleName = (*fSecondary)[lp1]->GetDefinition() -> GetParticleName();
189 G4double secondaryParticleKineticEnergy = (*fSecondary)[lp1] -> GetKineticEnergy();
193 if (secondaryParticleName ==
"e-")
194 analysis -> electronEnergyDistribution(secondaryParticleKineticEnergy/
MeV);
196 if (secondaryParticleName ==
"gamma")
197 analysis -> gammaEnergyDistribution(secondaryParticleKineticEnergy/
MeV);
199 if (secondaryParticleName ==
"deuteron")
200 analysis -> deuteronEnergyDistribution(secondaryParticleKineticEnergy/
MeV);
202 if (secondaryParticleName ==
"triton")
203 analysis -> tritonEnergyDistribution(secondaryParticleKineticEnergy/
MeV);
205 if (secondaryParticleName ==
"alpha")
206 analysis -> alphaEnergyDistribution(secondaryParticleKineticEnergy/
MeV);
208 G4double z = (*fSecondary)[lp1]-> GetDynamicParticle() -> GetDefinition() -> GetPDGCharge();
211 G4int a = (*fSecondary)[lp1]-> GetDynamicParticle() -> GetDefinition() -> GetBaryonNumber();
212 G4int electronOccupancy = (*fSecondary)[lp1] -> GetDynamicParticle() -> GetTotalOccupancy();
216 analysis -> genericIonInformation(a, z, electronOccupancy, secondaryParticleKineticEnergy/
MeV);
void SetTrackStatus(const G4TrackStatus aTrackStatus)
G4ParticleDefinition * GetDefinition() const
static HadrontherapyAnalysisManager * GetInstance()
HadrontherapySteppingAction(HadrontherapyRunAction *)
const G4ThreeVector & GetPosition() const
const G4String & GetParticleName() const
void UserSteppingAction(const G4Step *)
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
G4SteppingManager * fpSteppingManager
const G4String & GetParticleType() const
std::vector< G4Track * > G4TrackVector
G4VPhysicalVolume * GetVolume() const
G4Track * GetTrack() const
G4double GetPDGCharge() const
G4int GetBaryonNumber() const
~HadrontherapySteppingAction()