9#include <cdc/modules/cdcRecoTrackFilter/CDCCosmicTrackMergeModule.h>
10#include <tracking/dataobjects/RecoTrack.h>
11#include <framework/datastore/StoreArray.h>
19 setDescription(
"Select cosmic events containing two tracks (up/down) and merge two tracks"
20 "Old reco tracks store array will be deleted afterwards, if the parameter is set to do so.");
24 "StoreArray containing the RecoTracks to read from and delete afterwards.",
27 "StoreArray to where to copy the merged RecoTrack.",
30 "Flag to delete the not Merged RecoTracks from the input StoreArray.",
49 std::vector<RecoTrack*> recoTracks;
53 recoTracks.push_back(&recoTrack);
59 std::sort(recoTracks.begin(), recoTracks.end(), lmdSort);
62 B2DEBUG(99,
"upper track posSeed :" << upperTrack->
getPositionSeed().Y());
63 B2DEBUG(99,
"Lowee track posSeed :" << lowerTrack->
getPositionSeed().Y());
void initialize() override
Register the store arrays and store obj pointers.
void event() override
Do the selection.
CDCCosmicTrackMergerModule()
Create a new instance of the module.
std::string m_param_recoTracksStoreArrayName
StoreArray name from which to read the reco tracks.
std::string m_param_MergedRecoTracksStoreArrayName
StoreArray name where the merged reco track is written.
double m_MinimumNumHitCut
Minium NDF required for each track (up and down).
StoreArray< RecoTrack > m_RecoTracks
Tracks.
bool m_param_deleteOtherRecoTracks
Flag to delete the not RecoTracks from the input StoreArray.
StoreArray< RecoTrack > m_MergedRecoTracks
Merged tracks.
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.
size_t addHitsFromRecoTrack(const RecoTrack *recoTrack, unsigned int sortingParameterOffset=0, bool reversed=false, std::optional< double > optionalMinimalWeight=std::nullopt)
Add all hits from another RecoTrack to this RecoTrack.
ROOT::Math::XYZVector getPositionSeed() const
Return the position seed stored in the reco track. ATTENTION: This is not the fitted position.
void setTimeSeed(const double timeSeed)
Set the time seed. ATTENTION: This is not the fitted time.
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.
short int getChargeSeed() const
Return the charge seed stored in the reco track. ATTENTION: This is not the fitted charge.
ROOT::Math::XYZVector getMomentumSeed() const
Return the momentum seed stored in the reco track. ATTENTION: This is not the fitted momentum.
double getTimeSeed() const
Return the time seed stored in the reco track. ATTENTION: This is not the fitted time.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
T * appendNew()
Construct a new T object at the end of the array.
int getEntries() const
Get the number of objects in the array.
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.