32 #include "Analysis.hh" 34 #include "SteppingAction.hh" 35 #include "RunAction.hh" 36 #include "DetectorConstruction.hh" 37 #include "PrimaryGeneratorAction.hh" 62 if (step->GetTrack()->GetDynamicParticle()->GetDefinition() ->GetParticleName() ==
"e-") flagParticle = 1;
63 if (step->GetTrack()->GetDynamicParticle()->GetDefinition() ->GetParticleName() ==
"proton") flagParticle = 2;
64 if (step->GetTrack()->GetDynamicParticle()->GetDefinition() ->GetParticleName() ==
"GenericIon") flagParticle = 3;
66 if (step->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName()==
"msc") flagProcess =10;
67 if (step->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName()==
"e-_G4MicroElecElastic") flagProcess =11;
68 if (step->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName()==
"e-_G4MicroElecInelastic") flagProcess =12;
69 if (step->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName()==
"eCapture") flagProcess =13;
71 if (step->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName()==
"p_G4MicroElecInelastic") flagProcess =14;
73 if (step->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName()==
"ion_G4MicroElecInelastic") flagProcess =15;
75 if (step->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName()==
"hIoni") flagProcess =16;
76 if (step->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName()==
"eIoni") flagProcess =17;
78 if (step->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName()!=
"Transportation")
80 x=step->GetPreStepPoint()->GetPosition().x()/
nanometer;
81 y=step->GetPreStepPoint()->GetPosition().y()/
nanometer;
82 z=step->GetPreStepPoint()->GetPosition().z()/
nanometer;
83 xp=step->GetPostStepPoint()->GetPosition().x()/
nanometer;
84 yp=step->GetPostStepPoint()->GetPosition().y()/
nanometer;
85 zp=step->GetPostStepPoint()->GetPosition().z()/
nanometer;
91 analysisManager->FillNtupleDColumn(0, flagParticle);
92 analysisManager->FillNtupleDColumn(1, flagProcess);
93 analysisManager->FillNtupleDColumn(2, x);
94 analysisManager->FillNtupleDColumn(3, y);
95 analysisManager->FillNtupleDColumn(4, z);
96 analysisManager->FillNtupleDColumn(5, step->GetTotalEnergyDeposit()/
eV);
97 analysisManager->FillNtupleDColumn(6, std::sqrt((x-xp)*(x-xp)+(y-yp)*(y-yp)+(z-zp)*(z-zp))/
nm);
98 analysisManager->FillNtupleDColumn(7, (step->GetPreStepPoint()->GetKineticEnergy() - step->GetPostStepPoint()->GetKineticEnergy())/
eV );
99 analysisManager->AddNtupleRow();
static const double nanometer
void UserSteppingAction(const G4Step *)
ExG4HbookAnalysisManager G4AnalysisManager