Concrete Implementation of the IPRD_AssociationTool interface.
More...
#include <InDetPRDtoTrackMapToolGangedPixels.h>
Concrete Implementation of the IPRD_AssociationTool interface.
Definition at line 20 of file InDetPRDtoTrackMapToolGangedPixels.h.
◆ InDetPRDtoTrackMapToolGangedPixels()
InDet::InDetPRDtoTrackMapToolGangedPixels::InDetPRDtoTrackMapToolGangedPixels |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~InDetPRDtoTrackMapToolGangedPixels()
InDet::InDetPRDtoTrackMapToolGangedPixels::~InDetPRDtoTrackMapToolGangedPixels |
( |
| ) |
|
|
virtualdefault |
◆ addPRDs()
add the PRDs from this track to the store
- Parameters
-
track | all PRDs from 'track' will be added to PRD_AssociationTool's internal store. |
Definition at line 82 of file InDetPRDtoTrackMapToolGangedPixels.cxx.
85 PRDtoTrackMap &prd_to_track_map =
static_cast<PRDtoTrackMap&
>(virt_prd_to_track_map);
87 Trk::PRDtoTrackMap::TrackPrepRawDataMap::const_iterator itvec = prd_to_track_map.m_trackPrepRawDataMap.find(&
track);
88 if (itvec!=prd_to_track_map.m_trackPrepRawDataMap.end())
90 ATH_MSG_ERROR(
"track already found in cache, should not happen");
91 return StatusCode::FAILURE;
97 prd_to_track_map.m_prepRawDataTrackMap.insert(std::make_pair(prd, &
track) );
101 if (
pixel->gangedPixel()) {
103 std::pair<PixelGangedClusterAmbiguities::const_iterator,
104 PixelGangedClusterAmbiguities::const_iterator> ambi = prd_to_track_map.m_gangedAmbis->equal_range(pixel);
105 for (; ambi.first != ambi.second ; ++(ambi.first) ) {
107 if (msgLvl(
MSG::DEBUG))
msg() <<
"Found mirror pixel, add mirror to association map" <<
endmsg;
108 prd_to_track_map.m_prepRawDataTrackMap.insert(std::make_pair(ambi.first->second, &
track) );
115 prd_to_track_map.m_trackPrepRawDataMap.insert( std::make_pair(&
track, prds) );
118 <<prd_to_track_map.m_prepRawDataTrackMap.size() );
119 return StatusCode::SUCCESS;
◆ createPRDtoTrackMap()
std::unique_ptr< Trk::PRDtoTrackMap > InDet::InDetPRDtoTrackMapToolGangedPixels::createPRDtoTrackMap |
( |
| ) |
const |
|
overridevirtual |
Definition at line 47 of file InDetPRDtoTrackMapToolGangedPixels.cxx.
51 <<
", number of entries for this event:"
52 << (prd_to_track_map->m_gangedAmbis.isValid() ? prd_to_track_map->m_gangedAmbis->size() : -1) );
53 return std::unique_ptr<Trk::PRDtoTrackMap>(prd_to_track_map.release());
◆ ensureType()
void InDet::InDetPRDtoTrackMapToolGangedPixels::ensureType |
( |
Trk::PRDtoTrackMap & |
virt_prd_to_track_map | ) |
const |
|
private |
Definition at line 70 of file InDetPRDtoTrackMapToolGangedPixels.cxx.
72 if (virt_prd_to_track_map.
getType() !=
typeid(InDetPRDtoTrackMapToolGangedPixels::PRDtoTrackMap)) {
74 <<
" but got " << virt_prd_to_track_map.
getType().name()
75 <<
" . The tool can only handle a map created by the same tool. ");
76 throw std::logic_error(
"Type mismap between tool and map");
78 assert(
dynamic_cast<InDetPRDtoTrackMapToolGangedPixels::PRDtoTrackMap *
>(&virt_prd_to_track_map) !=
nullptr );
◆ finalize()
StatusCode InDet::InDetPRDtoTrackMapToolGangedPixels::finalize |
( |
| ) |
|
|
overridevirtual |
◆ findConnectedTracks()
returns set of tracks which share PRD with this one
- Parameters
-
track | this Track must be known to this tool. |
- Returns
- a set of tracks which share PRD/hits with the passed 'track'
Definition at line 124 of file InDetPRDtoTrackMapToolGangedPixels.cxx.
128 PRDtoTrackMap &prd_to_track_map =
static_cast<PRDtoTrackMap&
>(virt_prd_to_track_map);
132 std::vector< const Trk::PrepRawData* > prds =
getPrdsOnTrack(virt_prd_to_track_map,
track);
137 connectedTracks.insert((
range.first)->second);
143 if (
pixel->gangedPixel()) {
144 std::pair<PixelGangedClusterAmbiguities::const_iterator,
145 PixelGangedClusterAmbiguities::const_iterator> ambi = prd_to_track_map.m_gangedAmbis->equal_range(pixel);
146 for (; ambi.first != ambi.second ; ++(ambi.first) ) {
147 range = prd_to_track_map.onTracks( *(ambi.first->second) );
150 connectedTracks.insert((
range.first)->second);
157 connectedTracks.erase(&
track);
160 <<
"\tsize of list is "<<connectedTracks.size());
162 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
-
track | this Track will be iterated through and all PrepRawData added to a vector |
- Returns
- vector of PrepRawData* belonging to 'track'. The PrepRawData should NOT be deleted
- they belong to the Track (and thus the event).
Definition at line 167 of file InDetPRDtoTrackMapToolGangedPixels.cxx.
171 PRDtoTrackMap &prd_to_track_map =
static_cast<PRDtoTrackMap&
>(virt_prd_to_track_map);
172 using PRDs_t = std::vector<const Trk::PrepRawData *>;
175 Trk::PRDtoTrackMap::TrackPrepRawDataMap::const_iterator itvec = prd_to_track_map.m_trackPrepRawDataMap.find(&
track);
176 if (itvec!=prd_to_track_map.m_trackPrepRawDataMap.end())
178 ATH_MSG_VERBOSE(
"found track in cache, return cached PRD vector for track");
179 return itvec->second;
182 if (
track.measurementsOnTrack()==
nullptr) {
197 vec.reserve(
track.measurementsOnTrack()->size());
202 for (;
it!=itEnd;++
it)
204 const auto *
const meas{*
it};
◆ initialize()
StatusCode InDet::InDetPRDtoTrackMapToolGangedPixels::initialize |
( |
| ) |
|
|
overridevirtual |
◆ reduceToStorableMap()
Definition at line 56 of file InDetPRDtoTrackMapToolGangedPixels.cxx.
58 return std::move(obj_in);
62 <<
" but got " << obj_in->
getType().name()
63 <<
" . The tool can only handle a map created by the same tool. ");
66 return std::make_unique<Trk::PRDtoTrackMap>(std::move(*the_obj));
◆ m_addTRToutliers
bool InDet::InDetPRDtoTrackMapToolGangedPixels::m_addTRToutliers |
|
private |
◆ m_pixelClusterAmbiguitiesMapName
The documentation for this class was generated from the following files: