Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:09

0001 #ifndef HcalMappingEntry_h
0002 #define HcalMappingEntry_h
0003 
0004 #include "DataFormats/DetId/interface/DetId.h"
0005 #include "DataFormats/HcalDetId/interface/HcalCalibDetId.h"
0006 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0007 #include "DataFormats/HcalDetId/interface/HcalElectronicsId.h"
0008 #include "DataFormats/HcalDetId/interface/HcalTrigTowerDetId.h"
0009 #include "DataFormats/HcalDetId/interface/HcalZDCDetId.h"
0010 #include "DataFormats/HcalDetId/interface/HcalFrontEndId.h"
0011 
0012 /*****************************Classes****************************/
0013 
0014 class HBHEHFLogicalMapEntry {
0015   /****
0016    *  Class to hold the L-Map entries corresponding to HB, HE and HF
0017    ****/
0018 
0019 public:
0020   // constructor from map information
0021   HBHEHFLogicalMapEntry() {}
0022   HBHEHFLogicalMapEntry(int in_fi_ch,
0023                         int in_htr_fi,
0024                         int in_spig,
0025                         int in_fed,
0026                         int in_cr,
0027                         int in_htr,
0028                         std::string in_s_fpga,
0029                         std::string in_s_det,
0030                         int in_sid,
0031                         int in_et,
0032                         int in_ph,
0033                         int in_dep,
0034                         int in_dph,
0035                         int in_wed,
0036                         int in_rm,
0037                         int in_rm_fi,
0038                         int in_pix,
0039                         int in_qie,
0040                         int in_adc,
0041                         int in_slb,
0042                         int in_rctcra,
0043                         int in_rctcar,
0044                         int in_rctcon,
0045                         std::string in_s_rbx,
0046                         std::string in_s_slb,
0047                         std::string in_s_slb2,
0048                         std::string in_s_slnam,
0049                         std::string in_s_rctnam);
0050 
0051   ~HBHEHFLogicalMapEntry() {}
0052 
0053   char* printLMapLine();
0054   uint32_t getLinearIndex() const { return HcalElectronicsId(hcalEID_).linearIndex(); }
0055   const HcalElectronicsId getHcalElectronicsId() const { return HcalElectronicsId(hcalEID_); }
0056   const DetId getDetId() const { return DetId(hcalDetID_); }
0057   const HcalFrontEndId getHcalFrontEndId() const { return HcalFrontEndId(hcalFrontEndID_); }
0058 
0059 private:
0060   uint32_t hcalEID_;
0061   uint32_t hcalDetID_;
0062   uint32_t hcalFrontEndID_;
0063 
0064   // stored input data members
0065   int mydphi_, mywedge_, myslb_, myrctcra_, myrctcar_, myrctcon_;
0066 
0067   std::string myslbin_, myslbin2_, myslnam_, myrctnam_;
0068 };
0069 
0070 class HOHXLogicalMapEntry {
0071   /****
0072    *  Class to hold the L-Map entries corresponding to HO and HX
0073    ****/
0074 
0075 public:
0076   HOHXLogicalMapEntry() {}
0077   HOHXLogicalMapEntry(int in_fi_ch,
0078                       int in_htr_fi,
0079                       int in_spig,
0080                       int in_fed,
0081                       int in_cr,
0082                       int in_htr,
0083                       std::string in_s_fpga,
0084                       std::string in_s_det,
0085                       int in_sid,
0086                       int in_et,
0087                       int in_ph,
0088                       int in_dep,
0089                       int in_dph,
0090                       int in_sec,
0091                       int in_rm,
0092                       int in_rm_fi,
0093                       int in_pix,
0094                       int in_qie,
0095                       int in_adc,
0096                       std::string in_s_rbx,
0097                       std::string in_s_let);
0098 
0099   ~HOHXLogicalMapEntry() {}
0100 
0101   char* printLMapLine();
0102   const uint32_t getLinearIndex() const { return HcalElectronicsId(hcalEID_).linearIndex(); }
0103   const HcalElectronicsId getHcalElectronicsId() const { return HcalElectronicsId(hcalEID_); }
0104   const DetId getDetId() const { return DetId(hcalDetID_); }
0105   const HcalFrontEndId getHcalFrontEndId() const { return HcalFrontEndId(hcalFrontEndID_); }
0106 
0107 private:
0108   uint32_t hcalEID_;
0109   uint32_t hcalDetID_;
0110   uint32_t hcalFrontEndID_;
0111 
0112   // stored input data members
0113   int mydphi_, mysector_;
0114   std::string myletter_;
0115 };
0116 
0117 class CALIBLogicalMapEntry {
0118   /****
0119    *  Class to hold the L-Map entries corresponding to the calibration channels
0120    ****/
0121 
0122 public:
0123   CALIBLogicalMapEntry() {}
0124   CALIBLogicalMapEntry(int in_fi_ch,
0125                        int in_htr_fi,
0126                        int in_spig,
0127                        int in_fed,
0128                        int in_cr,
0129                        int in_htr,
0130                        std::string in_s_fpga,
0131                        std::string in_s_det,
0132                        int in_et,
0133                        int in_ph,
0134                        int in_ch_ty,
0135                        int in_sid,
0136                        int in_dph,
0137                        std::string in_s_rbx,
0138                        int in_wed,
0139                        int in_rm_fi,
0140                        std::string in_s_subdet);
0141 
0142   ~CALIBLogicalMapEntry() {}
0143 
0144   char* printLMapLine();
0145   const uint32_t getLinearIndex() const { return HcalElectronicsId(hcalEID_).linearIndex(); }
0146   const HcalElectronicsId getHcalElectronicsId() const { return HcalElectronicsId(hcalEID_); }
0147   const DetId getDetId() const { return DetId(hcalCalibDetID_); }
0148   const HcalFrontEndId getHcalFrontEndId() const { return HcalFrontEndId(hcalFrontEndID_); }
0149 
0150 private:
0151   uint32_t hcalEID_;
0152   uint32_t hcalCalibDetID_;
0153   uint32_t hcalFrontEndID_;
0154 
0155   // input data members
0156   int myside_, mydphi_, mywedge_;
0157   std::string mycalibsubdet_;
0158 };
0159 
0160 class ZDCLogicalMapEntry {
0161   /****
0162    *  Class to hold the L-Map entries corresponding to ZDC
0163    ****/
0164 
0165 public:
0166   ZDCLogicalMapEntry() {}
0167   ZDCLogicalMapEntry(int in_fi_ch,
0168                      int in_htr_fi,
0169                      int in_spigot,
0170                      int in_fed,
0171                      int in_cr,
0172                      int in_htr,
0173                      std::string in_s_fpga,
0174                      std::string in_s_det,
0175                      int in_sid,
0176                      int in_dep,
0177                      int in_x,
0178                      int in_y,
0179                      int in_dx,
0180                      int in_det_ch,
0181                      int in_cab,
0182                      int in_rm,
0183                      int in_qie,
0184                      int in_adc,
0185                      int in_rm_fi);
0186 
0187   ~ZDCLogicalMapEntry() {}
0188 
0189   char* printLMapLine();
0190   const uint32_t getLinearIndex() const { return HcalElectronicsId(hcalEID_).linearIndex(); }
0191   const HcalElectronicsId getHcalElectronicsId() const { return HcalElectronicsId(hcalEID_); }
0192   const DetId getDetId() const { return DetId(hcalZDCDetID_); }
0193 
0194 private:
0195   uint32_t hcalEID_;
0196   uint32_t hcalZDCDetID_;
0197 
0198   // input data members
0199   int myx_, myy_, mydx_, mydet_ch_, mycable_, myrm_, myqie_, myadc_, myrm_fi_;
0200 };
0201 
0202 class HTLogicalMapEntry {
0203   /****
0204    *  Class to hold the L-Map entries corresponding to the Trigger channels
0205    ****/
0206 
0207 public:
0208   HTLogicalMapEntry() {}
0209   HTLogicalMapEntry(int in_et,
0210                     int in_ph,
0211                     int in_sid,
0212                     int in_dph,
0213                     int in_dep,
0214                     std::string in_s_chDet,
0215                     int in_wed,
0216                     int in_cr,
0217                     int in_htr,
0218                     int in_tb,
0219                     int in_spig,
0220                     int in_slb,
0221                     std::string in_s_slb,
0222                     std::string in_s_slb2,
0223                     int in_ndat,
0224                     std::string in_s_slnam,
0225                     int in_rctcra,
0226                     int in_rctcar,
0227                     int in_rctcon,
0228                     std::string in_s_rctnam,
0229                     int in_fed);
0230 
0231   ~HTLogicalMapEntry() {}
0232 
0233   char* printLMapLine();
0234   const uint32_t getLinearIndex() const { return HcalElectronicsId(hcalTrigEID_).linearIndex(); }
0235   const HcalElectronicsId getHcalTrigElectronicsId() const { return HcalElectronicsId(hcalTrigEID_); }
0236   const DetId getDetId() const { return DetId(hcalTrigDetID_); }
0237 
0238 private:
0239   // no meaningful electronics id for the trigger towers, but it is possible to create one that stores various data members
0240   uint32_t hcalTrigEID_;
0241   uint32_t hcalTrigDetID_;
0242 
0243   // input data members
0244   int myside_, mydphi_, mydepth_, mywedge_;
0245   //int myspigot_, myslb_, myndat_,  mycrate_, myhtr_, mytb_, myfedid_;
0246   int myrctcra_, myrctcar_, myrctcon_;
0247   // string data members
0248   std::string mydet_, myslbin_, myslbin2_, myslnam_, myrctnam_;
0249 };
0250 
0251 /***************/
0252 
0253 #endif