CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EgammaBDTOutputTransformer.h
Go to the documentation of this file.
1 #ifndef RecoEgamma_ElectronTools_EgammaBDTOutputTransformer_h
2 #define RecoEgamma_ElectronTools_EgammaBDTOutputTransformer_h
3 
4 //author: Sam Harper (RAL)
5 //description:
6 // translates the raw value returned by the BDT output to the true value
7 // apparently its MINUIT-like, orginally taken from E/gamma regression applicator
8 
9 #include <vdt/vdtMath.h>
10 
12 public:
13  EgammaBDTOutputTransformer(const double limitLow, const double limitHigh)
14  : offset_(limitLow + 0.5 * (limitHigh - limitLow)), scale_(0.5 * (limitHigh - limitLow)) {}
15 
16  double operator()(const double rawVal) const { return offset_ + scale_ * vdt::fast_sin(rawVal); }
17 
18 private:
19  double offset_;
20  double scale_;
21 };
22 
23 #endif
EgammaBDTOutputTransformer(const double limitLow, const double limitHigh)
double operator()(const double rawVal) const