30 std::ostringstream oss;
33 <<
", Dir theta/phi: "<<(seg.
direction().
theta() /Gaudi::Units::degree)
35 <<
", Pos theta/phi: "<<(seg.
position().
theta() / Gaudi::Units::degree)
36 <<
" / "<<(seg.
position().
phi() / Gaudi::Units::degree)
37 <<
", R: "<<Acts::fastHypot(seg.
x(), seg.
y()) <<
", Z: "<<seg.
z()
41 <<
", nPhi: "<<
static_cast<int>(seg.
nPhiLayers())
48 if (acc.isAvailable(seg)){
58 return acc_prdLinks.isAvailable(segment) ? acc_prdLinks(segment).size() : 0;
61 const std::size_t n) {
62 if (!acc_prdLinks.isAvailable(segment)) {
66 const PrdLink_t& link{acc_prdLinks(segment)[n]};
67 return link.isValid() ? *link :
nullptr;
70 const std::size_t n) {
71 if(!acc_prdState.isAvailable(segment)) {
74 assert (n < acc_prdState(segment).
size());
75 return acc_prdState(segment)[n] != Acts::toUnderlying(CalibratedSpacePoint::State::Valid);
79 std::vector<const xAOD::UncalibratedMeasurement*> out{};
81 out.reserve(links.size());
82 for (std::size_t l = 0 ; l < links.size(); ++l) {
90 Acts::GeometryIdentifier
volumeId(
const Acts::Surface& surface) {
91 return surface.geometryId().withSensitive(0).withBoundary(0);
95 const bool skipOutlier) {
97 for (std::size_t i = 0; i < n ; ++i) {
107 const bool skipOutlier) {
109 assert(meas !=
nullptr);
112 const Acts::MultiIntersection isect = surface.intersect(gctx,
115 Acts::BoundaryTolerance::Infinite());
116 return isect.closest().position();
122 if (
const float dPt =
a->pt() - b->pt();
123 std::abs(dPt) > std::numeric_limits<float>::epsilon()) {
126 if (
const float dEta =
a->eta() - b->eta();
127 std::abs(dEta) > std::numeric_limits<float>::epsilon()) {
Scalar phi() const
phi method
Scalar theta() const
theta method
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.
float y() const
Returns the x position.
std::uint8_t nTrigEtaLayers() const
Returns the number of trigger eta hits.
float numberDoF() const
Returns the numberDoF.
Amg::Vector3D direction() const
Returns the direction as Amg::Vector.
std::uint8_t nPrecisionHits() const
Returns the number of precision hits.
::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 ).
std::uint8_t nPhiLayers() const
Returns the number of trigger phi hits.
float z() const
Returns the y position.
Eigen::Matrix< double, 3, 1 > Vector3D
Parameters localSegmentPars(const xAOD::MuonSegment &seg)
Returns the localSegPars decoration from a xAODMuon::Segment.
std::string toString(const Parameters &pars)
Dumps the parameters into a string with labels in front of each number.
This header ties the generic definitions in this package.
std::string printID(const xAOD::MuonSegment &seg)
Print the chamber ID of a segment, e.g.
ElementLink< PrdCont_t > PrdLink_t
const xAOD::UncalibratedMeasurement * getMeasurement(const xAOD::MuonSegment &segment, const std::size_t n)
Returns the n-th uncalibrated measurement.
std::string printSegment(const xAOD::MuonSegment &seg)
Print the details of a segment.
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.
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.
std::vector< PrdLink_t > PrdLinkVec_t
ElementLink< xAOD::MuonSegmentContainer > SegLink_t
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