1 #ifndef AliNDFunctionInterface_H 2 #define AliNDFunctionInterface_H 19 template<
typename T> vector<T>
add_to_vector(vector<T> &z, T v);
21 template<
typename T,
typename... Args> vector<T>
add_to_vector(vector<T> &z, T v, Args... args);
22 template<
typename T,
typename... Args> vector<T>
make_vector(T v, Args... args);
35 template<
typename T,
typename... Args> T
EvalTHnLinear(
int id, T v, Args... args);
42 void registerMethod(std::string method, std::string content, TMVA::Types::EMVA
id){regressionMethodSetting[method]=content; regressionMethodID[method]=id;}
43 Int_t
FitMVA(TTree *
tree,
const char *varFit, TCut
cut,
const char * variableList,
const char *methodList,
const char *weights=NULL, Int_t index=-1);
44 TMVA::MethodBase *
LoadMVAReader(Int_t
id,
const char * inputFile,
const char *method,
const char *dir);
45 Int_t
LoadMVAReaderArray(Int_t
id,
const char * inputFile,
const char *methodMask,
const char *dirMask);
48 template<
typename T,
typename... Args> T
EvalMVA(
int id, T v, Args... args);
49 template<
typename T,
typename... Args> T
EvalMVAStat(
int id,
int statType, T v, Args... args);
57 z.push_back(v);
return add_to_vector<T>(z, args...);
71 vector<T> z; z.push_back(v);
return add_to_vector<T>(z, args...);
89 auto a = make_vector<double>(v, args...);
112 auto a = make_vector<float>(v, args...);
113 TMVA::Event
event = TMVA::Event(a,a.size());
115 if (method==NULL)
return 0;
116 return method->GetRegressionValues(&event)[0];
137 auto a = make_vector<float>(v, args...);
map< int, TMVA::MethodBase * > readerMethodBase
TMVA interface.
map< std::string, TMVA::Types::EMVA > regressionMethodID
map of registered TMVA regression methods
Int_t AppendMethodToArray(Int_t index, TMVA::MethodBase *method)
Register TMVA method to the array at index Not assumed to be used by users.
Double_t GetDeltaInterpolationLinear(THn *his, Double_t *xyz, Int_t dIndex, Int_t verbose)
Linear interpolation of the numerical derivative dV/dx (V(i+1)-V(i-1))/(2(delta) ...
Double_t GetInterpolationLinear(THn *his, Double_t *xyz, Int_t verbose)
Linear interpolation of the bin content.
vector< T > add_to_vector(vector< T > &z, T v)
generic variadic function - to get it from boost in the future
T EvalMVAStat(int id, int statType, T v, Args...args)
variadic function evaluating MVA
Interface to Ndimension functional representations (THn and TMVA)
map< std::string, std::string > regressionMethodSetting
map of registered array of TMVA::MethodBase - used to define TMVA statistics (Mean, Median, RMS, quantiles)
Int_t LoadMVAReaderArray(Int_t id, const char *inputFile, const char *methodMask, const char *dirMask)
T EvalMVA(int id, T v, Args...args)
Evaluate statistic.
T EvalTHnLinear(int id, T v, Args...args)
TMVA::MethodBase * LoadMVAReader(Int_t id, const char *inputFile, const char *method, const char *dir)
MVA regression.
void registerMethod(std::string method, std::string content, TMVA::Types::EMVA id)
example registering default methods ()
map< int, TObjArray * > readerMethodBaseArray
map of registered TMVA::MethodBase
std::map< std::string, THn * > hnMapArrayName
void registerDefaultMVAMethods()
map of registered TMVA regression methods
std::map< int, THn * > hnMapArrayInt
vector< T > make_vector(T v, Args...args)
Variadic function to create an vector (boost implementation )
Double_t EvalMVAStatArray(int id, int statType, vector< float > point)
Append method into array of methods - used e.g for bootstrap statistics.
Int_t FitMVA(TTree *tree, const char *varFit, TCut cut, const char *variableList, const char *methodList, const char *weights=NULL, Int_t index=-1)