12#include "Identifier/Identifier.h"
36 return StatusCode::SUCCESS;
41 return StatusCode::SUCCESS;
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());
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));
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");
84 Trk::PRDtoTrackMap::TrackPrepRawDataMap::const_iterator itvec = prd_to_track_map.
m_trackPrepRawDataMap.find(&track);
87 ATH_MSG_ERROR(
"track already found in cache, should not happen");
88 return StatusCode::FAILURE;
91 std::vector< const Trk::PrepRawData* > prds =
getPrdsOnTrack(prd_to_track_map, 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;
114 ATH_MSG_DEBUG(
"Added PRDs from Track at ("<<&track<<
") - map now has size: \t"
116 return StatusCode::SUCCESS;
127 TrackSet connectedTracks;
129 std::vector< const Trk::PrepRawData* > prds =
getPrdsOnTrack(virt_prd_to_track_map, track);
133 for ( ; range.first!=range.second; ++(range.first) )
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) );
146 for ( ; range.first!=range.second; ++(range.first) )
147 connectedTracks.insert((range.first)->second);
154 connectedTracks.erase(&track);
157 <<
"\tsize of list is "<<connectedTracks.size());
159 return connectedTracks;
163std::vector< const Trk::PrepRawData* >
169 using PRDs_t = std::vector<const Trk::PrepRawData *>;
172 Trk::PRDtoTrackMap::TrackPrepRawDataMap::const_iterator itvec = prd_to_track_map.
m_trackPrepRawDataMap.find(&track);
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};
222 ATH_MSG_DEBUG(
" Getting "<<
vec.size()<<
" PRDs including TRT outlier from track at:"<<&track);
230 if (!key.key().empty()) {
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
std::vector< size_t > vec
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Property holding a SG store/key/clid from which a ReadHandle is made.
This class is the pure abstract base class for all fittable tracking measurements.
PrepRawDataTrackMapRange onTracks(const PrepRawData &prd)
get the Tracks associated with this PrepRawData.
std::pair< PrepRawDataTrackMap::const_iterator, PrepRawDataTrackMap::const_iterator > ConstPrepRawDataTrackMapRange
TrackPrepRawDataMap m_trackPrepRawDataMap
holds the PRDs associated with each Track (i.e.
PrepRawDataTrackMap m_prepRawDataTrackMap
holds the tracks associated with each PRD (i.e.
virtual const std::type_info & getType() const
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
virtual bool rioType(RIO_OnTrackType::Type type) const =0
Method checking the Rio On Track type.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())