PhysicsTools
PatUtils
interface
ObjectResolutionCalc.h
Go to the documentation of this file.
1
//
2
//
3
4
#ifndef PhysicsTools_PatUtils_ObjectResolutionCalc_h
5
#define PhysicsTools_PatUtils_ObjectResolutionCalc_h
6
15
#include "
FWCore/Framework/interface/EventSetup.h
"
16
#include "
FWCore/Framework/interface/Event.h
"
17
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
18
#include "
FWCore/Utilities/interface/Exception.h
"
19
20
#include "
DataFormats/PatCandidates/interface/Electron.h
"
21
#include "
DataFormats/PatCandidates/interface/Muon.h
"
22
#include "
DataFormats/PatCandidates/interface/Tau.h
"
23
#include "
DataFormats/PatCandidates/interface/MET.h
"
24
#include "
DataFormats/PatCandidates/interface/Jet.h
"
25
26
#include "TF1.h"
27
#include "TH1.h"
28
#include "TFile.h"
29
#include "TKey.h"
30
#include "TString.h"
31
#include "TMultiLayerPerceptron.h"
32
33
namespace
pat
{
34
35
class
ObjectResolutionCalc
{
36
public
:
37
ObjectResolutionCalc
();
38
ObjectResolutionCalc
(
const
TString& resopath,
bool
useNN);
39
~ObjectResolutionCalc
();
40
41
float
obsRes
(
int
obs,
int
eta
,
float
eT);
42
int
etaBin
(
float
eta
);
43
44
#ifdef OBSOLETE
45
void
operator()
(
Electron
&
obj
);
46
void
operator()
(
Muon
&
obj
);
47
void
operator()
(
Tau
&
obj
);
48
void
operator()
(
Jet
&
obj
);
49
void
operator()
(
MET
&
obj
);
50
#else
51
// WORKAROUND
52
template
<
typename
T>
53
void
operator()
(
T
&
obj
) {}
54
#endif
55
56
private
:
57
TFile*
resoFile_
;
58
std::vector<float>
etaBinVals_
;
59
TF1
fResVsEt_
[10][10];
60
TMultiLayerPerceptron*
network_
[10];
61
bool
useNN_
;
62
};
63
64
}
// namespace pat
65
66
#endif
pat::ObjectResolutionCalc
Class to calculate MC resolutions for pat objects.
Definition:
ObjectResolutionCalc.h:35
MessageLogger.h
Electron
Definition:
Electron.py:1
Muon.h
Tau
Definition:
Tau.py:1
tools.TF1
TF1
Definition:
tools.py:23
Tau.h
pat::ObjectResolutionCalc::resoFile_
TFile * resoFile_
Definition:
ObjectResolutionCalc.h:57
Muon
Definition:
Muon.py:1
pat::ObjectResolutionCalc::fResVsEt_
TF1 fResVsEt_[10][10]
Definition:
ObjectResolutionCalc.h:59
Jet
Definition:
Jet.py:1
PVValHelper::eta
Definition:
PVValidationHelpers.h:69
pat::ObjectResolutionCalc::ObjectResolutionCalc
ObjectResolutionCalc()
getGTfromDQMFile.obj
obj
Definition:
getGTfromDQMFile.py:32
Event.h
pat::ObjectResolutionCalc::~ObjectResolutionCalc
~ObjectResolutionCalc()
Definition:
ObjectResolutionCalc.cc:59
pat::ObjectResolutionCalc::operator()
void operator()(T &obj)
Definition:
ObjectResolutionCalc.h:53
pat::MET
Analysis-level MET class.
Definition:
MET.h:40
pat
Definition:
HeavyIon.h:7
MET.h
Jet.h
pat::ObjectResolutionCalc::useNN_
bool useNN_
Definition:
ObjectResolutionCalc.h:61
T
long double T
Definition:
Basic3DVectorLD.h:48
pat::ObjectResolutionCalc::etaBin
int etaBin(float eta)
Definition:
ObjectResolutionCalc.cc:69
pat::ObjectResolutionCalc::obsRes
float obsRes(int obs, int eta, float eT)
Definition:
ObjectResolutionCalc.cc:61
EventSetup.h
pat::ObjectResolutionCalc::network_
TMultiLayerPerceptron * network_[10]
Definition:
ObjectResolutionCalc.h:60
Exception.h
pat::ObjectResolutionCalc::etaBinVals_
std::vector< float > etaBinVals_
Definition:
ObjectResolutionCalc.h:58
Electron.h
Generated for CMSSW Reference Manual by
1.8.16