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 // $Id: PatMETHitFitTranslator.cc,v 1.1 2011/05/26 09:47:00 mseidel Exp $
3 //
4 
22 
23 #include <cmath>
24 
25 namespace hitfit {
26 
27 
28 template<>
30 {
31  resolution_ = Resolution(std::string("0,0,12"));
32 } // METTranslatorBase<pat::MET>::METTranslatorBase()
33 
34 
35 template<>
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<>
47 {
48 } // METTranslatorBase<pat::MET>::~METTranslatorBase()
49 
50 
51 template<>
52 Fourvec
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<>
68  bool useObjEmbRes /* = false */) const
69 {
70  return resolution_;
71 } // Resolution METTranslatorBase<pat::MET>::KtResolution(const pat::MET& m)
72 
73 
74 
75 template<>
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
Analysis-level MET class.
Definition: MET.h:42
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:103
A lightweight implementation of the Defaults interface that uses simple ASCII text files...
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
METTranslatorBase()
Default constructor.
T sqrt(T t)
Definition: SSEVec.h:48
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:58
Template class of function object to translate missing transverse energy object to HitFit&#39;s Fourvec o...
virtual std::string get_string(std::string name) const