CMS 3D CMS Logo

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
reco::HcalNoiseHPD::HcalNoiseHPD
HcalNoiseHPD()
Definition: HcalNoiseHPD.cc:15
RefProd.h
reco::HcalNoiseHPD::calotowers_
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148
reco::HcalNoiseHPD::caloTowerEmFraction
double caloTowerEmFraction(void) const
Definition: HcalNoiseHPD.cc:176
reco::HcalNoiseHPD::idnumber_
int idnumber_
Definition: HcalNoiseHPD.h:132
reco::HcalNoiseHPD::maxRecHitTime
float maxRecHitTime(float threshold=10.0) const
Definition: HcalNoiseHPD.cc:119
reco::HcalNoiseHPD::refrechitset_
std::set< edm::Ref< HBHERecHitCollection >, RefHBHERecHitEnergyComparison > refrechitset_
Definition: HcalNoiseHPD.h:145
HBHERecHitAuxSetter.h
reco::HcalNoiseHPD::minRecHitTime
float minRecHitTime(float threshold=10.0) const
Definition: HcalNoiseHPD.cc:107
reco::HcalNoiseHPD::recHits
const edm::RefVector< HBHERecHitCollection > recHits(void) const
Definition: HcalNoiseHPD.cc:84
reco::HcalNoiseHPD::big5ChargeHighest3TS
float big5ChargeHighest3TS(unsigned int firstts=4) const
Definition: HcalNoiseHPD.cc:73
reco::HcalNoiseInfoProducer
Definition: HcalNoiseInfoProducer.h:56
edm::RefVector
Definition: EDProductfwd.h:27
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::HcalNoiseHPD
Definition: HcalNoiseHPD.h:57
edm::Ref
Definition: AssociativeIterator.h:58
reco::HcalNoiseHPD::recHitEnergyFailR45
float recHitEnergyFailR45(float threshold=1.5) const
Definition: HcalNoiseHPD.cc:96
reco::RefHBHERecHitEnergyComparison::operator()
bool operator()(const edm::Ref< HBHERecHitCollection > &x, const edm::Ref< HBHERecHitCollection > &y) const
Definition: HcalNoiseHPD.h:48
reco::HcalNoiseHPD::bigChargeHighest2TS
float bigChargeHighest2TS(unsigned int firstts=4) const
Definition: HcalNoiseHPD.cc:42
reco::HcalNoiseHPD::caloTowerTotalE
double caloTowerTotalE(void) const
Definition: HcalNoiseHPD.cc:169
reco::HcalNoiseHPD::maxZeros_
int maxZeros_
Definition: HcalNoiseHPD.h:136
reco::HcalNoiseHPD::caloTowers
const edm::RefVector< CaloTowerCollection > caloTowers(void) const
Definition: HcalNoiseHPD.cc:153
reco::HcalNoiseHPD::big5Charge_
std::vector< float > big5Charge_
Definition: HcalNoiseHPD.h:138
reco::HcalNoiseHPD::totalZeros_
int totalZeros_
Definition: HcalNoiseHPD.h:135
reco::HcalNoiseHPD::numRecHits
int numRecHits(float threshold=1.5) const
Definition: HcalNoiseHPD.cc:131
reco::HcalNoiseHPD::big5ChargeTotal
float big5ChargeTotal(void) const
Definition: HcalNoiseHPD.cc:58
reco::HcalNoiseHPD::caloTowerEmE
double caloTowerEmE(void) const
Definition: HcalNoiseHPD.cc:162
RefVector.h
HcalCaloFlagLabels.h
reco::HcalNoiseHPD::big5Charge
const std::vector< float > big5Charge(void) const
Definition: HcalNoiseHPD.cc:56
reco::HcalNoiseHPD::maxZeros
int maxZeros(void) const
Definition: HcalNoiseHPD.cc:82
reco::HcalNoiseHPDCollection
std::vector< HcalNoiseHPD > HcalNoiseHPDCollection
Definition: HcalNoiseHPD.h:35
reco::HcalNoiseHPD::big5ChargeHighest2TS
float big5ChargeHighest2TS(unsigned int firstts=4) const
Definition: HcalNoiseHPD.cc:66
reco::HcalNoiseHPD::totalZeros
int totalZeros(void) const
Definition: HcalNoiseHPD.cc:80
reco::HcalNoiseHPD::rechits_
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141
HcalSubdetector.h
reco::HcalNoiseHPD::bigChargeTotal
float bigChargeTotal(void) const
Definition: HcalNoiseHPD.cc:34
reco::HcalNoiseHPD::recHitEnergy
float recHitEnergy(float threshold=1.5) const
Definition: HcalNoiseHPD.cc:86
CaloTowerCollection.h
reco::HcalNoiseHPD::bigChargeHighest3TS
float bigChargeHighest3TS(unsigned int firstts=4) const
Definition: HcalNoiseHPD.cc:49
reco::HcalNoiseHPD::~HcalNoiseHPD
virtual ~HcalNoiseHPD()
Definition: HcalNoiseHPD.cc:27
reco::HcalNoiseRBXArray
Definition: HcalNoiseRBXArray.h:27
Ref.h
reco::HcalNoiseHPD::bigCharge
const std::vector< float > bigCharge(void) const
Definition: HcalNoiseHPD.cc:32
reco::HcalNoiseHPD::bigCharge_
std::vector< float > bigCharge_
Definition: HcalNoiseHPD.h:137
HcalRecHitCollections.h
reco::RefHBHERecHitEnergyComparison
Definition: HcalNoiseHPD.h:46
reco::HcalNoiseHPD::idnumber
int idnumber(void) const
Definition: HcalNoiseHPD.cc:30
reco::HcalNoiseHPD::caloTowerHadE
double caloTowerHadE(void) const
Definition: HcalNoiseHPD.cc:155
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:426
reco::HcalNoiseHPD::numRecHitsFailR45
int numRecHitsFailR45(float threshold=1.5) const
Definition: HcalNoiseHPD.cc:144
CaloRecHitAuxSetter.h
HBHEDataFrame.h