File indexing completed on 2024-04-06 12:25:01
0001 #ifndef RecoEgamma_ElectronTools_EgammaBDTOutputTransformer_h
0002 #define RecoEgamma_ElectronTools_EgammaBDTOutputTransformer_h
0003
0004
0005
0006
0007
0008
0009 #include <vdt/vdtMath.h>
0010
0011 class EgammaBDTOutputTransformer {
0012 public:
0013 EgammaBDTOutputTransformer(const double limitLow, const double limitHigh)
0014 : offset_(limitLow + 0.5 * (limitHigh - limitLow)), scale_(0.5 * (limitHigh - limitLow)) {}
0015
0016 double operator()(const double rawVal) const { return offset_ + scale_ * vdt::fast_sin(rawVal); }
0017
0018 private:
0019 double offset_;
0020 double scale_;
0021 };
0022
0023 #endif