12#include <framework/core/Module.h>
13#include <framework/dataobjects/EventMetaData.h>
14#include <framework/database/DBObjPtr.h>
15#include <analysis/DecayDescriptor/DecayDescriptor.h>
16#include <framework/datastore/StoreArray.h>
19#include <mva/interface/Expert.h>
20#include <mva/interface/Dataset.h>
23#include <analysis/dataobjects/ParticleList.h>
24#include <analysis/VariableManager/Manager.h>
25#include <analysis/VariableManager/Utility.h>
26#include <analysis/dbobjects/ChargedPidMVAWeights.h>
44 typedef std::vector<std::unique_ptr<MVA::Expert> >
ExpertsList;
45 typedef std::vector<std::unique_ptr<MVA::SingleDataset> >
DatasetsList;
46 typedef std::vector<std::unique_ptr<Variable::Cut>>
CutsList;
47 typedef std::vector< std::vector<const Variable::Manager::Var*> >
VariablesLists;
81 virtual void event()
override;
102 auto signedName = fullName.substr(0, fullName.find(delimiter));
103 signedName.pop_back();
This module evaluates the response of a multi-class MVA trained for global charged particle identific...
StoreObjPtr< EventMetaData > m_event_metadata
The event information.
std::vector< std::unique_ptr< Variable::Cut > > CutsList
Typedef.
std::vector< std::string > m_decayStrings
The input list of DecayStrings, where each selected (^) daughter should correspond to a standard char...
virtual void initialize() override
Use this to initialize resources or memory your module needs.
bool m_ecl_only
Flag to specify if we use an ECL-only based training.
virtual void event() override
Called once for each event.
std::unique_ptr< DBObjPtr< ChargedPidMVAWeights > > m_weightfiles_representation
Interface to get the database payload with the MVA weight files.
std::vector< std::unique_ptr< MVA::SingleDataset > > DatasetsList
Typedef.
StoreArray< Particle > m_particles
StoreArray of Particles.
DatasetsList m_datasets
List of MVA::SingleDataset objects.
std::vector< std::string > m_classes
List of MVA class names.
std::map< int, std::string > m_stdChargedInfo
Map with standard charged particles' info.
ChargedPidMVAMulticlassModule()
Constructor, for setting module description and parameters.
bool m_charge_independent
Flag to specify if we use a charge-independent training.
const std::string getParticleName(const ParticleList *pList) const
Split the particle list name in "particleName", "particleLabel", and return the particle name w/o the...
virtual ~ChargedPidMVAMulticlassModule()
Destructor, use this to clean up anything you created in the constructor.
virtual void beginRun() override
Called once before a new run begins.
void registerAliases()
Set variable aliases needed by the MVA.
VariablesLists m_variables
List of lists of feature variables.
std::vector< std::vector< const Variable::Manager::Var * > > VariablesLists
Typedef.
void registerAliasesLegacy()
Set variable aliases needed by the MVA.
CutsList m_cuts
List of Cut objects.
VariablesLists m_spectators
List of lists of spectator variables.
std::vector< std::unique_ptr< MVA::Expert > > ExpertsList
Typedef.
ExpertsList m_experts
List of MVA::Expert objects.
std::string m_payload_name
The name of the database payload object with the MVA weights.
int getPDGCode() const
PDG code.
static const ChargedStable muon
muon particle
static const ChargedStable pion
charged pion particle
static const ChargedStable proton
proton particle
static const ChargedStable kaon
charged kaon particle
static const ChargedStable electron
electron particle
static const ChargedStable deuteron
deuteron particle
ParticleList is a container class that stores a collection of Particle objects.
std::string getParticleListName() const
Returns the name this ParticleList.
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.