ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonHistogramming
MuonHistUtils
Root
ChargeDepParamPlots.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonHistUtils/ChargeDepParamPlots.h
"
6
7
#include <utility>
8
9
namespace
Muon
{
10
11
ChargeDepParamPlots::ChargeDepParamPlots
(
PlotBase
* pParent,
12
const
std::string& sDir,
13
std::string sType)
14
:
PlotBase
(pParent, sDir),
m_sType
(
std
::move(sType)) {}
15
16
void
ChargeDepParamPlots::initializePlots
() {
17
q_times_eta
=
18
Book1D
(
"qTimesEta_"
+
m_sType
,
19
"qTimesEta_"
+
m_sType
+
";charge*Pseudo-Rapidity;Entries"
, 128,
20
-3.2, 3.2);
21
q_over_pt
=
22
Book1D
(
"qOverPt_"
+
m_sType
,
23
"qOverPt_"
+
m_sType
+
24
";charge over Transverse Momentum [GeV^{-1}];Entries"
,
25
200, -0.5, 0.5);
26
q_over_p
=
27
Book1D
(
"qOverP_"
+
m_sType
,
28
"qOverP_"
+
m_sType
+
";charge over Momentum [GeV^{-1}];Entries"
,
29
200, -0.5, 0.5);
30
31
// charge comparison of ID, MS, ME tracks
32
qMS_times_qCB
=
33
Book1D
(
"qMS_times_qCB_"
+
m_sType
,
34
"qMS_times_qCB_"
+
m_sType
+
";qMS*qCB;Entries"
, 3, -1.5, 1.5);
35
qID_times_qCB
=
36
Book1D
(
"qID_times_qCB_"
+
m_sType
,
37
"qID_times_qCB_"
+
m_sType
+
";qID*qCB;Entries"
, 3, -1.5, 1.5);
38
}
39
40
void
ChargeDepParamPlots::fill
(
const
xAOD::Muon
& mu,
float
weight) {
41
const
xAOD::TrackParticle
* trkprt = mu.trackParticle(xAOD::Muon::Primary);
42
if
(!trkprt) {
43
return
;
44
}
45
46
q_times_eta
->Fill(trkprt->
charge
() * trkprt->
eta
(), weight);
47
q_over_pt
->Fill(trkprt->
charge
() / trkprt->
pt
() / 0.001, weight);
48
q_over_p
->Fill(trkprt->
qOverP
() / 0.001, weight);
49
50
const
xAOD::TrackParticle
* trkprtID =
51
mu.trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
52
const
xAOD::TrackParticle
* trkprtMS =
53
mu.trackParticle(xAOD::Muon::MuonSpectrometerTrackParticle);
54
55
if
(trkprtID) {
56
qID_times_qCB
->Fill(trkprtID->
charge
() * trkprt->
charge
(), weight);
57
}
58
59
if
(trkprtMS) {
60
qMS_times_qCB
->Fill(trkprtMS->
charge
() * trkprt->
charge
(), weight);
61
}
62
}
63
64
}
// namespace Muon
ChargeDepParamPlots.h
Muon::ChargeDepParamPlots::q_times_eta
TH1 * q_times_eta
Definition
ChargeDepParamPlots.h:21
Muon::ChargeDepParamPlots::ChargeDepParamPlots
ChargeDepParamPlots(PlotBase *pParent, const std::string &sDir, std::string sType)
Definition
ChargeDepParamPlots.cxx:11
Muon::ChargeDepParamPlots::qID_times_qCB
TH1 * qID_times_qCB
Definition
ChargeDepParamPlots.h:25
Muon::ChargeDepParamPlots::q_over_p
TH1 * q_over_p
Definition
ChargeDepParamPlots.h:22
Muon::ChargeDepParamPlots::q_over_pt
TH1 * q_over_pt
Definition
ChargeDepParamPlots.h:23
Muon::ChargeDepParamPlots::m_sType
std::string m_sType
Definition
ChargeDepParamPlots.h:29
Muon::ChargeDepParamPlots::qMS_times_qCB
TH1 * qMS_times_qCB
Definition
ChargeDepParamPlots.h:24
Muon::ChargeDepParamPlots::initializePlots
void initializePlots()
Definition
ChargeDepParamPlots.cxx:16
Muon::ChargeDepParamPlots::fill
void fill(const xAOD::Muon &mu, float weight=1.0)
Definition
ChargeDepParamPlots.cxx:40
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::TrackParticle_v1::qOverP
float qOverP() const
Returns the parameter.
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition
TrackParticle_v1.cxx:75
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition
TrackParticle_v1.cxx:79
xAOD::TrackParticle_v1::charge
float charge() const
Returns the charge.
Definition
TrackParticle_v1.cxx:143
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition
TrackSystemController.h:46
std
STL namespace.
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition
Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
xAOD::Muon
Muon_v1 Muon
Reference the current persistent version:
Definition
Event/xAOD/xAODMuon/xAODMuon/Muon.h:13
Generated on
for ATLAS Offline Software by
1.17.0