ATLAS Offline Software
Static Public Member Functions | List of all members
Trk::IdentifierExtractor Class Reference

Small utility to get hit Identifiers out of MeasurementBase (either in a vector or single). More...

#include <IdentifierExtractor.h>

Collaboration diagram for Trk::IdentifierExtractor:

Static Public Member Functions

static void extract (std::vector< Identifier > &ids, const std::vector< const MeasurementBase * > &measurements)
 
static Identifier extract (const MeasurementBase *)
 

Detailed Description

Small utility to get hit Identifiers out of MeasurementBase (either in a vector or single).

If MB object is of an abstract flavour – i.e. not on a detector element – it is skipped.

Author
Wolfgang Liebig

Definition at line 23 of file IdentifierExtractor.h.

Member Function Documentation

◆ extract() [1/2]

Identifier Trk::IdentifierExtractor::extract ( const MeasurementBase m)
static

Definition at line 26 of file IdentifierExtractor.cxx.

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 }

◆ extract() [2/2]

void Trk::IdentifierExtractor::extract ( std::vector< Identifier > &  ids,
const std::vector< const MeasurementBase * > &  measurements 
)
static

Definition at line 13 of file IdentifierExtractor.cxx.

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 }

The documentation for this class was generated from the following files:
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
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
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
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