14 #include <Geant4/G4ParticleDefinition.hh>
15 #include <Geant4/G4Step.hh>
16 #include <Geant4/G4StepPoint.hh>
17 #include <Geant4/G4StepStatus.hh>
18 #include <Geant4/G4String.hh>
19 #include <Geant4/G4SystemOfUnits.hh>
20 #include <Geant4/G4ThreeVector.hh>
21 #include <Geant4/G4TouchableHandle.hh>
22 #include <Geant4/G4Track.hh>
23 #include <Geant4/G4TrackStatus.hh>
24 #include <Geant4/G4Types.hh>
25 #include <Geant4/G4VTouchable.hh>
26 #include <Geant4/G4VUserTrackInformation.hh>
31 class G4VPhysicalVolume;
56 G4VPhysicalVolume*
volume = aStep->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
59 G4double edep = aStep->GetTotalEnergyDeposit() /
GeV;
60 G4double eion = (aStep->GetTotalEnergyDeposit() - aStep->GetNonIonizingEnergyDeposit()) /
GeV;
61 G4double light_yield = 0;
63 const G4Track* aTrack = aStep->GetTrack();
72 bool geantino =
false;
76 if (aTrack->GetParticleDefinition()->GetPDGEncoding() == 0 &&
77 aTrack->GetParticleDefinition()->GetParticleName().find(
"geantino") != string::npos)
81 G4StepPoint* prePoint = aStep->GetPreStepPoint();
82 G4StepPoint* postPoint = aStep->GetPostStepPoint();
86 switch (prePoint->GetStepStatus())
103 m_Hit->
set_t(0, prePoint->GetGlobalTime() / nanosecond);
106 if (G4VUserTrackInformation*
p = aTrack->GetUserInformation())
133 if (G4VUserTrackInformation*
p = aTrack->GetUserInformation())
142 cout <<
"PHG4HcalSteppingAction: hit outside acceptance, layer: " << layer_id << endl;
156 m_Hit->
set_t(1, postPoint->GetGlobalTime() / nanosecond);
171 light_yield = light_yield *
GetLightCorrection(postPoint->GetPosition().x() /
cm, (postPoint->GetPosition().y() /
cm));
183 cout <<
"PHG4HcalSteppingAction: hit outside acceptance zmin " <<
zmin <<
", zmax " <<
zmax <<
" at exit" << endl;
193 if (G4VUserTrackInformation*
p = aTrack->GetUserInformation())
209 if (postPoint->GetStepStatus() == fGeomBoundary ||
210 postPoint->GetStepStatus() == fWorldBoundary ||
211 postPoint->GetStepStatus() == fAtRestDoItProc ||
212 aTrack->GetTrackStatus() == fStopAndKill)
249 string absorbernodename;
262 m_HitContainer = findNode::getClass<PHG4HitContainer>(topNode, hitnodename.c_str());
263 m_AbsorberHits = findNode::getClass<PHG4HitContainer>(topNode, absorbernodename.c_str());
267 std::cout <<
"PHG4HcalSteppingAction::SetTopNode - unable to find " << hitnodename << std::endl;
273 std::cout <<
"PHG4HcalSteppingAction::SetTopNode - unable to find " << absorbernodename << std::endl;