67 unsigned tccid(
tccId(_id));
68 if(tccid <= 36 || tccid >= 73){
70 bool outer((tccid >= 19 && tccid <= 36) || (tccid >= 73 && tccid <= 90));
90 else if(_btype ==
kTCC)
96 return dccId(_id) - 9;
97 else if(_btype ==
kTCC)
98 return tccId(_id) - 36;
104 else if(_btype ==
kTCC)
110 return dccId(_id) - 45;
111 else if(_btype ==
kTCC)
112 return tccId(_id) - 72;
118 if(bin >= 46) bin -= 36;
121 else if(_btype ==
kTCC){
123 if(bin >= 72) bin -= 36;
152 unsigned tccid(
tccId(_id));
153 if(tccid <= 36 || tccid >= 73){
155 bool outer((tccid >= 19 && tccid <= 36) || (tccid >= 73 && tccid <= 90));
175 else if(_btype ==
kTCC)
181 return dccId(_id) - 9;
182 else if(_btype ==
kTCC)
183 return tccId(_id) - 36;
189 else if(_btype ==
kTCC)
195 return dccId(_id) - 45;
196 else if(_btype ==
kTCC)
197 return tccId(_id) - 72;
203 if(bin >= 46) bin -= 36;
206 else if(_btype ==
kTCC){
208 if(bin >= 72) bin -= 36;
225 else if(_otype ==
kEcal && _btype ==
kTCC)
227 if(_otype ==
kEB && _btype ==
kDCC)
228 return _dcctccid - 9;
229 else if(_otype ==
kEB && _btype ==
kTCC)
230 return _dcctccid - 36;
231 else if(_otype ==
kEEm && _btype ==
kDCC)
233 else if(_otype ==
kEEm && _btype ==
kTCC)
235 else if(_otype ==
kEEp && _btype ==
kDCC)
236 return _dcctccid - 45;
237 else if(_otype ==
kEEp && _btype ==
kTCC)
238 return _dcctccid - 72;
239 else if(_otype ==
kEE && _btype ==
kDCC)
240 return _dcctccid <= 9 ? _dcctccid : _dcctccid - 36;
241 else if(_otype ==
kEE && _btype ==
kTCC)
242 return _dcctccid <= 36 ? _dcctccid : _dcctccid - 36;
293 if(_otype !=
kEcal || _btype !=
kDCC)
return 0;
296 unsigned iDCC(_dccid - 1);
298 if(iDCC <= kEEmHigh || iDCC >=
kEEpLow) xbin = (iDCC + 6) % nbinsX + 1;
299 else xbin = iDCC % nbinsX + 1;
300 int ybin(6 - iDCC / nbinsX);
302 return (nbinsX + 2) * ybin + xbin;
317 if(
zside(_id) > 0)
return 2;
329 if(
zside(_id) > 0)
return 1;
334 unsigned iDCC(
dccId(_id) - 1);
358 int iSM(_dcctccid - 1);
387 if(iSM <= kEEmHigh || iSM >=
kEEpLow)
return 0;
390 else if(_btype ==
kTCC){
391 if(iSM <= kEEmTCCHigh || iSM >=
kEEpTCCLow)
return 0;
405 else if(_btype ==
kTCC){
428 if(iSM <= kEEmHigh || iSM >=
kEEpLow)
return 0;
431 else if(_btype ==
kTCC)
return -1;
433 if(iSM ==
kEB)
return 1;
507 if(_otype ==
kEEm || _otype ==
kEEp){
513 else if(_otype ==
kEE){
516 if(ix > 100) ix = (ix - 100) % 101;
521 if(ix > 20) ix = (ix - 20) % 21;
525 else if(_otype ==
kSM || _otype ==
kEESM){
535 int ix(_bin % (nX + 2) +
xlow_(iSM));
536 int iy(_bin / (nX + 2) +
ylow_(iSM));
544 int ix(_bin % (nX + 2) +
xlow_(iSM) / 5);
545 int iy(_bin / (nX + 2) +
ylow_(iSM) / 5);
564 std::stringstream
ss;
578 ss <<
" (EB ieta " << std::showpos << ebid.
ieta() << std::noshowpos <<
" iphi " << ebid.
iphi() <<
")";
582 ss <<
" (EE ix " << eeid.
ix() <<
" iy " << eeid.
iy() <<
")";
604 ss <<
" (EBTT ieta " << std::showpos << ttid.
ieta() << std::noshowpos <<
" iphi " << ttid.
iphi() <<
")";
608 ss <<
" (EESC ix " << scid.
ix() <<
" iy " << scid.
iy() <<
")";
615 int tccid(_rawId -
nDCC);
617 ss <<
smName(dccid) <<
" TCC " << (_rawId -
nDCC);
634 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]+)|)|)|)");
638 TObjArray*
matches(re.MatchS(name));
640 if(
matches->GetEntries() == 0)
return 0;
641 else if(
matches->GetEntries() == 3){
642 TString subdet(static_cast<TObjString*>(
matches->At(1))->GetString());
644 int dccid(static_cast<TObjString*>(
matches->At(2))->GetString().Atoi());
651 rawId = (dccid + 2) % 9 + 1 + offset;
654 int dccid(static_cast<TObjString*>(
matches->At(2))->GetString().Atoi());
655 if(dccid < 0) dccid *= -1;
660 else if(
matches->GetEntries() == 4)
661 rawId = static_cast<TObjString*>(
matches->At(3))->GetString().Atoi() +
nDCC;
663 TString subtype(static_cast<TObjString*>(
matches->At(5))->GetString());
664 if(subtype ==
"TCC"){
665 int tccid(static_cast<TObjString*>(
matches->At(6))->GetString().Atoi());
666 int ttid(static_cast<TObjString*>(
matches->At(8))->GetString().Atoi());
670 int dccid(static_cast<TObjString*>(
matches->At(4))->GetString().Atoi());
671 int towerid(static_cast<TObjString*>(
matches->At(6))->GetString().Atoi());
675 TString chType(static_cast<TObjString*>(
matches->At(7))->GetString());
676 int stripOrPNid(static_cast<TObjString*>(
matches->At(8))->GetString().Atoi());
679 else if(chType ==
"strip"){
680 int xtalid(static_cast<TObjString*>(
matches->At(9))->GetString().Atoi());
698 int ieta(_bin / 362 - 86);
699 if(ieta >= 0) ++ieta;
700 return EBDetId(ieta, _bin % 362);
703 int ieta(_bin / 74 - 17);
712 else if(_otype ==
kEEm || _otype ==
kEEp){
713 int z(_otype ==
kEEm ? -1 : 1);
719 else if(_otype ==
kEE){
722 int z(ix > 100 ? 1 : -1);
723 if(z > 0) ix = (ix - 100) % 101;
728 int z(ix > 20 ? 1 : -1);
729 if(z > 0) ix = (ix - 20) % 21;
733 else if(_otype ==
kSM || _otype ==
kEBSM || _otype ==
kEESM){
735 if(_otype ==
kEBSM) iSM += 9;
742 int iphi(((iSM - 9) % 18) * 20 + (z < 0 ? _bin / 87 : 21 - _bin / 87));
743 int ieta((_bin % 87) * z);
747 int iphi((((iSM - 9) % 18) * 4 + (z < 0 ? _bin / 19 : 5 - _bin / 19) + 69) % 72 + 1);
776 if(_axisParams.
existsAs<std::vector<double> >(
"edges",
false)){
778 axis.
nbins = vEdges.size() - 1;
779 axis.
edges =
new float[vEdges.size()];
785 bool highSet(_axisParams.
existsAs<
double>(
"high",
false));
786 bool perBinSet(_axisParams.
existsAs<
double>(
"unitsPerBin",
false));
788 if(perBinSet)
edm::LogWarning(
"EcalDQM") <<
"Maximum and bin width both set in an axis; using the former";
797 if(_axisParams.
existsAs<std::vector<std::string> >(
"labels",
false)){
799 if(
int(labels.size()) == axis.
nbins){
801 for(
int iB(0); iB != axis.
nbins; ++iB)
802 axis.
labels[iB] = labels[iB];
825 if(_otypeName ==
"EB")
return kEB;
826 else if(_otypeName ==
"EE")
return kEE;
827 else if(_otypeName ==
"EEm")
return kEEm;
828 else if(_otypeName ==
"EEp")
return kEEp;
829 else if(_otypeName ==
"SM")
return kSM;
830 else if(_otypeName ==
"EBSM")
return kEBSM;
831 else if(_otypeName ==
"EESM")
return kEESM;
832 else if(_otypeName ==
"SMMEM")
return kSMMEM;
833 else if(_otypeName ==
"EBSMMEM")
return kEBSMMEM;
834 else if(_otypeName ==
"EESMMEM")
return kEESMMEM;
835 else if(_otypeName ==
"Ecal")
return kEcal;
836 else if(_otypeName ==
"MEM")
return kMEM;
837 else if(_otypeName ==
"EBMEM")
return kEBMEM;
838 else if(_otypeName ==
"EEMEM")
return kEEMEM;
839 else if(_otypeName ==
"Ecal2P")
return kEcal2P;
840 else if(_otypeName ==
"Ecal3P")
return kEcal3P;
841 else if(_otypeName ==
"EE2P")
return kEE2P;
842 else if(_otypeName ==
"MEM2P")
return kMEM2P;
843 else if(_otypeName ==
"Channel")
return kChannel;
844 else if(_otypeName ==
"None")
return nObjType;
846 throw cms::Exception(
"InvalidConfiguration") <<
"No object type " << _otypeName <<
" defined";
852 if(_btypeName ==
"Crystal")
return kCrystal;
855 else if(_btypeName ==
"PseudoStrip")
return kPseudoStrip;
856 else if(_btypeName ==
"TCC")
return kTCC;
857 else if(_btypeName ==
"DCC")
return kDCC;
858 else if(_btypeName ==
"ProjEta")
return kProjEta;
859 else if(_btypeName ==
"ProjPhi")
return kProjPhi;
860 else if(_btypeName ==
"RCT")
return kRCT;
861 else if(_btypeName ==
"User")
return kUser;
862 else if(_btypeName ==
"Report")
return kReport;
863 else if(_btypeName ==
"Trend")
return kTrend;
865 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)