ATLAS Offline Software
Loading...
Searching...
No Matches
L1Muon::L1TGC::FloatingRdoDecoder Class Reference

#include <FloatingRdoDecoder.h>

Collaboration diagram for L1Muon::L1TGC::FloatingRdoDecoder:

Public Member Functions

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

Detailed Description

Definition at line 23 of file FloatingRdoDecoder.h.

Member Function Documentation

◆ decode()

StatusCode L1Muon::L1TGC::FloatingRdoDecoder::decode ( const TgcRdoContainer & rdos,
const Muon::TgcCablingMap & cabling,
const Muon::IMuonIdHelperSvc & idHelperSvc,
const MuonGM::MuonDetectorManager & detectorManager,
FloatingHitGroups & hitGroups,
FloatingDecodeStatistics & statistics ) const

Definition at line 58 of file FloatingRdoDecoder.cxx.

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