ATLAS Offline Software
Tracking/TrkValidation/TrkValHistUtils/Root/RecoInfoPlots.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "TMath.h"
7 
8 namespace Trk {
9  void
11  trackfitchi2 = nullptr;
12  trackfitndof = nullptr;
13  trackcon = nullptr;
14  trackchi2prob = nullptr;
15  }
16 
17  void
19  trackfitchi2 = Book1D("tchi2" + m_sType, m_sType + " Track fit chi2;Track Fit Chi2;Entries", 100, 0., 100.);
20  trackfitndof = Book1D("tndof" + m_sType, m_sType + " Track fit ndof;Number of degrees of freedom;Entries", 101,
21  -0.5, 100.5);
22  trackcon = Book1D("chi2ndof" + m_sType, m_sType + " Track fit chi2/ndof;Track fit chi2/ndof;Entries", 100, 0, 5);
23  trackchi2prob = Book1D("chi2prob" + m_sType, m_sType + " Track fit chi2 probability;Track fit p(#chi^2);Entries",
24  20, 0., 1.);
25  }
26 
27  void
29  float chi2 = trkprt.chiSquared();
30  int ndf = trkprt.numberDoF();
31 
32  trackfitchi2->Fill(chi2,weight);
33  trackfitndof->Fill(ndf,weight);
34  trackcon->Fill(chi2 / ndf, weight);
35  trackchi2prob->Fill(TMath::Prob(chi2, ndf), weight);
36  }
37 }
covarianceTool.ndf
ndf
Definition: covarianceTool.py:678
RecoInfoPlots.h
xAOD::TrackParticle_v1::chiSquared
float chiSquared() const
Returns the of the overall track fit.
Trk::RecoInfoPlots::trackfitndof
TH1 * trackfitndof
Definition: Tracking/TrkValidation/TrkValHistUtils/TrkValHistUtils/RecoInfoPlots.h:19
Trk::RecoInfoPlots::initializePlots
void initializePlots()
Definition: Tracking/TrkValidation/TrkValHistUtils/Root/RecoInfoPlots.cxx:18
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
PlotBase::Book1D
TH1D * 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:94
Trk::RecoInfoPlots::m_sType
std::string m_sType
Definition: Tracking/TrkValidation/TrkValHistUtils/TrkValHistUtils/RecoInfoPlots.h:24
Trk::RecoInfoPlots::init
void init()
Definition: Tracking/TrkValidation/TrkValHistUtils/Root/RecoInfoPlots.cxx:10
Trk::RecoInfoPlots::trackfitchi2
TH1 * trackfitchi2
Definition: Tracking/TrkValidation/TrkValHistUtils/TrkValHistUtils/RecoInfoPlots.h:18
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:523
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::RecoInfoPlots::trackcon
TH1 * trackcon
Definition: Tracking/TrkValidation/TrkValHistUtils/TrkValHistUtils/RecoInfoPlots.h:20
Trk::RecoInfoPlots::trackchi2prob
TH1 * trackchi2prob
Definition: Tracking/TrkValidation/TrkValHistUtils/TrkValHistUtils/RecoInfoPlots.h:21
Trk::RecoInfoPlots::fill
void fill(const xAOD::TrackParticle &trkprt, float weight=1.0)
Definition: Tracking/TrkValidation/TrkValHistUtils/Root/RecoInfoPlots.cxx:28
xAOD::TrackParticle_v1::numberDoF
float numberDoF() const
Returns the number of degrees of freedom of the overall track or vertex fit as float.
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43