ATLAS Offline Software
Loading...
Searching...
No Matches
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
9
13#include "xAODTracking/Vertex.h"
17
19 const std::string& sDir):
20 InDetPlotBase(pParent, sDir)
21{
22 // nop
23}
24
25void
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
32void
33InDetPerfPlot_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}
const PtrVector & stdcont() const
Return the underlying std::vector of the container.
void fill(const xAOD::VertexContainer &vertices, unsigned int truthMu, float actualMu, float weight=1.0)
InDetPerfPlot_VerticesVsMu(InDetPlotBase *pParent, const std::string &dirName)
static void fillHisto(TProfile *pTprofile, const float bin, const float weight, const float weight2=1.0)
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.
InDetPlotBase(InDetPlotBase *pParent, const std::string &dirName)
Constructor taking parent node and directory name for plots.
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".