ATLAS Offline Software
Loading...
Searching...
No Matches
RecoVertexPlots.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8
9RecoVertexPlots::RecoVertexPlots(PlotBase *pParent, const std::string& sDir):PlotBase(pParent, sDir),
10 m_nMDT(nullptr),
11 m_nRPC(nullptr),
12 m_nTGC(nullptr),
13 m_nTracklets(nullptr),
14 m_VertexEtaPhi(nullptr)
15{}
16
18
19 m_nMDT = Book1D("m_MSVx_nMDT", "m MSVx nMDT: M MSVx MDT Hits;;N_{MDT}", 100, 0.0, 3000.);
20 m_nRPC = Book1D("m_MSVx_nRPC", "m MSVx nRPC: M MSVx RPC Hits;;N_{RPC}", 100, 0.0, 1000.);
21 m_nTGC = Book1D("m_MSVx_nTGC", "m MSVx nTGC: M MSVx TGC Hits;;N_{TGC}", 100, 0.0, 1000.);
22
23 m_nTracklets = Book1D("m_MSVx_nTracklets", "MSVx nTracklets: M MSVx Number of Tracklets; N_{trackletS}", 20, 0.0, 20.);
24 m_VertexEtaPhi = Book2D("m_VertexEtaPhi", "Vertex Eta Phi: M MSVx #eta vs. #phi; #eta; #phi", 25, -2.5, 25, 32, -3.2, 3.2);
25
26}
27
29 TVector3 tmp_vx; tmp_vx.SetXYZ(msVx.x(),msVx.y(),msVx.z());
30 static const SG::ConstAccessor< int > nMDTAcc( "nMDT" );
31 static const SG::ConstAccessor< int > nRPCAcc( "nRPC" );
32 static const SG::ConstAccessor< int > nTGCAcc( "nTGC" );
33 m_nMDT->Fill(nMDTAcc(msVx));
34 m_nRPC->Fill(nRPCAcc(msVx));
35 m_nTGC->Fill(nTGCAcc(msVx));
36 m_nTracklets->Fill(msVx.numberDoF()+1.);
37 m_VertexEtaPhi->Fill(tmp_vx.Eta(),tmp_vx.Phi());
38}
Helper class to provide constant type-safe access to aux data.
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
PlotBase(PlotBase *parent, const std::string &sDir)
Definition PlotBase.cxx:29
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 TH2F histogram.
Definition PlotBase.cxx:123
void fill(const xAOD::Vertex &msVx)
RecoVertexPlots(PlotBase *pParent, const std::string &sDir)
float z() const
Returns the z position.
float y() const
Returns the y position.
float numberDoF() const
Returns the number of degrees of freedom of the vertex fit as float.
float x() const
Returns the x position.
Vertex_v1 Vertex
Define the latest version of the vertex class.