ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
PFlow
PFlowValidation
PFOHistUtils
src
LeptonFELinkerPlots.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/LeptonFELinkerPlots.h
"
6
#include "
xAODPFlow/FlowElementContainer.h
"
7
#include "
xAODMuon/MuonContainer.h
"
8
#include "
xAODEgamma/ElectronContainer.h
"
9
#include "
xAODEgamma/PhotonContainer.h
"
10
#include "
xAODTau/TauJetContainer.h
"
11
#include "AthLinks/ElementLink.h"
12
13
namespace
PFO
{
14
LeptonFELinkerPlots::LeptonFELinkerPlots
(
PlotBase
* pParent,
const
std::string & sDir,
const
std::string & LeptonContainerName,
const
bool
& doNeutralFE,
const
int
& PID):
15
PlotBase
(pParent, sDir),
16
m_LeptonContainerName
(LeptonContainerName),
17
m_doNeutralFE
(doNeutralFE),
18
m_LeptonID
(PID)
19
{
20
m_electron_NMatchedCFE
=
nullptr
;
21
m_electron_NMatchedNFE
=
nullptr
;
22
23
m_muon_NMatchedCFE
=
nullptr
;
24
m_muon_NMatchedNFE
=
nullptr
;
25
26
m_tau_NMatchedCFE
=
nullptr
;
27
m_tau_NMatchedNFE
=
nullptr
;
28
29
m_photon_NMatchedCFE
=
nullptr
;
30
m_photon_NMatchedNFE
=
nullptr
;
31
}
32
33
void
LeptonFELinkerPlots::initializePlots
(){
34
if
(
m_doNeutralFE
)
35
{
36
if
(
m_LeptonID
==11)
37
m_electron_NMatchedNFE
=
Book1D
(
"_electron_NMatchedNFE"
,
m_LeptonContainerName
+
"_elecron_NMatchedNFE"
,20,0,20);
38
else
if
(
m_LeptonID
==13)
39
m_muon_NMatchedNFE
=
Book1D
(
"_muon_NMatchedNFE"
,
m_LeptonContainerName
+
"_muon_NMatchedNFE"
,20,0,20);
40
else
if
(
m_LeptonID
==17)
41
m_tau_NMatchedNFE
=
Book1D
(
"_tau_NMatchedNFE"
,
m_LeptonContainerName
+
"_tau_NMatchedNFE"
,20,0,20);
42
else
43
m_photon_NMatchedNFE
=
Book1D
(
"_photon_NMatchedNFE"
,
m_LeptonContainerName
+
"_photon_NMatchedNFE"
,20,0,20);
44
}
45
else
{
46
if
(
m_LeptonID
==11)
47
m_electron_NMatchedCFE
=
Book1D
(
"_electron_NMatchedCFE"
,
m_LeptonContainerName
+
"_elecron_NMatchedCFE"
,20,0,20);
48
else
if
(
m_LeptonID
==13)
49
m_muon_NMatchedCFE
=
Book1D
(
"_muon_NMatchedCFE"
,
m_LeptonContainerName
+
"_muon_NMatchedCFE"
,20,0,20);
50
else
if
(
m_LeptonID
==17)
51
m_tau_NMatchedCFE
=
Book1D
(
"_tau_NMatchedCFE"
,
m_LeptonContainerName
+
"_tau_NMatchedCFE"
,20,0,20);
52
else
53
m_photon_NMatchedCFE
=
Book1D
(
"_photon_NMatchedCFE"
,
m_LeptonContainerName
+
"_photon_NMatchedCFE"
,20,0,20);
54
};
55
}
56
57
void
LeptonFELinkerPlots::fill
(
const
xAOD::Photon
& phot,
const
xAOD::EventInfo
& eventInfo){
58
int
nMatched_FE=0;
59
SG::ConstAccessor<std::vector<ElementLink<xAOD::FlowElementContainer>
> >acc_FE_phot_link_NFE(
"neutralFELinks"
);
60
SG::ConstAccessor<std::vector<ElementLink<xAOD::FlowElementContainer>
> >acc_FE_phot_link_CFE(
"neutralFELinks"
);
61
if
(acc_FE_phot_link_NFE.
isAvailable
(phot) and
m_doNeutralFE
){
62
nMatched_FE=(acc_FE_phot_link_NFE(phot)).
size
();
63
m_photon_NMatchedNFE
->Fill(nMatched_FE,eventInfo.
beamSpotWeight
());
64
}
65
else
if
(acc_FE_phot_link_CFE.
isAvailable
(phot) and !
m_doNeutralFE
){
66
nMatched_FE=(acc_FE_phot_link_CFE(phot)).
size
();
67
m_photon_NMatchedCFE
->Fill(nMatched_FE,eventInfo.
beamSpotWeight
());
68
}
69
}
70
void
LeptonFELinkerPlots::fill
(
const
xAOD::Electron
& el,
const
xAOD::EventInfo
& eventInfo){
71
int
nMatched_FE=0;
72
SG::ConstAccessor<std::vector<ElementLink<xAOD::FlowElementContainer>
> >acc_FE_el_link_NFE(
"neutralFELinks"
);
73
SG::ConstAccessor<std::vector<ElementLink<xAOD::FlowElementContainer>
> >acc_FE_el_link_CFE(
"chargedFELinks"
);
74
75
if
(acc_FE_el_link_NFE.
isAvailable
(el) and
m_doNeutralFE
){
76
nMatched_FE=(acc_FE_el_link_NFE(el)).
size
();
77
m_electron_NMatchedNFE
->Fill(nMatched_FE,eventInfo.
beamSpotWeight
());
78
}
79
else
if
(acc_FE_el_link_CFE.
isAvailable
(el) and !
m_doNeutralFE
){
80
nMatched_FE=(acc_FE_el_link_CFE(el)).
size
();
81
m_electron_NMatchedCFE
->Fill(nMatched_FE,eventInfo.
beamSpotWeight
());
82
}
83
}
84
85
void
LeptonFELinkerPlots::fill
(
const
xAOD::Muon
& mu,
const
xAOD::EventInfo
& eventInfo){
86
int
nMatched_FE=0;
87
SG::ConstAccessor<std::vector<ElementLink<xAOD::FlowElementContainer>
> >acc_FE_mu_link_NFE(
"neutralFELinks"
);
88
SG::ConstAccessor<std::vector<ElementLink<xAOD::FlowElementContainer>
> >acc_FE_mu_link_CFE(
"chargedFELinks"
);
89
if
(acc_FE_mu_link_NFE.
isAvailable
(mu) and
m_doNeutralFE
){
90
nMatched_FE=(acc_FE_mu_link_NFE(mu)).
size
();
91
m_muon_NMatchedNFE
->Fill(nMatched_FE,eventInfo.
beamSpotWeight
());
92
}
93
else
if
(acc_FE_mu_link_CFE.
isAvailable
(mu) and !
m_doNeutralFE
){
94
nMatched_FE=(acc_FE_mu_link_CFE(mu)).
size
();
95
m_muon_NMatchedCFE
->Fill(nMatched_FE,eventInfo.
beamSpotWeight
());
96
}
97
}
98
99
void
LeptonFELinkerPlots::fill
(
const
xAOD::TauJet
& tau,
const
xAOD::EventInfo
& eventInfo){
100
int
nMatched_FE=0;
101
SG::ConstAccessor<std::vector<ElementLink<xAOD::FlowElementContainer>
> >acc_FE_tau_link_NFE(
"neutralFELinks"
);
102
SG::ConstAccessor<std::vector<ElementLink<xAOD::FlowElementContainer>
> >acc_FE_tau_link_CFE(
"chargedFELinks"
);
103
if
(acc_FE_tau_link_NFE.
isAvailable
(tau) and
m_doNeutralFE
){
104
105
nMatched_FE=(acc_FE_tau_link_NFE(tau)).
size
();
106
m_tau_NMatchedNFE
->Fill(nMatched_FE,eventInfo.
beamSpotWeight
());
107
}
108
else
if
(acc_FE_tau_link_NFE.
isAvailable
(tau) and !
m_doNeutralFE
){
109
nMatched_FE=(acc_FE_tau_link_CFE(tau)).
size
();
110
m_tau_NMatchedCFE
->Fill(nMatched_FE,eventInfo.
beamSpotWeight
());
111
}
112
113
}
114
115
116
117
}
// end of PFO namespace
ElectronContainer.h
PhotonContainer.h
MuonContainer.h
FlowElementContainer.h
LeptonFELinkerPlots.h
size
size_t size() const
Number of registered mappings.
TauJetContainer.h
PFO::LeptonFELinkerPlots::m_tau_NMatchedNFE
TH1 * m_tau_NMatchedNFE
Definition
LeptonFELinkerPlots.h:42
PFO::LeptonFELinkerPlots::m_doNeutralFE
bool m_doNeutralFE
Definition
LeptonFELinkerPlots.h:49
PFO::LeptonFELinkerPlots::fill
void fill(const xAOD::Electron &el, const xAOD::EventInfo &eventInfo)
Definition
LeptonFELinkerPlots.cxx:70
PFO::LeptonFELinkerPlots::m_electron_NMatchedNFE
TH1 * m_electron_NMatchedNFE
Definition
LeptonFELinkerPlots.h:36
PFO::LeptonFELinkerPlots::m_photon_NMatchedCFE
TH1 * m_photon_NMatchedCFE
Definition
LeptonFELinkerPlots.h:44
PFO::LeptonFELinkerPlots::LeptonFELinkerPlots
LeptonFELinkerPlots(PlotBase *pParent, const std::string &sDir, const std::string &LeptonContainerName, const bool &m_doNeutralFE, const int &m_LeptonID)
Definition
LeptonFELinkerPlots.cxx:14
PFO::LeptonFELinkerPlots::m_muon_NMatchedCFE
TH1 * m_muon_NMatchedCFE
Definition
LeptonFELinkerPlots.h:38
PFO::LeptonFELinkerPlots::initializePlots
void initializePlots()
Definition
LeptonFELinkerPlots.cxx:33
PFO::LeptonFELinkerPlots::m_photon_NMatchedNFE
TH1 * m_photon_NMatchedNFE
Definition
LeptonFELinkerPlots.h:45
PFO::LeptonFELinkerPlots::m_LeptonContainerName
std::string m_LeptonContainerName
Definition
LeptonFELinkerPlots.h:48
PFO::LeptonFELinkerPlots::m_tau_NMatchedCFE
TH1 * m_tau_NMatchedCFE
Definition
LeptonFELinkerPlots.h:41
PFO::LeptonFELinkerPlots::m_LeptonID
int m_LeptonID
Definition
LeptonFELinkerPlots.h:50
PFO::LeptonFELinkerPlots::m_electron_NMatchedCFE
TH1 * m_electron_NMatchedCFE
Definition
LeptonFELinkerPlots.h:35
PFO::LeptonFELinkerPlots::m_muon_NMatchedNFE
TH1 * m_muon_NMatchedNFE
Definition
LeptonFELinkerPlots.h:39
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::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition
ConstAccessor.h:55
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
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::TauJet
TauJet_v3 TauJet
Definition of the current "tau version".
Definition
TauJet.h:17
xAOD::Muon
Muon_v1 Muon
Reference the current persistent version:
Definition
Event/xAOD/xAODMuon/xAODMuon/Muon.h:13
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition
Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition
Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
Generated on
for ATLAS Offline Software by
1.17.0