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 public:
10 
11  inline ~SimplePlan1RechitCombiner() override {}
12 
13  void setTopo(const HcalTopology* topo) override;
14  void clear() override;
15  void add(const HBHERecHit& rh) override;
16  void combine(HBHERecHitCollection* toFill) override;
17 
18 protected:
19  // Map the original detector id into the id of the composite rechit
20  virtual HcalDetId mapRechit(HcalDetId from) const;
21 
22  // Return rechit with id of 0 if it is to be discarded
23  virtual HBHERecHit makeRechit(HcalDetId idToMake, const std::vector<const HBHERecHit*>& rechits) const;
24 
25  // Combine rechit auxiliary information
26  virtual void combineAuxInfo(const std::vector<const HBHERecHit*>& rechits, HBHERecHit* rh) const;
27 
29 
30 private:
31  // The first element of the pair is the id of the combined rechit.
32  // The second element is the pointer to the original rechit.
33  typedef std::pair<HcalDetId, const HBHERecHit*> MapItem;
34 
35  std::vector<MapItem> rechitMap_;
36  std::vector<const HBHERecHit*> ptrbuf_;
37 };
38 
39 #endif // RecoLocalCalo_HcalRecAlgos_SimplePlan1RechitCombiner_h_
AbsPlan1RechitCombiner
Definition: AbsPlan1RechitCombiner.h:10
SimplePlan1RechitCombiner::combine
void combine(HBHERecHitCollection *toFill) override
Definition: SimplePlan1RechitCombiner.cc:25
HBHERecHit
Definition: HBHERecHit.h:13
HcalTopology
Definition: HcalTopology.h:26
edm::SortedCollection
Definition: SortedCollection.h:49
SimplePlan1RechitCombiner::makeRechit
virtual HBHERecHit makeRechit(HcalDetId idToMake, const std::vector< const HBHERecHit * > &rechits) const
Definition: SimplePlan1RechitCombiner.cc:53
SimplePlan1RechitCombiner::rechitMap_
std::vector< MapItem > rechitMap_
Definition: SimplePlan1RechitCombiner.h:35
SimplePlan1RechitCombiner::ptrbuf_
std::vector< const HBHERecHit * > ptrbuf_
Definition: SimplePlan1RechitCombiner.h:36
SimplePlan1RechitCombiner
Definition: SimplePlan1RechitCombiner.h:7
SimplePlan1RechitCombiner::clear
void clear() override
Definition: SimplePlan1RechitCombiner.cc:18
SimplePlan1RechitCombiner::mapRechit
virtual HcalDetId mapRechit(HcalDetId from) const
Definition: SimplePlan1RechitCombiner.cc:51
HI_PhotonSkim_cff.rechits
rechits
Definition: HI_PhotonSkim_cff.py:76
SimplePlan1RechitCombiner::~SimplePlan1RechitCombiner
~SimplePlan1RechitCombiner() override
Definition: SimplePlan1RechitCombiner.h:11
SimplePlan1RechitCombiner::combineAuxInfo
virtual void combineAuxInfo(const std::vector< const HBHERecHit * > &rechits, HBHERecHit *rh) const
Definition: SimplePlan1RechitCombiner.cc:99
HcalDetId
Definition: HcalDetId.h:12
SimplePlan1RechitCombiner::topo_
const HcalTopology * topo_
Definition: SimplePlan1RechitCombiner.h:28
SimplePlan1RechitCombiner::SimplePlan1RechitCombiner
SimplePlan1RechitCombiner()
Definition: SimplePlan1RechitCombiner.cc:14
SimplePlan1RechitCombiner::MapItem
std::pair< HcalDetId, const HBHERecHit * > MapItem
Definition: SimplePlan1RechitCombiner.h:33
SimplePlan1RechitCombiner::add
void add(const HBHERecHit &rh) override
Definition: SimplePlan1RechitCombiner.cc:20
AbsPlan1RechitCombiner.h
SimplePlan1RechitCombiner::setTopo
void setTopo(const HcalTopology *topo) override
Definition: SimplePlan1RechitCombiner.cc:16