TopQuarkAnalysis
TopHitFit
src
PatMETHitFitTranslator.cc
Go to the documentation of this file.
1
//
2
//
3
18
#include "
TopQuarkAnalysis/TopHitFit/interface/METTranslatorBase.h
"
19
#include "
DataFormats/PatCandidates/interface/MET.h
"
20
21
#include <cmath>
22
23
namespace
hitfit
{
24
25
template
<>
26
METTranslatorBase<pat::MET>::METTranslatorBase
() {
27
resolution_ =
Resolution
(
std::string
(
"0,0,12"
));
28
}
// METTranslatorBase<pat::MET>::METTranslatorBase()
29
30
template
<>
31
METTranslatorBase<pat::MET>::METTranslatorBase
(
const
std::string
&
ifile
) {
32
const
Defaults_Text
defs(
ifile
);
33
std::string
resolution_string(defs.
get_string
(
"met_resolution"
));
34
resolution_ =
Resolution
(resolution_string);
35
36
}
// METTranslatorBase<pat::MET>::METTranslatorBase(const std::string& ifile)
37
38
template
<>
39
METTranslatorBase<pat::MET>::~METTranslatorBase
() {}
// METTranslatorBase<pat::MET>::~METTranslatorBase()
40
41
template
<>
42
Fourvec
METTranslatorBase<pat::MET>::operator()
(
const
pat::MET
&
m
,
bool
useObjEmbRes
/* = false */
) {
43
double
px
=
m
.px();
44
double
py
=
m
.py();
45
46
return
Fourvec
(
px
,
py
, 0.0,
sqrt
(
px
*
px
+
py
*
py
));
47
48
}
// Fourvec METTranslatorBase<pat::MET>::operator()(const pat::MET& m)
49
50
template
<>
51
Resolution
METTranslatorBase<pat::MET>::KtResolution
(
const
pat::MET
&
m
,
bool
useObjEmbRes
/* = false */
)
const
{
52
return
resolution_;
53
}
// Resolution METTranslatorBase<pat::MET>::KtResolution(const pat::MET& m)
54
55
template
<>
56
Resolution
METTranslatorBase<pat::MET>::METResolution
(
const
pat::MET
&
m
,
bool
useObjEmbRes
/* = false */
)
const
{
57
return
KtResolution(
m
, useObjEmbRes);
58
}
// Resolution METTranslatorBase<pat::MET>::METResolution(const pat::MET& m)
59
60
}
// namespace hitfit
hitfit
Definition:
Base_Constrainer.h:43
hitfit::Fourvec
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition:
fourvec.h:55
hitfit::Defaults_Text::get_string
std::string get_string(std::string name) const override
Definition:
Defaults_Text.cc:416
multPhiCorr_741_25nsDY_cfi.py
py
Definition:
multPhiCorr_741_25nsDY_cfi.py:12
hitfit::METTranslatorBase
Template class of function object to translate missing transverse energy physics object to HitFit's F...
Definition:
METTranslatorBase.h:49
METTranslatorBase.h
Template class of function object to translate missing transverse energy object to HitFit's Fourvec o...
visualization-live-secondInstance_cfg.m
m
Definition:
visualization-live-secondInstance_cfg.py:72
hitfit::Defaults_Text
A lightweight implementation of the Defaults interface that uses simple ASCII text files.
Definition:
Defaults_Text.h:117
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:19
compare_using_db.ifile
ifile
Definition:
compare_using_db.py:251
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
hitfit::METTranslatorBase::METTranslatorBase
METTranslatorBase()
Default constructor.
Resolution
Definition:
trackSplitPlot.h:33
pat::MET
Analysis-level MET class.
Definition:
MET.h:40
MET.h
hitfit::Resolution
Definition:
Resolution.h:98
multPhiCorr_741_25nsDY_cfi.px
px
Definition:
multPhiCorr_741_25nsDY_cfi.py:10
Generated for CMSSW Reference Manual by
1.8.16