CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/CalibCalorimetry/EcalLaserAnalyzer/interface/MEEEGeom.h

Go to the documentation of this file.
00001 #ifndef MEEEGeom_hh
00002 #define MEEEGeom_hh
00003 
00004 //
00005 // Authors  : Gautier Hamel de Monchenault and Julie Malcles, Saclay 
00006 //
00007 
00008 #include <vector>
00009 #include <map>
00010 #include <list>
00011 
00012 #include <TPolyLine.h>
00013 #include <TGraph.h>
00014 
00015 class MEEEGeom
00016 {
00017   // static functions
00018 public:
00019 
00020   enum EEUnit { iEcalEndCap=0, iDee, iQuadrant, iSector, iDCC, iLMRegion, iLMModule, iSuperCrystal, iCrystal };
00021 
00022   typedef int SuperCrysCoord;
00023   typedef int CrysCoord;
00024 
00025   typedef std::pair<float,float> EtaPhiPoint;
00026 
00027   static int        dee( SuperCrysCoord iX, SuperCrysCoord iY, int iz );
00028   static int   quadrant( SuperCrysCoord iX, SuperCrysCoord iY         );
00029   static int     sector( SuperCrysCoord iX, SuperCrysCoord iY         );
00030   static int         sm( SuperCrysCoord iX, SuperCrysCoord iY, int iz );
00031   static int      lmmod( SuperCrysCoord iX, SuperCrysCoord iY         );
00032   static int sc_in_quad( SuperCrysCoord iX, SuperCrysCoord iY         );
00033   static int         sc( SuperCrysCoord iX, SuperCrysCoord iY         );
00034   static int        dcc( SuperCrysCoord iX, SuperCrysCoord iY, int iz );
00035   static int        lmr( SuperCrysCoord iX, SuperCrysCoord iY, int iz );
00036   static int       side( SuperCrysCoord iX, SuperCrysCoord iY, int iz );
00037 
00038   static int crystal_in_sc( CrysCoord ix, CrysCoord iy );
00039   static int       crystal( CrysCoord ix, CrysCoord iy );
00040 
00041   static int   dee( int ilmr );
00042   static bool near( int ilmr );
00043 
00044   static TString smName( int ism  );
00045   static int smFromDcc(  int idcc );
00046   static int dccFromSm(  int ism  );
00047 
00048   static bool pnTheory; // if true: theoretical PN cabling for all dees
00049   static std::pair<int, int> pn( int dee, int ilmod );
00050   static std::pair<int,int> memFromLmr( int ilmr );
00051   static std::vector<int> lmmodFromLmr( int ilmr );
00052   static int deeFromMem( int imem );
00053   static int apdRefTower(  int ilmr, int ilmmod );
00054   static std::vector<int> apdRefChannels( int ilmmod );
00055 
00056   static TGraph* getGraphBoundary( int type, int num, int iz=-1, int xside=0 );
00057   static void getBoundary( std::list< std::pair< float, float > >& l, int type, int num, int iz=-1, int xside=0 );
00058 
00059   static int sc_type(     SuperCrysCoord iX, SuperCrysCoord iY         );
00060 
00061   virtual ~MEEEGeom() {}
00062 
00063 protected:
00064 
00065   //GHM  ClassDef(MEEEGeom,0) // MEEEGeom -- Monitoring utility for survey of Ecal
00066 
00067 };
00068 
00069 #endif
00070