ATLAS Offline Software
InDetPerfPlot_VerticesVsMu.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
13 #include "xAODTracking/Vertex.h"
17 
19  const std::string& sDir):
20  InDetPlotBase(pParent, sDir)
21 {
22  // nop
23 }
24 
25 void
27 
28  book(m_vx_n_vs_truthMu, "vx_n_vs_truthMu");
29  book(m_vx_n_vs_actualMu, "vx_n_vs_actualMu");
30 }
31 
32 void
33 InDetPerfPlot_VerticesVsMu::fill(const xAOD::VertexContainer& vertices, unsigned int truthMu, float actualMu, float weight) {
34  // fill number of vertices
35  int nGoodVertices(0);
36 
37  for (const auto& vtx : vertices.stdcont()) {
38  if (vtx->vertexType() == xAOD::VxType::NoVtx) {
39  continue; // skip dummy vertex
40  }
41  nGoodVertices++;
42  }
43 
44  fillHisto(m_vx_n_vs_truthMu, nGoodVertices, truthMu, weight);
45  fillHisto(m_vx_n_vs_actualMu, nGoodVertices, actualMu, weight);
46 
47 }
InDetPlotBase::book
void book(Htype *&pHisto, const std::string &histoIdentifier, const std::string &nameOverride="", const std::string &folder="default")
Helper method to book histograms using an identifier string.
InDetPerfPlot_VerticesVsMu::m_vx_n_vs_truthMu
TH2 * m_vx_n_vs_truthMu
Definition: InDetPerfPlot_VerticesVsMu.h:34
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
InDetPerfPlot_VerticesVsMu::fill
void fill(const xAOD::VertexContainer &vertices, unsigned int truthMu, float actualMu, float weight=1.0)
Definition: InDetPerfPlot_VerticesVsMu.cxx:33
EventPrimitivesHelpers.h
InDetPerfPlot_VerticesVsMu::initializePlots
void initializePlots()
Definition: InDetPerfPlot_VerticesVsMu.cxx:26
InDetPerfPlot_VerticesVsMu::InDetPerfPlot_VerticesVsMu
InDetPerfPlot_VerticesVsMu(InDetPlotBase *pParent, const std::string &dirName)
Definition: InDetPerfPlot_VerticesVsMu.cxx:18
xAOD::VxType::NoVtx
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
Definition: TrackingPrimitives.h:570
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
InDetPlotBase
Mixin class to give extra capabilities to plots such as ATH_MSG and an easier booking interface,...
Definition: InDetPlotBase.h:33
InDetPerfPlot_VerticesVsMu::m_vx_n_vs_actualMu
TH2 * m_vx_n_vs_actualMu
Definition: InDetPerfPlot_VerticesVsMu.h:35
InDetPerfPlot_VerticesVsMu.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
Vertex.h
EventPrimitives.h
TrackParticle.h
DataVector::stdcont
const PtrVector & stdcont() const
Return the underlying std::vector of the container.
VertexContainer.h
InDetPlotBase::fillHisto
static void fillHisto(TProfile *pTprofile, const float bin, const float weight, const float weight2=1.0)
Definition: InDetPlotBase.cxx:82
TrackParticleContainer.h