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.

◆ ~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.

38 { return allCharge_; }

References allCharge_.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

◆ allChargeHighest2TS()

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

Definition at line 47 of file HcalNoiseRBX.cc.

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 }

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

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

◆ allChargeHighest3TS()

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

Definition at line 54 of file HcalNoiseRBX.cc.

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 }

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

◆ allChargeTotal()

float HcalNoiseRBX::allChargeTotal ( void  ) const

Definition at line 40 of file HcalNoiseRBX.cc.

40  {
41  float total = 0;
42  for (unsigned int i = 0; i < allCharge_.size(); i++)
43  total += allCharge_[i];
44  return total;
45 }

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

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

◆ caloTowerEmE()

double HcalNoiseRBX::caloTowerEmE ( void  ) const

Definition at line 134 of file HcalNoiseRBX.cc.

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 }

References MillePedeFileConverter_cfg::e, and uniqueTowers().

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

◆ caloTowerEmFraction()

double HcalNoiseRBX::caloTowerEmFraction ( void  ) const

Definition at line 154 of file HcalNoiseRBX.cc.

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 }

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

◆ caloTowerHadE()

double HcalNoiseRBX::caloTowerHadE ( void  ) const

Definition at line 124 of file HcalNoiseRBX.cc.

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 }

References h, and uniqueTowers().

◆ caloTowerTotalE()

double HcalNoiseRBX::caloTowerTotalE ( void  ) const

Definition at line 144 of file HcalNoiseRBX.cc.

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 }

References MillePedeFileConverter_cfg::e, and uniqueTowers().

◆ HPDs()

const std::vector< HcalNoiseHPD > HcalNoiseRBX::HPDs ( void  ) const

Definition at line 23 of file HcalNoiseRBX.cc.

23 { return hpds_; }

References hpds_.

◆ HPDsBegin()

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

Definition at line 57 of file HcalNoiseRBX.h.

57 { return hpds_.begin(); }

References hpds_.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

◆ HPDsEnd()

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

Definition at line 58 of file HcalNoiseRBX.h.

58 { return hpds_.end(); }

References hpds_.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

◆ idnumber()

int HcalNoiseRBX::idnumber ( void  ) const

Definition at line 21 of file HcalNoiseRBX.cc.

21 { return idnumber_; }

References idnumber_.

◆ maxHPD()

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

Definition at line 25 of file HcalNoiseRBX.cc.

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 }

References hpds_.

◆ maxRecHitTime()

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

Definition at line 100 of file HcalNoiseRBX.cc.

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 }

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

◆ maxZeros()

int HcalNoiseRBX::maxZeros ( void  ) const

Definition at line 68 of file HcalNoiseRBX.cc.

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 }

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

◆ minRecHitTime()

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

Definition at line 90 of file HcalNoiseRBX.cc.

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 }

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

◆ numRecHits()

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

Definition at line 110 of file HcalNoiseRBX.cc.

110  {
111  int total = 0;
112  for (unsigned int i = 0; i < hpds_.size(); i++)
114  return total;
115 }

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

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

◆ numRecHitsFailR45()

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

Definition at line 117 of file HcalNoiseRBX.cc.

117  {
118  int total = 0;
119  for (unsigned int i = 0; i < hpds_.size(); i++)
121  return total;
122 }

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

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

◆ recHitEnergy()

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

Definition at line 76 of file HcalNoiseRBX.cc.

76  {
77  double total = 0;
78  for (unsigned int i = 0; i < hpds_.size(); i++)
80  return total;
81 }

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

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

◆ recHitEnergyFailR45()

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

Definition at line 83 of file HcalNoiseRBX.cc.

83  {
84  double total = 0;
85  for (unsigned int i = 0; i < hpds_.size(); i++)
87  return total;
88 }

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

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

◆ totalZeros()

int HcalNoiseRBX::totalZeros ( void  ) const

Definition at line 61 of file HcalNoiseRBX.cc.

61  {
62  int tot = 0;
63  for (unsigned int i = 0; i < hpds_.size(); i++)
64  tot += hpds_[i].totalZeros();
65  return tot;
66 }

References hpds_, and mps_fire::i.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

◆ uniqueTowers()

void HcalNoiseRBX::uniqueTowers ( towerset_t twrs_) const
private

Definition at line 165 of file HcalNoiseRBX.cc.

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 }

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

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

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

HBHEDataFrame::MAXSAMPLES
static const int MAXSAMPLES
Definition: HBHEDataFrame.h:95
reco::HcalNoiseRBX::totalZeros
int totalZeros(void) const
Definition: HcalNoiseRBX.cc:61
mps_fire.i
i
Definition: mps_fire.py:428
CastorTowerReco_cfi.mintime
mintime
Definition: CastorTowerReco_cfi.py:7
reco::HcalNoiseRBX::numRecHits
int numRecHits(double threshold=1.5) const
Definition: HcalNoiseRBX.cc:110
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
edm::RefVector::begin
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:223
reco::HcalNoiseRBX::idnumber_
int idnumber_
Definition: HcalNoiseRBX.h:102
edm::RefVector
Definition: EDProductfwd.h:27
reco::HcalNoiseRBX::recHitEnergyFailR45
double recHitEnergyFailR45(double threshold=1.5) const
Definition: HcalNoiseRBX.cc:83
CastorTowerReco_cfi.maxtime
maxtime
Definition: CastorTowerReco_cfi.py:8
edm::RefVector::end
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:228
h
reco::HcalNoiseRBX::hpds_
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
CaloTower
Definition: CaloTower.h:26
reco::HcalNoiseRBX::maxZeros
int maxZeros(void) const
Definition: HcalNoiseRBX.cc:68
reco::HcalNoiseRBX::allCharge_
std::vector< float > allCharge_
Definition: HcalNoiseRBX.h:108
reco::HcalNoiseRBX::numRecHitsFailR45
int numRecHitsFailR45(double threshold=1.5) const
Definition: HcalNoiseRBX.cc:117
edm::RefVectorIterator
Definition: EDProductfwd.h:33
reco::HcalNoiseRBX::uniqueTowers
void uniqueTowers(towerset_t &twrs_) const
Definition: HcalNoiseRBX.cc:165
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152
reco::HcalNoiseRBX::recHitEnergy
double recHitEnergy(double theshold=1.5) const
Definition: HcalNoiseRBX.cc:76
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:430
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
reco::HcalNoiseRBX::towerset_t
std::set< CaloTower, twrcomp > towerset_t
Definition: HcalNoiseRBX.h:98