ATLAS Offline Software
MdtDriftCircle_v1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // EDM include(s):
7 // Local include(s):
10 #include "GaudiKernel/ServiceHandle.h"
13 #include "StoreGate/StoreGateSvc.h"
14 
15 namespace {
16  static const std::string preFixStr{"Mdt_"};
17 }
18 
19 namespace xAOD {
21 
27 IMPLEMENT_READOUTELEMENT(MdtDriftCircle_v1, m_readoutEle, MdtReadoutElement)
28 
29 IdentifierHash MdtDriftCircle_v1::measurementHash() const {
31  driftTube());
32 }
34  if (numDimensions() == 1) {
35  return Amg::Vector3D::Zero();
36  }
37  return localPosition<2>()[Trk::locZ] * Amg::Vector3D::UnitZ();
38 }
40  if (!m_identifier.isValid()){
41  m_identifier.set(readoutElement()->measurementId(measurementHash()));
42  }
43  return (*m_identifier.ptr());
44 }
46  return numDimensions() == 1 ? localPosition<1>()[Trk::locR]
47  : localPosition<2>()[Trk::locR];
48 }
51  return numDimensions() == 1 ? localCovariance<1>()(Trk::locR, Trk::locR)
52  : localCovariance<2>()(Trk::locR, Trk::locR);
53 }
56  return std::sqrt(driftRadiusCov());
57 }
58 } // namespace xAOD
xAOD::IMPLEMENT_SETTER_GETTER_WITH_CAST
IMPLEMENT_SETTER_GETTER_WITH_CAST(sTgcMeasurement_v1, uint8_t, sTgcMeasurement_v1::Author, author, setAuthor)
CxxUtils::CachedValue::ptr
const T * ptr() const
Return a pointer to the cached value.
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
CxxUtils::CachedValue::isValid
bool isValid() const
Test to see if the value is valid.
MuonGMR4::MdtReadoutElement::measurementHash
static IdentifierHash measurementHash(unsigned int layerNumber, unsigned int tubeNumber)
Transform the layer and tube number to the measurementHash.
xAOD::MdtDriftCircle_v1::measurementHash
IdentifierHash measurementHash() const
Returns the hash of the measurement channel (tube (x) layer)
Definition: MdtDriftCircle_v1.cxx:29
Muon::MdtDriftCircleStatus
MdtDriftCircleStatus
Enum to represent the 'status' of Mdt measurements e.g.
Definition: MdtDriftCircleStatus.h:25
xAOD::MdtDriftCircle_v1::identify
const Identifier & identify() const
: Returns the Athena identifier of the drift circle.
Definition: MdtDriftCircle_v1.cxx:39
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
Trk::locR
@ locR
Definition: ParamDefs.h:44
ParamDefs.h
MdtDriftCircle_v1.h
xAOD::int16_t
setScaleOne setStatusOne setSaturated int16_t
Definition: gFexGlobalRoI_v1.cxx:55
IMPLEMENT_READOUTELEMENT
#define IMPLEMENT_READOUTELEMENT(CLASS_NAME, CACHED_VALUE, READOUT_ELEMENT_TYPE)
Macro to handle the readoutElement.
Definition: AccessorMacros.h:55
xAOD::MdtDriftCircle_v1::readoutElement
const MuonGMR4::MdtReadoutElement * readoutElement() const
Retrieve the associated MdtReadoutElement.
xAOD::MdtDriftCircle_v1::driftRadius
float driftRadius() const
Returns the drift radius.
Definition: MdtDriftCircle_v1.cxx:45
xAOD::MdtDriftCircle_v1::MdtDriftCircleStatus
Muon::MdtDriftCircleStatus MdtDriftCircleStatus
Definition: MdtDriftCircle_v1.h:24
AccessorMacros.h
Trk::locZ
@ locZ
local cylindrical
Definition: ParamDefs.h:42
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
MuonDetectorManager.h
xAOD::MdtDriftCircle_v1::numDimensions
unsigned int numDimensions() const override
Override the dimensions to be 1.
Definition: MdtDriftCircle_v1.h:42
xAOD::MdtDriftCircle_v1::m_identifier
CxxUtils::CachedValue< Identifier > m_identifier
Definition: MdtDriftCircle_v1.h:90
xAOD::MdtDriftCircle_v1::localCirclePosition
Amg::Vector3D localCirclePosition() const
: Return the measurement's position vector in the local frame.
Definition: MdtDriftCircle_v1.cxx:33
CxxUtils::CachedValue::set
void set(const T &val) const
Set the value, assuming it is currently invalid.
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
MdtReadoutElement.h
IMPLEMENT_SETTER_GETTER
#define IMPLEMENT_SETTER_GETTER(DTYPE, GETTER, SETTER)
Definition: NRPCRDO_v1.cxx:13
merge.status
status
Definition: merge.py:17
xAOD::MdtDriftCircle_v1
https://gitlab.cern.ch/atlas/athena/-/blob/master/MuonSpectrometer/MuonReconstruction/MuonRecEvent/Mu...
Definition: MdtDriftCircle_v1.h:21
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
StoreGateSvc.h
xAOD::MdtDriftCircle_v1::driftRadiusUncert
float driftRadiusUncert() const
Returns the uncertainty on the drift radius.
Definition: MdtDriftCircle_v1.cxx:55
xAOD::MdtDriftCircle_v1::driftRadiusCov
float driftRadiusCov() const
Returns the covariance of the drift radius.
Definition: MdtDriftCircle_v1.cxx:50
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
Identifier
Definition: IdentifierFieldParser.cxx:14