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 95 of file HcalSeverityLevelComputer.cc.

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

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

223 {}

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::HcalCellCaloTowerMask, HcalChannelStatus::HcalCellCaloTowerProb, HcalChannelStatus::HcalCellDead, 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
22  { // error: unrecognized channel status name
23  edm::LogWarning ("HcalSeverityLevelComputer")
24  << "HcalSeverityLevelComputer: Error: ChannelStatusFlag >>" << mybit
25  << "<< unknown. Ignoring.";
26  return false;
27  }
28  return true;
29 }
void setBit(const unsigned bitnumber, uint32_t &where)
bool HcalSeverityLevelComputer::getRecHitFlag ( HcalSeverityDefinition mydef,
const std::string &  mybit 
)
private

Definition at line 31 of file HcalSeverityLevelComputer.cc.

References HcalCaloFlagLabels::ADCSaturationBit, 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().

33 {
34  // HB, HE ++++++++++++++++++++
35  if (mybit == "HBHEHpdHitMultiplicity") setBit(HcalCaloFlagLabels::HBHEHpdHitMultiplicity, mydef.HBHEFlagMask);
36  else if (mybit == "HBHEPulseShape") setBit(HcalCaloFlagLabels::HBHEPulseShape, mydef.HBHEFlagMask);
37  else if (mybit == "HSCP_R1R2") setBit(HcalCaloFlagLabels::HSCP_R1R2, mydef.HBHEFlagMask);
38  else if (mybit == "HSCP_FracLeader") setBit(HcalCaloFlagLabels::HSCP_FracLeader, mydef.HBHEFlagMask);
39  else if (mybit == "HSCP_OuterEnergy") setBit(HcalCaloFlagLabels::HSCP_OuterEnergy, mydef.HBHEFlagMask);
40  else if (mybit == "HSCP_ExpFit") setBit(HcalCaloFlagLabels::HSCP_ExpFit, mydef.HBHEFlagMask);
41  else if (mybit == "HBHEFlatNoise") setBit(HcalCaloFlagLabels::HBHEFlatNoise, mydef.HBHEFlagMask);
42  else if (mybit == "HBHESpikeNoise") setBit(HcalCaloFlagLabels::HBHESpikeNoise, mydef.HBHEFlagMask);
43  else if (mybit == "HBHETriangleNoise") setBit(HcalCaloFlagLabels::HBHETriangleNoise, mydef.HBHEFlagMask);
44  else if (mybit == "HBHETS4TS5Noise") setBit(HcalCaloFlagLabels::HBHETS4TS5Noise, mydef.HBHEFlagMask);
45 
46  // These are multi-bit counters; we may have to revisit how to set them in the SLComputer in the future
47  else if (mybit=="HBHETimingTrustBits") setBit(HcalCaloFlagLabels::HBHETimingTrustBits, mydef.HBHEFlagMask );
48  else if (mybit=="HBHETimingShapedCutsBits") setBit(HcalCaloFlagLabels::HBHETimingShapedCutsBits, mydef.HBHEFlagMask);
49  else if (mybit=="HBHEIsolatedNoise") setBit(HcalCaloFlagLabels::HBHEIsolatedNoise, mydef.HBHEFlagMask );
50 
51  // HO ++++++++++++++++++++
52  else if (mybit == "HOBit") setBit(HcalCaloFlagLabels::HOBit, mydef.HOFlagMask);
53 
54  // HF ++++++++++++++++++++
55  else if (mybit == "HFLongShort") setBit(HcalCaloFlagLabels::HFLongShort, mydef.HFFlagMask);
56  else if (mybit == "HFDigiTime") setBit(HcalCaloFlagLabels::HFDigiTime, mydef.HFFlagMask);
57  else if (mybit == "HFInTimeWindow") setBit(HcalCaloFlagLabels::HFInTimeWindow, mydef.HFFlagMask);
58  else if (mybit == "HFS8S1Ratio") setBit(HcalCaloFlagLabels::HFS8S1Ratio, mydef.HFFlagMask);
59  else if (mybit == "HFPET") setBit(HcalCaloFlagLabels::HFPET, mydef.HFFlagMask);
60  else if (mybit == "HFTimingTrustBits") setBit(HcalCaloFlagLabels::HFTimingTrustBits, mydef.HFFlagMask); // multi-bit counter
61 
62  // ZDC ++++++++++++++++++++
63  else if (mybit == "ZDCBit") setBit(HcalCaloFlagLabels::ZDCBit, mydef.ZDCFlagMask);
64 
65  // Calib ++++++++++++++++++++
66  else if (mybit == "CalibrationBit") setBit(HcalCaloFlagLabels::CalibrationBit, mydef.CalibFlagMask);
67 
68  // Common subdetector bits ++++++++++++++++++++++
69  else if (mybit == "TimingSubtractedBit") setAllRHMasks(HcalCaloFlagLabels::TimingSubtractedBit, mydef);
70  else if (mybit == "TimingAddedBit") setAllRHMasks(HcalCaloFlagLabels::TimingAddedBit, mydef);
71  else if (mybit == "TimingErrorBit") setAllRHMasks(HcalCaloFlagLabels::TimingErrorBit, mydef);
72  else if (mybit == "ADCSaturationBit") setAllRHMasks(HcalCaloFlagLabels::ADCSaturationBit, mydef);
73  else if (mybit == "UserDefinedBit0") setAllRHMasks(HcalCaloFlagLabels::UserDefinedBit0, mydef);
74  else if (mybit == "UserDefinedBit1") setAllRHMasks(HcalCaloFlagLabels::UserDefinedBit1, mydef);
75  else if (mybit == "UserDefinedBit2") setAllRHMasks(HcalCaloFlagLabels::UserDefinedBit2, mydef);
76 
77  // additional defined diagnostic bits; not currently used for rejection
78  else if (mybit == "PresampleADC") setAllRHMasks(HcalCaloFlagLabels::PresampleADC, mydef);
79  else if (mybit == "Fraction2TS") setAllRHMasks(HcalCaloFlagLabels::Fraction2TS, mydef); // should deprecate this at some point; it's been replaced by PresampleADC
80 
81 
82 
83  // unknown -------------------
84  else
85  {
86  // error: unrecognized flag name
87  edm::LogWarning ("HcalSeverityLevelComputer")
88  << "HcalSeverityLevelComputer: Error: RecHitFlag >>" << mybit
89  << "<< unknown. Ignoring.";
90  return false;
91  }
92  return true;
93 }
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 226 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 PFRecHitProducerHCAL::createRecHits(), PFRecHitProducerHO::createRecHits(), reco::HcalNoiseInfoProducer::fillrechits(), CaloTowersCreationAlgo::hcalChanStatusForCaloTower(), HcalRecHitsAnalyzer::hcalSevLvl(), HcalRecHitsValidation::hcalSevLvl(), HcalHF_PETalgorithm::HFSetFlagFromPET(), HcalHF_S9S1algorithm::HFSetFlagFromS9S1(), EgammaHLTHcalIsolation::passCleaning_(), and ObjectValidator::validHit().

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

282 {
283  uint32_t myRecHitMask;
284  HcalGenericDetId myId(myid);
285  HcalGenericDetId::HcalGenericSubdetector mysubdet = myId.genericSubdet();
286 
287  switch (mysubdet)
288  {
290  myRecHitMask = RecoveredRecHit_->HBHEFlagMask; break;
291  case HcalGenericDetId::HcalGenOuter : myRecHitMask = RecoveredRecHit_->HOFlagMask; break;
292  case HcalGenericDetId::HcalGenForward : myRecHitMask = RecoveredRecHit_->HFFlagMask; break;
293  case HcalGenericDetId::HcalGenZDC : myRecHitMask = RecoveredRecHit_->ZDCFlagMask; break;
295  default: myRecHitMask = 0;
296  }
297 
298  if (myRecHitMask & myflag)
299  return true;
300 
301  return false;
302 }
HcalSeverityDefinition * RecoveredRecHit_
void HcalSeverityLevelComputer::setAllRHMasks ( const unsigned  bitnumber,
HcalSeverityDefinition mydef 
)
private

Definition at line 318 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().

319 {
320  setBit(bitnumber, mydef.HBHEFlagMask);
321  setBit(bitnumber, mydef.HOFlagMask);
322  setBit(bitnumber, mydef.HFFlagMask);
323  setBit(bitnumber, mydef.ZDCFlagMask);
324  setBit(bitnumber, mydef.CalibFlagMask);
325 }
void setBit(const unsigned bitnumber, uint32_t &where)
void HcalSeverityLevelComputer::setBit ( const unsigned  bitnumber,
uint32_t &  where 
)
private

Definition at line 312 of file HcalSeverityLevelComputer.cc.

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

313 {
314  uint32_t statadd = 0x1<<(bitnumber);
315  where = where|statadd;
316 }

Friends And Related Function Documentation

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

Definition at line 327 of file HcalSeverityLevelComputer.cc.

328 {
329  s << "Hcal Severity Level Definition, Level = " << def.sevLevel << std::endl;
330  s << std::hex << std::showbase;
331  s << " channel status mask = " << def.chStatusMask << std::endl;
332  s << " HBHEFlagMask = " << def.HBHEFlagMask << std::endl;
333  s << " HOFlagMask = " << def.HOFlagMask << std::endl;
334  s << " HFFlagMask = " << def.HFFlagMask << std::endl;
335  s << " ZDCFlagMask = " << def.ZDCFlagMask << std::endl;
336  s << " CalibFlagMask = " << def.CalibFlagMask << std::dec << std::noshowbase << std::endl;
337  return s;
338 }

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().