ATLAS Offline Software
Loading...
Searching...
No Matches
CombinedMuonStrip_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// EDM include(s):
6
8
9#include "AthLinks/ElementLink.h"
11namespace {
13 static const SG::Accessor<Link_t> acc_primLink{"MuonStripLink1"};
14 static const SG::Accessor<Link_t> acc_secondLink{"MuonStripLink2"};
15
16}
17namespace xAOD {
19 if (const auto* prim = primaryStrip(); prim != nullptr) {
20 return prim->type();
21 }
22 if (const auto* second = secondaryStrip() ; second != nullptr) {
23 return second->type();
24 }
26 }
28 if (acc_primLink.isAvailable(*this) && acc_primLink(*this).isValid()) {
29 return *acc_primLink(*this);
30 }
31 return nullptr;
32 }
34
35 if (acc_secondLink.isAvailable(*this) && acc_secondLink(*this).isValid()) {
36 return *acc_secondLink(*this);
37 }
38 return nullptr;
39 }
40
42 assert(meas != nullptr);
43 const auto* cont = static_cast<const xAOD::MuonMeasurementContainer*>(meas->container());
44 acc_primLink(*this) = Link_t{*cont, meas->index()};
45 }
47 assert(meas != nullptr);
48 const auto* cont = static_cast<const xAOD::MuonMeasurementContainer*>(meas->container());
49 acc_secondLink(*this) = Link_t{*cont, meas->index()};
50 }
51
54 return strip ? strip->readoutElement() : nullptr;
55 }
56 std::uint8_t CombinedMuonStrip_v1::measuresPhi() const {
57 return 1;
58 }
68 Amg::Vector3D pos{Amg::Vector3D::Zero()};
69 pos.block<2,1>(0,0) = xAOD::toEigen(localPosition<2>());
70 return pos;
71 }
72}
This is a "hash" representation of an Identifier.
MuonReadoutElement is an abstract class representing the geometry of a muon detector.
Helper class to provide type-safe access to aux data.
const xAOD::MuonMeasurement * primaryStrip() const
Returns the primary associated measurement.
void setSecondaryStrip(const xAOD::MuonMeasurement *meas)
Linkt a prd measurement as secondary measurement.
Amg::Vector3D localMeasurementPos() const override final
Returns the local measurement position in the layer frame.
virtual IdentifierHash layerHash() const override final
Returns the hash of the associated layer (Needed for surface retrieval).
virtual IdentifierHash measurementHash() const override final
Returns the hash of the measurement channel.
const MuonGMR4::MuonReadoutElement * readoutElement() const override final
Returns the associated readout element.
virtual std::uint8_t measuresPhi() const override final
Returns whether the phi coordinate is measured.
const xAOD::MuonMeasurement * secondaryStrip() const
Returns the secondary associated measurement.
virtual xAOD::UncalibMeasType type() const override final
Returns the type of the measurement type as a simple enumeration.
void setPrimaryStrip(const xAOD::MuonMeasurement *meas)
Links a prd measurement as primary meaurement.
ConstVectorMap< N > localPosition() const
Returns the local position of the measurement.
Eigen::Matrix< double, 3, 1 > Vector3D
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
MuonMeasurement_v1 MuonMeasurement
UncalibMeasType
Define the type of the uncalibrated measurement.
MuonMeasurementContainer_v1 MuonMeasurementContainer