Constructor instantiating the monitoring histograms.
21 :
23
24 auto registerHisto = [&](TH1*
h) {
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: {
36 break;
37 } case TechIdx_t::STGC: {
39 break;
40 } case TechIdx_t::MM: {
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();
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 }
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
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.