Concrete Implementation of the IPRD_AssociationTool interface.
More...
#include <PRDtoTrackMapTool.h>
Concrete Implementation of the IPRD_AssociationTool interface.
Definition at line 24 of file PRDtoTrackMapTool.h.
◆ PRDtoTrackMapTool()
Trk::PRDtoTrackMapTool::PRDtoTrackMapTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~PRDtoTrackMapTool()
virtual Trk::PRDtoTrackMapTool::~PRDtoTrackMapTool |
( |
| ) |
|
|
virtualdefault |
◆ addPRDs()
add the PRDs from this track to the store
- Parameters
-
Definition at line 47 of file PRDtoTrackMapTool.cxx.
50 PRDtoTrackMap &prd_to_track_map =
static_cast<PRDtoTrackMap&
>(virt_prd_to_track_map);
53 PRDtoTrackMap::TrackPrepRawDataMap::const_iterator itvec = prd_to_track_map.m_trackPrepRawDataMap.find(&
track);
54 if (itvec!=prd_to_track_map.m_trackPrepRawDataMap.end())
56 ATH_MSG_ERROR (
"track already found in cache, should not happen");
57 return StatusCode::FAILURE;
62 if (prd_to_track_map.m_prepRawDataTrackMap.insert(std::make_pair(a_prd, &
track) ) == prd_to_track_map.m_prepRawDataTrackMap.end()) {
68 prd_to_track_map.m_trackPrepRawDataMap.insert( std::make_pair(&
track, std::move(prds)) );
71 prd_to_track_map.m_prepRawDataTrackMap.size());
72 return StatusCode::SUCCESS;
◆ createPRDtoTrackMap()
std::unique_ptr< Trk::PRDtoTrackMap > Trk::PRDtoTrackMapTool::createPRDtoTrackMap |
( |
| ) |
const |
|
overridevirtual |
Definition at line 28 of file PRDtoTrackMapTool.cxx.
29 return std::make_unique<Trk::PRDtoTrackMapTool::PRDtoTrackMap>();
◆ ensureType()
void Trk::PRDtoTrackMapTool::ensureType |
( |
Trk::PRDtoTrackMap & |
virt_prd_to_track_map | ) |
const |
|
protected |
Definition at line 36 of file PRDtoTrackMapTool.cxx.
38 if (virt_prd_to_track_map.
getType() !=
typeid(PRDtoTrackMapTool::PRDtoTrackMap)) {
39 ATH_MSG_FATAL(
"Type mismap between tool and map. Expecting " <<
typeid(PRDtoTrackMap).
name()
40 <<
" but got " << virt_prd_to_track_map.
getType().name()
41 <<
" . The tool can only handle a map created by the same tool. ");
42 throw std::logic_error(
"Type mismap between tool and map");
44 assert(
dynamic_cast<PRDtoTrackMap *
>(&virt_prd_to_track_map) !=
nullptr );
◆ findConnectedTracks()
Trk::PRDtoTrackMapTool::TrackSet Trk::PRDtoTrackMapTool::findConnectedTracks |
( |
Trk::PRDtoTrackMap & |
virt_prd_to_track_map, |
|
|
const Track & |
track |
|
) |
| const |
|
overridevirtual |
Definition at line 77 of file PRDtoTrackMapTool.cxx.
80 PRDtoTrackMap &prd_to_track_map =
static_cast<PRDtoTrackMap&
>(virt_prd_to_track_map);
94 if (conTrack!=&
track) {
96 connectedTracks.insert(conTrack);
101 "\tsize of list now:"<<connectedTracks.size());
104 return connectedTracks;
◆ getPrdsOnTrack()
returns a vector of PRDs belonging to the passed track.
It's basically for the convenience of users and is created purely from the passed track. i.e. there is no caching if you do it multiple times on the same track, you're being inefficient!!
- Parameters
-
- Returns
- vector of PrepRawData* belonging to 'track'. The PrepRawData should NOT be deleted
- they belong to the Track (and thus the event).
Accept only non muon hits or muon precision hits
Definition at line 109 of file PRDtoTrackMapTool.cxx.
112 using PRDs_t = std::vector<const Trk::PrepRawData *>;
115 PRDtoTrackMap &prd_to_track_map =
static_cast<PRDtoTrackMap&
>(virt_prd_to_track_map);
118 PRDtoTrackMap::TrackPrepRawDataMap::const_iterator itvec = prd_to_track_map.m_trackPrepRawDataMap.find(&
track);
119 if (itvec!=prd_to_track_map.m_trackPrepRawDataMap.end())
121 ATH_MSG_VERBOSE (
"found track in cache, return cached PRD vector for track");
122 return itvec->second;
125 if (!
track.measurementsOnTrack()) {
138 vec.reserve(
track.measurementsOnTrack()->size());
142 const PrepRawData* prd = rot->prepRawData();
150 for (
const MeasurementBase* meas : *
track.measurementsOnTrack()) {
163 if (!competingROT) {
continue;}
165 for(
unsigned int i=0;
i<numROTs;++
i ){
◆ initialize()
StatusCode Trk::PRDtoTrackMapTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ reduceToStorableMap()
◆ m_idHelperSvc
The documentation for this class was generated from the following files: