15static constexpr uint16_t kuHitNbAdcBins = 32;
16static constexpr uint16_t kuHitNbTsBins = 512;
17static constexpr double kdClockCycleNs = 12.5;
18static constexpr uint16_t kuStripsPerSide = 1024;
20static constexpr Double_t kdSensorsSzX = 60.;
21static constexpr Double_t kdSensorsSzY = 60.;
23static constexpr Double_t kdPitchMm = 0.058;
25static constexpr Double_t kdStereoAngle = 7.5;
28static constexpr uint16_t kuNbElinksPerDpb = 48;
29static constexpr uint16_t kuTotalNbOfSensors = 6;
31static constexpr uint16_t kuTotalNbOfMAPS = 3;
38static const TString cSideName[2] = {
"POS",
"NEG"};
41static constexpr uint16_t kuELinkToAsicMap[kuNbElinksPerDpb]{
43 0x0000, 0x0002, 0x0004, 0x0006, 0x0001, 0x0003, 0x0005, 0x0007, 0x0009, 0x000B, 0x000D, 0x000F,
44 0x0008, 0x000A, 0x000C, 0x000E, 0x0010, 0x0012, 0x0014, 0x0016, 0x0011, 0x0013, 0x0015, 0x0017,
45 0x0019, 0x001B, 0x001D, 0x001F, 0x0018, 0x001A, 0x001C, 0x001E,
46 0x0020, 0x0022, 0x0024, 0x0026, 0x0021, 0x0023, 0x0025, 0x0027,
47 0x0029, 0x002B, 0x002D, 0x002F, 0x0028, 0x002A, 0x002C, 0x002E,
49static constexpr uint16_t kuDpbArray[2]{0x18D1, 0x1940};
67static const TString sMID[kuTotalNbOfSensors]{
"B008",
"B032",
"B004",
68 "B011",
"B034",
"B010"};
70static const Double_t kdStereoAngleTan = TMath::Tan(StsConst::kdStereoAngle * TMath::DegToRad());
74 if (((iAsicIdx / 8) % 2) != 0)
82 if (uELinkIdx < StsConst::kuNbElinksPerDpb)
83 return StsConst::kuELinkToAsicMap[uELinkIdx];
85 cout <<
" GetIdx_AsicFromELink => ELink Index is out of bound: " << uELinkIdx;
86 cout <<
"\treturning dummy value!(0)" << endl;
93 if (iDpbIdx == StsConst::kuDpbArray[0]) {
94 if (iAsicIdx <= 0x000F) {
97 else if (iAsicIdx >= 0x0010 && iAsicIdx <= 0x001F)
101 else if (iAsicIdx >= 0x0020 && iAsicIdx <= 0x002F)
106 if (iDpbIdx == StsConst::kuDpbArray[1]) {
107 if (iAsicIdx <= 0x000F) {
111 else if (iAsicIdx >= 0x0010 && iAsicIdx <= 0x001F)
114 }
else if (iAsicIdx >= 0x0020 && iAsicIdx <= 0x002F) {
117 cout <<
"GetIdx_SensorFromAsic: WARNING, iAsicIdx= " << iAsicIdx;
118 cout <<
"\tat iDpbIdx= " << iDpbIdx << endl;
124 cout <<
"GetIdx_SensorFromAsic: unknown DPB index, using Asic 0" << endl;
128uint16_t
GetIdx_Strip(uint16_t iSensIdx, uint16_t iAsicIdx, uint16_t iChannel)
131 uint16_t iAsIdx = iAsicIdx & 0xF;
132 uint16_t iF8Idx = iAsIdx % 8;
138 st = 128 * iF8Idx + 127 - iChannel;
140 if (midSensIdx ==
B010) {
141 if (iAsIdx == 0x8 && iChannel % 2 == 0 && iChannel != 126) {
142 st = 128 * iF8Idx + 127 - iChannel - 2;
150 if (iChannel % 2 == 0)
151 st = 128 * iF8Idx + iChannel;
153 st = 128 * iF8Idx + iChannel + 2;
154 if (iF8Idx == 7 && iChannel == 127)
157 if (midSensIdx ==
B010 && iAsIdx == 0x3
162 st = 128 * iF8Idx + iChannel + 2;
178const Double_t
dSp = 58. * 0.990;
187 Double_t dMapSizeMmX = StsConst::kdSensorsSzX;
188 Double_t dMapSizeMmY = StsConst::kdSensorsSzY;
190 Double_t dCoordN = dStripN;
191 Double_t dCoordP = dStripP;
193 const Double_t dZgap = 134.;
213 f1.
X = -dMapSizeMmX / 2.;
214 f1.
Y = -dMapSizeMmY / 2.;
216 f1.
X += StsConst::kdPitchMm * dCoordN;
219 if (dCoordP <= (dZgap - 1.) && dCoordN >= (StsConst::kuStripsPerSide - dZgap - 1.)) {
220 f1.
Y += ((dCoordP + StsConst::kuStripsPerSide) - dCoordN) * StsConst::kdPitchMm / kdStereoAngleTan;
222 f1.
Y += (dCoordP - dCoordN) * StsConst::kdPitchMm / kdStereoAngleTan;
241 }
else if (uSensIdx < 6) {