CMS 3D CMS Logo

List of all members | Public Member Functions
reco::HcalNoiseRBXArray Class Reference

#include <HcalNoiseRBXArray.h>

Inheritance diagram for reco::HcalNoiseRBXArray:

Public Member Functions

std::vector< HcalNoiseHPD >::iterator endHPD (void)
 
std::vector< HcalNoiseHPD >::const_iterator endHPD (void) const
 
HcalNoiseRBXArray::iterator endRBX (void)
 
HcalNoiseRBXArray::const_iterator endRBX (void) const
 
std::vector< HcalNoiseHPD >::iterator findHPD (int hpdindex)
 
std::vector< HcalNoiseHPD >::const_iterator findHPD (int hpdindex) const
 
std::vector< HcalNoiseHPD >::iterator findHPD (const HcalDetId &)
 
std::vector< HcalNoiseHPD >::const_iterator findHPD (const HcalDetId &) const
 
std::vector< HcalNoiseHPD >::iterator findHPD (const HBHEDataFrame &)
 
std::vector< HcalNoiseHPD >::const_iterator findHPD (const HBHEDataFrame &) const
 
std::vector< HcalNoiseHPD >::iterator findHPD (const HBHERecHit &)
 
std::vector< HcalNoiseHPD >::const_iterator findHPD (const HBHERecHit &) const
 
void findHPD (const CaloTower &, std::vector< std::vector< HcalNoiseHPD >::iterator > &)
 
void findHPD (const CaloTower &, std::vector< std::vector< HcalNoiseHPD >::const_iterator > &) const
 
HcalNoiseRBXArray::iterator findRBX (int rbxindex)
 
HcalNoiseRBXArray::const_iterator findRBX (int rbxindex) const
 
HcalNoiseRBXArray::iterator findRBX (const HcalDetId &)
 
HcalNoiseRBXArray::const_iterator findRBX (const HcalDetId &) const
 
HcalNoiseRBXArray::iterator findRBX (const HBHEDataFrame &)
 
HcalNoiseRBXArray::const_iterator findRBX (const HBHEDataFrame &) const
 
HcalNoiseRBXArray::iterator findRBX (const HBHERecHit &)
 
HcalNoiseRBXArray::const_iterator findRBX (const HBHERecHit &) const
 
void findRBX (const CaloTower &, std::vector< HcalNoiseRBXArray::iterator > &)
 
void findRBX (const CaloTower &, std::vector< HcalNoiseRBXArray::const_iterator > &) const
 
 HcalNoiseRBXArray ()
 
virtual ~HcalNoiseRBXArray ()
 

Detailed Description

Definition at line 27 of file HcalNoiseRBXArray.h.

Constructor & Destructor Documentation

◆ HcalNoiseRBXArray()

HcalNoiseRBXArray::HcalNoiseRBXArray ( )

Definition at line 15 of file HcalNoiseRBXArray.cc.

References reco::HcalNoiseRBX::hpds_, mps_fire::i, reco::HcalNoiseRBX::idnumber_, HcalHPDRBXMap::indicesHPDfromRBX(), dqmiolumiharvest::j, and HcalHPDRBXMap::NUM_HPDS_PER_RBX.

15  {
16  for (unsigned int i = 0; i < size(); i++) {
17  HcalNoiseRBX& rbx = at(i);
18 
19  // set the rbxnumber here
20  rbx.idnumber_ = i;
21 
22  // set the hpdnumber here
23  std::array<int, HcalHPDRBXMap::NUM_HPDS_PER_RBX> hpdindices;
25  for (int j = 0; j < HcalHPDRBXMap::NUM_HPDS_PER_RBX; j++) {
26  rbx.hpds_[j].idnumber_ = hpdindices[j];
27  }
28  }
29 }
static const int NUM_HPDS_PER_RBX
Definition: HcalHPDRBXMap.h:30
size
Write out results.
static void indicesHPDfromRBX(int rbxindex, std::array< int, NUM_HPDS_PER_RBX > &hpdindices)
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105

◆ ~HcalNoiseRBXArray()

HcalNoiseRBXArray::~HcalNoiseRBXArray ( )
virtual

Definition at line 31 of file HcalNoiseRBXArray.cc.

31 {}

Member Function Documentation

◆ endHPD() [1/2]

std::vector< HcalNoiseHPD >::iterator HcalNoiseRBXArray::endHPD ( void  )

Definition at line 40 of file HcalNoiseRBXArray.cc.

Referenced by findHPD().

40  {
41  // the choice of which rbx to use is arbitrary,
42  // as long as we're consistent
43  return at(0).hpds_.end();
44 }

◆ endHPD() [2/2]

std::vector< HcalNoiseHPD >::const_iterator HcalNoiseRBXArray::endHPD ( void  ) const

Definition at line 33 of file HcalNoiseRBXArray.cc.

33  {
34  // the choice of which rbx to use is arbitrary,
35  // as long as we're consistent
36  return at(0).hpds_.end();
37 }

◆ endRBX() [1/2]

HcalNoiseRBXArray::iterator reco::HcalNoiseRBXArray::endRBX ( void  )
inline

Definition at line 41 of file HcalNoiseRBXArray.h.

Referenced by findRBX().

41 { return end(); }

◆ endRBX() [2/2]

HcalNoiseRBXArray::const_iterator reco::HcalNoiseRBXArray::endRBX ( void  ) const
inline

Definition at line 42 of file HcalNoiseRBXArray.h.

42 { return end(); }

◆ findHPD() [1/10]

std::vector< HcalNoiseHPD >::iterator HcalNoiseRBXArray::findHPD ( int  hpdindex)

Definition at line 46 of file HcalNoiseRBXArray.cc.

References endHPD(), Exception, reco::HcalNoiseRBX::hpds_, HcalHPDRBXMap::indexRBXfromHPD(), HcalHPDRBXMap::isValidHPD(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and edm::errors::LogicError.

Referenced by findHPD().

46  {
47  // if the hpdindex is invalid
48  if (!HcalHPDRBXMap::isValidHPD(hpdindex))
49  return endHPD();
50 
51  int rbxindex = HcalHPDRBXMap::indexRBXfromHPD(hpdindex);
52 
53  // find the HPD in the RBX
54  HcalNoiseRBX& rbx = at(rbxindex);
55  for (std::vector<HcalNoiseHPD>::iterator it = rbx.hpds_.begin(); it != rbx.hpds_.end(); ++it) {
56  if (it->idnumber_ == hpdindex)
57  return it;
58  }
59 
60  // if we're here, this is a bug
62  << "Could not find hpdindex " << hpdindex << " in HcalNoiseRBXArray::findHPDfromDetID(). This is a bug.\n";
63  return endHPD();
64 }
static int indexRBXfromHPD(int hpdindex)
std::vector< HcalNoiseHPD >::iterator endHPD(void)
static bool isValidHPD(int index)
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105

◆ findHPD() [2/10]

std::vector< HcalNoiseHPD >::const_iterator HcalNoiseRBXArray::findHPD ( int  hpdindex) const

Definition at line 67 of file HcalNoiseRBXArray.cc.

References endHPD(), Exception, reco::HcalNoiseRBX::hpds_, HcalHPDRBXMap::indexRBXfromHPD(), HcalHPDRBXMap::isValidHPD(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and edm::errors::LogicError.

67  {
68  // if the hpdindex is invalid
69  if (!HcalHPDRBXMap::isValidHPD(hpdindex))
70  return endHPD();
71 
72  int rbxindex = HcalHPDRBXMap::indexRBXfromHPD(hpdindex);
73 
74  // find the HPD in the RBX
75  const HcalNoiseRBX& rbx = at(rbxindex);
76  for (std::vector<HcalNoiseHPD>::const_iterator it = rbx.hpds_.begin(); it != rbx.hpds_.end(); ++it) {
77  if (it->idnumber_ == hpdindex)
78  return it;
79  }
80 
81  // if we're here, this is a bug
83  << "Could not find hpdindex " << hpdindex << " in HcalNoiseRBXArray::findHPDfromDetID(). This is a bug.\n";
84  return endHPD();
85 }
static int indexRBXfromHPD(int hpdindex)
std::vector< HcalNoiseHPD >::iterator endHPD(void)
static bool isValidHPD(int index)
std::vector< HcalNoiseHPD > hpds_
Definition: HcalNoiseRBX.h:105

◆ findHPD() [3/10]

std::vector< HcalNoiseHPD >::iterator HcalNoiseRBXArray::findHPD ( const HcalDetId id)

Definition at line 99 of file HcalNoiseRBXArray.cc.

References endHPD(), findHPD(), HcalHPDRBXMap::indexHPD(), and HcalHPDRBXMap::isValid().

99  {
100  if (!HcalHPDRBXMap::isValid(id))
101  return endHPD();
102  return findHPD(HcalHPDRBXMap::indexHPD(id));
103 }
std::vector< HcalNoiseHPD >::iterator endHPD(void)
std::vector< HcalNoiseHPD >::iterator findHPD(int hpdindex)
static bool isValid(const HcalDetId &)
static int indexHPD(const HcalDetId &)

◆ findHPD() [4/10]

std::vector< HcalNoiseHPD >::const_iterator HcalNoiseRBXArray::findHPD ( const HcalDetId id) const

Definition at line 105 of file HcalNoiseRBXArray.cc.

References endHPD(), findHPD(), HcalHPDRBXMap::indexHPD(), and HcalHPDRBXMap::isValid().

105  {
106  if (!HcalHPDRBXMap::isValid(id))
107  return endHPD();
108  return findHPD(HcalHPDRBXMap::indexHPD(id));
109 }
std::vector< HcalNoiseHPD >::iterator endHPD(void)
std::vector< HcalNoiseHPD >::iterator findHPD(int hpdindex)
static bool isValid(const HcalDetId &)
static int indexHPD(const HcalDetId &)

◆ findHPD() [5/10]

std::vector< HcalNoiseHPD >::iterator HcalNoiseRBXArray::findHPD ( const HBHEDataFrame f)

Definition at line 123 of file HcalNoiseRBXArray.cc.

References f, and findHPD().

123 { return findHPD(f.id()); }
std::vector< HcalNoiseHPD >::iterator findHPD(int hpdindex)
double f[11][100]

◆ findHPD() [6/10]

std::vector< HcalNoiseHPD >::const_iterator HcalNoiseRBXArray::findHPD ( const HBHEDataFrame f) const

Definition at line 125 of file HcalNoiseRBXArray.cc.

References f, and findHPD().

125  {
126  return findHPD(f.id());
127 }
std::vector< HcalNoiseHPD >::iterator findHPD(int hpdindex)
double f[11][100]

◆ findHPD() [7/10]

std::vector< HcalNoiseHPD >::iterator HcalNoiseRBXArray::findHPD ( const HBHERecHit h)

Definition at line 133 of file HcalNoiseRBXArray.cc.

References findHPD(), and h.

133 { return findHPD(h.id()); }
std::vector< HcalNoiseHPD >::iterator findHPD(int hpdindex)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ findHPD() [8/10]

std::vector< HcalNoiseHPD >::const_iterator HcalNoiseRBXArray::findHPD ( const HBHERecHit h) const

Definition at line 135 of file HcalNoiseRBXArray.cc.

References findHPD(), and h.

135  {
136  return findHPD(h.id());
137 }
std::vector< HcalNoiseHPD >::iterator findHPD(int hpdindex)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ findHPD() [9/10]

void HcalNoiseRBXArray::findHPD ( const CaloTower tower,
std::vector< std::vector< HcalNoiseHPD >::iterator > &  vec 
)

Definition at line 161 of file HcalNoiseRBXArray.cc.

References findHPD(), HcalHPDRBXMap::indexHPDfromEtaPhi(), HcalHPDRBXMap::isValid(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and l1tHGCalTowerProducer_cfi::tower.

161  {
162  // clear the vector
163  vec.clear();
164 
165  // check if the tower corresponds to a valid HPD/RBX
166  if (!HcalHPDRBXMap::isValid(tower.ieta(), tower.iphi()))
167  return;
168 
169  // find the HPD indices
170  std::vector<int> hpdindices;
171  HcalHPDRBXMap::indexHPDfromEtaPhi(tower.ieta(), tower.iphi(), hpdindices);
172  for (std::vector<int>::const_iterator it = hpdindices.begin(); it != hpdindices.end(); ++it)
173  vec.push_back(findHPD(*it));
174 
175  return;
176 }
static void indexHPDfromEtaPhi(int ieta, int iphi, std::vector< int > &hpdindices)
std::vector< HcalNoiseHPD >::iterator findHPD(int hpdindex)
static bool isValid(const HcalDetId &)

◆ findHPD() [10/10]

void HcalNoiseRBXArray::findHPD ( const CaloTower tower,
std::vector< std::vector< HcalNoiseHPD >::const_iterator > &  vec 
) const

Definition at line 143 of file HcalNoiseRBXArray.cc.

References findHPD(), HcalHPDRBXMap::indexHPDfromEtaPhi(), HcalHPDRBXMap::isValid(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and l1tHGCalTowerProducer_cfi::tower.

144  {
145  // clear the vector
146  vec.clear();
147 
148  // check if the tower corresponds to a valid HPD/RBX
149  if (!HcalHPDRBXMap::isValid(tower.ieta(), tower.iphi()))
150  return;
151 
152  // find the HPD indices
153  std::vector<int> hpdindices;
154  HcalHPDRBXMap::indexHPDfromEtaPhi(tower.ieta(), tower.iphi(), hpdindices);
155  for (std::vector<int>::const_iterator it = hpdindices.begin(); it != hpdindices.end(); ++it)
156  vec.push_back(findHPD(*it));
157 
158  return;
159 }
static void indexHPDfromEtaPhi(int ieta, int iphi, std::vector< int > &hpdindices)
std::vector< HcalNoiseHPD >::iterator findHPD(int hpdindex)
static bool isValid(const HcalDetId &)

◆ findRBX() [1/10]

HcalNoiseRBXArray::iterator HcalNoiseRBXArray::findRBX ( int  rbxindex)

Definition at line 87 of file HcalNoiseRBXArray.cc.

References endRBX(), and HcalHPDRBXMap::isValidRBX().

Referenced by findRBX().

87  {
88  if (!HcalHPDRBXMap::isValidRBX(rbxindex))
89  return endRBX();
90  return begin() + rbxindex;
91 }
static bool isValidRBX(int index)
HcalNoiseRBXArray::iterator endRBX(void)

◆ findRBX() [2/10]

HcalNoiseRBXArray::const_iterator HcalNoiseRBXArray::findRBX ( int  rbxindex) const

Definition at line 93 of file HcalNoiseRBXArray.cc.

References endRBX(), and HcalHPDRBXMap::isValidRBX().

93  {
94  if (!HcalHPDRBXMap::isValidRBX(rbxindex))
95  return endRBX();
96  return begin() + rbxindex;
97 }
static bool isValidRBX(int index)
HcalNoiseRBXArray::iterator endRBX(void)

◆ findRBX() [3/10]

HcalNoiseRBXArray::iterator HcalNoiseRBXArray::findRBX ( const HcalDetId id)

Definition at line 111 of file HcalNoiseRBXArray.cc.

References endRBX(), findRBX(), HcalHPDRBXMap::indexRBX(), and HcalHPDRBXMap::isValid().

111  {
112  if (!HcalHPDRBXMap::isValid(id))
113  return endRBX();
114  return findRBX(HcalHPDRBXMap::indexRBX(id));
115 }
static int indexRBX(const HcalDetId &)
HcalNoiseRBXArray::iterator findRBX(int rbxindex)
HcalNoiseRBXArray::iterator endRBX(void)
static bool isValid(const HcalDetId &)

◆ findRBX() [4/10]

HcalNoiseRBXArray::const_iterator HcalNoiseRBXArray::findRBX ( const HcalDetId id) const

Definition at line 117 of file HcalNoiseRBXArray.cc.

References endRBX(), findRBX(), HcalHPDRBXMap::indexRBX(), and HcalHPDRBXMap::isValid().

117  {
118  if (!HcalHPDRBXMap::isValid(id))
119  return endRBX();
120  return findRBX(HcalHPDRBXMap::indexRBX(id));
121 }
static int indexRBX(const HcalDetId &)
HcalNoiseRBXArray::iterator findRBX(int rbxindex)
HcalNoiseRBXArray::iterator endRBX(void)
static bool isValid(const HcalDetId &)

◆ findRBX() [5/10]

HcalNoiseRBXArray::iterator HcalNoiseRBXArray::findRBX ( const HBHEDataFrame f)

Definition at line 129 of file HcalNoiseRBXArray.cc.

References f, and findRBX().

129 { return findRBX(f.id()); }
HcalNoiseRBXArray::iterator findRBX(int rbxindex)
double f[11][100]

◆ findRBX() [6/10]

HcalNoiseRBXArray::const_iterator HcalNoiseRBXArray::findRBX ( const HBHEDataFrame f) const

Definition at line 131 of file HcalNoiseRBXArray.cc.

References f, and findRBX().

131 { return findRBX(f.id()); }
HcalNoiseRBXArray::iterator findRBX(int rbxindex)
double f[11][100]

◆ findRBX() [7/10]

HcalNoiseRBXArray::iterator HcalNoiseRBXArray::findRBX ( const HBHERecHit h)

Definition at line 139 of file HcalNoiseRBXArray.cc.

References findRBX(), and h.

139 { return findRBX(h.id()); }
HcalNoiseRBXArray::iterator findRBX(int rbxindex)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ findRBX() [8/10]

HcalNoiseRBXArray::const_iterator HcalNoiseRBXArray::findRBX ( const HBHERecHit h) const

Definition at line 141 of file HcalNoiseRBXArray.cc.

References findRBX(), and h.

141 { return findRBX(h.id()); }
HcalNoiseRBXArray::iterator findRBX(int rbxindex)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ findRBX() [9/10]

void HcalNoiseRBXArray::findRBX ( const CaloTower tower,
std::vector< HcalNoiseRBXArray::iterator > &  vec 
)

Definition at line 178 of file HcalNoiseRBXArray.cc.

References findRBX(), HcalHPDRBXMap::indexRBXfromEtaPhi(), HcalHPDRBXMap::isValid(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and l1tHGCalTowerProducer_cfi::tower.

178  {
179  // clear the vector
180  vec.clear();
181 
182  // check if the tower corresponds to a valid HPD/RBX
183  if (!HcalHPDRBXMap::isValid(tower.ieta(), tower.iphi()))
184  return;
185 
186  // find the RBX indices
187  std::vector<int> rbxindices;
188  HcalHPDRBXMap::indexRBXfromEtaPhi(tower.ieta(), tower.iphi(), rbxindices);
189  for (std::vector<int>::const_iterator it = rbxindices.begin(); it != rbxindices.end(); ++it)
190  vec.push_back(findRBX(*it));
191 
192  return;
193 }
HcalNoiseRBXArray::iterator findRBX(int rbxindex)
static void indexRBXfromEtaPhi(int ieta, int iphi, std::vector< int > &rbxindices)
static bool isValid(const HcalDetId &)

◆ findRBX() [10/10]

void HcalNoiseRBXArray::findRBX ( const CaloTower tower,
std::vector< HcalNoiseRBXArray::const_iterator > &  vec 
) const

Definition at line 195 of file HcalNoiseRBXArray.cc.

References findRBX(), HcalHPDRBXMap::indexRBXfromEtaPhi(), HcalHPDRBXMap::isValid(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and l1tHGCalTowerProducer_cfi::tower.

195  {
196  // clear the vector
197  vec.clear();
198 
199  // check if the tower corresponds to a valid HPD/RBX
200  if (!HcalHPDRBXMap::isValid(tower.ieta(), tower.iphi()))
201  return;
202 
203  // find the RBX indices
204  std::vector<int> rbxindices;
205  HcalHPDRBXMap::indexRBXfromEtaPhi(tower.ieta(), tower.iphi(), rbxindices);
206  for (std::vector<int>::const_iterator it = rbxindices.begin(); it != rbxindices.end(); ++it)
207  vec.push_back(findRBX(*it));
208 
209  return;
210 }
HcalNoiseRBXArray::iterator findRBX(int rbxindex)
static void indexRBXfromEtaPhi(int ieta, int iphi, std::vector< int > &rbxindices)
static bool isValid(const HcalDetId &)