ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonDQA
MuonPhysValMonitoring
src
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
5
#include "
MuonTrackValidationPlots.h
"
6
7
MuonTrackValidationPlots::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
29
MuonTrackValidationPlots::~MuonTrackValidationPlots
() =
default
;
30
31
void
MuonTrackValidationPlots::fill
(
const
xAOD::TrackParticle
& muTP,
float
weight) {
m_oRecoMuonTrackPlots
->fill(muTP, weight); }
32
33
void
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
}
MuonTrackValidationPlots.h
MuonTrackValidationPlots::m_oRecoMuonTrackPlots
std::unique_ptr< Muon::RecoMuonTrackPlotOrganizer > m_oRecoMuonTrackPlots
Definition
MuonTrackValidationPlots.h:20
MuonTrackValidationPlots::m_sTrackType
std::string m_sTrackType
Definition
MuonTrackValidationPlots.h:28
MuonTrackValidationPlots::m_oMatchedMuonTrackPlots
std::unique_ptr< Muon::TruthRelatedMuonPlotOrganizer > m_oMatchedMuonTrackPlots
Definition
MuonTrackValidationPlots.h:22
MuonTrackValidationPlots::MuonTrackValidationPlots
MuonTrackValidationPlots(PlotBase *pParent, const std::string &sDir, const std::string &sTrackType, bool isData=false)
Definition
MuonTrackValidationPlots.cxx:7
MuonTrackValidationPlots::~MuonTrackValidationPlots
~MuonTrackValidationPlots()
MuonTrackValidationPlots::fill
void fill(const xAOD::TrackParticle &muTP, float weight=1.0)
Definition
MuonTrackValidationPlots.cxx:31
PlotBase::PlotBase
PlotBase(PlotBase *parent, std::string_view sDir)
Definition
PlotBase.cxx:29
Muon::TRK_MATCHEDRECO
@ TRK_MATCHEDRECO
Definition
TruthRelatedMuonPlotOrganizer.h:25
Muon::TRK_DEFPARAMPULLS
@ TRK_DEFPARAMPULLS
Definition
TruthRelatedMuonPlotOrganizer.h:30
Muon::MUON_RESOL
@ MUON_RESOL
Definition
TruthRelatedMuonPlotOrganizer.h:29
Muon::TRK_MATCHEDTRUE
@ TRK_MATCHEDTRUE
Definition
TruthRelatedMuonPlotOrganizer.h:24
Muon::TRK_MSHITS
@ TRK_MSHITS
Definition
RecoMuonTrackPlotOrganizer.h:24
Muon::TRK_PARAM
@ TRK_PARAM
Definition
RecoMuonTrackPlotOrganizer.h:21
Muon::TRK_RECOINFO
@ TRK_RECOINFO
Definition
RecoMuonTrackPlotOrganizer.h:22
Muon::TRK_IDHITS
@ TRK_IDHITS
Definition
RecoMuonTrackPlotOrganizer.h:25
Muon::TRK_IMPACT
@ TRK_IMPACT
Definition
RecoMuonTrackPlotOrganizer.h:23
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition
Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
xAOD::TruthParticle
TruthParticle_v1 TruthParticle
Typedef to implementation.
Definition
Event/xAOD/xAODTruth/xAODTruth/TruthParticle.h:15
Generated on
for ATLAS Offline Software by
1.17.0