ATLAS Offline Software
Loading...
Searching...
No Matches
CombinedMuonStrip_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// EDM include(s):
6
8
9#include "AthLinks/ElementLink.h"
11namespace {
13 static const SG::Accessor<Link_t> acc_primLink{"MuonStripLink1"};
14 static const SG::Accessor<Link_t> acc_secondLink{"MuonStripLink2"};
15
16}
17namespace xAOD {
19 if (const auto* prim = primaryStrip(); prim != nullptr) {
20 return prim->type();
21 }
22 if (const auto* second = secondaryStrip() ; second != nullptr) {
23 return second->type();
24 }
26 }
28 if (acc_primLink.isAvailable(*this) && acc_primLink(*this).isValid()) {
29 return *acc_primLink(*this);
30 }
31 return nullptr;
32 }
34
35 if (acc_secondLink.isAvailable(*this) && acc_secondLink(*this).isValid()) {
36 return *acc_secondLink(*this);
37 }
38 return nullptr;
39 }
40
42 assert(meas != nullptr);
43 const auto* cont = static_cast<const xAOD::UncalibratedMeasurementContainer*>(meas->container());
44 acc_primLink(*this) = Link_t{*cont, meas->index()};
45 }
47 assert(meas != nullptr);
48 const auto* cont = static_cast<const xAOD::UncalibratedMeasurementContainer*>(meas->container());
49 acc_secondLink(*this) = Link_t{*cont, meas->index()};
50 }
51}
Helper class to provide type-safe access to aux data.
const SG::AuxVectorData * container() const
Return the container holding this element.
size_t index() const
Return the index of this element within its container.
void setPrimaryStrip(const xAOD::UncalibratedMeasurement *meas)
Links a prd measurement as primary meaurement.
const xAOD::UncalibratedMeasurement * secondaryStrip() const
Returns the secondary associated measurement.
const xAOD::UncalibratedMeasurement * primaryStrip() const
Returns the primary associated measurement.
void setSecondaryStrip(const xAOD::UncalibratedMeasurement *meas)
Linkt a prd measurement as secondary measurement.
virtual xAOD::UncalibMeasType type() const override final
Returns the type of the measurement type as a simple enumeration.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
UncalibMeasType
Define the type of the uncalibrated measurement.
UncalibratedMeasurementContainer_v1 UncalibratedMeasurementContainer
Define the version of the uncalibrated measurement container.
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.