13#include <fairlogger/Logger.h>
36 relId[0] = absId / nCPV + 2;
37 absId -= (relId[0] - 2) * nCPV;
67 if (relId1[0] == relId2[0]) {
68 short rowdiff = TMath::Abs(relId1[1] - relId2[1]);
69 short coldiff = TMath::Abs(relId1[2] - relId2[2]);
72 if (coldiff + rowdiff <= 1) {
75 if ((relId2[1] > relId1[1]) && (relId2[2] > relId1[2] + 1)) {
82 if (relId1[0] > relId2[0]) {
112 bool isGoodHWAddress =
true;
113 if (pad < 0 || pad >=
kNPAD) {
114 LOG(
debug) <<
"Geometry::hwaddressToAbsId() : Wrong pad address: pad=" << pad <<
" >= kNPAD=" <<
kNPAD;
115 isGoodHWAddress =
false;
118 LOG(
debug) <<
"Geometry::hwaddressToAbsId() : Wrong dil address: dil=" << dil <<
" >= kNDilogic=" <<
kNDilogic;
119 isGoodHWAddress =
false;
121 if (gas < 0 || gas >=
kNGas) {
122 LOG(
debug) <<
"Geometry::hwaddressToAbsId() : Wrong gasiplex address: gas=" << gas <<
" >= kNGas=" <<
kNGas;
123 isGoodHWAddress =
false;
126 if (!isGoodHWAddress) {
132 short relId[3] = {
short(ccId / 8 + 2),
short((ccId % 8) * 16 + (dil / 2) * 8 + pPhi),
short(59 - ((dil % 2) * 30 + gas * 6 + pZ))};
148 ccId = (relId[0] - 2) * 8 + relId[1] / 16;
149 dil = 2 * ((relId[1] % 16) / 8) + (59 - relId[2]) / 30;
150 gas = ((59 - relId[2]) % 30) / 6;
151 pad =
mPadMap[(59 - relId[2]) % 6][relId[1] % 8];
static constexpr short mPadToPhi[48]
static constexpr short mPadToZ[48]
static constexpr short mPadMap[6][8]
static constexpr short kNCHANNELS
static constexpr short kNumberOfCPVPadsPhi
static constexpr short kNDilogic
static bool absIdToHWaddress(unsigned short absId, short &ccId, short &dil, short &gas, short &pad)
static short absIdToModule(unsigned short absId)
static bool relToAbsNumbering(const short *relId, unsigned short &absId)
static constexpr short kNGas
static constexpr float kCPVPadSizePhi
static short areNeighbours(unsigned short absId1, unsigned short absId2)
static void absIdToRelPosInModule(unsigned short absId, float &x, float &z)
static bool absToRelNumbering(unsigned short absId, short *relId)
static unsigned short relToAbsId(short moduleNumber, short iphi, short iz)
static constexpr short kNPAD
static bool hwaddressToAbsId(short ccId, short dil, short gas, short pad, unsigned short &absId)
static constexpr float kCPVPadSizeZ
static constexpr short kNumberOfCPVPadsZ
GLdouble GLdouble GLdouble z
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"