ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonHistogramming
MuonHistUtils
Root
TruthMuonPlotOrganizer.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/TruthMuonPlotOrganizer.h
"
6
7
namespace
Muon
{
8
9
TruthMuonPlotOrganizer::TruthMuonPlotOrganizer
(
PlotBase
* pParent,
10
const
std::string& sDir,
11
std::vector<int> selPlots)
12
:
PlotBase
(pParent, sDir) {
13
if
(selPlots.empty()) {
14
for (unsigned int i = 0; i < MAX_TRUTHPLOTCLASS; i++) {
15
m_selPlots.push_back(i);
16
}
17
}
else
{
18
m_selPlots = std::move(selPlots);
19
}
20
21
for
(
auto
p : m_selPlots) {
22
switch
(p) {
23
case
TRUTH_PARAM
:
24
m_oTruthPlots =
25
std::make_unique<Trk::ParamPlots>(
this
,
"/"
,
"Truth Muons"
);
26
break
;
27
case
TRUTH_INFO
:
28
m_oTruthInfoPlots =
29
std::make_unique<Trk::TruthInfoPlots>(
this
,
"/"
);
30
break
;
31
case
TRUTH_TRKEXTRAP
:
32
m_oTruthTrkExtrapolationPlots =
33
std::make_unique<Trk::TruthTrkExtrapolationPlots>(
this
,
34
"/"
);
35
break
;
36
case
TRUTH_MSHITS
:
37
m_oTruthMSHitPlots =
38
std::make_unique<Trk::MSHitPlots>(
this
,
"/"
);
39
break
;
40
}
41
}
42
}
43
TruthMuonPlotOrganizer::~TruthMuonPlotOrganizer() =
default
;
44
45
void
TruthMuonPlotOrganizer::fill
(
const
xAOD::TruthParticle
& truthMu,
46
float
weight) {
47
// General Truth Plots
48
if
(
m_oTruthPlots
) {
49
m_oTruthPlots
->fill(truthMu, weight);
50
}
51
if
(
m_oTruthInfoPlots
) {
52
m_oTruthInfoPlots
->fill(truthMu, weight);
53
}
54
if
(
m_oTruthTrkExtrapolationPlots
) {
55
m_oTruthTrkExtrapolationPlots
->fill(truthMu, weight);
56
}
57
if
(
m_oTruthMSHitPlots
) {
58
m_oTruthMSHitPlots
->fill(truthMu, weight);
59
}
60
}
61
62
}
// namespace Muon
TruthMuonPlotOrganizer.h
Muon::TruthMuonPlotOrganizer::m_oTruthMSHitPlots
std::unique_ptr< Trk::MSHitPlots > m_oTruthMSHitPlots
Definition
TruthMuonPlotOrganizer.h:41
Muon::TruthMuonPlotOrganizer::m_oTruthInfoPlots
std::unique_ptr< Trk::TruthInfoPlots > m_oTruthInfoPlots
Definition
TruthMuonPlotOrganizer.h:38
Muon::TruthMuonPlotOrganizer::fill
void fill(const xAOD::TruthParticle &truthMu, float weight=1.0)
Definition
TruthMuonPlotOrganizer.cxx:45
Muon::TruthMuonPlotOrganizer::TruthMuonPlotOrganizer
TruthMuonPlotOrganizer(PlotBase *pParent, const std::string &sDir, std::vector< int > selPlots={})
Definition
TruthMuonPlotOrganizer.cxx:9
Muon::TruthMuonPlotOrganizer::m_oTruthTrkExtrapolationPlots
std::unique_ptr< Trk::TruthTrkExtrapolationPlots > m_oTruthTrkExtrapolationPlots
Definition
TruthMuonPlotOrganizer.h:40
Muon::TruthMuonPlotOrganizer::m_oTruthPlots
std::unique_ptr< Trk::ParamPlots > m_oTruthPlots
Definition
TruthMuonPlotOrganizer.h:37
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::TRUTH_TRKEXTRAP
@ TRUTH_TRKEXTRAP
Definition
TruthMuonPlotOrganizer.h:21
Muon::TRUTH_INFO
@ TRUTH_INFO
Definition
TruthMuonPlotOrganizer.h:20
Muon::TRUTH_PARAM
@ TRUTH_PARAM
Definition
TruthMuonPlotOrganizer.h:19
Muon::TRUTH_MSHITS
@ TRUTH_MSHITS
Definition
TruthMuonPlotOrganizer.h:22
xAOD::TruthParticle
TruthParticle_v1 TruthParticle
Typedef to implementation.
Definition
Event/xAOD/xAODTruth/xAODTruth/TruthParticle.h:15
Generated on
for ATLAS Offline Software by
1.17.0