ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonPhaseII
Event
xAOD
xAODMuonPrepData
Root
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):
6
#include "
xAODMuonPrepData/versions/AccessorMacros.h
"
7
// Local include(s):
8
#include "
TrkEventPrimitives/ParamDefs.h
"
9
#include "
xAODMuonPrepData/versions/sTgcMeasurement_v1.h
"
10
11
#include "
MuonReadoutGeometryR4/sTgcReadoutElement.h
"
12
#include "GaudiKernel/ServiceHandle.h"
13
#include "
MuonReadoutGeometryR4/MuonDetectorManager.h
"
14
#include "
StoreGate/StoreGateSvc.h
"
15
16
namespace
{
17
static
const
std::string preFixStr{
"sTgc"
};
18
}
19
20
namespace
xAOD
{
21
22
IMPLEMENT_SETTER_GETTER_WITH_CAST
(
sTgcMeasurement_v1
, std::uint8_t,
sTgcMeasurement_v1::Author
, author, setAuthor);
23
IMPLEMENT_SETTER_GETTER
(
sTgcMeasurement_v1
, std::uint8_t, gasGap, setGasGap)
24
IMPLEMENT_SETTER_GETTER
(
sTgcMeasurement_v1
, std::uint16_t, channelNumber, setChannelNumber)
25
IMPLEMENT_SETTER_GETTER
(
sTgcMeasurement_v1
,
short
int
, time, setTime)
26
IMPLEMENT_SETTER_GETTER
(
sTgcMeasurement_v1
,
int
,
charge
, setCharge)
27
IMPLEMENT_READOUTELEMENT
(
sTgcMeasurement_v1
, m_readoutEle, sTgcReadoutElement)
28
29
IdentifierHash
sTgcMeasurement_v1
::
measurementHash
()
const
{
30
return
MuonGMR4::sTgcReadoutElement::createHash
(
gasGap
(),
channelType
(),
channelNumber
());
31
}
32
IdentifierHash
sTgcMeasurement_v1::layerHash
()
const
{
33
return
MuonGMR4::sTgcReadoutElement::createHash
(
gasGap
(),
sTgcIdHelper::sTgcChannelTypes::Strip
, 0);
34
}
35
Amg::Vector3D
sTgcMeasurement_v1::localMeasurementPos
()
const
{
36
switch
(
channelType
()) {
37
using
enum
sTgcIdHelper::sTgcChannelTypes
;
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
AccessorMacros.h
IMPLEMENT_SETTER_GETTER_WITH_CAST
#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...
Definition
AccessorMacros.h:24
IMPLEMENT_READOUTELEMENT
#define IMPLEMENT_READOUTELEMENT(CLASS_NAME, CACHED_VALUE, READOUT_ELEMENT_TYPE)
Macro to handle the readoutElement.
Definition
AccessorMacros.h:55
MuonDetectorManager.h
sTgcReadoutElement.h
IMPLEMENT_SETTER_GETTER
#define IMPLEMENT_SETTER_GETTER(DTYPE, GETTER, SETTER)
Definition
NRPCRDO_v1.cxx:13
ParamDefs.h
StoreGateSvc.h
IdentifierHash
This is a "hash" representation of an Identifier.
Definition
IdentifierHash.h:25
MuonGMR4::sTgcReadoutElement::createHash
static IdentifierHash createHash(const unsigned gasGap, const unsigned channelType, const unsigned channel, const unsigned wireInGrp=0)
Create a measurement hash from the Identifier fields.
Pad
Definition
Pad.h:10
sTgcIdHelper::sTgcChannelTypes
sTgcChannelTypes
Definition
sTgcIdHelper.h:190
sTgcIdHelper::Strip
@ Strip
Definition
sTgcIdHelper.h:190
xAOD::UncalibratedMeasurement_v1::localPosition
ConstVectorMap< N > localPosition() const
Returns the local position of the measurement.
xAOD::sTgcMeasurement_v1
Definition
sTgcMeasurement_v1.h:20
xAOD::sTgcMeasurement_v1::layerHash
IdentifierHash layerHash() const override final
Returns the hash of the associated gasGap layer.
Definition
sTgcMeasurement_v1.cxx:32
xAOD::sTgcMeasurement_v1::measurementHash
IdentifierHash measurementHash() const override final
Returns the hash of the measurement channel w.r.t ReadoutElement.
Definition
sTgcMeasurement_v1.cxx:29
xAOD::sTgcMeasurement_v1::channelNumber
std::uint16_t channelNumber() const
Channel number of the Measurement.
xAOD::sTgcMeasurement_v1::gasGap
std::uint8_t gasGap() const
In which gasGap is the Measurement.
xAOD::sTgcMeasurement_v1::Author
::Muon::sTgcPrepData::Author Author
Which algorithm produced the Measurement object.
Definition
sTgcMeasurement_v1.h:48
xAOD::sTgcMeasurement_v1::sTgcMeasurement_v1
sTgcMeasurement_v1()=default
Default constructor.
xAOD::sTgcMeasurement_v1::localMeasurementPos
Amg::Vector3D localMeasurementPos() const override final
Returns the local measurement position as 3-vector.
Definition
sTgcMeasurement_v1.cxx:35
xAOD::sTgcMeasurement_v1::channelType
virtual sTgcChannelTypes channelType() const =0
Returns the channel type of the measurement (Pad/Wire/Strip).
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
xAOD::charge
charge
Definition
TrigElectron_v1.cxx:85
sTgcMeasurement_v1.h
Generated on
for ATLAS Offline Software by
1.17.0