ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
egamma
EgammaPhysValMonitoring
src
LRTElectronValidationPlots.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
LRTElectronValidationPlots.h
"
6
#include "
xAODEgamma/EgammaDefs.h
"
7
8
LRTElectronValidationPlots::LRTElectronValidationPlots
(
PlotBase
* pParent,
const
std::string& sDir):
PlotBase
(pParent, sDir),
9
m_oCentralElecPlots
(this,
"Central/"
,
"Central"
),
10
author
(nullptr),
11
res_et
(nullptr),
12
res_eta
(nullptr),
13
res_et_cut
(nullptr),
14
res_eta_cut
(nullptr),
15
res_et_cut_pt_20
(nullptr),
16
res_eta_cut_pt_20
(nullptr),
17
matrix
(nullptr)
18
19
{
20
m_oCentralElecPlots
.Set_d0_nBins(50);
21
m_oCentralElecPlots
.Set_d0sig_nBins(50);
22
m_oCentralElecPlots
.Set_z0_nBins(50);
23
m_oCentralElecPlots
.Set_d0_Bins(std::vector<double>{-300.0,300.0});
24
m_oCentralElecPlots
.Set_d0sig_Bins(std::vector<double>{-300.0,300.0});
25
m_oCentralElecPlots
.Set_z0_Bins(std::vector<double>{-300.0,300.0});
26
}
27
28
void
LRTElectronValidationPlots::initializePlots
(){
29
30
author
=
Book1D
(
"author"
,
"Electron Author ; author;Events"
, 20, -0.5, 19.5);
31
res_et
=
BookTProfile
(
"res_et"
,
" IsoElectron;E_{T}^{Truth}, [GeV];(E_{T} - E_{T}^{Truth})/E_{T}^{Truth}"
,100, 0., 200.);
32
res_eta
=
BookTProfile
(
"res_eta"
,
" IsoElectron;#eta;(E_{T} - E_{T}^{Truth})/E_{T}^{Truth}"
,50, -2.5, 2.5);
33
res_et_cut
=
BookTProfile
(
"res_et_cut"
,
" IsoElectron;E_{T}^{Truth}, [GeV];(E_{T} - E_{T}^{Truth})/E_{T}^{Truth}"
,100, 0., 200.);
34
res_eta_cut
=
BookTProfile
(
"res_eta_cut"
,
" IsoElectron;#eta;(E_{T} - E_{T}^{Truth})/E_{T}^{Truth}"
,50, -2.5, 2.5);
35
res_et_cut_pt_20
=
BookTProfile
(
"res_et_cut_pt_20"
,
" Prompt Electron;E_{T}^{Truth}, [GeV];(E_{T} - E_{T}^{Truth})/E_{T}^{Truth}"
,100, 0., 200.);
36
res_eta_cut_pt_20
=
BookTProfile
(
"res_eta_cut_pt_20"
,
" Prompt Electron;#eta;(E_{T} - E_{T}^{Truth})/E_{T}^{Truth}"
,50, -2.5, 2.5);
37
matrix
=
Book2D
(
"matrix"
,
"reco vs truth pt"
,200,0.,200.,200,0.,200.);
38
39
}
40
41
void
LRTElectronValidationPlots::fill
(
const
xAOD::Electron
& electron,
const
xAOD::EventInfo
& eventInfo,
bool
isPrompt,
bool
pass_LHVeryLooseNoPix,
bool
pass_LHLooseNoPix,
bool
pass_LHMediumNoPix,
bool
pass_LHTightNoPix) {
42
43
float
weight = eventInfo.
beamSpotWeight
();
44
45
author
->Fill(electron.author(),weight);
46
47
if
(electron.author()&
xAOD::EgammaParameters::AuthorElectron
||
48
electron.author(
xAOD::EgammaParameters::AuthorAmbiguous
)) {
49
m_oCentralElecPlots
.fill(electron, eventInfo, isPrompt, pass_LHVeryLooseNoPix, pass_LHLooseNoPix, pass_LHMediumNoPix, pass_LHTightNoPix);
50
}
51
}
EgammaDefs.h
LRTElectronValidationPlots.h
LRTElectronValidationPlots::m_oCentralElecPlots
Egamma::LRTElectronPlots m_oCentralElecPlots
Definition
LRTElectronValidationPlots.h:25
LRTElectronValidationPlots::res_et
TProfile * res_et
Definition
LRTElectronValidationPlots.h:28
LRTElectronValidationPlots::res_et_cut
TProfile * res_et_cut
Definition
LRTElectronValidationPlots.h:30
LRTElectronValidationPlots::initializePlots
virtual void initializePlots()
Definition
LRTElectronValidationPlots.cxx:28
LRTElectronValidationPlots::fill
void fill(const xAOD::Electron &electron, const xAOD::EventInfo &eventInfo, bool isPrompt, bool pass_LHVeryLooseNoPix, bool pass_LHLooseNoPix, bool pass_LHMediumNoPix, bool pass_LHTightNoPix)
Definition
LRTElectronValidationPlots.cxx:41
LRTElectronValidationPlots::res_eta_cut
TProfile * res_eta_cut
Definition
LRTElectronValidationPlots.h:31
LRTElectronValidationPlots::res_et_cut_pt_20
TProfile * res_et_cut_pt_20
Definition
LRTElectronValidationPlots.h:32
LRTElectronValidationPlots::res_eta
TProfile * res_eta
Definition
LRTElectronValidationPlots.h:29
LRTElectronValidationPlots::res_eta_cut_pt_20
TProfile * res_eta_cut_pt_20
Definition
LRTElectronValidationPlots.h:33
LRTElectronValidationPlots::author
TH1 * author
Definition
LRTElectronValidationPlots.h:27
LRTElectronValidationPlots::LRTElectronValidationPlots
LRTElectronValidationPlots(PlotBase *pParent, const std::string &sDir)
Definition
LRTElectronValidationPlots.cxx:8
LRTElectronValidationPlots::matrix
TH2 * matrix
Definition
LRTElectronValidationPlots.h: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::BookTProfile
TProfile * BookTProfile(std::string_view name, std::string_view labels, int nBinsX, float startX, float endX, float startY=-1, float endY=-1, bool prependDir=true, bool useRMS=false)
Book a TProfile histogram.
Definition
PlotBase.cxx:186
PlotBase::PlotBase
PlotBase(PlotBase *parent, std::string_view sDir)
Definition
PlotBase.cxx:29
PlotBase::Book2D
TH2F * Book2D(std::string_view name, std::string_view labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
Book a TH2F histogram.
Definition
PlotBase.cxx:123
xAOD::EventInfo_v1::beamSpotWeight
float beamSpotWeight() const
Weight for beam spot size reweighting.
Definition
EventInfo_v1.cxx:970
xAOD::EgammaParameters::AuthorElectron
const uint16_t AuthorElectron
Object Reconstructed by standard cluster-based algorithm.
Definition
EgammaDefs.h:24
xAOD::EgammaParameters::AuthorAmbiguous
const uint16_t AuthorAmbiguous
Object Reconstructed by standard cluster-based algorithm.
Definition
EgammaDefs.h:32
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
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