ATLAS Offline Software
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 
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 }
34 
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 }
Muon::TruthMuonPlotOrganizer::m_oTruthMSHitPlots
std::unique_ptr< Trk::MSHitPlots > m_oTruthMSHitPlots
Definition: TruthMuonPlotOrganizer.h:35
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
PlotBase
Definition: PlotBase.h:33
TruthMuonPlotOrganizer.h
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
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:200
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
Muon::TruthMuonPlotOrganizer::~TruthMuonPlotOrganizer
~TruthMuonPlotOrganizer()
Muon::TRUTH_TRKEXTRAP
@ TRUTH_TRKEXTRAP
Definition: TruthMuonPlotOrganizer.h:19
lumiFormat.i
int i
Definition: lumiFormat.py:92
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
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