21{
22 struct VolumeHolder {
23 G4LogicalVolume *BP, *
ID, *
CALO, *MU, *TTR;
24 };
25
26
27 static const VolumeHolder vh = [&]() {
29 G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance();
30 for (
size_t i=0;
i<lvs->size();++
i) {
31
32 if ( !(*lvs)[i] ) { continue; }
33 if ( (*lvs)[i]->GetName() ==
"BeamPipe::BeamPipe" ) {
h.BP = (*lvs)[
i]; }
34 else if ( (*lvs)[i]->GetName() ==
"IDET::IDET" || (*lvs)[i]->GetName() ==
"ITK::ITK" ) {
h.ID = (*lvs)[
i]; }
35 else if ( (*lvs)[i]->GetName() ==
"CALO::CALO" ) {
h.CALO = (*lvs)[
i]; }
36 else if ( (*lvs)[i]->GetName() ==
"MUONQ02::MUONQ02" ) {
h.MU = (*lvs)[
i]; }
37 else if ( (*lvs)[i]->GetName() ==
"TTR_BARREL::TTR_BARREL" ) {
h.TTR = (*lvs)[
i]; }
38 }
39
40 const auto& worldVolume = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume()->GetLogicalVolume();
43 }();
44
47
48 const G4StepPoint *postStep = aStep->GetPostStepPoint();
49 bool leavingG4World = postStep->GetStepStatus()==fWorldBoundary;
50
51 if ( leavingG4World ) {
53 return nextGeoID;
54 }
55
56
59 return nextGeoID;
60 }
61
62
65 }
68 }
71 }
74 }
77 }
80 }
81 else {
83 }
84
85 return nextGeoID;
86}
std::vector< Identifier > ID
static AtlasDetDescr::AtlasRegion getNextGeoIDFromSvc(const G4StepPoint &postStep, const ISF::IGeoIDSvc &geoIDSvc)
get the next GeoID using only the geoIDSvc
std::string find(const std::string &s)
return a remapped string
int postStepBranchDepth(const G4Step *theStep)
TODO.
std::string getPostStepLogicalVolumeName(const G4Step *theStep, int iLevel=0)
TODO.
G4LogicalVolume * getPostStepLogicalVolume(const G4Step *theStep, int iLevel=0)
TODO.
const unsigned int CALO
all cuts in calorimeter (including isolation)