File indexing completed on 2024-04-06 12:25:46
0001 #ifndef RecoLocalCalo_HcalRecAlgos_AbsPlan1RechitCombiner_h_
0002 #define RecoLocalCalo_HcalRecAlgos_AbsPlan1RechitCombiner_h_
0003
0004 #include <utility>
0005
0006 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
0007
0008 class HcalTopology;
0009
0010 class AbsPlan1RechitCombiner {
0011 public:
0012 inline virtual ~AbsPlan1RechitCombiner() {}
0013
0014
0015
0016 virtual void setTopo(const HcalTopology* topo) = 0;
0017
0018
0019
0020 virtual void clear() = 0;
0021
0022
0023
0024
0025 virtual void add(const HBHERecHit& rh) = 0;
0026
0027
0028
0029 virtual void combine(HBHERecHitCollection* collectionToFill) = 0;
0030
0031 protected:
0032
0033
0034
0035 typedef std::pair<float, float> FPair;
0036
0037 static float energyWeightedAverage(const FPair* data, unsigned len, float valueToReturnOnFailure);
0038 };
0039
0040 #endif