ATLAS Offline Software
Loading...
Searching...
No Matches
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
6
7namespace Muon {
8
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}
43TruthMuonPlotOrganizer::~TruthMuonPlotOrganizer() = default;
44
46 float weight) {
47 // General Truth Plots
48 if (m_oTruthPlots) {
49 m_oTruthPlots->fill(truthMu, weight);
50 }
52 m_oTruthInfoPlots->fill(truthMu, weight);
53 }
55 m_oTruthTrkExtrapolationPlots->fill(truthMu, weight);
56 }
58 m_oTruthMSHitPlots->fill(truthMu, weight);
59 }
60}
61
62} // namespace Muon
std::unique_ptr< Trk::MSHitPlots > m_oTruthMSHitPlots
std::unique_ptr< Trk::TruthInfoPlots > m_oTruthInfoPlots
void fill(const xAOD::TruthParticle &truthMu, float weight=1.0)
TruthMuonPlotOrganizer(PlotBase *pParent, const std::string &sDir, std::vector< int > selPlots={})
std::unique_ptr< Trk::TruthTrkExtrapolationPlots > m_oTruthTrkExtrapolationPlots
std::unique_ptr< Trk::ParamPlots > m_oTruthPlots
PlotBase(PlotBase *parent, std::string_view sDir)
Definition PlotBase.cxx:29
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
TruthParticle_v1 TruthParticle
Typedef to implementation.