12 #include "G4PhysicalVolumeStore.hh"
14 #include "G4TransportationManager.hh"
15 #include "G4VPhysicalVolume.hh"
16 #include "G4VSolid.hh"
21 m_logicalVolume(nullptr),
22 m_envelopeVolumeName(envelopeVolumeName),
23 m_trackRecordCollection(trackRecordCollectionName)
35 if (possibleParent->IsDaughter(thePhysicalVolume))
41 const G4int nDaughters(possibleParent->GetNoDaughters());
42 for(G4int daughter(0); daughter<nDaughters; ++daughter)
44 const G4VPhysicalVolume* daughterPhysVol = possibleParent->GetDaughter(daughter);
45 const G4LogicalVolume* daughterLogVol = daughterPhysVol->GetLogicalVolume();
56 const G4VPhysicalVolume *thePhysicalVolume = G4PhysicalVolumeStore::GetInstance()->GetVolume(
m_envelopeVolumeName,
false);
58 const G4LogicalVolume * logicalWorld = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume()->GetLogicalVolume();
70 const std::string pname = aStep->GetTrack()->GetDefinition()->GetParticleName();
71 const int pdgcode = (pname==
"geantino") ? 999 : aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
77 G4StepPoint *postStep=aStep->GetPostStepPoint();
78 G4ThreeVector
pos=postStep->GetPosition();
79 G4ThreeVector
mom=postStep->GetMomentum();
80 const double ener=postStep->GetTotalEnergy();
81 const double time=postStep->GetGlobalTime();
83 G4StepPoint *preStep=aStep->GetPreStepPoint();
84 G4VPhysicalVolume *preVol=preStep->GetPhysicalVolume();