 |
Belle II Software
release-05-01-25
|
11 #include <cdc/modules/cdcRecoTrackFilter/CDCCosmicTrackMergeModule.h>
12 #include <tracking/dataobjects/RecoTrack.h>
13 #include <framework/datastore/StoreArray.h>
21 setDescription(
"Select cosmic events containing two tracks (up/down) and merge two tracks"
22 "Old reco tracks store array will be deleted afterwards, if the parameter is set to do so.");
26 "StoreArray containing the RecoTracks to read from and delete afterwards.",
29 "StoreArray to where to copy the merged RecoTrack.",
32 "Flag to delete the not Merged RecoTracks from the input StoreArray.",
40 recoTracks.isRequired();
43 MergedRecoTracks.registerInDataStore();
58 std::vector<RecoTrack*> recoTracks;
59 recoTracks.reserve(
static_cast<unsigned int>(recoTrackStoreArray.
getEntries()));
61 for (
RecoTrack& recoTrack : recoTrackStoreArray) {
62 recoTracks.push_back(&recoTrack);
68 std::sort(recoTracks.begin(), recoTracks.end(), lmdSort);
71 B2DEBUG(99,
"upper track posSeed :" << upperTrack->
getPositionSeed().Y());
72 B2DEBUG(99,
"Lowee track posSeed :" << lowerTrack->
getPositionSeed().Y());
T * appendNew()
Construct a new T object at the end of the 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.
size_t addHitsFromRecoTrack(const RecoTrack *recoTrack, unsigned int sortingParameterOffset=0, bool reversed=false, boost::optional< double > optionalMinimalWeight=boost::none)
Add all hits from another RecoTrack to this RecoTrack.
void setTimeSeed(const double timeSeed)
Set the time seed. ATTENTION: This is not the fitted time.
CDCCosmicTrackMergerModule()
Create a new instance of the module.
void setDescription(const std::string &description)
Sets the description of the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
void initialize() override
Register the store arrays and store obj pointers.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
double getTimeSeed() const
Return the time seed stored in the reco track. ATTENTION: This is not the fitted time.
This is the Reconstruction Event-Data Model Track.
TVector3 getPositionSeed() const
Return the position seed stored in the reco track. ATTENTION: This is not the fitted position.
Abstract base class for different kinds of events.
std::string m_param_MergedRecoTracksStoreArrayName
StoreArray name where the merged reco track is written.
TVector3 getMomentumSeed() const
Return the momentum seed stored in the reco track. ATTENTION: This is not the fitted momentum.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
void event() override
Do the selection.
std::string m_param_recoTracksStoreArrayName
StoreArray name from which to read the reco tracks.
bool m_param_deleteOtherRecoTracks
Flag to delete the not RecoTracks from the input StoreArray.
double m_MinimumNumHitCut
Minium NDF required for each track (up and down).
short int getChargeSeed() const
Return the charge seed stored in the reco track. ATTENTION: This is not the fitted charge.
Accessor to arrays stored in the data store.
int getEntries() const
Get the number of objects in the array.