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

◆ towerset_t

Definition at line 98 of file HcalNoiseRBX.h.

Constructor & Destructor Documentation

◆ HcalNoiseRBX()

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::~HcalNoiseRBX ( )

Definition at line 18 of file HcalNoiseRBX.cc.

18 {}

Member Function Documentation

◆ allCharge()

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

Definition at line 38 of file HcalNoiseRBX.cc.

References allCharge_.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

38 { return allCharge_; }
std::vector< float > allCharge_
Definition: HcalNoiseRBX.h:108

◆ allChargeHighest2TS()

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

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

◆ allChargeHighest3TS()

float HcalNoiseRBX::allChargeHighest3TS ( unsigned int  firstts = 4) const

Definition at line 54 of file HcalNoiseRBX.cc.

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

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

◆ allChargeTotal()

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

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

◆ caloTowerEmE()

double HcalNoiseRBX::caloTowerEmE ( void  ) const

Definition at line 134 of file HcalNoiseRBX.cc.

References MillePedeFileConverter_cfg::e, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and uniqueTowers().

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

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 }
void uniqueTowers(towerset_t &twrs_) const
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:98

◆ caloTowerEmFraction()

double HcalNoiseRBX::caloTowerEmFraction ( void  ) const

Definition at line 154 of file HcalNoiseRBX.cc.

References MillePedeFileConverter_cfg::e, h, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and uniqueTowers().

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

◆ caloTowerHadE()

double HcalNoiseRBX::caloTowerHadE ( void  ) const

Definition at line 124 of file HcalNoiseRBX.cc.

References h, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and uniqueTowers().

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

◆ caloTowerTotalE()

double HcalNoiseRBX::caloTowerTotalE ( void  ) const

Definition at line 144 of file HcalNoiseRBX.cc.

References MillePedeFileConverter_cfg::e, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and uniqueTowers().

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 }
void uniqueTowers(towerset_t &twrs_) const
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:98

◆ HPDs()

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

◆ HPDsBegin()

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

◆ HPDsEnd()

std::vector<HcalNoiseHPD>::const_iterator reco::HcalNoiseRBX::HPDsEnd ( void  ) const
inline

Definition at line 58 of file HcalNoiseRBX.h.

References hpds_.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

58 { return hpds_.end(); }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105

◆ idnumber()

int HcalNoiseRBX::idnumber ( void  ) const

Definition at line 21 of file HcalNoiseRBX.cc.

References idnumber_.

21 { return idnumber_; }

◆ maxHPD()

std::vector< HcalNoiseHPD >::const_iterator HcalNoiseRBX::maxHPD ( double  threshold = 1.5) const

Definition at line 25 of file HcalNoiseRBX.cc.

References hpds_, and ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it.

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

◆ maxRecHitTime()

double HcalNoiseRBX::maxRecHitTime ( double  threshold = 20.0) const

Definition at line 100 of file HcalNoiseRBX.cc.

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

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

◆ maxZeros()

int HcalNoiseRBX::maxZeros ( void  ) const

Definition at line 68 of file HcalNoiseRBX.cc.

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

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

◆ minRecHitTime()

double HcalNoiseRBX::minRecHitTime ( double  threshold = 20.0) const

Definition at line 90 of file HcalNoiseRBX.cc.

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

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

◆ numRecHits()

int HcalNoiseRBX::numRecHits ( double  threshold = 1.5) const

Definition at line 110 of file HcalNoiseRBX.cc.

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

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

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

◆ numRecHitsFailR45()

int HcalNoiseRBX::numRecHitsFailR45 ( double  threshold = 1.5) const

Definition at line 117 of file HcalNoiseRBX.cc.

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

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

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

◆ recHitEnergy()

double HcalNoiseRBX::recHitEnergy ( double  theshold = 1.5) const

Definition at line 76 of file HcalNoiseRBX.cc.

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

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

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

◆ recHitEnergyFailR45()

double HcalNoiseRBX::recHitEnergyFailR45 ( double  threshold = 1.5) const

Definition at line 83 of file HcalNoiseRBX.cc.

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

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

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

◆ totalZeros()

int HcalNoiseRBX::totalZeros ( void  ) const

Definition at line 61 of file HcalNoiseRBX.cc.

References hpds_, mps_fire::i, and compareTotals::tot.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

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

◆ uniqueTowers()

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 }
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105
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

Friends And Related Function Documentation

◆ HcalNoiseInfoProducer

friend class HcalNoiseInfoProducer
friend

Definition at line 33 of file HcalNoiseRBX.h.

◆ HcalNoiseRBXArray

friend class HcalNoiseRBXArray
friend

Definition at line 34 of file HcalNoiseRBX.h.

Member Data Documentation

◆ allCharge_

std::vector<float> reco::HcalNoiseRBX::allCharge_
private

◆ hpds_

std::vector<HcalNoiseHPD> reco::HcalNoiseRBX::hpds_
private

◆ idnumber_

int reco::HcalNoiseRBX::idnumber_
private

Definition at line 102 of file HcalNoiseRBX.h.

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