 |
ATLAS Offline Software
|
Go to the documentation of this file.
20 return StatusCode::SUCCESS;
37 switch (measurement->type()) {
45 if (mdt_matching != simHits->end()){
46 bestSimHit =(*mdt_matching);
63 if (measurement->numDimensions() == 1) {
64 locPos = measurement->localPosition<1>().
x() * Amg::Vector3D::UnitX();
66 locPos.block<2,1>(0,0) = xAOD::toEigen(measurement->localPosition<2>());
74 if (!chambViewer.loadView(gasGapId)) {
78 if (gasGapId !=
m_idHelperSvc->gasGapId(simHit->identify())) {
87 if (measurement->numDimensions() == 1) {
88 dist = std::abs(prdPos.x() - simHit->localPosition().x())
89 / std::sqrt(measurement->localCovariance<1>()(0,0));
91 const Amg::Vector2D diff = (prdPos - xAOD::toEigen(simHit->localPosition())).block<2,1>(0,0);
92 dist = std::sqrt(
diff.dot(xAOD::toEigen(measurement->localCovariance<2>()).inverse() *
diff));
94 if (dist < closestDistance) {
95 closestDistance = dist;
102 return StatusCode::FAILURE;
108 decorHandle(*measurement) =
LinkType{*simHits, bestSimHit->
index()};
110 return StatusCode::SUCCESS;
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
Const iterator class for DataVector/DataList.
Identifier identify() const
Returns the global ATLAS identifier of the SimHit.
Eigen::Matrix< double, 2, 1 > Vector2D
StatusCode initialize() override final
The MuonReadoutElement is an abstract class representing the geometry representing the muon detector.
Amg::Transform3D globalToLocalTrans(const ActsGeometryContext &ctx) const
Transformations to translate between local <-> global coordinates.
virtual IdentifierHash layerHash(const Identifier &measId) const =0
@ DetElement
View ends if the detElementHash changes.
SG::WriteDecorHandleKey< xAOD::UncalibratedMeasurementContainer > m_decorKey
StatusCode execute(const EventContext &ctx) const override final
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Key to the geometry context.
SG::ReadHandleKey< xAOD::UncalibratedMeasurementContainer > m_prdHitKey
Key to the uncalibrated measurements to decorate.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
Eigen::Affine3d Transform3D
Handle class for adding a decoration to an object.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc to decode the Identifiers.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Include the GeoPrimitives which need to be put first.
ElementLink implementation for ROOT usage.
Gaudi::Property< double > m_PullCutOff
The number of standard deviations a measurement may be pulled apart in order to be associated.
SG::ReadHandleKey< xAOD::MuonSimHitContainer > m_simHitsKey
Key to the associated simHit container.
Eigen::Matrix< double, 3, 1 > Vector3D
This header ties the generic definitions in this package.
index_type index() const
Get the index of the element inside of its container.
const Amg::Transform3D & localToGlobalTrans(const ActsGeometryContext &ctx) const
Returns the local to global transformation into the ATLAS coordinate system.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
const MuonGMR4::MuonReadoutElement * muonReadoutElement(const UncalibratedMeasurement *meas)
Returns the associated readout element to the measurement.