 |
Belle II Software
release-05-01-25
|
10 #include <tracking/ckf/general/findlets/TrackLoader.h>
11 #include <tracking/ckf/general/utilities/SearchDirection.h>
13 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
15 #include <tracking/dataobjects/RecoTrack.h>
17 #include <framework/core/ModuleParamList.h>
30 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"inputRecoTrackStoreArrayName"),
32 "StoreArray name of the input Track Store Array.");
34 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"relatedRecoTrackStoreArrayName"),
36 "Check for relations to this store array name and only use the unrelated ones or "
37 "relations with different direction",
40 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"minimalPtRequirement"),
42 "Minimal Pt requirement for the input tracks",
45 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"relationCheckForDirection"),
47 "Check for this direction when checking for related tracks.");
49 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"ignoreTracksWithCDChits"),
50 m_noCDChits,
"Do not consider tracks containing CDC hits.",
false);
77 if (item.hasCDCHits())
continue;
82 bool hasAlreadyRelation =
false;
83 for (
unsigned int index = 0; index < relatedTracksWithWeight.size(); ++index) {
84 const RecoTrack* relatedTrack = relatedTracksWithWeight[index];
85 const float weight = relatedTracksWithWeight.weight(index);
87 hasAlreadyRelation =
true;
92 if (not hasAlreadyRelation) {
93 seeds.push_back(&item);
95 B2DEBUG(100,
"Do not use this track, because it has already a valid relation");
98 seeds.push_back(&item);
102 const auto hasLowPt = [
this](
const auto & track) {
105 TrackFindingCDC::erase_remove_if(seeds, hasLowPt);
TrackFindingCDC::EForwardBackward fromString(const std::string &directionString)
Helper function to turn a direction string into a valid forward backward information.
std::string m_param_inputRecoTrackStoreArrayName
StoreArray name of the input Track Store Array.
TrackFitterAndDeleter m_trackFitter
Findlet for fitting the tracks.
std::string m_param_relationRecoTrackStoreArrayName
StoreArray name of the output Track Store Array.
bool m_noCDChits
Ignore tracks with CDC hits attached.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
TrackLoader()
Add the subfindlets.
void apply(std::vector< RecoTrack * > &seeds) override
Load in the reco tracks and the hits.
void initialize() override
Receive and dispatch signal before the start of the event processing.
void initialize() override
Create the store arrays.
std::string m_param_relationCheckForDirectionAsString
Parameter for the distance given to the framework (can not handle EForwardBackward directly)
This is the Reconstruction Event-Data Model Track.
StoreArray< RecoTrack > m_inputRecoTracks
Output Reco Tracks Store Array.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Abstract base class for different kinds of events.
virtual void exposeParameters(ModuleParamList *moduleParamList __attribute__((unused)), const std::string &prefix __attribute__((unused)))
Forward prefixed parameters of this findlet to the module parameter list.
double m_param_minimalPtRequirement
Minimal pt requirement.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
TrackFindingCDC::EForwardBackward m_param_relationCheckForDirection
Direction parameter converted from the string parameters.
Accessor to arrays stored in the data store.
The Module parameter list class.
void apply(std::vector< RecoTrack * > &recoTracks) override
Fit the tracks and remove unfittable ones.