81 if (aStep -> GetPreStepPoint() -> GetPhysicalVolume() ->
GetName() !=
"DetectorPhys")
84 G4Track * theTrack = aStep -> GetTrack();
89 G4String particleName = particleDef -> GetParticleName();
94 G4double energyDeposit = aStep -> GetTotalEnergyDeposit();
96 G4int Z = particleDef-> GetAtomicNumber();
100 G4int k = ROhist -> GetReplicaNumber(0);
101 G4int i = ROhist -> GetReplicaNumber(2);
102 G4int j = ROhist -> GetReplicaNumber(1);
113 G4int* hitTrack = matrix -> GetHitTrack(i,j,k);
114 if ( *hitTrack != trackID )
122 matrix ->
Fill(trackID, particleDef, i, j, k, 0,
true);
140 if(energyDeposit != 0)
150 matrix ->
Fill(trackID, particleDef, i, j, k, energyDeposit);
155 detectorHit -> SetEdepAndPosition(i, j, k, energyDeposit);
160 if(energyDeposit != 0)
164 if (particleName ==
"proton")
165 analysis -> SecondaryProtonEnergyDeposit(i, energyDeposit/
MeV);
167 else if (particleName ==
"neutron")
168 analysis -> SecondaryNeutronEnergyDeposit(i, energyDeposit/
MeV);
170 else if (particleName ==
"alpha")
171 analysis -> SecondaryAlphaEnergyDeposit(i, energyDeposit/
MeV);
173 else if (particleName ==
"gamma")
174 analysis -> SecondaryGammaEnergyDeposit(i, energyDeposit/
MeV);
176 else if (particleName ==
"e-")
177 analysis -> SecondaryElectronEnergyDeposit(i, energyDeposit/
MeV);
179 else if (particleName ==
"triton")
180 analysis -> SecondaryTritonEnergyDeposit(i, energyDeposit/
MeV);
182 else if (particleName ==
"deuteron")
183 analysis -> SecondaryDeuteronEnergyDeposit(i, energyDeposit/
MeV);
185 else if (particleName ==
"pi+" || particleName ==
"pi-" ||
186 particleName ==
"pi0")
187 analysis -> SecondaryPionEnergyDeposit(i, energyDeposit/
MeV);
197 static G4int HCID = -1;
virtual G4int GetCollectionID(G4int i)
ntupleExperimental Fill(depthExp, EdepExp)
static constexpr double MeV
G4String sensitiveDetectorName
IORTDetectorHitsCollection * HitsCollection
void Initialize(G4HCofThisEvent *)
void EndOfEvent(G4HCofThisEvent *HCE)
static IORTMatrix * GetInstance()
void insert(G4String str)
IORTDetectorSD(G4String name)
G4CollectionNameVector collectionName
static IORTAnalysisManager * GetInstance()
G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist)
G4THitsCollection< IORTDetectorHit > IORTDetectorHitsCollection