File indexing completed on 2024-04-06 11:58:05
0001 #ifndef HcalLogicalMapGenerator_h
0002 #define HcalLogicalMapGenerator_h
0003
0004 #include "CondFormats/HcalObjects/interface/HcalLogicalMap.h"
0005 class HcalTopology;
0006
0007 class HcalLogicalMapGenerator {
0008 public:
0009 HcalLogicalMapGenerator();
0010 ~HcalLogicalMapGenerator();
0011 HcalLogicalMap createMap(const HcalTopology* topo, unsigned int mapIOV = 4);
0012
0013 private:
0014 void buildHBEFTMap(const HcalTopology* topo,
0015 std::vector<HBHEHFLogicalMapEntry>&,
0016 std::vector<HTLogicalMapEntry>&,
0017 std::vector<uint32_t>&,
0018 std::vector<uint32_t>&,
0019 std::vector<uint32_t>&,
0020 std::vector<uint32_t>&,
0021 std::vector<uint32_t>&);
0022 void buildHOXMap(const HcalTopology* topo,
0023 std::vector<HOHXLogicalMapEntry>&,
0024 std::vector<uint32_t>&,
0025 std::vector<uint32_t>&,
0026 std::vector<uint32_t>&);
0027 void buildCALIBMap(const HcalTopology* topo,
0028 std::vector<CALIBLogicalMapEntry>&,
0029 std::vector<uint32_t>&,
0030 std::vector<uint32_t>&);
0031 void buildZDCMap(const HcalTopology* topo,
0032 std::vector<ZDCLogicalMapEntry>&,
0033 std::vector<uint32_t>&,
0034 std::vector<uint32_t>&);
0035 void ConstructTriggerTower(const HcalTopology* topo,
0036 std::vector<HTLogicalMapEntry>&,
0037 int i_side,
0038 int i_eta,
0039 int i_phi,
0040 int i_dphi,
0041 int i_depth,
0042 std::string i_det,
0043 int i_wedge,
0044 int i_rm,
0045 int i_pixel,
0046 int i_qie,
0047 int i_adc,
0048 int i_rm_fi,
0049 int i_fi_ch,
0050 int i_crate,
0051 int i_htr,
0052 std::string i_fpga,
0053 int i_htr_fi,
0054 int i_spigot,
0055 int i_slb,
0056 std::string i_slbin,
0057 std::string i_slbin2,
0058 std::string i_slnam,
0059 int i_rctcra,
0060 int i_rctcar,
0061 int i_rctcon,
0062 std::string i_rctnam,
0063 int i_fed);
0064
0065 unsigned int mapIOV_;
0066
0067
0068
0069 static const int NHBHECR = 9;
0070 static const int NHTRS = 3;
0071 static const int NHSETS = 4;
0072
0073 static const int NHFCR = 3;
0074
0075 static const int NHOCR = 4;
0076 static const int NHTRSHO = 4;
0077 static const int NHSETSHO = 3;
0078 static const int NHOETA = 16;
0079 static const int NHOPHI = 72;
0080
0081 static const int NCALIBCR = 13;
0082
0083 static const int NZDCCAB = 9;
0084
0085 static const int NFBR = 8;
0086 static const int NFCH = 3;
0087 static const int NTOPBOT = 2;
0088 static const int NRMFIBR = 6;
0089 static const int NRMSLOT = 4;
0090
0091
0092 int i, j;
0093
0094
0095 int irm, irm_fi, iwedge, ipixel, iqie, iadc, isector;
0096 int islb, irctcra, irctcar, irctcon, irctnam, idphi;
0097 int iside, ieta, iphi, idepth, icrate, ihtr;
0098 int ihtr_fi, ifi_ch, ispigot, idcc, idcc_sl, ifed;
0099
0100 int inum;
0101
0102 int ich_type;
0103 std::string subdet;
0104
0105 int ix, iy, idx, idet_ch, icab;
0106
0107 std::string rbx, slbin, slbin2, slnam;
0108 std::string det, fpga, rctnam, letter;
0109
0110 int hbhecrate[NHBHECR];
0111 int hfcrate[NHFCR];
0112 int hocrate[NHOCR];
0113 int fedhbhenum[NHBHECR][2];
0114 int fedhfnum[NHFCR][2];
0115 int fedhonum[NHOCR][2];
0116 int ihslot[NHSETS];
0117 int ihslotho[NHSETSHO][NHTRSHO];
0118 int ihbhephis[NHBHECR];
0119 int ihfphis[NHFCR];
0120 int ihophis[NHOCR];
0121 int ihbheetadepth[NHTRS][NTOPBOT][NFBR][NFCH][2];
0122 int ihfetadepth[NTOPBOT][NFBR][NFCH][2];
0123 int irm_rmfiHBHE[NHTRS][NTOPBOT][NFBR][2];
0124
0125 int irm_rmfiHF[NHTRS][NTOPBOT][NFBR][2];
0126 int ipixelHB[NRMFIBR][NFCH][NRMSLOT];
0127
0128 int ipixelHE[NRMFIBR][NFCH][NRMSLOT];
0129 int iadcquiHBHE[NRMFIBR][NFCH][2];
0130
0131 const char* S_slbin_odd[8];
0132 const char* S_slbin_even[8];
0133 const char* rct_rackHBHE[18];
0134 const char* S_slbin_7[4];
0135 const char* S_slbin_3[4];
0136 const char* rct_rackHF[18];
0137
0138 int slb_table[29];
0139 int HO_RM_table[24][16][2];
0140 int HO_RM_fi_eta5to15[11];
0141
0142 int HO_RM_fi_eta16;
0143
0144 int HO_htr_fi_450eta5to15[2][11];
0145 int HO_htr_fi_450eta16M[4];
0146 int HO_htr_fi_450eta16P[4][6];
0147 int HO_htr_fi_eta4[2][6];
0148 int HO_htr_fi_eta123[2][6];
0149
0150 int HO_RM_fi_eta1to4[24][2][2];
0151 int HO_RM_fi_eta1to4_sipm[24][4][2];
0152 int ipixelHO[NRMFIBR][NFCH][2];
0153 std::string letterHO[NRMFIBR][NFCH][2];
0154 int rmspecialeta[6][6];
0155 std::string rmspeciallet_code[6][6];
0156 std::string rmspecialdet[6][6];
0157
0158
0159 int hfphi;
0160 char sidesign, S_side;
0161
0162
0163 int phi, phideg, etaslb, oddcard, eta2, eta3, phimod8, ietamod;
0164 int crazy;
0165
0166
0167 int phmod24, phmod6, sidear, iph, iet, isid, ring, sector;
0168 bool phi1458, phi271011, phir0v1, phir0v2, phir0v3, phir0v4;
0169 bool phmod6e450, phmod6e123;
0170
0171
0172
0173 int ic, is, ih, itb, ifb, ifc, ifwtb;
0174
0175 int calibcrate[NCALIBCR];
0176 int fedcalibnum[NCALIBCR][2];
0177 int icalibphis[NCALIBCR];
0178 int icalibsector_min[NCALIBCR];
0179 int icalibsector_max[NCALIBCR];
0180 std::string detIDCALIB[NCALIBCR][NTOPBOT];
0181 int nfbr_max[NCALIBCR][NTOPBOT];
0182 int calibHOinfo[NHOCR][NTOPBOT][NFBR][2];
0183 };
0184
0185 #endif