10 if (mybit ==
"HcalCellOff")
12 else if (mybit ==
"HcalCellMask")
14 else if (mybit ==
"HcalCellDead")
16 else if (mybit ==
"HcalCellHot")
18 else if (mybit ==
"HcalCellStabErr")
20 else if (mybit ==
"HcalCellTimErr")
22 else if (mybit ==
"HcalCellTrigMask")
24 else if (mybit ==
"HcalCellCaloTowerMask")
26 else if (mybit ==
"HcalCellCaloTowerProb")
28 else if (mybit ==
"HcalCellExcludeFromHBHENoiseSummary")
30 else if (mybit ==
"HcalCellExcludeFromHBHENoiseSummaryR45")
32 else if (mybit ==
"HcalBadLaserSignal")
36 <<
"HcalSeverityLevelComputer: Error: ChannelStatusFlag >>" << mybit <<
"<< unknown. Ignoring.";
46 if (mybit ==
"HBHEHpdHitMultiplicity")
48 else if (mybit ==
"HBHEIsolatedNoise")
50 else if (mybit ==
"HBHEFlatNoise")
52 else if (mybit ==
"HBHESpikeNoise")
54 else if (mybit ==
"HBHETS4TS5Noise")
56 else if (mybit ==
"HBHENegativeNoise")
58 else if (mybit ==
"HBHEPulseFitBit")
60 else if (mybit ==
"HBHEOOTPU")
64 else if (mybit ==
"HFLongShort")
66 else if (mybit ==
"HFS8S1Ratio")
68 else if (mybit ==
"HFPET")
70 else if (mybit ==
"HFSignalAsymmetry")
72 else if (mybit ==
"HFAnomalousHit")
76 else if (mybit ==
"TimingFromTDC")
78 else if (mybit ==
"UserDefinedBit0")
85 <<
"HcalSeverityLevelComputer: Error: RecHitFlag >>" << mybit <<
"<< unknown. Ignoring.";
91 if (mybit ==
"HBHEHpdHitMultiplicity")
93 else if (mybit ==
"HBHEPulseShape")
95 else if (mybit ==
"HSCP_R1R2")
97 else if (mybit ==
"HSCP_FracLeader")
99 else if (mybit ==
"HSCP_OuterEnergy")
101 else if (mybit ==
"HSCP_ExpFit")
103 else if (mybit ==
"HBHEFlatNoise")
105 else if (mybit ==
"HBHESpikeNoise")
107 else if (mybit ==
"HBHETriangleNoise")
109 else if (mybit ==
"HBHETS4TS5Noise")
111 else if (mybit ==
"HBHENegativeNoise")
113 else if (mybit ==
"HBHEPulseFitBit")
115 else if (mybit ==
"HBHEOOTPU")
119 else if (mybit ==
"HBHETimingTrustBits")
121 else if (mybit ==
"HBHETimingShapedCutsBits")
123 else if (mybit ==
"HBHEIsolatedNoise")
127 else if (mybit ==
"HOBit")
131 else if (mybit ==
"HFLongShort")
133 else if (mybit ==
"HFDigiTime")
135 else if (mybit ==
"HFInTimeWindow")
137 else if (mybit ==
"HFS8S1Ratio")
139 else if (mybit ==
"HFPET")
141 else if (mybit ==
"HFTimingTrustBits")
145 else if (mybit ==
"ZDCBit")
149 else if (mybit ==
"CalibrationBit")
153 else if (mybit ==
"TimingSubtractedBit")
155 else if (mybit ==
"TimingAddedBit")
157 else if (mybit ==
"TimingErrorBit")
159 else if (mybit ==
"ADCSaturationBit")
161 else if (mybit ==
"AddedSimHcalNoise")
164 else if (mybit ==
"UserDefinedBit0")
168 else if (mybit ==
"PresampleADC")
170 else if (mybit ==
"Fraction2TS")
178 <<
"HcalSeverityLevelComputer: Error: RecHitFlag >>" << mybit <<
"<< unknown. Ignoring.";
190 unsigned int phase_ = iConfig.
getParameter<
unsigned int>(
"phase");
193 for (myParameters::iterator itLevels = myLevels.begin(); itLevels != myLevels.end(); ++itLevels) {
198 mydef.
sevLevel = itLevels->getParameter<
int>(
"Level");
201 std::vector<std::string> myRecHitFlags = itLevels->getParameter<std::vector<std::string> >(
"RecHitFlags");
204 std::vector<std::string> myChStatuses = itLevels->getParameter<std::vector<std::string> >(
"ChannelStatus");
208 unsigned int bvalid = 0;
209 unsigned int bnonempty = 0;
211 for (
unsigned k = 0;
k < myChStatuses.size();
k++) {
212 if (myChStatuses[
k].
empty())
219 for (
unsigned k = 0;
k < myRecHitFlags.size();
k++) {
220 if (myRecHitFlags[
k].
empty())
230 if ((!bvalid) && (bnonempty)) {
232 <<
" consists of invalid definitions only: "
234 <<
" Ignoring definition.";
239 std::vector<HcalSeverityDefinition>::iterator it =
SevDef.begin();
247 if (it->sevLevel == mydef.
sevLevel) {
249 <<
" already defined. Ignoring new definition.";
254 if (((it + 1) ==
SevDef.end()) || ((it + 1)->sevLevel > mydef.
sevLevel)) {
255 SevDef.insert(it + 1, mydef);
260 }
while (it !=
SevDef.end());
264 edm::LogInfo(
"HcalSeverityLevelComputer") <<
"HcalSeverityLevelComputer - Summary of Severity Levels:" << std::endl;
265 for (std::vector<HcalSeverityDefinition>::iterator it =
SevDef.begin(); it !=
SevDef.end(); it++) {
267 edm::LogInfo(
"HcalSeverityLevelComputer") << (*it) << std::endl;
273 std::vector<std::string> myRecovered = iConfig.
getParameter<std::vector<std::string> >(
"RecoveredRecHitBits");
275 for (
unsigned k = 0;
k < myRecovered.size();
k++) {
276 if (myRecovered[
k].
empty())
284 std::vector<std::string> myDrop = iConfig.
getParameter<std::vector<std::string> >(
"DropChannelStatusBits");
286 for (
unsigned k = 0;
k < myDrop.size();
k++) {
292 edm::LogInfo(
"HcalSeverityLevelComputer") <<
"HcalSeverityLevelComputer - Summary for Recovered RecHit bits: \n"
293 << (*RecoveredRecHit_) << std::endl
294 <<
"HcalSeverityLevelComputer - Summary for Drop the Channel bits: \n"
295 << (*DropChannel_) << std::endl;
305 const uint32_t& myflag,
306 const uint32_t& mystatus)
const {
307 uint32_t myRecHitMask;
315 for (
size_t j = (
SevDef.size());
j > 0;
j--) {
320 myRecHitMask =
SevDef[
i].HBHEFlagMask;
323 myRecHitMask =
SevDef[
i].HOFlagMask;
326 myRecHitMask =
SevDef[
i].HFFlagMask;
329 myRecHitMask =
SevDef[
i].ZDCFlagMask;
332 myRecHitMask =
SevDef[
i].CalibFlagMask;
354 (myRecHitMask & myflag)) &&
355 ((!
SevDef[
i].chStatusMask) || (
SevDef[
i].chStatusMask & mystatus))) ||
356 ((myRecHitMask & myflag) || (
SevDef[
i].chStatusMask & mystatus)))
364 uint32_t myRecHitMask;
389 if (myRecHitMask & myflag)
403 uint32_t statadd = 0x1 << (bitnumber);
404 where = where | statadd;
416 s <<
"Hcal Severity Level Definition, Level = " <<
def.sevLevel << std::endl;
417 s << std::hex << std::showbase;
418 s <<
" channel status mask = " <<
def.chStatusMask << std::endl;
419 s <<
" HBHEFlagMask = " <<
def.HBHEFlagMask << std::endl;
420 s <<
" HOFlagMask = " <<
def.HOFlagMask << std::endl;
421 s <<
" HFFlagMask = " <<
def.HFFlagMask << std::endl;
422 s <<
" ZDCFlagMask = " <<
def.ZDCFlagMask << std::endl;
423 s <<
" CalibFlagMask = " <<
def.CalibFlagMask <<
std::dec << std::noshowbase << std::endl;