ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonHistogramming
MuonHistUtils
Root
SlowMuonParamPlots.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonHistUtils/SlowMuonParamPlots.h
"
6
7
#include <utility>
8
9
#include "TMath.h"
// for TMath::Prob()
10
11
namespace
Muon
{
12
13
BetaPlots::BetaPlots
(
PlotBase
* pParent,
const
std::string& sDir,
14
std::string sDetType)
15
:
PlotBase
(pParent, sDir),
16
nHits
(nullptr),
17
avg
(nullptr),
18
chi2
(nullptr),
19
ndf
(nullptr),
20
chi2ndf
(nullptr),
21
chi2prob
(nullptr),
22
rms
(nullptr),
23
m_sDetType
(
std
::move(sDetType)) {}
24
void
BetaPlots::initializePlots
() {
25
nHits
=
Book1D
(
m_sDetType
+
"nHits"
,
"; hits;Entries"
, 20, 0, 20);
26
avg
=
Book1D
(
m_sDetType
+
"avg"
,
"; avg;Entries"
, 20, 0, 20);
27
chi2
=
Book1D
(
m_sDetType
+
"chi2"
,
"; chi2;Entries"
, 20, 0, 20);
28
ndf
=
Book1D
(
m_sDetType
+
"ndf"
,
"; ndf;Entries"
, 20, 0, 20);
29
chi2ndf
=
Book1D
(
m_sDetType
+
"chi2ndf"
,
"; chi2/ndf;Entries"
, 20, 0, 5);
30
chi2prob
=
Book1D
(
m_sDetType
+
"chi2prob"
,
"; chi2 prob;Entries"
, 20, 0, 1);
31
rms
=
Book1D
(
m_sDetType
+
"rms"
,
"; rms;Entries"
, 20, 0, 20);
32
}
33
34
void
BetaPlots::fill
(
const
xAOD::SlowMuon
& smu,
float
weight) {
35
if
(
m_sDetType
==
"rpc"
||
m_sDetType
==
"Rpc"
||
m_sDetType
==
"RPC"
) {
36
nHits
->Fill(smu.
nRpcHits
(), weight);
37
ndf
->Fill(smu.
rpcBetaDof
(), weight);
38
if
(smu.
rpcBetaDof
() > 0) {
39
avg
->Fill(smu.
rpcBetaAvg
(), weight);
40
rms
->Fill(smu.
rpcBetaRms
(), weight);
41
chi2
->Fill(smu.
rpcBetaChi2
(), weight);
42
ndf
->Fill(smu.
rpcBetaDof
(), weight);
43
chi2ndf
->Fill(smu.
rpcBetaChi2
() / smu.
rpcBetaDof
(), weight);
44
chi2prob
->Fill(TMath::Prob(smu.
rpcBetaChi2
(), smu.
rpcBetaDof
()),
45
weight);
46
}
47
}
else
if
(
m_sDetType
==
"mdt"
||
m_sDetType
==
"Mdt"
||
48
m_sDetType
==
"MDT"
) {
49
// nHits->Fill( smu.nMdtHits() );
50
ndf
->Fill(smu.
mdtBetaDof
(), weight);
51
if
(smu.
mdtBetaDof
() > 0) {
52
avg
->Fill(smu.
mdtBetaAvg
(), weight);
53
rms
->Fill(smu.
mdtBetaRms
(), weight);
54
chi2
->Fill(smu.
mdtBetaChi2
(), weight);
55
ndf
->Fill(smu.
mdtBetaDof
(), weight);
56
chi2ndf
->Fill(smu.
mdtBetaChi2
() / smu.
mdtBetaDof
(), weight);
57
chi2prob
->Fill(TMath::Prob(smu.
mdtBetaChi2
(), smu.
mdtBetaDof
()),
58
weight);
59
}
60
}
else
if
(
m_sDetType
==
"calo"
||
m_sDetType
==
"Calo"
||
61
m_sDetType
==
"CALO"
) {
62
nHits
->Fill(smu.
nTileCells
(), weight);
63
ndf
->Fill(smu.
caloBetaDof
(), weight);
64
if
(smu.
caloBetaDof
() > 0) {
65
avg
->Fill(smu.
caloBetaAvg
(), weight);
66
rms
->Fill(smu.
caloBetaRms
(), weight);
67
chi2
->Fill(smu.
caloBetaChi2
(), weight);
68
ndf
->Fill(smu.
caloBetaDof
(), weight);
69
chi2ndf
->Fill(smu.
caloBetaChi2
() / smu.
caloBetaDof
(), weight);
70
chi2prob
->Fill(TMath::Prob(smu.
caloBetaChi2
(), smu.
caloBetaDof
()),
71
weight);
72
}
73
}
74
}
75
77
78
SlowMuonParamPlots::SlowMuonParamPlots
(
PlotBase
* pParent,
79
const
std::string& sDir)
80
:
PlotBase
(pParent, sDir),
81
beta
(nullptr),
82
mdtBeta
(this,
""
,
"MDT"
),
83
rpcBeta
(this,
""
,
"RPC"
),
84
caloBeta
(this,
""
,
"CALO"
) {}
85
86
void
SlowMuonParamPlots::initializePlots
() {
87
beta
=
Book1D
(
"beta"
,
"beta;beta;Entries"
, 150, 0, 1.5);
88
}
89
90
void
SlowMuonParamPlots::fill
(
const
xAOD::SlowMuon
& smu,
float
weight) {
91
beta
->Fill(smu.
beta
(), weight);
92
mdtBeta
.fill(smu, weight);
93
rpcBeta
.fill(smu, weight);
94
caloBeta
.fill(smu, weight);
95
}
96
97
}
// namespace Muon
SlowMuonParamPlots.h
Muon::BetaPlots::avg
TH1 * avg
Definition
SlowMuonParamPlots.h:20
Muon::BetaPlots::chi2
TH1 * chi2
Definition
SlowMuonParamPlots.h:21
Muon::BetaPlots::nHits
TH1 * nHits
Definition
SlowMuonParamPlots.h:19
Muon::BetaPlots::chi2ndf
TH1 * chi2ndf
Definition
SlowMuonParamPlots.h:23
Muon::BetaPlots::BetaPlots
BetaPlots(PlotBase *pParent, const std::string &sDir, std::string sDetType)
Definition
SlowMuonParamPlots.cxx:13
Muon::BetaPlots::fill
void fill(const xAOD::SlowMuon &smu, float weight=1.0)
Definition
SlowMuonParamPlots.cxx:34
Muon::BetaPlots::ndf
TH1 * ndf
Definition
SlowMuonParamPlots.h:22
Muon::BetaPlots::rms
TH1 * rms
Definition
SlowMuonParamPlots.h:25
Muon::BetaPlots::initializePlots
void initializePlots()
Definition
SlowMuonParamPlots.cxx:24
Muon::BetaPlots::chi2prob
TH1 * chi2prob
Definition
SlowMuonParamPlots.h:24
Muon::BetaPlots::m_sDetType
std::string m_sDetType
Definition
SlowMuonParamPlots.h:28
Muon::SlowMuonParamPlots::rpcBeta
BetaPlots rpcBeta
Definition
SlowMuonParamPlots.h:40
Muon::SlowMuonParamPlots::initializePlots
void initializePlots()
Definition
SlowMuonParamPlots.cxx:86
Muon::SlowMuonParamPlots::SlowMuonParamPlots
SlowMuonParamPlots(PlotBase *pParent, const std::string &sDir)
Definition
SlowMuonParamPlots.cxx:78
Muon::SlowMuonParamPlots::mdtBeta
BetaPlots mdtBeta
Definition
SlowMuonParamPlots.h:39
Muon::SlowMuonParamPlots::caloBeta
BetaPlots caloBeta
Definition
SlowMuonParamPlots.h:41
Muon::SlowMuonParamPlots::fill
void fill(const xAOD::SlowMuon &smu, float weight=1.0)
Definition
SlowMuonParamPlots.cxx:90
Muon::SlowMuonParamPlots::beta
TH1 * beta
Definition
SlowMuonParamPlots.h:38
PlotBase::Book1D
TH1D * Book1D(std::string_view name, std::string_view labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition
PlotBase.cxx:94
PlotBase::PlotBase
PlotBase(PlotBase *parent, std::string_view sDir)
Definition
PlotBase.cxx:29
xAOD::SlowMuon_v1::mdtBetaChi2
float mdtBetaChi2() const
Returns.
xAOD::SlowMuon_v1::caloBetaDof
int caloBetaDof() const
Returns.
xAOD::SlowMuon_v1::nRpcHits
int nRpcHits() const
xAOD::SlowMuon_v1::mdtBetaDof
int mdtBetaDof() const
Returns.
xAOD::SlowMuon_v1::rpcBetaRms
float rpcBetaRms() const
Returns.
xAOD::SlowMuon_v1::caloBetaAvg
float caloBetaAvg() const
xAOD::SlowMuon_v1::beta
float beta() const
xAOD::SlowMuon_v1::rpcBetaChi2
float rpcBetaChi2() const
Returns.
xAOD::SlowMuon_v1::rpcBetaAvg
float rpcBetaAvg() const
xAOD::SlowMuon_v1::caloBetaChi2
float caloBetaChi2() const
Returns.
xAOD::SlowMuon_v1::caloBetaRms
float caloBetaRms() const
Returns.
xAOD::SlowMuon_v1::mdtBetaRms
float mdtBetaRms() const
Returns.
xAOD::SlowMuon_v1::mdtBetaAvg
float mdtBetaAvg() const
xAOD::SlowMuon_v1::nTileCells
int nTileCells() const
Returns.
xAOD::SlowMuon_v1::rpcBetaDof
int rpcBetaDof() const
Returns.
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition
TrackSystemController.h:46
std
STL namespace.
xAOD::SlowMuon
SlowMuon_v1 SlowMuon
Reference the current persistent version:
Definition
SlowMuon.h:13
Generated on
for ATLAS Offline Software by
1.17.0