Skip to content

Commit

Permalink
Fix SteppingAction for volume names with DD4hep
Browse files Browse the repository at this point in the history
The volume pointers are later used to check if a particle transitions
from the Tracker to the CALO.
  • Loading branch information
hahnjo committed Jul 12, 2022
1 parent 3905153 commit a4bf4af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SimG4Core/Application/src/SteppingAction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ bool SteppingAction::initPointer() {
const G4PhysicalVolumeStore* pvs = G4PhysicalVolumeStore::GetInstance();
for (auto const& pvcite : *pvs) {
const G4String& pvname = pvcite->GetName();
if (pvname == "Tracker")
if (pvname == "Tracker" || pvname == "tracker:Tracker_1")
tracker = pvcite;
else if (pvname == "CALO")
else if (pvname == "CALO" || pvname == "caloBase:CALO_1")
calo = pvcite;

if (tracker && calo)
Expand Down

0 comments on commit a4bf4af

Please sign in to comment.