ATLAS Offline Software
RecoMuonIDTrackPlots.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 RecoMuonIDTrackPlots::RecoMuonIDTrackPlots(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_oIDHitPlots(this,"/"),
12 m_pt_broad(nullptr),
13 m_eta_phi_broad(nullptr)
14 {}
15 
17  //booking histograms
18  m_pt_broad = Book1D("_pt_broad", "High p_{T} Distribution", 70, 100, 1500);
19  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);
20 }
21 
22 //when the plot function called with a Muon Container
23 //loop through each muon, get the corresponding link and fill it
24 
25 //when the plot function called with a Muon
26 //get's the corresponding link and fill it
27 void RecoMuonIDTrackPlots::fill(const xAOD::Muon& mu, int component){
28  if (component == 2 ){
29  const ElementLink<xAOD::TrackParticleContainer>& Mu_idtrack = mu.inDetTrackParticleLink();
30  if(Mu_idtrack.isValid()){
31  const xAOD::TrackParticle* trk = *Mu_idtrack;
32  fill(*trk);
33  }
34  }
35 }
36 
37 
39  m_oAllPlots.fill(muTP);
40  m_oImpactPlots.fill(muTP);
42  m_oIDHitPlots.fill(muTP);
43  if (muTP.pt()/1000.0 > 100) {//ony for high pt muons
44  m_pt_broad->Fill(muTP.pt()/1000.0);
45  m_eta_phi_broad->Fill(muTP.eta(), muTP.phi());
46  }
47 
48 }
49 
50 
Trk::ParamPlots::fill
void fill(const xAOD::IParticle &prt, float weight=1.0)
Definition: Tracking/TrkValidation/TrkValHistUtils/Root/ParamPlots.cxx:40
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
TH2::Fill
int Fill(double, double)
Definition: rootspy.cxx:382
RecoMuonIDTrackPlots::m_oAllPlots
Trk::ParamPlots m_oAllPlots
Definition: RecoMuonIDTrackPlots.h:25
RecoMuonIDTrackPlots::m_pt_broad
TH1 * m_pt_broad
Definition: RecoMuonIDTrackPlots.h:30
PlotBase::Book1D
TH1F * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition: PlotBase.cxx:88
PlotBase
Definition: PlotBase.h:33
RecoMuonIDTrackPlots::initializePlots
void initializePlots()
Definition: RecoMuonIDTrackPlots.cxx:16
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
PlotBase::Book2D
TH2F * Book2D(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
Book a TH2D histogram.
Definition: PlotBase.cxx:117
RecoMuonIDTrackPlots::m_oTrkRecoInfoPlots
Trk::RecoInfoPlots m_oTrkRecoInfoPlots
Definition: RecoMuonIDTrackPlots.h:27
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
RecoMuonIDTrackPlots::m_oImpactPlots
Trk::ImpactPlots m_oImpactPlots
Definition: RecoMuonIDTrackPlots.h:26
RecoMuonIDTrackPlots::m_oIDHitPlots
Trk::IDHitPlots m_oIDHitPlots
Definition: RecoMuonIDTrackPlots.h:28
TH1::Fill
int Fill(double)
Definition: rootspy.cxx:285
RecoMuonIDTrackPlots::fill
void fill(const xAOD::Muon &mu, int component)
Definition: RecoMuonIDTrackPlots.cxx:27
Trk::IDHitPlots::fill
void fill(const xAOD::TrackParticle &trk)
Definition: IDHitPlots.cxx:86
RecoMuonIDTrackPlots::m_eta_phi_broad
TH2 * m_eta_phi_broad
Definition: RecoMuonIDTrackPlots.h:31
Trk::RecoInfoPlots::fill
void fill(const xAOD::TrackParticle &trkprt, float weight=1.0)
Definition: Tracking/TrkValidation/TrkValHistUtils/Root/RecoInfoPlots.cxx:28
RecoMuonIDTrackPlots.h
Trk::ImpactPlots::fill
void fill(const xAOD::TrackParticle &trkprt, float weight=1.0)
Definition: ImpactPlots.cxx:27
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
RecoMuonIDTrackPlots::RecoMuonIDTrackPlots
RecoMuonIDTrackPlots(PlotBase *pParent, const std::string &sDir)
Definition: RecoMuonIDTrackPlots.cxx:7
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)