8#include <tracking/ckf/general/findlets/TrackLoader.h>
9#include <tracking/ckf/general/utilities/SearchDirection.h>
11#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
13#include <tracking/dataobjects/RecoTrack.h>
15#include <framework/core/ModuleParamList.h>
28 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"inputRecoTrackStoreArrayName"),
30 "StoreArray name of the input Track Store Array.");
32 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"relatedRecoTrackStoreArrayName"),
34 "Check for relations to this store array name and only use the unrelated ones or "
35 "relations with different direction",
38 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"minimalPtRequirement"),
40 "Minimal Pt requirement for the input tracks",
43 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"relationCheckForDirection"),
45 "Check for this direction when checking for related tracks.");
47 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"ignoreTracksWithCDChits"),
48 m_noCDChits,
"Do not consider tracks containing CDC hits.",
false);
75 if (item.hasCDCHits())
continue;
80 bool hasAlreadyRelation =
false;
81 for (
unsigned int index = 0; index < relatedTracksWithWeight.size(); ++index) {
82 const RecoTrack* relatedTrack = relatedTracksWithWeight[index];
83 const float weight = relatedTracksWithWeight.weight(index);
85 hasAlreadyRelation =
true;
90 if (not hasAlreadyRelation) {
91 seeds.push_back(&item);
93 B2DEBUG(29,
"Do not use this track, because it has already a valid relation");
96 seeds.push_back(&item);
100 const auto hasLowPt = [
this](
const auto & track) {
103 TrackFindingCDC::erase_remove_if(seeds, hasLowPt);
The Module parameter list class.
This is the Reconstruction Event-Data Model Track.
bool isOptional(const std::string &name="")
Tell the DataStore about an optional input.
Accessor to arrays stored in the data store.
void initialize() override
void addProcessingSignalListener(ProcessingSignalListener *psl)
StoreArray< RecoTrack > m_inputRecoTracks
Output Reco Tracks Store Array.
bool m_noCDChits
Ignore tracks with CDC hits attached.
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)
TrackLoader()
Add the subfindlets.
TrackFindingCDC::EForwardBackward m_param_relationCheckForDirection
Direction parameter converted from the string parameters.
TrackFitterAndDeleter m_trackFitter
Findlet for fitting the tracks.
double m_param_minimalPtRequirement
Minimal pt requirement.
std::string m_param_inputRecoTrackStoreArrayName
StoreArray name of the input Track Store Array.
void apply(std::vector< RecoTrack * > &seeds) override
Load in the reco tracks and the hits.
std::string m_param_relationRecoTrackStoreArrayName
StoreArray name of the output Track Store Array.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
TrackFindingCDC::Findlet< RecoTrack * > Super
Parent class.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
TrackFindingCDC::EForwardBackward fromString(const std::string &directionString)
Helper function to turn a direction string into a valid forward backward information.
Abstract base class for different kinds of events.