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>
81 virtual void event()
override;
99 float logTransformation(
const float value,
const float offset,
const float max)
const;
114 std::vector<float>
decorrTransformation(
const std::vector<float> scores,
const std::vector<float>* decorrelationMatrix)
const;
153 std::unordered_map<unsigned int, std::unique_ptr<MVA::Expert>>
m_experts;
181 std::unordered_map<unsigned int, std::vector<const Variable::Manager::Var*>>
m_variables;
187 std::unordered_map<unsigned int, std::unique_ptr<MVA::SingleDataset>>
m_datasets;
192 static constexpr
double c_sqrt2 = 1.41421356237309504880;
This module implements charged particle identification using ECL-related observables via a multiclass...
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.
void checkDBPayloads()
Check payloads for consistency.
std::vector< float > decorrTransformation(const std::vector< float > scores, const std::vector< float > *decorrelationMatrix) const
decorrelation 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.
virtual ~ECLChargedPIDMVAModule()
Destructor.
float evaluateVariable(const Variable::Manager::Var *varobj, const Particle *particle)
evaluate the variable for the particle and convert the return value float.
float logTransformation(const float value, const float offset, const float max) const
log transformation.
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.
float gaussTransformation(const float value, const TH1F *cdf) const
gaussian 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.