ATLAS Offline Software
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 
9 RecoVertexPlots::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 }
TH2::Fill
int Fill(double, double)
Definition: rootspy.cxx:382
xAOD::Vertex_v1::x
float x() const
Returns the x position.
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
RecoVertexPlots::RecoVertexPlots
RecoVertexPlots(PlotBase *pParent, const std::string &sDir)
Definition: RecoVertexPlots.cxx:9
PlotBase
Definition: PlotBase.h:33
RecoVertexPlots::m_nMDT
TH1 * m_nMDT
Definition: RecoVertexPlots.h:18
RecoVertexPlots::fill
void fill(const xAOD::Vertex &msVx)
Definition: RecoVertexPlots.cxx:28
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
RecoVertexPlots::m_nRPC
TH1 * m_nRPC
Definition: RecoVertexPlots.h:19
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
SG::ConstAccessor< int >
RecoVertexPlots::m_nTracklets
TH1 * m_nTracklets
Definition: RecoVertexPlots.h:21
xAOD::Vertex_v1::z
float z() const
Returns the z position.
TH1::Fill
int Fill(double)
Definition: rootspy.cxx:285
RecoVertexPlots::m_nTGC
TH1 * m_nTGC
Definition: RecoVertexPlots.h:20
RecoVertexPlots::m_VertexEtaPhi
TH2 * m_VertexEtaPhi
Definition: RecoVertexPlots.h:22
xAOD::Vertex_v1::numberDoF
float numberDoF() const
Returns the number of degrees of freedom of the vertex fit as float.
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
xAOD::Vertex_v1::y
float y() const
Returns the y position.
RecoVertexPlots.h
ConstAccessor.h
Helper class to provide constant type-safe access to aux data.
RecoVertexPlots::initializePlots
void initializePlots()
Definition: RecoVertexPlots.cxx:17