CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
reco::HcalNoiseHPD Class Reference

#include <HcalNoiseHPD.h>

Public Member Functions

const std::vector< float > big5Charge (void) const
 
float big5ChargeHighest2TS (unsigned int firstts=4) const
 
float big5ChargeHighest3TS (unsigned int firstts=4) const
 
float big5ChargeTotal (void) const
 
const std::vector< float > bigCharge (void) const
 
float bigChargeHighest2TS (unsigned int firstts=4) const
 
float bigChargeHighest3TS (unsigned int firstts=4) const
 
float bigChargeTotal (void) const
 
double caloTowerEmE (void) const
 
double caloTowerEmFraction (void) const
 
double caloTowerHadE (void) const
 
const edm::RefVector< CaloTowerCollectioncaloTowers (void) const
 
double caloTowerTotalE (void) const
 
 HcalNoiseHPD ()
 
int idnumber (void) const
 
float maxRecHitTime (float threshold=10.0) const
 
int maxZeros (void) const
 
float minRecHitTime (float threshold=10.0) const
 
int numRecHits (float threshold=1.5) const
 
int numRecHitsFailR45 (float threshold=1.5) const
 
float recHitEnergy (float threshold=1.5) const
 
float recHitEnergyFailR45 (float threshold=1.5) const
 
const edm::RefVector< HBHERecHitCollectionrecHits (void) const
 
int totalZeros (void) const
 
virtual ~HcalNoiseHPD ()
 

Private Attributes

std::vector< float > big5Charge_
 
std::vector< float > bigCharge_
 
edm::RefVector< CaloTowerCollectioncalotowers_
 
int idnumber_
 
int maxZeros_
 
edm::RefVector< HBHERecHitCollectionrechits_
 
std::set< edm::Ref< HBHERecHitCollection >, RefHBHERecHitEnergyComparisonrefrechitset_
 
int totalZeros_
 

Friends

class HcalNoiseInfoProducer
 
class HcalNoiseRBXArray
 

Detailed Description

Definition at line 55 of file HcalNoiseHPD.h.

Constructor & Destructor Documentation

HcalNoiseHPD::HcalNoiseHPD ( )

Definition at line 16 of file HcalNoiseHPD.cc.

References calotowers_, rechits_, and edm::RefVector< C, T, F >::reserve().

17  : idnumber_(0), totalZeros_(0), maxZeros_(0),
20 {
21  // reserve some space, so that there's no reallocation issues
22  rechits_.reserve(19);
23  calotowers_.reserve(19);
24 }
static const int MAXSAMPLES
Definition: HBHEDataFrame.h:54
std::vector< float > bigCharge_
Definition: HcalNoiseHPD.h:137
std::vector< float > big5Charge_
Definition: HcalNoiseHPD.h:138
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141
void reserve(size_type n)
Reserve space for RefVector.
Definition: RefVector.h:113
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148
HcalNoiseHPD::~HcalNoiseHPD ( )
virtual

Definition at line 27 of file HcalNoiseHPD.cc.

28 {
29 }

Member Function Documentation

const std::vector< float > HcalNoiseHPD::big5Charge ( void  ) const

Definition at line 68 of file HcalNoiseHPD.cc.

References big5Charge_.

69 {
70  return big5Charge_;
71 }
std::vector< float > big5Charge_
Definition: HcalNoiseHPD.h:138
float HcalNoiseHPD::big5ChargeHighest2TS ( unsigned int  firstts = 4) const

Definition at line 82 of file HcalNoiseHPD.cc.

References big5Charge_, mps_fire::i, and pileupDistInMC::total.

83 {
84  float total=0;
85  for(unsigned int i=firstts; i<firstts+2 && i<big5Charge_.size(); i++)
86  total += big5Charge_[i];
87  return total;
88 }
std::vector< float > big5Charge_
Definition: HcalNoiseHPD.h:138
float HcalNoiseHPD::big5ChargeHighest3TS ( unsigned int  firstts = 4) const

Definition at line 90 of file HcalNoiseHPD.cc.

References big5Charge_, mps_fire::i, and pileupDistInMC::total.

91 {
92  float total=0;
93  for(unsigned int i=firstts; i<firstts+2 && i<big5Charge_.size(); i++)
94  total += big5Charge_[i];
95  return total;
96 }
std::vector< float > big5Charge_
Definition: HcalNoiseHPD.h:138
float HcalNoiseHPD::big5ChargeTotal ( void  ) const

Definition at line 73 of file HcalNoiseHPD.cc.

References big5Charge_, mps_fire::i, and pileupDistInMC::total.

74 {
75  float total=0;
76  for(unsigned int i=0; i<big5Charge_.size(); i++) {
77  total += big5Charge_[i];
78  }
79  return total;
80 }
std::vector< float > big5Charge_
Definition: HcalNoiseHPD.h:138
const std::vector< float > HcalNoiseHPD::bigCharge ( void  ) const

Definition at line 37 of file HcalNoiseHPD.cc.

References bigCharge_.

38 {
39  return bigCharge_;
40 }
std::vector< float > bigCharge_
Definition: HcalNoiseHPD.h:137
float HcalNoiseHPD::bigChargeHighest2TS ( unsigned int  firstts = 4) const

Definition at line 51 of file HcalNoiseHPD.cc.

References bigCharge_, mps_fire::i, and pileupDistInMC::total.

52 {
53  float total=0;
54  for(unsigned int i=firstts; i<firstts+2 && i<bigCharge_.size(); i++)
55  total += bigCharge_[i];
56  return total;
57 }
std::vector< float > bigCharge_
Definition: HcalNoiseHPD.h:137
float HcalNoiseHPD::bigChargeHighest3TS ( unsigned int  firstts = 4) const

Definition at line 60 of file HcalNoiseHPD.cc.

References bigCharge_, mps_fire::i, and pileupDistInMC::total.

61 {
62  float total=0;
63  for(unsigned int i=firstts; i<firstts+3 && i<bigCharge_.size(); i++)
64  total += bigCharge_[i];
65  return total;
66 }
std::vector< float > bigCharge_
Definition: HcalNoiseHPD.h:137
float HcalNoiseHPD::bigChargeTotal ( void  ) const

Definition at line 42 of file HcalNoiseHPD.cc.

References bigCharge_, mps_fire::i, and pileupDistInMC::total.

43 {
44  float total=0;
45  for(unsigned int i=0; i<bigCharge_.size(); i++) {
46  total += bigCharge_[i];
47  }
48  return total;
49 }
std::vector< float > bigCharge_
Definition: HcalNoiseHPD.h:137
double HcalNoiseHPD::caloTowerEmE ( void  ) const

Definition at line 188 of file HcalNoiseHPD.cc.

References edm::RefVector< C, T, F >::begin(), calotowers_, edm::RefVector< C, T, F >::end(), and pileupDistInMC::total.

189 {
190  double total=0;
192  total += (*it)->emEnergy();
193  return total;
194 }
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:253
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:248
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148
double HcalNoiseHPD::caloTowerEmFraction ( void  ) const

Definition at line 204 of file HcalNoiseHPD.cc.

References edm::RefVector< C, T, F >::begin(), calotowers_, MillePedeFileConverter_cfg::e, edm::RefVector< C, T, F >::end(), and h.

205 {
206  double h=0, e=0;
208  e += (*it)->emEnergy();
209  h += (*it)->hadEnergy();
210  }
211  return (e+h)!=0 ? e/(e+h) : 999.;
212 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:253
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:248
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148
double HcalNoiseHPD::caloTowerHadE ( void  ) const

Definition at line 180 of file HcalNoiseHPD.cc.

References edm::RefVector< C, T, F >::begin(), calotowers_, edm::RefVector< C, T, F >::end(), and pileupDistInMC::total.

181 {
182  double total=0;
184  total += (*it)->hadEnergy();
185  return total;
186 }
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:253
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:248
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148
const edm::RefVector< CaloTowerCollection > HcalNoiseHPD::caloTowers ( void  ) const

Definition at line 175 of file HcalNoiseHPD.cc.

References calotowers_.

176 {
177  return calotowers_;
178 }
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148
double HcalNoiseHPD::caloTowerTotalE ( void  ) const

Definition at line 196 of file HcalNoiseHPD.cc.

References edm::RefVector< C, T, F >::begin(), calotowers_, edm::RefVector< C, T, F >::end(), and pileupDistInMC::total.

197 {
198  double total=0;
200  total += (*it)->emEnergy()+(*it)->hadEnergy();
201  return total;
202 }
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:253
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:248
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148
int HcalNoiseHPD::idnumber ( void  ) const

Definition at line 32 of file HcalNoiseHPD.cc.

References idnumber_.

33 {
34  return idnumber_;
35 }
float HcalNoiseHPD::maxRecHitTime ( float  threshold = 10.0) const

Definition at line 146 of file HcalNoiseHPD.cc.

References CastorTowerReco_cfi::maxtime, rechits_, electronIdCutBased_cfi::threshold, and ntuplemaker::time.

147 {
148  float maxtime=-9999999;
150  if((*it)->energy()<threshold) continue;
151  float time=(*it)->time();
152  if(maxtime<time) maxtime=time;
153  }
154  return maxtime;
155 }
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141
int HcalNoiseHPD::maxZeros ( void  ) const

Definition at line 103 of file HcalNoiseHPD.cc.

References maxZeros_.

104 {
105  return maxZeros_;
106 }
float HcalNoiseHPD::minRecHitTime ( float  threshold = 10.0) const

Definition at line 135 of file HcalNoiseHPD.cc.

References CastorTowerReco_cfi::mintime, rechits_, electronIdCutBased_cfi::threshold, and ntuplemaker::time.

136 {
137  float mintime=9999999;
139  if((*it)->energy()<threshold) continue;
140  float time=(*it)->time();
141  if(mintime>time) mintime=time;
142  }
143  return mintime;
144 }
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141
int HcalNoiseHPD::numRecHits ( float  threshold = 1.5) const

Definition at line 157 of file HcalNoiseHPD.cc.

References KineDebug3::count(), rechits_, and electronIdCutBased_cfi::threshold.

158 {
159  int count=0;
161  if((*it)->eraw()>=threshold) ++count;
162  return count;
163 }
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141
int HcalNoiseHPD::numRecHitsFailR45 ( float  threshold = 1.5) const
float HcalNoiseHPD::recHitEnergy ( float  threshold = 1.5) const

Definition at line 113 of file HcalNoiseHPD.cc.

References rechits_, and pileupDistInMC::total.

114 {
115  double total=0.0;
117  const float energy=(*it)->eraw();
118  if(energy>=threshold) total+=energy;
119  }
120  return total;
121 }
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141
float HcalNoiseHPD::recHitEnergyFailR45 ( float  threshold = 1.5) const

Definition at line 123 of file HcalNoiseHPD.cc.

References HcalCaloFlagLabels::HBHEOOTPU, HcalCaloFlagLabels::HBHETS4TS5Noise, rechits_, and pileupDistInMC::total.

124 {
125  double total=0.0;
127  const float energy=(*it)->eraw();
128  if( (*it)->flagField(HcalCaloFlagLabels::HBHETS4TS5Noise) &&
129  !(*it)->flagField(HcalCaloFlagLabels::HBHEOOTPU) )
130  if(energy>=threshold) total+=energy;
131  }
132  return total;
133 }
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141
const edm::RefVector< HBHERecHitCollection > HcalNoiseHPD::recHits ( void  ) const

Definition at line 108 of file HcalNoiseHPD.cc.

References rechits_.

109 {
110  return rechits_;
111 }
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141
int HcalNoiseHPD::totalZeros ( void  ) const

Definition at line 98 of file HcalNoiseHPD.cc.

References totalZeros_.

99 {
100  return totalZeros_;
101 }

Friends And Related Function Documentation

friend class HcalNoiseInfoProducer
friend

Definition at line 56 of file HcalNoiseHPD.h.

friend class HcalNoiseRBXArray
friend

Definition at line 57 of file HcalNoiseHPD.h.

Member Data Documentation

std::vector<float> reco::HcalNoiseHPD::big5Charge_
private
std::vector<float> reco::HcalNoiseHPD::bigCharge_
private
edm::RefVector<CaloTowerCollection> reco::HcalNoiseHPD::calotowers_
private
int reco::HcalNoiseHPD::idnumber_
private

Definition at line 132 of file HcalNoiseHPD.h.

Referenced by idnumber().

int reco::HcalNoiseHPD::maxZeros_
private

Definition at line 136 of file HcalNoiseHPD.h.

Referenced by reco::HcalNoiseInfoProducer::filldigis(), and maxZeros().

edm::RefVector<HBHERecHitCollection> reco::HcalNoiseHPD::rechits_
private
std::set<edm::Ref<HBHERecHitCollection>, RefHBHERecHitEnergyComparison> reco::HcalNoiseHPD::refrechitset_
private

Definition at line 145 of file HcalNoiseHPD.h.

Referenced by reco::HcalNoiseInfoProducer::fillrechits().

int reco::HcalNoiseHPD::totalZeros_
private

Definition at line 135 of file HcalNoiseHPD.h.

Referenced by reco::HcalNoiseInfoProducer::filldigis(), and totalZeros().