11#include <framework/core/Module.h>
13#include <mva/dataobjects/DatabaseRepresentationOfWeightfile.h>
14#include <mva/interface/Weightfile.h>
15#include <mva/interface/Expert.h>
17#include <framework/database/DBObjPtr.h>
19#include <analysis/VariableManager/Manager.h>
20#include <framework/dataobjects/EventExtraInfo.h>
61 virtual void event()
override;
99 std::vector<std::string>
103 std::vector<std::vector<const Variable::Manager::Var*>>
108 std::map<const Variable::Manager::Var*, float>
111 std::vector<std::unique_ptr<DBObjPtr<DatabaseRepresentationOfWeightfile>>>
122 std::vector<unsigned int>
This module adds an ExtraInfo to the Particle objects in a given ParticleList.
void init_mva(MVA::Weightfile &weightfile, unsigned int i)
Initialize mva expert, dataset and features Called every time the weightfile in the database changes ...
std::vector< int > m_overwriteExistingExtraInfo
vector of -1/0/1/2: overwrite if lower/ don't overwrite / overwrite if higher/ always overwrite,...
std::vector< std::unique_ptr< MVA::Expert > > m_experts
Vector of pointers to the current MVA Experts.
void setExtraInfoField(Particle *, std::string, float, unsigned int)
Set the extra info field.
std::vector< unsigned int > m_nClasses
number of classes (~outputs) of the MVA Experts.
virtual void initialize() override
Initialize the module.
std::vector< std::unique_ptr< MVA::SingleDataset > > m_datasets
Vector of pointers to the current input datasets.
virtual void event() override
Called for each event.
std::vector< bool > m_existGivenExtraInfo
check if the given extraInfo is already defined.
std::vector< std::vector< const Variable::Manager::Var * > > m_individual_feature_variables
Vector of pointers to the feature variables for each expert.
virtual void terminate() override
Called at the end of the event processing.
double m_signal_fraction_override
Signal Fraction which should be used.
std::vector< std::string > m_identifiers
weight-files
std::vector< std::string > m_listNames
input particle list names
MVAMultipleExpertsModule()
Constructor.
void fillDatasets(Particle *)
Evaluate the variables and fill the Datasets to be used by the experts.
virtual void beginRun() override
Called at the beginning of a new run.
std::map< const Variable::Manager::Var *, float > m_feature_variables
Map containing the values of all needed feature variables.
std::vector< std::vector< float > > analyse(Particle *)
Calculates expert output for given Particle pointer.
void setEventExtraInfoField(StoreObjPtr< EventExtraInfo >, std::string, float, unsigned int)
Set the event extra info field.
std::vector< std::string > m_extraInfoNames
Names under which the SignalProbability is stored in the extraInfo of the Particle object.
std::vector< std::unique_ptr< DBObjPtr< DatabaseRepresentationOfWeightfile > > > m_weightfile_representations
Vector of database pointers to the Database representation of the weightfile.
The Weightfile class serializes all information about a training into an xml tree.
Class to store reconstructed particles.
Type-safe access to single objects in the data store.
Abstract base class for different kinds of events.