10#include <tracking/trackFindingCDC/filters/base/FilterOnVarSet.dcl.h>
11#include <tracking/trackFindingCDC/filters/base/Filter.fwd.h>
13#include <tracking/trackFindingCDC/varsets/BaseVarSet.h>
15#include <tracking/trackFindingCDC/numerics/Weight.h>
17#include <framework/database/DBObjPtr.h>
18#include <tracking/dbobjects/TrackingMVAFilterParameters.h>
31 namespace TrackFindingCDC {
35 template<
class AFilter>
44 using Object =
typename AFilter::Object;
52 explicit MVA(std::unique_ptr<AVarSet> varSet,
53 const std::string& identifier =
"",
54 double defaultCut = NAN,
55 const std::string& dbObjectName =
"");
77 std::vector<float>
predict(
const std::vector<Object*>& objs);
80 virtual std::vector<float>
operator()(
const std::vector <Object*>& objs)
override;
99 template<
class AVarSet>
111 explicit MVAFilter(
const std::string& defaultTrainingName =
"",
112 double defaultCut = NAN,
113 const std::string& defaultDBObjectName =
"");
The Module parameter list class.
Generic class that generates some named float values from a given object.
Class to interact with the MVA package.
typename AVarSet::Object Object
Type of the object to be analysed.
MVA< Filter< typename AVarSet::Object > > Super
Type of the super class.
~MVAFilter()
Default destructor.
MVAFilter(const std::string &defaultTrainingName="", double defaultCut=NAN, const std::string &defaultDBObjectName="")
Constructor of the filter.
virtual ~MVA()
Default destructor.
void initialize() override
Initialize the expert before event processing.
Weight operator()(const Object &obj) override
Function to object for its signalness.
virtual std::vector< float > operator()(const std::vector< Object * > &objs) override
Evaluate the MVA method over a vector of objects.
OnVarSet< BaseAxialSegmentPairFilter > Super
std::unique_ptr< MVAExpert > m_mvaExpert
std::string m_DBPayloadName
std::vector< float > predict(const std::vector< Object * > &objs)
Evaluate the MVA method over several inputs simultaneously.
void beginRun() override
Signal to load new run parameters.
MVA(std::unique_ptr< AVarSet > varSet, const std::string &identifier="", double defaultCut=NAN, const std::string &dbObjectName="")
Constructor of the filter.
typename BaseAxialSegmentPairFilter::Object Object
BaseVarSet< Object > AVarSet
virtual double predict(const Object &obj)
Evaluate the mva method.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the set of parameters of the filter to the module parameter list.
std::vector< Named< Float_t * > > m_namedVariables
OnVarSet(std::unique_ptr< AVarSet > varSet)
Constructor from the variable set the filter should use.
Abstract base class for different kinds of events.