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
 
double recHitEnergy (double theshold=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 102 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:110
std::vector< float > allCharge_
Definition: HcalNoiseRBX.h:113
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:113
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:113
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:113
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:113
double HcalNoiseRBX::caloTowerEmE ( void  ) const

Definition at line 146 of file HcalNoiseRBX.cc.

References alignCSCRings::e, and uniqueTowers().

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

147 {
148  double e=0;
149  towerset_t twrs;
150  uniqueTowers(twrs);
151  for(towerset_t::const_iterator it=twrs.begin(); it!=twrs.end(); ++it) {
152  e += it->emEnergy();
153  }
154  return e;
155 }
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:102
void uniqueTowers(towerset_t &twrs_) const
double HcalNoiseRBX::caloTowerEmFraction ( void  ) const

Definition at line 168 of file HcalNoiseRBX.cc.

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

169 {
170  double e=0, h=0;
171  towerset_t twrs;
172  uniqueTowers(twrs);
173  for(towerset_t::const_iterator it=twrs.begin(); it!=twrs.end(); ++it) {
174  h += it->hadEnergy();
175  e += it->emEnergy();
176  }
177  return (e+h)==0 ? 999 : e/(e+h);
178 }
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:102
void uniqueTowers(towerset_t &twrs_) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
double HcalNoiseRBX::caloTowerHadE ( void  ) const

Definition at line 135 of file HcalNoiseRBX.cc.

References h, and uniqueTowers().

136 {
137  double h=0;
138  towerset_t twrs;
139  uniqueTowers(twrs);
140  for(towerset_t::const_iterator it=twrs.begin(); it!=twrs.end(); ++it) {
141  h += it->hadEnergy();
142  }
143  return h;
144 }
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:102
void uniqueTowers(towerset_t &twrs_) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
double HcalNoiseRBX::caloTowerTotalE ( void  ) const

Definition at line 157 of file HcalNoiseRBX.cc.

References alignCSCRings::e, and uniqueTowers().

158 {
159  double e=0;
160  towerset_t twrs;
161  uniqueTowers(twrs);
162  for(towerset_t::const_iterator it=twrs.begin(); it!=twrs.end(); ++it) {
163  e += it->hadEnergy() + it->emEnergy();
164  }
165  return e;
166 }
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:102
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:110
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:110
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:110
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:110
double HcalNoiseRBX::maxRecHitTime ( double  threshold = 20.0) const

Definition at line 117 of file HcalNoiseRBX.cc.

References hpds_, and i.

118 {
119  double maxtime=-9999999.;
120  for(unsigned int i=0; i<hpds_.size(); i++) {
121  double temptime=hpds_[i].maxRecHitTime(threshold);
122  if(temptime>maxtime) maxtime=temptime;
123  }
124  return maxtime;
125 }
int i
Definition: DBlmapReader.cc:9
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:110
int HcalNoiseRBX::maxZeros ( void  ) const

Definition at line 90 of file HcalNoiseRBX.cc.

References hpds_, i, and 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
const T & max(const T &a, const T &b)
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:110
double HcalNoiseRBX::minRecHitTime ( double  threshold = 20.0) const

Definition at line 107 of file HcalNoiseRBX.cc.

References hpds_, and i.

108 {
109  double mintime=9999999.;
110  for(unsigned int i=0; i<hpds_.size(); i++) {
111  double temptime=hpds_[i].minRecHitTime(threshold);
112  if(temptime<mintime) mintime=temptime;
113  }
114  return mintime;
115 }
int i
Definition: DBlmapReader.cc:9
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:110
int HcalNoiseRBX::numRecHits ( double  threshold = 1.5) const

Definition at line 127 of file HcalNoiseRBX.cc.

References hpds_, i, and pileupDistInMC::total.

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

128 {
129  int total=0;
130  for(unsigned int i=0; i<hpds_.size(); i++)
131  total += hpds_[i].numRecHits(threshold);
132  return total;
133 }
int i
Definition: DBlmapReader.cc:9
int numRecHits(double threshold=1.5) const
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:110
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:110
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:110
int totalZeros(void) const
Definition: HcalNoiseRBX.cc:82
void HcalNoiseRBX::uniqueTowers ( towerset_t twrs_) const
private

Definition at line 180 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().

181 {
182  twrs_.clear();
183  for(std::vector<HcalNoiseHPD>::const_iterator it1=hpds_.begin(); it1!=hpds_.end(); ++it1) {
184  edm::RefVector<CaloTowerCollection> twrsref=it1->caloTowers();
185  for(edm::RefVector<CaloTowerCollection>::const_iterator it2=twrsref.begin(); it2!=twrsref.end(); ++it2) {
186  CaloTower twr=**it2;
187  twrs_.insert(twr);
188  }
189  }
190  return;
191 }
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:249
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:244
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:110

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 107 of file HcalNoiseRBX.h.

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