ATLAS Offline Software
PhysicsAnalysis
PhysicsValidation
GeneratorPhysVal
src
GeneratorPlots.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 GeneratorPhysValPlots_GeneratorPlots_H
6
#define GeneratorPhysValPlots_GeneratorPlots_H
7
8
#include "
TrkValHistUtils/PlotBase.h
"
9
#include "
xAODBase/IParticle.h
"
10
11
namespace
GeneratorPhysVal
12
{
13
class
GeneratorPlots
:
public
PlotBase
14
{
15
public
:
16
TH1*
pT
=
nullptr
;
17
TH1*
eta
=
nullptr
;
18
TH1*
phi
=
nullptr
;
19
20
GeneratorPlots
(
PlotBase
* pParent,
const
std::string&
sDir
,
const
std::string& sType =
""
):
PlotBase
(pParent,
sDir
),
m_sType
(sType)
21
{
22
pT
=
Book1D
(
"pT"
,
"p_{T} of "
+
m_sType
+
";pT(GeV);Entries"
, 15, 0., 15.);
23
eta
=
Book1D
(
"eta"
,
"#eta of "
+
m_sType
+
";#eta; Events "
, 400, -10, 10.);
24
phi
=
Book1D
(
"phi"
,
"#varphi of "
+
m_sType
+
";#varphi;Events "
, 128, -3.2, 3.2);
25
}
26
27
void
fill
(
const
xAOD::IParticle
*
part
)
28
{
29
pT
->Fill(0.001 *
part
->pt());
30
eta
->Fill(
part
->eta());
31
phi
->Fill(
part
->phi());
32
}
33
34
void
fill
(
const
std::vector< TLorentzVector >&
part
)
35
{
36
for
(
const
auto
&parti :
part
){
37
pT
->Fill(0.001 * parti.Pt());
38
eta
->Fill(parti.Eta());
39
phi
->Fill(parti.Phi());
40
}
41
}
42
43
44
45
private
:
46
std::string
m_sType
=
""
;
47
};
48
49
}
50
51
#endif
LArG4FSStartPointFilter.part
part
Definition:
LArG4FSStartPointFilter.py:21
IParticle.h
PlotBase
Definition:
PlotBase.h:34
python.copyTCTOutput.sDir
sDir
Definition:
copyTCTOutput.py:60
GeneratorPhysVal::GeneratorPlots::m_sType
std::string m_sType
Definition:
GeneratorPlots.h:46
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition:
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
GeneratorPhysVal::GeneratorPlots::eta
TH1 * eta
Definition:
GeneratorPlots.h:17
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::GeneratorPlots::phi
TH1 * phi
Definition:
GeneratorPlots.h:18
GeneratorPhysVal::GeneratorPlots::pT
TH1 * pT
Definition:
GeneratorPlots.h:16
GeneratorPhysVal::GeneratorPlots::fill
void fill(const xAOD::IParticle *part)
Definition:
GeneratorPlots.h:27
GeneratorPhysVal::GeneratorPlots::fill
void fill(const std::vector< TLorentzVector > &part)
Definition:
GeneratorPlots.h:34
GeneratorPhysVal::GeneratorPlots::GeneratorPlots
GeneratorPlots(PlotBase *pParent, const std::string &sDir, const std::string &sType="")
Definition:
GeneratorPlots.h:20
GeneratorPhysVal::GeneratorPlots
Definition:
GeneratorPlots.h:14
GeneratorPhysVal
Definition:
GeneratorEventInfo.cxx:7
PlotBase.h
Generated on Sun Dec 22 2024 21:10:45 for ATLAS Offline Software by
1.8.18