ATLAS Offline Software
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 
9 #include "xAODBase/IParticle.h"
10 #include "xAODTruth/TruthVertex.h"
11 namespace 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, std::string sDir, 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 
29  void fillProdVtx(const xAOD::TruthVertex* vtx)
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
IParticle.h
PlotBase
Definition: PlotBase.h:34
GeneratorPhysVal::GeneratorProductionVertexPlots
Definition: GeneratorProductionVertexPlots.h:14
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
GeneratorPhysVal::GeneratorProductionVertexPlots::prod_x
TH1 * prod_x
Definition: GeneratorProductionVertexPlots.h:17
GeneratorPhysVal::GeneratorProductionVertexPlots::prod_y
TH1 * prod_y
Definition: GeneratorProductionVertexPlots.h:18
xAOD::TruthVertex_v1::y
float y() const
Vertex y displacement.
PlotBase::Book1D
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
GeneratorPhysVal::GeneratorProductionVertexPlots::GeneratorProductionVertexPlots
GeneratorProductionVertexPlots(PlotBase *pParent, std::string sDir, std::string sType="")
Definition: GeneratorProductionVertexPlots.h:20
xAOD::TruthVertex_v1::perp
float perp() const
Vertex transverse distance from the beam line.
Definition: TruthVertex_v1.cxx:163
TruthVertex.h
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:37
GeneratorPhysVal::GeneratorProductionVertexPlots::prod_r
TH1 * prod_r
Definition: GeneratorProductionVertexPlots.h:16
xAOD::TruthVertex_v1::x
float x() const
Vertex x displacement.
GeneratorPhysVal::GeneratorProductionVertexPlots::prod_z
TH1 * prod_z
Definition: GeneratorProductionVertexPlots.h:19
xAOD::TruthVertex_v1::z
float z() const
Vertex longitudinal distance along the beam line form the origin.
GeneratorPhysVal
Definition: GeneratorEventInfo.cxx:7
PlotBase.h
GeneratorPhysVal::GeneratorProductionVertexPlots::fillProdVtx
void fillProdVtx(const xAOD::TruthVertex *vtx)
Definition: GeneratorProductionVertexPlots.h:29
GeneratorPhysVal::GeneratorProductionVertexPlots::m_sType
std::string m_sType
Definition: GeneratorProductionVertexPlots.h:40