CMS 3D CMS Logo

HcalNoiseRBXArray.h
Go to the documentation of this file.
1 #ifndef _RECOMET_METALGORITHMS_HCALNOISERBXARRAY_H_
2 #define _RECOMET_METALGORITHMS_HCALNOISERBXARRAY_H_
3 
4 //
5 // HcalNoiseRBXArray.h
6 //
7 // description: A boost::array of 72 HcalNoiseRBXs designed to simply search/sorting of elements
8 // Automatically labels each RBX individually, and provides O(1) searching tools
9 //
10 //
11 // author: J.P. Chou, Brown
12 //
13 //
14 
15 #include <array>
16 
24 
25 namespace reco {
26 
27  class HcalNoiseRBXArray : public std::array<HcalNoiseRBX, HcalHPDRBXMap::NUM_RBXS> {
28  public:
29  // constructor/destructor
31  virtual ~HcalNoiseRBXArray();
32 
33  // one past the "last" HPD
34  // provides the same functionality as HcalNoiseRBXArray::iterator end()
35  // defined already by the base class, to denote that the HPD was not found
36  std::vector<HcalNoiseHPD>::iterator endHPD(void);
37  std::vector<HcalNoiseHPD>::const_iterator endHPD(void) const;
38 
39  // endRBX() and end() are identical
40  // added for symmetry with endHPD()
41  inline HcalNoiseRBXArray::iterator endRBX(void) { return end(); }
42  inline HcalNoiseRBXArray::const_iterator endRBX(void) const { return end(); }
43 
44  // search tools to get the appropriate HPD/RBX in the array
45  // if input is invalid, returns endHPD() or endRBX() when appropriate
46  std::vector<HcalNoiseHPD>::iterator findHPD(int hpdindex);
47  std::vector<HcalNoiseHPD>::const_iterator findHPD(int hpdindex) const;
48  HcalNoiseRBXArray::iterator findRBX(int rbxindex);
49  HcalNoiseRBXArray::const_iterator findRBX(int rbxindex) const;
50  std::vector<HcalNoiseHPD>::iterator findHPD(const HcalDetId&);
51  std::vector<HcalNoiseHPD>::const_iterator findHPD(const HcalDetId&) const;
52  HcalNoiseRBXArray::iterator findRBX(const HcalDetId&);
53  HcalNoiseRBXArray::const_iterator findRBX(const HcalDetId&) const;
54  std::vector<HcalNoiseHPD>::iterator findHPD(const HBHEDataFrame&);
55  std::vector<HcalNoiseHPD>::const_iterator findHPD(const HBHEDataFrame&) const;
56  HcalNoiseRBXArray::iterator findRBX(const HBHEDataFrame&);
57  HcalNoiseRBXArray::const_iterator findRBX(const HBHEDataFrame&) const;
58  std::vector<HcalNoiseHPD>::iterator findHPD(const HBHERecHit&);
59  std::vector<HcalNoiseHPD>::const_iterator findHPD(const HBHERecHit&) const;
60  HcalNoiseRBXArray::iterator findRBX(const HBHERecHit&);
61  HcalNoiseRBXArray::const_iterator findRBX(const HBHERecHit&) const;
62 
63  // same as above but, multiple HPDs/RBXs are possible within one calotower
64  void findHPD(const CaloTower&, std::vector<std::vector<HcalNoiseHPD>::iterator>&);
65  void findHPD(const CaloTower&, std::vector<std::vector<HcalNoiseHPD>::const_iterator>&) const;
66  void findRBX(const CaloTower&, std::vector<HcalNoiseRBXArray::iterator>&);
67  void findRBX(const CaloTower&, std::vector<HcalNoiseRBXArray::const_iterator>&) const;
68 
69  private:
70  };
71 
72 } // namespace reco
73 
74 #endif
HcalNoiseRBX.h
CaloTower.h
HBHERecHit
Definition: HBHERecHit.h:13
HcalHPDRBXMap.h
HcalNoiseHPD.h
mps_check.array
array
Definition: mps_check.py:216
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
end
#define end
Definition: vmac.h:39
reco::HcalNoiseRBXArray::findRBX
HcalNoiseRBXArray::iterator findRBX(int rbxindex)
Definition: HcalNoiseRBXArray.cc:87
reco::HcalNoiseRBXArray::findHPD
std::vector< HcalNoiseHPD >::iterator findHPD(int hpdindex)
Definition: HcalNoiseRBXArray.cc:46
HBHEDataFrame
Definition: HBHEDataFrame.h:14
reco::HcalNoiseRBXArray::~HcalNoiseRBXArray
virtual ~HcalNoiseRBXArray()
Definition: HcalNoiseRBXArray.cc:31
HcalDetId.h
reco::HcalNoiseRBXArray::HcalNoiseRBXArray
HcalNoiseRBXArray()
Definition: HcalNoiseRBXArray.cc:15
reco::HcalNoiseRBXArray::endHPD
std::vector< HcalNoiseHPD >::iterator endHPD(void)
Definition: HcalNoiseRBXArray.cc:40
HcalDetId
Definition: HcalDetId.h:12
CaloTower
Definition: CaloTower.h:26
reco::HcalNoiseRBXArray::endRBX
HcalNoiseRBXArray::iterator endRBX(void)
Definition: HcalNoiseRBXArray.h:41
HBHERecHit.h
reco::HcalNoiseRBXArray
Definition: HcalNoiseRBXArray.h:27
reco::HcalNoiseRBXArray::endRBX
HcalNoiseRBXArray::const_iterator endRBX(void) const
Definition: HcalNoiseRBXArray.h:42
HBHEDataFrame.h