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  // static functions
17 public:
19 
20  typedef int EBLocalCoord; // ix from 0 to 84, iy from 0 to 19 (note ix=etaSM-1, iy=phiSM-1)
21  typedef int EBGlobalCoord; // ieta from 1 to 85 (EB+) or -85 to -1 (EB-) and iphi from 1 to 360 (or -9 to 350)
22  typedef int EBTTLocalCoord; // iX=ix/5 from 0 to 3, iY=iy/5 from 0 to 16
23  typedef std::pair<float, float> EtaPhiPoint;
24  typedef std::pair<EBGlobalCoord, EBGlobalCoord> EtaPhiCoord;
25  typedef std::pair<EBLocalCoord, EBLocalCoord> XYCoord;
26 
27  static int barrel(EBGlobalCoord ieta, EBGlobalCoord iphi);
28  static int sm(EBGlobalCoord ieta, EBGlobalCoord iphi);
29  static int dcc(EBGlobalCoord ieta, EBGlobalCoord iphi);
30  static int side(EBGlobalCoord ieta, EBGlobalCoord iphi);
31  static int lmr(EBGlobalCoord ieta, EBGlobalCoord iphi);
32  static int lmmod(EBGlobalCoord ieta, EBGlobalCoord iphi);
33  static int tt(EBGlobalCoord ieta, EBGlobalCoord iphi);
34  static int crystal(EBGlobalCoord ieta, EBGlobalCoord iphi);
35 
36  static TString smName(int ism);
37  static int smFromDcc(int idcc);
38  static int dccFromSm(int ism);
39 
40  static std::pair<int, int> pn(int ilmmod);
41  static std::pair<int, int> memFromLmr(int ilmr);
42  static std::vector<int> lmmodFromLmr(int ilmr);
43 
44  static int apdRefTower(int ilmmod);
45  static std::vector<int> apdRefChannels(int ilmmod);
46 
47  // get local from crystal number
48  static XYCoord localCoord(int icr);
49 
50  // get local from global
51  static XYCoord localCoord(EBGlobalCoord ieta, EBGlobalCoord iphi);
52 
53  // get global from local
54  static EtaPhiCoord globalCoord(int ism, EBLocalCoord ix, EBLocalCoord iy);
55  static EtaPhiPoint globalCoord(int ism, float x, float y);
56  static EtaPhiCoord globalCoord(int ism, int icrystal);
57 
58  static TGraph* getGraphBoundary(int type, int num, bool global = false);
59  static int crystal_channel(EBLocalCoord ix, EBLocalCoord iy);
60  static int electronic_channel(EBLocalCoord ix, EBLocalCoord iy);
61 
62  static int tt_type(EBTTLocalCoord iX, EBTTLocalCoord iY);
63  static int hv_channel(EBTTLocalCoord iX, EBTTLocalCoord iY);
64  static int lv_channel(EBTTLocalCoord iX, EBTTLocalCoord iY);
65  static int lm_channel(EBTTLocalCoord iX, EBTTLocalCoord iY);
66  static int tt_channel(EBTTLocalCoord iX, EBTTLocalCoord iY);
67 
68  virtual ~MEEBGeom() {}
69 
70 private:
71  //GHM ClassDef(MEEBGeom,0) // MEEBGeom -- Monitoring utility for survey of Ecal
72 };
73 
74 #endif
type
Definition: HCALResponse.h:21
static XYCoord localCoord(int icr)
Definition: MEEBGeom.cc:142
std::pair< float, float > EtaPhiPoint
Definition: MEEBGeom.h:23
static int smFromDcc(int idcc)
Definition: MEEBGeom.cc:67
static std::vector< int > apdRefChannels(int ilmmod)
Definition: MEEBGeom.cc:526
static TString smName(int ism)
Definition: MEEBGeom.cc:79
static int crystal(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:100
static int crystal_channel(EBLocalCoord ix, EBLocalCoord iy)
Definition: MEEBGeom.cc:319
std::pair< EBGlobalCoord, EBGlobalCoord > EtaPhiCoord
Definition: MEEBGeom.h:24
static int tt_type(EBTTLocalCoord iX, EBTTLocalCoord iY)
Definition: MEEBGeom.cc:229
static int lmr(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:110
static std::pair< int, int > pn(int ilmmod)
Definition: MEEBGeom.cc:447
static int lm_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
Definition: MEEBGeom.cc:201
static int electronic_channel(EBLocalCoord ix, EBLocalCoord iy)
Definition: MEEBGeom.cc:326
int EBTTLocalCoord
Definition: MEEBGeom.h:22
static EtaPhiCoord globalCoord(int ism, EBLocalCoord ix, EBLocalCoord iy)
Definition: MEEBGeom.cc:149
virtual ~MEEBGeom()
Definition: MEEBGeom.h:68
static TGraph * getGraphBoundary(int type, int num, bool global=false)
Definition: MEEBGeom.cc:346
int EBGlobalCoord
Definition: MEEBGeom.h:21
static int apdRefTower(int ilmmod)
Definition: MEEBGeom.cc:490
static int lv_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
Definition: MEEBGeom.cc:285
static int lmmod(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:90
std::pair< EBLocalCoord, EBLocalCoord > XYCoord
Definition: MEEBGeom.h:25
static std::pair< int, int > memFromLmr(int ilmr)
Definition: MEEBGeom.cc:473
static int side(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:105
static int tt_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
Definition: MEEBGeom.cc:313
static int hv_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
Definition: MEEBGeom.cc:257
static int barrel(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:14
static int sm(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:26
static int dcc(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:48
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:51
static int dccFromSm(int ism)
Definition: MEEBGeom.cc:53
static int tt(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:95
static std::vector< int > lmmodFromLmr(int ilmr)
Definition: MEEBGeom.cc:479
int EBLocalCoord
Definition: MEEBGeom.h:20