ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonDQA
MuonTrackMonitoring
src
RecoMuonTrackPlots.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonTrackMonitoring/RecoMuonTrackPlots.h
"
6
7
RecoMuonTrackPlots::RecoMuonTrackPlots
(
PlotBase
* pParent,
const
std::string& sDir):
PlotBase
(pParent, sDir),
8
m_oAllPlots
(this,
"/"
,
"Reco Muon"
),
9
m_oImpactPlots
(this,
"/"
),
10
m_oTrkRecoInfoPlots
(this,
"/"
),
11
m_pt_broad
(nullptr),
12
m_eta_phi_broad
(nullptr)
13
{}
14
15
void
RecoMuonTrackPlots::initializePlots
(){
16
//booking histograms
17
m_pt_broad
=
Book1D
(
"_pt_broad"
,
"High p_{T} Distribution"
, 70, 100, 1500);
18
m_eta_phi_broad
=
Book2D
(
"_eta_phi_broad"
,
"High p_{T} Muon #eta #phi Distribution;#eta;#phi"
, 52, -2.6, 2.6, 64, -3.2, 3.2);
19
}
20
21
//when the plot function called with a Muon Container
22
//loop through each muon, get the corresponding link and fill it
23
24
//when the plot function called with a Muon
25
//get's the corresponding link and fill it
26
void
RecoMuonTrackPlots::fill
(
const
xAOD::Muon
& mu,
int
component){
27
if
(component > 1) {
28
return
;
29
}
30
xAOD::Muon::TrackParticleType tType = component == 0 ? xAOD::Muon::TrackParticleType::MuonSpectrometerTrackParticle
31
: xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle;
32
const
xAOD::TrackParticle
* trk = mu.trackParticle(tType);
33
if
(trk) {
34
fill
(*trk);
35
}
36
}
37
38
39
void
RecoMuonTrackPlots::fill
(
const
xAOD::TrackParticle
& muTP){
40
m_oAllPlots
.fill(muTP);
41
m_oImpactPlots
.fill(muTP);
42
m_oTrkRecoInfoPlots
.fill(muTP);
43
44
if
(muTP.
pt
()/1000.0 > 100) {
//ony for high pt muons
45
m_pt_broad
->Fill(muTP.
pt
()/1000.0);
46
m_eta_phi_broad
->Fill(muTP.
eta
(), muTP.
phi
());
47
}
48
49
}
50
51
RecoMuonTrackPlots.h
PlotBase::Book1D
TH1D * Book1D(std::string_view name, std::string_view labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition
PlotBase.cxx:94
PlotBase::PlotBase
PlotBase(PlotBase *parent, std::string_view sDir)
Definition
PlotBase.cxx:29
PlotBase::Book2D
TH2F * Book2D(std::string_view name, std::string_view labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
Book a TH2F histogram.
Definition
PlotBase.cxx:123
RecoMuonTrackPlots::m_pt_broad
TH1 * m_pt_broad
Definition
RecoMuonTrackPlots.h:34
RecoMuonTrackPlots::m_oAllPlots
Trk::ParamPlots m_oAllPlots
Definition
RecoMuonTrackPlots.h:30
RecoMuonTrackPlots::m_eta_phi_broad
TH2 * m_eta_phi_broad
Definition
RecoMuonTrackPlots.h:35
RecoMuonTrackPlots::m_oImpactPlots
Trk::ImpactPlots m_oImpactPlots
Definition
RecoMuonTrackPlots.h:31
RecoMuonTrackPlots::initializePlots
void initializePlots()
Definition
RecoMuonTrackPlots.cxx:15
RecoMuonTrackPlots::RecoMuonTrackPlots
RecoMuonTrackPlots(PlotBase *pParent, const std::string &sDir)
Definition
RecoMuonTrackPlots.cxx:7
RecoMuonTrackPlots::fill
void fill(const xAOD::Muon &mu, int component)
Definition
RecoMuonTrackPlots.cxx:26
RecoMuonTrackPlots::m_oTrkRecoInfoPlots
Trk::RecoInfoPlots m_oTrkRecoInfoPlots
Definition
RecoMuonTrackPlots.h:32
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .).
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition
TrackParticle_v1.cxx:75
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition
TrackParticle_v1.cxx:79
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition
Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
xAOD::Muon
Muon_v1 Muon
Reference the current persistent version:
Definition
Event/xAOD/xAODMuon/xAODMuon/Muon.h:13
Generated on
for ATLAS Offline Software by
1.17.0