00001 #ifndef HcalLogicalMapGenerator_h
00002 #define HcalLogicalMapGenerator_h
00003
00004 #include "CondFormats/HcalObjects/interface/HcalLogicalMap.h"
00005
00006
00007 class HcalLogicalMapGenerator {
00008
00009
00010 public:
00011
00012 HcalLogicalMapGenerator( );
00013 ~HcalLogicalMapGenerator( );
00014 HcalLogicalMap createMap(unsigned int mapIOV = 5);
00015
00016 private:
00017
00018 void buildHBEFTMap(std::vector <HBHEHFLogicalMapEntry>&,std::vector <HTLogicalMapEntry>&,std::vector <uint32_t>&,
00019 std::vector <uint32_t>&,
00020 std::vector <uint32_t>&,
00021 std::vector <uint32_t>&,
00022 std::vector <uint32_t>&);
00023 void buildHOXMap (std::vector <HOHXLogicalMapEntry>& ,std::vector <uint32_t>&,
00024 std::vector <uint32_t>&,
00025 std::vector <uint32_t>&);
00026 void buildCALIBMap(std::vector <CALIBLogicalMapEntry>& ,std::vector <uint32_t>&,
00027 std::vector <uint32_t>&);
00028 void buildZDCMap (std::vector <ZDCLogicalMapEntry>& ,std::vector <uint32_t>&,
00029 std::vector <uint32_t>&);
00030 void ConstructTriggerTower(
00031 std::vector <HTLogicalMapEntry>&,
00032 int i_side, int i_eta, int i_phi, int i_dphi, int i_depth, std::string i_det, int i_wedge, int i_rm,
00033 int i_pixel, int i_qie, int i_adc, int i_rm_fi, int i_fi_ch, int i_crate, int i_htr, std::string i_fpga,
00034 int i_htr_fi, int i_spigot, int i_slb, std::string i_slbin, std::string i_slbin2,
00035 std::string i_slnam, int i_rctcra, int i_rctcar, int i_rctcon, std::string i_rctnam, int i_fed
00036 );
00037
00038 unsigned int mapIOV_;
00039
00040
00041
00042 static const int NHBHECR = 9;
00043 static const int NHTRS = 3;
00044 static const int NHSETS = 4;
00045
00046 static const int NHFCR = 3;
00047
00048 static const int NHOCR = 4;
00049 static const int NHTRSHO = 4;
00050 static const int NHSETSHO = 3;
00051 static const int NHOETA = 16;
00052 static const int NHOPHI = 72;
00053
00054 static const int NCALIBCR = 13;
00055
00056 static const int NZDCCAB = 9;
00057
00058 static const int NFBR = 8;
00059 static const int NFCH = 3;
00060 static const int NTOPBOT = 2;
00061 static const int NRMFIBR = 6;
00062 static const int NRMSLOT = 4;
00063
00064
00065
00066
00067 int i, j;
00068
00069
00070
00071 int irm, irm_fi, iwedge, ipixel, iqie, iadc, isector;
00072 int islb, irctcra, irctcar, irctcon, irctnam, idphi;
00073 int iside, ieta, iphi, idepth, icrate, ihtr;
00074 int ihtr_fi, ifi_ch, ispigot, idcc, idcc_sl, ifed;
00075
00076 int inum;
00077
00078 int ich_type;
00079 std::string subdet;
00080
00081 int ix, iy, idx, idet_ch, icab;
00082
00083 std::string rbx, slbin, slbin2, slnam;
00084 std::string det, fpga, rctnam, letter;
00085 char tempbuff[30];
00086
00087 int hbhecrate[NHBHECR];
00088 int hfcrate[NHFCR];
00089 int hocrate[NHOCR];
00090 int fedhbhenum[NHBHECR][2];
00091 int fedhfnum[NHFCR][2];
00092 int fedhonum[NHOCR][2];
00093 int ihslot[NHSETS];
00094 int ihslotho[NHSETSHO][NHTRSHO];
00095 int ihbhephis[NHBHECR];
00096 int ihfphis[NHFCR];
00097 int ihophis[NHOCR];
00098 int ihbheetadepth[NHTRS][NTOPBOT][NFBR][NFCH][2];
00099 int ihfetadepth[NTOPBOT][NFBR][NFCH][2];
00100 int irm_rmfiHBHE[NHTRS][NTOPBOT][NFBR][2];
00101
00102 int irm_rmfiHF[NHTRS][NTOPBOT][NFBR][2];
00103 int ipixelHB[NRMFIBR][NFCH][NRMSLOT];
00104
00105 int ipixelHE[NRMFIBR][NFCH][NRMSLOT];
00106 int iadcquiHBHE[NRMFIBR][NFCH][2];
00107
00108 const char* S_slbin_odd[8];
00109 const char* S_slbin_even[8];
00110 const char* rct_rackHBHE[18];
00111 const char* S_slbin_7[4];
00112 const char* S_slbin_3[4];
00113 const char* rct_rackHF[18];
00114
00115 int slb_table[29];
00116 int HO_RM_table[24][16][2];
00117 int HO_RM_fi_eta5to15[11];
00118
00119 int HO_RM_fi_eta16;
00120
00121 int HO_htr_fi_450eta5to15[2][11];
00122 int HO_htr_fi_450eta16M[4];
00123 int HO_htr_fi_450eta16P[4][6];
00124 int HO_htr_fi_eta4[2][6];
00125 int HO_htr_fi_eta123[2][6];
00126
00127 int HO_RM_fi_eta1to4[72][2][2];
00128 int ipixelHO[NRMFIBR][NFCH][2];
00129 std::string letterHO[NRMFIBR][NFCH][2];
00130 int rmspecialeta[6][6];
00131 std::string rmspeciallet_code[6][6];
00132 std::string rmspecialdet[6][6];
00133
00134
00135
00136 int hfphi;
00137 char sidesign, S_side;
00138
00139
00140 int phi, phideg, etaslb, oddcard, eta2, eta3, phimod8, ietamod;
00141 int crazy;
00142
00143
00144 int phmod24, phmod6, sidear, iph, iet, isid, ring, sector;
00145 bool phi1458, phi271011, phir0v1, phir0v2, phir0v3, phir0v4;
00146 bool phmod6e450, phmod6e123;
00147
00148
00149
00150 int ic,is,ih,itb,ifb,ifc,ifwtb;
00151
00152 int calibcrate[NCALIBCR];
00153 int fedcalibnum[NCALIBCR][2];
00154 int icalibphis[NCALIBCR];
00155 int icalibsector_min[NCALIBCR];
00156 int icalibsector_max[NCALIBCR];
00157 std::string detIDCALIB[NCALIBCR][NTOPBOT];
00158 int nfbr_max[NCALIBCR][NTOPBOT];
00159 int calibHOinfo[NHOCR][NTOPBOT][NFBR][2];
00160
00161 };
00162
00163 #endif