ATLAS Offline Software
Loading...
Searching...
No Matches
sTgcMeasurement_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
12#include "GaudiKernel/ServiceHandle.h"
15
16namespace {
17 static const std::string preFixStr{"sTgc"};
18}
19
20namespace xAOD {
21
24IMPLEMENT_SETTER_GETTER(sTgcMeasurement_v1, uint16_t, channelNumber, setChannelNumber)
25IMPLEMENT_SETTER_GETTER(sTgcMeasurement_v1, short int, time, setTime)
27IMPLEMENT_READOUTELEMENT(sTgcMeasurement_v1, m_readoutEle, sTgcReadoutElement)
28
33 if (!m_identifier.isValid()){
34 m_identifier.set(readoutElement()->measurementId(measurementHash()));
35 }
36 return (*m_identifier.ptr());
37}
42 switch (channelType()) {
44 case Strip:
45 case Wire:
46 return localPosition<1>()[0] * Amg::Vector3D::UnitX();
47 case Pad:{
48 Amg::Vector3D locPos{localPosition<2>()[0], localPosition<2>()[1], 0.};
49 return locPos;
50 }
51 }
52 return Amg::Vector3D::Zero();
53}
54} // 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 int gasGap, const unsigned int channelType, const unsigned int channel, const unsigned int 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.
CxxUtils::CachedValue< Identifier > m_identifier
IdentifierHash measurementHash() const
Returns the hash of the measurement channel w.r.t ReadoutElement.
const Identifier & identify() const
: Returns the Athena identifier of the measurement It's constructed from the measurementHash & passed...
uint16_t channelNumber() const
Channel number of the Measurement.
Amg::Vector3D localMeasurementPos() const
Returns the local measurement position as 3-vector.
uint8_t gasGap() const
In which gasGap is the Measurement.
IdentifierHash layerHash() const
Returns the hash of the associated gasGap layer.
::Muon::sTgcPrepData::Author Author
Which algorithm produced the Measurement object.
sTgcMeasurement_v1()=default
Default constructor.
const MuonGMR4::sTgcReadoutElement * readoutElement() const
Retrieve the associated sTgcReadoutElement.
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.
setWord1 uint16_t