Small utility to cast MeasurementBase (either in a vector or single) into RIO_OnTrack.
More...
#include <RoT_Extractor.h>
Small utility to cast MeasurementBase (either in a vector or single) into RIO_OnTrack.
CompetingRIOsOnTrack objects are understood (ROT with max. assign-prob taken). If MB object is of different flavour than ROT, it is skipped.
- Author
- Edward Moyse
Definition at line 41 of file TrackStatHelper.cxx.
◆ extract() [1/3]
Definition at line 45 of file RoT_Extractor.cxx.
47{
48
51 }
52 if (rot == nullptr) {
53 const Trk::CompetingRIOsOnTrack* comprot = nullptr;
55 comprot = static_cast<const Trk::CompetingRIOsOnTrack*>(meas);
56 }
57 if (comprot) {
59 }
60 }
61}
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.
◆ extract() [2/3]
| void Trk::RoT_Extractor::extract |
( |
std::vector< const RIO_OnTrack * > & | rots, |
|
|
const std::vector< const MeasurementBase * > & | measurements ) |
|
static |
◆ extract() [3/3]
| void Trk::RoT_Extractor::extract |
( |
std::vector< const RIO_OnTrack * > & | rots, |
|
|
const std::vector< const MeasurementBase * > & | measurements, |
|
|
bool | convertCompRots = false ) |
|
static |
Definition at line 15 of file RoT_Extractor.cxx.
19{
20 using namespace std;
21 rots.reserve(rots.size() + measurements.size());
22 vector<const MeasurementBase*>::const_iterator
it = measurements.begin();
23 vector<const MeasurementBase*>::const_iterator itEnd = measurements.end();
24 for (;
it != itEnd; ++
it) {
25 const Trk::RIO_OnTrack* rot = nullptr;
28 }
29 if (convertCompRots && nullptr == rot) {
30 const Trk::CompetingRIOsOnTrack* comprot = nullptr;
32 comprot = static_cast<const Trk::CompetingRIOsOnTrack*>(*it);
33 }
34 if (comprot) {
36 }
37 }
38 if (nullptr != rot) {
39 rots.push_back(rot);
40 }
41 }
42}
The documentation for this class was generated from the following files: