|
ATLAS Offline Software
|
Go to the documentation of this file.
15 template <
class ContainerType>
18 const ContainerType*& contToPush)
const {
22 return StatusCode::SUCCESS;
26 contToPush = readHandle.cptr();
27 return StatusCode::SUCCESS;
36 return StatusCode::SUCCESS;
53 switch (measurement->type()) {
61 if (mdt_matching != simHits->end()){
62 bestSimHit =(*mdt_matching);
79 if (measurement->numDimensions() == 1) {
80 locPos = measurement->localPosition<1>().
x() * Amg::Vector3D::UnitX();
82 locPos.block<2,1>(0,0) = xAOD::toEigen(measurement->localPosition<2>());
90 if (!chambViewer.loadView(gasGapId)) {
94 if (gasGapId !=
m_idHelperSvc->gasGapId(simHit->identify())) {
103 if (measurement->numDimensions() == 1) {
104 dist = std::abs(prdPos.x() - simHit->localPosition().x())
105 / std::sqrt(measurement->localCovariance<1>()(0,0));
107 const Amg::Vector2D diff = (prdPos - xAOD::toEigen(simHit->localPosition())).block<2,1>(0,0);
108 dist = std::sqrt(
diff.dot(xAOD::toEigen(measurement->localCovariance<2>()).inverse() *
diff));
110 if (dist < closestDistance) {
111 closestDistance = dist;
118 return StatusCode::FAILURE;
124 decorHandle(*measurement) =
LinkType{*simHits, bestSimHit->
index()};
126 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
#define ATH_MSG_VERBOSE(x)
@ 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.
::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.
const MuonGMR4::MuonReadoutElement * readoutElement(const UncalibratedMeasurement *meas)
Returns the associated readout element to the measurement.
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.
StatusCode retrieveContainer(const EventContext &ctx, const SG::ReadHandleKey< ContainerType > &key, const ContainerType *&contToPush) const
Helper method to retrieve any kind of container from a ReadHandleKey.
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.
Handle class for reading from StoreGate.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...