8#include <tracking/modules/fitter/RecoTrackCreatorModule.h>
9#include <tracking/dataobjects/RecoTrack.h>
10#include <tracking/dataobjects/RecoHitInformation.h>
19 setDescription(
"Converts the given genfit::TrackCands in the StoreArray to RecoTracks for further use in the fitter.");
75 if (trackCandidate.getNHits() < 3) {
76 B2WARNING(
"Number of hits of track candidate is smaller than 3. Not creating track out of it.");
89 const int mcParticleID = trackCandidate.getMcTrackId();
92 if (relatedMCParticle) {
95 B2WARNING(
"Related MCParticle is invalid. Can not make a relation.");
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...
std::string m_param_bklmHitsStoreArrayName
StoreArray name of the BKLM hits.
std::string m_param_pxdHitsStoreArrayName
StoreArray name of the PXD hits.
void initialize() override
Initialize the needed StoreArrays and ensure they are created properly.
void event() override
Loop over all track candidates and create a recotrack.
std::string m_param_eklmHitsStoreArrayName
StoreArray name of the EKLM hits.
std::string m_param_recoTracksStoreArrayName
StoreArray name of the input and output reco tracks.
std::string m_param_svdHitsStoreArrayName
StoreArray name of the SVD hits.
std::string m_param_cdcHitsStoreArrayName
StoreArray name of the CDC hits.
RecoTrackCreatorModule()
Initialize the module parameters.
std::string m_param_recoHitInformationStoreArrayName
StoreArray name of the output reco hit information.
StoreArray< RecoTrack > m_RecoTracks
RecoTracks StoreArray.
std::string m_param_trackCandidatesStoreArrayName
StoreArray name of the input track candidates.
StoreArray< MCParticle > m_MCParticles
MCParticles StoreArray.
StoreArray< genfit::TrackCand > m_TrackCandidates
genfit::TrackCand StoreArray
bool m_param_recreateSortingParameters
Flag to recreate the sorting parameters of the hit out of the stored order.
This is the Reconstruction Event-Data Model Track.
static RecoTrack * createFromTrackCand(const genfit::TrackCand &trackCand, const std::string &storeArrayNameOfRecoTracks="", const std::string &storeArrayNameOfPXDHits="", const std::string &storeArrayNameOfSVDHits="", const std::string &storeArrayNameOfCDCHits="", const std::string &storeArrayNameOfBKLMHits="", const std::string &storeArrayNameOfEKLMHits="", const std::string &storeArrayNameOfRecoHitInformation="", const bool recreateSortingParameters=false)
Create a reco track from a genfit::TrackCand and save it to the given store array.
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.
int getEntries() const
Get the number of objects in the array.
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.
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.