Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
TopQuarkAnalysis
TopHitFit
src
PatMETHitFitTranslator.cc
Go to the documentation of this file.
1
//
2
//
3
19
#include "
TopQuarkAnalysis/TopHitFit/interface/METTranslatorBase.h
"
20
#include "
DataFormats/PatCandidates/interface/MET.h
"
21
22
#include <cmath>
23
24
namespace
hitfit {
25
26
27
template
<>
28
METTranslatorBase<pat::MET>::METTranslatorBase
()
29
{
30
resolution_ =
Resolution
(
std::string
(
"0,0,12"
));
31
}
// METTranslatorBase<pat::MET>::METTranslatorBase()
32
33
34
template
<>
35
METTranslatorBase<pat::MET>::METTranslatorBase
(
const
std::string
&
ifile
)
36
{
37
const
Defaults_Text
defs(ifile);
38
std::string
resolution_string(defs.
get_string
(
"met_resolution"
));
39
resolution_ =
Resolution
(resolution_string);
40
41
}
// METTranslatorBase<pat::MET>::METTranslatorBase(const std::string& ifile)
42
43
44
template
<>
45
METTranslatorBase<pat::MET>::~METTranslatorBase
()
46
{
47
}
// METTranslatorBase<pat::MET>::~METTranslatorBase()
48
49
50
template
<>
51
Fourvec
52
METTranslatorBase<pat::MET>::operator()
(
const
pat::MET
&
m
,
53
bool
useObjEmbRes
/* = false */
)
54
{
55
double
px = m.
px
();
56
double
py = m.
py
();
57
58
return
Fourvec
(px,py,0.0,
sqrt
(px*px + py*py));
59
60
}
// Fourvec METTranslatorBase<pat::MET>::operator()(const pat::MET& m)
61
62
63
64
template
<>
65
Resolution
66
METTranslatorBase<pat::MET>::KtResolution
(
const
pat::MET
&
m
,
67
bool
useObjEmbRes
/* = false */
)
const
68
{
69
return
resolution_;
70
}
// Resolution METTranslatorBase<pat::MET>::KtResolution(const pat::MET& m)
71
72
73
74
template
<>
75
Resolution
76
METTranslatorBase<pat::MET>::METResolution
(
const
pat::MET
&
m
,
77
bool
useObjEmbRes
/* = false */
)
const
78
{
79
return
KtResolution(m,useObjEmbRes);
80
}
// Resolution METTranslatorBase<pat::MET>::METResolution(const pat::MET& m)
81
82
83
}
// namespace hitfit
pat::MET
Analysis-level MET class.
Definition:
MET.h:42
hitfit::METTranslatorBase
Template class of function object to translate missing transverse energy physics object to HitFit's F...
Definition:
METTranslatorBase.h:50
hitfit::Resolution
Calculate and represent resolution for a physical quantity.
Definition:
Resolution.h:102
hitfit::Defaults_Text
A lightweight implementation of the Defaults interface that uses simple ASCII text files...
Definition:
Defaults_Text.h:121
reco::LeafCandidate::py
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
Definition:
LeafCandidate.h:174
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
hitfit::METTranslatorBase::METTranslatorBase
METTranslatorBase()
Default constructor.
MET.h
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:48
compare_using_db.ifile
tuple ifile
Definition:
compare_using_db.py:250
reco::LeafCandidate::px
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
Definition:
LeafCandidate.h:172
hitfit::Fourvec
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition:
fourvec.h:57
METTranslatorBase.h
Template class of function object to translate missing transverse energy object to HitFit's Fourvec o...
Resolution
Definition:
trackSplitPlot.h:32
m
int m
Definition:
DTDataIntegrityTask.cc:30
hitfit::Defaults_Text::get_string
virtual std::string get_string(std::string name) const
Definition:
Defaults_Text.cc:444
Generated for CMSSW Reference Manual by
1.8.5