Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-08 08:15:41

0001 #ifndef CalibCalorimetry_EcalLaserAnalyzer_MEEEGeom_h
0002 #define CalibCalorimetry_EcalLaserAnalyzer_MEEEGeom_h
0003 
0004 //

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

0006 //

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

0017 public:
0018   enum EEUnit { iEcalEndCap = 0, iDee, iQuadrant, iSector, iDCC, iLMRegion, iLMModule, iSuperCrystal, iCrystal };
0019 
0020   typedef int SuperCrysCoord;
0021   typedef int CrysCoord;
0022 
0023   typedef std::pair<float, float> EtaPhiPoint;
0024 
0025   static int dee(SuperCrysCoord iX, SuperCrysCoord iY, int iz);
0026   static int quadrant(SuperCrysCoord iX, SuperCrysCoord iY);
0027   static int sector(SuperCrysCoord iX, SuperCrysCoord iY);
0028   static int sm(SuperCrysCoord iX, SuperCrysCoord iY, int iz);
0029   static int lmmod(SuperCrysCoord iX, SuperCrysCoord iY);
0030   static int sc_in_quad(SuperCrysCoord iX, SuperCrysCoord iY);
0031   static int sc(SuperCrysCoord iX, SuperCrysCoord iY);
0032   static int dcc(SuperCrysCoord iX, SuperCrysCoord iY, int iz);
0033   static int lmr(SuperCrysCoord iX, SuperCrysCoord iY, int iz);
0034   static int side(SuperCrysCoord iX, SuperCrysCoord iY, int iz);
0035 
0036   static int crystal_in_sc(CrysCoord ix, CrysCoord iy);
0037   static int crystal(CrysCoord ix, CrysCoord iy);
0038 
0039   static int dee(int ilmr);
0040   static bool near(int ilmr);
0041 
0042   static TString smName(int ism);
0043   static int smFromDcc(int idcc);
0044   static int dccFromSm(int ism);
0045 
0046   static const bool pnTheory;  // if true: theoretical PN cabling for all dees

0047   static std::pair<int, int> pn(int dee, int ilmod);
0048   static std::pair<int, int> memFromLmr(int ilmr);
0049   static std::vector<int> lmmodFromLmr(int ilmr);
0050   static int deeFromMem(int imem);
0051   static int apdRefTower(int ilmr, int ilmmod);
0052   static std::vector<int> apdRefChannels(int ilmmod);
0053 
0054   static TGraph* getGraphBoundary(int type, int num, int iz = -1, int xside = 0);
0055   static void getBoundary(std::list<std::pair<float, float> >& l, int type, int num, int iz = -1, int xside = 0);
0056 
0057   static int sc_type(SuperCrysCoord iX, SuperCrysCoord iY);
0058 
0059   virtual ~MEEEGeom() {}
0060 
0061 protected:
0062   //GHM  ClassDef(MEEEGeom,0) // MEEEGeom -- Monitoring utility for survey of Ecal

0063 };
0064 
0065 #endif