test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalDQMCommonUtils.h
Go to the documentation of this file.
1 #ifndef EcalDQMCommonUtils_H
2 #define EcalDQMCommonUtils_H
3 
4 #include <iomanip>
5 #include <algorithm>
6 #include <cmath>
7 
12 
21 
23 
24 namespace ecaldqm {
25 
26  enum SMName {
36  kEBpLow = kEBp01, kEBpHigh = kEBp18
37  };
38 
39  enum Constants {
40  nDCC = 54,
41  nEBDCC = 36,
42  nEEDCC = 18,
43  nDCCMEM = 44,
44  nEEDCCMEM = 8,
45 
46  nTCC = 108,
48  kEEpTCCLow = 72, kEEpTCCHigh = 107,
49  kEBTCCLow = 36, kEBTCCHigh = 71,
50 
53  };
54 
55  extern std::vector<unsigned> const memDCC;
56 
57  extern double const etaBound;
58 
59  // returns DCC ID (1 - 54)
60  unsigned dccId(DetId const&);
61  unsigned dccId(EcalElectronicsId const&);
62 
63  unsigned memDCCId(unsigned); // convert from dccId skipping DCCs without MEM
64  unsigned memDCCIndex(unsigned); // reverse conversion
65 
66  // returns TCC ID (1 - 108)
67  unsigned tccId(DetId const&);
68  unsigned tccId(EcalElectronicsId const&);
69 
70  // returns the data tower id - pass only
71  unsigned towerId(DetId const&);
72  unsigned towerId(EcalElectronicsId const&);
73 
74  unsigned ttId(DetId const&);
75  unsigned ttId(EcalElectronicsId const&);
76 
77  unsigned rtHalf(DetId const&);
78 
79  std::pair<unsigned, unsigned> innerTCCs(unsigned);
80  std::pair<unsigned, unsigned> outerTCCs(unsigned);
81 
82  std::vector<DetId> scConstituents(EcalScDetId const&);
83 
84  EcalPnDiodeDetId pnForCrystal(DetId const&, char);
85 
86  unsigned dccId(std::string const&);
87  std::string smName(unsigned);
88 
89  int zside(DetId const&);
90 
91  double eta(EBDetId const&);
92  double eta(EEDetId const&);
93  double phi(EBDetId const&);
94  double phi(EEDetId const&);
95  double phi(EcalTrigTowerDetId const&);
96  double phi(double);
97 
98  bool isForward(DetId const&);
99 
100  bool isCrystalId(DetId const&);
101  bool isSingleChannelId(DetId const&);
102  bool isEcalScDetId(DetId const&);
103  bool isEndcapTTId(DetId const&);
104 
105  unsigned nCrystals(unsigned);
106  unsigned nSuperCrystals(unsigned);
107 
108  bool ccuExists(unsigned, unsigned);
109 
110  bool checkElectronicsMap(bool = true);
113 
114  bool checkTrigTowerMap(bool = true);
117 
118  bool checkGeometry(bool = true);
119  CaloGeometry const* getGeometry();
120  void setGeometry(CaloGeometry const*);
121 
122  bool checkTopology(bool = true);
123  CaloTopology const* getTopology();
124  void setTopology(CaloTopology const*);
125 }
126 
127 #endif
std::vector< unsigned > const memDCC
unsigned memDCCIndex(unsigned)
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
double const etaBound
EcalElectronicsMapping const * getElectronicsMap()
unsigned tccId(DetId const &)
bool isForward(DetId const &)
std::pair< unsigned, unsigned > outerTCCs(unsigned)
int zside(DetId const &)
bool ccuExists(unsigned, unsigned)
CaloGeometry const * getGeometry()
unsigned ttId(DetId const &)
unsigned nSuperCrystals(unsigned)
bool isEndcapTTId(DetId const &)
unsigned nCrystals(unsigned)
CaloTopology const * getTopology()
bool checkElectronicsMap(bool=true)
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
EcalPnDiodeDetId pnForCrystal(DetId const &, char)
void setGeometry(CaloGeometry const *)
unsigned rtHalf(DetId const &)
unsigned towerId(DetId const &)
bool isEcalScDetId(DetId const &)
unsigned memDCCId(unsigned)
bool isSingleChannelId(DetId const &)
Definition: DetId.h:18
void setTopology(CaloTopology const *)
std::string smName(unsigned)
bool checkTopology(bool=true)
bool checkTrigTowerMap(bool=true)
bool isCrystalId(DetId const &)
void setElectronicsMap(EcalElectronicsMapping const *)
std::pair< unsigned, unsigned > innerTCCs(unsigned)
std::vector< DetId > scConstituents(EcalScDetId const &)
void setTrigTowerMap(EcalTrigTowerConstituentsMap const *)
bool checkGeometry(bool=true)
unsigned dccId(DetId const &)
double eta(EBDetId const &)
double phi(EBDetId const &)