27 if (acc.isAvailable(seg)){
37 return acc_prdLinks.isAvailable(segment) ? acc_prdLinks(segment).size() : 0;
40 const std::size_t n) {
41 if (!acc_prdLinks.isAvailable(segment)) {
45 const PrdLink_t& link{acc_prdLinks(segment)[n]};
46 return link.
isValid() ? *link :
nullptr;
49 const std::size_t n) {
50 if(!acc_prdState.isAvailable(segment)) {
53 assert (n < acc_prdState(segment).size());
54 return acc_prdState(segment)[n] != Acts::toUnderlying(CalibratedSpacePoint::State::Valid);
58 std::vector<const xAOD::UncalibratedMeasurement*> out{};
60 out.reserve(links.size());
61 for (std::size_t l = 0 ; l < links.size(); ++l) {
ElementLink implementation for ROOT usage.
bool isValid() const
Test to see if the link can be dereferenced.
Placeholder for what will later be the muon segment EDM representation.
Helper class to provide constant type-safe access to aux data.
::Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index.
int etaIndex() const
Returns the eta index, which corresponds to stationEta in the offline identifiers (and the ).
This header ties the generic definitions in this package.
std::vector< PrdLink_t > PrdLinkVec_t
Abrivation of a collection of Prd links.
std::string printID(const xAOD::MuonSegment &seg)
Print the chamber ID of a segment, e.g.
const xAOD::UncalibratedMeasurement * getMeasurement(const xAOD::MuonSegment &segment, const std::size_t n)
Returns the n-th uncalibrated measurement.
std::size_t nMeasurements(const xAOD::MuonSegment &segment)
Returns the number of associated Uncalibrated measurements.
std::vector< const xAOD::UncalibratedMeasurement * > collectMeasurements(const xAOD::MuonSegment &segment, bool skipOutlier=true)
Helper function to extract the measurements from the segment.
bool isOutlierMeasurement(const xAOD::MuonSegment &segment, const std::size_t n)
Returns whether the n-the uncalibrated measurement is an outlier.
ElementLink< MuonR4::SegmentContainer > SegLink_t
Abrivation of the link to the reco segment container.
ElementLink< PrdCont_t > PrdLink_t
Abrivation to call the link to an element inside an uncalibrated measurement container.
const Segment * detailedSegment(const xAOD::MuonSegment &seg)
Helper function to navigate from the xAOD::MuonSegment to the MuonR4::Segment.
const std::string & chName(ChIndex index)
convert ChIndex into a string
MuonSegment_v1 MuonSegment
Reference the current persistent version:
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.