ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonHistogramming
MuonHistUtils
Root
RecoMuonPlotOrganizer.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/RecoMuonPlotOrganizer.h
"
6
7
namespace
Muon
{
8
9
RecoMuonPlotOrganizer::RecoMuonPlotOrganizer
(
PlotBase
* pParent,
10
const
std::string& sDir,
11
std::vector<int> selPlots)
12
:
PlotBase
(pParent, sDir) {
13
14
if
(selPlots.empty()) {
15
for (unsigned int i = 0; i < MAX_RECOPLOTCLASS; i++) {
16
m_selPlots.push_back(i);
17
}
18
}
else
{
19
m_selPlots = std::move(selPlots);
20
}
21
22
for
(
int
p : m_selPlots) {
23
switch
(p) {
24
case
MUON_TRKPARAM
:
25
m_oTrkParamPlots = std::make_unique<Trk::ParamPlots>(
26
this
,
"/kinematics/"
,
"RecoMuon"
);
27
break
;
28
case
MUON_PARAM
:
29
m_oMuonParamPlots = std::make_unique<Muon::MuonParamPlots>(
30
this
,
"/parameters/"
);
31
break
;
32
case
MUON_RECOINFO
:
33
m_oMuRecoInfoPlots =
34
std::make_unique<Muon::RecoInfoPlots>(
this
,
"/parameters/"
);
35
break
;
36
case
MUON_TRKIMPACT
:
37
m_oImpactPlots =
38
std::make_unique<Trk::ImpactPlots>(
this
,
"/parameters/"
);
39
break
;
40
case
MUON_MOMPULLS
:
41
m_oMomentumPullPlots =
42
std::make_unique<Muon::MomentumPullPlots>(
43
this
,
"/momentumPulls/"
);
44
break
;
45
case
MUON_HITS
:
46
m_oMuonHitSummaryPlots =
47
std::make_unique<Muon::MuonHitSummaryPlots>(
this
,
"/hits/"
);
48
break
;
49
case
MUON_IDHITS
:
50
m_oIDHitPlots =
51
std::make_unique<Muon::IDHitSummaryPlots>(
this
,
"/hits/"
);
52
break
;
53
case
MUON_ISO
:
54
m_oMuonIsolationPlots =
55
std::make_unique<Muon::MuonIsolationPlots>(
this
,
56
"/isolation/"
);
57
break
;
58
case
MUON_CHARGEPARAM
:
59
m_oChargeParamPlotsLowPt =
60
std::make_unique<Muon::ChargeDepParamPlots>(
61
this
,
"/kinematics/"
,
"lowPt"
);
62
m_oChargeParamPlotsHighPt =
63
std::make_unique<Muon::ChargeDepParamPlots>(
64
this
,
"/kinematics/"
,
"highPt"
);
65
break
;
66
}
67
}
68
}
69
70
RecoMuonPlotOrganizer::~RecoMuonPlotOrganizer() =
default
;
71
72
void
RecoMuonPlotOrganizer::fill
(
const
xAOD::Muon
& mu,
float
weight) {
73
if
(
m_oIDHitPlots
&& mu.trackParticle(xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle)) {
74
m_oIDHitPlots
->fill(
75
*mu.trackParticle(xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle), weight);
76
}
77
if
(
m_oTrkParamPlots
) {
78
m_oTrkParamPlots
->fill(mu, weight);
79
}
80
if
(
m_oMuonParamPlots
) {
81
m_oMuonParamPlots
->fill(mu, weight);
82
}
83
if
(
m_oMuRecoInfoPlots
) {
84
m_oMuRecoInfoPlots
->fill(mu, weight);
85
}
86
if
(
m_oMomentumPullPlots
) {
87
m_oMomentumPullPlots
->fill(mu, weight);
88
}
89
if
(
m_oMuonHitSummaryPlots
) {
90
m_oMuonHitSummaryPlots
->fill(mu, weight);
91
}
92
if
(
m_oMuonIsolationPlots
) {
93
m_oMuonIsolationPlots
->fill(mu, weight);
94
}
95
if
(
m_oChargeParamPlotsLowPt
&&
m_oChargeParamPlotsHighPt
) {
96
if
(mu.pt() < 8000) {
97
m_oChargeParamPlotsLowPt
->fill(mu, weight);
98
}
else
{
99
m_oChargeParamPlotsHighPt
->fill(mu, weight);
100
}
101
}
102
103
// tracking related plots
104
const
xAOD::TrackParticle
* primaryTrk =
105
mu.trackParticle(xAOD::Muon::Primary);
106
if
(!primaryTrk) {
107
return
;
108
}
109
if
(
m_oImpactPlots
) {
110
m_oImpactPlots
->fill(*primaryTrk, weight);
111
}
112
}
113
114
}
// namespace Muon
RecoMuonPlotOrganizer.h
Muon::RecoMuonPlotOrganizer::m_oMuonIsolationPlots
std::unique_ptr< Muon::MuonIsolationPlots > m_oMuonIsolationPlots
Definition
RecoMuonPlotOrganizer.h:55
Muon::RecoMuonPlotOrganizer::RecoMuonPlotOrganizer
RecoMuonPlotOrganizer(PlotBase *pParent, const std::string &sDir, std::vector< int > selPlots={})
Definition
RecoMuonPlotOrganizer.cxx:9
Muon::RecoMuonPlotOrganizer::m_oMomentumPullPlots
std::unique_ptr< Muon::MomentumPullPlots > m_oMomentumPullPlots
Definition
RecoMuonPlotOrganizer.h:53
Muon::RecoMuonPlotOrganizer::m_oChargeParamPlotsHighPt
std::unique_ptr< Muon::ChargeDepParamPlots > m_oChargeParamPlotsHighPt
Definition
RecoMuonPlotOrganizer.h:57
Muon::RecoMuonPlotOrganizer::m_oImpactPlots
std::unique_ptr< Trk::ImpactPlots > m_oImpactPlots
Definition
RecoMuonPlotOrganizer.h:50
Muon::RecoMuonPlotOrganizer::m_oMuonParamPlots
std::unique_ptr< Muon::MuonParamPlots > m_oMuonParamPlots
Definition
RecoMuonPlotOrganizer.h:51
Muon::RecoMuonPlotOrganizer::m_oMuRecoInfoPlots
std::unique_ptr< Muon::RecoInfoPlots > m_oMuRecoInfoPlots
Definition
RecoMuonPlotOrganizer.h:52
Muon::RecoMuonPlotOrganizer::m_oTrkParamPlots
std::unique_ptr< Trk::ParamPlots > m_oTrkParamPlots
Definition
RecoMuonPlotOrganizer.h:49
Muon::RecoMuonPlotOrganizer::m_oMuonHitSummaryPlots
std::unique_ptr< Muon::MuonHitSummaryPlots > m_oMuonHitSummaryPlots
Definition
RecoMuonPlotOrganizer.h:54
Muon::RecoMuonPlotOrganizer::fill
void fill(const xAOD::Muon &mu, float weight=1.0)
Definition
RecoMuonPlotOrganizer.cxx:72
Muon::RecoMuonPlotOrganizer::m_oChargeParamPlotsLowPt
std::unique_ptr< Muon::ChargeDepParamPlots > m_oChargeParamPlotsLowPt
Definition
RecoMuonPlotOrganizer.h:56
Muon::RecoMuonPlotOrganizer::m_oIDHitPlots
std::unique_ptr< Muon::IDHitSummaryPlots > m_oIDHitPlots
Definition
RecoMuonPlotOrganizer.h:48
PlotBase::PlotBase
PlotBase(PlotBase *parent, std::string_view sDir)
Definition
PlotBase.cxx:29
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition
TrackSystemController.h:46
Muon::MUON_MOMPULLS
@ MUON_MOMPULLS
Definition
RecoMuonPlotOrganizer.h:29
Muon::MUON_ISO
@ MUON_ISO
Definition
RecoMuonPlotOrganizer.h:32
Muon::MUON_IDHITS
@ MUON_IDHITS
Definition
RecoMuonPlotOrganizer.h:31
Muon::MUON_TRKIMPACT
@ MUON_TRKIMPACT
Definition
RecoMuonPlotOrganizer.h:27
Muon::MUON_CHARGEPARAM
@ MUON_CHARGEPARAM
Definition
RecoMuonPlotOrganizer.h:33
Muon::MUON_TRKPARAM
@ MUON_TRKPARAM
Definition
RecoMuonPlotOrganizer.h:25
Muon::MUON_PARAM
@ MUON_PARAM
Definition
RecoMuonPlotOrganizer.h:26
Muon::MUON_HITS
@ MUON_HITS
Definition
RecoMuonPlotOrganizer.h:30
Muon::MUON_RECOINFO
@ MUON_RECOINFO
Definition
RecoMuonPlotOrganizer.h:28
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