ATLAS Offline Software
Loading...
Searching...
No Matches
MMCluster_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"
14
15namespace {
16 static const std::string preFixStr{"Mm_"};
17}
18
19namespace xAOD {
27 if (!m_identifier.isValid()){
28 m_identifier.set(readoutElement()->measurementId(measurementHash()));
29 }
30 return (*m_identifier.ptr());
31}
34IMPLEMENT_SETTER_GETTER(MMCluster_v1, float, driftDist, setDriftDist)
36IMPLEMENT_SETTER_GETTER(MMCluster_v1, float, chiSqProb, setChiSqProb)
38IMPLEMENT_SETTER_GETTER(MMCluster_v1, uint16_t, channelNumber, setChannelNumber)
41
42IMPLEMENT_VECTOR_SETTER_GETTER(MMCluster_v1, uint16_t, stripNumbers, setStripNumbers)
43IMPLEMENT_VECTOR_SETTER_GETTER(MMCluster_v1, int16_t, stripTimes, setStripTimes)
44IMPLEMENT_VECTOR_SETTER_GETTER(MMCluster_v1, int, stripCharges, setStripCharges)
45IMPLEMENT_VECTOR_SETTER_GETTER(MMCluster_v1, float, stripDriftDist, setStripDriftDist)
46IMPLEMENT_VECTOR_SETTER_GETTER(MMCluster_v1, MMCluster_v1::DriftCov_t, stripDriftErrors, setStripDriftErrors)
47
48IMPLEMENT_READOUTELEMENT(MMCluster_v1, m_readoutEle, MmReadoutElement)
49
51 std::vector<DriftCov_t> covariance{};
52 std::transform(stripDriftErrors.begin(), stripDriftErrors.end(),
53 std::back_inserter(covariance),
54 [](const AmgVector(2) & cov) {
55 DriftCov_t toRet{};
56 toRet [0] = cov[0];
57 toRet [1] = cov[1];
58 return toRet;
59 });
60 setStripDriftErrors(covariance);
61}
63 return localPosition<1>()[0] * Amg::Vector3D::UnitX();
64}
65
66} // namespace xAOD
#define IMPLEMENT_SETTER_GETTER_WITH_CAST(CLASS_NAME, STORE_DTYPE, CAST_DTYPE, GETTER, SETTER)
Macro to implement the scalar variable of the xAOD::MuonPrepData object which is then casted to an en...
#define IMPLEMENT_READOUTELEMENT(CLASS_NAME, CACHED_VALUE, READOUT_ELEMENT_TYPE)
Macro to handle the readoutElement.
#define IMPLEMENT_VECTOR_SETTER_GETTER(CLASS_NAME, DTYPE, GETTER, SETTER)
Macro to implement vector like variables of the xAOD::MuonPrepData objects.
#define IMPLEMENT_SETTER_GETTER(DTYPE, GETTER, SETTER)
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
This is a "hash" representation of an Identifier.
static IdentifierHash createHash(const int gasGap, const int strip)
CxxUtils::CachedValue< Identifier > m_identifier
void setStripDriftErrors(const std::vector< DriftCov_t > &stripDriftErrors)
PosAccessor< 2 >::element_type DriftCov_t
returns the list of drift distances
MMCluster_v1()=default
Default constructor.
uint8_t gasGap() const
Returns the gas gap number to which the clsuter.
const Identifier & identify() const
: Returns the Athena identifier of the micro mega cluster It's constructed from the measurementHash &...
::Muon::MMPrepData::Author Author
::Muon::MMPrepData::Quality Quality
IdentifierHash measurementHash() const
Returns the hash of the measurement channel.
IdentifierHash layerHash() const
Returns the hash of the associated layer (Needed for surface retrieval)
uint16_t channelNumber() const
returns the number of the central strip
Amg::Vector3D localMeasurementPos() const
Returns the local measurement position as 3-vector.
const std::vector< DriftCov_t > & stripDriftErrors() const
const MuonGMR4::MmReadoutElement * readoutElement() const
Retrieve the associated MmReadoutElement.
ConstVectorMap< N > localPosition() const
Returns the local position of the measurement.
Eigen::Matrix< double, 3, 1 > Vector3D
STL namespace.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
AmgVector(N) toEigen(const ConstVectorMap< N > &xAODvec)
setScaleOne setStatusOne setSaturated int16_t
setWord1 uint16_t
setEventNumber uint32_t