ATLAS Offline Software
Loading...
Searching...
No Matches
L0Muon::TgcL0Floating::RdoDecoder Class Reference

#include <TgcL0RdoDecoder.h>

Collaboration diagram for L0Muon::TgcL0Floating::RdoDecoder:

Public Member Functions

StatusCode decode (const TgcRdoContainer &rdos, const Muon::TgcCablingMap &cabling, const Muon::IMuonIdHelperSvc &idHelperSvc, const MuonGM::MuonDetectorManager &detectorManager, HitGroups &hitGroups, DecodeStatistics &statistics) const

Detailed Description

Definition at line 24 of file TgcL0RdoDecoder.h.

Member Function Documentation

◆ decode()

StatusCode L0Muon::TgcL0Floating::RdoDecoder::decode ( const TgcRdoContainer & rdos,
const Muon::TgcCablingMap & cabling,
const Muon::IMuonIdHelperSvc & idHelperSvc,
const MuonGM::MuonDetectorManager & detectorManager,
HitGroups & hitGroups,
DecodeStatistics & statistics ) const

Definition at line 59 of file TgcL0RdoDecoder.cxx.

64 {
65 hitGroups.clear();
66 statistics = DecodeStatistics{};
67
68 // Run-3 RDO conversion is isolated here. Hits are routed immediately to the
69 // Phase-II side/Trigger-Sector/BC processing chain, as in the validated
70 // Floating simulation. Chamber identifiers remain hit provenance only.
71 for (const TgcRdo* rdo : rdos) {
72 for (const TgcRawData* rawData : *rdo) {
73 ++statistics.nRawData;
74 if (rawData->type() != TgcRawData::TYPE_HIT) continue;
75
76 Identifier identifier;
77 const bool mapped = cabling.getOfflineIDfromReadoutID(
78 identifier, rawData->subDetectorId(), rawData->rodId(),
79 rawData->sswId(), rawData->slbId(), rawData->channel());
80 if (!mapped) {
81 ++statistics.nMappingFailures;
82 continue;
83 }
84
85 const Station hitStation = station(identifier, idHelperSvc);
86 const bool hitIsStrip = idHelperSvc.tgcIdHelper().isStrip(identifier);
87 float eta = 0.F;
88 float phi = 0.F;
89 float r = 0.F;
90 float z = 0.F;
91 const MuonGM::TgcReadoutElement* readoutElement =
92 detectorManager.getTgcReadoutElement(identifier);
93 if (readoutElement != nullptr) {
94 const Amg::Vector3D globalPosition = readoutElement->channelPos(identifier);
95 eta = static_cast<float>(globalPosition.eta());
96 phi = static_cast<float>(globalPosition.phi());
97 r = static_cast<float>(globalPosition.perp());
98 z = static_cast<float>(globalPosition.z());
99 }
100 const std::uint16_t hitTriggerSector = triggerSector(phi);
101 if (hitTriggerSector == 0U) {
102 ++statistics.nMappingFailures;
103 continue;
104 }
105
106 const Hit hit{
107 .subDetectorId = rawData->subDetectorId(),
108 .triggerSector = hitTriggerSector,
109 .detectorSector = rawData->rodId(),
110 .bcTag = rawData->bcTag(),
111 .sswId = rawData->sswId(),
112 .slbId = rawData->slbId(),
113 .readoutChannel = rawData->channel(),
114 .stationEta = static_cast<std::int16_t>(
115 idHelperSvc.tgcIdHelper().stationEta(identifier)),
116 .stationPhi = static_cast<std::uint16_t>(
117 idHelperSvc.tgcIdHelper().stationPhi(identifier)),
118 .gasGap = static_cast<std::uint8_t>(
119 idHelperSvc.tgcIdHelper().gasGap(identifier)),
120 .channel = static_cast<std::uint16_t>(
121 idHelperSvc.tgcIdHelper().channel(identifier)),
122 .station = hitStation,
123 .isStrip = hitIsStrip,
124 .eta = eta,
125 .phi = phi,
126 .r = r,
127 .z = z,
128 };
129 const HitGroupKey key{.subDetectorId = hit.subDetectorId,
130 .triggerSector = hit.triggerSector,
131 .bcTag = hit.bcTag};
132 hitGroups[key].emplace_back(hit);
133
134 ++statistics.nHits;
135 if (hitIsStrip) ++statistics.nStripHits;
136 else ++statistics.nWireHits;
137 switch (hitStation) {
138 case Station::M1:
139 ++statistics.nM1Hits;
140 break;
141 case Station::M2:
142 ++statistics.nM2Hits;
143 break;
144 case Station::M3:
145 ++statistics.nM3Hits;
146 break;
147 case Station::Inner:
148 ++statistics.nInnerHits;
149 break;
150 default:
151 ++statistics.nUnknownStation;
152 break;
153 }
154 }
155 }
156 return StatusCode::SUCCESS;
157}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
bool hit(const Container &ids, int pdgId)
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current TgcRawData
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Old TgcRdo
#define z
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Amg::Vector3D channelPos(const Identifier &id) const
Returns the position of the active channel (wireGang or strip).
virtual const TgcIdHelper & tgcIdHelper() const =0
access to TgcIdHelper
int isStrip(const Identifier &id) const
isStrip corresponds to measuresPhi
int r
Definition globals.cxx:22
std::vector< std::string > mapped
Definition hcg.cxx:56
Eigen::Matrix< double, 3, 1 > Vector3D
constexpr uint8_t stationPhi
station Phi 1 to 8

The documentation for this class was generated from the following files: