ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
MuonVal::MuonSDOAnalysis::HistoSet Struct Reference

Histograms per station index. More...

Collaboration diagram for MuonVal::MuonSDOAnalysis::HistoSet:

Public Member Functions

 HistoSet ()=default
 Default constructor. More...
 
 HistoSet (const Muon::IMuonIdHelperSvc *idHelperSvc, const ServiceHandle< ITHistSvc > &histSvc, const std::string &basePath, const TechIdx_t techIdx, const int stIdent)
 Constructor instantiating the monitoring histograms. More...
 

Public Attributes

int identifier {-1}
 Identifier (Either the stationIndex (Mdt/Rpc) or stationName (Tgc/Mm/sTgc)) More...
 
TH1 * h_pdgId {nullptr}
 pdgId of the hit More...
 
TH1 * h_stationPhi {nullptr}
 Station phi of the hit
More...
 
TH1 * h_stationEta {nullptr}
 Station eta of the hit. More...
 
TH1 * h_sdoWord {nullptr}
 Encoded data word of the SDO. More...
 
TH1 * h_xyPos {nullptr}
 Position in the x-y plane. More...
 
TH1 * h_rzPos {nullptr}
 Position in the r-z plane. More...
 
TH1 * h_eventIndex {nullptr}
 Index of the underlying event collection. More...
 
TH1 * h_radius {nullptr}
 
TH1 * h_localZ {nullptr}
 

Detailed Description

Histograms per station index.

Definition at line 39 of file MuonSDOAnalysis.h.

Constructor & Destructor Documentation

◆ HistoSet() [1/2]

MuonVal::MuonSDOAnalysis::HistoSet::HistoSet ( )
default

Default constructor.

◆ HistoSet() [2/2]

MuonVal::MuonSDOAnalysis::HistoSet::HistoSet ( const Muon::IMuonIdHelperSvc idHelperSvc,
const ServiceHandle< ITHistSvc > &  histSvc,
const std::string &  basePath,
const TechIdx_t  techIdx,
const int  stIdent 
)

Constructor instantiating the monitoring histograms.

Parameters
histSvcReference to the histSvc to register the histograms with the file
basePathBasic path for all histograms
stIdxStation index to consider for the histogram set

Helper struct to define histograms spectrometer region

Parameters
idHelperSvcPointer to the idHelperSvc
histSvcReference to the THistSvc piping the histograms
basePathBase path of the histogram
techIdxTechnology index of the histograms to plot
stIdentStation identifier (stationName or stIndex)

Definition at line 17 of file MuonSDOAnalysis.cxx.

21  :
22  identifier{stIdent}{
23 
24  auto registerHisto = [&](TH1* h) {
25  h->Sumw2();
26  h->StatOverflows();
27  std::string stName = "Inclusive";
28  if (stIdent >= 0) {
29  switch (techIdx) {
30  case TechIdx_t::MDT:
31  case TechIdx_t::RPC: {
33  break;
34  } case TechIdx_t::TGC: {
35  stName = idHelperSvc->tgcIdHelper().stationNameString(stIdent);
36  break;
37  } case TechIdx_t::STGC: {
38  stName = idHelperSvc->stgcIdHelper().stationNameString(stIdent);
39  break;
40  } case TechIdx_t::MM: {
41  stName = idHelperSvc->mmIdHelper().stationNameString(stIdent);
42  break;
43  } default:
44  break;
45  }
46  }
47  const std::string histPath = std::format("/{}/Station_{}/{}",
48  basePath, stName, h->GetName());
49  histSvc->regHist(histPath, h).ignore();
50  return h;
51  };
52 
53  h_sdoWord = registerHisto(new TH1F("sdoWord", "sdoWord", 100, 0, 10));
54  h_eventIndex = registerHisto(new TH1F("eventIndex", "Event index (SDO)", 100, 0, 1000));
55 
56  switch (techIdx) {
57  case TechIdx_t::TGC: {
58  h_stationPhi = registerHisto(new TH1F("stationPhi", "StationPhi;stationPhi",48, 0.5, 48.5));
59  h_stationEta = registerHisto(new TH1F("stationEta", "StationEta;stationEta",11, -5.5, 5.5));
60  constexpr double r = 12. * Gaudi::Units::m;
61  constexpr double z = 14 * Gaudi::Units::m;
62  h_xyPos = registerHisto(new TH2F("hitXY", "hitXY;x [mm]; y[mm];entries", 240, -r,r, 240,-r,r));
63  h_rzPos = registerHisto(new TH2F("hitRZ", "hitRz;r [mm]; z[mm];entries", 1200, 0, r, 2200,-z,z));
64  break;
65  } case TechIdx_t::RPC: {
66  h_stationPhi = registerHisto(new TH1F("stationPhi", "StationPhi;stationPhi",8, 0.5, 8.5));
67  h_stationEta = registerHisto(new TH1F("stationEta", "StationEta;stationEta",17, -8.5, 8.5));
68  constexpr double r = 12. * Gaudi::Units::m;
69  constexpr double z = 12 * Gaudi::Units::m;
70  h_xyPos = registerHisto(new TH2F("hitXY", "hitXY;x [mm]; y[mm];entries", 240, -r,r, 240,-r,r));
71  h_rzPos = registerHisto(new TH2F("hitRZ", "hitRz;r [mm]; z[mm];entries", 1200, 0, r, 600,-z,z));
72 
73  break;
74  } case TechIdx_t::MDT: {
75  h_stationPhi = registerHisto(new TH1F("stationPhi", "StationPhi;stationPhi",8, 0.5, 8.5));
76  h_stationEta = registerHisto(new TH1F("stationEta", "StationEta;stationEta",17, -8.5, 8.5));
77  constexpr double r = 12. * Gaudi::Units::m;
78  constexpr double z = 22 * Gaudi::Units::m;
79  h_xyPos = registerHisto(new TH2F("hitXY", "hitXY;x [mm]; y[mm];entries", 2400, -r,r, 2400,-r,r));
80  h_rzPos = registerHisto(new TH2F("hitRZ", "hitRz;r [mm]; z[mm];entries", 1200, 0, r, 2200,-z,z));
81 
82  break;
83  } case TechIdx_t::MM: {
84  h_stationPhi = registerHisto(new TH1F("stationPhi", "StationPhi;stationPhi",8, 0.5, 8.5));
85  h_stationEta = registerHisto(new TH1F("stationEta", "StationEta;stationEta",5, -2.5, 2.5));
86  constexpr double r = 5 * Gaudi::Units::m;
87  constexpr double z = 8. *Gaudi::Units::m;
88  h_xyPos = registerHisto(new TH2F("hitXY", "hitXY;x [mm]; y[mm];entries", 1000, -r,r, 1000,-r,r));
89  h_rzPos = registerHisto(new TH2F("hitRZ", "hitRz;r [mm]; z[mm];entries", 500, 0, r, 160, -z, z));
90 
91  break;
92  } case TechIdx_t::STGC: {
93  h_stationPhi = registerHisto(new TH1F("stationPhi", "StationPhi;stationPhi",8, 0.5, 8.5));
94  h_stationEta = registerHisto(new TH1F("stationEta", "StationEta;stationEta",7, -3.5, 3.5));
95  constexpr double r = 5 * Gaudi::Units::m;
96  constexpr double z = 8. *Gaudi::Units::m;
97  h_xyPos = registerHisto(new TH2F("hitXY", "hitXY;x [mm]; y[mm];entries", 1000, -r,r, 1000,-r,r));
98  h_rzPos = registerHisto(new TH2F("hitRZ", "hitRz;r [mm]; z[mm];entries", 500, 0, r, 160, -z, z));
99  break;
100  } default:
101  break;
102  }
103 
104  h_radius = registerHisto(new TH1F("h_radius", "Radius (SDO)", 100, -15, 15));
105  h_localZ = registerHisto(new TH1F("h_localZ", "Local z-position (SDO)", 100, -3200, 3200));
106  }

Member Data Documentation

◆ h_eventIndex

TH1* MuonVal::MuonSDOAnalysis::HistoSet::h_eventIndex {nullptr}

Index of the underlying event collection.

Definition at line 73 of file MuonSDOAnalysis.h.

◆ h_localZ

TH1* MuonVal::MuonSDOAnalysis::HistoSet::h_localZ {nullptr}

Definition at line 76 of file MuonSDOAnalysis.h.

◆ h_pdgId

TH1* MuonVal::MuonSDOAnalysis::HistoSet::h_pdgId {nullptr}

pdgId of the hit

Definition at line 61 of file MuonSDOAnalysis.h.

◆ h_radius

TH1* MuonVal::MuonSDOAnalysis::HistoSet::h_radius {nullptr}

Definition at line 75 of file MuonSDOAnalysis.h.

◆ h_rzPos

TH1* MuonVal::MuonSDOAnalysis::HistoSet::h_rzPos {nullptr}

Position in the r-z plane.

Definition at line 71 of file MuonSDOAnalysis.h.

◆ h_sdoWord

TH1* MuonVal::MuonSDOAnalysis::HistoSet::h_sdoWord {nullptr}

Encoded data word of the SDO.

Definition at line 67 of file MuonSDOAnalysis.h.

◆ h_stationEta

TH1* MuonVal::MuonSDOAnalysis::HistoSet::h_stationEta {nullptr}

Station eta of the hit.

Definition at line 65 of file MuonSDOAnalysis.h.

◆ h_stationPhi

TH1* MuonVal::MuonSDOAnalysis::HistoSet::h_stationPhi {nullptr}

Station phi of the hit

Definition at line 63 of file MuonSDOAnalysis.h.

◆ h_xyPos

TH1* MuonVal::MuonSDOAnalysis::HistoSet::h_xyPos {nullptr}

Position in the x-y plane.

Definition at line 69 of file MuonSDOAnalysis.h.

◆ identifier

int MuonVal::MuonSDOAnalysis::HistoSet::identifier {-1}

Identifier (Either the stationIndex (Mdt/Rpc) or stationName (Tgc/Mm/sTgc))

Definition at line 59 of file MuonSDOAnalysis.h.


The documentation for this struct was generated from the following files:
AthHistogramAlgorithm::histSvc
const ServiceHandle< ITHistSvc > & histSvc() const
The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a...
Definition: AthHistogramAlgorithm.h:113
beamspotman.r
def r
Definition: beamspotman.py:672
Muon::IMuonIdHelperSvc::stgcIdHelper
virtual const sTgcIdHelper & stgcIdHelper() const =0
access to TgcIdHelper
vtune_athena.format
format
Definition: vtune_athena.py:14
MuonVal::MuonSDOAnalysis::HistoSet::h_stationPhi
TH1 * h_stationPhi
Station phi of the hit
Definition: MuonSDOAnalysis.h:63
Muon::MuonStationIndex::TechnologyIndex::RPC
@ RPC
Muon::MuonStationIndex::stName
const std::string & stName(StIndex index)
convert StIndex into a string
Definition: MuonStationIndex.cxx:104
MuonVal::MuonSDOAnalysis::HistoSet::h_stationEta
TH1 * h_stationEta
Station eta of the hit.
Definition: MuonSDOAnalysis.h:65
Muon::IMuonIdHelperSvc::mmIdHelper
virtual const MmIdHelper & mmIdHelper() const =0
access to CscIdHelper
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
Muon::MuonStationIndex::TechnologyIndex::MDT
@ MDT
MuonVal::MuonSDOAnalysis::HistoSet::h_xyPos
TH1 * h_xyPos
Position in the x-y plane.
Definition: MuonSDOAnalysis.h:69
Muon::MuonStationIndex::TechnologyIndex::MM
@ MM
MuonVal::MuonSDOAnalysis::HistoSet::h_localZ
TH1 * h_localZ
Definition: MuonSDOAnalysis.h:76
Muon::MuonStationIndex::TechnologyIndex::TGC
@ TGC
z
#define z
h
extractSporadic.h
list h
Definition: extractSporadic.py:96
MuonVal::MuonSDOAnalysis::HistoSet::identifier
int identifier
Identifier (Either the stationIndex (Mdt/Rpc) or stationName (Tgc/Mm/sTgc))
Definition: MuonSDOAnalysis.h:59
MuonVal::MuonSDOAnalysis::HistoSet::h_radius
TH1 * h_radius
Definition: MuonSDOAnalysis.h:75
MuonIdHelper::stationNameString
const std::string & stationNameString(const int &index) const
Definition: MuonIdHelper.cxx:860
Muon::IMuonIdHelperSvc::tgcIdHelper
virtual const TgcIdHelper & tgcIdHelper() const =0
access to TgcIdHelper
MuonVal::MuonSDOAnalysis::HistoSet::h_eventIndex
TH1 * h_eventIndex
Index of the underlying event collection.
Definition: MuonSDOAnalysis.h:73
MuonVal::MuonSDOAnalysis::StIdx_t
Muon::MuonStationIndex::StIndex StIdx_t
Definition: MuonSDOAnalysis.h:33
MuonVal::MuonSDOAnalysis::HistoSet::h_sdoWord
TH1 * h_sdoWord
Encoded data word of the SDO.
Definition: MuonSDOAnalysis.h:67
Muon::MuonStationIndex::TechnologyIndex::STGC
@ STGC
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
python.SystemOfUnits.m
float m
Definition: SystemOfUnits.py:106
MuonVal::MuonSDOAnalysis::HistoSet::h_rzPos
TH1 * h_rzPos
Position in the r-z plane.
Definition: MuonSDOAnalysis.h:71