CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
reco::HcalNoiseHPD Class Reference

#include <HcalNoiseHPD.h>

Public Member Functions

const std::vector< float > big5Charge (void) const
 
float big5ChargeHighest2TS (unsigned int firstts=4) const
 
float big5ChargeHighest3TS (unsigned int firstts=4) const
 
float big5ChargeTotal (void) const
 
const std::vector< float > bigCharge (void) const
 
float bigChargeHighest2TS (unsigned int firstts=4) const
 
float bigChargeHighest3TS (unsigned int firstts=4) const
 
float bigChargeTotal (void) const
 
double caloTowerEmE (void) const
 
double caloTowerEmFraction (void) const
 
double caloTowerHadE (void) const
 
const edm::RefVector< CaloTowerCollectioncaloTowers (void) const
 
double caloTowerTotalE (void) const
 
 HcalNoiseHPD ()
 
int idnumber (void) const
 
float maxRecHitTime (float threshold=10.0) const
 
int maxZeros (void) const
 
float minRecHitTime (float threshold=10.0) const
 
int numRecHits (float threshold=1.5) const
 
int numRecHitsFailR45 (float threshold=1.5) const
 
float recHitEnergy (float threshold=1.5) const
 
float recHitEnergyFailR45 (float threshold=1.5) const
 
const edm::RefVector< HBHERecHitCollectionrecHits (void) const
 
int totalZeros (void) const
 
virtual ~HcalNoiseHPD ()
 

Private Attributes

std::vector< float > big5Charge_
 
std::vector< float > bigCharge_
 
edm::RefVector< CaloTowerCollectioncalotowers_
 
int idnumber_
 
int maxZeros_
 
edm::RefVector< HBHERecHitCollectionrechits_
 
std::set< edm::Ref< HBHERecHitCollection >, RefHBHERecHitEnergyComparisonrefrechitset_
 
int totalZeros_
 

Friends

class HcalNoiseInfoProducer
 
class HcalNoiseRBXArray
 

Detailed Description

Definition at line 57 of file HcalNoiseHPD.h.

Constructor & Destructor Documentation

◆ HcalNoiseHPD()

HcalNoiseHPD::HcalNoiseHPD ( )

Definition at line 15 of file HcalNoiseHPD.cc.

16  : idnumber_(0),
17  totalZeros_(0),
18  maxZeros_(0),
21  // reserve some space, so that there's no reallocation issues
22  rechits_.reserve(19);
23  calotowers_.reserve(19);
24 }

References calotowers_, and rechits_.

◆ ~HcalNoiseHPD()

HcalNoiseHPD::~HcalNoiseHPD ( )
virtual

Definition at line 27 of file HcalNoiseHPD.cc.

27 {}

Member Function Documentation

◆ big5Charge()

const std::vector< float > HcalNoiseHPD::big5Charge ( void  ) const

Definition at line 56 of file HcalNoiseHPD.cc.

56 { return big5Charge_; }

References big5Charge_.

◆ big5ChargeHighest2TS()

float HcalNoiseHPD::big5ChargeHighest2TS ( unsigned int  firstts = 4) const

Definition at line 66 of file HcalNoiseHPD.cc.

66  {
67  float total = 0;
68  for (unsigned int i = firstts; i < firstts + 2 && i < big5Charge_.size(); i++)
69  total += big5Charge_[i];
70  return total;
71 }

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

◆ big5ChargeHighest3TS()

float HcalNoiseHPD::big5ChargeHighest3TS ( unsigned int  firstts = 4) const

Definition at line 73 of file HcalNoiseHPD.cc.

73  {
74  float total = 0;
75  for (unsigned int i = firstts; i < firstts + 2 && i < big5Charge_.size(); i++)
76  total += big5Charge_[i];
77  return total;
78 }

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

◆ big5ChargeTotal()

float HcalNoiseHPD::big5ChargeTotal ( void  ) const

Definition at line 58 of file HcalNoiseHPD.cc.

58  {
59  float total = 0;
60  for (unsigned int i = 0; i < big5Charge_.size(); i++) {
61  total += big5Charge_[i];
62  }
63  return total;
64 }

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

◆ bigCharge()

const std::vector< float > HcalNoiseHPD::bigCharge ( void  ) const

Definition at line 32 of file HcalNoiseHPD.cc.

32 { return bigCharge_; }

References bigCharge_.

◆ bigChargeHighest2TS()

float HcalNoiseHPD::bigChargeHighest2TS ( unsigned int  firstts = 4) const

Definition at line 42 of file HcalNoiseHPD.cc.

42  {
43  float total = 0;
44  for (unsigned int i = firstts; i < firstts + 2 && i < bigCharge_.size(); i++)
45  total += bigCharge_[i];
46  return total;
47 }

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

◆ bigChargeHighest3TS()

float HcalNoiseHPD::bigChargeHighest3TS ( unsigned int  firstts = 4) const

Definition at line 49 of file HcalNoiseHPD.cc.

49  {
50  float total = 0;
51  for (unsigned int i = firstts; i < firstts + 3 && i < bigCharge_.size(); i++)
52  total += bigCharge_[i];
53  return total;
54 }

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

◆ bigChargeTotal()

float HcalNoiseHPD::bigChargeTotal ( void  ) const

Definition at line 34 of file HcalNoiseHPD.cc.

34  {
35  float total = 0;
36  for (unsigned int i = 0; i < bigCharge_.size(); i++) {
37  total += bigCharge_[i];
38  }
39  return total;
40 }

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

◆ caloTowerEmE()

double HcalNoiseHPD::caloTowerEmE ( void  ) const

Definition at line 162 of file HcalNoiseHPD.cc.

162  {
163  double total = 0;
165  total += (*it)->emEnergy();
166  return total;
167 }

References calotowers_, and dqmMemoryStats::total.

◆ caloTowerEmFraction()

double HcalNoiseHPD::caloTowerEmFraction ( void  ) const

Definition at line 176 of file HcalNoiseHPD.cc.

176  {
177  double h = 0, e = 0;
178  for (edm::RefVector<CaloTowerCollection>::const_iterator it = calotowers_.begin(); it != calotowers_.end(); ++it) {
179  e += (*it)->emEnergy();
180  h += (*it)->hadEnergy();
181  }
182  return (e + h) != 0 ? e / (e + h) : 999.;
183 }

References calotowers_, MillePedeFileConverter_cfg::e, and h.

◆ caloTowerHadE()

double HcalNoiseHPD::caloTowerHadE ( void  ) const

Definition at line 155 of file HcalNoiseHPD.cc.

155  {
156  double total = 0;
158  total += (*it)->hadEnergy();
159  return total;
160 }

References calotowers_, and dqmMemoryStats::total.

◆ caloTowers()

const edm::RefVector< CaloTowerCollection > HcalNoiseHPD::caloTowers ( void  ) const

Definition at line 153 of file HcalNoiseHPD.cc.

153 { return calotowers_; }

References calotowers_.

◆ caloTowerTotalE()

double HcalNoiseHPD::caloTowerTotalE ( void  ) const

Definition at line 169 of file HcalNoiseHPD.cc.

169  {
170  double total = 0;
172  total += (*it)->emEnergy() + (*it)->hadEnergy();
173  return total;
174 }

References calotowers_, and dqmMemoryStats::total.

◆ idnumber()

int HcalNoiseHPD::idnumber ( void  ) const

Definition at line 30 of file HcalNoiseHPD.cc.

30 { return idnumber_; }

References idnumber_.

◆ maxRecHitTime()

float HcalNoiseHPD::maxRecHitTime ( float  threshold = 10.0) const

Definition at line 119 of file HcalNoiseHPD.cc.

119  {
120  float maxtime = -9999999;
121  for (edm::RefVector<HBHERecHitCollection>::const_iterator it = rechits_.begin(); it != rechits_.end(); ++it) {
122  if ((*it)->energy() < threshold)
123  continue;
124  float time = (*it)->time();
125  if (maxtime < time)
126  maxtime = time;
127  }
128  return maxtime;
129 }

References CastorTowerReco_cfi::maxtime, rechits_, remoteMonitoring_LED_IterMethod_cfg::threshold, and protons_cff::time.

◆ maxZeros()

int HcalNoiseHPD::maxZeros ( void  ) const

Definition at line 82 of file HcalNoiseHPD.cc.

82 { return maxZeros_; }

References maxZeros_.

◆ minRecHitTime()

float HcalNoiseHPD::minRecHitTime ( float  threshold = 10.0) const

Definition at line 107 of file HcalNoiseHPD.cc.

107  {
108  float mintime = 9999999;
109  for (edm::RefVector<HBHERecHitCollection>::const_iterator it = rechits_.begin(); it != rechits_.end(); ++it) {
110  if ((*it)->energy() < threshold)
111  continue;
112  float time = (*it)->time();
113  if (mintime > time)
114  mintime = time;
115  }
116  return mintime;
117 }

References CastorTowerReco_cfi::mintime, rechits_, remoteMonitoring_LED_IterMethod_cfg::threshold, and protons_cff::time.

◆ numRecHits()

int HcalNoiseHPD::numRecHits ( float  threshold = 1.5) const

Definition at line 131 of file HcalNoiseHPD.cc.

131  {
132  int count = 0;
133  for (edm::RefVector<HBHERecHitCollection>::const_iterator it = rechits_.begin(); it != rechits_.end(); ++it) {
134  // Exclude uncollapsed QIE11 channels
137  continue;
138  if ((*it)->eraw() >= threshold)
139  ++count;
140  }
141  return count;
142 }

References submitPVResolutionJobs::count, CaloRecHitAuxSetter::getBit(), HBHERecHitAuxSetter::OFF_COMBINED, HBHERecHitAuxSetter::OFF_TDC_TIME, rechits_, and remoteMonitoring_LED_IterMethod_cfg::threshold.

◆ numRecHitsFailR45()

int HcalNoiseHPD::numRecHitsFailR45 ( float  threshold = 1.5) const

Definition at line 144 of file HcalNoiseHPD.cc.

144  {
145  int count = 0;
146  for (edm::RefVector<HBHERecHitCollection>::const_iterator it = rechits_.begin(); it != rechits_.end(); ++it)
147  if ((*it)->flagField(HcalCaloFlagLabels::HBHETS4TS5Noise) && !(*it)->flagField(HcalCaloFlagLabels::HBHEOOTPU))
148  if ((*it)->eraw() >= threshold)
149  ++count;
150  return count;
151 }

References submitPVResolutionJobs::count, HcalCaloFlagLabels::HBHEOOTPU, HcalCaloFlagLabels::HBHETS4TS5Noise, rechits_, and remoteMonitoring_LED_IterMethod_cfg::threshold.

◆ recHitEnergy()

float HcalNoiseHPD::recHitEnergy ( float  threshold = 1.5) const

Definition at line 86 of file HcalNoiseHPD.cc.

86  {
87  double total = 0.0;
88  for (edm::RefVector<HBHERecHitCollection>::const_iterator it = rechits_.begin(); it != rechits_.end(); ++it) {
89  const float energy = (*it)->eraw();
90  if (energy >= threshold)
91  total += energy;
92  }
93  return total;
94 }

References HCALHighEnergyHPDFilter_cfi::energy, rechits_, remoteMonitoring_LED_IterMethod_cfg::threshold, and dqmMemoryStats::total.

◆ recHitEnergyFailR45()

float HcalNoiseHPD::recHitEnergyFailR45 ( float  threshold = 1.5) const

Definition at line 96 of file HcalNoiseHPD.cc.

96  {
97  double total = 0.0;
98  for (edm::RefVector<HBHERecHitCollection>::const_iterator it = rechits_.begin(); it != rechits_.end(); ++it) {
99  const float energy = (*it)->eraw();
100  if ((*it)->flagField(HcalCaloFlagLabels::HBHETS4TS5Noise) && !(*it)->flagField(HcalCaloFlagLabels::HBHEOOTPU))
101  if (energy >= threshold)
102  total += energy;
103  }
104  return total;
105 }

References HCALHighEnergyHPDFilter_cfi::energy, HcalCaloFlagLabels::HBHEOOTPU, HcalCaloFlagLabels::HBHETS4TS5Noise, rechits_, remoteMonitoring_LED_IterMethod_cfg::threshold, and dqmMemoryStats::total.

◆ recHits()

const edm::RefVector< HBHERecHitCollection > HcalNoiseHPD::recHits ( void  ) const

Definition at line 84 of file HcalNoiseHPD.cc.

84 { return rechits_; }

References rechits_.

◆ totalZeros()

int HcalNoiseHPD::totalZeros ( void  ) const

Definition at line 80 of file HcalNoiseHPD.cc.

80 { return totalZeros_; }

References totalZeros_.

Friends And Related Function Documentation

◆ HcalNoiseInfoProducer

friend class HcalNoiseInfoProducer
friend

Definition at line 58 of file HcalNoiseHPD.h.

◆ HcalNoiseRBXArray

friend class HcalNoiseRBXArray
friend

Definition at line 59 of file HcalNoiseHPD.h.

Member Data Documentation

◆ big5Charge_

std::vector<float> reco::HcalNoiseHPD::big5Charge_
private

◆ bigCharge_

std::vector<float> reco::HcalNoiseHPD::bigCharge_
private

◆ calotowers_

edm::RefVector<CaloTowerCollection> reco::HcalNoiseHPD::calotowers_
private

◆ idnumber_

int reco::HcalNoiseHPD::idnumber_
private

Definition at line 132 of file HcalNoiseHPD.h.

Referenced by idnumber().

◆ maxZeros_

int reco::HcalNoiseHPD::maxZeros_
private

Definition at line 136 of file HcalNoiseHPD.h.

Referenced by reco::HcalNoiseInfoProducer::filldigis(), and maxZeros().

◆ rechits_

edm::RefVector<HBHERecHitCollection> reco::HcalNoiseHPD::rechits_
private

◆ refrechitset_

std::set<edm::Ref<HBHERecHitCollection>, RefHBHERecHitEnergyComparison> reco::HcalNoiseHPD::refrechitset_
private

Definition at line 145 of file HcalNoiseHPD.h.

Referenced by reco::HcalNoiseInfoProducer::fillrechits().

◆ totalZeros_

int reco::HcalNoiseHPD::totalZeros_
private

Definition at line 135 of file HcalNoiseHPD.h.

Referenced by reco::HcalNoiseInfoProducer::filldigis(), and totalZeros().

HBHEDataFrame::MAXSAMPLES
static const int MAXSAMPLES
Definition: HBHEDataFrame.h:95
HcalCaloFlagLabels::HBHETS4TS5Noise
Definition: HcalCaloFlagLabels.h:25
HBHERecHitAuxSetter::OFF_COMBINED
static const unsigned OFF_COMBINED
Definition: HBHERecHitAuxSetter.h:41
mps_fire.i
i
Definition: mps_fire.py:428
reco::HcalNoiseHPD::calotowers_
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148
CastorTowerReco_cfi.mintime
mintime
Definition: CastorTowerReco_cfi.py:7
reco::HcalNoiseHPD::idnumber_
int idnumber_
Definition: HcalNoiseHPD.h:132
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
protons_cff.time
time
Definition: protons_cff.py:39
HBHERecHitAuxSetter::OFF_TDC_TIME
static const unsigned OFF_TDC_TIME
Definition: HBHERecHitAuxSetter.h:35
CastorTowerReco_cfi.maxtime
maxtime
Definition: CastorTowerReco_cfi.py:8
h
reco::HcalNoiseHPD::maxZeros_
int maxZeros_
Definition: HcalNoiseHPD.h:136
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
reco::HcalNoiseHPD::big5Charge_
std::vector< float > big5Charge_
Definition: HcalNoiseHPD.h:138
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
HcalCaloFlagLabels::HBHEOOTPU
Definition: HcalCaloFlagLabels.h:28
reco::HcalNoiseHPD::totalZeros_
int totalZeros_
Definition: HcalNoiseHPD.h:135
CaloRecHitAuxSetter::getBit
constexpr bool getBit(const uint32_t u, const unsigned bitnum)
Definition: CaloRecHitAuxSetter.h:37
reco::HcalNoiseHPD::rechits_
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141
edm::RefVectorIterator
Definition: EDProductfwd.h:33
reco::HcalNoiseHPD::bigCharge_
std::vector< float > bigCharge_
Definition: HcalNoiseHPD.h:137
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:430
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37