14 #include <Geant4/G4ParticleDefinition.hh>
15 #include <Geant4/G4ReferenceCountedHandle.hh>
16 #include <Geant4/G4Step.hh>
17 #include <Geant4/G4StepPoint.hh>
18 #include <Geant4/G4StepStatus.hh>
19 #include <Geant4/G4String.hh>
20 #include <Geant4/G4SystemOfUnits.hh>
21 #include <Geant4/G4ThreeVector.hh>
22 #include <Geant4/G4TouchableHandle.hh>
23 #include <Geant4/G4Track.hh>
24 #include <Geant4/G4TrackStatus.hh>
25 #include <Geant4/G4Types.hh>
26 #include <Geant4/G4VTouchable.hh>
27 #include <Geant4/G4VUserTrackInformation.hh>
47 G4TouchableHandle touch = aStep->GetPreStepPoint()->GetTouchableHandle();
58 int tower_id = touch->GetCopyNumber();
62 G4double eion = (aStep->GetTotalEnergyDeposit() - aStep->GetNonIonizingEnergyDeposit()) /
GeV;
65 const G4Track* aTrack = aStep->GetTrack();
68 G4double edep = aTrack->GetKineticEnergy() /
GeV;
69 G4Track* killtrack =
const_cast<G4Track*
>(aTrack);
70 killtrack->SetTrackStatus(fStopAndKill);
76 bool geantino =
false;
77 if (aTrack->GetParticleDefinition()->GetPDGEncoding() == 0 && aTrack->GetParticleDefinition()->GetParticleName().find(
"geantino") != std::string::npos)
83 G4StepPoint* prePoint = aStep->GetPreStepPoint();
84 G4StepPoint* postPoint = aStep->GetPostStepPoint();
86 switch (prePoint->GetStepStatus())
103 hit->
set_x(0, prePoint->GetPosition().x() /
cm);
104 hit->
set_y(0, prePoint->GetPosition().y() /
cm);
105 hit->
set_z(0, prePoint->GetPosition().z() /
cm);
113 hit->
set_t(0, prePoint->GetGlobalTime() / nanosecond);
118 if (G4VUserTrackInformation*
p = aTrack->GetUserInformation())
135 if (G4VUserTrackInformation*
p = aTrack->GetUserInformation())
151 hit->
set_x(1, postPoint->GetPosition().x() /
cm);
152 hit->
set_y(1, postPoint->GetPosition().y() /
cm);
153 hit->
set_z(1, postPoint->GetPosition().z() /
cm);
155 hit->
set_t(1, postPoint->GetGlobalTime() / nanosecond);
168 if (G4VUserTrackInformation*
p = aTrack->GetUserInformation())
197 hits_ = findNode::getClass<PHG4HitContainer>(topNode, hitnodename);
202 std::cout <<
"PHG4CrystalCalorimeterSteppingAction::SetTopNode - unable to find " << hitnodename << std::endl;