CMS 3D CMS Logo

PatMETHitFitTranslator.cc
Go to the documentation of this file.
1 //
2 //
3 
20 
21 #include <cmath>
22 
23 namespace hitfit {
24 
25  template <>
27  resolution_ = Resolution(std::string("0,0,12"));
28  } // METTranslatorBase<pat::MET>::METTranslatorBase()
29 
30  template <>
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
Analysis-level MET class.
Definition: MET.h:40
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:98
double px() const final
x coordinate of momentum vector
A lightweight implementation of the Defaults interface that uses simple ASCII text files...
METTranslatorBase()
Default constructor.
T sqrt(T t)
Definition: SSEVec.h:19
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:55
Template class of function object to translate missing transverse energy object to HitFit&#39;s Fourvec o...
std::string get_string(std::string name) const override
double py() const final
y coordinate of momentum vector