ATLAS Offline Software
Loading...
Searching...
No Matches
MMCluster_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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 {
26IMPLEMENT_SETTER_GETTER(MMCluster_v1, std::uint16_t, time, setTime)
27IMPLEMENT_SETTER_GETTER(MMCluster_v1, std::uint32_t, charge, setCharge)
28IMPLEMENT_SETTER_GETTER(MMCluster_v1, float, driftDist, setDriftDist)
30IMPLEMENT_SETTER_GETTER(MMCluster_v1, float, chiSqProb, setChiSqProb)
31IMPLEMENT_SETTER_GETTER(MMCluster_v1, std::uint8_t, gasGap, setGasGap)
32IMPLEMENT_SETTER_GETTER(MMCluster_v1, std::uint16_t, channelNumber, setChannelNumber)
35
36IMPLEMENT_VECTOR_SETTER_GETTER(MMCluster_v1, uint16_t, stripNumbers, setStripNumbers)
37IMPLEMENT_VECTOR_SETTER_GETTER(MMCluster_v1, int16_t, stripTimes, setStripTimes)
38IMPLEMENT_VECTOR_SETTER_GETTER(MMCluster_v1, int, stripCharges, setStripCharges)
39IMPLEMENT_VECTOR_SETTER_GETTER(MMCluster_v1, float, stripDriftDist, setStripDriftDist)
40IMPLEMENT_VECTOR_SETTER_GETTER(MMCluster_v1, MMCluster_v1::DriftCov_t, stripDriftErrors, setStripDriftErrors)
41
42IMPLEMENT_READOUTELEMENT(MMCluster_v1, m_readoutEle, MmReadoutElement)
43
45 std::vector<DriftCov_t> covariance{};
46 std::transform(stripDriftErrors.begin(), stripDriftErrors.end(),
47 std::back_inserter(covariance),
48 [](const AmgVector(2) & cov) {
49 DriftCov_t toRet{};
50 toRet [0] = cov[0];
51 toRet [1] = cov[1];
52 return toRet;
53 });
54 setStripDriftErrors(covariance);
55}
57 return localPosition<1>()[0] * Amg::Vector3D::UnitX();
58}
59
60} // 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)
void setStripDriftErrors(const std::vector< DriftCov_t > &stripDriftErrors)
PosAccessor< 2 >::element_type DriftCov_t
returns the list of drift distances
std::uint8_t gasGap() const
Returns the gas gap number to which the clsuter.
MMCluster_v1()=default
Default constructor.
IdentifierHash layerHash() const override final
Returns the hash of the associated layer (Needed for surface retrieval).
::Muon::MMPrepData::Author Author
::Muon::MMPrepData::Quality Quality
IdentifierHash measurementHash() const override final
Returns the hash of the measurement channel.
Amg::Vector3D localMeasurementPos() const override final
Returns the local measurement position as 3-vector.
const std::vector< DriftCov_t > & stripDriftErrors() const
std::uint16_t channelNumber() const
returns the number of the central strip
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)
Type conversion of a symmetrix float vector to a vector with double precision.
setScaleOne setStatusOne setSaturated int16_t
setWord1 uint16_t