ATLAS Offline Software
Loading...
Searching...
No Matches
MuonTrackValidationPlots.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
7MuonTrackValidationPlots::MuonTrackValidationPlots(PlotBase* pParent, const std::string& sDir, const std::string& sTrackType, bool isData) :
8 PlotBase(pParent, sDir), m_sTrackType(sTrackType) {
9 std::vector<int> selectedRecoPlots(0);
10 selectedRecoPlots.push_back(Muon::TRK_PARAM);
11 selectedRecoPlots.push_back(Muon::TRK_RECOINFO);
12 selectedRecoPlots.push_back(Muon::TRK_IMPACT);
13 if (sTrackType.find("ID") != std::string::npos)
14 selectedRecoPlots.push_back(Muon::TRK_IDHITS);
15 else
16 selectedRecoPlots.push_back(Muon::TRK_MSHITS);
17 m_oRecoMuonTrackPlots = std::make_unique<Muon::RecoMuonTrackPlotOrganizer>(this, "reco/" + sTrackType, selectedRecoPlots);
18
19 if (!isData) {
20 std::vector<int> selectedMatchedPlots(0);
21 selectedMatchedPlots.push_back(Muon::TRK_MATCHEDTRUE);
22 selectedMatchedPlots.push_back(Muon::TRK_MATCHEDRECO);
23 selectedMatchedPlots.push_back(Muon::TRK_DEFPARAMPULLS);
24 selectedMatchedPlots.push_back(Muon::MUON_RESOL);
25 m_oMatchedMuonTrackPlots = std::make_unique<Muon::TruthRelatedMuonPlotOrganizer>(this, "matched/" + sTrackType, true, selectedMatchedPlots);
26 }
27}
28
30
31void MuonTrackValidationPlots::fill(const xAOD::TrackParticle& muTP, float weight) { m_oRecoMuonTrackPlots->fill(muTP, weight); }
32
33void MuonTrackValidationPlots::fill(const xAOD::TruthParticle* truthMu, const xAOD::TrackParticle* muTP, float weight) {
34 if (muTP) {
35 m_oRecoMuonTrackPlots->fill(*muTP, weight);
36 if (truthMu) { m_oMatchedMuonTrackPlots->fill(*truthMu, *muTP, weight); }
37 }
38}
std::unique_ptr< Muon::RecoMuonTrackPlotOrganizer > m_oRecoMuonTrackPlots
std::unique_ptr< Muon::TruthRelatedMuonPlotOrganizer > m_oMatchedMuonTrackPlots
MuonTrackValidationPlots(PlotBase *pParent, const std::string &sDir, const std::string &sTrackType, bool isData=false)
void fill(const xAOD::TrackParticle &muTP, float weight=1.0)
PlotBase(PlotBase *parent, const std::string &sDir)
Definition PlotBase.cxx:29
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TruthParticle_v1 TruthParticle
Typedef to implementation.