8#include <tracking/modules/fitter/FittedTracksStorerModule.h>
9#include <tracking/dataobjects/RecoTrack.h>
10#include <mdst/dataobjects/MCParticle.h>
11#include <mdst/dataobjects/Track.h>
21 setDescription(
"A module to copy only the fitted reco tracks to the output store array.");
51 if (recoTrack.wasFitSuccessful()) {
56 auto relatedTrack = recoTrack.getRelated<
Track>();
61 auto relatedParticle = recoTrack.getRelated<
MCParticle>();
62 if (relatedParticle) {
66 recoTrack.addRelationTo(newRecoTrack);
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
StoreArray< RecoTrack > m_inputRecoTracks
Input RecoTracks StoreArray.
StoreArray< RecoTrack > m_outputRecoTracks
Output RecoTracks StoreArray.
std::string m_param_outputRecoTracksStoreArrayName
StoreArray name of the output reco tracks.
FittedTracksStorerModule()
Constructor.
void initialize() override
Initialize the store arrays.
void event() override
Do the copying.
std::optional< double > m_param_minimalWeight
Minimal weight for copying the hits.
std::string m_param_inputRecoTracksStoreArrayName
StoreArray name of the input reco tracks.
StoreArray< Track > m_Tracks
Tracks StoreArray.
StoreArray< MCParticle > m_MCParticles
MCParticles StoreArray.
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.
static void registerRequiredRelations(StoreArray< RecoTrack > &recoTracks, std::string const &pxdHitsStoreArrayName="", std::string const &svdHitsStoreArrayName="", std::string const &cdcHitsStoreArrayName="", std::string const &bklmHitsStoreArrayName="", std::string const &eklmHitsStoreArrayName="", std::string const &recoHitInformationStoreArrayName="")
Convenience method which registers all relations required to fully use a RecoTrack.
void addRelationTo(const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
Add a relation from this object to another object (with caching).
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.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
bool registerRelationTo(const StoreArray< TO > &toArray, DataStore::EDurability durability=DataStore::c_Event, DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut, const std::string &namedRelation="") const
Register a relation to the given StoreArray.
Class that bundles various TrackFitResults.
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.