CMS 3D CMS Logo

SimplePlan1RechitCombiner.h
Go to the documentation of this file.
1 #ifndef RecoLocalCalo_HcalRecAlgos_SimplePlan1RechitCombiner_h_
2 #define RecoLocalCalo_HcalRecAlgos_SimplePlan1RechitCombiner_h_
3 
4 // Base class header
6 
8 {
9 public:
11 
12  inline virtual ~SimplePlan1RechitCombiner() {}
13 
14  virtual void setTopo(const HcalTopology* topo) override;
15  virtual void clear() override;
16  virtual void add(const HBHERecHit& rh) override;
17  virtual void combine(HBHERecHitCollection* toFill) override;
18 
19 protected:
20  // Map the original detector id into the id of the composite rechit
21  virtual HcalDetId mapRechit(HcalDetId from) const;
22 
23  // Return rechit with id of 0 if it is to be discarded
24  virtual HBHERecHit makeRechit(HcalDetId idToMake,
25  const std::vector<const HBHERecHit*>& rechits) const;
26 
27  // Combine rechit auxiliary information
28  virtual void combineAuxInfo(const std::vector<const HBHERecHit*>& rechits,
29  HBHERecHit* rh) const;
30 
32 
33 private:
34  // The first element of the pair is the id of the combined rechit.
35  // The second element is the pointer to the original rechit.
36  typedef std::pair<HcalDetId, const HBHERecHit*> MapItem;
37 
38  std::vector<MapItem> rechitMap_;
39  std::vector<const HBHERecHit*> ptrbuf_;
40 };
41 
42 #endif // RecoLocalCalo_HcalRecAlgos_SimplePlan1RechitCombiner_h_
std::vector< MapItem > rechitMap_
std::vector< const HBHERecHit * > ptrbuf_
virtual void combineAuxInfo(const std::vector< const HBHERecHit * > &rechits, HBHERecHit *rh) const
virtual HBHERecHit makeRechit(HcalDetId idToMake, const std::vector< const HBHERecHit * > &rechits) const
std::pair< HcalDetId, const HBHERecHit * > MapItem
virtual void combine(HBHERecHitCollection *toFill) override
virtual HcalDetId mapRechit(HcalDetId from) const
virtual void add(const HBHERecHit &rh) override
virtual void setTopo(const HcalTopology *topo) override