9 #include "CLHEP/Units/GlobalSystemOfUnits.h" 14 LogDebug(
"BscSim") <<
" Creating BscNumberingScheme" ;
20 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
21 return (touch) ? ((touch->GetHistoryDepth())+1) : 0;
25 int* copyno, G4String*
name)
const {
29 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
31 int i = level -
ii - 1;
32 name[
ii] = touch->GetVolume(i)->GetName();
33 copyno[
ii] = touch->GetReplicaNumber(i);
40 unsigned int intindex=0;
43 LogDebug(
"BscSim") <<
"BscNumberingScheme number of levels= " <<
level;
46 int* copyno =
new int[
level];
53 for (
int ich=0; ich <
level; ich++) {
55 if(name[ich] ==
"BSC1" ||name[ich] ==
"BSC2" ) {
56 zside = copyno[ich]-1;
57 }
else if(name[ich] ==
"BSCTrap") {
59 station = 2*(copyno[ich]-1);
60 }
else if(name[ich] ==
"BSCTubs") {
62 station = copyno[ich]-1;
63 }
else if(name[ich] ==
"BSCTTop") {
65 }
else if(name[ich] ==
"BSC2Pad"){
67 station = copyno[ich]-1;
70 LogDebug(
"BscSim") <<
"BscNumberingScheme " <<
"ich=" << ich <<
"copyno" 71 << copyno[ich] <<
"name=" << name[ich];
75 LogDebug(
"BscSim") <<
"BscNumberingScheme : det " << det <<
" zside " 76 << zside <<
" station " << station
77 <<
" UnitID 0x" << std::hex << intindex <<
std::dec;
79 for (
int ich = 0; ich <
level; ich++)
80 LogDebug(
"BscSim") <<
" name = " << name[ich] <<
" copy = " << copyno[ich];
82 LogDebug(
"BscSim") <<
" packed index = 0x" << std::hex << intindex
93 unsigned int idx = 6 << 28;
97 LogDebug(
"BscSim") <<
"Bsc packing: det " << det
98 <<
" zside " << zside <<
" station " << station
99 <<
"-> 0x" << std::hex << idx <<
std::dec;
111 <<
" -> det " << det <<
" zside " << zside
unsigned int getUnitID(const G4Step *aStep) const
static unsigned int packBscIndex(int det, int zside, int station)
static void unpackBscIndex(const unsigned int &idx)
int detectorLevel(const G4Step *) const