Skip to content

Commit

Permalink
Add comment to check volumeIDs
Browse files Browse the repository at this point in the history
Add a comment in DRTubesSDAction to check that 64-bits volumeIDs created
with g4-copynumbers are identical to the original DD4hep volumeIDs.
  • Loading branch information
lopezzot authored and BrieucF committed Dec 6, 2024
1 parent 2e136e3 commit 6d0cfb7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions plugins/DRTubesSDAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,24 @@ bool Geant4SensitiveAction<DRTubesSDData>::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 "<<VolID<<" and DD4hep oroginal "<<volumeID(aStep)<<std::endl;
std::cout<<"system id, created "<<25<<" and DD4hep original "<<bc.get(volumeID(aStep),"system")<<std::endl;
std::cout<<"stave id, created "<<StaveID<<" and DD4hep original "<<bc.get(volumeID(aStep),"stave")<<std::endl;
std::cout<<"tower id, created "<<TowerID<<" and DD4hep original "<<bc.get(volumeID(aStep),"tower")<<std::endl;
std::cout<<"air id, created "<<0<<" and DD4hep original "<<bc.get(volumeID(aStep),"air")<<std::endl;
std::cout<<"col id, created "<<ColumnID<<" and DD4hep original "<<bc.get(volumeID(aStep),"col")<<std::endl;
std::cout<<"row id, created "<<RawID<<" and DD4hep original "<<bc.get(volumeID(aStep),"row")<<std::endl;
std::cout<<"clad id, created "<<1<<" and DD4hep original "<<bc.get(volumeID(aStep),"clad")<<std::endl;
std::cout<<"core id, created "<<CoreID<<" and DD4hep original "<<bc.get(volumeID(aStep),"core")<<std::endl;
std::cout<<"cherenkov id, created "<<CherenkovID<<" and DD4hep original "<<bc.get(volumeID(aStep),"cherenkov")<<std::endl;*/

bool IsRight = (aStep->GetPreStepPoint()->GetPosition().z() > 0.);

// We now calculate the signal in S and C fiber according to the step contribution
Expand Down

0 comments on commit 6d0cfb7

Please sign in to comment.