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

Member Typedef Documentation

Definition at line 98 of file HcalNoiseRBX.h.

Constructor & Destructor Documentation

HcalNoiseRBX::HcalNoiseRBX ( )

Definition at line 15 of file HcalNoiseRBX.cc.

static const int MAXSAMPLES
Definition: HBHEDataFrame.h:95
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105
std::vector< float > allCharge_
Definition: HcalNoiseRBX.h:108
HcalNoiseRBX::~HcalNoiseRBX ( )

Definition at line 18 of file HcalNoiseRBX.cc.

18 {}

Member Function Documentation

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

Definition at line 38 of file HcalNoiseRBX.cc.

References allCharge_.

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

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

Definition at line 47 of file HcalNoiseRBX.cc.

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

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

47  {
48  float total = 0;
49  for (unsigned int i = firstts; i < firstts + 2 && !allCharge_.empty(); i++)
50  total += allCharge_[i];
51  return total;
52 }
std::vector< float > allCharge_
Definition: HcalNoiseRBX.h:108
float HcalNoiseRBX::allChargeHighest3TS ( unsigned int  firstts = 4) const

Definition at line 54 of file HcalNoiseRBX.cc.

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

Referenced by HPDsEnd().

54  {
55  float total = 0;
56  for (unsigned int i = firstts; i < firstts + 3 && !allCharge_.empty(); i++)
57  total += allCharge_[i];
58  return total;
59 }
std::vector< float > allCharge_
Definition: HcalNoiseRBX.h:108
float HcalNoiseRBX::allChargeTotal ( void  ) const

Definition at line 40 of file HcalNoiseRBX.cc.

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

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

40  {
41  float total = 0;
42  for (unsigned int i = 0; i < allCharge_.size(); i++)
43  total += allCharge_[i];
44  return total;
45 }
std::vector< float > allCharge_
Definition: HcalNoiseRBX.h:108
double HcalNoiseRBX::caloTowerEmE ( void  ) const

Definition at line 134 of file HcalNoiseRBX.cc.

References MillePedeFileConverter_cfg::e, and uniqueTowers().

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

134  {
135  double e = 0;
136  towerset_t twrs;
137  uniqueTowers(twrs);
138  for (towerset_t::const_iterator it = twrs.begin(); it != twrs.end(); ++it) {
139  e += it->emEnergy();
140  }
141  return e;
142 }
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:98
void uniqueTowers(towerset_t &twrs_) const
double HcalNoiseRBX::caloTowerEmFraction ( void  ) const

Definition at line 154 of file HcalNoiseRBX.cc.

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

Referenced by HPDsEnd().

154  {
155  double e = 0, h = 0;
156  towerset_t twrs;
157  uniqueTowers(twrs);
158  for (towerset_t::const_iterator it = twrs.begin(); it != twrs.end(); ++it) {
159  h += it->hadEnergy();
160  e += it->emEnergy();
161  }
162  return (e + h) == 0 ? 999 : e / (e + h);
163 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:98
void uniqueTowers(towerset_t &twrs_) const
double HcalNoiseRBX::caloTowerHadE ( void  ) const

Definition at line 124 of file HcalNoiseRBX.cc.

References h, and uniqueTowers().

Referenced by HPDsEnd().

124  {
125  double h = 0;
126  towerset_t twrs;
127  uniqueTowers(twrs);
128  for (towerset_t::const_iterator it = twrs.begin(); it != twrs.end(); ++it) {
129  h += it->hadEnergy();
130  }
131  return h;
132 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:98
void uniqueTowers(towerset_t &twrs_) const
double HcalNoiseRBX::caloTowerTotalE ( void  ) const

Definition at line 144 of file HcalNoiseRBX.cc.

References MillePedeFileConverter_cfg::e, and uniqueTowers().

Referenced by HPDsEnd().

144  {
145  double e = 0;
146  towerset_t twrs;
147  uniqueTowers(twrs);
148  for (towerset_t::const_iterator it = twrs.begin(); it != twrs.end(); ++it) {
149  e += it->hadEnergy() + it->emEnergy();
150  }
151  return e;
152 }
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:98
void uniqueTowers(towerset_t &twrs_) const
const std::vector< HcalNoiseHPD > HcalNoiseRBX::HPDs ( void  ) const

Definition at line 23 of file HcalNoiseRBX.cc.

References hpds_.

23 { return hpds_; }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105
std::vector<HcalNoiseHPD>::const_iterator reco::HcalNoiseRBX::HPDsBegin ( void  ) const
inline

Definition at line 57 of file HcalNoiseRBX.h.

References hpds_.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

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

Definition at line 21 of file HcalNoiseRBX.cc.

References idnumber_.

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

Definition at line 25 of file HcalNoiseRBX.cc.

References hpds_.

Referenced by HPDsEnd().

25  {
26  std::vector<HcalNoiseHPD>::const_iterator maxit = hpds_.end();
27  double maxenergy = -99999999.;
28  for (std::vector<HcalNoiseHPD>::const_iterator it = hpds_.begin(); it != hpds_.end(); ++it) {
29  double tempenergy = it->recHitEnergy();
30  if (tempenergy > maxenergy) {
31  maxenergy = tempenergy;
32  maxit = it;
33  }
34  }
35  return maxit;
36 }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105
double HcalNoiseRBX::maxRecHitTime ( double  threshold = 20.0) const

Definition at line 100 of file HcalNoiseRBX.cc.

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

Referenced by HPDsEnd().

100  {
101  double maxtime = -9999999.;
102  for (unsigned int i = 0; i < hpds_.size(); i++) {
103  double temptime = hpds_[i].maxRecHitTime(threshold);
104  if (temptime > maxtime)
105  maxtime = temptime;
106  }
107  return maxtime;
108 }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105
int HcalNoiseRBX::maxZeros ( void  ) const

Definition at line 68 of file HcalNoiseRBX.cc.

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

Referenced by HPDsEnd().

68  {
69  int max = 0;
70  for (unsigned int i = 0; i < hpds_.size(); i++)
71  if (hpds_[i].maxZeros() > max)
72  max = hpds_[i].maxZeros();
73  return max;
74 }
int maxZeros(void) const
Definition: HcalNoiseRBX.cc:68
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105
double HcalNoiseRBX::minRecHitTime ( double  threshold = 20.0) const

Definition at line 90 of file HcalNoiseRBX.cc.

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

Referenced by HPDsEnd().

90  {
91  double mintime = 9999999.;
92  for (unsigned int i = 0; i < hpds_.size(); i++) {
93  double temptime = hpds_[i].minRecHitTime(threshold);
94  if (temptime < mintime)
95  mintime = temptime;
96  }
97  return mintime;
98 }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105
int HcalNoiseRBX::numRecHits ( double  threshold = 1.5) const

Definition at line 110 of file HcalNoiseRBX.cc.

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

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

110  {
111  int total = 0;
112  for (unsigned int i = 0; i < hpds_.size(); i++)
113  total += hpds_[i].numRecHits(threshold);
114  return total;
115 }
int numRecHits(double threshold=1.5) const
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105
int HcalNoiseRBX::numRecHitsFailR45 ( double  threshold = 1.5) const

Definition at line 117 of file HcalNoiseRBX.cc.

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

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

117  {
118  int total = 0;
119  for (unsigned int i = 0; i < hpds_.size(); i++)
120  total += hpds_[i].numRecHitsFailR45(threshold);
121  return total;
122 }
int numRecHitsFailR45(double threshold=1.5) const
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105
double HcalNoiseRBX::recHitEnergy ( double  theshold = 1.5) const

Definition at line 76 of file HcalNoiseRBX.cc.

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

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

76  {
77  double total = 0;
78  for (unsigned int i = 0; i < hpds_.size(); i++)
79  total += hpds_[i].recHitEnergy(threshold);
80  return total;
81 }
double recHitEnergy(double theshold=1.5) const
Definition: HcalNoiseRBX.cc:76
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105
double HcalNoiseRBX::recHitEnergyFailR45 ( double  threshold = 1.5) const

Definition at line 83 of file HcalNoiseRBX.cc.

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

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

83  {
84  double total = 0;
85  for (unsigned int i = 0; i < hpds_.size(); i++)
87  return total;
88 }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105
double recHitEnergyFailR45(double threshold=1.5) const
Definition: HcalNoiseRBX.cc:83
int HcalNoiseRBX::totalZeros ( void  ) const

Definition at line 61 of file HcalNoiseRBX.cc.

References hpds_, and mps_fire::i.

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

61  {
62  int tot = 0;
63  for (unsigned int i = 0; i < hpds_.size(); i++)
64  tot += hpds_[i].totalZeros();
65  return tot;
66 }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105
int totalZeros(void) const
Definition: HcalNoiseRBX.cc:61
void HcalNoiseRBX::uniqueTowers ( towerset_t twrs_) const
private

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

165  {
166  twrs_.clear();
167  for (std::vector<HcalNoiseHPD>::const_iterator it1 = hpds_.begin(); it1 != hpds_.end(); ++it1) {
168  edm::RefVector<CaloTowerCollection> twrsref = it1->caloTowers();
169  for (edm::RefVector<CaloTowerCollection>::const_iterator it2 = twrsref.begin(); it2 != twrsref.end(); ++it2) {
170  CaloTower twr = **it2;
171  twrs_.insert(twr);
172  }
173  }
174  return;
175 }
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:228
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:223
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105

Friends And Related Function Documentation

friend class HcalNoiseInfoProducer
friend

Definition at line 33 of file HcalNoiseRBX.h.

friend class HcalNoiseRBXArray
friend

Definition at line 34 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 102 of file HcalNoiseRBX.h.

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