ATLAS Offline Software
Loading...
Searching...
No Matches
TrackSelectionProcessorTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRACKSELECTIONPROCESSORTOOL_H
6#define TRACKSELECTIONPROCESSORTOOL_H
7
8
12#include "GaudiKernel/ToolHandle.h"
16
20
21//need to include the following, since its a typedef and can't be forward declared.
23
24#include "TrackPtr.h"
25
26#include <map>
27#include <set>
28#include <vector>
29
30
31namespace Trk {
32
34 : public AthAlgTool,
35 virtual public ITrackAmbiguityProcessorTool {
36 public:
37 // public types
38 typedef std::multimap<TrackScore, TrackPtr> TrackScoreMap;
39
40 typedef std::set<const PrepRawData *> PrdSignature;
41 typedef std::set<PrdSignature> PrdSignatureSet;
42
43 // default methods
44 TrackSelectionProcessorTool(const std::string &, const std::string &,
45 const IInterface *);
47 virtual StatusCode initialize() override;
48 virtual StatusCode finalize() override;
49
70 virtual const TrackCollection *process(
71 const TrackCollection *tracksCol,
72 Trk::PRDtoTrackMap *prdToTrackMap) const override;
73
74 virtual const TrackCollection *process(
75 const TracksScores * /*trackScoreTrackMap*/) const override {
76 return nullptr;
77 }
78
80 void statistics() override {}
81
82 private:
88 void addNewTracks(TrackScoreMap &trackScoreTrackMap,
89 Trk::PRDtoTrackMap &prdToTrackMap,
90 const std::vector<const Track *> &tracks) const;
91
92 void solveTracks(TrackScoreMap &trackScoreTrackMap,
93 Trk::PRDtoTrackMap &prdToTrackMap,
94 ConstDataVector<TrackCollection> &final_tracks) const;
95
97 void dumpTracks(const TrackCollection &tracks) const;
98
99 // private data members
100
103
107 ToolHandle<ITrackScoringTool> m_scoringTool
108 {this, "ScoringTool", "Muon::MuonAmbiTrackSelectionTool/MuonAmbiSelectionTool"};
109
113 ToolHandle<IAmbiTrackSelectionTool> m_selectionTool;
114
115 ToolHandle<Trk::IPRDtoTrackMapTool> m_assoTool{this, "AssociationTool",
116 "Trk::PRDtoTrackMapTool"};
117
120 this, "AssociationMapName",
121 ""};
122
124 m_clusterSplitProbContainerIn{this, "InputClusterSplitProbabilityName",
125 "", ""};
128 this, "OutputClusterSplitProbabilityName", "", ""};
129
133 };
134
135} //end ns
136
137#endif // TrackAmbiguityProcessorTool_H
138
DataVector adapter that acts like it holds const pointers.
DataVector< Trk::Track > TrackCollection
This typedef represents a collection of Trk::Track objects.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
DataVector adapter that acts like it holds const pointers.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Interface for resolving hit assoication ambiguities in a given track collection.
std::set< const PrepRawData * > PrdSignature
bool m_disableSorting
option to disable sorting based on track score and use the ordering provided externally
SG::WriteHandleKey< Trk::ClusterSplitProbabilityContainer > m_clusterSplitProbContainerOut
void addNewTracks(TrackScoreMap &trackScoreTrackMap, Trk::PRDtoTrackMap &prdToTrackMap, const std::vector< const Track * > &tracks) const
Add passed TrackCollection, and Trk::PrepRawData from tracks to caches.
SG::ReadHandleKey< Trk::ClusterSplitProbabilityContainer > m_clusterSplitProbContainerIn
std::multimap< TrackScore, TrackPtr > TrackScoreMap
void dumpTracks(const TrackCollection &tracks) const
print out tracks and their scores for debugging
ToolHandle< Trk::IPRDtoTrackMapTool > m_assoTool
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_assoMapName
key for the PRDtoTrackMap to filled by the ambiguity score processor.
TrackSelectionProcessorTool(const std::string &, const std::string &, const IInterface *)
void solveTracks(TrackScoreMap &trackScoreTrackMap, Trk::PRDtoTrackMap &prdToTrackMap, ConstDataVector< TrackCollection > &final_tracks) const
virtual const TrackCollection * process(const TracksScores *) const override
ToolHandle< IAmbiTrackSelectionTool > m_selectionTool
selection tool - here the decision which hits remain on a track and which are removed are made
ToolHandle< ITrackScoringTool > m_scoringTool
Scoring tool This tool is used to 'score' the tracks, i.e.
void statistics() override
statistics output to be called by algorithm during finalize.
bool m_dropDouble
by default drop double tracks before refit
const std::string process
Ensure that the ATLAS eigen extensions are properly loaded.
std::vector< std::pair< const Track *, float > > TracksScores