32 if (acc.isAvailable(seg)){
42 return acc_prdLinks.isAvailable(segment) ? acc_prdLinks(segment).size() : 0;
45 const std::size_t n) {
46 if (!acc_prdLinks.isAvailable(segment)) {
50 const PrdLink_t& link{acc_prdLinks(segment)[n]};
51 return link.isValid() ? *link :
nullptr;
54 const std::size_t n) {
55 if(!acc_prdState.isAvailable(segment)) {
58 assert (n < acc_prdState(segment).
size());
59 return acc_prdState(segment)[n] != Acts::toUnderlying(CalibratedSpacePoint::State::Valid);
63 std::vector<const xAOD::UncalibratedMeasurement*> out{};
65 out.reserve(links.size());
66 for (std::size_t l = 0 ; l < links.size(); ++l) {
74 Acts::GeometryIdentifier
volumeId(
const Acts::Surface& surface) {
75 return surface.geometryId().withSensitive(0).withBoundary(0);
79 const bool skipOutlier) {
81 for (std::size_t i = 0; i < n ; ++i) {
91 const bool skipOutlier) {
93 assert(meas !=
nullptr);
96 const Acts::MultiIntersection isect = surface.intersect(gctx,
99 Acts::BoundaryTolerance::Infinite());
100 return isect.at(0).position();
106 if (
const float dPt =
a->pt() - b->pt();
107 std::abs(dPt) > std::numeric_limits<float>::epsilon()) {
110 if (
const float dEta =
a->eta() - b->eta();
111 std::abs(dEta) > std::numeric_limits<float>::epsilon()) {
size_t size() const
Number of registered mappings.
ElementLink implementation for ROOT usage.
Placeholder for what will later be the muon segment EDM representation.
Helper class to provide constant type-safe access to aux data.
Class providing the definition of the 4-vector interface.
Amg::Vector3D direction() const
Returns the direction as Amg::Vector.
::Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index.
Amg::Vector3D position() const
Returns the position as Amg::Vector.
int etaIndex() const
Returns the eta index, which corresponds to stationEta in the offline identifiers (and the ).
Eigen::Matrix< double, 3, 1 > Vector3D
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.
Acts::GeometryIdentifier volumeId(const Acts::Surface &surface)
Returns the identifier of the volume in which the surface is embedded.
bool isOutlierMeasurement(const xAOD::MuonSegment &segment, const std::size_t n)
Returns whether the n-the uncalibrated measurement is an outlier.
const xAOD::UncalibratedMeasurement * firstMeasurement(const xAOD::MuonSegment &segment, const bool skipOutlier=true)
Retrieves the first measurement associated with the segment.
ElementLink< MuonR4::SegmentContainer > SegLink_t
Abrivation of the link to the reco segment container.
Amg::Vector3D atFirstSurface(const Acts::GeometryContext &gctx, const xAOD::MuonSegment &segment, const bool skipOutlier=true)
Expresses the segment position on the surface of the first measurement.
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
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.
MuonSegment_v1 MuonSegment
Reference the current persistent version:
const Acts::Surface & muonSurface(const UncalibratedMeasurement *meas)
Returns the associated Acts surface to the measurement.
bool operator()(const xAOD::IParticle *a, const xAOD::IParticle *b) const