CMS 3D CMS Logo

HcalNoiseRBX.h
Go to the documentation of this file.
1 #ifndef _DATAFORMATS_METRECO_HCALNOISERBX_H_
2 #define _DATAFORMATS_METRECO_HCALNOISERBX_H_
3 
4 //
5 // HcalNoiseRBX.h
6 //
7 // description: Container class of RBX information to study anomalous noise in the HCAL.
8 // The information for HcalNoiseHPD's are filled in RecoMET/METProducers/HcalNoiseInfoProducer,
9 // but the idnumber is managed by DataFormats/METReco/HcalNoiseRBXArray.
10 // Essentially contains 4 HcalNoiseHPDs.
11 //
12 // author: J.P. Chou, Brown
13 //
14 //
15 
17 
18 namespace reco {
19 
20  //
21  // forward declarations
22  //
23 
24  class HcalNoiseRBX;
25 
26  //
27  // typedefs
28  //
29 
30  typedef std::vector<HcalNoiseRBX> HcalNoiseRBXCollection;
31 
32  class HcalNoiseRBX {
33  friend class HcalNoiseInfoProducer; // allows this class the fill the HPDs with info
34  friend class HcalNoiseRBXArray; // allows this class to manage the idnumber
35 
36  public:
37  // constructors
38  HcalNoiseRBX();
39 
40  // destructor
41  ~HcalNoiseRBX();
42 
43  //
44  // Detector ID accessors
45  //
46 
47  // accessors
48  int idnumber(void) const;
49 
50  //
51  // other accessors
52  //
53 
54  // returns a vector of HcalNoiseHPDs
55  // this is expensive and deprecated. One should use the iterator accessor method instead (provided below)
56  const std::vector<HcalNoiseHPD> HPDs(void) const;
57  inline std::vector<HcalNoiseHPD>::const_iterator HPDsBegin(void) const { return hpds_.begin(); }
58  inline std::vector<HcalNoiseHPD>::const_iterator HPDsEnd(void) const { return hpds_.end(); }
59 
60  // return HPD with the highest rechit energy in the RBX
61  // individual rechits only contribute if they have E>threshold
62  std::vector<HcalNoiseHPD>::const_iterator maxHPD(double threshold = 1.5) const;
63 
64  // pedestal subtracted fC information for all of the pixels in the RBX
65  const std::vector<float> allCharge(void) const;
66  float allChargeTotal(void) const;
67  float allChargeHighest2TS(unsigned int firstts = 4) const;
68  float allChargeHighest3TS(unsigned int firstts = 4) const;
69 
70  // total number of adc zeros in the RBX
71  int totalZeros(void) const;
72 
73  // largest number of adc zeros from a single channel in the RBX
74  int maxZeros(void) const;
75 
76  // sum of the energy of rechits in the RBX with E>threshold
77  double recHitEnergy(double theshold = 1.5) const;
78  double recHitEnergyFailR45(double threshold = 1.5) const;
79 
80  // minimum and maximum time for rechits in the RBX with E>threshold
81  double minRecHitTime(double threshold = 20.0) const;
82  double maxRecHitTime(double threshold = 20.0) const;
83 
84  // total number of rechits above some threshold in the RBX
85  int numRecHits(double threshold = 1.5) const;
86  int numRecHitsFailR45(double threshold = 1.5) const;
87 
88  // calotower properties integrated over the entire RBX
89  double caloTowerHadE(void) const;
90  double caloTowerEmE(void) const;
91  double caloTowerTotalE(void) const;
92  double caloTowerEmFraction(void) const;
93 
94  // helper function to get the unique calotowers
95  struct twrcomp {
96  inline bool operator()(const CaloTower& t1, const CaloTower& t2) const { return t1.id() < t2.id(); }
97  };
98  typedef std::set<CaloTower, twrcomp> towerset_t;
99 
100  private:
101  // members
103 
104  // the hpds
105  std::vector<HcalNoiseHPD> hpds_;
106 
107  // the charge
108  std::vector<float> allCharge_;
109 
110  void uniqueTowers(towerset_t& twrs_) const;
111  };
112 
113 } // namespace reco
114 
115 #endif
reco::HcalNoiseRBX::caloTowerEmFraction
double caloTowerEmFraction(void) const
Definition: HcalNoiseRBX.cc:154
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
reco::HcalNoiseRBX::totalZeros
int totalZeros(void) const
Definition: HcalNoiseRBX.cc:61
reco::HcalNoiseRBX::numRecHits
int numRecHits(double threshold=1.5) const
Definition: HcalNoiseRBX.cc:110
reco::HcalNoiseRBX::HPDsBegin
std::vector< HcalNoiseHPD >::const_iterator HPDsBegin(void) const
Definition: HcalNoiseRBX.h:57
reco::HcalNoiseRBX::allChargeHighest2TS
float allChargeHighest2TS(unsigned int firstts=4) const
Definition: HcalNoiseRBX.cc:47
reco::HcalNoiseRBX::idnumber_
int idnumber_
Definition: HcalNoiseRBX.h:102
HcalNoiseHPD.h
reco::HcalNoiseInfoProducer
Definition: HcalNoiseInfoProducer.h:56
reco::HcalNoiseRBX::allChargeTotal
float allChargeTotal(void) const
Definition: HcalNoiseRBX.cc:40
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::HcalNoiseRBX::recHitEnergyFailR45
double recHitEnergyFailR45(double threshold=1.5) const
Definition: HcalNoiseRBX.cc:83
reco::HcalNoiseRBX::allCharge
const std::vector< float > allCharge(void) const
Definition: HcalNoiseRBX.cc:38
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
reco::HcalNoiseRBX::hpds_
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105
reco::HcalNoiseRBX::twrcomp
Definition: HcalNoiseRBX.h:95
reco::HcalNoiseRBX::caloTowerEmE
double caloTowerEmE(void) const
Definition: HcalNoiseRBX.cc:134
reco::HcalNoiseRBX::HPDs
const std::vector< HcalNoiseHPD > HPDs(void) const
Definition: HcalNoiseRBX.cc:23
reco::HcalNoiseRBX::twrcomp::operator()
bool operator()(const CaloTower &t1, const CaloTower &t2) const
Definition: HcalNoiseRBX.h:96
reco::HcalNoiseRBX::caloTowerTotalE
double caloTowerTotalE(void) const
Definition: HcalNoiseRBX.cc:144
reco::HcalNoiseRBX::caloTowerHadE
double caloTowerHadE(void) const
Definition: HcalNoiseRBX.cc:124
CaloTower
Definition: CaloTower.h:26
reco::HcalNoiseRBX::maxZeros
int maxZeros(void) const
Definition: HcalNoiseRBX.cc:68
reco::HcalNoiseRBX::allChargeHighest3TS
float allChargeHighest3TS(unsigned int firstts=4) const
Definition: HcalNoiseRBX.cc:54
reco::HcalNoiseRBX::allCharge_
std::vector< float > allCharge_
Definition: HcalNoiseRBX.h:108
reco::HcalNoiseRBXArray
Definition: HcalNoiseRBXArray.h:27
reco::HcalNoiseRBX::numRecHitsFailR45
int numRecHitsFailR45(double threshold=1.5) const
Definition: HcalNoiseRBX.cc:117
reco::HcalNoiseRBX::minRecHitTime
double minRecHitTime(double threshold=20.0) const
Definition: HcalNoiseRBX.cc:90
reco::HcalNoiseRBX
Definition: HcalNoiseRBX.h:32
reco::HcalNoiseRBX::maxRecHitTime
double maxRecHitTime(double threshold=20.0) const
Definition: HcalNoiseRBX.cc:100
reco::HcalNoiseRBX::~HcalNoiseRBX
~HcalNoiseRBX()
Definition: HcalNoiseRBX.cc:18
reco::HcalNoiseRBX::uniqueTowers
void uniqueTowers(towerset_t &twrs_) const
Definition: HcalNoiseRBX.cc:165
reco::HcalNoiseRBX::HcalNoiseRBX
HcalNoiseRBX()
Definition: HcalNoiseRBX.cc:15
reco::HcalNoiseRBX::maxHPD
std::vector< HcalNoiseHPD >::const_iterator maxHPD(double threshold=1.5) const
Definition: HcalNoiseRBX.cc:25
reco::HcalNoiseRBX::recHitEnergy
double recHitEnergy(double theshold=1.5) const
Definition: HcalNoiseRBX.cc:76
reco::HcalNoiseRBXCollection
std::vector< HcalNoiseRBX > HcalNoiseRBXCollection
Definition: HcalNoiseRBX.h:24
reco::HcalNoiseRBX::HPDsEnd
std::vector< HcalNoiseHPD >::const_iterator HPDsEnd(void) const
Definition: HcalNoiseRBX.h:58
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:426
reco::HcalNoiseRBX::idnumber
int idnumber(void) const
Definition: HcalNoiseRBX.cc:21
reco::HcalNoiseRBX::towerset_t
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:98