ATLAS Offline Software
Loading...
Searching...
No Matches
MVAInputEvaluator.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MVAINPUTEVALUATOR_H
6#define MVAINPUTEVALUATOR_H
7
11
12#include <iterator>
13#include <map>
14#include <memory>
15#include <string>
16
17namespace CP {
18
20public:
23
24 // Nested class for evaluating single input features
26 public:
28 virtual ~MiniEvaluator() {};
29 virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, const xAOD::EventInfo& evt) const = 0;
30 };
31
32 // Enumerate the different possible inputs
62
63 // Handy typedefs
64 // Defines the mapping of strings to Inputs:
65 typedef std::map<std::string, Input> InputSelectionMap;
66 // Defines the mapping of those same strings to MiniEvaluators:
67 typedef std::map<std::string, std::unique_ptr<MiniEvaluator>> InputEvaluatorMap;
68
69 void add(const std::string& name, const MVAInputEvaluator::Input& type);
71 void eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, const xAOD::EventInfo& evt, std::map<std::string, double>& input) const;
72 void clear();
73
74private:
75 // Loaded evaluator map
77
78};
79
80} // namepace CP
81
82#endif // MVAINPUTEVALUATOR_H
virtual float eval(const xAOD::TrackParticle &trk, const xAOD::Vertex &vx, const xAOD::EventInfo &evt) const =0
void add(const std::string &name, const MVAInputEvaluator::Input &type)
InputEvaluatorMap m_evalMap
void load(const MVAInputEvaluator::InputSelectionMap &selection)
std::map< std::string, Input > InputSelectionMap
void eval(const xAOD::TrackParticle &trk, const xAOD::Vertex &vx, const xAOD::EventInfo &evt, std::map< std::string, double > &input) const
std::map< std::string, std::unique_ptr< MiniEvaluator > > InputEvaluatorMap
const std::string selection
Select isolated Photons, Electrons and Muons.
EventInfo_v1 EventInfo
Definition of the latest event info version.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.