10 #include "TObjArray.h"
33 return getBinningSM_(_btype, _isMap, _iME, _axis, electronicsMap);
35 return getBinningSM_(_btype, _isMap, _iME + 9, _axis, electronicsMap);
38 return getBinningSM_(_btype, _isMap, _iME, _axis, electronicsMap);
72 return towerId(_id, electronicsMap);
74 unsigned tccid(
tccId(_id, electronicsMap));
75 if (tccid <= 36 || tccid >= 73) {
76 unsigned bin(
ttId(_id, electronicsMap));
77 bool outer((tccid >= 19 && tccid <= 36) || (tccid >= 73 && tccid <= 90));
91 return ttId(_id, electronicsMap);
96 return dccId(_id, electronicsMap);
97 else if (_btype ==
kTCC)
98 return tccId(_id, electronicsMap);
103 return dccId(_id, electronicsMap) - 9;
104 else if (_btype ==
kTCC)
105 return tccId(_id, electronicsMap) - 36;
110 return dccId(_id, electronicsMap);
111 else if (_btype ==
kTCC)
112 return tccId(_id, electronicsMap);
117 return dccId(_id, electronicsMap) - 45;
118 else if (_btype ==
kTCC)
119 return tccId(_id, electronicsMap) - 72;
123 if (_btype ==
kDCC) {
124 int bin(
dccId(_id, electronicsMap));
128 }
else if (_btype ==
kTCC) {
129 int bin(
tccId(_id, electronicsMap));
160 unsigned tccid(
tccId(_id, electronicsMap));
161 if (tccid <= 36 || tccid >= 73) {
162 unsigned bin(
ttId(_id, electronicsMap));
163 bool outer((tccid >= 19 && tccid <= 36) || (tccid >= 73 && tccid <= 90));
177 return ttId(_id, electronicsMap);
183 else if (_btype ==
kTCC)
184 return tccId(_id, electronicsMap);
189 return dccId(_id) - 9;
190 else if (_btype ==
kTCC)
191 return tccId(_id, electronicsMap) - 36;
197 else if (_btype ==
kTCC)
198 return tccId(_id, electronicsMap);
203 return dccId(_id) - 45;
204 else if (_btype ==
kTCC)
205 return tccId(_id, electronicsMap) - 72;
209 if (_btype ==
kDCC) {
214 }
else if (_btype ==
kTCC) {
215 int bin(
tccId(_id, electronicsMap));
231 else if (_otype ==
kEcal && _btype ==
kTCC)
233 if (_otype ==
kEB && _btype ==
kDCC)
234 return _dcctccid - 9;
235 else if (_otype ==
kEB && _btype ==
kTCC)
236 return _dcctccid - 36;
237 else if (_otype ==
kEEm && _btype ==
kDCC)
239 else if (_otype ==
kEEm && _btype ==
kTCC)
241 else if (_otype ==
kEEp && _btype ==
kDCC)
242 return _dcctccid - 45;
243 else if (_otype ==
kEEp && _btype ==
kTCC)
244 return _dcctccid - 72;
245 else if (_otype ==
kEE && _btype ==
kDCC)
246 return _dcctccid <= 9 ? _dcctccid : _dcctccid - 36;
247 else if (_otype ==
kEE && _btype ==
kTCC)
248 return _dcctccid <= 36 ? _dcctccid : _dcctccid - 36;
305 unsigned iDCC(_dccid - 1);
307 if (iDCC <= kEEmHigh || iDCC >=
kEEpLow)
308 xbin = (iDCC + 6) %
nbinsX + 1;
311 int ybin(6 - iDCC /
nbinsX);
313 return (
nbinsX + 2) * ybin + xbin;
354 unsigned iDCC(
dccId(_id, electronicsMap) - 1);
383 int iSM(_dcctccid - 1);
389 : iSM >=
kEEpTCCLow ? (iSM + 1 - 72) % 18 / 2 + 45
417 if (_btype ==
kDCC) {
418 if (iSM <= kEEmHigh || iSM >=
kEEpLow)
422 }
else if (_btype ==
kTCC) {
435 if (_btype ==
kDCC) {
442 }
else if (_btype ==
kTCC) {
459 if (_btype ==
kDCC) {
472 if (_btype ==
kDCC) {
473 if (iSM <= kEEmHigh || iSM >=
kEEpLow)
477 }
else if (_btype ==
kTCC)
564 if (_otype ==
kEEm || _otype ==
kEEp) {
569 }
else if (_otype ==
kEE) {
573 ix = (ix - 100) % 101;
581 }
else if (_otype ==
kSM || _otype ==
kEESM) {
595 int ix(_bin % (nX + 2) +
xlow_(iSM));
596 int iy(_bin / (nX + 2) +
ylow_(iSM));
605 int ix(_bin % (nX + 2) +
xlow_(iSM) / 5);
606 int iy(_bin / (nX + 2) +
ylow_(iSM) / 5);
625 std::stringstream
ss;
632 if (
eid.towerId() >= 69)
633 ss <<
smName(
eid.dccId()) <<
" DCC " <<
eid.dccId() <<
" CCU " <<
eid.towerId() <<
" PN " <<
eid.xtalId();
635 ss <<
smName(
eid.dccId()) <<
" DCC " <<
eid.dccId() <<
" CCU " <<
eid.towerId() <<
" strip "
636 <<
eid.stripId() <<
" xtal " <<
eid.xtalId();
640 ss <<
" (EB ieta " << std::showpos << ebid.ieta() << std::noshowpos <<
" iphi " << ebid.iphi() <<
")";
643 ss <<
" (EE ix " << eeid.ix() <<
" iy " << eeid.iy() <<
")";
646 ss <<
" (TCC " << teid.tccId() <<
" TT " << teid.ttId() <<
" pstrip " << teid.pseudoStripId() <<
" chan "
647 << teid.channelId() <<
")";
665 ss <<
" (EBTT ieta " << std::showpos << ttid.ieta() << std::noshowpos <<
" iphi " << ttid.iphi() <<
")";
668 ss <<
" (EESC ix " << scid.ix() <<
" iy " << scid.iy() <<
")";
674 int tccid(_rawId -
nDCC);
692 "(EB|EE)([+-][0-9][0-9])(?: TCC ([0-9]+)| DCC ([0-9]+) (CCU|TCC) "
693 "([0-9]+)(?: (TT|strip|PN) ([0-9]+)(?: xtal ([0-9]+)|)|)|)");
699 if (
matches->GetEntries() == 0)
701 else if (
matches->GetEntries() == 3) {
702 TString subdet(static_cast<TObjString *>(
matches->At(1))->GetString());
703 if (subdet ==
"EB") {
704 int dccid(static_cast<TObjString *>(
matches->At(2))->GetString().Atoi());
711 rawId = (dccid + 2) % 9 + 1 +
offset;
713 int dccid(static_cast<TObjString *>(
matches->At(2))->GetString().Atoi());
720 }
else if (
matches->GetEntries() == 4)
721 rawId = static_cast<TObjString *>(
matches->At(3))->GetString().Atoi() +
nDCC;
723 TString subtype(static_cast<TObjString *>(
matches->At(5))->GetString());
724 if (subtype ==
"TCC") {
725 int tccid(static_cast<TObjString *>(
matches->At(6))->GetString().Atoi());
726 int ttid(static_cast<TObjString *>(
matches->At(8))->GetString().Atoi());
729 int dccid(static_cast<TObjString *>(
matches->At(4))->GetString().Atoi());
730 int towerid(static_cast<TObjString *>(
matches->At(6))->GetString().Atoi());
731 if (
matches->GetEntries() == 7)
734 TString chType(static_cast<TObjString *>(
matches->At(7))->GetString());
735 int stripOrPNid(static_cast<TObjString *>(
matches->At(8))->GetString().Atoi());
738 else if (chType ==
"strip") {
739 int xtalid(static_cast<TObjString *>(
matches->At(9))->GetString().Atoi());
755 int ieta(_bin / 362 - 86);
760 int ieta(_bin / 74 - 17);
768 }
else if (_otype ==
kEEm || _otype ==
kEEp) {
769 int z(_otype ==
kEEm ? -1 : 1);
774 }
else if (_otype ==
kEE) {
777 int z(ix > 100 ? 1 : -1);
779 ix = (ix - 100) % 101;
783 int z(ix > 20 ? 1 : -1);
788 }
else if (_otype ==
kSM || _otype ==
kEBSM || _otype ==
kEESM) {
799 int iphi(((iSM - 9) % 18) * 20 + (z < 0 ? _bin / 87 : 21 - _bin / 87));
800 int ieta((_bin % 87) * z);
803 int iphi((((iSM - 9) % 18) * 4 + (z < 0 ? _bin / 19 : 5 - _bin / 19) + 69) % 72 + 1);
832 if (_axisParams.
existsAs<std::vector<double>>(
"edges",
false)) {
834 axis.
nbins = vEdges.size() - 1;
835 axis.
edges =
new float[vEdges.size()];
840 bool highSet(_axisParams.
existsAs<
double>(
"high",
false));
841 bool perBinSet(_axisParams.
existsAs<
double>(
"unitsPerBin",
false));
844 edm::LogWarning(
"EcalDQM") <<
"Maximum and bin width both set in an axis; using the former";
846 }
else if (perBinSet)
852 if (_axisParams.
existsAs<std::vector<std::string>>(
"labels",
false)) {
856 for (
int iB(0); iB != axis.
nbins; ++iB)
878 if (_otypeName ==
"EB")
880 else if (_otypeName ==
"EE")
882 else if (_otypeName ==
"EEm")
884 else if (_otypeName ==
"EEp")
886 else if (_otypeName ==
"SM")
888 else if (_otypeName ==
"EBSM")
890 else if (_otypeName ==
"EESM")
892 else if (_otypeName ==
"SMMEM")
894 else if (_otypeName ==
"EBSMMEM")
896 else if (_otypeName ==
"EESMMEM")
898 else if (_otypeName ==
"Ecal")
900 else if (_otypeName ==
"MEM")
902 else if (_otypeName ==
"EBMEM")
904 else if (_otypeName ==
"EEMEM")
906 else if (_otypeName ==
"Ecal2P")
908 else if (_otypeName ==
"Ecal3P")
910 else if (_otypeName ==
"EE2P")
912 else if (_otypeName ==
"MEM2P")
914 else if (_otypeName ==
"Channel")
916 else if (_otypeName ==
"None")
919 throw cms::Exception(
"InvalidConfiguration") <<
"No object type " << _otypeName <<
" defined";
923 if (_btypeName ==
"Crystal")
925 else if (_btypeName ==
"TriggerTower")
927 else if (_btypeName ==
"SuperCrystal")
929 else if (_btypeName ==
"PseudoStrip")
931 else if (_btypeName ==
"TCC")
933 else if (_btypeName ==
"DCC")
935 else if (_btypeName ==
"ProjEta")
937 else if (_btypeName ==
"ProjPhi")
939 else if (_btypeName ==
"RCT")
941 else if (_btypeName ==
"User")
943 else if (_btypeName ==
"Report")
945 else if (_btypeName ==
"Trend")
948 throw cms::Exception(
"InvalidConfiguration") <<
"No binning type " << _btypeName <<
" defined";
952 if (_kindName ==
"REAL")
954 else if (_kindName ==
"TH1F")
956 else if (_kindName ==
"TProfile")
958 else if (_kindName ==
"TH2F")
960 else if (_kindName ==
"TProfile2D")