CMS 3D CMS Logo

HcalSeverityLevelComputer.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HcalRecAlgos
4 // Class: HcalSeverityLevelComputer
5 //
6 /*
7  Description: delivers the severity level for HCAL cells
8 */
9 //
10 // Original Author: Radek Ofierzynski
11 //
12 //
13 
14 #ifndef HCALSEVERITYLEVELCOMPUTER_H
15 #define HCALSEVERITYLEVELCOMPUTER_H
16 
18 
23 
25 public:
28 
29  // gives back severity level based on evaluation of the RecHit flag and cell's channel status
30  int getSeverityLevel(const DetId& myid, const uint32_t& myflag, const uint32_t& mystatus) const;
31 
32  // gives back boolean whether the RecHit is a recovered one, based on RecHit flag
33  bool recoveredRecHit(const DetId& myid, const uint32_t& myflag) const;
34 
35  // gives back whether channel should be / is dropped, based on channel status
36  bool dropChannel(const uint32_t& mystatus) const;
37 
38 private:
40  public:
41  int sevLevel;
42  uint32_t chStatusMask;
45  : sevLevel(0),
46  chStatusMask(0),
47  HBHEFlagMask(0),
48  HOFlagMask(0),
49  HFFlagMask(0),
50  ZDCFlagMask(0),
51  CalibFlagMask(0) {}
52  };
53 
54  std::vector<HcalSeverityDefinition> SevDef;
57 
58  bool getChStBit(HcalSeverityDefinition& mydef, const std::string& mybit);
59  bool getRecHitFlag(HcalSeverityDefinition& mydef, const std::string& mybit, int phase_);
60  void setBit(const unsigned bitnumber, uint32_t& where);
61  void setAllRHMasks(const unsigned bitnumber, HcalSeverityDefinition& mydef);
62 
63  friend std::ostream& operator<<(std::ostream& s, const HcalSeverityLevelComputer::HcalSeverityDefinition& def);
64 };
65 
66 #endif
int def(FILE *, FILE *, int)
HcalSeverityLevelComputer(const edm::ParameterSet &)
bool recoveredRecHit(const DetId &myid, const uint32_t &myflag) const
bool getRecHitFlag(HcalSeverityDefinition &mydef, const std::string &mybit, int phase_)
friend std::ostream & operator<<(std::ostream &s, const HcalSeverityLevelComputer::HcalSeverityDefinition &def)
std::vector< HcalSeverityDefinition > SevDef
HcalSeverityDefinition * RecoveredRecHit_
Definition: DetId.h:17
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
void setBit(const unsigned bitnumber, uint32_t &where)
HcalSeverityDefinition * DropChannel_
void setAllRHMasks(const unsigned bitnumber, HcalSeverityDefinition &mydef)
bool dropChannel(const uint32_t &mystatus) const
bool getChStBit(HcalSeverityDefinition &mydef, const std::string &mybit)