65 unsigned tccid(
tccId(_id));
66 if (tccid <= 36 || tccid >= 73) {
68 bool outer((tccid >= 19 && tccid <= 36) || (tccid >= 73 && tccid <= 90));
88 else if (_btype ==
kTCC)
94 return dccId(_id) - 9;
95 else if (_btype ==
kTCC)
96 return tccId(_id) - 36;
102 else if (_btype ==
kTCC)
108 return dccId(_id) - 45;
109 else if (_btype ==
kTCC)
110 return tccId(_id) - 72;
114 if (_btype ==
kDCC) {
119 }
else if (_btype ==
kTCC) {
148 unsigned tccid(
tccId(_id));
149 if (tccid <= 36 || tccid >= 73) {
151 bool outer((tccid >= 19 && tccid <= 36) || (tccid >= 73 && tccid <= 90));
171 else if (_btype ==
kTCC)
177 return dccId(_id) - 9;
178 else if (_btype ==
kTCC)
179 return tccId(_id) - 36;
185 else if (_btype ==
kTCC)
191 return dccId(_id) - 45;
192 else if (_btype ==
kTCC)
193 return tccId(_id) - 72;
197 if (_btype ==
kDCC) {
202 }
else if (_btype ==
kTCC) {
219 else if (_otype ==
kEcal && _btype ==
kTCC)
221 if (_otype ==
kEB && _btype ==
kDCC)
222 return _dcctccid - 9;
223 else if (_otype ==
kEB && _btype ==
kTCC)
224 return _dcctccid - 36;
225 else if (_otype ==
kEEm && _btype ==
kDCC)
227 else if (_otype ==
kEEm && _btype ==
kTCC)
229 else if (_otype ==
kEEp && _btype ==
kDCC)
230 return _dcctccid - 45;
231 else if (_otype ==
kEEp && _btype ==
kTCC)
232 return _dcctccid - 72;
233 else if (_otype ==
kEE && _btype ==
kDCC)
234 return _dcctccid <= 9 ? _dcctccid : _dcctccid - 36;
235 else if (_otype ==
kEE && _btype ==
kTCC)
236 return _dcctccid <= 36 ? _dcctccid : _dcctccid - 36;
287 unsigned iDCC(_dccid - 1);
289 if (iDCC <= kEEmHigh || iDCC >=
kEEpLow)
290 xbin = (iDCC + 6) % nbinsX + 1;
292 xbin = iDCC % nbinsX + 1;
293 int ybin(6 - iDCC / nbinsX);
295 return (nbinsX + 2) * ybin + xbin;
336 unsigned iDCC(
dccId(_id) - 1);
360 int iSM(_dcctccid - 1);
393 if (_btype ==
kDCC) {
394 if (iSM <= kEEmHigh || iSM >=
kEEpLow)
398 }
else if (_btype ==
kTCC) {
411 if (_btype ==
kDCC) {
418 }
else if (_btype ==
kTCC) {
435 if (_btype ==
kDCC) {
448 if (_btype ==
kDCC) {
449 if (iSM <= kEEmHigh || iSM >=
kEEpLow)
453 }
else if (_btype ==
kTCC)
539 if (_otype ==
kEEm || _otype ==
kEEp) {
544 }
else if (_otype ==
kEE) {
548 ix = (ix - 100) % 101;
556 }
else if (_otype ==
kSM || _otype ==
kEESM) {
570 int ix(_bin % (nX + 2) +
xlow_(iSM));
571 int iy(_bin / (nX + 2) +
ylow_(iSM));
580 int ix(_bin % (nX + 2) +
xlow_(iSM) / 5);
581 int iy(_bin / (nX + 2) +
ylow_(iSM) / 5);
598 std::stringstream
ss;
613 ss <<
" (EB ieta " << std::showpos << ebid.
ieta() << std::noshowpos <<
" iphi " << ebid.
iphi() <<
")";
616 ss <<
" (EE ix " << eeid.
ix() <<
" iy " << eeid.
iy() <<
")";
638 ss <<
" (EBTT ieta " << std::showpos << ttid.
ieta() << std::noshowpos <<
" iphi " << ttid.
iphi() <<
")";
641 ss <<
" (EESC ix " << scid.
ix() <<
" iy " << scid.
iy() <<
")";
647 int tccid(_rawId -
nDCC);
649 ss <<
smName(dccid) <<
" TCC " << (_rawId -
nDCC);
665 "(EB|EE)([+-][0-9][0-9])(?: TCC ([0-9]+)| DCC ([0-9]+) (CCU|TCC) " 666 "([0-9]+)(?: (TT|strip|PN) ([0-9]+)(?: xtal ([0-9]+)|)|)|)");
670 TObjArray *
matches(re.MatchS(name));
672 if (
matches->GetEntries() == 0)
674 else if (
matches->GetEntries() == 3) {
675 TString subdet(static_cast<TObjString *>(
matches->At(1))->GetString());
676 if (subdet ==
"EB") {
677 int dccid(static_cast<TObjString *>(
matches->At(2))->GetString().Atoi());
684 rawId = (dccid + 2) % 9 + 1 + offset;
686 int dccid(static_cast<TObjString *>(
matches->At(2))->GetString().Atoi());
693 }
else if (
matches->GetEntries() == 4)
694 rawId = static_cast<TObjString *>(
matches->At(3))->GetString().Atoi() +
nDCC;
696 TString subtype(static_cast<TObjString *>(
matches->At(5))->GetString());
697 if (subtype ==
"TCC") {
698 int tccid(static_cast<TObjString *>(
matches->At(6))->GetString().Atoi());
699 int ttid(static_cast<TObjString *>(
matches->At(8))->GetString().Atoi());
702 int dccid(static_cast<TObjString *>(
matches->At(4))->GetString().Atoi());
703 int towerid(static_cast<TObjString *>(
matches->At(6))->GetString().Atoi());
704 if (
matches->GetEntries() == 7)
707 TString chType(static_cast<TObjString *>(
matches->At(7))->GetString());
708 int stripOrPNid(static_cast<TObjString *>(
matches->At(8))->GetString().Atoi());
711 else if (chType ==
"strip") {
712 int xtalid(static_cast<TObjString *>(
matches->At(9))->GetString().Atoi());
728 int ieta(_bin / 362 - 86);
731 return EBDetId(ieta, _bin % 362);
733 int ieta(_bin / 74 - 17);
741 }
else if (_otype ==
kEEm || _otype ==
kEEp) {
742 int z(_otype ==
kEEm ? -1 : 1);
747 }
else if (_otype ==
kEE) {
750 int z(ix > 100 ? 1 : -1);
752 ix = (ix - 100) % 101;
756 int z(ix > 20 ? 1 : -1);
761 }
else if (_otype ==
kSM || _otype ==
kEBSM || _otype ==
kEESM) {
772 int iphi(((iSM - 9) % 18) * 20 + (z < 0 ? _bin / 87 : 21 - _bin / 87));
773 int ieta((_bin % 87) * z);
776 int iphi((((iSM - 9) % 18) * 4 + (z < 0 ? _bin / 19 : 5 - _bin / 19) + 69) % 72 + 1);
805 if (_axisParams.
existsAs<std::vector<double>>(
"edges",
false)) {
807 axis.
nbins = vEdges.size() - 1;
808 axis.
edges =
new float[vEdges.size()];
813 bool highSet(_axisParams.
existsAs<
double>(
"high",
false));
814 bool perBinSet(_axisParams.
existsAs<
double>(
"unitsPerBin",
false));
817 edm::LogWarning(
"EcalDQM") <<
"Maximum and bin width both set in an axis; using the former";
819 }
else if (perBinSet)
825 if (_axisParams.
existsAs<std::vector<std::string>>(
"labels",
false)) {
827 if (
int(labels.size()) == axis.
nbins) {
829 for (
int iB(0); iB != axis.
nbins; ++iB)
830 axis.
labels[iB] = labels[iB];
851 if (_otypeName ==
"EB")
853 else if (_otypeName ==
"EE")
855 else if (_otypeName ==
"EEm")
857 else if (_otypeName ==
"EEp")
859 else if (_otypeName ==
"SM")
861 else if (_otypeName ==
"EBSM")
863 else if (_otypeName ==
"EESM")
865 else if (_otypeName ==
"SMMEM")
867 else if (_otypeName ==
"EBSMMEM")
869 else if (_otypeName ==
"EESMMEM")
871 else if (_otypeName ==
"Ecal")
873 else if (_otypeName ==
"MEM")
875 else if (_otypeName ==
"EBMEM")
877 else if (_otypeName ==
"EEMEM")
879 else if (_otypeName ==
"Ecal2P")
881 else if (_otypeName ==
"Ecal3P")
883 else if (_otypeName ==
"EE2P")
885 else if (_otypeName ==
"MEM2P")
887 else if (_otypeName ==
"Channel")
889 else if (_otypeName ==
"None")
892 throw cms::Exception(
"InvalidConfiguration") <<
"No object type " << _otypeName <<
" defined";
896 if (_btypeName ==
"Crystal")
898 else if (_btypeName ==
"TriggerTower")
900 else if (_btypeName ==
"SuperCrystal")
902 else if (_btypeName ==
"PseudoStrip")
904 else if (_btypeName ==
"TCC")
906 else if (_btypeName ==
"DCC")
908 else if (_btypeName ==
"ProjEta")
910 else if (_btypeName ==
"ProjPhi")
912 else if (_btypeName ==
"RCT")
914 else if (_btypeName ==
"User")
916 else if (_btypeName ==
"Report")
918 else if (_btypeName ==
"Trend")
921 throw cms::Exception(
"InvalidConfiguration") <<
"No binning type " << _btypeName <<
" defined";
925 if (_kindName ==
"REAL")
927 else if (_kindName ==
"TH1F")
929 else if (_kindName ==
"TProfile")
931 else if (_kindName ==
"TH2F")
933 else if (_kindName ==
"TProfile2D")
static bool validDetId(int ix, int iy, int iz)
int findBinCrystal_(ObjectType, DetId const &, int=-1)
unsigned memDCCIndex(unsigned)
T getUntrackedParameter(std::string const &, T const &) const
int findBinRCT_(ObjectType, DetId const &)
int findBinTriggerTower_(ObjectType, DetId const &)
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
int tccId() const
get the DCC (Ecal Local DCC value not global one) id
int xtalId() const
get the channel id
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
int stripId() const
get the tower id
bool isValidIdBin(ObjectType, BinningType, unsigned, int)
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
unsigned getNObjects(ObjectType)
EcalElectronicsMapping const * getElectronicsMap()
constexpr uint32_t rawId() const
get the raw id
unsigned tccId(DetId const &)
int towerId() const
get the tower id
ObjectType getObject(ObjectType, unsigned)
unsigned ttId(DetId const &)
int channelId() const
get the channel id
int ieta() const
get the tower ieta
ObjectType translateObjectType(std::string const &)
int iphi() const
get the crystal iphi
AxisSpecs getBinning(ObjectType, BinningType, bool, int, unsigned)
bool isEndcapTTId(DetId const &)
int iPnId() const
get the PnId
int findBinSuperCrystal_(ObjectType, DetId const &, int=-1)
dqm::legacy::MonitorElement::Kind translateKind(std::string const &)
int ttId() const
get the tower id
AxisSpecs getBinningSMMEM_(BinningType, bool, unsigned, int)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
ParameterDescriptionNode * addOptionalNode(ParameterDescriptionNode const &node, bool writeToCfi)
AxisSpecs getBinningEB_(BinningType, bool, int)
int ieta() const
get the crystal ieta
uint32_t idFromName(std::string const &)
int pseudoStripId() const
get the tower id
AxisSpecs getBinningSM_(BinningType, bool, unsigned, int)
int findBin1D(ObjectType, BinningType, DetId const &)
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
unsigned towerId(DetId const &)
std::string channelName(uint32_t, BinningType _btype=kDCC)
int iphi() const
get the tower iphi
std::string smName(unsigned)
int findBin2D(ObjectType, BinningType, DetId const &)
unsigned findPlotIndex(ObjectType, DetId const &)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
AxisSpecs getBinningEE_(BinningType, bool, int, int)
void fillAxisDescriptions(edm::ParameterSetDescription &)
int findBinPseudoStrip_(ObjectType, DetId const &)
ParameterDescriptionBase * addOptionalUntracked(U const &iLabel, T const &value)
BinningType translateBinningType(std::string const &)
AxisSpecs formAxis(edm::ParameterSet const &)
AxisSpecs getBinningMEM_(BinningType, bool, int, int)
unsigned dccId(DetId const &)
AxisSpecs getBinningEcal_(BinningType, bool, int)
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
uint32_t idFromBin(ObjectType, BinningType, unsigned, int)