Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
pat::MET
Analysis-level MET class.
Definition:
MET.h:40
hitfit::METTranslatorBase
Template class of function object to translate missing transverse energy physics object to HitFit's F...
Definition:
METTranslatorBase.h:49
hitfit::Resolution
Calculate and represent resolution for a physical quantity.
Definition:
Resolution.h:98
hitfit::Defaults_Text::get_string
std::string get_string(std::string name) const override
Definition:
Defaults_Text.cc:416
hitfit::Defaults_Text
A lightweight implementation of the Defaults interface that uses simple ASCII text files...
Definition:
Defaults_Text.h:117
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
hitfit::METTranslatorBase::METTranslatorBase
METTranslatorBase()
Default constructor.
visualization-live-secondInstance_cfg.m
tuple m
Definition:
visualization-live-secondInstance_cfg.py:79
reco::LeafCandidate::px
double px() const final
x coordinate of momentum vector
Definition:
LeafCandidate.h:140
MET.h
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:19
compare_using_db.ifile
tuple ifile
Definition:
compare_using_db.py:251
hitfit::Fourvec
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition:
fourvec.h:55
METTranslatorBase.h
Template class of function object to translate missing transverse energy object to HitFit's Fourvec o...
reco::LeafCandidate::py
double py() const final
y coordinate of momentum vector
Definition:
LeafCandidate.h:142
Resolution
Definition:
trackSplitPlot.h:33
Generated for CMSSW Reference Manual by
1.8.5