10 #include "TObjArray.h"
66 unsigned tccid(
tccId(_id));
67 if (tccid <= 36 || tccid >= 73) {
69 bool outer((tccid >= 19 && tccid <= 36) || (tccid >= 73 && tccid <= 90));
89 else if (_btype ==
kTCC)
95 return dccId(_id) - 9;
96 else if (_btype ==
kTCC)
97 return tccId(_id) - 36;
103 else if (_btype ==
kTCC)
109 return dccId(_id) - 45;
110 else if (_btype ==
kTCC)
111 return tccId(_id) - 72;
115 if (_btype ==
kDCC) {
120 }
else if (_btype ==
kTCC) {
149 unsigned tccid(
tccId(_id));
150 if (tccid <= 36 || tccid >= 73) {
152 bool outer((tccid >= 19 && tccid <= 36) || (tccid >= 73 && tccid <= 90));
172 else if (_btype ==
kTCC)
178 return dccId(_id) - 9;
179 else if (_btype ==
kTCC)
180 return tccId(_id) - 36;
186 else if (_btype ==
kTCC)
192 return dccId(_id) - 45;
193 else if (_btype ==
kTCC)
194 return tccId(_id) - 72;
198 if (_btype ==
kDCC) {
203 }
else if (_btype ==
kTCC) {
220 else if (_otype ==
kEcal && _btype ==
kTCC)
222 if (_otype ==
kEB && _btype ==
kDCC)
223 return _dcctccid - 9;
224 else if (_otype ==
kEB && _btype ==
kTCC)
225 return _dcctccid - 36;
226 else if (_otype ==
kEEm && _btype ==
kDCC)
228 else if (_otype ==
kEEm && _btype ==
kTCC)
230 else if (_otype ==
kEEp && _btype ==
kDCC)
231 return _dcctccid - 45;
232 else if (_otype ==
kEEp && _btype ==
kTCC)
233 return _dcctccid - 72;
234 else if (_otype ==
kEE && _btype ==
kDCC)
235 return _dcctccid <= 9 ? _dcctccid : _dcctccid - 36;
236 else if (_otype ==
kEE && _btype ==
kTCC)
237 return _dcctccid <= 36 ? _dcctccid : _dcctccid - 36;
288 unsigned iDCC(_dccid - 1);
290 if (iDCC <= kEEmHigh || iDCC >=
kEEpLow)
291 xbin = (iDCC + 6) %
nbinsX + 1;
294 int ybin(6 - iDCC /
nbinsX);
296 return (
nbinsX + 2) * ybin + xbin;
337 unsigned iDCC(
dccId(_id) - 1);
361 int iSM(_dcctccid - 1);
394 if (_btype ==
kDCC) {
395 if (iSM <= kEEmHigh || iSM >=
kEEpLow)
399 }
else if (_btype ==
kTCC) {
412 if (_btype ==
kDCC) {
419 }
else if (_btype ==
kTCC) {
436 if (_btype ==
kDCC) {
449 if (_btype ==
kDCC) {
450 if (iSM <= kEEmHigh || iSM >=
kEEpLow)
454 }
else if (_btype ==
kTCC)
540 if (_otype ==
kEEm || _otype ==
kEEp) {
545 }
else if (_otype ==
kEE) {
549 ix = (ix - 100) % 101;
557 }
else if (_otype ==
kSM || _otype ==
kEESM) {
571 int ix(_bin % (nX + 2) +
xlow_(iSM));
572 int iy(_bin / (nX + 2) +
ylow_(iSM));
581 int ix(_bin % (nX + 2) +
xlow_(iSM) / 5);
582 int iy(_bin / (nX + 2) +
ylow_(iSM) / 5);
599 std::stringstream
ss;
606 if (
eid.towerId() >= 69)
607 ss <<
smName(
eid.dccId()) <<
" DCC " <<
eid.dccId() <<
" CCU " <<
eid.towerId() <<
" PN " <<
eid.xtalId();
609 ss <<
smName(
eid.dccId()) <<
" DCC " <<
eid.dccId() <<
" CCU " <<
eid.towerId() <<
" strip "
610 <<
eid.stripId() <<
" xtal " <<
eid.xtalId();
614 ss <<
" (EB ieta " << std::showpos << ebid.
ieta() << std::noshowpos <<
" iphi " << ebid.
iphi() <<
")";
617 ss <<
" (EE ix " << eeid.
ix() <<
" iy " << eeid.
iy() <<
")";
639 ss <<
" (EBTT ieta " << std::showpos << ttid.
ieta() << std::noshowpos <<
" iphi " << ttid.
iphi() <<
")";
642 ss <<
" (EESC ix " << scid.
ix() <<
" iy " << scid.
iy() <<
")";
648 int tccid(_rawId -
nDCC);
666 "(EB|EE)([+-][0-9][0-9])(?: TCC ([0-9]+)| DCC ([0-9]+) (CCU|TCC) "
667 "([0-9]+)(?: (TT|strip|PN) ([0-9]+)(?: xtal ([0-9]+)|)|)|)");
673 if (
matches->GetEntries() == 0)
675 else if (
matches->GetEntries() == 3) {
676 TString subdet(static_cast<TObjString *>(
matches->At(1))->GetString());
677 if (subdet ==
"EB") {
678 int dccid(static_cast<TObjString *>(
matches->At(2))->GetString().Atoi());
685 rawId = (dccid + 2) % 9 + 1 +
offset;
687 int dccid(static_cast<TObjString *>(
matches->At(2))->GetString().Atoi());
694 }
else if (
matches->GetEntries() == 4)
695 rawId = static_cast<TObjString *>(
matches->At(3))->GetString().Atoi() +
nDCC;
697 TString subtype(static_cast<TObjString *>(
matches->At(5))->GetString());
698 if (subtype ==
"TCC") {
699 int tccid(static_cast<TObjString *>(
matches->At(6))->GetString().Atoi());
700 int ttid(static_cast<TObjString *>(
matches->At(8))->GetString().Atoi());
703 int dccid(static_cast<TObjString *>(
matches->At(4))->GetString().Atoi());
704 int towerid(static_cast<TObjString *>(
matches->At(6))->GetString().Atoi());
705 if (
matches->GetEntries() == 7)
708 TString chType(static_cast<TObjString *>(
matches->At(7))->GetString());
709 int stripOrPNid(static_cast<TObjString *>(
matches->At(8))->GetString().Atoi());
712 else if (chType ==
"strip") {
713 int xtalid(static_cast<TObjString *>(
matches->At(9))->GetString().Atoi());
729 int ieta(_bin / 362 - 86);
734 int ieta(_bin / 74 - 17);
742 }
else if (_otype ==
kEEm || _otype ==
kEEp) {
743 int z(_otype ==
kEEm ? -1 : 1);
748 }
else if (_otype ==
kEE) {
751 int z(ix > 100 ? 1 : -1);
753 ix = (ix - 100) % 101;
757 int z(ix > 20 ? 1 : -1);
762 }
else if (_otype ==
kSM || _otype ==
kEBSM || _otype ==
kEESM) {
773 int iphi(((iSM - 9) % 18) * 20 + (z < 0 ? _bin / 87 : 21 - _bin / 87));
774 int ieta((_bin % 87) * z);
777 int iphi((((iSM - 9) % 18) * 4 + (z < 0 ? _bin / 19 : 5 - _bin / 19) + 69) % 72 + 1);
806 if (_axisParams.
existsAs<std::vector<double>>(
"edges",
false)) {
808 axis.
nbins = vEdges.size() - 1;
809 axis.
edges =
new float[vEdges.size()];
814 bool highSet(_axisParams.
existsAs<
double>(
"high",
false));
815 bool perBinSet(_axisParams.
existsAs<
double>(
"unitsPerBin",
false));
818 edm::LogWarning(
"EcalDQM") <<
"Maximum and bin width both set in an axis; using the former";
820 }
else if (perBinSet)
826 if (_axisParams.
existsAs<std::vector<std::string>>(
"labels",
false)) {
830 for (
int iB(0); iB != axis.
nbins; ++iB)
852 if (_otypeName ==
"EB")
854 else if (_otypeName ==
"EE")
856 else if (_otypeName ==
"EEm")
858 else if (_otypeName ==
"EEp")
860 else if (_otypeName ==
"SM")
862 else if (_otypeName ==
"EBSM")
864 else if (_otypeName ==
"EESM")
866 else if (_otypeName ==
"SMMEM")
868 else if (_otypeName ==
"EBSMMEM")
870 else if (_otypeName ==
"EESMMEM")
872 else if (_otypeName ==
"Ecal")
874 else if (_otypeName ==
"MEM")
876 else if (_otypeName ==
"EBMEM")
878 else if (_otypeName ==
"EEMEM")
880 else if (_otypeName ==
"Ecal2P")
882 else if (_otypeName ==
"Ecal3P")
884 else if (_otypeName ==
"EE2P")
886 else if (_otypeName ==
"MEM2P")
888 else if (_otypeName ==
"Channel")
890 else if (_otypeName ==
"None")
893 throw cms::Exception(
"InvalidConfiguration") <<
"No object type " << _otypeName <<
" defined";
897 if (_btypeName ==
"Crystal")
899 else if (_btypeName ==
"TriggerTower")
901 else if (_btypeName ==
"SuperCrystal")
903 else if (_btypeName ==
"PseudoStrip")
905 else if (_btypeName ==
"TCC")
907 else if (_btypeName ==
"DCC")
909 else if (_btypeName ==
"ProjEta")
911 else if (_btypeName ==
"ProjPhi")
913 else if (_btypeName ==
"RCT")
915 else if (_btypeName ==
"User")
917 else if (_btypeName ==
"Report")
919 else if (_btypeName ==
"Trend")
922 throw cms::Exception(
"InvalidConfiguration") <<
"No binning type " << _btypeName <<
" defined";
926 if (_kindName ==
"REAL")
928 else if (_kindName ==
"TH1F")
930 else if (_kindName ==
"TProfile")
932 else if (_kindName ==
"TH2F")
934 else if (_kindName ==
"TProfile2D")