CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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,
twrcomp
towerset_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
 
virtual ~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:54
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112
std::vector< float > allCharge_
Definition: HcalNoiseRBX.h:115
HcalNoiseRBX::~HcalNoiseRBX ( )
virtual

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().

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_, i, and pileupDistInMC::total.

Referenced by HcalNoiseMonitor::analyze(), and CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

66 {
67  float total=0;
68  for(unsigned int i=firstts; i<firstts+2 && allCharge_.size(); i++)
69  total += allCharge_[i];
70  return total;
71 }
int i
Definition: DBlmapReader.cc:9
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_, i, and pileupDistInMC::total.

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

Definition at line 57 of file HcalNoiseRBX.cc.

References allCharge_, i, and pileupDistInMC::total.

Referenced by HcalNoiseMonitor::analyze(), and CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

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

Definition at line 162 of file HcalNoiseRBX.cc.

References alignCSCRings::e, and uniqueTowers().

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

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 alignCSCRings::e, h, and uniqueTowers().

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 }
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:104
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
void uniqueTowers(towerset_t &twrs_) const
double HcalNoiseRBX::caloTowerHadE ( void  ) const

Definition at line 151 of file HcalNoiseRBX.cc.

References h, and uniqueTowers().

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 }
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:104
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
void uniqueTowers(towerset_t &twrs_) const
double HcalNoiseRBX::caloTowerTotalE ( void  ) const

Definition at line 173 of file HcalNoiseRBX.cc.

References alignCSCRings::e, and uniqueTowers().

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_.

Referenced by HcalNoiseMonitor::analyze().

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

Definition at line 62 of file HcalNoiseRBX.h.

References hpds_.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

62 { return hpds_.end(); }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112
int HcalNoiseRBX::idnumber ( void  ) const

Definition at line 28 of file HcalNoiseRBX.cc.

References idnumber_.

Referenced by HcalNoiseMonitor::analyze().

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_.

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_, and i.

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 }
int i
Definition: DBlmapReader.cc:9
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:112
int HcalNoiseRBX::maxZeros ( void  ) const

Definition at line 90 of file HcalNoiseRBX.cc.

References hpds_, i, and bookConverter::max.

Referenced by HcalNoiseMonitor::analyze().

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 i
Definition: DBlmapReader.cc:9
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_, and i.

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 }
int i
Definition: DBlmapReader.cc:9
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_, i, and pileupDistInMC::total.

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

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 i
Definition: DBlmapReader.cc:9
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_, i, and pileupDistInMC::total.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

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 i
Definition: DBlmapReader.cc:9
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_, i, and pileupDistInMC::total.

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

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 }
int i
Definition: DBlmapReader.cc:9
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_, i, and pileupDistInMC::total.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

108 {
109  double total=0;
110  for(unsigned int i=0; i<hpds_.size(); i++)
112  return total;
113 }
int i
Definition: DBlmapReader.cc:9
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 i.

Referenced by HcalNoiseMonitor::analyze(), and CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

83 {
84  int tot=0;
85  for(unsigned int i=0; i<hpds_.size(); i++)
86  tot += hpds_[i].totalZeros();
87  return tot;
88 }
int i
Definition: DBlmapReader.cc:9
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:255
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:250
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().