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