ATLAS Offline Software
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 
13 void Trk::IdentifierExtractor::extract(std::vector<Identifier>& ids, const std::vector<const Trk::MeasurementBase*>& measurements)
14 {
15  using namespace std;
16  vector<const Trk::MeasurementBase*>::const_iterator it = measurements.begin();
17  vector<const Trk::MeasurementBase*>::const_iterator itEnd = measurements.end();
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 
xAOD::identify
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/Root/UtilFunctions.cxx:61
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
MeasurementBase.h
CompetingRIOsOnTrack.h
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
IdentifierExtractor.h
Trk::CompetingRIOsOnTrack::rioOnTrack
virtual const RIO_OnTrack & rioOnTrack(unsigned int) const =0
returns the RIO_OnTrack (also known as ROT) objects depending on the integer.
Trk::MeasurementBaseType::CompetingRIOsOnTrack
@ CompetingRIOsOnTrack
Definition: MeasurementBase.h:50
Trk::CompetingRIOsOnTrack
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
Definition: CompetingRIOsOnTrack.h:64
Trk::MeasurementBase
Definition: MeasurementBase.h:58
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
Trk::MeasurementBaseType::RIO_OnTrack
@ RIO_OnTrack
Definition: MeasurementBase.h:49
Trk::IdentifierExtractor::extract
static void extract(std::vector< Identifier > &ids, const std::vector< const MeasurementBase * > &measurements)
Definition: IdentifierExtractor.cxx:13
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
Trk::CompetingRIOsOnTrack::indexOfMaxAssignProb
unsigned int indexOfMaxAssignProb() const
Index of the ROT with the highest assignment probability.
Definition: CompetingRIOsOnTrack.cxx:101
Identifier
Definition: IdentifierFieldParser.cxx:14