ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
PFlow
PFlowValidation
PFOHistUtils
src
ClusterPlots.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/ClusterPlots.h
"
6
#include "
AthenaKernel/Units.h
"
7
8
namespace
PFO
{
9
10
ClusterPlots::ClusterPlots
(
PlotBase
* pParent,
const
std::string & sDir,
SG::ReadHandleKey<xAOD::CaloClusterContainer>
& sClusterContainerName) :
PlotBase
(pParent, sDir),
m_sClusterContainerName
(sClusterContainerName){}
11
12
void
ClusterPlots::initializePlots
(){
13
14
m_Cluster_pt
=
Book1D
(
"Cluster_Pt"
,
m_sClusterContainerName
.key() +
"_Pt (Entries/1 GeV)"
,300,-100.0,200.0);
15
m_Cluster_eta
=
Book1D
(
"Cluster_Eta"
,
m_sClusterContainerName
.key() +
"_Eta (Entries/0.1)"
,100,-5.0,5.0);
16
m_Cluster_phi
=
Book1D
(
"Cluster_Phi"
,
m_sClusterContainerName
.key() +
"_Phi (Entries/0.1)"
,64,-3.2,3.2);
17
m_Cluster_m
=
Book1D
(
"Cluster_m"
,
m_sClusterContainerName
.key() +
"_m (Entries/100 MeV)"
,100,0.0,10.0);
18
19
m_Cluster_ptEM
=
Book1D
(
"Cluster_PtEM"
,
m_sClusterContainerName
.key() +
"_PtEM (Entries/1 GeV)"
,300,-100.0,200.0);
20
m_Cluster_etaEM
=
Book1D
(
"Cluster_EtaEM"
,
m_sClusterContainerName
.key() +
"_EtaEM (Entries/0.1)"
,100,-5.0,5.0);
21
m_Cluster_phiEM
=
Book1D
(
"Cluster_PhiEM"
,
m_sClusterContainerName
.key() +
"_PhiEM (Entries/0.1)"
,64,-3.2,3.2);
22
m_Cluster_mEM
=
Book1D
(
"Cluster_mEM"
,
m_sClusterContainerName
.key() +
"_mEM (Entries/100 MeV)"
,100,0.0,10.0);
23
24
m_Cluster_time
=
Book1D
(
"Cluster_time"
,
m_sClusterContainerName
.key() +
"_time (Entries)"
,30,-200.0,100.0);
25
m_Cluster_clusterSize
=
Book1D
(
"Cluster_clusterSize"
,
m_sClusterContainerName
.key() +
"_clusterSize (Entries)"
,20,0.0,20.0);
26
27
m_Cluster_eta_lowpt
=
Book1D
(
"Cluster_Eta_lowPt"
,
m_sClusterContainerName
.key() +
"_Eta_lowPt (Entries/0.1)"
,100,-5.0,5.0);
28
m_Cluster_pt_interval
=
Book1D
(
"Cluster_Pt_interval"
,
m_sClusterContainerName
.key() +
"_Pt_interval (Entries/1 GeV)"
, 980, 20.0, 1000.0);
29
m_Cluster_pt_zoom
=
Book1D
(
"Cluster_Pt_zoom"
,
m_sClusterContainerName
.key() +
"_Pt_zomm (Entries/0.1 GeV)"
,3000,-100.0,200.0);
30
31
m_Cluster_eSample_EM
=
Book1D
(
"Cluster_eSample_EM"
,
m_sClusterContainerName
.key() +
"_eSample_EM (Entries/1 GeV) "
,300,-100.0,200.0);
32
m_Cluster_eSample_HAD
=
Book1D
(
"Cluster_eSample_HAD"
,
m_sClusterContainerName
.key() +
"_eSample_HAD (Entries/1 GeV) "
,300,-100.0,200.0);
33
34
}
35
36
void
ClusterPlots::fill
(
const
xAOD::CaloCluster
&
Cluster
,
const
xAOD::EventInfo
& eventInfo){
37
m_Cluster_pt
->Fill(
Cluster
.pt()/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
38
m_Cluster_eta
->Fill(
Cluster
.eta(),eventInfo.
beamSpotWeight
());
39
m_Cluster_phi
->Fill(
Cluster
.phi(),eventInfo.
beamSpotWeight
());
40
m_Cluster_m
->Fill(
Cluster
.m()/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
41
42
m_Cluster_ptEM
->Fill((
Cluster
.rawE()/cosh(
Cluster
.rawEta()))/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
43
m_Cluster_etaEM
->Fill(
Cluster
.rawEta(),eventInfo.
beamSpotWeight
());
44
m_Cluster_phiEM
->Fill(
Cluster
.rawPhi(),eventInfo.
beamSpotWeight
());
45
m_Cluster_mEM
->Fill(
Cluster
.rawM()/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
46
47
m_Cluster_time
->Fill(
Cluster
.time(),eventInfo.
beamSpotWeight
());
48
m_Cluster_clusterSize
->Fill(
Cluster
.clusterSize(),eventInfo.
beamSpotWeight
());
49
50
if
(
Cluster
.pt()/Athena::Units::GeV > -20 &&
Cluster
.pt()/Athena::Units::GeV < 20){
51
m_Cluster_eta_lowpt
->Fill(
Cluster
.eta(),eventInfo.
beamSpotWeight
());
52
}
53
m_Cluster_pt_interval
->Fill(
Cluster
.pt()/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
54
m_Cluster_pt_zoom
->Fill(
Cluster
.pt()/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
55
56
float
eSample_EM;
57
eSample_EM =
Cluster
.eSample(CaloSampling::PreSamplerB) +
Cluster
.eSample(CaloSampling::EMB1) +
Cluster
.eSample(CaloSampling::EMB2) +
Cluster
.eSample(CaloSampling::EMB3) +
Cluster
.eSample(CaloSampling::PreSamplerE) +
Cluster
.eSample(CaloSampling::EME1) +
Cluster
.eSample(CaloSampling::EME2) +
Cluster
.eSample(CaloSampling::EME3) +
Cluster
.eSample(CaloSampling::FCAL0);
58
m_Cluster_eSample_EM
->Fill((
double
)eSample_EM/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
59
60
61
62
float
eSample_HAD;
63
eSample_HAD =
Cluster
.eSample(CaloSampling::TileBar0) +
Cluster
.eSample(CaloSampling::TileBar1) +
Cluster
.eSample(CaloSampling::TileBar2) +
Cluster
.eSample(CaloSampling::HEC0) +
Cluster
.eSample(CaloSampling::HEC1) +
Cluster
.eSample(CaloSampling::HEC2) +
Cluster
.eSample(CaloSampling::HEC3) +
Cluster
.eSample(CaloSampling::FCAL1) +
Cluster
.eSample(CaloSampling::FCAL2);
64
m_Cluster_eSample_HAD
->Fill((
double
)eSample_HAD/Athena::Units::GeV,eventInfo.
beamSpotWeight
());
65
66
}
67
68
}
ClusterPlots.h
Units.h
Wrapper to avoid constant divisions when using units.
Cluster
Algorithm comparing pixel and strip xAOD clusters and xAOD spacepoint containers to each other.
PFO::ClusterPlots::m_Cluster_eta_lowpt
TH1 * m_Cluster_eta_lowpt
Definition
ClusterPlots.h:40
PFO::ClusterPlots::ClusterPlots
ClusterPlots(PlotBase *pParent, const std::string &sDir, SG::ReadHandleKey< xAOD::CaloClusterContainer > &sClusterContainerName)
Definition
ClusterPlots.cxx:10
PFO::ClusterPlots::m_Cluster_phiEM
TH1 * m_Cluster_phiEM
Definition
ClusterPlots.h:34
PFO::ClusterPlots::fill
void fill(const xAOD::CaloCluster &Cluster, const xAOD::EventInfo &eventInfo)
Definition
ClusterPlots.cxx:36
PFO::ClusterPlots::m_Cluster_mEM
TH1 * m_Cluster_mEM
Definition
ClusterPlots.h:35
PFO::ClusterPlots::m_Cluster_m
TH1 * m_Cluster_m
Definition
ClusterPlots.h:30
PFO::ClusterPlots::m_Cluster_clusterSize
TH1 * m_Cluster_clusterSize
Definition
ClusterPlots.h:38
PFO::ClusterPlots::m_Cluster_eSample_EM
TH1 * m_Cluster_eSample_EM
Definition
ClusterPlots.h:44
PFO::ClusterPlots::m_Cluster_ptEM
TH1 * m_Cluster_ptEM
Definition
ClusterPlots.h:32
PFO::ClusterPlots::m_Cluster_pt
TH1 * m_Cluster_pt
Definition
ClusterPlots.h:27
PFO::ClusterPlots::m_Cluster_pt_zoom
TH1 * m_Cluster_pt_zoom
Definition
ClusterPlots.h:42
PFO::ClusterPlots::initializePlots
void initializePlots()
Definition
ClusterPlots.cxx:12
PFO::ClusterPlots::m_sClusterContainerName
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_sClusterContainerName
Definition
ClusterPlots.h:48
PFO::ClusterPlots::m_Cluster_eta
TH1 * m_Cluster_eta
Definition
ClusterPlots.h:28
PFO::ClusterPlots::m_Cluster_time
TH1 * m_Cluster_time
Definition
ClusterPlots.h:37
PFO::ClusterPlots::m_Cluster_phi
TH1 * m_Cluster_phi
Definition
ClusterPlots.h:29
PFO::ClusterPlots::m_Cluster_eSample_HAD
TH1 * m_Cluster_eSample_HAD
Definition
ClusterPlots.h:45
PFO::ClusterPlots::m_Cluster_pt_interval
TH1 * m_Cluster_pt_interval
Definition
ClusterPlots.h:41
PFO::ClusterPlots::m_Cluster_etaEM
TH1 * m_Cluster_etaEM
Definition
ClusterPlots.h:33
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
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
xAOD::EventInfo_v1::beamSpotWeight
float beamSpotWeight() const
Weight for beam spot size reweighting.
Definition
EventInfo_v1.cxx:970
PFO
Definition
ClusterMomentPlots.h:15
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
Generated on
for ATLAS Offline Software by
1.17.0