CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends
HcalSeverityLevelComputer Class Reference

#include <HcalSeverityLevelComputer.h>

Classes

class  HcalSeverityDefinition
 

Public Member Functions

bool dropChannel (const uint32_t &mystatus) const
 
int getSeverityLevel (const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
 
 HcalSeverityLevelComputer (const edm::ParameterSet &)
 
bool recoveredRecHit (const DetId &myid, const uint32_t &myflag) const
 
 ~HcalSeverityLevelComputer ()
 

Private Member Functions

bool getChStBit (HcalSeverityDefinition &mydef, const std::string &mybit)
 
bool getRecHitFlag (HcalSeverityDefinition &mydef, const std::string &mybit)
 
void setAllRHMasks (const unsigned bitnumber, HcalSeverityDefinition &mydef)
 
void setBit (const unsigned bitnumber, uint32_t &where)
 

Private Attributes

HcalSeverityDefinitionDropChannel_
 
HcalSeverityDefinitionRecoveredRecHit_
 
std::vector
< HcalSeverityDefinition
SevDef
 

Friends

std::ostream & operator<< (std::ostream &s, const HcalSeverityLevelComputer::HcalSeverityDefinition &def)
 

Detailed Description

Definition at line 25 of file HcalSeverityLevelComputer.h.

Constructor & Destructor Documentation

HcalSeverityLevelComputer::HcalSeverityLevelComputer ( const edm::ParameterSet iConfig)

Definition at line 101 of file HcalSeverityLevelComputer.cc.

References DropChannel_, relativeConstraints::empty, getChStBit(), edm::ParameterSet::getParameter(), getRecHitFlag(), gen::k, RecoveredRecHit_, SevDef, HcalSeverityLevelComputer::HcalSeverityDefinition::sevLevel, and AlCaHLTBitMon_QueryRunRegistry::string.

102 {
103  // initialize: get the levels and masks from the cfg:
104  typedef std::vector< edm::ParameterSet > myParameters;
105  myParameters myLevels = iConfig.getParameter<myParameters>((std::string)"SeverityLevels");
106 
107  // now run through the parameter set vector:
108  for ( myParameters::iterator itLevels = myLevels.begin(); itLevels != myLevels.end(); ++itLevels)
109  {
110  // create the basic object
111  HcalSeverityDefinition mydef;
112 
113  // get the level:
114  mydef.sevLevel = itLevels->getParameter<int>("Level");
115 
116  // get the RecHitFlags:
117  std::vector<std::string> myRecHitFlags =
118  itLevels->getParameter<std::vector <std::string> > ("RecHitFlags");
119 
120  // get channel statuses:
121  std::vector<std::string> myChStatuses =
122  itLevels->getParameter<std::vector <std::string> > ("ChannelStatus");
123 
124  // now translate the RecHitFlags and the ChannelStatuses into a mask each:
125  // create counters for invalid flags to be able to catch cases where a definition consists only of invalid bit names:
126  unsigned int bvalid = 0;
127  unsigned int bnonempty = 0;
128  // channel status:
129  for (unsigned k=0; k < myChStatuses.size(); k++)
130  {
131  if (myChStatuses[k].empty()) break; // empty string
132  bnonempty++;
133  bvalid+=getChStBit(mydef, myChStatuses[k]);
134  }
135  // RecHitFlag:
136  // HBHEStatusFlag, HOStatusFlag, HFStatusFlag, ZDCStatusFlag, CalibrationFlag
137  for (unsigned k=0; k < myRecHitFlags.size(); k++)
138  {
139  if (myRecHitFlags[k].empty()) break; // empty string
140  bnonempty++;
141  bvalid+=getRecHitFlag(mydef, myRecHitFlags[k]);
142  }
143 
144  // std::cout << "Made Severity Level:" << std::endl;
145  // std::cout << mydef << std::endl;
146 
147  // case where definition is made entirely out of invalid flags but not empty strings
148  if ((!bvalid) && (bnonempty))
149  {
150  edm::LogWarning ("HcalSeverityLevelComputer")
151  << "Warning: level " << mydef.sevLevel
152  << " consists of invalid definitions only: "
153  // << myRecHitFlags << "; " << myChStatuses
154  << " Ignoring definition.";
155  continue;
156  }
157 
158  // finally, append the masks to the mask vectors, sorting them according to level
159  std::vector<HcalSeverityDefinition>::iterator it = SevDef.begin();
160 
161  do
162  {
163  if (it == SevDef.end()) { SevDef.push_back(mydef); break; }
164 
165  if (it->sevLevel == mydef.sevLevel)
166  {
167  edm::LogWarning ("HcalSeverityLevelComputer")
168  << "HcalSeverityLevelComputer: Warning: level " << mydef.sevLevel
169  << " already defined. Ignoring new definition.";
170  break;
171  }
172 
173  if (it->sevLevel < mydef.sevLevel)
174  if (( (it+1) == SevDef.end()) || ( (it+1)->sevLevel > mydef.sevLevel ))
175  {
176  SevDef.insert(it+1, mydef);
177  break;
178  }
179 
180  it++;
181  }
182  while(it != SevDef.end());
183 
184  } //for (myParameters::iterator itLevels=myLevels.begin(); itLevels != myLevels.end(); ++itLevels)
185 
186  edm::LogInfo("HcalSeverityLevelComputer")
187  << "HcalSeverityLevelComputer - Summary of Severity Levels:" << std::endl;
188  for (std::vector<HcalSeverityDefinition>::iterator it = SevDef.begin(); it !=SevDef.end(); it++)
189  {
190  // debug: write the levels definitions on screen:
191  edm::LogInfo("HcalSeverityLevelComputer")
192  << (*it) << std::endl;
193  }
194 
195  //
196  // Now make the definition for recoveredRecHit
197  //
198  std::vector<std::string> myRecovered =
199  iConfig.getParameter<std::vector <std::string> > ("RecoveredRecHitBits");
200  RecoveredRecHit_ = new HcalSeverityDefinition();
201  for (unsigned k=0; k < myRecovered.size(); k++)
202  {
203  if (myRecovered[k].empty()) break;
204  getRecHitFlag( (*RecoveredRecHit_), myRecovered[k]);
205  }
206 
207  //
208  // Now make the definition for dropChannel
209  //
210  std::vector<std::string> myDrop =
211  iConfig.getParameter<std::vector <std::string> > ("DropChannelStatusBits");
212  DropChannel_ = new HcalSeverityDefinition();
213  for (unsigned k=0; k < myDrop.size(); k++)
214  {
215  if (myDrop[k].empty()) break;
216  getChStBit( (*DropChannel_), myDrop[k]);
217  }
218 
219  edm::LogInfo("HcalSeverityLevelComputer")
220  << "HcalSeverityLevelComputer - Summary for Recovered RecHit bits: \n"
221  << (*RecoveredRecHit_) << std::endl
222  << "HcalSeverityLevelComputer - Summary for Drop the Channel bits: \n"
223  << (*DropChannel_) << std::endl;
224 
225 
226 } // HcalSeverityLevelComputer::HcalSeverityLevelComputer
T getParameter(std::string const &) const
std::vector< HcalSeverityDefinition > SevDef
HcalSeverityDefinition * RecoveredRecHit_
int k[5][pyjets_maxn]
bool getRecHitFlag(HcalSeverityDefinition &mydef, const std::string &mybit)
HcalSeverityDefinition * DropChannel_
bool getChStBit(HcalSeverityDefinition &mydef, const std::string &mybit)
HcalSeverityLevelComputer::~HcalSeverityLevelComputer ( )

Definition at line 229 of file HcalSeverityLevelComputer.cc.

229 {}

Member Function Documentation

bool HcalSeverityLevelComputer::dropChannel ( const uint32_t &  mystatus) const
bool HcalSeverityLevelComputer::getChStBit ( HcalSeverityDefinition mydef,
const std::string &  mybit 
)
private

Definition at line 9 of file HcalSeverityLevelComputer.cc.

References HcalSeverityLevelComputer::HcalSeverityDefinition::chStatusMask, HcalChannelStatus::HcalBadLaserSignal, HcalChannelStatus::HcalCellCaloTowerMask, HcalChannelStatus::HcalCellCaloTowerProb, HcalChannelStatus::HcalCellDead, HcalChannelStatus::HcalCellExcludeFromHBHENoiseSummary, HcalChannelStatus::HcalCellExcludeFromHBHENoiseSummaryR45, HcalChannelStatus::HcalCellHot, HcalChannelStatus::HcalCellMask, HcalChannelStatus::HcalCellOff, HcalChannelStatus::HcalCellStabErr, HcalChannelStatus::HcalCellTimErr, HcalChannelStatus::HcalCellTrigMask, and setBit().

Referenced by HcalSeverityLevelComputer().

11 {
12  if (mybit == "HcalCellOff") setBit(HcalChannelStatus::HcalCellOff, mydef.chStatusMask);
13  else if (mybit == "HcalCellMask") setBit(HcalChannelStatus::HcalCellMask, mydef.chStatusMask);
14  else if (mybit == "HcalCellDead") setBit(HcalChannelStatus::HcalCellDead, mydef.chStatusMask);
15  else if (mybit == "HcalCellHot") setBit(HcalChannelStatus::HcalCellHot, mydef.chStatusMask);
16  else if (mybit == "HcalCellStabErr") setBit(HcalChannelStatus::HcalCellStabErr, mydef.chStatusMask);
17  else if (mybit == "HcalCellTimErr") setBit(HcalChannelStatus::HcalCellTimErr, mydef.chStatusMask);
18  else if (mybit == "HcalCellTrigMask") setBit(HcalChannelStatus::HcalCellTrigMask, mydef.chStatusMask);
19  else if (mybit == "HcalCellCaloTowerMask") setBit(HcalChannelStatus::HcalCellCaloTowerMask, mydef.chStatusMask);
20  else if (mybit == "HcalCellCaloTowerProb") setBit(HcalChannelStatus::HcalCellCaloTowerProb, mydef.chStatusMask);
21  else if (mybit == "HcalCellExcludeFromHBHENoiseSummary") setBit(HcalChannelStatus::HcalCellExcludeFromHBHENoiseSummary, mydef.chStatusMask);
22  else if (mybit == "HcalCellExcludeFromHBHENoiseSummaryR45") setBit(HcalChannelStatus::HcalCellExcludeFromHBHENoiseSummaryR45, mydef.chStatusMask);
23  else if (mybit == "HcalBadLaserSignal") setBit(HcalChannelStatus::HcalBadLaserSignal, mydef.chStatusMask);
24  else
25  { // error: unrecognized channel status name
26  edm::LogWarning ("HcalSeverityLevelComputer")
27  << "HcalSeverityLevelComputer: Error: ChannelStatusFlag >>" << mybit
28  << "<< unknown. Ignoring.";
29  return false;
30  }
31  return true;
32 }
void setBit(const unsigned bitnumber, uint32_t &where)
bool HcalSeverityLevelComputer::getRecHitFlag ( HcalSeverityDefinition mydef,
const std::string &  mybit 
)
private

Definition at line 34 of file HcalSeverityLevelComputer.cc.

References HcalCaloFlagLabels::ADCSaturationBit, HcalCaloFlagLabels::AddedSimHcalNoise, HcalSeverityLevelComputer::HcalSeverityDefinition::CalibFlagMask, HcalCaloFlagLabels::CalibrationBit, HcalCaloFlagLabels::Fraction2TS, HcalSeverityLevelComputer::HcalSeverityDefinition::HBHEFlagMask, HcalCaloFlagLabels::HBHEFlatNoise, HcalCaloFlagLabels::HBHEHpdHitMultiplicity, HcalCaloFlagLabels::HBHEIsolatedNoise, HcalCaloFlagLabels::HBHEPulseShape, HcalCaloFlagLabels::HBHESpikeNoise, HcalCaloFlagLabels::HBHETimingShapedCutsBits, HcalCaloFlagLabels::HBHETimingTrustBits, HcalCaloFlagLabels::HBHETriangleNoise, HcalCaloFlagLabels::HBHETS4TS5Noise, HcalCaloFlagLabels::HFDigiTime, HcalSeverityLevelComputer::HcalSeverityDefinition::HFFlagMask, HcalCaloFlagLabels::HFInTimeWindow, HcalCaloFlagLabels::HFLongShort, HcalCaloFlagLabels::HFPET, HcalCaloFlagLabels::HFS8S1Ratio, HcalCaloFlagLabels::HFTimingTrustBits, HcalCaloFlagLabels::HOBit, HcalSeverityLevelComputer::HcalSeverityDefinition::HOFlagMask, HcalCaloFlagLabels::HSCP_ExpFit, HcalCaloFlagLabels::HSCP_FracLeader, HcalCaloFlagLabels::HSCP_OuterEnergy, HcalCaloFlagLabels::HSCP_R1R2, HcalCaloFlagLabels::PresampleADC, setAllRHMasks(), setBit(), HcalCaloFlagLabels::TimingAddedBit, HcalCaloFlagLabels::TimingErrorBit, HcalCaloFlagLabels::TimingSubtractedBit, HcalCaloFlagLabels::UserDefinedBit0, HcalCaloFlagLabels::UserDefinedBit1, HcalCaloFlagLabels::UserDefinedBit2, HcalCaloFlagLabels::ZDCBit, and HcalSeverityLevelComputer::HcalSeverityDefinition::ZDCFlagMask.

Referenced by HcalSeverityLevelComputer().

36 {
37  // HB, HE ++++++++++++++++++++
38  if (mybit == "HBHEHpdHitMultiplicity") setBit(HcalCaloFlagLabels::HBHEHpdHitMultiplicity, mydef.HBHEFlagMask);
39  else if (mybit == "HBHEPulseShape") setBit(HcalCaloFlagLabels::HBHEPulseShape, mydef.HBHEFlagMask);
40  else if (mybit == "HSCP_R1R2") setBit(HcalCaloFlagLabels::HSCP_R1R2, mydef.HBHEFlagMask);
41  else if (mybit == "HSCP_FracLeader") setBit(HcalCaloFlagLabels::HSCP_FracLeader, mydef.HBHEFlagMask);
42  else if (mybit == "HSCP_OuterEnergy") setBit(HcalCaloFlagLabels::HSCP_OuterEnergy, mydef.HBHEFlagMask);
43  else if (mybit == "HSCP_ExpFit") setBit(HcalCaloFlagLabels::HSCP_ExpFit, mydef.HBHEFlagMask);
44  else if (mybit == "HBHEFlatNoise") setBit(HcalCaloFlagLabels::HBHEFlatNoise, mydef.HBHEFlagMask);
45  else if (mybit == "HBHESpikeNoise") setBit(HcalCaloFlagLabels::HBHESpikeNoise, mydef.HBHEFlagMask);
46  else if (mybit == "HBHETriangleNoise") setBit(HcalCaloFlagLabels::HBHETriangleNoise, mydef.HBHEFlagMask);
47  else if (mybit == "HBHETS4TS5Noise") setBit(HcalCaloFlagLabels::HBHETS4TS5Noise, mydef.HBHEFlagMask);
48 
49  // These are multi-bit counters; we may have to revisit how to set them in the SLComputer in the future
50  else if (mybit=="HBHETimingTrustBits") setBit(HcalCaloFlagLabels::HBHETimingTrustBits, mydef.HBHEFlagMask );
51  else if (mybit=="HBHETimingShapedCutsBits") setBit(HcalCaloFlagLabels::HBHETimingShapedCutsBits, mydef.HBHEFlagMask);
52  else if (mybit=="HBHEIsolatedNoise") setBit(HcalCaloFlagLabels::HBHEIsolatedNoise, mydef.HBHEFlagMask );
53 
54  // HO ++++++++++++++++++++
55  else if (mybit == "HOBit") setBit(HcalCaloFlagLabels::HOBit, mydef.HOFlagMask);
56 
57  // HF ++++++++++++++++++++
58  else if (mybit == "HFLongShort") setBit(HcalCaloFlagLabels::HFLongShort, mydef.HFFlagMask);
59  else if (mybit == "HFDigiTime") setBit(HcalCaloFlagLabels::HFDigiTime, mydef.HFFlagMask);
60  else if (mybit == "HFInTimeWindow") setBit(HcalCaloFlagLabels::HFInTimeWindow, mydef.HFFlagMask);
61  else if (mybit == "HFS8S1Ratio") setBit(HcalCaloFlagLabels::HFS8S1Ratio, mydef.HFFlagMask);
62  else if (mybit == "HFPET") setBit(HcalCaloFlagLabels::HFPET, mydef.HFFlagMask);
63  else if (mybit == "HFTimingTrustBits") setBit(HcalCaloFlagLabels::HFTimingTrustBits, mydef.HFFlagMask); // multi-bit counter
64 
65  // ZDC ++++++++++++++++++++
66  else if (mybit == "ZDCBit") setBit(HcalCaloFlagLabels::ZDCBit, mydef.ZDCFlagMask);
67 
68  // Calib ++++++++++++++++++++
69  else if (mybit == "CalibrationBit") setBit(HcalCaloFlagLabels::CalibrationBit, mydef.CalibFlagMask);
70 
71  // Common subdetector bits ++++++++++++++++++++++
72  else if (mybit == "TimingSubtractedBit") setAllRHMasks(HcalCaloFlagLabels::TimingSubtractedBit, mydef);
73  else if (mybit == "TimingAddedBit") setAllRHMasks(HcalCaloFlagLabels::TimingAddedBit, mydef);
74  else if (mybit == "TimingErrorBit") setAllRHMasks(HcalCaloFlagLabels::TimingErrorBit, mydef);
75  else if (mybit == "ADCSaturationBit") setAllRHMasks(HcalCaloFlagLabels::ADCSaturationBit, mydef);
76  else if (mybit== "AddedSimHcalNoise") setAllRHMasks(HcalCaloFlagLabels::AddedSimHcalNoise, mydef);
77 
78  else if (mybit == "UserDefinedBit0") setAllRHMasks(HcalCaloFlagLabels::UserDefinedBit0, mydef);
79  else if (mybit == "UserDefinedBit1") setAllRHMasks(HcalCaloFlagLabels::UserDefinedBit1, mydef);
80  else if (mybit == "UserDefinedBit2") setAllRHMasks(HcalCaloFlagLabels::UserDefinedBit2, mydef);
81 
82 
83  // additional defined diagnostic bits; not currently used for rejection
84  else if (mybit == "PresampleADC") setAllRHMasks(HcalCaloFlagLabels::PresampleADC, mydef);
85  else if (mybit == "Fraction2TS") setAllRHMasks(HcalCaloFlagLabels::Fraction2TS, mydef); // should deprecate this at some point; it's been replaced by PresampleADC
86 
87 
88 
89  // unknown -------------------
90  else
91  {
92  // error: unrecognized flag name
93  edm::LogWarning ("HcalSeverityLevelComputer")
94  << "HcalSeverityLevelComputer: Error: RecHitFlag >>" << mybit
95  << "<< unknown. Ignoring.";
96  return false;
97  }
98  return true;
99 }
void setBit(const unsigned bitnumber, uint32_t &where)
void setAllRHMasks(const unsigned bitnumber, HcalSeverityDefinition &mydef)
int HcalSeverityLevelComputer::getSeverityLevel ( const DetId myid,
const uint32_t &  myflag,
const uint32_t &  mystatus 
) const

Definition at line 232 of file HcalSeverityLevelComputer.cc.

References HcalGenericDetId::genericSubdet(), HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenCalibration, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, HcalGenericDetId::HcalGenZDC, i, j, and SevDef.

Referenced by reco::HcalNoiseInfoProducer::fillrechits(), CaloTowersCreationAlgo::hcalChanStatusForCaloTower(), HcalRecHitsAnalyzer::hcalSevLvl(), HcalRecHitsValidation::hcalSevLvl(), HcalHF_PETalgorithm::HFSetFlagFromPET(), HcalHF_S9S1algorithm::HFSetFlagFromS9S1(), EgammaHLTHcalIsolation::passCleaning_(), PFCTRecHitProducer::produce(), PFRecHitQTestHCALChannel::test(), and ObjectValidator::validHit().

234 {
235  uint32_t myRecHitMask;
236  HcalGenericDetId myId(myid);
237  HcalGenericDetId::HcalGenericSubdetector mysubdet = myId.genericSubdet();
238 
239  // for (unsigned i=(SevDef.size()-1); i >= 0; i--) // Wrong
240  // Since i is unsigned, i >= 0 is always true,
241  // and the loop termination condition is never reached.
242  // We offset the loop index by one to fix this.
243  for (size_t j=(SevDef.size()); j > 0; j--)
244  {
245  size_t i = j - 1;
246  switch (mysubdet)
247  {
249  myRecHitMask = SevDef[i].HBHEFlagMask; break;
250  case HcalGenericDetId::HcalGenOuter : myRecHitMask = SevDef[i].HOFlagMask; break;
251  case HcalGenericDetId::HcalGenForward : myRecHitMask = SevDef[i].HFFlagMask; break;
252  case HcalGenericDetId::HcalGenZDC : myRecHitMask = SevDef[i].ZDCFlagMask; break;
253  case HcalGenericDetId::HcalGenCalibration : myRecHitMask = SevDef[i].CalibFlagMask; break;
254  default: myRecHitMask = 0;
255  }
256 
257  // for debugging:
258 // std::cout << std::hex << " SLD: RHMask 0x" << myRecHitMask
259 // << " chstmask 0x" << SevDef[i].chStatusMask
260 // << " RHmask & myflag 0x" << (myRecHitMask&myflag)
261 // << " chstmask & mystatus 0x" << (SevDef[i].chStatusMask&mystatus)
262 // << std::dec << " level = " << SevDef[i].sevLevel << std::endl;
263 
264  // true if:
265  // rechitmask empty and chstatusmask empty
266  // rechitmask empty and chstatusmask&mychstat true
267  // chstatusmask empty and rechitmask&myflag true
268  // rechitmask&myflag true OR chstatusmask&mychstat true
269 
270 
271  // if ( ( ( (!myRecHitMask) || (myRecHitMask & myflag) ) &&
272  if ( ( ( ( !SevDef[i].HBHEFlagMask
273  && !SevDef[i].HOFlagMask
274  && !SevDef[i].HFFlagMask
275  && !SevDef[i].ZDCFlagMask
276  && !SevDef[i].CalibFlagMask )
277  || (myRecHitMask & myflag) )
278  && ( (!SevDef[i].chStatusMask) || (SevDef[i].chStatusMask & mystatus) ) )
279  || ( (myRecHitMask & myflag) || (SevDef[i].chStatusMask & mystatus) ) )
280  return SevDef[i].sevLevel;
281 
282  }
283 
284  return -100; // default value, if no definition applies
285 }
int i
Definition: DBlmapReader.cc:9
std::vector< HcalSeverityDefinition > SevDef
int j
Definition: DBlmapReader.cc:9
bool HcalSeverityLevelComputer::recoveredRecHit ( const DetId myid,
const uint32_t &  myflag 
) const

Definition at line 287 of file HcalSeverityLevelComputer.cc.

References HcalSeverityLevelComputer::HcalSeverityDefinition::CalibFlagMask, HcalGenericDetId::genericSubdet(), HcalSeverityLevelComputer::HcalSeverityDefinition::HBHEFlagMask, HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenCalibration, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, HcalGenericDetId::HcalGenZDC, HcalSeverityLevelComputer::HcalSeverityDefinition::HFFlagMask, HcalSeverityLevelComputer::HcalSeverityDefinition::HOFlagMask, RecoveredRecHit_, and HcalSeverityLevelComputer::HcalSeverityDefinition::ZDCFlagMask.

Referenced by reco::HcalNoiseInfoProducer::fillrechits(), CaloTowersCreationAlgo::hcalChanStatusForCaloTower(), EgammaHLTHcalIsolation::passCleaning_(), and ObjectValidator::validHit().

288 {
289  uint32_t myRecHitMask;
290  HcalGenericDetId myId(myid);
291  HcalGenericDetId::HcalGenericSubdetector mysubdet = myId.genericSubdet();
292 
293  switch (mysubdet)
294  {
296  myRecHitMask = RecoveredRecHit_->HBHEFlagMask; break;
297  case HcalGenericDetId::HcalGenOuter : myRecHitMask = RecoveredRecHit_->HOFlagMask; break;
298  case HcalGenericDetId::HcalGenForward : myRecHitMask = RecoveredRecHit_->HFFlagMask; break;
299  case HcalGenericDetId::HcalGenZDC : myRecHitMask = RecoveredRecHit_->ZDCFlagMask; break;
301  default: myRecHitMask = 0;
302  }
303 
304  if (myRecHitMask & myflag)
305  return true;
306 
307  return false;
308 }
HcalSeverityDefinition * RecoveredRecHit_
void HcalSeverityLevelComputer::setAllRHMasks ( const unsigned  bitnumber,
HcalSeverityDefinition mydef 
)
private

Definition at line 324 of file HcalSeverityLevelComputer.cc.

References HcalSeverityLevelComputer::HcalSeverityDefinition::CalibFlagMask, HcalSeverityLevelComputer::HcalSeverityDefinition::HBHEFlagMask, HcalSeverityLevelComputer::HcalSeverityDefinition::HFFlagMask, HcalSeverityLevelComputer::HcalSeverityDefinition::HOFlagMask, setBit(), and HcalSeverityLevelComputer::HcalSeverityDefinition::ZDCFlagMask.

Referenced by getRecHitFlag().

325 {
326  setBit(bitnumber, mydef.HBHEFlagMask);
327  setBit(bitnumber, mydef.HOFlagMask);
328  setBit(bitnumber, mydef.HFFlagMask);
329  setBit(bitnumber, mydef.ZDCFlagMask);
330  setBit(bitnumber, mydef.CalibFlagMask);
331 }
void setBit(const unsigned bitnumber, uint32_t &where)
void HcalSeverityLevelComputer::setBit ( const unsigned  bitnumber,
uint32_t &  where 
)
private

Definition at line 318 of file HcalSeverityLevelComputer.cc.

Referenced by getChStBit(), getRecHitFlag(), and setAllRHMasks().

319 {
320  uint32_t statadd = 0x1<<(bitnumber);
321  where = where|statadd;
322 }

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const HcalSeverityLevelComputer::HcalSeverityDefinition def 
)
friend

Definition at line 333 of file HcalSeverityLevelComputer.cc.

334 {
335  s << "Hcal Severity Level Definition, Level = " << def.sevLevel << std::endl;
336  s << std::hex << std::showbase;
337  s << " channel status mask = " << def.chStatusMask << std::endl;
338  s << " HBHEFlagMask = " << def.HBHEFlagMask << std::endl;
339  s << " HOFlagMask = " << def.HOFlagMask << std::endl;
340  s << " HFFlagMask = " << def.HFFlagMask << std::endl;
341  s << " ZDCFlagMask = " << def.ZDCFlagMask << std::endl;
342  s << " CalibFlagMask = " << def.CalibFlagMask << std::dec << std::noshowbase << std::endl;
343  return s;
344 }

Member Data Documentation

HcalSeverityDefinition* HcalSeverityLevelComputer::DropChannel_
private

Definition at line 57 of file HcalSeverityLevelComputer.h.

Referenced by dropChannel(), and HcalSeverityLevelComputer().

HcalSeverityDefinition* HcalSeverityLevelComputer::RecoveredRecHit_
private

Definition at line 56 of file HcalSeverityLevelComputer.h.

Referenced by HcalSeverityLevelComputer(), and recoveredRecHit().

std::vector<HcalSeverityDefinition> HcalSeverityLevelComputer::SevDef
private

Definition at line 55 of file HcalSeverityLevelComputer.h.

Referenced by getSeverityLevel(), and HcalSeverityLevelComputer().