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
9TruthMuonPlotOrganizer::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}
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);
40 if (m_oTruthMSHitPlots) m_oTruthMSHitPlots->fill(truthMu, weight);
41}
42
43
44}
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, const std::string &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.