CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PatMETHitFitTranslator.cc
Go to the documentation of this file.
1 //
2 //
3 
21 
22 #include <cmath>
23 
24 namespace hitfit {
25 
26 
27 template<>
29 {
30  resolution_ = Resolution(std::string("0,0,12"));
31 } // METTranslatorBase<pat::MET>::METTranslatorBase()
32 
33 
34 template<>
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<>
46 {
47 } // METTranslatorBase<pat::MET>::~METTranslatorBase()
48 
49 
50 template<>
51 Fourvec
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<>
67  bool useObjEmbRes /* = false */) const
68 {
69  return resolution_;
70 } // Resolution METTranslatorBase<pat::MET>::KtResolution(const pat::MET& m)
71 
72 
73 
74 template<>
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
Analysis-level MET class.
Definition: MET.h:43
Template class of function object to translate missing transverse energy physics object to HitFit&#39;s F...
Calculate and represent resolution for a physical quantity.
Definition: Resolution.h:102
A lightweight implementation of the Defaults interface that uses simple ASCII text files...
METTranslatorBase()
Default constructor.
T sqrt(T t)
Definition: SSEVec.h:48
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:57
Template class of function object to translate missing transverse energy object to HitFit&#39;s Fourvec o...
virtual double px() const
x coordinate of momentum vector
virtual std::string get_string(std::string name) const
virtual double py() const
y coordinate of momentum vector