ATLAS Offline Software
Loading...
Searching...
No Matches
GeneratorProductionVertexPlots.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef GeneratorPhysValVtxPlots_GeneratorProductionVertexPlots_H
6#define GeneratorPhysValVtxPlots_GeneratorProductionVertexPlots_H
7
11namespace GeneratorPhysVal
12{
14 {
15 public:
16 TH1* prod_r = nullptr;
17 TH1* prod_x = nullptr;
18 TH1* prod_y = nullptr;
19 TH1* prod_z = nullptr;
20 GeneratorProductionVertexPlots(PlotBase* pParent, const std::string& sDir, const std::string& sType = ""): PlotBase(pParent, sDir), m_sType(sType)
21 {
22 prod_r = Book1D("prod_r", "prod_r" + m_sType + ";r;Entries", 600, -300., 300.);
23 prod_x = Book1D("prod_x", "prod_x" + m_sType + ";x;Entries", 100, -50., 50.);
24 prod_y = Book1D("prod_y", "prod_y" + m_sType + ";y;Entries", 100, -50., 50.);
25 prod_z = Book1D("prod_z", "prod_z" + m_sType + ";z;Entries", 2000, -1000., 1000.);
26
27 }
28
30 {
31 prod_r->Fill(vtx->perp());
32 prod_x->Fill(vtx->x());
33 prod_y->Fill(vtx->y());
34 prod_z->Fill(vtx->z());
35 }
36
37
38
39 private:
40 std::string m_sType = "";
41 };
42
43}
44
45#endif
GeneratorProductionVertexPlots(PlotBase *pParent, const std::string &sDir, const std::string &sType="")
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
float z() const
Vertex longitudinal distance along the beam line form the origin.
float y() const
Vertex y displacement.
float perp() const
Vertex transverse distance from the beam line.
float x() const
Vertex x displacement.
TruthVertex_v1 TruthVertex
Typedef to implementation.
Definition TruthVertex.h:15