ATLAS Offline Software
Loading...
Searching...
No Matches
SlowMuonValidationPlots.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#include <iostream>
8
10
12
13SlowMuonValidationPlots::SlowMuonValidationPlots(PlotBase* pParent, const std::string& sDir, bool isData) :
14 PlotBase(pParent, sDir), m_isData(isData) {
15 // histogram classes for all muons
16 m_oSlowMuonRecoPlots = std::make_unique<Muon::SlowMuonParamPlots>(this, "reco/AllMuons/parameters/");
17 if (!m_isData) m_oSlowMuonMatchedPlots = std::make_unique< Muon::SlowMuonParamPlots>(this, "matched/AllMuons/parameters/");
18}
19
21
22void SlowMuonValidationPlots::fill(const xAOD::SlowMuon& smu, const xAOD::Muon& mu, float weight) { fillRecoMuonPlots(smu, mu, weight); }
23void SlowMuonValidationPlots::fill(const xAOD::TruthParticle* truthMu, const xAOD::SlowMuon* smu, const xAOD::Muon* mu, float weight) {
24 if (smu) fillRecoMuonPlots(*smu, *mu, weight);
25 if ((smu) && (truthMu)) { m_oSlowMuonMatchedPlots->fill(*smu, weight); }
26}
27
28void SlowMuonValidationPlots::fillRecoMuonPlots(const xAOD::SlowMuon& smu, const xAOD::Muon& /*mu*/, float weight) {
29 // fill hists for all muons
30 m_oSlowMuonRecoPlots->fill(smu, weight);
31}
ElementLink< xAOD::MuonContainer > MuonLink
PlotBase(PlotBase *parent, const std::string &sDir)
Definition PlotBase.cxx:29
SlowMuonValidationPlots(PlotBase *pParent, const std::string &sDir, bool isData)
void fill(const xAOD::SlowMuon &smu, const xAOD::Muon &mu, float weight=1.0)
virtual ~SlowMuonValidationPlots()
void fillRecoMuonPlots(const xAOD::SlowMuon &smu, const xAOD::Muon &mu, float weight=1.0)
std::unique_ptr< Muon::SlowMuonParamPlots > m_oSlowMuonRecoPlots
std::unique_ptr< Muon::SlowMuonParamPlots > m_oSlowMuonMatchedPlots
SlowMuon_v1 SlowMuon
Reference the current persistent version:
Definition SlowMuon.h:13
TruthParticle_v1 TruthParticle
Typedef to implementation.
Muon_v1 Muon
Reference the current persistent version: