7 #ifndef FP420NumberingScheme_h 8 #define FP420NumberingScheme_h 20 unsigned int getUnitID(
const G4Step* aStep)
const;
26 int zScale = (rn0 - 1);
27 int sScale = zScale * (pn0 - 1);
28 int dScale = sScale * (sn0 - 1);
29 unsigned int intindex = dScale * (det - 1) + sScale * (
sector - 1) + zScale * (zmodule - 1) +
zside;
34 int zScale = (rn0 - 1), sScale = (rn0 - 1) * (pn0 - 1), dScale = (rn0 - 1) * (pn0 - 1) * (sn0 - 1);
35 det = (
idx - 1) / dScale + 1;
36 sector = (
idx - 1 - dScale * (det - 1)) / sScale + 1;
37 zmodule = (
idx - 1 - dScale * (det - 1) - sScale * (
sector - 1)) / zScale + 1;
38 zside =
idx - dScale * (det - 1) - sScale * (
sector - 1) - zScale * (zmodule - 1);
43 int layerIndex = 1,
b;
44 float a = (
zside + 1) / 2.;
59 float a = (
zside + 1) / 2.;
64 copyIndex =
zside / 2;
66 copyIndex = (
zside + 1) / 2;
89 if (zsideinorder < 0) {
91 }
else if (zsideinorder < 4) {
92 zside = 2 * zsideinorder - 1;
93 }
else if (zsideinorder < 7) {
94 zside = 2 * zsideinorder - 6;
static int unpackCopyIndex(int rn0, int zside)
static int realzside(int rn0, int zsideinorder)
static void unpackFP420Index(const unsigned int &idx, int &det, int &zside, int &station, int &superplane)
static int unpackLayerIndex(int rn0, int zside)
~FP420NumberingScheme()=default
static void unpackMYIndex(const int &idx, int rn0, int pn0, int sn0, int &det, int &zside, int §or, int &zmodule)
static unsigned packMYIndex(int rn0, int pn0, int sn0, int det, int zside, int sector, int zmodule)
static unsigned int packFP420Index(int det, int zside, int station, int superplane)
unsigned int getUnitID(const G4Step *aStep) const
static int unpackOrientation(int rn0, int zside)