![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Concrete Implementation of the IPRD_AssociationTool interface.
More...
#include <InDetPRD_AssociationToolGangedPixels.h>
Concrete Implementation of the IPRD_AssociationTool interface.
Definition at line 20 of file InDetPRD_AssociationToolGangedPixels.h.
◆ Maps
◆ InDetPRD_AssociationToolGangedPixels()
InDet::InDetPRD_AssociationToolGangedPixels::InDetPRD_AssociationToolGangedPixels |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~InDetPRD_AssociationToolGangedPixels()
InDet::InDetPRD_AssociationToolGangedPixels::~InDetPRD_AssociationToolGangedPixels |
( |
| ) |
|
|
virtualdefault |
◆ addPRDs() [1/2]
StatusCode InDet::InDetPRD_AssociationToolGangedPixels::addPRDs |
( |
const Trk::Track & |
track | ) |
|
|
overridevirtual |
◆ addPRDs() [2/2]
StatusCode InDet::InDetPRD_AssociationToolGangedPixels::addPRDs |
( |
Maps & |
maps, |
|
|
const Trk::Track & |
track |
|
) |
| const |
|
overridevirtual |
add the PRDs from this track to maps.
- Parameters
-
track | all PRDs from 'track' will be added to PRD_AssociationTool's internal store. |
Definition at line 44 of file InDetPRD_AssociationToolGangedPixels.cxx.
48 TrackPrepRawDataMap::const_iterator itvec = maps.m_trackPrepRawDataMap.find(&
track);
49 if (itvec!=maps.m_trackPrepRawDataMap.end())
51 ATH_MSG_ERROR(
"track already found in cache, should not happen");
52 return StatusCode::FAILURE;
61 maps.m_prepRawDataTrackMap.emplace(prd, &
track);
65 if (
pixel->gangedPixel()) {
67 std::pair<PixelGangedClusterAmbiguities::const_iterator,
68 PixelGangedClusterAmbiguities::const_iterator> ambi = gangedAmbis->equal_range(pixel);
69 for (; ambi.first != ambi.second ; ++(ambi.first) ) {
71 ATH_MSG_DEBUG(
"Found mirror pixel, add mirror to association map" );
72 maps.m_prepRawDataTrackMap.emplace(ambi.first->second, &
track);
79 maps.m_trackPrepRawDataMap.emplace(&
track, prds);
82 <<maps.m_prepRawDataTrackMap.size());
83 return StatusCode::SUCCESS;
◆ finalize()
StatusCode InDet::InDetPRD_AssociationToolGangedPixels::finalize |
( |
| ) |
|
|
overridevirtual |
◆ findConnectedTracks() [1/2]
Definition at line 175 of file InDetPRD_AssociationToolGangedPixels.cxx.
187 connectedTracks.insert((
range.first)->second);
193 if (
pixel->gangedPixel()) {
194 std::pair<PixelGangedClusterAmbiguities::const_iterator,
195 PixelGangedClusterAmbiguities::const_iterator> ambi = gangedAmbis->equal_range(pixel);
196 for (; ambi.first != ambi.second ; ++(ambi.first) ) {
200 connectedTracks.insert((
range.first)->second);
207 connectedTracks.erase(&
track);
210 <<
"\tsize of list is "<<connectedTracks.size());
212 return connectedTracks;
◆ findConnectedTracks() [2/2]
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 169 of file InDetPRD_AssociationToolGangedPixels.cxx.
◆ getPrdsOnTrack() [1/2]
Definition at line 224 of file InDetPRD_AssociationToolGangedPixels.cxx.
227 using PRDs_t = std::vector<const Trk::PrepRawData *>;
230 TrackPrepRawDataMap::const_iterator itvec = maps.m_trackPrepRawDataMap.find(&
track);
231 if (itvec!=maps.m_trackPrepRawDataMap.end())
233 ATH_MSG_VERBOSE(
"found track in cache, return cached PRD vector for track");
234 return itvec->second;
237 if (
track.measurementsOnTrack()==
nullptr) {
246 vec.reserve(
track.measurementsOnTrack()->size());
251 for (;
it!=itEnd;++
it){
252 const auto *
const pThisMeasurement(*
it);
◆ getPrdsOnTrack() [2/2]
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 217 of file InDetPRD_AssociationToolGangedPixels.cxx.
◆ initialize()
StatusCode InDet::InDetPRD_AssociationToolGangedPixels::initialize |
( |
| ) |
|
|
overridevirtual |
◆ isShared() [1/2]
|
inlinefinaloverridevirtual |
does this PRD belong to more than one track in maps?
- Parameters
-
prd | the PrepRawData in question |
- Returns
- true if 'prd' exists on more than one track (of course PRD_AssociationTool can only give information about tracks it knows about i.e. that were added to maps with addPRDs()
Definition at line 131 of file InDetPRD_AssociationToolGangedPixels.h.
134 return (maps.m_prepRawDataTrackMap.count(&prd)>1);
◆ isShared() [2/2]
does this PRD belong to more than one track?
- Parameters
-
prd | the PrepRawData in question |
- Returns
- true if 'prd' exists on more than one track (of course PRD_AssociationTool can only give information about tracks it knows about i.e. that were added with addPRDs()
Definition at line 138 of file InDetPRD_AssociationToolGangedPixels.h.
◆ isUsed() [1/2]
|
inlinefinaloverridevirtual |
does this PRD belong to at least one track in maps?
- Parameters
-
prd | the PrepRawData in question |
- Returns
- true if 'prd' exists in at least one track (of course PRD_AssociationTool can only give information about tracks it knows about i.e. that were added to maps with addPRDs()
Definition at line 118 of file InDetPRD_AssociationToolGangedPixels.h.
121 return (maps.m_prepRawDataTrackMap.count(&prd)>0);
◆ isUsed() [2/2]
does this PRD belong to at least one track?
- Parameters
-
prd | the PrepRawData in question |
- Returns
- true if 'prd' exists in at least one track (of course PRD_AssociationTool can only give information about tracks it knows about i.e. that were added with addPRDs()
Definition at line 125 of file InDetPRD_AssociationToolGangedPixels.h.
◆ onTracks() [1/2]
◆ onTracks() [2/2]
get the Tracks associated with this Trk::PrepRawData.
IMPORTANT: Please use the typedefs IPRD_AssociationTool::PrepRawDataRange and IPRD_AssociationTool::ConstPRD_MapIt (defined in the interface) to access the tracks, as the way the data is stored internally may change.
Definition at line 280 of file InDetPRD_AssociationToolGangedPixels.cxx.
◆ removePRDs() [1/2]
StatusCode InDet::InDetPRD_AssociationToolGangedPixels::removePRDs |
( |
const Trk::Track & |
track | ) |
|
|
overridevirtual |
remove the PRDs from this track from the store
- Parameters
-
track | all PRDs from 'track' will be removed from the PRD_AssociationTool's internal store. |
Definition at line 86 of file InDetPRD_AssociationToolGangedPixels.cxx.
◆ removePRDs() [2/2]
StatusCode InDet::InDetPRD_AssociationToolGangedPixels::removePRDs |
( |
Maps & |
maps, |
|
|
const Trk::Track & |
track |
|
) |
| const |
|
overridevirtual |
remove the PRDs from this track from maps
- Parameters
-
track | all PRDs from 'track' will be removed from maps |
Definition at line 91 of file InDetPRD_AssociationToolGangedPixels.cxx.
101 int oldSize = maps.m_prepRawDataTrackMap.size();
105 if (itvec==maps.m_trackPrepRawDataMap.end())
107 ATH_MSG_ERROR(
"Track not found in cache, this should not happen");
108 return StatusCode::FAILURE;
114 std::vector< const Trk::PrepRawData* > prds = itvec->second;
119 range = maps.m_prepRawDataTrackMap.equal_range(prd);
121 ConstPRD_MapIt mapIt =
range.first;
122 ConstPRD_MapIt mapItEnd =
range.second;
124 for ( ;mapIt!=mapItEnd; ++mapIt) {
125 if ( mapIt->second==&
track ) {
126 maps.m_prepRawDataTrackMap.erase( mapIt );
135 if (
pixel->gangedPixel()) {
136 std::pair<PixelGangedClusterAmbiguities::const_iterator,
137 PixelGangedClusterAmbiguities::const_iterator> ambi = gangedAmbis->equal_range(pixel);
138 for (; ambi.first != ambi.second ; ++(ambi.first) ) {
140 ATH_MSG_DEBUG(
"Found ganged pixel, remove also mirror from association map");
142 range = maps.m_prepRawDataTrackMap.equal_range(ambi.first->second);
145 mapItEnd =
range.second;
147 for ( ;mapIt!=mapItEnd; ++mapIt) {
148 if ( mapIt->second==&
track ) {
149 maps.m_prepRawDataTrackMap.erase( mapIt );
160 maps.m_trackPrepRawDataMap.erase( itvec );
163 <<&
track<<
") \t- map has changed size from \t"
164 <<oldSize <<
" \tto "<<maps.m_prepRawDataTrackMap.size());
165 return StatusCode::SUCCESS;
◆ reset()
void InDet::InDetPRD_AssociationToolGangedPixels::reset |
( |
| ) |
|
|
overridevirtual |
◆ m_addTRToutliers
bool InDet::InDetPRD_AssociationToolGangedPixels::m_addTRToutliers |
|
private |
◆ m_maps
Maps InDet::InDetPRD_AssociationToolGangedPixels::m_maps |
|
private |
◆ m_pixelClusterAmbiguitiesMapName
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
std::set< TrackPtr > TrackSet
virtual bool rioType(RIO_OnTrackType::Type type) const =0
Method checking the Rio On Track type.
std::vector< size_t > vec
#define ATH_MSG_VERBOSE(x)
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
#define ATH_MSG_WARNING(x)