9#include <tracking/ckf/pxd/findlets/CKFToPXDFindlet.h>
11#include <tracking/ckf/general/findlets/StateCreator.icc.h>
12#include <tracking/ckf/general/findlets/CKFRelationCreator.icc.h>
13#include <tracking/ckf/general/findlets/StateCreatorWithReversal.icc.h>
14#include <tracking/ckf/general/findlets/TreeSearcher.icc.h>
15#include <tracking/ckf/general/findlets/OverlapResolver.icc.h>
16#include <tracking/ckf/general/findlets/SpacePointTagger.icc.h>
17#include <tracking/ckf/general/findlets/ResultStorer.icc.h>
18#include <tracking/ckf/general/utilities/Helpers.h>
20#include <tracking/ckf/pxd/entities/CKFToPXDResult.h>
21#include <tracking/ckf/pxd/entities/CKFToPXDState.h>
23#include <tracking/dataobjects/RecoTrack.h>
24#include <tracking/spacePointCreation/SpacePoint.h>
25#include <pxd/dataobjects/PXDCluster.h>
27#include <framework/core/ModuleParamList.h>
30using namespace TrackFindingCDC;
62 "Minimal Hit requirement for the results (counted in space points)",
65 "Only use tracks which have an SVD hit associated.",
70 moduleParamList->
getParameter<std::string>(
"advanceHighFilter").setDefaultValue(
"advance");
71 moduleParamList->
getParameter<std::string>(
"updateHighFilter").setDefaultValue(
"fit");
73 moduleParamList->
getParameter<std::string>(
"firstHighFilter").setDefaultValue(
"mva_with_direction_check");
74 moduleParamList->
getParameter<std::string>(
"secondHighFilter").setDefaultValue(
"mva");
75 moduleParamList->
getParameter<std::string>(
"thirdHighFilter").setDefaultValue(
"mva");
77 moduleParamList->
getParameter<
bool>(
"useAssignedHits").setDefaultValue(
false);
79 moduleParamList->
getParameter<std::string>(
"hitFilter").setDefaultValue(
"sensor");
80 moduleParamList->
getParameter<std::string>(
"seedFilter").setDefaultValue(
"sensor");
81 moduleParamList->
getParameter<std::string>(
"preSeedFilter").setDefaultValue(
"loose");
82 moduleParamList->
getParameter<std::string>(
"preHitFilter").setDefaultValue(
"loose");
84 moduleParamList->
getParameter<std::string>(
"hitsSpacePointsStoreArrayName").setDefaultValue(
"PXDSpacePoints");
86 moduleParamList->
getParameter<std::string>(
"filter").setDefaultValue(
"mva");
101 checkResizeClear<CKFToPXDState>(
m_states, 2000);
103 checkResizeClear<TrackFindingCDC::WeightedRelation<CKFToPXDState>>(
m_relations, 2000);
119 const auto notFromPXD = [](
const SpacePoint * spacePoint) {
125 const auto hasNoSVD = [
this](
const RecoTrack * recoTrack) {
126 const auto& svdHitList = recoTrack->getSortedSVDHitList();
127 if (svdHitList.empty())
return true;
130 : svdHitList.front()->getSensorID().getLayerNumber() > 4;
141 B2DEBUG(29,
"Created " <<
m_relations.size() <<
" relations.");
145 B2DEBUG(29,
"Having found " <<
m_results.size() <<
" results before overlap check");
150 TrackFindingCDC::erase_remove_if(
m_results, hasLowHitNumber);
Object for temporary storage of a CKF tree search result.
std::vector< CKFToPXDResult > m_results
Vector for storing the results.
std::vector< CKFToPXDResult > m_filteredResults
Vector for storing the filtered results.
std::vector< TrackFindingCDC::WeightedRelation< CKFToPXDState > > m_relations
Relations between states.
CKFRelationCreator< CKFToPXDState, ChooseablePXDRelationFilter > m_relationCreator
Findlet for creating relations between states.
unsigned int m_param_minimalHitRequirement
Minimal hit requirement for the results (counted in number of space points)
TrackLoader m_dataHandler
Findlet for retrieving the cdc tracks and writing the result out.
StateCreatorWithReversal< CKFToPXDState > m_stateCreatorFromTracks
Findlet for creating states out of tracks.
std::vector< const SpacePoint * > m_spacePointVector
Pointers to the (const) SpacePoints as a vector.
TreeSearcher< CKFToPXDState, PXDStateRejecter, CKFToPXDResult > m_treeSearchFindlet
Findlet doing the main work: the tree finding.
SpacePointLoader m_hitsLoader
Findlet for loading the space points.
bool m_param_onlyUseTracksWithSVD
Cut away tracks without SVD hits or not.
std::vector< CKFToPXDState > m_states
States for the hits.
ResultStorer< CKFToPXDResult > m_resultStorer
Findlet for storing the results.
SpacePointTagger< CKFToPXDResult, PXDCluster > m_spacePointTagger
Findlet for tagging the used space points.
CKFToPXDFindlet()
Constructor, for setting module description and parameters.
StateCreator< const SpacePoint, CKFToPXDState > m_stateCreatorFromHits
Findlet for creating states out of hits.
void beginEvent() override
Clear the object pools.
~CKFToPXDFindlet()
Default destructor.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
OverlapResolver< ChooseablePXDResultFilter > m_overlapResolver
Findlet for resolving overlaps.
bool m_param_reverseSeed
Reverse the seed.
void apply() override
Do the tree search.
std::vector< CKFToPXDState > m_seedStates
States for the tracks.
std::vector< RecoTrack * > m_recoTracksVector
Pointers to the Reco tracks as a vector.
The Module parameter list class.
This is the Reconstruction Event-Data Model Track.
void apply(std::vector< const SpacePoint * > &spacePoints) final
Do the space point retrieval.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
void beginEvent() override
Receive and dispatch signal for the start of a new event.
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Forward prefixed parameters of this findlet to the module parameter list.
void apply(std::vector< RecoTrack * > &seeds) override
Load in the reco tracks and the hits.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
ModuleParam< T > & getParameter(const std::string &name) const
Returns a reference to a parameter.
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.