ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
PFlow
PFlowValidation
PFOHistUtils
src
PFOCalibHitClusterMomentPlots.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
PFOHistUtils/PFOCalibHitClusterMomentPlots.h
"
6
7
namespace
PFO
{
8
PFOCalibHitClusterMomentPlots::PFOCalibHitClusterMomentPlots
(
PlotBase
* pParent,
const
std::string & sDir,
const
std::string & sPFOContainerName,
const
std::string & sFEContainerName) :
PlotBase
(pParent, sDir),
m_sPFOContainerName
(sPFOContainerName),
m_sFEContainerName
(sFEContainerName){
9
}
10
11
void
PFOCalibHitClusterMomentPlots::initializePlots
(){
12
if
(!
m_sPFOContainerName
.empty()){
13
m_PFO_ENG_CALIB_FRAC_EM
=
Book1D
(
"_ENG_CALIB_FRAC_EM"
,
m_sPFOContainerName
+
"_ENG_CALIB_FRAC_EM"
,22,0,1.1);
14
m_PFO_ENG_CALIB_FRAC_HAD
=
Book1D
(
"_ENG_CALIB_FRAC_HAD"
,
m_sPFOContainerName
+
"_ENG_CALIB_FRAC_HAD"
,22,0,1.1);
15
m_PFO_ENG_CALIB_FRAC_REST
=
Book1D
(
"_ENG_CALIB_FRAC_REST"
,
m_sPFOContainerName
+
"_ENG_CALIB_FRAC_REST"
,22,0,1.1);
16
17
m_PFO_ENG_CALIB_FRAC_EM_etaBinA
=
Book1D
(
"_ENG_CALIB_FRAC_EM_A"
,
m_sPFOContainerName
+
"_ENG_CALIB_FRAC_EM (|eta| < 1.5)"
,22,0,1.1);
18
m_PFO_ENG_CALIB_FRAC_HAD_etaBinA
=
Book1D
(
"_ENG_CALIB_FRAC_HAD_A"
,
m_sPFOContainerName
+
"_ENG_CALIB_FRAC_HAD (|eta| < 1.5)"
,22,0,1.1);
19
m_PFO_ENG_CALIB_FRAC_REST_etaBinA
=
Book1D
(
"_ENG_CALIB_FRAC_REST_A"
,
m_sPFOContainerName
+
"_ENG_CALIB_FRAC_REST (|eta| < 1.5)"
,22,0,1.1);
20
21
m_PFO_ENG_CALIB_FRAC_EM_etaBinB
=
Book1D
(
"_ENG_CALIB_FRAC_EM_B"
,
m_sPFOContainerName
+
"_ENG_CALIB_FRAC_EM (1.5 <= |eta| < 2.5)"
,22,0,1.1);
22
m_PFO_ENG_CALIB_FRAC_HAD_etaBinB
=
Book1D
(
"_ENG_CALIB_FRAC_HAD_B"
,
m_sPFOContainerName
+
"_ENG_CALIB_FRAC_HAD (1.5 <= |eta| < 2.5)"
,22,0,1.1);
23
m_PFO_ENG_CALIB_FRAC_REST_etaBinB
=
Book1D
(
"_ENG_CALIB_FRAC_REST_B"
,
m_sPFOContainerName
+
"_ENG_CALIB_FRAC_REST (1.5 <= |eta| < 2.5)"
,22,0,1.1);
24
25
m_PFO_ENG_CALIB_FRAC_EM_etaBinC
=
Book1D
(
"_ENG_CALIB_FRAC_EM_C"
,
m_sPFOContainerName
+
"_ENG_CALIB_FRAC_EM (2.5 <= |eta| < 3.2)"
,22,0,1.1);
26
m_PFO_ENG_CALIB_FRAC_HAD_etaBinC
=
Book1D
(
"_ENG_CALIB_FRAC_HAD_C"
,
m_sPFOContainerName
+
"_ENG_CALIB_FRAC_HAD (2.5 <= |eta| < 3.2)"
,22,0,1.1);
27
m_PFO_ENG_CALIB_FRAC_REST_etaBinC
=
Book1D
(
"_ENG_CALIB_FRAC_REST_C"
,
m_sPFOContainerName
+
"_ENG_CALIB_FRAC_REST (2.5 <= |eta| < 3.2)"
,22,0,1.1);
28
29
m_PFO_ENG_CALIB_FRAC_EM_etaBinD
=
Book1D
(
"_ENG_CALIB_FRAC_EM_D"
,
m_sPFOContainerName
+
"_ENG_CALIB_FRAC_EM (|eta| >= 3.2)"
,22,0,1.1);
30
m_PFO_ENG_CALIB_FRAC_HAD_etaBinD
=
Book1D
(
"_ENG_CALIB_FRAC_HAD_D"
,
m_sPFOContainerName
+
"_ENG_CALIB_FRAC_HAD (|eta| >= 3.2)"
,22,0,1.1);
31
m_PFO_ENG_CALIB_FRAC_REST_etaBinD
=
Book1D
(
"_ENG_CALIB_FRAC_REST_D"
,
m_sPFOContainerName
+
"_ENG_CALIB_FRAC_REST (|eta| >= 3.2)"
,22,0,1.1);
32
}
33
if
(!
m_sFEContainerName
.empty()){
34
std::cout<<
"PFOCalibHitClusterMomentPlots: You're trying to book histograms for flow elements based on calibration hits which are not available in most MC samples - sorry"
<<std::endl;
35
}
36
}
37
38
void
PFOCalibHitClusterMomentPlots::fill
(
const
xAOD::PFO
&
PFO
,
const
xAOD::EventInfo
& eventInfo){
39
40
float
moment_ENG_CALIB_FRAC_EM = -1.0;
41
PFO
.getClusterMoment(moment_ENG_CALIB_FRAC_EM,
xAOD::CaloCluster::ENG_CALIB_FRAC_EM
);
42
m_PFO_ENG_CALIB_FRAC_EM
->Fill(moment_ENG_CALIB_FRAC_EM,eventInfo.
beamSpotWeight
());
43
44
float
moment_ENG_CALIB_FRAC_HAD = -1.0;
45
PFO
.getClusterMoment(moment_ENG_CALIB_FRAC_HAD,
xAOD::CaloCluster::ENG_CALIB_FRAC_HAD
);
46
m_PFO_ENG_CALIB_FRAC_HAD
->Fill(moment_ENG_CALIB_FRAC_HAD,eventInfo.
beamSpotWeight
());
47
48
float
moment_ENG_CALIB_FRAC_REST = -1.0;
49
PFO
.getClusterMoment(moment_ENG_CALIB_FRAC_REST,
xAOD::CaloCluster::ENG_CALIB_FRAC_REST
);
50
m_PFO_ENG_CALIB_FRAC_REST
->Fill(moment_ENG_CALIB_FRAC_REST,eventInfo.
beamSpotWeight
());
51
52
float
PFOEta =
PFO
.eta();
53
54
if
(std::abs(PFOEta) < 1.5){
55
m_PFO_ENG_CALIB_FRAC_EM_etaBinA
->Fill(moment_ENG_CALIB_FRAC_EM,eventInfo.
beamSpotWeight
());
56
m_PFO_ENG_CALIB_FRAC_HAD_etaBinA
->Fill(moment_ENG_CALIB_FRAC_HAD,eventInfo.
beamSpotWeight
());
57
m_PFO_ENG_CALIB_FRAC_REST_etaBinA
->Fill(moment_ENG_CALIB_FRAC_REST),eventInfo.
beamSpotWeight
();
58
}
//|eta| < 1.5
59
else
if
(std::abs(PFOEta) < 2.5){
60
m_PFO_ENG_CALIB_FRAC_EM_etaBinB
->Fill(moment_ENG_CALIB_FRAC_EM,eventInfo.
beamSpotWeight
());
61
m_PFO_ENG_CALIB_FRAC_HAD_etaBinB
->Fill(moment_ENG_CALIB_FRAC_HAD,eventInfo.
beamSpotWeight
());
62
m_PFO_ENG_CALIB_FRAC_REST_etaBinB
->Fill(moment_ENG_CALIB_FRAC_REST,eventInfo.
beamSpotWeight
());
63
}
64
else
if
(std::abs(PFOEta) < 3.2){
65
m_PFO_ENG_CALIB_FRAC_EM_etaBinC
->Fill(moment_ENG_CALIB_FRAC_EM,eventInfo.
beamSpotWeight
());
66
m_PFO_ENG_CALIB_FRAC_HAD_etaBinC
->Fill(moment_ENG_CALIB_FRAC_HAD,eventInfo.
beamSpotWeight
());
67
m_PFO_ENG_CALIB_FRAC_REST_etaBinC
->Fill(moment_ENG_CALIB_FRAC_REST,eventInfo.
beamSpotWeight
());
68
}
69
else
{
70
m_PFO_ENG_CALIB_FRAC_EM_etaBinD
->Fill(moment_ENG_CALIB_FRAC_EM,eventInfo.
beamSpotWeight
());
71
m_PFO_ENG_CALIB_FRAC_HAD_etaBinD
->Fill(moment_ENG_CALIB_FRAC_HAD,eventInfo.
beamSpotWeight
());
72
m_PFO_ENG_CALIB_FRAC_REST_etaBinD
->Fill(moment_ENG_CALIB_FRAC_REST,eventInfo.
beamSpotWeight
());
73
}
74
75
}
76
}
PFOCalibHitClusterMomentPlots.h
PFO::PFOCalibHitClusterMomentPlots::m_PFO_ENG_CALIB_FRAC_REST_etaBinB
TH1 * m_PFO_ENG_CALIB_FRAC_REST_etaBinB
Definition
PFOCalibHitClusterMomentPlots.h:37
PFO::PFOCalibHitClusterMomentPlots::m_PFO_ENG_CALIB_FRAC_REST_etaBinA
TH1 * m_PFO_ENG_CALIB_FRAC_REST_etaBinA
Definition
PFOCalibHitClusterMomentPlots.h:33
PFO::PFOCalibHitClusterMomentPlots::m_PFO_ENG_CALIB_FRAC_HAD_etaBinB
TH1 * m_PFO_ENG_CALIB_FRAC_HAD_etaBinB
Definition
PFOCalibHitClusterMomentPlots.h:36
PFO::PFOCalibHitClusterMomentPlots::m_PFO_ENG_CALIB_FRAC_EM_etaBinD
TH1 * m_PFO_ENG_CALIB_FRAC_EM_etaBinD
Definition
PFOCalibHitClusterMomentPlots.h:43
PFO::PFOCalibHitClusterMomentPlots::m_PFO_ENG_CALIB_FRAC_HAD
TH1 * m_PFO_ENG_CALIB_FRAC_HAD
Definition
PFOCalibHitClusterMomentPlots.h:27
PFO::PFOCalibHitClusterMomentPlots::m_PFO_ENG_CALIB_FRAC_EM_etaBinB
TH1 * m_PFO_ENG_CALIB_FRAC_EM_etaBinB
Definition
PFOCalibHitClusterMomentPlots.h:35
PFO::PFOCalibHitClusterMomentPlots::m_PFO_ENG_CALIB_FRAC_HAD_etaBinA
TH1 * m_PFO_ENG_CALIB_FRAC_HAD_etaBinA
Definition
PFOCalibHitClusterMomentPlots.h:32
PFO::PFOCalibHitClusterMomentPlots::m_PFO_ENG_CALIB_FRAC_HAD_etaBinD
TH1 * m_PFO_ENG_CALIB_FRAC_HAD_etaBinD
Definition
PFOCalibHitClusterMomentPlots.h:44
PFO::PFOCalibHitClusterMomentPlots::fill
void fill(const xAOD::PFO &PFO, const xAOD::EventInfo &eventInfo)
Definition
PFOCalibHitClusterMomentPlots.cxx:38
PFO::PFOCalibHitClusterMomentPlots::m_PFO_ENG_CALIB_FRAC_REST
TH1 * m_PFO_ENG_CALIB_FRAC_REST
Definition
PFOCalibHitClusterMomentPlots.h:28
PFO::PFOCalibHitClusterMomentPlots::m_PFO_ENG_CALIB_FRAC_EM
TH1 * m_PFO_ENG_CALIB_FRAC_EM
Histograms inclusive in eta.
Definition
PFOCalibHitClusterMomentPlots.h:26
PFO::PFOCalibHitClusterMomentPlots::m_PFO_ENG_CALIB_FRAC_REST_etaBinD
TH1 * m_PFO_ENG_CALIB_FRAC_REST_etaBinD
Definition
PFOCalibHitClusterMomentPlots.h:45
PFO::PFOCalibHitClusterMomentPlots::m_PFO_ENG_CALIB_FRAC_REST_etaBinC
TH1 * m_PFO_ENG_CALIB_FRAC_REST_etaBinC
Definition
PFOCalibHitClusterMomentPlots.h:41
PFO::PFOCalibHitClusterMomentPlots::PFOCalibHitClusterMomentPlots
PFOCalibHitClusterMomentPlots(PlotBase *pParent, const std::string &sDir, const std::string &sPFOContainerName, const std::string &sFEContainerName)
Definition
PFOCalibHitClusterMomentPlots.cxx:8
PFO::PFOCalibHitClusterMomentPlots::initializePlots
void initializePlots()
Definition
PFOCalibHitClusterMomentPlots.cxx:11
PFO::PFOCalibHitClusterMomentPlots::m_PFO_ENG_CALIB_FRAC_EM_etaBinA
TH1 * m_PFO_ENG_CALIB_FRAC_EM_etaBinA
Same histograms binned in eta regions.
Definition
PFOCalibHitClusterMomentPlots.h:31
PFO::PFOCalibHitClusterMomentPlots::m_sPFOContainerName
std::string m_sPFOContainerName
Definition
PFOCalibHitClusterMomentPlots.h:48
PFO::PFOCalibHitClusterMomentPlots::m_PFO_ENG_CALIB_FRAC_EM_etaBinC
TH1 * m_PFO_ENG_CALIB_FRAC_EM_etaBinC
Definition
PFOCalibHitClusterMomentPlots.h:39
PFO::PFOCalibHitClusterMomentPlots::m_sFEContainerName
std::string m_sFEContainerName
Definition
PFOCalibHitClusterMomentPlots.h:49
PFO::PFOCalibHitClusterMomentPlots::m_PFO_ENG_CALIB_FRAC_HAD_etaBinC
TH1 * m_PFO_ENG_CALIB_FRAC_HAD_etaBinC
Definition
PFOCalibHitClusterMomentPlots.h:40
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::CaloCluster_v1::ENG_CALIB_FRAC_REST
@ ENG_CALIB_FRAC_REST
Calibration Hit energy inside the cluster caused by other particles.
Definition
CaloCluster_v1.h:256
xAOD::CaloCluster_v1::ENG_CALIB_FRAC_EM
@ ENG_CALIB_FRAC_EM
Calibration Hit energy inside the cluster caused by e/gamma/pi0.
Definition
CaloCluster_v1.h:251
xAOD::CaloCluster_v1::ENG_CALIB_FRAC_HAD
@ ENG_CALIB_FRAC_HAD
Calibration Hit energy inside the cluster caused by charged pi+ and pi-.
Definition
CaloCluster_v1.h:254
xAOD::EventInfo_v1::beamSpotWeight
float beamSpotWeight() const
Weight for beam spot size reweighting.
Definition
EventInfo_v1.cxx:970
PFO
Definition
ClusterMomentPlots.h:15
xAOD::PFO
PFO_v1 PFO
Definition of the current "pfo version".
Definition
PFO.h:17
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
Generated on
for ATLAS Offline Software by
1.17.0