CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalNoiseHPD.h
Go to the documentation of this file.
1 #ifndef _DATAFORMATS_METRECO_HCALNOISEHPD_H_
2 #define _DATAFORMATS_METRECO_HCALNOISEHPD_H_
3 
4 //
5 // HcalNoiseHPD.h
6 //
7 // description: Container class of HPD 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 // Provides relevant digi, rechit, and calotower information.
11 //
12 // author: J.P. Chou, Brown
13 //
14 
15 #include <algorithm>
16 
25 
26 namespace reco {
27 
28  //
29  // forward declarations
30  //
31 
32  class HcalNoiseHPD;
34 
35  //
36  // typdefs
37  //
38 
39  typedef std::vector<HcalNoiseHPD> HcalNoiseHPDCollection;
40 
41  //
42  // RefHBHERecHitEnergyComparison is a class functor to compare energies between Ref<HBHERecHitCollection>
43  //
44  class RefHBHERecHitEnergyComparison : public std::binary_function<HBHERecHit,HBHERecHit,bool> {
45  public:
47  { return x->energy()>y->energy(); }
48  };
49 
50 
51  //
52  // class definition
53  //
54 
55  class HcalNoiseHPD {
56  friend class HcalNoiseInfoProducer; // allows this class the fill the HPDs with info
57  friend class HcalNoiseRBXArray; // allows this class to manage the idnumber
58 
59  public:
60  // constructor
61  HcalNoiseHPD();
62 
63  // destructor
64  virtual ~HcalNoiseHPD();
65 
66  //
67  // Detector ID accessors
68  //
69 
70  // unique integer specifier for the hpd [0,NUM_HPDS-1]
71  // correlates roughly with the detector phi slice
72  int idnumber(void) const;
73 
74  //
75  // Digi accessors
76  //
77 
78  // pedestal subtracted fC information for the highest energy pixel in the HPD by timeslice
79  const std::vector<float> bigCharge(void) const;
80  float bigChargeTotal(void) const;
81  float bigChargeHighest2TS(unsigned int firstts=4) const;
82  float bigChargeHighest3TS(unsigned int firstts=4) const;
83 
84  // same as above but the integral over the 5 highest energy pixels in the HPD
85  const std::vector<float> big5Charge(void) const;
86  float big5ChargeTotal(void) const;
87  float big5ChargeHighest2TS(unsigned int firstts=4) const;
88  float big5ChargeHighest3TS(unsigned int firstts=4) const;
89 
90  // total number of adc zeros
91  int totalZeros(void) const;
92 
93  // largest number of adc zeros in a digi in the HPD
94  int maxZeros(void) const;
95 
96  //
97  // RecHit accessors
98  //
99 
100  // returns a reference to a vector of references to the rechits
102 
103  // integral of rechit energies in the HPD with E>threshold (default is 1.5 GeV)
104  float recHitEnergy(float threshold=1.5) const;
105  float recHitEnergyFailR45(float threshold=1.5) const;
106 
107  // minimum and maximum time for rechits with E>threshold (default is 10.0 GeV)
108  float minRecHitTime(float threshold=10.0) const;
109  float maxRecHitTime(float threshold=10.0) const;
110 
111  // number of rechits with E>threshold (default is 1.5 GeV)
112  int numRecHits(float threshold=1.5) const;
113  int numRecHitsFailR45(float threshold=1.5) const;
114 
115  //
116  // CaloTower accessors
117  //
118 
119  // returns a reference to a vector of references to the calotowers
121 
122  // calotower properties integrated over the entire HPD
123  double caloTowerHadE(void) const;
124  double caloTowerEmE(void) const;
125  double caloTowerTotalE(void) const;
126  double caloTowerEmFraction(void) const;
127 
128 
129  private:
130 
131  // unique id number specifying the HPD
133 
134  // digi data members
137  std::vector<float> bigCharge_;
138  std::vector<float> big5Charge_;
139 
140  // a vector of references to rechits
142 
143  // a transient set of rechits for sorting purposes
144  // at some point before storing, these get transfered to the RefVector rechits_
145  std::set<edm::Ref<HBHERecHitCollection>, RefHBHERecHitEnergyComparison> refrechitset_;
146 
147  // a vector of references to calotowers
149  };
150 
151 } // end of namespace
152 
153 #endif
float maxRecHitTime(float threshold=10.0) const
float big5ChargeHighest3TS(unsigned int firstts=4) const
Definition: HcalNoiseHPD.cc:90
float recHitEnergyFailR45(float threshold=1.5) const
int idnumber(void) const
Definition: HcalNoiseHPD.cc:32
std::set< edm::Ref< HBHERecHitCollection >, RefHBHERecHitEnergyComparison > refrechitset_
Definition: HcalNoiseHPD.h:145
std::vector< float > bigCharge_
Definition: HcalNoiseHPD.h:137
std::vector< float > big5Charge_
Definition: HcalNoiseHPD.h:138
int maxZeros(void) const
const edm::RefVector< HBHERecHitCollection > recHits(void) const
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141
float big5ChargeHighest2TS(unsigned int firstts=4) const
Definition: HcalNoiseHPD.cc:82
virtual ~HcalNoiseHPD()
Definition: HcalNoiseHPD.cc:27
int numRecHits(float threshold=1.5) const
float bigChargeHighest2TS(unsigned int firstts=4) const
Definition: HcalNoiseHPD.cc:51
float bigChargeHighest3TS(unsigned int firstts=4) const
Definition: HcalNoiseHPD.cc:60
float big5ChargeTotal(void) const
Definition: HcalNoiseHPD.cc:73
float minRecHitTime(float threshold=10.0) const
double caloTowerEmE(void) const
bool operator()(const edm::Ref< HBHERecHitCollection > &x, const edm::Ref< HBHERecHitCollection > &y) const
Definition: HcalNoiseHPD.h:46
double caloTowerHadE(void) const
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148
std::vector< HcalNoiseHPD > HcalNoiseHPDCollection
Definition: HcalNoiseHPD.h:33
const edm::RefVector< CaloTowerCollection > caloTowers(void) const
double caloTowerEmFraction(void) const
int numRecHitsFailR45(float threshold=1.5) const
float recHitEnergy(float threshold=1.5) const
double caloTowerTotalE(void) const
Definition: DDAxes.h:10
const std::vector< float > big5Charge(void) const
Definition: HcalNoiseHPD.cc:68
int totalZeros(void) const
Definition: HcalNoiseHPD.cc:98
float bigChargeTotal(void) const
Definition: HcalNoiseHPD.cc:42
const std::vector< float > bigCharge(void) const
Definition: HcalNoiseHPD.cc:37