ATLAS Offline Software
RpcMeasurement_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):
11 #include "GaudiKernel/ServiceHandle.h"
14 #include "StoreGate/StoreGateSvc.h"
15 
16 namespace {
17  static const std::string preFixStr{"Rpc_"};
18 }
19 
20 namespace xAOD {
21  IMPLEMENT_SETTER_GETTER(RpcMeasurement_v1, float, time, setTime)
22  IMPLEMENT_SETTER_GETTER(RpcMeasurement_v1, uint32_t, triggerInfo, setTriggerInfo)
23  IMPLEMENT_SETTER_GETTER(RpcMeasurement_v1, uint8_t, ambiguityFlag, setAmbiguityFlag)
24  IMPLEMENT_SETTER_GETTER(RpcMeasurement_v1, float, timeOverThreshold, setTimeOverThreshold)
25  IMPLEMENT_SETTER_GETTER(RpcMeasurement_v1, uint16_t, stripNumber, setStripNumber)
26  IMPLEMENT_SETTER_GETTER(RpcMeasurement_v1, uint8_t, gasGap, setGasGap)
27  IMPLEMENT_SETTER_GETTER(RpcMeasurement_v1, uint8_t, doubletPhi, setDoubletPhi)
28  IMPLEMENT_SETTER_GETTER(RpcMeasurement_v1, float, timeCovariance, setTimeCovariance)
29  IMPLEMENT_READOUTELEMENT(RpcMeasurement_v1, m_readoutEle, RpcReadoutElement)
30 
31  IdentifierHash RpcMeasurement_v1::measurementHash() const {
32  return MuonGMR4::RpcReadoutElement::createHash(stripNumber(),
33  gasGap(),
34  doubletPhi(),
35  measuresPhi());
36  }
39  }
41  if (!m_identifier.isValid()){
42  m_identifier.set(readoutElement()->measurementId(measurementHash()));
43  }
44  return (*m_identifier.ptr());
45  }
48  if(numDimensions() == 1) {
49  lPos[Trk::locX] = localPosition<1>()[Trk::locX];
50  } else {
51  lPos.block<2,1>(0,0) = xAOD::toEigen(localPosition<2>());
52  }
53  return lPos;
54  }
55 }
xAOD::RpcMeasurement_v1
RpcMeasurement_v1: Class storing the geneic.
Definition: RpcMeasurement_v1.h:21
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
xAOD::RpcMeasurement_v1::readoutElement
const MuonGMR4::RpcReadoutElement * readoutElement() const
Retrieve the associated RpcReadoutElement.
MuonGMR4::RpcReadoutElement::createHash
static IdentifierHash createHash(const unsigned strip, const unsigned gasGap, const unsigned doubPhi, const bool measPhi)
Constructs an Identifier hash from the Identifier fields controlled by this readout element
CxxUtils::CachedValue::ptr
const T * ptr() const
Return a pointer to the cached value.
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:558
Trk::locX
@ locX
Definition: ParamDefs.h:37
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
CxxUtils::CachedValue::isValid
bool isValid() const
Test to see if the value is valid.
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
ParamDefs.h
IMPLEMENT_READOUTELEMENT
#define IMPLEMENT_READOUTELEMENT(CLASS_NAME, CACHED_VALUE, READOUT_ELEMENT_TYPE)
Macro to handle the readoutElement.
Definition: AccessorMacros.h:55
xAOD::RpcMeasurement_v1::localMeasurementPos
Amg::Vector3D localMeasurementPos() const
Returns the local position of the measurement.
Definition: RpcMeasurement_v1.cxx:46
AccessorMacros.h
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
xAOD::RpcMeasurement_v1::measuresPhi
virtual uint8_t measuresPhi() const =0
returns whether the hit measures the phi coordinate
xAOD::RpcMeasurement_v1::layerHash
IdentifierHash layerHash() const
Returns the hash of the associated layer (Needed for surface retrieval)
Definition: RpcMeasurement_v1.cxx:37
MuonDetectorManager.h
xAOD::RpcMeasurement_v1::m_identifier
CxxUtils::CachedValue< Identifier > m_identifier
Definition: RpcMeasurement_v1.h:94
xAOD::RpcMeasurement_v1::measurementHash
IdentifierHash measurementHash() const
Returns the hash of the measurement channel.
Definition: RpcMeasurement_v1.cxx:31
xAOD::UncalibratedMeasurement_v1::numDimensions
virtual unsigned int numDimensions() const =0
Returns the number of dimensions of the measurement.
RpcMeasurement_v1.h
xAOD::RpcMeasurement_v1::gasGap
uint8_t gasGap() const
returns the associated gas gap
CxxUtils::CachedValue::set
void set(const T &val) const
Set the value, assuming it is currently invalid.
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
RpcReadoutElement.h
xAOD::RpcMeasurement_v1::doubletPhi
uint8_t doubletPhi() const
doubletPhi identifier field of the measurement
createCablingJSON.doubletPhi
int doubletPhi
Definition: createCablingJSON.py:16
IMPLEMENT_SETTER_GETTER
#define IMPLEMENT_SETTER_GETTER(DTYPE, GETTER, SETTER)
Definition: NRPCRDO_v1.cxx:13
timeOverThreshold
double timeOverThreshold(unsigned int m_word)
Definition: driftCircle.h:116
xAOD::RpcMeasurement_v1::identify
const Identifier & identify() const
: Returns the Athena identifier of the measurement It's constructed from the measurementHash which is...
Definition: RpcMeasurement_v1.cxx:40
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
StoreGateSvc.h
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
Identifier
Definition: IdentifierFieldParser.cxx:14