|
|
Go to the documentation of this file.
8 unsigned memarr[] = {
kEEm07,
kEEm08,
kEEm02,
kEEm03,
kEBm01,
kEBm02,
kEBm03,
kEBm04,
kEBm05,
kEBm06,
kEBm07,
9 kEBm08,
kEBm09,
kEBm10,
kEBm11,
kEBm12,
kEBm13,
kEBm14,
kEBm15,
kEBm16,
kEBm17,
kEBm18,
10 kEBp01,
kEBp02,
kEBp03,
kEBp04,
kEBp05,
kEBp06,
kEBp07,
kEBp08,
kEBp09,
kEBp10,
kEBp11,
11 kEBp12,
kEBp13,
kEBp14,
kEBp15,
kEBp16,
kEBp17,
kEBp18,
kEEp07,
kEEp08,
kEEp02,
kEEp03};
29 return map->getElectronicsId(
EEDetId(_id)).dccId();
33 throw cms::Exception(
"InvalidDetId") <<
"EcalDQMCommonUtils::dccId(" << _id.
rawId() <<
")" << std::endl;
43 if (_index >=
memDCC.size())
45 return memDCC.at(_index) + 1;
69 return map->getTriggerElectronicsId(
EEDetId(_id)).tccId();
72 throw cms::Exception(
"InvalidDetId") <<
"EcalDQMCommonUtils::tccId(" << uint32_t(_id) <<
")" << std::endl;
93 throw cms::Exception(
"InvalidDetId") <<
"EcalDQMCommonUtils::towerId(" << std::hex << uint32_t(_id) <<
")"
111 throw cms::Exception(
"InvalidDetId") <<
"EcalDQMCommonUtils::ttId(" << std::hex << uint32_t(_id) <<
")"
122 if ((ic - 1) / 20 > 4 && (ic - 1) % 20 < 10)
125 unsigned iDCC(
dccId(_id) - 1);
133 std::pair<unsigned, unsigned>
innerTCCs(
unsigned _dccId) {
134 int iDCC(_dccId - 1);
135 std::pair<unsigned, unsigned>
res;
142 res.first =
res.second = _dccId + 27;
153 std::pair<unsigned, unsigned>
outerTCCs(
unsigned _dccId) {
154 int iDCC(_dccId - 1);
155 std::pair<unsigned, unsigned>
res;
162 res.first =
res.second = _dccId + 27;
174 std::vector<DetId>
res;
176 int ixbase((_scid.
ix() - 1) * 5);
177 int iybase((_scid.
iy() - 1) * 5);
179 for (
int ix(1); ix <= 5; ++ix) {
180 for (
int iy(1); iy <= 5; ++iy) {
194 return (((rawId >> 16) & 0
x1) == 1 ? 1 : -1);
196 return (((rawId >> 14) & 0
x1) == 1 ? 1 : -1);
198 return (((rawId >> 15) & 0
x1) == 1 ? 1 : -1);
200 return (((rawId >> 4) & 0x7f) >
kEBpLow ? 1 : -1);
203 <<
"EcalDQMCommonUtils::zside(" << std::hex << uint32_t(_id) <<
")" << std::endl;
216 const double degToRad(0.0174533);
217 return (_ebid.
iphi() - 10.5) * degToRad;
221 const double degToRad(0.0174533);
222 double p(std::atan2(_eeid.
ix() - 50.5, _eeid.
iy() - 50.5));
223 if (
p < -10. * degToRad)
224 p += 360. * degToRad;
229 const double degToRad(0.0174533);
230 double p((_ttid.
iphi() - 0.5) * 5. * degToRad);
231 if (
p > 350. * degToRad)
232 p -= 360. * degToRad;
237 const double degToRad(0.0174533);
238 if (_phi < -10. * degToRad)
239 _phi += 360. * degToRad;
250 return (scid.
ix() - 10) * (scid.
ix() - 10) + (scid.
iy() - 10) * (scid.
iy() - 10) < 25.;
253 return (eeid.
ix() - 50) * (eeid.
ix() - 50) + (eeid.
iy() - 50) * (eeid.
iy() - 50) < 625.;
275 unsigned smNumber(std::atoi(_smName.substr(3).c_str()));
277 if (_smName.find(
"EE-") == 0)
278 return kEEmLow + 1 + ((smNumber + 2) % 9);
279 else if (_smName.find(
"EB-") == 0)
281 else if (_smName.find(
"EB+") == 0)
283 else if (_smName.find(
"EE+") == 0)
284 return kEEpLow + 1 + ((smNumber + 2) % 9);
290 std::stringstream
ss;
292 unsigned iSM(_dccId - 1);
295 ss <<
"EE-" << std::setw(2) << std::setfill(
'0') << (((iSM -
kEEmLow + 6) % 9) + 1);
297 ss <<
"EB-" << std::setw(2) << std::setfill(
'0') << (iSM -
kEBmLow + 1);
299 ss <<
"EB+" << std::setw(2) << std::setfill(
'0') << (iSM -
kEBpLow + 1);
301 ss <<
"EE+" << std::setw(2) << std::setfill(
'0') << (((iSM -
kEEpLow + 6) % 9) + 1);
307 unsigned EEPnDCC(
unsigned _dee,
unsigned _ab) {
335 unsigned iSM(_dccId - 1);
370 unsigned iSM(_dccId - 1);
404 if (_towerId == 69 || _towerId == 70)
406 else if ((_dccId == 8 || _dccId == 53) && _towerId >= 18 && _towerId <= 24)
408 else if (_dccId <= kEEmHigh + 1 || _dccId >=
kEEpLow + 1)
411 return _towerId <= 68;
434 throw cms::Exception(
"InvalidCall") <<
"ElectronicsMapping not initialized";
454 throw cms::Exception(
"InvalidCall") <<
"TrigTowerConstituentsMap not initialized";
474 throw cms::Exception(
"InvalidCall") <<
"CaloGeometry not initialized";
494 throw cms::Exception(
"InvalidCall") <<
"CaloTopology not initialized";
static const float crystalUnitToEta
const CaloTopology * getTopology()
unsigned tccId(DetId const &)
int iphi() const
get the tower iphi
std::pair< unsigned, unsigned > outerTCCs(unsigned)
int tccId() const
get the DCC (Ecal Local DCC value not global one) id
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
int iTT(const EcalTrigTowerDetId &id) const
returns the index of a Trigger Tower within its TCC.
const EcalTrigTowerConstituentsMap * trigtowerMap(nullptr)
constexpr Detector det() const
get the detector field from this detid
unsigned nSuperCrystals(unsigned)
const CaloGeometry * geometry(nullptr)
unsigned ttId(DetId const &)
unsigned memDCCIndex(unsigned)
bool isEndcapTTId(DetId const &)
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
int iTT() const
sequential index within one DCC
bool isForward(DetId const &)
int ttId() const
get the tower id
int towerId() const
get the tower id
int zside() const
get the z-side of the crystal (1/-1)
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
const EcalElectronicsMapping * electronicsMap(nullptr)
const CaloTopology * topology(nullptr)
bool checkElectronicsMap(bool=true)
bool ccuExists(unsigned, unsigned)
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
const CaloGeometry * getGeometry()
unsigned memDCCId(unsigned)
unsigned rtHalf(DetId const &)
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
void setTopology(CaloTopology const *)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
std::pair< int, int > getDCCandSC(EcalScDetId id) const
unsigned EEPnDCC(unsigned _dee, unsigned _ab)
int iDCCId() const
get the DCCId
bool checkTopology(bool=true)
unsigned nCrystals(unsigned)
bool isSingleChannelId(DetId const &)
void setGeometry(CaloGeometry const *)
bool isEcalScDetId(DetId const &)
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
std::vector< std::pair< float, float > >::iterator itr
bool checkTrigTowerMap(bool=true)
const EcalTrigTowerConstituentsMap * getTrigTowerMap()
const std::vector< unsigned > memDCC
std::vector< DetId > scConstituents(EcalScDetId const &)
unsigned towerId(DetId const &)
constexpr uint32_t rawId() const
get the raw id
bool checkGeometry(bool=true)
std::string smName(unsigned)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
int iphi() const
get the crystal iphi
bool isCrystalId(DetId const &)
std::pair< unsigned, unsigned > innerTCCs(unsigned)
const EcalElectronicsMapping * getElectronicsMap()
void setTrigTowerMap(EcalTrigTowerConstituentsMap const *)
void setElectronicsMap(EcalElectronicsMapping const *)
double phi(EBDetId const &)
double eta(EBDetId const &)
unsigned dccId(DetId const &)