CMS 3D CMS Logo

EcalDQMCommonUtils.h
Go to the documentation of this file.
1 #ifndef EcalDQMCommonUtils_H
2 #define EcalDQMCommonUtils_H
3 
4 #include <algorithm>
5 #include <cmath>
6 #include <iomanip>
7 
11 
20 
22 
23 namespace ecaldqm {
24 
25  enum SMName {
88  };
89 
90  enum Constants {
91  nDCC = 54,
92  nEBDCC = 36,
93  nEEDCC = 18,
94  nDCCMEM = 44,
95  nEEDCCMEM = 8,
96 
97  nTTOuter = 16,
98  nTTInner = 28,
99  // These lines set the number of TriggerTowers in "outer" and "inner" TCCs,
100  // where "outer" := closer to the barrel. These constants are used in
101  // setting the binning. There are 16 trigger towers per TCC for "outer" TCCs,
102  // and 24 per TCC for "inner" TCCs (but the numbering is from 0 to 27, so
103  // 28 bins are required).
104 
105  nTCC = 108,
109  kEEpTCCHigh = 107,
110  kEBTCCLow = 36,
112 
115  };
116 
117  extern std::vector<unsigned> const memDCC;
118 
119  extern double const etaBound;
120 
121  // returns DCC ID (1 - 54)
122  unsigned dccId(DetId const &, EcalElectronicsMapping const *);
123  unsigned dccId(EcalElectronicsId const &);
124 
125  unsigned memDCCId(unsigned); // convert from dccId skipping DCCs without MEM
126  unsigned memDCCIndex(unsigned); // reverse conversion
127 
128  // returns TCC ID (1 - 108)
129  unsigned tccId(DetId const &, EcalElectronicsMapping const *);
130  unsigned tccId(EcalElectronicsId const &, EcalElectronicsMapping const *);
131 
132  // returns the data tower id - pass only
133  unsigned towerId(DetId const &, EcalElectronicsMapping const *);
134  unsigned towerId(EcalElectronicsId const &);
135 
136  unsigned ttId(DetId const &, EcalElectronicsMapping const *);
137  unsigned ttId(EcalElectronicsId const &, EcalElectronicsMapping const *);
138 
139  unsigned rtHalf(DetId const &, EcalElectronicsMapping const *);
140 
141  std::pair<unsigned, unsigned> innerTCCs(unsigned);
142  std::pair<unsigned, unsigned> outerTCCs(unsigned);
143 
144  std::vector<DetId> scConstituents(EcalScDetId const &);
145 
147 
148  unsigned dccId(std::string const &);
149  std::string smName(unsigned);
150 
151  int zside(DetId const &);
152 
153  double eta(EBDetId const &, CaloGeometry const *);
154  double eta(EEDetId const &, CaloGeometry const *);
155  double phi(EBDetId const &);
156  double phi(EEDetId const &);
157  double phi(EcalTrigTowerDetId const &);
158  double phi(double);
159 
160  bool isForward(DetId const &);
161 
162  bool isCrystalId(DetId const &);
163  bool isSingleChannelId(DetId const &);
164  bool isEcalScDetId(DetId const &);
165  bool isEndcapTTId(DetId const &);
166 
167  unsigned nCrystals(unsigned);
168  unsigned nSuperCrystals(unsigned);
169 
170  bool ccuExists(unsigned, unsigned);
171 } // namespace ecaldqm
172 
173 #endif
ecaldqm::eta
double eta(EBDetId const &, CaloGeometry const *)
Definition: EcalDQMCommonUtils.cc:209
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
ecaldqm::kEBm02
Definition: EcalDQMCommonUtils.h:36
EcalElectronicsId.h
ecaldqm::kEBmHigh
Definition: EcalDQMCommonUtils.h:85
ecaldqm::kEBm17
Definition: EcalDQMCommonUtils.h:51
ecaldqm
Definition: DQWorker.h:29
ecaldqm::kEBp06
Definition: EcalDQMCommonUtils.h:58
ecaldqm::kEEm09
Definition: EcalDQMCommonUtils.h:28
ecaldqm::kEEp09
Definition: EcalDQMCommonUtils.h:73
ecaldqm::kEBp05
Definition: EcalDQMCommonUtils.h:57
ecaldqm::outerTCCs
std::pair< unsigned, unsigned > outerTCCs(unsigned)
Definition: EcalDQMCommonUtils.cc:153
ecaldqm::kEBp02
Definition: EcalDQMCommonUtils.h:54
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
ecaldqm::kEBp10
Definition: EcalDQMCommonUtils.h:62
ecaldqm::kEBTCCLow
Definition: EcalDQMCommonUtils.h:110
EBDetId
Definition: EBDetId.h:17
ecaldqm::kEEm04
Definition: EcalDQMCommonUtils.h:32
ecaldqm::ttId
unsigned ttId(DetId const &, EcalElectronicsMapping const *)
Definition: EcalDQMCommonUtils.cc:99
ecaldqm::kEBp18
Definition: EcalDQMCommonUtils.h:70
ecaldqm::nSuperCrystals
unsigned nSuperCrystals(unsigned)
Definition: EcalDQMCommonUtils.cc:369
ecaldqm::kEEpHigh
Definition: EcalDQMCommonUtils.h:83
EBDetId.h
EEDetId.h
ecaldqm::nChannels
Definition: EcalDQMCommonUtils.h:113
ecaldqm::kEBm14
Definition: EcalDQMCommonUtils.h:48
ecaldqm::memDCCIndex
unsigned memDCCIndex(unsigned)
Definition: EcalDQMCommonUtils.cc:46
ecaldqm::nEBDCC
Definition: EcalDQMCommonUtils.h:92
ecaldqm::kEBp08
Definition: EcalDQMCommonUtils.h:60
ecaldqm::kEBm12
Definition: EcalDQMCommonUtils.h:46
ecaldqm::kEEm07
Definition: EcalDQMCommonUtils.h:26
ecaldqm::isEndcapTTId
bool isEndcapTTId(DetId const &)
Definition: EcalDQMCommonUtils.cc:270
ecaldqm::kEEp07
Definition: EcalDQMCommonUtils.h:71
ecaldqm::kEEmLow
Definition: EcalDQMCommonUtils.h:80
ecaldqm::kEEm01
Definition: EcalDQMCommonUtils.h:29
ecaldqm::kEEpTCCHigh
Definition: EcalDQMCommonUtils.h:109
EcalPnDiodeDetId
Definition: EcalPnDiodeDetId.h:22
EcalTrigTowerDetId
Definition: EcalTrigTowerDetId.h:14
ecaldqm::etaBound
const double etaBound
ecaldqm::kEBm18
Definition: EcalDQMCommonUtils.h:52
ecaldqm::isForward
bool isForward(DetId const &)
Definition: EcalDQMCommonUtils.cc:243
ecaldqm::kEBm10
Definition: EcalDQMCommonUtils.h:44
ecaldqm::towerId
unsigned towerId(DetId const &, EcalElectronicsMapping const *)
Definition: EcalDQMCommonUtils.cc:77
DetId
Definition: DetId.h:17
CaloGeometry
Definition: CaloGeometry.h:21
ecaldqm::kEBm15
Definition: EcalDQMCommonUtils.h:49
ecaldqm::kEBm05
Definition: EcalDQMCommonUtils.h:39
EEDetId::kSizeForDenseIndexing
Definition: EEDetId.h:329
ecaldqm::kEBp07
Definition: EcalDQMCommonUtils.h:59
ecaldqm::kEBp04
Definition: EcalDQMCommonUtils.h:56
ecaldqm::kEBm08
Definition: EcalDQMCommonUtils.h:42
ecaldqm::kEBTCCHigh
Definition: EcalDQMCommonUtils.h:111
EcalScDetId
Definition: EcalScDetId.h:24
ecaldqm::ccuExists
bool ccuExists(unsigned, unsigned)
Definition: EcalDQMCommonUtils.cc:403
ecaldqm::kEEp02
Definition: EcalDQMCommonUtils.h:75
ecaldqm::kEEm03
Definition: EcalDQMCommonUtils.h:31
ecaldqm::kEBpHigh
Definition: EcalDQMCommonUtils.h:87
ecaldqm::kEEmHigh
Definition: EcalDQMCommonUtils.h:81
ecaldqm::kEBm01
Definition: EcalDQMCommonUtils.h:35
ecaldqm::memDCCId
unsigned memDCCId(unsigned)
Definition: EcalDQMCommonUtils.cc:38
EcalElectronicsId
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
Definition: EcalElectronicsId.h:18
ecaldqm::kEEm08
Definition: EcalDQMCommonUtils.h:27
ecaldqm::nEEDCC
Definition: EcalDQMCommonUtils.h:93
ecaldqm::kEEp01
Definition: EcalDQMCommonUtils.h:74
EEDetId
Definition: EEDetId.h:14
ecaldqm::SMName
SMName
Definition: EcalDQMCommonUtils.h:25
EcalTrigTowerDetId.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ecaldqm::kEBp12
Definition: EcalDQMCommonUtils.h:64
ecaldqm::pnForCrystal
EcalPnDiodeDetId pnForCrystal(DetId const &, char, EcalElectronicsMapping const *)
Definition: EcalDQMCommonUtils2.cc:10
EcalSubdetector.h
EcalPnDiodeDetId.h
ecaldqm::kEBm13
Definition: EcalDQMCommonUtils.h:47
ecaldqm::nEEDCCMEM
Definition: EcalDQMCommonUtils.h:95
ecaldqm::nCrystals
unsigned nCrystals(unsigned)
Definition: EcalDQMCommonUtils.cc:334
ecaldqm::isSingleChannelId
bool isSingleChannelId(DetId const &)
Definition: EcalDQMCommonUtils.cc:262
ecaldqm::kEBm11
Definition: EcalDQMCommonUtils.h:45
ecaldqm::kEBm06
Definition: EcalDQMCommonUtils.h:40
ecaldqm::isEcalScDetId
bool isEcalScDetId(DetId const &)
Definition: EcalDQMCommonUtils.cc:266
EcalElectronicsMapping.h
ecaldqm::nTTOuter
Definition: EcalDQMCommonUtils.h:97
ecaldqm::kEEp05
Definition: EcalDQMCommonUtils.h:78
EcalTriggerElectronicsId.h
ecaldqm::kEEmTCCHigh
Definition: EcalDQMCommonUtils.h:107
ecaldqm::kEBmLow
Definition: EcalDQMCommonUtils.h:84
ecaldqm::kEEm05
Definition: EcalDQMCommonUtils.h:33
ecaldqm::kEBp16
Definition: EcalDQMCommonUtils.h:68
ecaldqm::kEBp01
Definition: EcalDQMCommonUtils.h:53
ecaldqm::nTTInner
Definition: EcalDQMCommonUtils.h:98
ecaldqm::dccId
unsigned dccId(DetId const &, EcalElectronicsMapping const *)
Definition: EcalDQMCommonUtils.cc:16
ecaldqm::kEBp11
Definition: EcalDQMCommonUtils.h:63
ecaldqm::kEBp13
Definition: EcalDQMCommonUtils.h:65
EcalTrigTowerDetId::kEBTotalTowers
Definition: EcalTrigTowerDetId.h:116
ecaldqm::memDCC
const std::vector< unsigned > memDCC
ecaldqm::kEEp04
Definition: EcalDQMCommonUtils.h:77
ecaldqm::scConstituents
std::vector< DetId > scConstituents(EcalScDetId const &)
Definition: EcalDQMCommonUtils.cc:173
ecaldqm::kEBm16
Definition: EcalDQMCommonUtils.h:50
EcalTrigTowerConstituentsMap.h
ecaldqm::kEBp15
Definition: EcalDQMCommonUtils.h:67
ecaldqm::kEBm04
Definition: EcalDQMCommonUtils.h:38
ecaldqm::Constants
Constants
Definition: EcalDQMCommonUtils.h:90
EcalScDetId.h
ecaldqm::kEEpLow
Definition: EcalDQMCommonUtils.h:82
CaloGeometry.h
ecaldqm::kEBm09
Definition: EcalDQMCommonUtils.h:43
ecaldqm::kEEmTCCLow
Definition: EcalDQMCommonUtils.h:106
ecaldqm::smName
std::string smName(unsigned)
Definition: EcalDQMCommonUtils.cc:289
EBDetId::kSizeForDenseIndexing
Definition: EBDetId.h:155
Exception.h
ecaldqm::kEEpTCCLow
Definition: EcalDQMCommonUtils.h:108
ecaldqm::nDCC
Definition: EcalDQMCommonUtils.h:91
EcalScDetId::kSizeForDenseIndexing
Definition: EcalScDetId.h:188
ecaldqm::kEEp03
Definition: EcalDQMCommonUtils.h:76
ecaldqm::nTCC
Definition: EcalDQMCommonUtils.h:105
ecaldqm::tccId
unsigned tccId(DetId const &, EcalElectronicsMapping const *)
Definition: EcalDQMCommonUtils.cc:54
ecaldqm::kEBm07
Definition: EcalDQMCommonUtils.h:41
ecaldqm::isCrystalId
bool isCrystalId(DetId const &)
Definition: EcalDQMCommonUtils.cc:257
ecaldqm::kEEp06
Definition: EcalDQMCommonUtils.h:79
ecaldqm::innerTCCs
std::pair< unsigned, unsigned > innerTCCs(unsigned)
Definition: EcalDQMCommonUtils.cc:133
ecaldqm::kEBpLow
Definition: EcalDQMCommonUtils.h:86
ecaldqm::nTowers
Definition: EcalDQMCommonUtils.h:114
ecaldqm::nDCCMEM
Definition: EcalDQMCommonUtils.h:94
ecaldqm::kEEm02
Definition: EcalDQMCommonUtils.h:30
ecaldqm::kEEm06
Definition: EcalDQMCommonUtils.h:34
ecaldqm::kEBp03
Definition: EcalDQMCommonUtils.h:55
ecaldqm::rtHalf
unsigned rtHalf(DetId const &, EcalElectronicsMapping const *)
Definition: EcalDQMCommonUtils.cc:119
ecaldqm::kEBp09
Definition: EcalDQMCommonUtils.h:61
ecaldqm::kEBp17
Definition: EcalDQMCommonUtils.h:69
ecaldqm::phi
double phi(EBDetId const &)
Definition: EcalDQMCommonUtils.cc:215
ecaldqm::kEBm03
Definition: EcalDQMCommonUtils.h:37
ecaldqm::kEEp08
Definition: EcalDQMCommonUtils.h:72
ecaldqm::kEBp14
Definition: EcalDQMCommonUtils.h:66