3 #include "CLHEP/Units/GlobalSystemOfUnits.h"
7 LogDebug(
"BHMSim") <<
" Creating BHMNumberingScheme" ;
11 LogDebug(
"BHMSim") <<
" Deleting BHMNumberingScheme" ;
17 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
19 if (touch) level = ((touch->GetHistoryDepth())+1);
24 int* copyno, G4String*
name)
const {
28 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
30 int i = level -
ii - 1;
31 name[
ii] = touch->GetVolume(i)->GetName();
32 copyno[
ii] = touch->GetReplicaNumber(i);
42 LogDebug(
"BHMSim") <<
"BHMNumberingScheme number of levels= " <<
level;
44 int* copyno =
new int[
level];
49 int subdet = copyno[0];
50 int zside = copyno[3];
52 intindex =
packIndex (subdet, zside, station);
53 LogDebug(
"BHMSim") <<
"BHMNumberingScheme : subdet " << subdet
54 <<
" zside " << zside <<
" station " <<
station;
59 LogDebug(
"BHMSim") <<
"BHMNumberingScheme : UnitID 0x" << std::hex
68 unsigned int idx = ((6<<28)|(subdet&0x7)<<25);
69 idx |= ((zside&0x3)<<5) | (station&0x1F);
70 LogDebug(
"BHMSim") <<
"BHM packing: subdet " << subdet
71 <<
" zside " << zside <<
" station " << station
72 <<
"-> 0x" << std::hex << idx <<
std::dec;
79 subdet = (idx>>25)>>0x7;
83 <<
" -> subdet " << subdet <<
" zside " << zside
static unsigned int packIndex(int subdet, int zside, int station)
static void unpackIndex(const unsigned int &idx, int &subdet, int &zside, int &station)
virtual unsigned int getUnitID(const G4Step *aStep) const
virtual ~BHMNumberingScheme()
virtual int detectorLevel(const G4Step *) const