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 79 of file InDetPRDtoTrackMapToolGangedPixels.cxx.
82 PRDtoTrackMap &prd_to_track_map =
static_cast<PRDtoTrackMap&
>(virt_prd_to_track_map);
84 Trk::PRDtoTrackMap::TrackPrepRawDataMap::const_iterator itvec = prd_to_track_map.m_trackPrepRawDataMap.find(&
track);
85 if (itvec!=prd_to_track_map.m_trackPrepRawDataMap.end())
87 ATH_MSG_ERROR(
"track already found in cache, should not happen");
88 return StatusCode::FAILURE;
94 prd_to_track_map.m_prepRawDataTrackMap.insert(std::make_pair(prd, &
track) );
98 if (
pixel->gangedPixel()) {
100 std::pair<PixelGangedClusterAmbiguities::const_iterator,
101 PixelGangedClusterAmbiguities::const_iterator> ambi = prd_to_track_map.m_gangedAmbis->equal_range(pixel);
102 for (; ambi.first != ambi.second ; ++(ambi.first) ) {
104 if (msgLvl(
MSG::DEBUG))
msg() <<
"Found mirror pixel, add mirror to association map" <<
endmsg;
105 prd_to_track_map.m_prepRawDataTrackMap.insert(std::make_pair(ambi.first->second, &
track) );
112 prd_to_track_map.m_trackPrepRawDataMap.insert( std::make_pair(&
track, prds) );
115 <<prd_to_track_map.m_prepRawDataTrackMap.size() );
116 return StatusCode::SUCCESS;
◆ createPRDtoTrackMap()
std::unique_ptr< Trk::PRDtoTrackMap > InDet::InDetPRDtoTrackMapToolGangedPixels::createPRDtoTrackMap |
( |
| ) |
const |
|
overridevirtual |
Definition at line 44 of file InDetPRDtoTrackMapToolGangedPixels.cxx.
48 <<
", number of entries for this event:"
49 << (prd_to_track_map->m_gangedAmbis.isValid() ? prd_to_track_map->m_gangedAmbis->size() : -1) );
50 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 67 of file InDetPRDtoTrackMapToolGangedPixels.cxx.
69 if (virt_prd_to_track_map.
getType() !=
typeid(InDetPRDtoTrackMapToolGangedPixels::PRDtoTrackMap)) {
71 <<
" but got " << virt_prd_to_track_map.
getType().name()
72 <<
" . The tool can only handle a map created by the same tool. ");
73 throw std::logic_error(
"Type mismap between tool and map");
75 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 121 of file InDetPRDtoTrackMapToolGangedPixels.cxx.
125 PRDtoTrackMap &prd_to_track_map =
static_cast<PRDtoTrackMap&
>(virt_prd_to_track_map);
129 std::vector< const Trk::PrepRawData* > prds =
getPrdsOnTrack(virt_prd_to_track_map,
track);
134 connectedTracks.insert((
range.first)->second);
140 if (
pixel->gangedPixel()) {
141 std::pair<PixelGangedClusterAmbiguities::const_iterator,
142 PixelGangedClusterAmbiguities::const_iterator> ambi = prd_to_track_map.m_gangedAmbis->equal_range(pixel);
143 for (; ambi.first != ambi.second ; ++(ambi.first) ) {
144 range = prd_to_track_map.onTracks( *(ambi.first->second) );
147 connectedTracks.insert((
range.first)->second);
154 connectedTracks.erase(&
track);
157 <<
"\tsize of list is "<<connectedTracks.size());
159 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 164 of file InDetPRDtoTrackMapToolGangedPixels.cxx.
168 PRDtoTrackMap &prd_to_track_map =
static_cast<PRDtoTrackMap&
>(virt_prd_to_track_map);
169 using PRDs_t = std::vector<const Trk::PrepRawData *>;
172 Trk::PRDtoTrackMap::TrackPrepRawDataMap::const_iterator itvec = prd_to_track_map.m_trackPrepRawDataMap.find(&
track);
173 if (itvec!=prd_to_track_map.m_trackPrepRawDataMap.end())
175 ATH_MSG_VERBOSE(
"found track in cache, return cached PRD vector for track");
176 return itvec->second;
179 if (
track.measurementsOnTrack()==
nullptr) {
194 vec.reserve(
track.measurementsOnTrack()->size());
199 for (;
it!=itEnd;++
it)
201 const auto *
const meas{*
it};
◆ initialize()
StatusCode InDet::InDetPRDtoTrackMapToolGangedPixels::initialize |
( |
| ) |
|
|
overridevirtual |
◆ reduceToStorableMap()
Definition at line 53 of file InDetPRDtoTrackMapToolGangedPixels.cxx.
55 return std::move(obj_in);
59 <<
" but got " << obj_in->
getType().name()
60 <<
" . The tool can only handle a map created by the same tool. ");
63 return std::make_unique<Trk::PRDtoTrackMap>(std::move(*the_obj));
◆ m_addTRToutliers
BooleanProperty InDet::InDetPRDtoTrackMapToolGangedPixels::m_addTRToutliers {this, "addTRToutliers", false} |
|
private |
◆ m_pixelClusterAmbiguitiesMapName
The documentation for this class was generated from the following files: