ATLAS Offline Software
Loading...
Searching...
No Matches
sTgcMeasurement_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
12#include "GaudiKernel/ServiceHandle.h"
15
16namespace {
17 static const std::string preFixStr{"sTgc"};
18}
19
20namespace xAOD {
21
23IMPLEMENT_SETTER_GETTER(sTgcMeasurement_v1, std::uint8_t, gasGap, setGasGap)
24IMPLEMENT_SETTER_GETTER(sTgcMeasurement_v1, std::uint16_t, channelNumber, setChannelNumber)
25IMPLEMENT_SETTER_GETTER(sTgcMeasurement_v1, short int, time, setTime)
27IMPLEMENT_READOUTELEMENT(sTgcMeasurement_v1, m_readoutEle, sTgcReadoutElement)
28
36 switch (channelType()) {
38 case Strip:
39 case Wire:
40 return localPosition<1>()[0] * Amg::Vector3D::Unit(channelType() == Wire);
41 case Pad:{
42 Amg::Vector3D locPos{localPosition<2>()[0], localPosition<2>()[1], 0.};
43 return locPos;
44 }
45 }
46 return Amg::Vector3D::Zero();
47}
48} // 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_SETTER_GETTER(DTYPE, GETTER, SETTER)
This is a "hash" representation of an Identifier.
static IdentifierHash createHash(const unsigned gasGap, const unsigned channelType, const unsigned channel, const unsigned wireInGrp=0)
Create a measurement hash from the Identifier fields.
Definition Pad.h:10
ConstVectorMap< N > localPosition() const
Returns the local position of the measurement.
IdentifierHash layerHash() const override final
Returns the hash of the associated gasGap layer.
IdentifierHash measurementHash() const override final
Returns the hash of the measurement channel w.r.t ReadoutElement.
std::uint16_t channelNumber() const
Channel number of the Measurement.
std::uint8_t gasGap() const
In which gasGap is the Measurement.
::Muon::sTgcPrepData::Author Author
Which algorithm produced the Measurement object.
sTgcMeasurement_v1()=default
Default constructor.
Amg::Vector3D localMeasurementPos() const override final
Returns the local measurement position as 3-vector.
virtual sTgcChannelTypes channelType() const =0
Returns the channel type of the measurement (Pad/Wire/Strip).
Eigen::Matrix< double, 3, 1 > Vector3D
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.