ATLAS Offline Software
Loading...
Searching...
No Matches
MuonR4::NswSegmentFinderAlg::SeedStatistics Class Reference

Seed statistics per sector to be printed in the end. More...

Collaboration diagram for MuonR4::NswSegmentFinderAlg::SeedStatistics:

Classes

struct  SectorField
 sector's field to dump the seed statistics More...
struct  SeedField

Public Types

using chIdx_t = Muon::MuonStationIndex::ChIndex

Public Member Functions

 SeedStatistics ()=default
void addToStat (const MuonGMR4::SpectrometerSector *msSector, unsigned int nSeeds, unsigned int nExtSeeds, unsigned int nSegments)
void printTableSeedStats (MsgStream &msg) const

Private Types

using SeedStatistic_T = std::map<SectorField, SeedField>

Private Attributes

SeedStatistic_T m_seedStat {}
std::mutex m_mutex {}

Detailed Description

Seed statistics per sector to be printed in the end.

Definition at line 55 of file NswSegmentFinderAlg.h.

Member Typedef Documentation

◆ chIdx_t

◆ SeedStatistic_T

Constructor & Destructor Documentation

◆ SeedStatistics()

MuonR4::NswSegmentFinderAlg::SeedStatistics::SeedStatistics ( )
default

Member Function Documentation

◆ addToStat()

void MuonR4::NswSegmentFinderAlg::SeedStatistics::addToStat ( const MuonGMR4::SpectrometerSector * msSector,
unsigned int nSeeds,
unsigned int nExtSeeds,
unsigned int nSegments )

Definition at line 692 of file NswSegmentFinderAlg.cxx.

692 {
693 std::unique_lock guard{m_mutex};
695 key.chIdx = msSector->chamberIndex();
696 key.phi = msSector->stationPhi();
697 key.eta = msSector->chambers().front()->stationEta();
698
699 auto &entry = m_seedStat[key];
700 entry.nSeeds += seeds;
701 entry.nExtSeeds += extSeeds;
702 entry.nSegments += segments;
703}
const ChamberSet & chambers() const
Returns the associated chambers with this sector.
int stationPhi() const
: Returns the station phi of the sector
Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index scheme.

◆ printTableSeedStats()

void MuonR4::NswSegmentFinderAlg::SeedStatistics::printTableSeedStats ( MsgStream & msg) const

Definition at line 705 of file NswSegmentFinderAlg.cxx.

705 {
706
707
708 msg<<MSG::ALWAYS<<"Seed statistics per sector:"<<endmsg;
709 msg<<MSG::ALWAYS<<"-----------------------------------------------------"<<endmsg;
710 msg<<MSG::ALWAYS<<"| Chamber | Phi | Eta | Seeds | ExtSeeds | Segments |"<<endmsg;
711 msg<<MSG::ALWAYS<<"-----------------------------------------------------"<<endmsg;
712
714
715 for (const auto& entry : m_seedStat) {
716 const auto& sector = entry.first;
717 const auto& stats = entry.second;
718
719
720 msg<<MSG::ALWAYS << "| " << std::setw(3) << (sector.chIdx == ChIndex::EIL ? "EIL" :"EIS")
721 <<" | " << std::setw(2) << sector.phi
722 << " | " << std::setw(3) << sector.eta
723 << " | " << std::setw(7) << stats.nSeeds
724 << " | " << std::setw(8) << stats.nExtSeeds
725 << " | " << std::setw(8) << stats.nSegments
726 << " |"<<endmsg;
727
728
729 }
730
731 msg<<MSG::ALWAYS<<"------------------------------------------------------------"<<endmsg;
732 }
#define endmsg
ChIndex
enum to classify the different chamber layers in the muon spectrometer

Member Data Documentation

◆ m_mutex

std::mutex MuonR4::NswSegmentFinderAlg::SeedStatistics::m_mutex {}
private

Definition at line 101 of file NswSegmentFinderAlg.h.

101{};

◆ m_seedStat

SeedStatistic_T MuonR4::NswSegmentFinderAlg::SeedStatistics::m_seedStat {}
private

Definition at line 99 of file NswSegmentFinderAlg.h.

99{};

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