ATLAS Offline Software
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,
const
std::string&
sDir
, std::vector<int> selPlots):
10
PlotBase
(pParent,
sDir
) {
11
if
(selPlots.empty()) {
12
for
(
unsigned
int
i
=0;
i
<
MAX_TRUTHPLOTCLASS
;
i
++)
m_selPlots
.push_back(
i
);
13
}
14
else
m_selPlots
= std::move(selPlots);
15
16
for
(
auto
p
:
m_selPlots
) {
17
switch
(
p
) {
18
case
TRUTH_PARAM
:
19
m_oTruthPlots
= std::make_unique<Trk::ParamPlots>(
this
,
"/"
,
"Truth Muons"
);
20
break
;
21
case
TRUTH_INFO
:
22
m_oTruthInfoPlots
= std::make_unique<Trk::TruthInfoPlots>(
this
,
"/"
);
23
break
;
24
case
TRUTH_TRKEXTRAP
:
25
m_oTruthTrkExtrapolationPlots
= std::make_unique<Trk::TruthTrkExtrapolationPlots>(
this
,
"/"
);
26
break
;
27
case
TRUTH_MSHITS
:
28
m_oTruthMSHitPlots
= std::make_unique<Trk::MSHitPlots>(
this
,
"/"
);
29
break
;
30
}
31
}
32
}
33
TruthMuonPlotOrganizer::~TruthMuonPlotOrganizer
() =
default
;
34
35
void
TruthMuonPlotOrganizer::fill
(
const
xAOD::TruthParticle
& truthMu,
float
weight
){
36
//General Truth Plots
37
if
(
m_oTruthPlots
)
m_oTruthPlots
->fill(truthMu,
weight
);
38
if
(
m_oTruthInfoPlots
)
m_oTruthInfoPlots
->fill(truthMu,
weight
);
39
if
(
m_oTruthTrkExtrapolationPlots
)
m_oTruthTrkExtrapolationPlots
->fill(truthMu,
weight
);
40
if
(
m_oTruthMSHitPlots
)
m_oTruthMSHitPlots
->fill(truthMu,
weight
);
41
}
42
43
44
}
Muon::TruthMuonPlotOrganizer::m_oTruthMSHitPlots
std::unique_ptr< Trk::MSHitPlots > m_oTruthMSHitPlots
Definition:
TruthMuonPlotOrganizer.h:35
PlotBase
Definition:
PlotBase.h:34
TruthMuonPlotOrganizer.h
python.copyTCTOutput.sDir
sDir
Definition:
copyTCTOutput.py:60
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition:
TrackSystemController.h:45
Muon::TruthMuonPlotOrganizer::fill
void fill(const xAOD::TruthParticle &truthMu, float weight=1.0)
Definition:
TruthMuonPlotOrganizer.cxx:35
dqt_zlumi_pandas.weight
int weight
Definition:
dqt_zlumi_pandas.py:189
Muon::TruthMuonPlotOrganizer::TruthMuonPlotOrganizer
TruthMuonPlotOrganizer(PlotBase *pParent, const std::string &sDir, std::vector< int > selPlots={})
Definition:
TruthMuonPlotOrganizer.cxx:9
Muon::TruthMuonPlotOrganizer::m_selPlots
std::vector< int > m_selPlots
Definition:
TruthMuonPlotOrganizer.h:27
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:210
Muon::TruthMuonPlotOrganizer::~TruthMuonPlotOrganizer
~TruthMuonPlotOrganizer()
Muon::TRUTH_TRKEXTRAP
@ TRUTH_TRKEXTRAP
Definition:
TruthMuonPlotOrganizer.h:19
lumiFormat.i
int i
Definition:
lumiFormat.py:85
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition:
TruthParticle_v1.h:37
Muon::TruthMuonPlotOrganizer::m_oTruthPlots
std::unique_ptr< Trk::ParamPlots > m_oTruthPlots
Definition:
TruthMuonPlotOrganizer.h:32
Muon::TRUTH_PARAM
@ TRUTH_PARAM
Definition:
TruthMuonPlotOrganizer.h:19
Muon::MAX_TRUTHPLOTCLASS
@ MAX_TRUTHPLOTCLASS
Definition:
TruthMuonPlotOrganizer.h:19
Muon::TRUTH_MSHITS
@ TRUTH_MSHITS
Definition:
TruthMuonPlotOrganizer.h:19
Muon::TRUTH_INFO
@ TRUTH_INFO
Definition:
TruthMuonPlotOrganizer.h:19
Muon::TruthMuonPlotOrganizer::m_oTruthInfoPlots
std::unique_ptr< Trk::TruthInfoPlots > m_oTruthInfoPlots
Definition:
TruthMuonPlotOrganizer.h:33
Muon::TruthMuonPlotOrganizer::m_oTruthTrkExtrapolationPlots
std::unique_ptr< Trk::TruthTrkExtrapolationPlots > m_oTruthTrkExtrapolationPlots
Definition:
TruthMuonPlotOrganizer.h:34
Generated on Fri Jan 10 2025 21:21:13 for ATLAS Offline Software by
1.8.18