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

Build station-level channel segments from grouped TGC hits. More...

#include <TgcL0SegmentBuilder.h>

Collaboration diagram for L0Muon::TgcL0Floating::SegmentBuilder:

Public Member Functions

StatusCode build (const HitGroups &hitGroups, SegmentContainer &segments) const

Detailed Description

Build station-level channel segments from grouped TGC hits.

Definition at line 14 of file TgcL0SegmentBuilder.h.

Member Function Documentation

◆ build()

StatusCode L0Muon::TgcL0Floating::SegmentBuilder::build ( const HitGroups & hitGroups,
SegmentContainer & segments ) const

Definition at line 13 of file TgcL0SegmentBuilder.cxx.

14 {
15 segments.clear();
16 segments.reserve(hitGroups.size());
17
18 for (const auto& [key, hits] : hitGroups) {
19 if (hits.empty()) {
20 continue;
21 }
22
23 std::uint16_t firstChannel = std::numeric_limits<std::uint16_t>::max();
24 std::uint16_t lastChannel = 0;
25 for (const Hit& hit : hits) {
26 firstChannel = std::min(firstChannel, hit.channel);
27 lastChannel = std::max(lastChannel, hit.channel);
28 }
29
30 segments.emplace_back(key, firstChannel, lastChannel, hits.size());
31 }
32 return StatusCode::SUCCESS;
33}

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