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.

References calotowers_, and rechits_.

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 }
static const int MAXSAMPLES
Definition: HBHEDataFrame.h:95
std::vector< float > bigCharge_
Definition: HcalNoiseHPD.h:137
std::vector< float > big5Charge_
Definition: HcalNoiseHPD.h:138
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148

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

References big5Charge_.

56 { return big5Charge_; }
std::vector< float > big5Charge_
Definition: HcalNoiseHPD.h:138

◆ big5ChargeHighest2TS()

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

Definition at line 66 of file HcalNoiseHPD.cc.

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

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 }
std::vector< float > big5Charge_
Definition: HcalNoiseHPD.h:138

◆ big5ChargeHighest3TS()

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

Definition at line 73 of file HcalNoiseHPD.cc.

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

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 }
std::vector< float > big5Charge_
Definition: HcalNoiseHPD.h:138

◆ big5ChargeTotal()

float HcalNoiseHPD::big5ChargeTotal ( void  ) const

Definition at line 58 of file HcalNoiseHPD.cc.

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

58  {
59  float total = 0;
60  for (unsigned int i = 0; i < big5Charge_.size(); i++) {
61  total += big5Charge_[i];
62  }
63  return total;
64 }
std::vector< float > big5Charge_
Definition: HcalNoiseHPD.h:138

◆ bigCharge()

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

Definition at line 32 of file HcalNoiseHPD.cc.

References bigCharge_.

32 { return bigCharge_; }
std::vector< float > bigCharge_
Definition: HcalNoiseHPD.h:137

◆ bigChargeHighest2TS()

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

Definition at line 42 of file HcalNoiseHPD.cc.

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

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 }
std::vector< float > bigCharge_
Definition: HcalNoiseHPD.h:137

◆ bigChargeHighest3TS()

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

Definition at line 49 of file HcalNoiseHPD.cc.

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

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 }
std::vector< float > bigCharge_
Definition: HcalNoiseHPD.h:137

◆ bigChargeTotal()

float HcalNoiseHPD::bigChargeTotal ( void  ) const

Definition at line 34 of file HcalNoiseHPD.cc.

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

34  {
35  float total = 0;
36  for (unsigned int i = 0; i < bigCharge_.size(); i++) {
37  total += bigCharge_[i];
38  }
39  return total;
40 }
std::vector< float > bigCharge_
Definition: HcalNoiseHPD.h:137

◆ caloTowerEmE()

double HcalNoiseHPD::caloTowerEmE ( void  ) const

Definition at line 162 of file HcalNoiseHPD.cc.

References calotowers_, and dqmMemoryStats::total.

162  {
163  double total = 0;
165  total += (*it)->emEnergy();
166  return total;
167 }
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148

◆ caloTowerEmFraction()

double HcalNoiseHPD::caloTowerEmFraction ( void  ) const

Definition at line 176 of file HcalNoiseHPD.cc.

References calotowers_, MillePedeFileConverter_cfg::e, and h.

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 }
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148
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 HcalNoiseHPD::caloTowerHadE ( void  ) const

Definition at line 155 of file HcalNoiseHPD.cc.

References calotowers_, and dqmMemoryStats::total.

155  {
156  double total = 0;
158  total += (*it)->hadEnergy();
159  return total;
160 }
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148

◆ caloTowers()

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

Definition at line 153 of file HcalNoiseHPD.cc.

References calotowers_.

153 { return calotowers_; }
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148

◆ caloTowerTotalE()

double HcalNoiseHPD::caloTowerTotalE ( void  ) const

Definition at line 169 of file HcalNoiseHPD.cc.

References calotowers_, and dqmMemoryStats::total.

169  {
170  double total = 0;
172  total += (*it)->emEnergy() + (*it)->hadEnergy();
173  return total;
174 }
edm::RefVector< CaloTowerCollection > calotowers_
Definition: HcalNoiseHPD.h:148

◆ idnumber()

int HcalNoiseHPD::idnumber ( void  ) const

Definition at line 30 of file HcalNoiseHPD.cc.

References idnumber_.

30 { return idnumber_; }

◆ maxRecHitTime()

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

Definition at line 119 of file HcalNoiseHPD.cc.

References CastorTowerReco_cfi::maxtime, rechits_, remoteMonitoring_LASER_era2018_cfg::threshold, and hcalRecHitTable_cff::time.

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 }
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141

◆ maxZeros()

int HcalNoiseHPD::maxZeros ( void  ) const

Definition at line 82 of file HcalNoiseHPD.cc.

References maxZeros_.

82 { return maxZeros_; }

◆ minRecHitTime()

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

Definition at line 107 of file HcalNoiseHPD.cc.

References CastorTowerReco_cfi::mintime, rechits_, remoteMonitoring_LASER_era2018_cfg::threshold, and hcalRecHitTable_cff::time.

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 }
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141

◆ numRecHits()

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

Definition at line 131 of file HcalNoiseHPD.cc.

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

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 }
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141
static const unsigned OFF_TDC_TIME
constexpr bool getBit(const uint32_t u, const unsigned bitnum)
static const unsigned OFF_COMBINED

◆ numRecHitsFailR45()

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

◆ recHitEnergy()

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

Definition at line 86 of file HcalNoiseHPD.cc.

References hcalRecHitTable_cff::energy, rechits_, remoteMonitoring_LASER_era2018_cfg::threshold, and dqmMemoryStats::total.

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 }
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141

◆ recHitEnergyFailR45()

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

◆ recHits()

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

Definition at line 84 of file HcalNoiseHPD.cc.

References rechits_.

84 { return rechits_; }
edm::RefVector< HBHERecHitCollection > rechits_
Definition: HcalNoiseHPD.h:141

◆ totalZeros()

int HcalNoiseHPD::totalZeros ( void  ) const

Definition at line 80 of file HcalNoiseHPD.cc.

References totalZeros_.

80 { return 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().