ATLAS Offline Software
Loading...
Searching...
No Matches
IPRD_AssociationTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRKAMBIGUITYPROCESSOR_IPRD_ASSOCIATIONTOOL_H
6#define TRKAMBIGUITYPROCESSOR_IPRD_ASSOCIATIONTOOL_H
7
8#include "GaudiKernel/IAlgTool.h"
10#include <map>
11#include <set>
12
13class AtlasDetectorID;
14class Identifier;
15
16namespace Trk {
17
18class Track;
19class PrepRawData;
20
36class IPRD_AssociationTool : virtual public IAlgTool
37{
38public:
40
41 // typedef std::pair<const PrepRawData*, const Track*>
42 // PrepRawDataTrackMapPair;
44 using PRD_MapIt = PrepRawDataTrackMap::iterator;
45 using ConstPRD_MapIt = PrepRawDataTrackMap::const_iterator;
48 using PrepRawDataTrackMapRange = std::pair<ConstPRD_MapIt, ConstPRD_MapIt>;
50
52 typedef std::set<const Track*> TrackSet;
53
55 struct Maps
56 {
57 // holds the tracks associated with each PRD (i.e. the PRD* is the key)
59 // holds the PRDs associated with each Track (i.e. the Track* is the key)
61 };
62
64 virtual StatusCode addPRDs(Maps& maps, const Track& track) const = 0;
65
67 virtual StatusCode addPRDs(const Track& track) = 0;
68
71 virtual StatusCode removePRDs(Maps& maps, const Track& track) const = 0;
72
76 virtual StatusCode removePRDs(const Track& track) = 0;
77
83 virtual bool isUsed(const Maps& maps, const PrepRawData& prd) const = 0;
84
90 virtual bool isUsed(const PrepRawData& prd) const = 0;
91
97 virtual bool isShared(const Maps& maps, const PrepRawData& prd) const = 0;
98
104 virtual bool isShared(const PrepRawData& prd) const = 0;
105
114 virtual std::vector<const PrepRawData*> getPrdsOnTrack(
115 const Track& track) const = 0;
116
117 // getPrdsOnTrack with state passed explicitly.
118 virtual std::vector<const PrepRawData*> getPrdsOnTrack(
119 const Maps& maps,
120 const Track& track) const = 0;
121
131 virtual TrackSet findConnectedTracks(const Track& track) const = 0;
132
133 // findConnectedTracks with state passed explicitly.
134 virtual TrackSet findConnectedTracks(const Maps& maps,
135 const Track& track) const = 0;
136
142 virtual PrepRawDataTrackMapRange onTracks(const PrepRawData& prd) const = 0;
143
144 // onTracks with explicit state
146 const PrepRawData& prd) const = 0;
147
149 virtual void reset() = 0;
150};
151
152} // end of ns
153
154#endif
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Interface for handling the mapping between Trk::Track and Trk::PrepRawData.
virtual PrepRawDataTrackMapRange onTracks(const Maps &maps, const PrepRawData &prd) const =0
PrepRawDataTrackMap::const_iterator ConstPRD_MapIt
PRDtoTrackMap::PrepRawDataTrackMap PrepRawDataTrackMap
virtual StatusCode removePRDs(const Track &track)=0
remove the PRDs from this track from the store
DeclareInterfaceID(IPRD_AssociationTool, 1, 0)
virtual bool isUsed(const PrepRawData &prd) const =0
does this PRD belong to at least one track?
PRDtoTrackMap::TrackPrepRawDataMap TrackPrepRawDataMap
virtual bool isUsed(const Maps &maps, const PrepRawData &prd) const =0
does this PRD belong to at least one track in maps?
PrepRawDataTrackMap::iterator PRD_MapIt
virtual StatusCode removePRDs(Maps &maps, const Track &track) const =0
remove the PRDs from this track from the maps
virtual StatusCode addPRDs(const Track &track)=0
add the PRDs from this track to the store
std::set< const Track * > TrackSet
std::pair< ConstPRD_MapIt, ConstPRD_MapIt > PrepRawDataTrackMapRange
the first element is the beginning iterator of the range, the second is the end
virtual void reset()=0
this may well go, but at the moment it resets the tool
virtual std::vector< const PrepRawData * > getPrdsOnTrack(const Track &track) const =0
returns a vector of PRDs belonging to the passed track.
virtual TrackSet findConnectedTracks(const Maps &maps, const Track &track) const =0
virtual std::vector< const PrepRawData * > getPrdsOnTrack(const Maps &maps, const Track &track) const =0
virtual bool isShared(const PrepRawData &prd) const =0
does this PRD belong to more than one track?
virtual TrackSet findConnectedTracks(const Track &track) const =0
Return transient sets of connected and disconnected tracks, AND remove disconnected tracks from this ...
virtual bool isShared(const Maps &maps, const PrepRawData &prd) const =0
does this PRD belong to more than one track in maps?
virtual StatusCode addPRDs(Maps &maps, const Track &track) const =0
add the PRDs from this track to maps
virtual PrepRawDataTrackMapRange onTracks(const PrepRawData &prd) const =0
get the Tracks associated with this PrepRawData.
std::unordered_multimap< const PrepRawData *, const Track *, std::hash< const PrepRawData * >, std::equal_to< const PrepRawData * >, SG::ArenaPoolSTLAllocator< std::pair< const PrepRawData *const, const Track * > > > PrepRawDataTrackMap
std::unordered_map< const Track *, std::vector< const PrepRawData * >, std::hash< const Track * >, std::equal_to< const Track * >, SG::ArenaPoolSTLAllocator< std::pair< const Track *const, std::vector< const PrepRawData * > > > > TrackPrepRawDataMap
Ensure that the ATLAS eigen extensions are properly loaded.
The mutable state of the tool.
IPRD_AssociationTool::TrackPrepRawDataMap m_trackPrepRawDataMap
IPRD_AssociationTool::PrepRawDataTrackMap m_prepRawDataTrackMap