Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:49:57

0001 #ifndef _TrivialWeightEstimator_H_
0002 #define _TrivialWeightEstimator_H_
0003 
0004 #include "CommonTools/Clustering1D/interface/WeightEstimator.h"
0005 
0006 #include <vector>
0007 
0008 /**
0009  * \class TrivialWeightEstimator
0010  *  trivial WeightEstimator that returns 1.
0011  */
0012 template <class T>
0013 class TrivialWeightEstimator : public WeightEstimator<T> {
0014 public:
0015   double weight(const std::vector<const T*>&) const override { return 1.0; }
0016 
0017   TrivialWeightEstimator* clone() const override { return new TrivialWeightEstimator<T>(*this); };
0018 };
0019 
0020 #endif