1 #ifndef RecoEgamma_EgammaTools_MVAVariableManager_H
2 #define RecoEgamma_EgammaTools_MVAVariableManager_H
13 template <
class ParticleType>
18 std::ifstream
file(variableDefinitionFileEdm.
fullPath());
26 if (
name.find(
"#") != std::string::npos) {
39 std::map<std::string, int>::iterator it =
indexMap_.find(
name);
56 if (varInfo.auxIndex >= 0)
57 value = auxVariables[varInfo.auxIndex];
61 if (varInfo.hasLowerClip &&
value < varInfo.lowerClipValue) {
62 value = varInfo.lowerClipValue;
64 if (varInfo.hasUpperClip &&
value > varInfo.upperClipValue) {
65 value = varInfo.upperClipValue;
83 bool hasLowerClip = lowerClip.find(
"None") == std::string::npos;
84 bool hasUpperClip = upperClip.find(
"None") == std::string::npos;
85 bool isAuxiliary =
formula.find(
"Rho") != std::string::npos;
86 float lowerClipValue = hasLowerClip ? (
float)::atof(lowerClip.c_str()) : 0.;
87 float upperClipValue = hasUpperClip ? (
float)::atof(upperClip.c_str()) : 0.;
100 MVAVariableInfo varInfo{
101 .hasLowerClip = hasLowerClip,
102 .hasUpperClip = hasUpperClip,
103 .lowerClipValue = lowerClipValue,
104 .upperClipValue = upperClipValue,
105 .auxIndex = auxIndex,