CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
reco::HcalNoiseRBX Class Reference

#include <HcalNoiseRBX.h>

Classes

struct  twrcomp
 

Public Types

typedef std::set< CaloTower, twrcomptowerset_t
 

Public Member Functions

const std::vector< float > allCharge (void) const
 
float allChargeHighest2TS (unsigned int firstts=4) const
 
float allChargeHighest3TS (unsigned int firstts=4) const
 
float allChargeTotal (void) const
 
double caloTowerEmE (void) const
 
double caloTowerEmFraction (void) const
 
double caloTowerHadE (void) const
 
double caloTowerTotalE (void) const
 
 HcalNoiseRBX ()
 
const std::vector< HcalNoiseHPDHPDs (void) const
 
std::vector< HcalNoiseHPD >::const_iterator HPDsBegin (void) const
 
std::vector< HcalNoiseHPD >::const_iterator HPDsEnd (void) const
 
int idnumber (void) const
 
std::vector< HcalNoiseHPD >::const_iterator maxHPD (double threshold=1.5) const
 
double maxRecHitTime (double threshold=20.0) const
 
int maxZeros (void) const
 
double minRecHitTime (double threshold=20.0) const
 
int numRecHits (double threshold=1.5) const
 
int numRecHitsFailR45 (double threshold=1.5) const
 
double recHitEnergy (double theshold=1.5) const
 
double recHitEnergyFailR45 (double threshold=1.5) const
 
int totalZeros (void) const
 
 ~HcalNoiseRBX ()
 

Private Member Functions

void uniqueTowers (towerset_t &twrs_) const
 

Private Attributes

std::vector< float > allCharge_
 
std::vector< HcalNoiseHPDhpds_
 
int idnumber_
 

Friends

class HcalNoiseInfoProducer
 
class HcalNoiseRBXArray
 

Detailed Description

Definition at line 35 of file HcalNoiseRBX.h.

Member Typedef Documentation

Definition at line 104 of file HcalNoiseRBX.h.

Constructor & Destructor Documentation

HcalNoiseRBX::HcalNoiseRBX ( )

Definition at line 16 of file HcalNoiseRBX.cc.

16  :
17  idnumber_(0), hpds_(4),
19 {
20 }
static const int MAXSAMPLES
Definition: HBHEDataFrame.h:92
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112
std::vector< float > allCharge_
Definition: HcalNoiseRBX.h:115
HcalNoiseRBX::~HcalNoiseRBX ( )

Definition at line 23 of file HcalNoiseRBX.cc.

24 {
25 }

Member Function Documentation

const std::vector< float > HcalNoiseRBX::allCharge ( void  ) const

Definition at line 52 of file HcalNoiseRBX.cc.

References allCharge_.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData(), and HPDsEnd().

53 {
54  return allCharge_;
55 }
std::vector< float > allCharge_
Definition: HcalNoiseRBX.h:115
float HcalNoiseRBX::allChargeHighest2TS ( unsigned int  firstts = 4) const

Definition at line 65 of file HcalNoiseRBX.cc.

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

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData(), and HPDsEnd().

66 {
67  float total=0;
68  for(unsigned int i=firstts; i<firstts+2 && !allCharge_.empty(); i++)
69  total += allCharge_[i];
70  return total;
71 }
std::vector< float > allCharge_
Definition: HcalNoiseRBX.h:115
float HcalNoiseRBX::allChargeHighest3TS ( unsigned int  firstts = 4) const

Definition at line 73 of file HcalNoiseRBX.cc.

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

Referenced by HPDsEnd().

74 {
75  float total=0;
76  for(unsigned int i=firstts; i<firstts+3 && !allCharge_.empty(); i++)
77  total += allCharge_[i];
78  return total;
79 }
std::vector< float > allCharge_
Definition: HcalNoiseRBX.h:115
float HcalNoiseRBX::allChargeTotal ( void  ) const

Definition at line 57 of file HcalNoiseRBX.cc.

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

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData(), and HPDsEnd().

58 {
59  float total=0;
60  for(unsigned int i=0; i<allCharge_.size(); i++)
61  total += allCharge_[i];
62  return total;
63 }
std::vector< float > allCharge_
Definition: HcalNoiseRBX.h:115
double HcalNoiseRBX::caloTowerEmE ( void  ) const

Definition at line 162 of file HcalNoiseRBX.cc.

References MillePedeFileConverter_cfg::e, and uniqueTowers().

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData(), and HPDsEnd().

163 {
164  double e=0;
165  towerset_t twrs;
166  uniqueTowers(twrs);
167  for(towerset_t::const_iterator it=twrs.begin(); it!=twrs.end(); ++it) {
168  e += it->emEnergy();
169  }
170  return e;
171 }
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:104
void uniqueTowers(towerset_t &twrs_) const
double HcalNoiseRBX::caloTowerEmFraction ( void  ) const

Definition at line 184 of file HcalNoiseRBX.cc.

References MillePedeFileConverter_cfg::e, h, and uniqueTowers().

Referenced by HPDsEnd().

185 {
186  double e=0, h=0;
187  towerset_t twrs;
188  uniqueTowers(twrs);
189  for(towerset_t::const_iterator it=twrs.begin(); it!=twrs.end(); ++it) {
190  h += it->hadEnergy();
191  e += it->emEnergy();
192  }
193  return (e+h)==0 ? 999 : e/(e+h);
194 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:104
void uniqueTowers(towerset_t &twrs_) const
double HcalNoiseRBX::caloTowerHadE ( void  ) const

Definition at line 151 of file HcalNoiseRBX.cc.

References h, and uniqueTowers().

Referenced by HPDsEnd().

152 {
153  double h=0;
154  towerset_t twrs;
155  uniqueTowers(twrs);
156  for(towerset_t::const_iterator it=twrs.begin(); it!=twrs.end(); ++it) {
157  h += it->hadEnergy();
158  }
159  return h;
160 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:104
void uniqueTowers(towerset_t &twrs_) const
double HcalNoiseRBX::caloTowerTotalE ( void  ) const

Definition at line 173 of file HcalNoiseRBX.cc.

References MillePedeFileConverter_cfg::e, and uniqueTowers().

Referenced by HPDsEnd().

174 {
175  double e=0;
176  towerset_t twrs;
177  uniqueTowers(twrs);
178  for(towerset_t::const_iterator it=twrs.begin(); it!=twrs.end(); ++it) {
179  e += it->hadEnergy() + it->emEnergy();
180  }
181  return e;
182 }
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:104
void uniqueTowers(towerset_t &twrs_) const
const std::vector< HcalNoiseHPD > HcalNoiseRBX::HPDs ( void  ) const

Definition at line 33 of file HcalNoiseRBX.cc.

References hpds_.

34 {
35  return hpds_;
36 }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112
std::vector<HcalNoiseHPD>::const_iterator reco::HcalNoiseRBX::HPDsBegin ( void  ) const
inline

Definition at line 61 of file HcalNoiseRBX.h.

References hpds_.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

61 { return hpds_.begin(); }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112
std::vector<HcalNoiseHPD>::const_iterator reco::HcalNoiseRBX::HPDsEnd ( void  ) const
inline
int HcalNoiseRBX::idnumber ( void  ) const

Definition at line 28 of file HcalNoiseRBX.cc.

References idnumber_.

29 {
30  return idnumber_;
31 }
std::vector< HcalNoiseHPD >::const_iterator HcalNoiseRBX::maxHPD ( double  threshold = 1.5) const

Definition at line 38 of file HcalNoiseRBX.cc.

References hpds_.

Referenced by HPDsEnd().

39 {
40  std::vector<HcalNoiseHPD>::const_iterator maxit=hpds_.end();
41  double maxenergy=-99999999.;
42  for(std::vector<HcalNoiseHPD>::const_iterator it=hpds_.begin(); it!=hpds_.end(); ++it) {
43  double tempenergy=it->recHitEnergy();
44  if(tempenergy>maxenergy) {
45  maxenergy=tempenergy;
46  maxit=it;
47  }
48  }
49  return maxit;
50 }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112
double HcalNoiseRBX::maxRecHitTime ( double  threshold = 20.0) const

Definition at line 125 of file HcalNoiseRBX.cc.

References hpds_, mps_fire::i, and CastorTowerReco_cfi::maxtime.

Referenced by HPDsEnd().

126 {
127  double maxtime=-9999999.;
128  for(unsigned int i=0; i<hpds_.size(); i++) {
129  double temptime=hpds_[i].maxRecHitTime(threshold);
130  if(temptime>maxtime) maxtime=temptime;
131  }
132  return maxtime;
133 }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112
int HcalNoiseRBX::maxZeros ( void  ) const

Definition at line 90 of file HcalNoiseRBX.cc.

References hpds_, mps_fire::i, and SiStripPI::max.

Referenced by HPDsEnd().

91 {
92  int max=0;
93  for(unsigned int i=0; i<hpds_.size(); i++)
94  if(hpds_[i].maxZeros()>max)
95  max=hpds_[i].maxZeros();
96  return max;
97 }
int maxZeros(void) const
Definition: HcalNoiseRBX.cc:90
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112
double HcalNoiseRBX::minRecHitTime ( double  threshold = 20.0) const

Definition at line 115 of file HcalNoiseRBX.cc.

References hpds_, mps_fire::i, and CastorTowerReco_cfi::mintime.

Referenced by HPDsEnd().

116 {
117  double mintime=9999999.;
118  for(unsigned int i=0; i<hpds_.size(); i++) {
119  double temptime=hpds_[i].minRecHitTime(threshold);
120  if(temptime<mintime) mintime=temptime;
121  }
122  return mintime;
123 }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112
int HcalNoiseRBX::numRecHits ( double  threshold = 1.5) const

Definition at line 135 of file HcalNoiseRBX.cc.

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

Referenced by NoiseRates::analyze(), HcalNoiseRates::analyze(), CommonHcalNoiseRBXData::CommonHcalNoiseRBXData(), and HPDsEnd().

136 {
137  int total=0;
138  for(unsigned int i=0; i<hpds_.size(); i++)
139  total += hpds_[i].numRecHits(threshold);
140  return total;
141 }
int numRecHits(double threshold=1.5) const
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112
int HcalNoiseRBX::numRecHitsFailR45 ( double  threshold = 1.5) const

Definition at line 143 of file HcalNoiseRBX.cc.

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

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData(), and HPDsEnd().

144 {
145  int total=0;
146  for(unsigned int i=0; i<hpds_.size(); i++)
147  total += hpds_[i].numRecHitsFailR45(threshold);
148  return total;
149 }
int numRecHitsFailR45(double threshold=1.5) const
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112
double HcalNoiseRBX::recHitEnergy ( double  theshold = 1.5) const

Definition at line 99 of file HcalNoiseRBX.cc.

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

Referenced by NoiseRates::analyze(), HcalNoiseRates::analyze(), CommonHcalNoiseRBXData::CommonHcalNoiseRBXData(), and HPDsEnd().

100 {
101  double total=0;
102  for(unsigned int i=0; i<hpds_.size(); i++)
103  total += hpds_[i].recHitEnergy(threshold);
104  return total;
105 }
double recHitEnergy(double theshold=1.5) const
Definition: HcalNoiseRBX.cc:99
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112
double HcalNoiseRBX::recHitEnergyFailR45 ( double  threshold = 1.5) const

Definition at line 107 of file HcalNoiseRBX.cc.

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

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData(), and HPDsEnd().

108 {
109  double total=0;
110  for(unsigned int i=0; i<hpds_.size(); i++)
112  return total;
113 }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112
double recHitEnergyFailR45(double threshold=1.5) const
int HcalNoiseRBX::totalZeros ( void  ) const

Definition at line 82 of file HcalNoiseRBX.cc.

References hpds_, and mps_fire::i.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData(), and HPDsEnd().

83 {
84  int tot=0;
85  for(unsigned int i=0; i<hpds_.size(); i++)
86  tot += hpds_[i].totalZeros();
87  return tot;
88 }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112
int totalZeros(void) const
Definition: HcalNoiseRBX.cc:82
void HcalNoiseRBX::uniqueTowers ( towerset_t twrs_) const
private

Definition at line 196 of file HcalNoiseRBX.cc.

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

Referenced by caloTowerEmE(), caloTowerEmFraction(), caloTowerHadE(), and caloTowerTotalE().

197 {
198  twrs_.clear();
199  for(std::vector<HcalNoiseHPD>::const_iterator it1=hpds_.begin(); it1!=hpds_.end(); ++it1) {
200  edm::RefVector<CaloTowerCollection> twrsref=it1->caloTowers();
201  for(edm::RefVector<CaloTowerCollection>::const_iterator it2=twrsref.begin(); it2!=twrsref.end(); ++it2) {
202  CaloTower twr=**it2;
203  twrs_.insert(twr);
204  }
205  }
206  return;
207 }
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
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112

Friends And Related Function Documentation

friend class HcalNoiseInfoProducer
friend

Definition at line 37 of file HcalNoiseRBX.h.

friend class HcalNoiseRBXArray
friend

Definition at line 38 of file HcalNoiseRBX.h.

Member Data Documentation

std::vector<float> reco::HcalNoiseRBX::allCharge_
private
std::vector<HcalNoiseHPD> reco::HcalNoiseRBX::hpds_
private
int reco::HcalNoiseRBX::idnumber_
private

Definition at line 109 of file HcalNoiseRBX.h.

Referenced by reco::HcalNoiseRBXArray::HcalNoiseRBXArray(), and idnumber().