ATLAS Offline Software
PhysicsAnalysis
ElectronPhotonID
ElectronPhotonFourMomentumCorrection
util
testMomentumSystematics.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 <
ElectronPhotonFourMomentumCorrection/egammaEnergyCorrectionTool.h
>
6
7
#include "TProfile.h"
8
#include "TCanvas.h"
9
#include "TH1D.h"
10
#include <iostream>
11
12
int
main
() {
13
14
AtlasRoot::egammaEnergyCorrectionTool
ect12c;
15
ect12c.
setESModel
(
egEnergyCorr::es2012c
);
16
ect12c.
initialize
();
17
18
TH1D h2012cNom(
"h2012cNom"
,
"h2012cNom"
,500,-5,5);
19
TH1D h2012cUp(
"h2012cUp"
,
"h2012cUp"
,500,-5,5);
20
TH1D h2012cDown(
"h2012cDown"
,
"h2012cDown"
,500,-5,5);
21
22
for
(
int
i
=1;
i
<=h2012cNom.GetNbinsX();
i
++) {
23
24
double
eta
= h2012cNom.GetBinCenter(
i
);
25
double
pIn = 40000.;
26
27
// es2012c
28
29
double
pNom = ect12c.
getCorrectedMomentum
(
PATCore::ParticleDataType::Full
,
30
PATCore::ParticleType::Electron
,
31
pIn,
32
eta
,
33
egEnergyCorr::Scale::Nominal
);
34
35
double
pUp = ect12c.
getCorrectedMomentum
(
PATCore::ParticleDataType::Full
,
36
PATCore::ParticleType::Electron
,
37
pIn,
38
eta
,
39
egEnergyCorr::Scale::MomentumUp
);
40
41
double
pDown = ect12c.
getCorrectedMomentum
(
PATCore::ParticleDataType::Full
,
42
PATCore::ParticleType::Electron
,
43
pIn,
44
eta
,
45
egEnergyCorr::Scale::MomentumDown
);
46
47
std::cout <<
eta
<<
" "
<< (pNom-pIn)/pIn <<
" "
<< (pUp-pIn)/pIn <<
" "
<< (pDown-pIn)/pIn
48
<<
" "
<< pIn <<
" "
<< pNom <<
" "
<< pUp <<
" "
<< pDown << std::endl;
49
50
}
51
52
return
0;
53
}
eta
Scalar eta() const
pseudorapidity method
Definition:
AmgMatrixBasePlugin.h:83
egammaEnergyCorrectionTool.h
egEnergyCorr::Scale::Nominal
@ Nominal
Definition:
egammaEnergyCorrectionTool.h:132
AtlasRoot::egammaEnergyCorrectionTool
Definition:
egammaEnergyCorrectionTool.h:364
egEnergyCorr::Scale::MomentumUp
@ MomentumUp
Definition:
egammaEnergyCorrectionTool.h:137
PATCore::ParticleDataType::Full
@ Full
Definition:
PATCoreEnums.h:22
lumiFormat.i
int i
Definition:
lumiFormat.py:85
AtlasRoot::egammaEnergyCorrectionTool::setESModel
void setESModel(egEnergyCorr::ESModel val)
Definition:
egammaEnergyCorrectionTool.h:375
egEnergyCorr::Scale::MomentumDown
@ MomentumDown
Definition:
egammaEnergyCorrectionTool.h:138
main
int main()
Definition:
testMomentumSystematics.cxx:12
egEnergyCorr::es2012c
@ es2012c
Definition:
egammaEnergyCorrectionTool.h:297
AtlasRoot::egammaEnergyCorrectionTool::getCorrectedMomentum
double getCorrectedMomentum(PATCore::ParticleDataType::DataType dataType, PATCore::ParticleType::Type ptype, double momentum, double trk_eta, egEnergyCorr::Scale::Variation scaleVar=egEnergyCorr::Scale::None, double varSF=1.0) const
take eta and uncorrected energy of electron, return corrected energy, apply given variation,...
Definition:
egammaEnergyCorrectionTool.cxx:1875
AtlasRoot::egammaEnergyCorrectionTool::initialize
int initialize()
Definition:
egammaEnergyCorrectionTool.cxx:178
PATCore::ParticleType::Electron
@ Electron
Definition:
PATCoreEnums.h:40
Generated on Sun Dec 22 2024 21:19:14 for ATLAS Offline Software by
1.8.18