ATLAS Offline Software
Loading...
Searching...
No Matches
IdentifierExtractor.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6// IdentifierExtractor.cxx, (c) ATLAS Detector software //
8
12
13void Trk::IdentifierExtractor::extract(std::vector<Identifier>& ids, const std::vector<const Trk::MeasurementBase*>& measurements)
14{
15 using namespace std;
18 ids.clear();
19 for (; it!=itEnd ; ++it)
20 {
21 Identifier id = extract(*it);
22 if( id.is_valid() ) { ids.push_back(id);}
23 }
24}
25
27{
28 Identifier id;
30 const Trk::RIO_OnTrack* rot = static_cast<const Trk::RIO_OnTrack*>(m);
31 id = rot->identify();
33 const Trk::CompetingRIOsOnTrack* comprot =
34 static_cast<const Trk::CompetingRIOsOnTrack*>(m);
35 id = comprot->rioOnTrack(comprot->indexOfMaxAssignProb()).identify();
36 } else {
37 id.clear();
38 }
39 return id;
40}
41
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
unsigned int indexOfMaxAssignProb() const
Index of the ROT with the highest assignment probability.
virtual const RIO_OnTrack & rioOnTrack(unsigned int) const =0
returns the RIO_OnTrack (also known as ROT) objects depending on the integer.
static void extract(std::vector< Identifier > &ids, const std::vector< const MeasurementBase * > &measurements)
This class is the pure abstract base class for all fittable tracking measurements.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
Definition RIO_OnTrack.h:70
Identifier identify() const
return the identifier -extends MeasurementBase
STL namespace.