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
// $Id: PatMETHitFitTranslator.cc,v 1.1 2011/05/26 09:47:00 mseidel Exp $
3
//
4
20
#include "
TopQuarkAnalysis/TopHitFit/interface/METTranslatorBase.h
"
21
#include "
DataFormats/PatCandidates/interface/MET.h
"
22
23
#include <cmath>
24
25
namespace
hitfit {
26
27
28
template
<>
29
METTranslatorBase<pat::MET>::METTranslatorBase
()
30
{
31
resolution_ =
Resolution
(
std::string
(
"0,0,12"
));
32
}
// METTranslatorBase<pat::MET>::METTranslatorBase()
33
34
35
template
<>
36
METTranslatorBase<pat::MET>::METTranslatorBase
(
const
std::string
&
ifile
)
37
{
38
const
Defaults_Text
defs(ifile);
39
std::string
resolution_string(defs.
get_string
(
"met_resolution"
));
40
resolution_ =
Resolution
(resolution_string);
41
42
}
// METTranslatorBase<pat::MET>::METTranslatorBase(const std::string& ifile)
43
44
45
template
<>
46
METTranslatorBase<pat::MET>::~METTranslatorBase
()
47
{
48
}
// METTranslatorBase<pat::MET>::~METTranslatorBase()
49
50
51
template
<>
52
Fourvec
53
METTranslatorBase<pat::MET>::operator()
(
const
pat::MET
&
m
,
54
bool
useObjEmbRes
/* = false */
)
55
{
56
double
px = m.
px
();
57
double
py = m.
py
();
58
59
return
Fourvec
(px,py,0.0,
sqrt
(px*px + py*py));
60
61
}
// Fourvec METTranslatorBase<pat::MET>::operator()(const pat::MET& m)
62
63
64
65
template
<>
66
Resolution
67
METTranslatorBase<pat::MET>::KtResolution
(
const
pat::MET
&
m
,
68
bool
useObjEmbRes
/* = false */
)
const
69
{
70
return
resolution_;
71
}
// Resolution METTranslatorBase<pat::MET>::KtResolution(const pat::MET& m)
72
73
74
75
template
<>
76
Resolution
77
METTranslatorBase<pat::MET>::METResolution
(
const
pat::MET
&
m
,
78
bool
useObjEmbRes
/* = false */
)
const
79
{
80
return
KtResolution(m,useObjEmbRes);
81
}
// Resolution METTranslatorBase<pat::MET>::METResolution(const pat::MET& m)
82
83
84
}
// 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:51
hitfit::Resolution
Calculate and represent resolution for a physical quantity.
Definition:
Resolution.h:103
hitfit::Defaults_Text
A lightweight implementation of the Defaults interface that uses simple ASCII text files...
Definition:
Defaults_Text.h:122
reco::LeafCandidate::py
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
Definition:
LeafCandidate.h:149
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:253
reco::LeafCandidate::px
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
Definition:
LeafCandidate.h:147
hitfit::Fourvec
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition:
fourvec.h:58
METTranslatorBase.h
Template class of function object to translate missing transverse energy object to HitFit's Fourvec o...
m
int m
Definition:
DTDataIntegrityTask.cc:33
hitfit::Defaults_Text::get_string
virtual std::string get_string(std::string name) const
Definition:
Defaults_Text.cc:445
Generated for CMSSW Reference Manual by
1.8.5