ATLAS Offline Software
Classes | Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
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

Definition at line 59 of file NswSegmentFinderAlg.h.

◆ SeedStatistic_T

Definition at line 99 of file NswSegmentFinderAlg.h.

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 658 of file NswSegmentFinderAlg.cxx.

658  {
659  std::unique_lock guard{m_mutex};
660  SectorField key{};
661  key.chIdx = msSector->chamberIndex();
662  key.phi = msSector->stationPhi();
663  key.eta = msSector->chambers().front()->stationEta();
664  key.side = msSector->side();
665 
666  auto &entry = m_seedStat[key];
667  entry.nSeeds += seeds;
668  entry.nExtSeeds += extSeeds;
669  entry.nSegments += segments;
670 }

◆ printTableSeedStats()

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

Definition at line 672 of file NswSegmentFinderAlg.cxx.

672  {
673 
674 
675  msg<<MSG::ALWAYS<<"Seed statistics per sector:"<<endmsg;
676  msg<<MSG::ALWAYS<<"------------------------------------------------------------"<<endmsg;
677  msg<<MSG::ALWAYS<<"| Chamber | Phi | Eta | Side | Seeds | ExtSeeds | Segments |"<<endmsg;
678  msg<<MSG::ALWAYS<<"------------------------------------------------------------"<<endmsg;
679 
681 
682  for (const auto& entry : m_seedStat) {
683  const auto& sector = entry.first;
684  const auto& stats = entry.second;
685 
686 
687  msg<<MSG::ALWAYS << "| " << std::setw(3) << (sector.chIdx == ChIndex::EIL ? "EIL" :"EIS")
688  <<" | " << std::setw(2) << sector.phi
689  << " | " << std::setw(3) << sector.eta
690  << " | " << std::setw(4) << (sector.side > 0 ? "A" : "C")
691  << " | " << std::setw(7) << stats.nSeeds
692  << " | " << std::setw(8) << stats.nExtSeeds
693  << " | " << std::setw(8) << stats.nSegments
694  << " |"<<endmsg;
695 
696 
697  }
698 
699  msg<<MSG::ALWAYS<<"------------------------------------------------------------"<<endmsg;
700  }

Member Data Documentation

◆ m_mutex

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

Definition at line 102 of file NswSegmentFinderAlg.h.

◆ m_seedStat

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

Definition at line 100 of file NswSegmentFinderAlg.h.


The documentation for this class was generated from the following files:
MuonGMR4::SpectrometerSector::side
int8_t side() const
Returns the side of the MS-sector 1 -> A side ; -1 -> C side.
Definition: SpectrometerSector.cxx:57
MuonGMR4::SpectrometerSector::stationPhi
int stationPhi() const
: Returns the station phi of the sector
Definition: SpectrometerSector.cxx:63
MuonR4::NswSegmentFinderAlg::SeedStatistics::m_mutex
std::mutex m_mutex
Definition: NswSegmentFinderAlg.h:102
MuonGMR4::SpectrometerSector::chambers
const ChamberSet & chambers() const
Returns the associated chambers with this sector.
Definition: SpectrometerSector.cxx:71
MuonR4::NswSegmentFinderAlg::SeedStatistics::m_seedStat
SeedStatistic_T m_seedStat
Definition: NswSegmentFinderAlg.h:100
trigbs_dumpHLTContentInBS.stats
stats
Definition: trigbs_dumpHLTContentInBS.py:91
Muon::MuonStationIndex::ChIndex::EIL
@ EIL
MuonGMR4::SpectrometerSector::chamberIndex
Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index scheme.
Definition: SpectrometerSector.cxx:62
TrigConf::MSGTC::ALWAYS
@ ALWAYS
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:29
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37