CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 
27 
28 namespace reco {
29 
30  //
31  // forward declarations
32  //
33 
34  class HcalNoiseHPD;
36 
37  //
38  // typdefs
39  //
40 
41  typedef std::vector<HcalNoiseHPD> HcalNoiseHPDCollection;
42 
43  //
44  // RefHBHERecHitEnergyComparison is a class functor to compare energies between Ref<HBHERecHitCollection>
45  //
47  public:
49  return x->energy() > y->energy();
50  }
51  };
52 
53  //
54  // class definition
55  //
56 
57  class HcalNoiseHPD {
58  friend class HcalNoiseInfoProducer; // allows this class the fill the HPDs with info
59  friend class HcalNoiseRBXArray; // allows this class to manage the idnumber
60 
61  public:
62  // constructor
63  HcalNoiseHPD();
64 
65  // destructor
66  virtual ~HcalNoiseHPD();
67 
68  //
69  // Detector ID accessors
70  //
71 
72  // unique integer specifier for the hpd [0,NUM_HPDS-1]
73  // correlates roughly with the detector phi slice
74  int idnumber(void) const;
75 
76  //
77  // Digi accessors
78  //
79 
80  // pedestal subtracted fC information for the highest energy pixel in the HPD by timeslice
81  const std::vector<float> bigCharge(void) const;
82  float bigChargeTotal(void) const;
83  float bigChargeHighest2TS(unsigned int firstts = 4) const;
84  float bigChargeHighest3TS(unsigned int firstts = 4) const;
85 
86  // same as above but the integral over the 5 highest energy pixels in the HPD
87  const std::vector<float> big5Charge(void) const;
88  float big5ChargeTotal(void) const;
89  float big5ChargeHighest2TS(unsigned int firstts = 4) const;
90  float big5ChargeHighest3TS(unsigned int firstts = 4) const;
91 
92  // total number of adc zeros
93  int totalZeros(void) const;
94 
95  // largest number of adc zeros in a digi in the HPD
96  int maxZeros(void) const;
97 
98  //
99  // RecHit accessors
100  //
101 
102  // returns a reference to a vector of references to the rechits
104 
105  // integral of rechit energies in the HPD with E>threshold (default is 1.5 GeV)
106  float recHitEnergy(float threshold = 1.5) const;
107  float recHitEnergyFailR45(float threshold = 1.5) const;
108 
109  // minimum and maximum time for rechits with E>threshold (default is 10.0 GeV)
110  float minRecHitTime(float threshold = 10.0) const;
111  float maxRecHitTime(float threshold = 10.0) const;
112 
113  // number of rechits with E>threshold (default is 1.5 GeV)
114  int numRecHits(float threshold = 1.5) const;
115  int numRecHitsFailR45(float threshold = 1.5) const;
116 
117  //
118  // CaloTower accessors
119  //
120 
121  // returns a reference to a vector of references to the calotowers
123 
124  // calotower properties integrated over the entire HPD
125  double caloTowerHadE(void) const;
126  double caloTowerEmE(void) const;
127  double caloTowerTotalE(void) const;
128  double caloTowerEmFraction(void) const;
129 
130  private:
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 } // namespace reco
152 
153 #endif
float maxRecHitTime(float threshold=10.0) const
float big5ChargeHighest3TS(unsigned int firstts=4) const
Definition: HcalNoiseHPD.cc:73
float recHitEnergyFailR45(float threshold=1.5) const
Definition: HcalNoiseHPD.cc:96
int idnumber(void) const
Definition: HcalNoiseHPD.cc:30
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
Definition: HcalNoiseHPD.cc:82
const edm::RefVector< HBHERecHitCollection > recHits(void) const
Definition: HcalNoiseHPD.cc:84
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141
float big5ChargeHighest2TS(unsigned int firstts=4) const
Definition: HcalNoiseHPD.cc:66
virtual ~HcalNoiseHPD()
Definition: HcalNoiseHPD.cc:27
int numRecHits(float threshold=1.5) const
float bigChargeHighest2TS(unsigned int firstts=4) const
Definition: HcalNoiseHPD.cc:42
float bigChargeHighest3TS(unsigned int firstts=4) const
Definition: HcalNoiseHPD.cc:49
float big5ChargeTotal(void) const
Definition: HcalNoiseHPD.cc:58
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:48
double caloTowerHadE(void) const
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148
std::vector< HcalNoiseHPD > HcalNoiseHPDCollection
Definition: HcalNoiseHPD.h:35
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
Definition: HcalNoiseHPD.cc:86
double caloTowerTotalE(void) const
const std::vector< float > big5Charge(void) const
Definition: HcalNoiseHPD.cc:56
int totalZeros(void) const
Definition: HcalNoiseHPD.cc:80
float bigChargeTotal(void) const
Definition: HcalNoiseHPD.cc:34
const std::vector< float > bigCharge(void) const
Definition: HcalNoiseHPD.cc:32