ATLAS Offline Software
MuonSegmentValidationPlots.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 MuonSegmentValidationPlots::MuonSegmentValidationPlots(PlotBase* pParent, const std::string& sDir, bool isData) :
8  PlotBase(pParent, sDir) {
9  m_oRecoSegmPlots = std::make_unique<Muon::MuonSegmentPlots>(this, "reco/MuonSegments/");
10  if (!isData) {
11  m_oMatchedMuonSegmPlots = std::make_unique<Muon::MuonSegmentPlots>(this, "matched/MuonSegments/");
12  m_oMatchedMuonSegmDiffPlots = std::make_unique<Muon::MuonSegmentTruthRelatedPlots>(this, "matched/MuonSegments/");
13  m_oTruthMuonSegmPlots = std::make_unique<Muon::MuonSegmentPlots>(this, "truth/MuonSegments/");
14  }
15 }
16 
18 
19 void MuonSegmentValidationPlots::fill(const xAOD::MuonSegment* truthMuSeg, const xAOD::MuonSegment* muSeg, float weight) {
20  if (truthMuSeg) m_oTruthMuonSegmPlots->fill(*truthMuSeg, weight);
21  if (muSeg) m_oRecoSegmPlots->fill(*muSeg, weight);
22 
23  if ((truthMuSeg) && (muSeg)) {
24  m_oMatchedMuonSegmPlots->fill(*truthMuSeg, weight);
25  m_oMatchedMuonSegmDiffPlots->fill(*truthMuSeg, *muSeg, weight);
26  }
27 }
28 
MuonSegmentValidationPlots::~MuonSegmentValidationPlots
~MuonSegmentValidationPlots()
PlotBase
Definition: PlotBase.h:34
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
MuonSegmentValidationPlots::m_oTruthMuonSegmPlots
std::unique_ptr< Muon::MuonSegmentPlots > m_oTruthMuonSegmPlots
Definition: MuonSegmentValidationPlots.h:21
xAOD::MuonSegment_v1
Class describing a MuonSegment.
Definition: MuonSegment_v1.h:33
MuonSegmentValidationPlots::m_oMatchedMuonSegmPlots
std::unique_ptr< Muon::MuonSegmentPlots > m_oMatchedMuonSegmPlots
Definition: MuonSegmentValidationPlots.h:19
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
MuonSegmentValidationPlots.h
MuonSegmentValidationPlots::m_oMatchedMuonSegmDiffPlots
std::unique_ptr< Muon::MuonSegmentTruthRelatedPlots > m_oMatchedMuonSegmDiffPlots
Definition: MuonSegmentValidationPlots.h:20
MuonSegmentValidationPlots::m_oRecoSegmPlots
std::unique_ptr< Muon::MuonSegmentPlots > m_oRecoSegmPlots
Definition: MuonSegmentValidationPlots.h:17
MuonSegmentValidationPlots::fill
void fill(const xAOD::MuonSegment *truthMuSeg, const xAOD::MuonSegment *muSeg, float weight=1.0)
Definition: MuonSegmentValidationPlots.cxx:19
MuonSegmentValidationPlots::MuonSegmentValidationPlots
MuonSegmentValidationPlots(PlotBase *pParent, const std::string &sDir, bool isData)
Definition: MuonSegmentValidationPlots.cxx:7