# Project CMSSW displayed by LXR

File indexing completed on 2024-04-06 11:57:47

```0001 #ifndef MEEBGeom_hh
0002 #define MEEBGeom_hh
0003
0004 //

0005 // Authors  : Gautier Hamel de Monchenault and Julie Malcles, Saclay

0006 //

0007
0008 #include <vector>
0009 #include <map>
0010
0011 #include <TPolyLine.h>
0012 #include <TGraph.h>
0013 #include <TString.h>
0014
0015 class MEEBGeom {
0016   // static functions

0017 public:
0018   enum EBUnit { iEcalBarrel, iSuperModule, iDCC, iSide, iLMRegion, iLMModule, iTriggerTower, iCrystal };
0019
0020   typedef int EBLocalCoord;    // ix from 0 to 84, iy from 0 to 19  (note ix=etaSM-1, iy=phiSM-1)

0021   typedef int EBGlobalCoord;   // ieta from 1 to 85 (EB+) or -85 to -1 (EB-) and iphi from 1 to 360 (or -9 to 350)

0022   typedef int EBTTLocalCoord;  // iX=ix/5 from 0 to 3, iY=iy/5 from 0 to 16

0023   typedef std::pair<float, float> EtaPhiPoint;
0024   typedef std::pair<EBGlobalCoord, EBGlobalCoord> EtaPhiCoord;
0025   typedef std::pair<EBLocalCoord, EBLocalCoord> XYCoord;
0026
0027   static int barrel(EBGlobalCoord ieta, EBGlobalCoord iphi);
0028   static int sm(EBGlobalCoord ieta, EBGlobalCoord iphi);
0029   static int dcc(EBGlobalCoord ieta, EBGlobalCoord iphi);
0030   static int side(EBGlobalCoord ieta, EBGlobalCoord iphi);
0031   static int lmr(EBGlobalCoord ieta, EBGlobalCoord iphi);
0032   static int lmmod(EBGlobalCoord ieta, EBGlobalCoord iphi);
0033   static int tt(EBGlobalCoord ieta, EBGlobalCoord iphi);
0034   static int crystal(EBGlobalCoord ieta, EBGlobalCoord iphi);
0035
0036   static TString smName(int ism);
0037   static int smFromDcc(int idcc);
0038   static int dccFromSm(int ism);
0039
0040   static std::pair<int, int> pn(int ilmmod);
0041   static std::pair<int, int> memFromLmr(int ilmr);
0042   static std::vector<int> lmmodFromLmr(int ilmr);
0043
0044   static int apdRefTower(int ilmmod);
0045   static std::vector<int> apdRefChannels(int ilmmod);
0046
0047   // get local from crystal number

0048   static XYCoord localCoord(int icr);
0049
0050   // get local from global

0051   static XYCoord localCoord(EBGlobalCoord ieta, EBGlobalCoord iphi);
0052
0053   // get global from local

0054   static EtaPhiCoord globalCoord(int ism, EBLocalCoord ix, EBLocalCoord iy);
0055   static EtaPhiPoint globalCoord(int ism, float x, float y);
0056   static EtaPhiCoord globalCoord(int ism, int icrystal);
0057
0058   static TGraph* getGraphBoundary(int type, int num, bool global = false);
0059   static int crystal_channel(EBLocalCoord ix, EBLocalCoord iy);
0060   static int electronic_channel(EBLocalCoord ix, EBLocalCoord iy);
0061
0062   static int tt_type(EBTTLocalCoord iX, EBTTLocalCoord iY);
0063   static int hv_channel(EBTTLocalCoord iX, EBTTLocalCoord iY);
0064   static int lv_channel(EBTTLocalCoord iX, EBTTLocalCoord iY);
0065   static int lm_channel(EBTTLocalCoord iX, EBTTLocalCoord iY);
0066   static int tt_channel(EBTTLocalCoord iX, EBTTLocalCoord iY);
0067
0068   virtual ~MEEBGeom() {}
0069
0070 private:
0071   //GHM  ClassDef(MEEBGeom,0) // MEEBGeom -- Monitoring utility for survey of Ecal

0072 };
0073
0074 #endif
```