ATLAS Offline Software
Loading...
Searching...
No Matches
MuonVal::MuonSDOAnalysis::HistoSet Struct Reference

Histograms per station index. More...

Collaboration diagram for MuonVal::MuonSDOAnalysis::HistoSet:

Public Member Functions

 HistoSet ()=default
 Default constructor.
 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.

Public Attributes

int identifier {-1}
 Identifier (Either the stationIndex (Mdt/Rpc) or stationName (Tgc/Mm/sTgc))
TH1 * h_pdgId {nullptr}
 pdgId of the hit
TH1 * h_stationPhi {nullptr}
 Station phi of the hit.
TH1 * h_stationEta {nullptr}
 Station eta of the hit.
TH1 * h_sdoWord {nullptr}
 Encoded data word of the SDO.
TH1 * h_xyPos {nullptr}
 Position in the x-y plane.
TH1 * h_rzPos {nullptr}
 Position in the r-z plane.
TH1 * h_eventIndex {nullptr}
 Index of the underlying event collection.
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 }
#define z
const ServiceHandle< ITHistSvc > & histSvc() const
The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a...
const std::string & stationNameString(const int &index) const
Muon::MuonStationIndex::StIndex StIdx_t
virtual const MmIdHelper & mmIdHelper() const =0
access to CscIdHelper
virtual const sTgcIdHelper & stgcIdHelper() const =0
access to TgcIdHelper
virtual const TgcIdHelper & tgcIdHelper() const =0
access to TgcIdHelper
int r
Definition globals.cxx:22
const std::string & stName(StIndex index)
convert StIndex into a string
TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
int identifier
Identifier (Either the stationIndex (Mdt/Rpc) or stationName (Tgc/Mm/sTgc))
TH1 * h_rzPos
Position in the r-z plane.
TH1 * h_sdoWord
Encoded data word of the SDO.
TH1 * h_stationEta
Station eta of the hit.
TH1 * h_eventIndex
Index of the underlying event collection.
TH1 * h_xyPos
Position in the x-y plane.
TH1 * h_stationPhi
Station phi of the hit.

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.

73{nullptr};

◆ h_localZ

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

Definition at line 76 of file MuonSDOAnalysis.h.

76{nullptr};

◆ h_pdgId

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

pdgId of the hit

Definition at line 61 of file MuonSDOAnalysis.h.

61{nullptr};

◆ h_radius

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

Definition at line 75 of file MuonSDOAnalysis.h.

75{nullptr};

◆ h_rzPos

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

Position in the r-z plane.

Definition at line 71 of file MuonSDOAnalysis.h.

71{nullptr};

◆ h_sdoWord

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

Encoded data word of the SDO.

Definition at line 67 of file MuonSDOAnalysis.h.

67{nullptr};

◆ h_stationEta

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

Station eta of the hit.

Definition at line 65 of file MuonSDOAnalysis.h.

65{nullptr};

◆ h_stationPhi

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

Station phi of the hit.

Definition at line 63 of file MuonSDOAnalysis.h.

63{nullptr};

◆ h_xyPos

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

Position in the x-y plane.

Definition at line 69 of file MuonSDOAnalysis.h.

69{nullptr};

◆ 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.

59{-1};

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