67 unsigned tccid(
tccId(_id));
68 if(tccid <= 36 || tccid >= 73){
70 bool outer((tccid >= 19 && tccid <= 36) || (tccid >= 73 && tccid <= 90));
72 bin += (tccid % 2) * (outer ? 16 : 24);
83 else if(_btype ==
kTCC)
89 return dccId(_id) - 9;
90 else if(_btype ==
kTCC)
91 return tccId(_id) - 36;
97 else if(_btype ==
kTCC)
103 return dccId(_id) - 45;
104 else if(_btype ==
kTCC)
105 return tccId(_id) - 72;
111 if(bin >= 46) bin -= 36;
114 else if(_btype ==
kTCC){
116 if(bin >= 72) bin -= 36;
145 unsigned tccid(
tccId(_id));
146 if(tccid <= 36 || tccid >= 73){
148 bool outer((tccid >= 19 && tccid <= 36) || (tccid >= 73 && tccid <= 90));
150 bin += (tccid % 2) * (outer ? 16 : 24);
161 else if(_btype ==
kTCC)
167 return dccId(_id) - 9;
168 else if(_btype ==
kTCC)
169 return tccId(_id) - 36;
175 else if(_btype ==
kTCC)
181 return dccId(_id) - 45;
182 else if(_btype ==
kTCC)
183 return tccId(_id) - 72;
189 if(bin >= 46) bin -= 36;
192 else if(_btype ==
kTCC){
194 if(bin >= 72) bin -= 36;
211 else if(_otype ==
kEcal && _btype ==
kTCC)
213 if(_otype ==
kEB && _btype ==
kDCC)
214 return _dcctccid - 9;
215 else if(_otype ==
kEB && _btype ==
kTCC)
216 return _dcctccid - 36;
217 else if(_otype ==
kEEm && _btype ==
kDCC)
219 else if(_otype ==
kEEm && _btype ==
kTCC)
221 else if(_otype ==
kEEp && _btype ==
kDCC)
222 return _dcctccid - 45;
223 else if(_otype ==
kEEp && _btype ==
kTCC)
224 return _dcctccid - 72;
225 else if(_otype ==
kEE && _btype ==
kDCC)
226 return _dcctccid <= 9 ? _dcctccid : _dcctccid - 36;
227 else if(_otype ==
kEE && _btype ==
kTCC)
228 return _dcctccid <= 36 ? _dcctccid : _dcctccid - 36;
273 if(_otype !=
kEcal || _btype !=
kDCC)
return 0;
276 unsigned iDCC(_dccid - 1);
278 if(iDCC <= kEEmHigh || iDCC >=
kEEpLow) xbin = (iDCC + 6) % nbinsX + 1;
279 else xbin = iDCC % nbinsX + 1;
280 int ybin(6 - iDCC / nbinsX);
282 return (nbinsX + 2) * ybin + xbin;
297 if(
zside(_id) > 0)
return 2;
309 if(
zside(_id) > 0)
return 1;
314 unsigned iDCC(
dccId(_id) - 1);
338 int iSM(_dcctccid - 1);
363 if(iSM <= kEEmHigh || iSM >=
kEEpLow)
return 0;
366 else if(_btype ==
kTCC){
367 if(iSM <= kEEmTCCHigh || iSM >=
kEEpTCCLow)
return 0;
381 else if(_btype ==
kTCC){
404 if(iSM <= kEEmHigh || iSM >=
kEEpLow)
return 0;
407 else if(_btype ==
kTCC)
return -1;
409 if(iSM ==
kEB)
return 1;
483 if(_otype ==
kEEm || _otype ==
kEEp){
489 else if(_otype ==
kEE){
492 if(ix > 100) ix = (ix - 100) % 101;
497 if(ix > 20) ix = (ix - 20) % 21;
501 else if(_otype ==
kSM || _otype ==
kEESM){
511 int ix(_bin % (nX + 2) +
xlow_(iSM));
512 int iy(_bin / (nX + 2) +
ylow_(iSM));
520 int ix(_bin % (nX + 2) +
xlow_(iSM) / 5);
521 int iy(_bin / (nX + 2) +
ylow_(iSM) / 5);
540 std::stringstream
ss;
554 ss <<
" (EB ieta " << std::showpos << ebid.
ieta() << std::noshowpos <<
" iphi " << ebid.
iphi() <<
")";
558 ss <<
" (EE ix " << eeid.
ix() <<
" iy " << eeid.
iy() <<
")";
580 ss <<
" (EBTT ieta " << std::showpos << ttid.
ieta() << std::noshowpos <<
" iphi " << ttid.
iphi() <<
")";
584 ss <<
" (EESC ix " << scid.
ix() <<
" iy " << scid.
iy() <<
")";
591 int tccid(_rawId -
nDCC);
593 ss <<
smName(dccid) <<
" TCC " << (_rawId -
nDCC);
610 TPRegexp re(
"(EB|EE)([+-][0-9][0-9])(?: TCC ([0-9]+)| DCC ([0-9]+) (CCU|TCC) ([0-9]+)(?: (TT|strip|PN) ([0-9]+)(?: xtal ([0-9]+)|)|)|)");
614 TObjArray* matches(re.MatchS(name));
615 matches->SetOwner(
true);
616 if(matches->GetEntries() == 0)
return 0;
617 else if(matches->GetEntries() == 3){
618 TString subdet(static_cast<TObjString*>(matches->At(1))->GetString());
620 int dccid(static_cast<TObjString*>(matches->At(2))->GetString().Atoi());
627 rawId = (dccid + 2) % 9 + 1 + offset;
630 int dccid(static_cast<TObjString*>(matches->At(2))->GetString().Atoi());
631 if(dccid < 0) dccid *= -1;
636 else if(matches->GetEntries() == 4)
637 rawId = static_cast<TObjString*>(matches->At(3))->GetString().Atoi() +
nDCC;
639 TString subtype(static_cast<TObjString*>(matches->At(5))->GetString());
640 if(subtype ==
"TCC"){
641 int tccid(static_cast<TObjString*>(matches->At(6))->GetString().Atoi());
642 int ttid(static_cast<TObjString*>(matches->At(8))->GetString().Atoi());
646 int dccid(static_cast<TObjString*>(matches->At(4))->GetString().Atoi());
647 int towerid(static_cast<TObjString*>(matches->At(6))->GetString().Atoi());
648 if(matches->GetEntries() == 7)
651 TString chType(static_cast<TObjString*>(matches->At(7))->GetString());
652 int stripOrPNid(static_cast<TObjString*>(matches->At(8))->GetString().Atoi());
655 else if(chType ==
"strip"){
656 int xtalid(static_cast<TObjString*>(matches->At(9))->GetString().Atoi());
674 int ieta(_bin / 362 - 86);
675 if(ieta >= 0) ++ieta;
676 return EBDetId(ieta, _bin % 362);
679 int ieta(_bin / 74 - 17);
688 else if(_otype ==
kEEm || _otype ==
kEEp){
689 int z(_otype ==
kEEm ? -1 : 1);
695 else if(_otype ==
kEE){
698 int z(ix > 100 ? 1 : -1);
699 if(z > 0) ix = (ix - 100) % 101;
704 int z(ix > 20 ? 1 : -1);
705 if(z > 0) ix = (ix - 20) % 21;
709 else if(_otype ==
kSM || _otype ==
kEBSM || _otype ==
kEESM){
711 if(_otype ==
kEBSM) iSM += 9;
718 int iphi(((iSM - 9) % 18) * 20 + (z < 0 ? _bin / 87 : 21 - _bin / 87));
719 int ieta((_bin % 87) * z);
723 int iphi((((iSM - 9) % 18) * 4 + (z < 0 ? _bin / 19 : 5 - _bin / 19) + 69) % 72 + 1);
752 if(_axisParams.
existsAs<std::vector<double> >(
"edges",
false)){
754 axis.
nbins = vEdges.size() - 1;
755 axis.
edges =
new float[vEdges.size()];
761 bool highSet(_axisParams.
existsAs<
double>(
"high",
false));
762 bool perBinSet(_axisParams.
existsAs<
double>(
"unitsPerBin",
false));
764 if(perBinSet)
edm::LogWarning(
"EcalDQM") <<
"Maximum and bin width both set in an axis; using the former";
773 if(_axisParams.
existsAs<std::vector<std::string> >(
"labels",
false)){
775 if(
int(labels.size()) == axis.
nbins){
777 for(
int iB(0); iB != axis.
nbins; ++iB)
778 axis.
labels[iB] = labels[iB];
801 if(_otypeName ==
"EB")
return kEB;
802 else if(_otypeName ==
"EE")
return kEE;
803 else if(_otypeName ==
"EEm")
return kEEm;
804 else if(_otypeName ==
"EEp")
return kEEp;
805 else if(_otypeName ==
"SM")
return kSM;
806 else if(_otypeName ==
"EBSM")
return kEBSM;
807 else if(_otypeName ==
"EESM")
return kEESM;
808 else if(_otypeName ==
"SMMEM")
return kSMMEM;
809 else if(_otypeName ==
"EBSMMEM")
return kEBSMMEM;
810 else if(_otypeName ==
"EESMMEM")
return kEESMMEM;
811 else if(_otypeName ==
"Ecal")
return kEcal;
812 else if(_otypeName ==
"MEM")
return kMEM;
813 else if(_otypeName ==
"EBMEM")
return kEBMEM;
814 else if(_otypeName ==
"EEMEM")
return kEEMEM;
815 else if(_otypeName ==
"Ecal2P")
return kEcal2P;
816 else if(_otypeName ==
"Ecal3P")
return kEcal3P;
817 else if(_otypeName ==
"EE2P")
return kEE2P;
818 else if(_otypeName ==
"MEM2P")
return kMEM2P;
819 else if(_otypeName ==
"Channel")
return kChannel;
820 else if(_otypeName ==
"None")
return nObjType;
822 throw cms::Exception(
"InvalidConfiguration") <<
"No object type " << _otypeName <<
" defined";
828 if(_btypeName ==
"Crystal")
return kCrystal;
831 else if(_btypeName ==
"TCC")
return kTCC;
832 else if(_btypeName ==
"DCC")
return kDCC;
833 else if(_btypeName ==
"ProjEta")
return kProjEta;
834 else if(_btypeName ==
"ProjPhi")
return kProjPhi;
835 else if(_btypeName ==
"User")
return kUser;
836 else if(_btypeName ==
"Report")
return kReport;
837 else if(_btypeName ==
"Trend")
return kTrend;
839 throw cms::Exception(
"InvalidConfiguration") <<
"No binning type " << _btypeName <<
" defined";
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 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()
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)
uint32_t rawId() const
get the raw id
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)
ParameterDescriptionNode * addOptionalNode(ParameterDescriptionNode const &node, bool writeToCfi)
AxisSpecs getBinningEB_(BinningType, bool, int)
int ieta() const
get the crystal ieta
unsigned int offset(bool)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
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 &)
MonitorElement::Kind translateKind(std::string 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)