57 #ifndef IClassifierReader__def
58 #define IClassifierReader__def
69 virtual double GetMvaValue(
const std::vector<double>& inputValues )
const = 0;
86 ReadLD( std::vector<std::string>& theInputVars )
93 const char* inputVars[] = {
"track_deta",
"track_dlayer",
"track_layer",
"track_pT",
"approach_dist",
"vtx_radius",
"vtxTrack_dist",
"photon_m",
"photon_pT",
"cluster_prob" };
96 if (theInputVars.size() <= 0) {
97 std::cout <<
"Problem in class \"" <<
fClassName <<
"\": empty input vector" << std::endl;
101 if (theInputVars.size() !=
fNvars) {
102 std::cout <<
"Problem in class \"" <<
fClassName <<
"\": mismatch in number of input values: "
103 << theInputVars.size() <<
" != " <<
fNvars << std::endl;
108 for (
size_t ivar = 0; ivar < theInputVars.size(); ivar++) {
109 if (theInputVars[ivar] != inputVars[ivar]) {
110 std::cout <<
"Problem in class \"" <<
fClassName <<
"\": mismatch in input variable names" << std::endl
111 <<
" for variable [" << ivar <<
"]: " << theInputVars[ivar].c_str() <<
" != " << inputVars[ivar] << std::endl;
163 double GetMvaValue(
const std::vector<double>& inputValues )
const;
184 return 2*(x -
xmin)/(xmax - xmin) - 1.0;
192 double GetMvaValue__(
const std::vector<double>& inputValues )
const;
214 std::cout <<
"Problem in class \"" <<
fClassName <<
"\"::Initialize: mismatch in number of input values"
223 for (
size_t ivar = 1; ivar <
fNvars+1; ivar++) {
243 std::cout <<
"Problem in class \"" <<
fClassName <<
"\": cannot return classifier response"
244 <<
" because status is dirty" << std::endl;
250 std::vector<double> iV;
251 iV.reserve(inputValues.size());
253 for (std::vector<double>::const_iterator varIt = inputValues.begin();
254 varIt != inputValues.end(); varIt++, ivar++) {