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 : 28);
84 else if(_btype ==
kTCC)
90 return dccId(_id) - 9;
91 else if(_btype ==
kTCC)
92 return tccId(_id) - 36;
98 else if(_btype ==
kTCC)
104 return dccId(_id) - 45;
105 else if(_btype ==
kTCC)
106 return tccId(_id) - 72;
112 if(bin >= 46) bin -= 36;
115 else if(_btype ==
kTCC){
117 if(bin >= 72) bin -= 36;
146 unsigned tccid(
tccId(_id));
147 if(tccid <= 36 || tccid >= 73){
149 bool outer((tccid >= 19 && tccid <= 36) || (tccid >= 73 && tccid <= 90));
151 bin += (tccid % 2) * (outer ? 16 : 28);
163 else if(_btype ==
kTCC)
169 return dccId(_id) - 9;
170 else if(_btype ==
kTCC)
171 return tccId(_id) - 36;
177 else if(_btype ==
kTCC)
183 return dccId(_id) - 45;
184 else if(_btype ==
kTCC)
185 return tccId(_id) - 72;
191 if(bin >= 46) bin -= 36;
194 else if(_btype ==
kTCC){
196 if(bin >= 72) bin -= 36;
213 else if(_otype ==
kEcal && _btype ==
kTCC)
215 if(_otype ==
kEB && _btype ==
kDCC)
216 return _dcctccid - 9;
217 else if(_otype ==
kEB && _btype ==
kTCC)
218 return _dcctccid - 36;
219 else if(_otype ==
kEEm && _btype ==
kDCC)
221 else if(_otype ==
kEEm && _btype ==
kTCC)
223 else if(_otype ==
kEEp && _btype ==
kDCC)
224 return _dcctccid - 45;
225 else if(_otype ==
kEEp && _btype ==
kTCC)
226 return _dcctccid - 72;
227 else if(_otype ==
kEE && _btype ==
kDCC)
228 return _dcctccid <= 9 ? _dcctccid : _dcctccid - 36;
229 else if(_otype ==
kEE && _btype ==
kTCC)
230 return _dcctccid <= 36 ? _dcctccid : _dcctccid - 36;
281 if(_otype !=
kEcal || _btype !=
kDCC)
return 0;
284 unsigned iDCC(_dccid - 1);
286 if(iDCC <= kEEmHigh || iDCC >=
kEEpLow) xbin = (iDCC + 6) % nbinsX + 1;
287 else xbin = iDCC % nbinsX + 1;
288 int ybin(6 - iDCC / nbinsX);
290 return (nbinsX + 2) * ybin + xbin;
305 if(
zside(_id) > 0)
return 2;
317 if(
zside(_id) > 0)
return 1;
322 unsigned iDCC(
dccId(_id) - 1);
346 int iSM(_dcctccid - 1);
375 if(iSM <= kEEmHigh || iSM >=
kEEpLow)
return 0;
378 else if(_btype ==
kTCC){
379 if(iSM <= kEEmTCCHigh || iSM >=
kEEpTCCLow)
return 0;
393 else if(_btype ==
kTCC){
416 if(iSM <= kEEmHigh || iSM >=
kEEpLow)
return 0;
419 else if(_btype ==
kTCC)
return -1;
421 if(iSM ==
kEB)
return 1;
495 if(_otype ==
kEEm || _otype ==
kEEp){
501 else if(_otype ==
kEE){
504 if(ix > 100) ix = (ix - 100) % 101;
509 if(ix > 20) ix = (ix - 20) % 21;
513 else if(_otype ==
kSM || _otype ==
kEESM){
523 int ix(_bin % (nX + 2) +
xlow_(iSM));
524 int iy(_bin / (nX + 2) +
ylow_(iSM));
532 int ix(_bin % (nX + 2) +
xlow_(iSM) / 5);
533 int iy(_bin / (nX + 2) +
ylow_(iSM) / 5);
552 std::stringstream
ss;
566 ss <<
" (EB ieta " << std::showpos << ebid.
ieta() << std::noshowpos <<
" iphi " << ebid.
iphi() <<
")";
570 ss <<
" (EE ix " << eeid.
ix() <<
" iy " << eeid.
iy() <<
")";
592 ss <<
" (EBTT ieta " << std::showpos << ttid.
ieta() << std::noshowpos <<
" iphi " << ttid.
iphi() <<
")";
596 ss <<
" (EESC ix " << scid.
ix() <<
" iy " << scid.
iy() <<
")";
603 int tccid(_rawId -
nDCC);
605 ss <<
smName(dccid) <<
" TCC " << (_rawId -
nDCC);
622 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]+)|)|)|)");
626 TObjArray*
matches(re.MatchS(name));
628 if(
matches->GetEntries() == 0)
return 0;
629 else if(
matches->GetEntries() == 3){
630 TString subdet(static_cast<TObjString*>(
matches->At(1))->GetString());
632 int dccid(static_cast<TObjString*>(
matches->At(2))->GetString().Atoi());
639 rawId = (dccid + 2) % 9 + 1 + offset;
642 int dccid(static_cast<TObjString*>(
matches->At(2))->GetString().Atoi());
643 if(dccid < 0) dccid *= -1;
648 else if(
matches->GetEntries() == 4)
649 rawId = static_cast<TObjString*>(
matches->At(3))->GetString().Atoi() +
nDCC;
651 TString subtype(static_cast<TObjString*>(
matches->At(5))->GetString());
652 if(subtype ==
"TCC"){
653 int tccid(static_cast<TObjString*>(
matches->At(6))->GetString().Atoi());
654 int ttid(static_cast<TObjString*>(
matches->At(8))->GetString().Atoi());
658 int dccid(static_cast<TObjString*>(
matches->At(4))->GetString().Atoi());
659 int towerid(static_cast<TObjString*>(
matches->At(6))->GetString().Atoi());
663 TString chType(static_cast<TObjString*>(
matches->At(7))->GetString());
664 int stripOrPNid(static_cast<TObjString*>(
matches->At(8))->GetString().Atoi());
667 else if(chType ==
"strip"){
668 int xtalid(static_cast<TObjString*>(
matches->At(9))->GetString().Atoi());
686 int ieta(_bin / 362 - 86);
687 if(ieta >= 0) ++ieta;
688 return EBDetId(ieta, _bin % 362);
691 int ieta(_bin / 74 - 17);
700 else if(_otype ==
kEEm || _otype ==
kEEp){
701 int z(_otype ==
kEEm ? -1 : 1);
707 else if(_otype ==
kEE){
710 int z(ix > 100 ? 1 : -1);
711 if(z > 0) ix = (ix - 100) % 101;
716 int z(ix > 20 ? 1 : -1);
717 if(z > 0) ix = (ix - 20) % 21;
721 else if(_otype ==
kSM || _otype ==
kEBSM || _otype ==
kEESM){
723 if(_otype ==
kEBSM) iSM += 9;
730 int iphi(((iSM - 9) % 18) * 20 + (z < 0 ? _bin / 87 : 21 - _bin / 87));
731 int ieta((_bin % 87) * z);
735 int iphi((((iSM - 9) % 18) * 4 + (z < 0 ? _bin / 19 : 5 - _bin / 19) + 69) % 72 + 1);
764 if(_axisParams.
existsAs<std::vector<double> >(
"edges",
false)){
766 axis.
nbins = vEdges.size() - 1;
767 axis.
edges =
new float[vEdges.size()];
773 bool highSet(_axisParams.
existsAs<
double>(
"high",
false));
774 bool perBinSet(_axisParams.
existsAs<
double>(
"unitsPerBin",
false));
776 if(perBinSet)
edm::LogWarning(
"EcalDQM") <<
"Maximum and bin width both set in an axis; using the former";
785 if(_axisParams.
existsAs<std::vector<std::string> >(
"labels",
false)){
787 if(
int(labels.size()) == axis.
nbins){
789 for(
int iB(0); iB != axis.
nbins; ++iB)
790 axis.
labels[iB] = labels[iB];
813 if(_otypeName ==
"EB")
return kEB;
814 else if(_otypeName ==
"EE")
return kEE;
815 else if(_otypeName ==
"EEm")
return kEEm;
816 else if(_otypeName ==
"EEp")
return kEEp;
817 else if(_otypeName ==
"SM")
return kSM;
818 else if(_otypeName ==
"EBSM")
return kEBSM;
819 else if(_otypeName ==
"EESM")
return kEESM;
820 else if(_otypeName ==
"SMMEM")
return kSMMEM;
821 else if(_otypeName ==
"EBSMMEM")
return kEBSMMEM;
822 else if(_otypeName ==
"EESMMEM")
return kEESMMEM;
823 else if(_otypeName ==
"Ecal")
return kEcal;
824 else if(_otypeName ==
"MEM")
return kMEM;
825 else if(_otypeName ==
"EBMEM")
return kEBMEM;
826 else if(_otypeName ==
"EEMEM")
return kEEMEM;
827 else if(_otypeName ==
"Ecal2P")
return kEcal2P;
828 else if(_otypeName ==
"Ecal3P")
return kEcal3P;
829 else if(_otypeName ==
"EE2P")
return kEE2P;
830 else if(_otypeName ==
"MEM2P")
return kMEM2P;
831 else if(_otypeName ==
"Channel")
return kChannel;
832 else if(_otypeName ==
"None")
return nObjType;
834 throw cms::Exception(
"InvalidConfiguration") <<
"No object type " << _otypeName <<
" defined";
840 if(_btypeName ==
"Crystal")
return kCrystal;
843 else if(_btypeName ==
"PseudoStrip")
return kPseudoStrip;
844 else if(_btypeName ==
"TCC")
return kTCC;
845 else if(_btypeName ==
"DCC")
return kDCC;
846 else if(_btypeName ==
"ProjEta")
return kProjEta;
847 else if(_btypeName ==
"ProjPhi")
return kProjPhi;
848 else if(_btypeName ==
"RCT")
return kRCT;
849 else if(_btypeName ==
"User")
return kUser;
850 else if(_btypeName ==
"Report")
return kReport;
851 else if(_btypeName ==
"Trend")
return kTrend;
853 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 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()
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
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 &)
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)