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 53 of file TgcL0RdoDecoder.cxx.

58 {
59 hitGroups.clear();
60 statistics = DecodeStatistics{};
61
62 // Run-3 RDO conversion is isolated here. Hits are routed immediately to the
63 // Phase-II side/Trigger-Sector/BC processing chain, as in the validated
64 // Floating simulation. Chamber identifiers remain hit provenance only.
65 for (const TgcRdo* rdo : rdos) {
66 for (const TgcRawData* rawData : *rdo) {
67 ++statistics.nRawData;
68 if (rawData->type() != TgcRawData::TYPE_HIT) continue;
69
70 Identifier identifier;
71 const bool mapped = cabling.getOfflineIDfromReadoutID(
72 identifier, rawData->subDetectorId(), rawData->rodId(),
73 rawData->sswId(), rawData->slbId(), rawData->channel());
74 if (!mapped) {
75 ++statistics.nMappingFailures;
76 continue;
77 }
78
79 const Station hitStation = station(identifier, idHelperSvc);
80 const bool hitIsStrip = idHelperSvc.tgcIdHelper().isStrip(identifier);
81 float eta = 0.F;
82 float phi = 0.F;
83 float r = 0.F;
84 float z = 0.F;
85 const MuonGM::TgcReadoutElement* readoutElement =
86 detectorManager.getTgcReadoutElement(identifier);
87 if (readoutElement != nullptr) {
88 const Amg::Vector3D globalPosition = readoutElement->channelPos(identifier);
89 eta = static_cast<float>(globalPosition.eta());
90 phi = static_cast<float>(globalPosition.phi());
91 r = static_cast<float>(globalPosition.perp());
92 z = static_cast<float>(globalPosition.z());
93 }
94 const std::uint16_t hitTriggerSector = triggerSector(phi);
95 if (hitTriggerSector == 0U) {
96 ++statistics.nMappingFailures;
97 continue;
98 }
99
100 const Hit hit{
101 .subDetectorId = rawData->subDetectorId(),
102 .triggerSector = hitTriggerSector,
103 .detectorSector = rawData->rodId(),
104 .bcTag = rawData->bcTag(),
105 .sswId = rawData->sswId(),
106 .slbId = rawData->slbId(),
107 .readoutChannel = rawData->channel(),
108 .stationEta = static_cast<std::int16_t>(
109 idHelperSvc.tgcIdHelper().stationEta(identifier)),
110 .stationPhi = static_cast<std::uint16_t>(
111 idHelperSvc.tgcIdHelper().stationPhi(identifier)),
112 .gasGap = static_cast<std::uint8_t>(
113 idHelperSvc.tgcIdHelper().gasGap(identifier)),
114 .channel = static_cast<std::uint16_t>(
115 idHelperSvc.tgcIdHelper().channel(identifier)),
116 .station = hitStation,
117 .isStrip = hitIsStrip,
118 .eta = eta,
119 .phi = phi,
120 .r = r,
121 .z = z,
122 };
123 const HitGroupKey key{.subDetectorId = hit.subDetectorId,
124 .triggerSector = hit.triggerSector,
125 .bcTag = hit.bcTag};
126 hitGroups[key].emplace_back(hit);
127
128 ++statistics.nHits;
129 if (hitIsStrip) ++statistics.nStripHits;
130 else ++statistics.nWireHits;
131 switch (hitStation) {
132 case Station::M1:
133 ++statistics.nM1Hits;
134 break;
135 case Station::M2:
136 ++statistics.nM2Hits;
137 break;
138 case Station::M3:
139 ++statistics.nM3Hits;
140 break;
141 case Station::Inner:
142 ++statistics.nInnerHits;
143 break;
144 default:
145 ++statistics.nUnknownStation;
146 break;
147 }
148 }
149 }
150 return StatusCode::SUCCESS;
151}
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: