9 #include "CLHEP/Units/GlobalSystemOfUnits.h" 26 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
29 level = ((touch->GetHistoryDepth()) + 1);
36 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
38 int i = level -
ii - 1;
39 name[
ii] = touch->GetVolume(i)->GetName();
40 copyno[
ii] = touch->GetReplicaNumber(i);
46 unsigned intindex = 0;
53 int* copyno =
new int[
level];
64 for (
int ich = 0; ich <
level; ich++) {
80 if (name[ich] ==
"FP420E") {
82 }
else if (name[ich] ==
"HPS240E") {
83 det = copyno[ich] + 2;
84 }
else if (name[ich] ==
"FP420Ex1" || name[ich] ==
"HPS240Ex1") {
88 }
else if (name[ich] ==
"FP420Ex3" || name[ich] ==
"HPS240Ex3") {
90 }
else if (name[ich] ==
"SISTATION" || name[ich] ==
"HPS240SISTATION") {
92 }
else if (name[ich] ==
"SIPLANE" || name[ich] ==
"HPS240SIPLANE") {
102 }
else if (name[ich] ==
"SENSOR2" || name[ich] ==
"HPS240SENSOR2") {
105 zside = 3 * copyno[ich];
106 }
else if (name[ich] ==
"SENSOR1" || name[ich] ==
"HPS240SENSOR1") {
145 unsigned int idx = ((det - 1) & 3) << 19;
147 idx += (zside & 7) << 7;
149 idx += (station & 7) << 4;
164 det = (idx >> 19) & 3;
167 zside = (idx >> 7) & 7;
169 station = (idx >> 4) & 7;
virtual int detectorLevel(const G4Step *) const
static void unpackFP420Index(const unsigned int &idx, int &det, int &zside, int &station, int &superplane)
virtual ~FP420NumberingScheme()
virtual unsigned int getUnitID(const G4Step *aStep) const
static unsigned int packFP420Index(int det, int zside, int station, int superplane)