File indexing completed on 2024-04-06 12:07:27
0001 #ifndef Constants_h
0002 #define Constants_h
0003
0004 #include "DQM/HcalCommon/interface/HcalCommonHeaders.h"
0005
0006 #include <vector>
0007
0008 namespace hcaldqm {
0009 namespace constants {
0010
0011
0012
0013 double const GOOD = 1.0;
0014 double const PROBLEMATIC = 0.9;
0015 double const BAD = 0.5;
0016 double const VERY_LOW = 0.5;
0017 double const VERY_LOW_XXX = 0;
0018 double const NOT_APPLICABLE = -1;
0019 double const DELTA = 0.005;
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 std::map<unsigned int, unsigned int> const crate2fed_map = {
0030 {24, 1100},
0031 {20, 1102},
0032 {21, 1104},
0033 {25, 1106},
0034 {31, 1108},
0035 {35, 1110},
0036 {37, 1112},
0037 {34, 1114},
0038 {30, 1116},
0039 {22, 1118},
0040 {29, 1120},
0041 {32, 1122},
0042 {3, 724},
0043 {7, 726},
0044 {6, 728},
0045 {13, 730},
0046
0047
0048 {23, 1124},
0049 {27, 1126},
0050 {26, 1128},
0051 {38, 1134},
0052
0053
0054 {28, 1136},
0055 };
0056
0057 std::map<unsigned int, unsigned int> const fed2crate_map = {
0058 {724, 3}, {725, 3}, {726, 7}, {727, 7}, {728, 6}, {729, 6}, {730, 13}, {731, 13}, {1100, 24},
0059 {1101, 24}, {1102, 20}, {1103, 20}, {1104, 21}, {1105, 21}, {1106, 25}, {1107, 25}, {1108, 31}, {1109, 31},
0060 {1110, 35}, {1111, 35}, {1112, 37}, {1113, 37}, {1114, 34}, {1115, 34}, {1116, 30}, {1117, 30}, {1118, 22},
0061 {1119, 22}, {1120, 29}, {1121, 29}, {1122, 32}, {1123, 32}, {1124, 23}, {1125, 23}, {1126, 27}, {1127, 27},
0062 {1128, 26}, {1129, 26}, {1134, 38}, {1135, 38}, {1140, 24}, {1141, 20}, {1142, 21}, {1143, 25}, {1144, 31},
0063 {1145, 35}, {1146, 37}, {1147, 34}, {1148, 30}, {1136, 28},
0064 };
0065
0066 std::vector<unsigned int> const fedList = {
0067 724, 725, 726, 727, 728, 729, 730, 731, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108,
0068 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125,
0069 1126, 1127, 1128, 1129, 1134, 1135, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1136};
0070 std::vector<unsigned int> const fedListuTCA = {1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110,
0071 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121,
0072 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1134, 1135, 1140,
0073 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1136};
0074 std::vector<unsigned int> const fedListVME = {724, 725, 726, 727, 728, 729, 730, 731};
0075 std::vector<unsigned int> const crateList = {3, 6, 7, 13, 20, 21, 22, 23, 24, 25, 26,
0076 27, 29, 30, 31, 32, 34, 35, 37, 38, 28};
0077 std::vector<unsigned int> const crateListuTCA = {
0078 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 34, 35, 37, 38, 28};
0079 std::vector<unsigned int> const crateListVME = {3, 6, 7, 13};
0080 std::vector<unsigned int> const crateListHF = {22, 29, 32};
0081 std::vector<unsigned int> const crateListHO = {23, 26, 27, 38};
0082
0083 int const FED_uTCA_MAX_REAL = 50;
0084
0085
0086 int const FED_VME_MIN = FEDNumbering::MINHCALFEDID;
0087 int const FED_VME_MAX = FEDNumbering::MAXHCALFEDID;
0088 int const FED_VME_DELTA = 1;
0089 int const FED_VME_NUM = FED_VME_MAX - FED_VME_MIN + 1;
0090
0091 int const FED_uTCA_MIN = FEDNumbering::MINHCALuTCAFEDID;
0092
0093 int const FED_uTCA_MAX = FED_uTCA_MIN + FED_uTCA_MAX_REAL - 1;
0094 int const FED_uTCA_NUM = FED_uTCA_MAX - FED_uTCA_MIN + 1;
0095 int const FED_uTCA_DELTA = 1;
0096 int const FED_TOTAL_NUM = FED_VME_NUM + FED_uTCA_NUM;
0097
0098
0099 int const CRATE_VME_MIN = 0;
0100 int const CRATE_VME_MAX = 18;
0101 int const CRATE_VME_DELTA = 1;
0102 int const CRATE_VME_NUM = CRATE_VME_MAX - CRATE_VME_MIN + 1;
0103
0104 int const CRATE_uTCA_MIN = 20;
0105 int const CRATE_uTCA_MAX = 37;
0106 int const CRATE_uTCA_DELTA = 1;
0107 int const CRATE_uTCA_NUM = CRATE_uTCA_MAX - CRATE_uTCA_MIN + 1;
0108 int const CRATE_TOTAL_NUM = CRATE_VME_NUM + CRATE_uTCA_NUM;
0109
0110
0111 int const SLOT_uTCA_MIN = 1;
0112 int const SLOT_uTCA_MAX = 12;
0113 int const SLOT_uTCA_DELTA = 1;
0114 int const SLOT_uTCA_NUM = SLOT_uTCA_MAX - SLOT_uTCA_MIN + 1;
0115
0116 int const SLOT_VME_MIN1 = 2;
0117 int const SLOT_VME_MAX1 = 7;
0118 int const SLOT_VME_MIN2 = 13;
0119 int const SLOT_VME_MAX2 = 18;
0120 int const SLOT_VME_NUM1 = SLOT_VME_MAX1 - SLOT_VME_MIN1 + 1;
0121 int const SLOT_VME_NUM2 = SLOT_VME_MAX2 - SLOT_VME_MIN2 + 1;
0122 int const SLOT_VME_NUM = SLOT_VME_NUM1 + SLOT_VME_NUM2;
0123
0124 int const SPIGOT_MIN = 0;
0125 int const SPIGOT_MAX = 11;
0126 int const SPIGOT_NUM = SPIGOT_MAX - SPIGOT_MIN + 1;
0127
0128
0129 int const FIBER_VME_MIN = 1;
0130 int const FIBER_VME_MAX = 8;
0131 int const FIBER_VME_NUM = FIBER_VME_MAX - FIBER_VME_MIN + 1;
0132 int const FIBER_uTCA_MIN1 = 0;
0133 int const FIBER_uTCA_MAX1 = 11;
0134 int const FIBER_uTCA_MIN2 = 12;
0135 int const FIBER_uTCA_MAX2 = 23;
0136 int const FIBER_uTCA_NUM = FIBER_uTCA_MAX1 - FIBER_uTCA_MIN1 + 1 + FIBER_uTCA_MAX2 - FIBER_uTCA_MIN2 + 1;
0137
0138 int const FIBERCH_MIN = 0;
0139 int const FIBERCH_MAX = 5;
0140 int const FIBERCH_NUM = FIBERCH_MAX - FIBERCH_MIN + 1;
0141
0142
0143 int const SLB_MIN = 1;
0144 int const SLB_MAX = 6;
0145 int const SLB_NUM = SLB_MAX - SLB_MIN + 1;
0146
0147 int const TPFIBER_MIN = 0;
0148 int const TPFIBER_MAX = 5;
0149 int const TPFIBER_NUM = TPFIBER_MAX - TPFIBER_MIN + 1;
0150
0151 int const SLBCH_MIN = 0;
0152 int const SLBCH_MAX = 3;
0153 int const SLBCH_NUM = SLBCH_MAX - SLBCH_MIN + 1;
0154
0155 int const TPFIBERCH_MIN = 0;
0156 int const TPFIBERCH_MAX = 7;
0157 int const TPFIBERCH_NUM = TPFIBERCH_MAX - TPFIBERCH_MIN + 1;
0158
0159
0160
0161
0162
0163
0164 int const HB = 1;
0165 int const HE = 2;
0166 int const HO = 3;
0167 int const HF = 4;
0168 int const SUBDET_NUM = 4;
0169 int const TPSUBDET_NUM = 2;
0170 std::string const SUBDET_NAME[SUBDET_NUM] = {"HB", "HE", "HO", "HF"};
0171 std::string const SUBDETPM_NAME[2 * SUBDET_NUM] = {"HBM", "HBP", "HEM", "HEP", "HOM", "HOP", "HFM", "HFP"};
0172 std::string const SUBSYSTEM = "Hcal";
0173 std::string const TPSUBDET_NAME[TPSUBDET_NUM] = {"HBHE", "HF"};
0174 std::string const TPSUBDETPM_NAME[2 * TPSUBDET_NUM] = {"HBHEM", "HBHEP", "HFM", "HFP"};
0175 std::string const TPSUBDETFW_NAME[2 * TPSUBDET_NUM] = {"Pure HB", "Overlap HBHE", "Pure HE", "HF"};
0176
0177
0178 int const IPHI_MIN = 1;
0179 int const IPHI_MAX = 72;
0180 int const IPHI_NUM = 72;
0181 int const IPHI_NUM_HF = 36;
0182 int const IPHI_NUM_TPHF = 18;
0183 int const IPHI_DELTA = 1;
0184 int const IPHI_DELTA_HF = 2;
0185 int const IPHI_DELTA_TPHF = 4;
0186
0187
0188 int const IETA_MIN = 1;
0189 int const IETA_DELTA = 1;
0190 int const IETA_MAX = 41;
0191 int const IETA_NUM = 2 * (IETA_MAX - IETA_MIN + 1) + 1;
0192 int const IETA_MIN_HB = 1;
0193 int const IETA_MAX_HB = 16;
0194 int const IETA_MIN_HE = 16;
0195 int const IETA_MAX_HE = 29;
0196 int const IETA_MIN_HO = 1;
0197 int const IETA_MAX_HO = 15;
0198 int const IETA_MIN_HF = 29;
0199 int const IETA_MAX_HF = 41;
0200
0201 int const IETA_MAX_TPHBHE = 28;
0202 int const IETA_MAX_TPHF = 32;
0203
0204
0205 int const DEPTH_MIN = 1;
0206 int const DEPTH_DELTA = 1;
0207 int const DEPTH_MAX = 4;
0208 int const DEPTH_NUM = 4;
0209
0210
0211 int const CAPS_NUM = 4;
0212
0213
0214 int const NUM_FGBITS = 6;
0215
0216
0217
0218
0219 int const CHS_NUM[SUBDET_NUM] = {2592, 2592, 2192, 1728};
0220 int const TPCHS_NUM[TPSUBDET_NUM] = {2 * 28 * 72, 144};
0221
0222
0223
0224
0225 int const TS_NUM[SUBDET_NUM] = {10, 10, 10, 4};
0226
0227
0228
0229
0230 double const AXIS_ENERGY_MIN = -10.;
0231 double const AXIS_ENERGY_MAX = 200;
0232 int const AXIS_ENERGY_NBINS = 400;
0233 double const AXIS_TIME_MIN = -50.;
0234 double const AXIS_TIME_MAX = 50;
0235 int const AXIS_TIME_NBINS = 200;
0236 int const AXIS_ADC_NBINS_PED = 100;
0237 double const AXIS_ADC_MAX_PED = 5;
0238 int const AXIS_ADC_NBINS = 128;
0239 double const AXIS_ADC_MIN = 0;
0240 double const AXIS_ADC_MAX = 128;
0241 int const AXIS_NOMFC_NBINS_3000 = 300;
0242 double const AXIS_NOMFC_MAX_3000 = 3000.;
0243 int const AXIS_NOMFC_NBINS = 300;
0244 double const AXIS_NOMFC_MIN = 0;
0245 double const AXIS_NOMFC_MAX = 3000.;
0246 int const AXIS_TIMETS_NBINS = 10;
0247 double const AXIS_TIMETS_MIN = 0;
0248 double const AXIS_TIMETS_MAX = 10;
0249
0250 int const CALIBEVENTS_MIN = 100;
0251 int const GARBAGE_VALUE = -1000;
0252 int const FIBEROFFSET_INVALID = -1000;
0253
0254 int const RAW_EMPTY = 16;
0255 int const UTCA_DATAFLAVOR = 0x5;
0256
0257 double const adc2fC[256] = {
0258 1.58, 4.73, 7.88, 11.0, 14.2, 17.3, 20.5, 23.6, 26.8, 29.9, 33.1, 36.2, 39.4,
0259 42.5, 45.7, 48.8, 53.6, 60.1, 66.6, 73.0, 79.5, 86.0, 92.5, 98.9, 105, 112,
0260 118, 125, 131, 138, 144, 151, 157, 164, 170, 177, 186, 199, 212,
0261 225, 238, 251, 264, 277, 289, 302, 315, 328, 341, 354, 367, 380,
0262 393, 406, 418, 431, 444, 464, 490, 516, 542, 568, 594, 620, 569,
0263 594, 619, 645, 670, 695, 720, 745, 771, 796, 821, 846, 871, 897,
0264 922, 947, 960, 1010, 1060, 1120, 1170, 1220, 1270, 1320, 1370, 1430, 1480,
0265 1530, 1580, 1630, 1690, 1740, 1790, 1840, 1890, 1940, 2020, 2120, 2230, 2330,
0266 2430, 2540, 2640, 2740, 2850, 2950, 3050, 3150, 3260, 3360, 3460, 3570, 3670,
0267 3770, 3880, 3980, 4080, 4240, 4450, 4650, 4860, 5070, 5280, 5490,
0268
0269 5080, 5280, 5480, 5680, 5880, 6080, 6280, 6480, 6680, 6890, 7090, 7290, 7490,
0270 7690, 7890, 8090, 8400, 8810, 9220, 9630, 10000, 10400, 10900, 11300, 11700, 12100,
0271 12500, 12900, 13300, 13700, 14100, 14500, 15000, 15400, 15800, 16200, 16800, 17600, 18400,
0272 19300, 20100, 20900, 21700, 22500, 23400, 24200, 25000, 25800, 26600, 27500, 28300, 29100,
0273 29900, 30700, 31600, 32400, 33200, 34400, 36100, 37700, 39400, 41000, 42700, 44300, 41100,
0274 42700, 44300, 45900, 47600, 49200, 50800, 52500, 54100, 55700, 57400, 59000, 60600, 62200,
0275 63900, 65500, 68000, 71300, 74700, 78000, 81400, 84700, 88000, 91400, 94700, 98100, 101000,
0276 105000, 108000, 111000, 115000, 118000, 121000, 125000, 128000, 131000, 137000, 145000, 152000, 160000,
0277 168000, 176000, 183000, 191000, 199000, 206000, 214000, 222000, 230000, 237000, 245000, 253000, 261000,
0278 268000, 276000, 284000, 291000, 302000, 316000, 329000, 343000, 356000, 370000, 384000};
0279
0280
0281
0282
0283
0284
0285
0286 int const BIT_OFFSET = 19;
0287 int const BIT_AXIS_XLOG = 0;
0288 int const BIT_AXIS_YLOG = 1;
0289 int const BIT_AXIS_ZLOG = 2;
0290 int const BIT_AXIS_LS = 3;
0291 int const BIT_AXIS_FLAG = 4;
0292
0293
0294
0295
0296 uint8_t const EVENTTYPE_PHYSICS = 0;
0297 uint8_t const EVENTTYPE_PEDESTAL = 1;
0298 uint8_t const EVENTTYPE_HFRADDAM = 13;
0299 uint8_t const EVENTTYPE_LASER = 14;
0300 uint8_t const EVENTTYPE_LED = 15;
0301 enum OrbitGapType {
0302 tNull = 0,
0303 tPhysics = 1,
0304 tPedestal = 2,
0305 tLED = 3,
0306 tHFRaddam = 4,
0307 tHBHEHPD = 5,
0308 tHO = 6,
0309 tHF = 7,
0310 tZDC = 8,
0311 tHEPMega = 9,
0312 tHEMMega = 10,
0313 tHBPMega = 11,
0314 tHBMMega = 12,
0315 tSomething = 13,
0316 tCRF = 14,
0317 tCalib = 15,
0318 tSafe = 16,
0319 tSiPMPMT = 17,
0320 tMegatile = 18,
0321 tUnknown = 19,
0322 nOrbitGapType = 20,
0323 };
0324 }
0325 }
0326
0327 #endif