ATLAS Offline Software
MMCluster_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 #include "GaudiKernel/ServiceHandle.h"
13 #include "StoreGate/StoreGateSvc.h"
14 
15 namespace {
16  static const std::string preFixStr{"Mm_"};
17 }
18 
19 namespace xAOD {
22 }
25 }
27  if (!m_identifier.isValid()){
28  m_identifier.set(readoutElement()->measurementId(measurementHash()));
29  }
30  return (*m_identifier.ptr());
31 }
34 IMPLEMENT_SETTER_GETTER(MMCluster_v1, float, driftDist, setDriftDist)
36 IMPLEMENT_SETTER_GETTER(MMCluster_v1, float, chiSqProb, setChiSqProb)
38 IMPLEMENT_SETTER_GETTER(MMCluster_v1, uint16_t, channelNumber, setChannelNumber)
41 
42 IMPLEMENT_VECTOR_SETTER_GETTER(MMCluster_v1, uint16_t, stripNumbers, setStripNumbers)
43 IMPLEMENT_VECTOR_SETTER_GETTER(MMCluster_v1, int16_t, stripTimes, setStripTimes)
44 IMPLEMENT_VECTOR_SETTER_GETTER(MMCluster_v1, int, stripCharges, setStripCharges)
45 IMPLEMENT_VECTOR_SETTER_GETTER(MMCluster_v1, float, stripDriftDist, setStripDriftDist)
46 IMPLEMENT_VECTOR_SETTER_GETTER(MMCluster_v1, MMCluster_v1::DriftCov_t, stripDriftErrors, setStripDriftErrors)
47 
48 IMPLEMENT_READOUTELEMENT(MMCluster_v1, m_readoutEle, MmReadoutElement)
49 
50 void MMCluster_v1::setStripDriftErrors(const std::vector<AmgVector(2)>& stripDriftErrors) {
51  std::vector<DriftCov_t> covariance{};
52  std::transform(stripDriftErrors.begin(), stripDriftErrors.end(),
53  std::back_inserter(covariance),
54  [](const AmgVector(2) & cov) {
55  DriftCov_t toRet{};
56  toRet [0] = cov[0];
57  toRet [1] = cov[1];
58  return toRet;
59  });
60  setStripDriftErrors(covariance);
61 }
62 
63 } // namespace xAOD
xAOD::IMPLEMENT_SETTER_GETTER_WITH_CAST
IMPLEMENT_SETTER_GETTER_WITH_CAST(sTgcMeasurement_v1, uint8_t, sTgcMeasurement_v1::Author, author, setAuthor)
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
MuonGMR4::MmReadoutElement::createHash
static IdentifierHash createHash(const int gasGap, const int strip)
CxxUtils::CachedValue::ptr
const T * ptr() const
Return a pointer to the cached value.
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
xAOD::MMCluster_v1
Definition: MMCluster_v1.h:20
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::MMCluster_v1::gasGap
uint8_t gasGap() const
Returns the gas gap number to which the clsuter.
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
xAOD::MMCluster_v1::readoutElement
const MuonGMR4::MmReadoutElement * readoutElement() const
Retrieve the associated MmReadoutElement.
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
ParamDefs.h
xAOD::int16_t
setScaleOne setStatusOne setSaturated int16_t
Definition: gFexGlobalRoI_v1.cxx:55
IMPLEMENT_READOUTELEMENT
#define IMPLEMENT_READOUTELEMENT(CLASS_NAME, CACHED_VALUE, READOUT_ELEMENT_TYPE)
Macro to handle the readoutElement.
Definition: AccessorMacros.h:55
xAOD::AmgVector
AmgVector(N) toEigen(const ConstVectorMap< N > &xAODvec)
Definition: MeasurementDefs.h:96
xAOD::MMCluster_v1::layerHash
IdentifierHash layerHash() const
Returns the hash of the associated layer (Needed for surface retrieval)
Definition: MMCluster_v1.cxx:23
AccessorMacros.h
xAOD::MMCluster_v1::channelNumber
uint16_t channelNumber() const
returns the number of the central strip
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
xAOD::MMCluster_v1::m_identifier
CxxUtils::CachedValue< Identifier > m_identifier
Definition: MMCluster_v1.h:125
xAOD::MMCluster_v1::identify
const Identifier & identify() const
: Returns the Athena identifier of the micro mega cluster It's constructed from the measurementHash &...
Definition: MMCluster_v1.cxx:26
vector
Definition: MultiHisto.h:13
angle
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
Definition: TRTDetectorFactory_Full.cxx:73
xAOD::charge
charge
Definition: TrigElectron_v1.cxx:85
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
MuonDetectorManager.h
xAOD::MMCluster_v1::DriftCov_t
PosAccessor< 2 >::element_type DriftCov_t
returns the list of drift distances
Definition: MMCluster_v1.h:104
xAOD::MMCluster_v1::measurementHash
IdentifierHash measurementHash() const
Returns the hash of the measurement channel.
Definition: MMCluster_v1.cxx:20
CxxUtils::CachedValue::set
void set(const T &val) const
Set the value, assuming it is currently invalid.
Muon::MMPrepData::Author
Author
Definition: MMPrepData.h:156
xAOD::IMPLEMENT_VECTOR_SETTER_GETTER
IMPLEMENT_VECTOR_SETTER_GETTER(sTgcStripCluster_v1, uint16_t, stripNumbers, setStripNumbers)
Muon::MMPrepData::Quality
Quality
Definition: MMPrepData.h:164
CaloCondBlobAlgs_fillNoiseFromASCII.author
string author
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:26
IMPLEMENT_SETTER_GETTER
#define IMPLEMENT_SETTER_GETTER(DTYPE, GETTER, SETTER)
Definition: NRPCRDO_v1.cxx:13
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
MMCluster_v1.h
StoreGateSvc.h
MmReadoutElement.h
Identifier
Definition: IdentifierFieldParser.cxx:14