From 6d0cfb7600ad54bc0d2267b60e79cbdcf52ec343 Mon Sep 17 00:00:00 2001 From: Lorenzo Pezzotti Date: Thu, 5 Dec 2024 13:40:44 +0100 Subject: [PATCH] Add comment to check volumeIDs Add a comment in DRTubesSDAction to check that 64-bits volumeIDs created with g4-copynumbers are identical to the original DD4hep volumeIDs. --- plugins/DRTubesSDAction.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/plugins/DRTubesSDAction.cpp b/plugins/DRTubesSDAction.cpp index 483846579..b9bdd5bff 100644 --- a/plugins/DRTubesSDAction.cpp +++ b/plugins/DRTubesSDAction.cpp @@ -166,6 +166,24 @@ bool Geant4SensitiveAction::process(const G4Step* aStep, bc.set(VolID, "core", CoreID); bc.set(VolID, "cherenkov", CherenkovID); + /* If you want to compare the 64-bits VolID created here + * with the original DD4hep volumeID: + * 1. set in DREndcapTubes_o1_v01.xml clad_C, core_C and core_S + * volumes as sensitive + * 2. associate DRTubesSDAction to DREncapTubes subdetector + * in the steering file (instead of using RegexSD) + * 3. Uncomment the code below */ + /*std::cout<<"Volume id, created "<GetPreStepPoint()->GetPosition().z() > 0.); // We now calculate the signal in S and C fiber according to the step contribution