Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:24:26

0001 #ifndef RecoLocalCalo_HcalRecAlgos_SimplePlan1RechitCombiner_h_
0002 #define RecoLocalCalo_HcalRecAlgos_SimplePlan1RechitCombiner_h_
0003 
0004 // Base class header
0005 #include "RecoLocalCalo/HcalRecAlgos/interface/AbsPlan1RechitCombiner.h"
0006 
0007 class SimplePlan1RechitCombiner : public AbsPlan1RechitCombiner {
0008 public:
0009   SimplePlan1RechitCombiner();
0010 
0011   inline ~SimplePlan1RechitCombiner() override {}
0012 
0013   void setTopo(const HcalTopology* topo) override;
0014   void clear() override;
0015   void add(const HBHERecHit& rh) override;
0016   void combine(HBHERecHitCollection* toFill) override;
0017 
0018 protected:
0019   // Map the original detector id into the id of the composite rechit
0020   virtual HcalDetId mapRechit(HcalDetId from) const;
0021 
0022   // Return rechit with id of 0 if it is to be discarded
0023   virtual HBHERecHit makeRechit(HcalDetId idToMake, const std::vector<const HBHERecHit*>& rechits) const;
0024 
0025   // Combine rechit auxiliary information
0026   virtual void combineAuxInfo(const std::vector<const HBHERecHit*>& rechits, HBHERecHit* rh) const;
0027 
0028   const HcalTopology* topo_;
0029 
0030 private:
0031   // The first element of the pair is the id of the combined rechit.
0032   // The second element is the pointer to the original rechit.
0033   typedef std::pair<HcalDetId, const HBHERecHit*> MapItem;
0034 
0035   std::vector<MapItem> rechitMap_;
0036   std::vector<const HBHERecHit*> ptrbuf_;
0037 };
0038 
0039 #endif  // RecoLocalCalo_HcalRecAlgos_SimplePlan1RechitCombiner_h_