16 #include "Geant4/G4Cerenkov.hh" 17 #include "Geant4/G4Event.hh" 18 #include "Geant4/G4EventManager.hh" 19 #include "Geant4/G4HCofThisEvent.hh" 20 #include "Geant4/G4SDManager.hh" 21 #include "Geant4/G4Scintillation.hh" 22 #include "Geant4/G4Step.hh" 23 #include "Geant4/G4SteppingManager.hh" 24 #include "Geant4/G4ThreeVector.hh" 25 #include "Geant4/G4VSolid.hh" 26 #include "Geant4/G4VVisManager.hh" 27 #include "Geant4/G4ios.hh" 51 G4double
edep = aStep->GetTotalEnergyDeposit() / CLHEP::MeV;
53 if (edep == 0.)
return false;
55 const int electronsperMeV = 10000;
56 int nrelec = (int)round(edep * electronsperMeV);
57 if (aStep->GetTrack()->GetDynamicParticle()->GetCharge() == 0)
return false;
59 G4SteppingManager* fpSteppingManager =
60 G4EventManager::GetEventManager()->GetTrackingManager()->GetSteppingManager();
61 G4StepStatus stepStatus = fpSteppingManager->GetfStepStatus();
62 if (stepStatus != fAtRestDoItProc) {
63 G4ProcessVector* procPost = fpSteppingManager->GetfPostStepDoItVector();
64 size_t MAXofPostStepLoops = fpSteppingManager->GetMAXofPostStepLoops();
65 for (
size_t i3 = 0; i3 < MAXofPostStepLoops; i3++) {
66 if (!(*procPost)[i3])
continue;
73 if ((*procPost)[i3]->GetProcessName() ==
"Scintillation") {
74 G4Scintillation* proc1 = (G4Scintillation*)(*procPost)[i3];
75 photons += proc1->GetNumPhotons();
80 aStep->GetPreStepPoint()->GetPosition().y() / CLHEP::cm,
81 aStep->GetPreStepPoint()->GetPosition().z() / CLHEP::cm);
83 aStep->GetPostStepPoint()->GetPosition().y() / CLHEP::cm,
84 aStep->GetPostStepPoint()->GetPosition().z() / CLHEP::cm);
92 aStep->GetPreStepPoint()->GetGlobalTime() / CLHEP::ns,
93 aStep->GetPostStepPoint()->GetGlobalTime() / CLHEP::ns,
94 aStep->GetTrack()->GetTrackID(),
95 aStep->GetTrack()->GetParticleDefinition()->GetPDGEncoding(),
96 aStep->GetTrack()->GetTrackID()
sim::SimEnergyDepositCollection hitCollection
SimEnergyDepositSD(G4String)
void Initialize(G4HCofThisEvent *)
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Energy deposition in the active material.
G4bool ProcessHits(G4Step *, G4TouchableHistory *)