CMS 3D CMS Logo

MEEBGeom.h
Go to the documentation of this file.
1 #ifndef MEEBGeom_hh
2 #define MEEBGeom_hh
3 
4 //
5 // Authors : Gautier Hamel de Monchenault and Julie Malcles, Saclay
6 //
7 
8 #include <vector>
9 #include <map>
10 
11 #include <TPolyLine.h>
12 #include <TGraph.h>
13 #include <TString.h>
14 
15 class MEEBGeom
16 {
17  // static functions
18 public:
19 
21 
22  typedef int EBLocalCoord; // ix from 0 to 84, iy from 0 to 19 (note ix=etaSM-1, iy=phiSM-1)
23  typedef int EBGlobalCoord; // ieta from 1 to 85 (EB+) or -85 to -1 (EB-) and iphi from 1 to 360 (or -9 to 350)
24  typedef int EBTTLocalCoord; // iX=ix/5 from 0 to 3, iY=iy/5 from 0 to 16
25  typedef std::pair<float,float> EtaPhiPoint;
26  typedef std::pair<EBGlobalCoord, EBGlobalCoord> EtaPhiCoord;
27  typedef std::pair<EBLocalCoord, EBLocalCoord> XYCoord;
28 
29  static int barrel( EBGlobalCoord ieta, EBGlobalCoord iphi );
30  static int sm( EBGlobalCoord ieta, EBGlobalCoord iphi );
31  static int dcc( EBGlobalCoord ieta, EBGlobalCoord iphi );
32  static int side( EBGlobalCoord ieta, EBGlobalCoord iphi );
33  static int lmr( EBGlobalCoord ieta, EBGlobalCoord iphi );
34  static int lmmod( EBGlobalCoord ieta, EBGlobalCoord iphi );
35  static int tt( EBGlobalCoord ieta, EBGlobalCoord iphi );
36  static int crystal( EBGlobalCoord ieta, EBGlobalCoord iphi );
37 
38  static TString smName( int ism );
39  static int smFromDcc( int idcc );
40  static int dccFromSm( int ism );
41 
42  static std::pair<int, int> pn( int ilmmod );
43  static std::pair<int,int> memFromLmr( int ilmr );
44  static std::vector<int> lmmodFromLmr( int ilmr );
45 
46  static int apdRefTower( int ilmmod );
47  static std::vector<int> apdRefChannels( int ilmmod );
48 
49  // get local from crystal number
50  static XYCoord localCoord( int icr );
51 
52  // get local from global
53  static XYCoord localCoord( EBGlobalCoord ieta, EBGlobalCoord iphi );
54 
55  // get global from local
56  static EtaPhiCoord globalCoord( int ism, EBLocalCoord ix, EBLocalCoord iy );
57  static EtaPhiPoint globalCoord( int ism, float x, float y );
58  static EtaPhiCoord globalCoord( int ism, int icrystal );
59 
60 
61  static TGraph* getGraphBoundary( int type, int num, bool global=false );
62  static int crystal_channel( EBLocalCoord ix, EBLocalCoord iy );
63  static int electronic_channel( EBLocalCoord ix, EBLocalCoord iy );
64 
65  static int tt_type( EBTTLocalCoord iX, EBTTLocalCoord iY );
66  static int hv_channel( EBTTLocalCoord iX, EBTTLocalCoord iY );
67  static int lv_channel( EBTTLocalCoord iX, EBTTLocalCoord iY );
68  static int lm_channel( EBTTLocalCoord iX, EBTTLocalCoord iY );
69  static int tt_channel( EBTTLocalCoord iX, EBTTLocalCoord iY );
70 
71  virtual ~MEEBGeom() {}
72 
73 private:
74 
75  //GHM ClassDef(MEEBGeom,0) // MEEBGeom -- Monitoring utility for survey of Ecal
76 };
77 
78 #endif
79 
type
Definition: HCALResponse.h:21
static XYCoord localCoord(int icr)
Definition: MEEBGeom.cc:153
static int smFromDcc(int idcc)
Definition: MEEBGeom.cc:68
static std::vector< int > apdRefChannels(int ilmmod)
Definition: MEEBGeom.cc:551
static TString smName(int ism)
Definition: MEEBGeom.cc:79
static int crystal(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:107
static int crystal_channel(EBLocalCoord ix, EBLocalCoord iy)
Definition: MEEBGeom.cc:332
std::pair< EBGlobalCoord, EBGlobalCoord > EtaPhiCoord
Definition: MEEBGeom.h:26
static int tt_type(EBTTLocalCoord iX, EBTTLocalCoord iY)
Definition: MEEBGeom.cc:244
static int lmr(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:121
static std::pair< int, int > pn(int ilmmod)
Definition: MEEBGeom.cc:479
static int lm_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
Definition: MEEBGeom.cc:218
static int electronic_channel(EBLocalCoord ix, EBLocalCoord iy)
Definition: MEEBGeom.cc:341
int EBTTLocalCoord
Definition: MEEBGeom.h:24
static EtaPhiCoord globalCoord(int ism, EBLocalCoord ix, EBLocalCoord iy)
Definition: MEEBGeom.cc:162
virtual ~MEEBGeom()
Definition: MEEBGeom.h:71
static TGraph * getGraphBoundary(int type, int num, bool global=false)
Definition: MEEBGeom.cc:363
int EBGlobalCoord
Definition: MEEBGeom.h:23
static int apdRefTower(int ilmmod)
Definition: MEEBGeom.cc:520
static int lv_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
Definition: MEEBGeom.cc:296
static int lmmod(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:93
std::pair< EBLocalCoord, EBLocalCoord > XYCoord
Definition: MEEBGeom.h:27
static std::pair< int, int > memFromLmr(int ilmr)
Definition: MEEBGeom.cc:499
static int side(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:114
static int tt_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
Definition: MEEBGeom.cc:322
static int hv_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
Definition: MEEBGeom.cc:270
std::pair< float, float > EtaPhiPoint
Definition: MEEBGeom.h:25
static int barrel(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:15
static int sm(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:27
static int dcc(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:48
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
static int dccFromSm(int ism)
Definition: MEEBGeom.cc:55
static int tt(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:100
static std::vector< int > lmmodFromLmr(int ilmr)
Definition: MEEBGeom.cc:507
int EBLocalCoord
Definition: MEEBGeom.h:22