ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
PFlow
PFlowValidation
PFOHistUtils
src
PFOPlots.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
PFOHistUtils/PFOPlots.h
"
6
#include "
AthenaKernel/Units.h
"
7
8
namespace
PFO
{
9
10
PFOPlots::PFOPlots
(
PlotBase
* pParent,
const
std::string & sDir,
const
std::string & sFEContainerName) :
PlotBase
(pParent, sDir),
m_sFEContainerName
(sFEContainerName){
11
12
}
13
14
void
PFOPlots::initializePlots
(){
15
if
(!
m_sFEContainerName
.empty()){
16
//book Flow Element histograms
17
m_FE_pt
=
Book1D
(
"_Pt"
,
m_sFEContainerName
+
"_Pt (Entries/1 GeV)"
,30,-10.0,20.0);
18
m_FE_eta
=
Book1D
(
"_Eta"
,
m_sFEContainerName
+
"_Eta (Entries/0.1)"
,100,-5.0,5.0);
19
m_FE_phi
=
Book1D
(
"_Phi"
,
m_sFEContainerName
+
"_Phi (Entries/0.1)"
,64,-3.2,3.2);
20
m_FE_m
=
Book1D
(
"_m"
,
m_sFEContainerName
+
"_m (Entries/100 MeV)"
,10,0.0,0.5);
21
m_FE_charge
=
Book1D
(
"_charge"
,
m_sFEContainerName
+
"_charge (Entries/unit charge)"
,5,-2,2);
22
23
m_FE_pt_low
=
Book1D
(
"_Pt_low"
,
m_sFEContainerName
+
"_Pt_low (Entries/1 GeV, pT <= 5 GeV)"
,15,-10.0,5.0);
24
m_FE_pt_middle
=
Book1D
(
"_Pt_middle"
,
m_sFEContainerName
+
"_Pt_middle (Entries/1 GeV), 20 > pT > 5 GeV"
,45,5.0,50.0);
25
m_FE_pt_high
=
Book1D
(
"_Pt_high"
,
m_sFEContainerName
+
"_Pt_high (Entries/1 GeV), Pt > 20 GeV"
,45,5.0,50.0);
26
27
m_FE_pt_etaBinA
=
Book1D
(
"_Pt_A"
,
m_sFEContainerName
+
"_Pt (Entries/1 GeV, |eta| < 1 )"
,30,-10.0,20.0);
28
m_FE_pt_etaBinB
=
Book1D
(
"_Pt_B"
,
m_sFEContainerName
+
"_Pt (Entries/1 GeV, 1 <= |eta| < 2 )"
,30,-10.0,20.0);
29
m_FE_pt_etaBinC
=
Book1D
(
"_Pt_C"
,
m_sFEContainerName
+
"_Pt (Entries/1 GeV, |eta| >= 2 )"
,30,-10.0,20.0);
30
m_FE_eta_posE
=
Book1D
(
"_EtaPosE"
,
m_sFEContainerName
+
"_Eta (E>0) (Entries/0.1)"
,100,-5.0,5.0);
31
}
32
}
33
34
void
PFOPlots::fill
(
const
xAOD::FlowElement
& FE,
const
xAOD::EventInfo
& eventInfo){
35
m_FE_pt
->Fill(FE.
pt
()/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
36
m_FE_eta
->Fill(FE.
eta
(),eventInfo.
beamSpotWeight
());
37
m_FE_phi
->Fill(FE.
phi
(),eventInfo.
beamSpotWeight
());
38
m_FE_m
->Fill(FE.
m
()/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
39
m_FE_charge
->Fill(FE.
charge
(),eventInfo.
beamSpotWeight
());
40
41
if
(FE.
pt
()/Athena::Units::GeV <= 5)
m_FE_pt_low
->Fill(FE.
pt
()/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
42
else
if
(20 >= FE.
pt
()/Athena::Units::GeV && FE.
pt
()/Athena::Units::GeV > 4)
m_FE_pt_middle
->Fill(FE.
pt
()/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
43
else
m_FE_pt_high
->Fill(FE.
pt
()/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
44
45
if
(std::abs(FE.
eta
()) < 1)
m_FE_pt_etaBinA
->Fill(FE.
pt
()/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
46
else
if
(std::abs(FE.
eta
()) < 2)
m_FE_pt_etaBinB
->Fill(FE.
pt
()/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
47
else
m_FE_pt_etaBinC
->Fill(FE.
pt
()/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
48
// additional debug plot: Eta given FlowElem energy>0
49
if
(FE.
e
()>0){
50
m_FE_eta_posE
->Fill(FE.
eta
(),eventInfo.
beamSpotWeight
());
51
}
52
}
53
54
}
PFOPlots.h
Units.h
Wrapper to avoid constant divisions when using units.
PFO::PFOPlots::initializePlots
void initializePlots()
Definition
PFOPlots.cxx:14
PFO::PFOPlots::m_FE_pt_high
TH1 * m_FE_pt_high
Definition
PFOPlots.h:35
PFO::PFOPlots::PFOPlots
PFOPlots(PlotBase *pParent, const std::string &sDir, const std::string &sFEContainerName)
Definition
PFOPlots.cxx:10
PFO::PFOPlots::m_FE_charge
TH1 * m_FE_charge
Definition
PFOPlots.h:30
PFO::PFOPlots::m_sFEContainerName
std::string m_sFEContainerName
Definition
PFOPlots.h:45
PFO::PFOPlots::m_FE_eta
TH1 * m_FE_eta
Definition
PFOPlots.h:27
PFO::PFOPlots::m_FE_pt_etaBinC
TH1 * m_FE_pt_etaBinC
Definition
PFOPlots.h:42
PFO::PFOPlots::m_FE_m
TH1 * m_FE_m
Definition
PFOPlots.h:29
PFO::PFOPlots::m_FE_phi
TH1 * m_FE_phi
Definition
PFOPlots.h:28
PFO::PFOPlots::m_FE_pt_middle
TH1 * m_FE_pt_middle
Definition
PFOPlots.h:34
PFO::PFOPlots::m_FE_eta_posE
TH1 * m_FE_eta_posE
Definition
PFOPlots.h:37
PFO::PFOPlots::m_FE_pt
TH1 * m_FE_pt
Definition
PFOPlots.h:26
PFO::PFOPlots::m_FE_pt_etaBinB
TH1 * m_FE_pt_etaBinB
Definition
PFOPlots.h:41
PFO::PFOPlots::m_FE_pt_low
TH1 * m_FE_pt_low
Pt Hisrogram binned in pt.
Definition
PFOPlots.h:33
PFO::PFOPlots::m_FE_pt_etaBinA
TH1 * m_FE_pt_etaBinA
Pt Histogram binned in eta.
Definition
PFOPlots.h:40
PFO::PFOPlots::fill
void fill(const xAOD::FlowElement &FE, const xAOD::EventInfo &eventInfo)
Definition
PFOPlots.cxx:34
PlotBase::Book1D
TH1D * Book1D(std::string_view name, std::string_view labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition
PlotBase.cxx:94
PlotBase::PlotBase
PlotBase(PlotBase *parent, std::string_view sDir)
Definition
PlotBase.cxx:29
xAOD::EventInfo_v1::beamSpotWeight
float beamSpotWeight() const
Weight for beam spot size reweighting.
Definition
EventInfo_v1.cxx:970
xAOD::FlowElement_v1::pt
virtual double pt() const override
xAOD::FlowElement_v1::m
virtual double m() const override
The invariant mass of the particle.
xAOD::FlowElement_v1::phi
virtual double phi() const override
The azimuthal angle ( ) of the particle.
xAOD::FlowElement_v1::eta
virtual double eta() const override
The pseudorapidity ( ) of the particle.
xAOD::FlowElement_v1::charge
float charge() const
xAOD::FlowElement_v1::e
virtual double e() const override
The total energy of the particle.
Definition
FlowElement_v1.cxx:25
PFO
Definition
ClusterMomentPlots.h:15
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
xAOD::FlowElement
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition
FlowElement.h:16
Generated on
for ATLAS Offline Software by
1.17.0