8#include <tracking/modules/mcMatcher/TrackToMCParticleRelatorModule.h>
10#include <framework/datastore/RelationVector.h>
11#include <mdst/dataobjects/MCParticle.h>
12#include <mdst/dataobjects/Track.h>
13#include <tracking/dataobjects/RecoTrack.h>
21 setDescription(
"A module to set relations from Track to MCParticle via the RecoTrack the Track is related to. The functionality is: Take Track, get relation to RecoTrack, from RecoTrack get relation to MCParticle, and finally add a relation from Track to MCParticle.");
26 "Name of the Tracks StoreArray to be used.",
m_TracksName);
41 m_Tracks.registerRelationTo(mcParticles);
55 const MCParticle* mcParticle = mcParticleWithWeight.first;
57 B2DEBUG(28,
"Relation to MCParticle set.");
58 track.addRelationTo(mcParticle, mcParticleWithWeight.second);
60 B2DEBUG(28,
"Relation to MCParticle not set. No related MCParticle to RecoTrack.");
64 B2DEBUG(20,
"MC matching finished.");
A Class to store the Monte Carlo particle information.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
This is the Reconstruction Event-Data Model Track.
Class for type safe access to objects that are referred to in relations.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
bool isOptional(const std::string &name="")
Tell the DataStore about an optional input.
Accessor to arrays stored in the data store.
std::string m_TracksName
Track StoreArray name (input).
void initialize() override
Use this to initialize StoreArrays and relations.
void event() override
Called once for each event.
TrackToMCParticleRelatorModule()
Constructor, for setting module description and parameters.
bool m_mcParticlesPresent
Are MCParticles present?
std::string m_RecoTracksName
RecoTrack StoreArray name (input).
std::string m_MCParticlesName
MCParticle StoreArray name ().
StoreArray< RecoTrack > m_RecoTracks
RecoTracks StoreArray.
StoreArray< Track > m_Tracks
Tracks StoreArray */.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.