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() <<
")";
637 ss <<
" (EBTT ieta " << std::showpos << ttid.
ieta() << std::noshowpos <<
" iphi " << ttid.
iphi() <<
")";
640 ss <<
" (EESC ix " << scid.
ix() <<
" iy " << scid.
iy() <<
")";
646 int tccid(_rawId -
nDCC);
648 ss <<
smName(dccid) <<
" TCC " << (_rawId -
nDCC);
664 "(EB|EE)([+-][0-9][0-9])(?: TCC ([0-9]+)| DCC ([0-9]+) (CCU|TCC) " 665 "([0-9]+)(?: (TT|strip|PN) ([0-9]+)(?: xtal ([0-9]+)|)|)|)");
669 TObjArray *
matches(re.MatchS(name));
671 if (
matches->GetEntries() == 0)
673 else if (
matches->GetEntries() == 3) {
674 TString subdet(static_cast<TObjString *>(
matches->At(1))->GetString());
675 if (subdet ==
"EB") {
676 int dccid(static_cast<TObjString *>(
matches->At(2))->GetString().Atoi());
683 rawId = (dccid + 2) % 9 + 1 + offset;
685 int dccid(static_cast<TObjString *>(
matches->At(2))->GetString().Atoi());
692 }
else if (
matches->GetEntries() == 4)
693 rawId = static_cast<TObjString *>(
matches->At(3))->GetString().Atoi() +
nDCC;
695 TString subtype(static_cast<TObjString *>(
matches->At(5))->GetString());
696 if (subtype ==
"TCC") {
697 int tccid(static_cast<TObjString *>(
matches->At(6))->GetString().Atoi());
698 int ttid(static_cast<TObjString *>(
matches->At(8))->GetString().Atoi());
701 int dccid(static_cast<TObjString *>(
matches->At(4))->GetString().Atoi());
702 int towerid(static_cast<TObjString *>(
matches->At(6))->GetString().Atoi());
703 if (
matches->GetEntries() == 7)
706 TString chType(static_cast<TObjString *>(
matches->At(7))->GetString());
707 int stripOrPNid(static_cast<TObjString *>(
matches->At(8))->GetString().Atoi());
710 else if (chType ==
"strip") {
711 int xtalid(static_cast<TObjString *>(
matches->At(9))->GetString().Atoi());
727 int ieta(_bin / 362 - 86);
730 return EBDetId(ieta, _bin % 362);
732 int ieta(_bin / 74 - 17);
740 }
else if (_otype ==
kEEm || _otype ==
kEEp) {
741 int z(_otype ==
kEEm ? -1 : 1);
746 }
else if (_otype ==
kEE) {
749 int z(ix > 100 ? 1 : -1);
751 ix = (ix - 100) % 101;
755 int z(ix > 20 ? 1 : -1);
760 }
else if (_otype ==
kSM || _otype ==
kEBSM || _otype ==
kEESM) {
771 int iphi(((iSM - 9) % 18) * 20 + (z < 0 ? _bin / 87 : 21 - _bin / 87));
772 int ieta((_bin % 87) * z);
775 int iphi((((iSM - 9) % 18) * 4 + (z < 0 ? _bin / 19 : 5 - _bin / 19) + 69) % 72 + 1);
804 if (_axisParams.
existsAs<std::vector<double>>(
"edges",
false)) {
806 axis.
nbins = vEdges.size() - 1;
807 axis.
edges =
new float[vEdges.size()];
812 bool highSet(_axisParams.
existsAs<
double>(
"high",
false));
813 bool perBinSet(_axisParams.
existsAs<
double>(
"unitsPerBin",
false));
816 edm::LogWarning(
"EcalDQM") <<
"Maximum and bin width both set in an axis; using the former";
818 }
else if (perBinSet)
824 if (_axisParams.
existsAs<std::vector<std::string>>(
"labels",
false)) {
826 if (
int(labels.size()) == axis.
nbins) {
828 for (
int iB(0); iB != axis.
nbins; ++iB)
829 axis.
labels[iB] = labels[iB];
850 if (_otypeName ==
"EB")
852 else if (_otypeName ==
"EE")
854 else if (_otypeName ==
"EEm")
856 else if (_otypeName ==
"EEp")
858 else if (_otypeName ==
"SM")
860 else if (_otypeName ==
"EBSM")
862 else if (_otypeName ==
"EESM")
864 else if (_otypeName ==
"SMMEM")
866 else if (_otypeName ==
"EBSMMEM")
868 else if (_otypeName ==
"EESMMEM")
870 else if (_otypeName ==
"Ecal")
872 else if (_otypeName ==
"MEM")
874 else if (_otypeName ==
"EBMEM")
876 else if (_otypeName ==
"EEMEM")
878 else if (_otypeName ==
"Ecal2P")
880 else if (_otypeName ==
"Ecal3P")
882 else if (_otypeName ==
"EE2P")
884 else if (_otypeName ==
"MEM2P")
886 else if (_otypeName ==
"Channel")
888 else if (_otypeName ==
"None")
891 throw cms::Exception(
"InvalidConfiguration") <<
"No object type " << _otypeName <<
" defined";
895 if (_btypeName ==
"Crystal")
897 else if (_btypeName ==
"TriggerTower")
899 else if (_btypeName ==
"SuperCrystal")
901 else if (_btypeName ==
"PseudoStrip")
903 else if (_btypeName ==
"TCC")
905 else if (_btypeName ==
"DCC")
907 else if (_btypeName ==
"ProjEta")
909 else if (_btypeName ==
"ProjPhi")
911 else if (_btypeName ==
"RCT")
913 else if (_btypeName ==
"User")
915 else if (_btypeName ==
"Report")
917 else if (_btypeName ==
"Trend")
920 throw cms::Exception(
"InvalidConfiguration") <<
"No binning type " << _btypeName <<
" defined";
924 if (_kindName ==
"REAL")
926 else if (_kindName ==
"TH1F")
928 else if (_kindName ==
"TProfile")
930 else if (_kindName ==
"TH2F")
932 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)
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)
bin
set the eta bin as selection string.
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 &)
MonitorElement::Kind translateKind(std::string const &)
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)