 |
Belle II Software
release-05-01-25
|
11 #include <tracking/modules/relatedTracksCombiner/CDCCKFTracksCombinerModule.h>
20 setDescription(
"Combine related tracks from CDC, determined in SVD->CDC CKF, and VXD (and VXD+CDC) into a single track by copying the hit "
21 "information and combining the seed information. The sign of the weight defines, "
22 "if the hits go before (-1) or after (+1) the CDC track.");
46 std::set <RecoTrack*> mergedTracks;
53 B2ASSERT(
"Can not handle more than 2 relations!", relatedVXDRecoTracks.
size() <= 2);
58 for (
unsigned int index = 0; index < relatedVXDRecoTracks.
size(); ++index) {
59 const double weight = relatedVXDRecoTracks.
weight(index);
61 vxdTrackBefore = relatedVXDRecoTracks[index];
62 }
else if (weight > 0) {
63 vxdTrackAfter = relatedVXDRecoTracks[index];
68 if (not vxdTrackAfter and not vxdTrackBefore) {
75 mergedTracks.insert(vxdTrackBefore);
87 mergedTracks.insert(vxdTrackAfter);
95 auto alreadyIncluded = mergedTracks.count(&vxdRecoTrack) ;
97 if (not alreadyIncluded) {
size_t size() const
Get number of relations.
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 event() override
Event processing, combine store array.
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...
std::string m_recoTracksStoreArrayName
Name of the output StoreArray.
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).
RecoTrack * copyToStoreArray(StoreArray< RecoTrack > &storeArray) const
Append a new RecoTrack to the given store array and copy its general properties, but not the hits the...
StoreArray< RecoTrack > m_recoTracks
Store Array of the output tracks.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
This is the Reconstruction Event-Data Model Track.
Class for type safe access to objects that are referred to in relations.
Abstract base class for different kinds of events.
CDCCKFTracksCombinerModule()
Constructor of the module. Setting up parameters and description.
std::string m_vxdRecoTracksStoreArrayName
Name of the input VXD StoreArray.
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
StoreArray< RecoTrack > m_cdcRecoTracks
Store Array of the input tracks.
float weight(int index) const
Get weight with index.
unsigned int getNumberOfTotalHits() const
Return the number of cdc + svd + pxd + bklm + eklm hits.
std::string m_cdcRecoTracksStoreArrayName
Name of the input CDC StoreArray.
void initialize() override
Declare required StoreArray.
StoreArray< RecoTrack > m_vxdRecoTracks
Store Array of the input tracks.