12#include <framework/core/Module.h>
13#include <framework/datastore/StoreArray.h>
14#include <framework/datastore/StoreObjPtr.h>
15#include <framework/database/DBObjPtr.h>
16#include <framework/dataobjects/EventMetaData.h>
19#include <mva/interface/Expert.h>
20#include <mva/interface/Dataset.h>
23#include <mdst/dataobjects/Track.h>
26#include <ecl/dataobjects/ECLPidLikelihood.h>
27#include <ecl/dbobjects/ECLChargedPIDMVAWeights.h>
78 virtual void event()
override;
96 static float logTransformation(
const float value,
const float offset,
const float max);
111 static std::vector<float>
decorrTransformation(
const std::vector<float>& scores,
const std::vector<float>* decorrelationMatrix);
150 std::unordered_map<unsigned int, std::unique_ptr<MVA::Expert>>
m_experts;
178 std::unordered_map<unsigned int, std::vector<const Variable::Manager::Var*>>
m_variables;
184 std::unordered_map<unsigned int, std::unique_ptr<MVA::SingleDataset>>
m_datasets;
189 static constexpr double c_sqrt2 = 1.41421356237309504880;
std::unordered_map< unsigned int, std::unique_ptr< MVA::Expert > > m_experts
unordered map of MVA experts.
std::vector< const Variable::Manager::Var * > m_binningVariables
Vector of variables used to define the regions in which the MVAs are trained.
virtual ~ECLChargedPIDMVAModule() override
Destructor.
static float gaussTransformation(const float value, const TH1F *cdf)
gaussian transformation.
void checkDBPayloads()
Check payloads for consistency.
static float logTransformation(const float value, const float offset, const float max)
log transformation.
virtual void initialize() override
Use this to initialize resources or memory your module needs.
virtual void event() override
Called once for each event.
std::unordered_map< unsigned int, std::unique_ptr< MVA::SingleDataset > > m_datasets
MVA dataset to be passed to the expert.
ECLChargedPIDMVAModule()
Constructor.
static constexpr double c_sqrt2
Definition of sqrt(2)
StoreObjPtr< EventMetaData > m_eventMetaData
The event information.
void initializeMVA()
Initialise the multiclass MVAs.
float evaluateVariable(const Variable::Manager::Var *varobj, const Particle *particle)
evaluate the variable for the particle and convert the return value float.
static constexpr float c_dummyLogL
Dummy value of log Likelihood for a particle hypothesis.
virtual void beginRun() override
Called once before a new run begins.
std::unordered_map< unsigned int, std::vector< const Variable::Manager::Var * > > m_variables
Map of vectors containing the variables objects to be fed to the MVA.
StoreArray< Track > m_tracks
array of track objects.
static std::vector< float > decorrTransformation(const std::vector< float > &scores, const std::vector< float > *decorrelationMatrix)
decorrelation transformation.
std::unique_ptr< DBObjPtr< ECLChargedPIDMVAWeights > > m_mvaWeights
Interface to DB payloads containing MVA weightfiles and pdfs.
StoreArray< ECLPidLikelihood > m_eclPidLikelihoods
Array of ECLPidLikelihood objects.
std::string m_payload_name
The name of the database payload object with the MVA weights.
Class to store reconstructed particles.
Accessor to arrays stored in the data store.
Type-safe access to single objects in the data store.
Abstract base class for different kinds of events.
A variable returning a floating-point value for a given Particle.