CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
hitfit::METTranslatorBase< AMet > Class Template Reference

Template class of function object to translate missing transverse energy physics object to HitFit's Fourvec object. Users need to write an implementation of a template specialization of this class for their missing transverse energy physics object class, Then users combine this header file and their implementation for their analysis code. With this approach, it is possible to use HitFit for different missing transverse energy physics object class indifferent experiments. More...

#include <METTranslatorBase.h>

Public Member Functions

Resolution KtResolution (const AMet &met, bool useObjEmbRes=false) const
 Return the $ k_{T} $ resolution corresponding to an instance of missing transverse energy object. More...
 
template<>
Resolution KtResolution (const CLHEP::HepLorentzVector &m, bool useObjEmbRes) const
 
template<>
Resolution KtResolution (const pat::MET &m, bool useObjEmbRes) const
 
Resolution METResolution (const AMet &met, bool useObjEmbRes=false) const
 Alias for KtResolution(AMet& met) More...
 
template<>
Resolution METResolution (const CLHEP::HepLorentzVector &m, bool useObjEmbRes) const
 
template<>
Resolution METResolution (const pat::MET &m, bool useObjEmbRes) const
 
template<>
 METTranslatorBase ()
 
 METTranslatorBase ()
 Default constructor. More...
 
template<>
 METTranslatorBase ()
 
template<>
 METTranslatorBase (const std::string &ifile)
 
 METTranslatorBase (const std::string &ifile)
 Constructor, instantiate a METTranslatorBase object using the name of and input file in std::string format. More...
 
template<>
 METTranslatorBase (const std::string &ifile)
 
Fourvec operator() (const AMet &met, bool useObjEmbRes=false)
 Convert a missing transverse energy object of type AMet into HitFit four-momentum object of type Fourvec. More...
 
template<>
Fourvec operator() (const CLHEP::HepLorentzVector &m, bool useObjEmbRes)
 
template<>
Fourvec operator() (const pat::MET &m, bool useObjEmbRes)
 
template<>
 ~METTranslatorBase ()
 
 ~METTranslatorBase ()
 Destructor. More...
 
template<>
 ~METTranslatorBase ()
 

Private Attributes

Resolution resolution_
 The resolution. More...
 

Detailed Description

template<class AMet>
class hitfit::METTranslatorBase< AMet >

Template class of function object to translate missing transverse energy physics object to HitFit's Fourvec object. Users need to write an implementation of a template specialization of this class for their missing transverse energy physics object class, Then users combine this header file and their implementation for their analysis code. With this approach, it is possible to use HitFit for different missing transverse energy physics object class indifferent experiments.

Parameters
AMetThe typename of the missing transverse energy physics object class be translated into HitFit's Fourvec.

Definition at line 49 of file METTranslatorBase.h.

Constructor & Destructor Documentation

◆ METTranslatorBase() [1/6]

template<class AMet>
hitfit::METTranslatorBase< AMet >::METTranslatorBase ( )

Default constructor.

◆ METTranslatorBase() [2/6]

template<class AMet>
hitfit::METTranslatorBase< AMet >::METTranslatorBase ( const std::string &  ifile)

Constructor, instantiate a METTranslatorBase object using the name of and input file in std::string format.

Parameters
ifileThe path of the input file.

◆ ~METTranslatorBase() [1/3]

template<class AMet>
hitfit::METTranslatorBase< AMet >::~METTranslatorBase ( )

Destructor.

◆ METTranslatorBase() [3/6]

template<>
hitfit::METTranslatorBase< CLHEP::HepLorentzVector >::METTranslatorBase ( )

Definition at line 156 of file CLHEPHitFitTranslator.cc.

156  {
157  resolution_ = Resolution(std::string("0,0,12"));
158  } // METTranslatorBase<CLHEP::HepLorentzVector>::METTranslatorBase()

◆ METTranslatorBase() [4/6]

template<>
hitfit::METTranslatorBase< CLHEP::HepLorentzVector >::METTranslatorBase ( const std::string &  ifile)

Definition at line 161 of file CLHEPHitFitTranslator.cc.

161  {
162  const Defaults_Text defs(ifile);
163  std::string resolution_string(defs.get_string("met_resolution"));
164  resolution_ = Resolution(resolution_string);
165 
166  } // METTranslatorBase<CLHEP::HepLorentzVector>::METTranslatorBase(const std::string& ifile)

◆ ~METTranslatorBase() [2/3]

template<>
hitfit::METTranslatorBase< CLHEP::HepLorentzVector >::~METTranslatorBase ( )

Definition at line 169 of file CLHEPHitFitTranslator.cc.

169  {
170  } // METTranslatorBase<CLHEP::HepLorentzVector>::~METTranslatorBase()

◆ METTranslatorBase() [5/6]

Definition at line 26 of file PatMETHitFitTranslator.cc.

26  {
27  resolution_ = Resolution(std::string("0,0,12"));
28  } // METTranslatorBase<pat::MET>::METTranslatorBase()

◆ METTranslatorBase() [6/6]

template<>
hitfit::METTranslatorBase< pat::MET >::METTranslatorBase ( const std::string &  ifile)

Definition at line 31 of file PatMETHitFitTranslator.cc.

31  {
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)

◆ ~METTranslatorBase() [3/3]

Definition at line 39 of file PatMETHitFitTranslator.cc.

39 {} // METTranslatorBase<pat::MET>::~METTranslatorBase()

Member Function Documentation

◆ KtResolution() [1/3]

template<class AMet>
Resolution hitfit::METTranslatorBase< AMet >::KtResolution ( const AMet &  met,
bool  useObjEmbRes = false 
) const

Return the $ k_{T} $ resolution corresponding to an instance of missing transverse energy object.

Parameters
metThe missing transverse energy object whose resolution is wished to be known.
useObjEmbResBoolean parameter to indicate if the user would like to use the resolution embedded in the object, and not the resolution read when instantiating the class.

◆ KtResolution() [2/3]

template<>
Resolution hitfit::METTranslatorBase< CLHEP::HepLorentzVector >::KtResolution ( const CLHEP::HepLorentzVector &  m,
bool  useObjEmbRes 
) const

Definition at line 180 of file CLHEPHitFitTranslator.cc.

181  {
182  return resolution_;
183  } // Resolution METTranslatorBase<CLHEP::HepLorentzVector>::KtResolution(const CLHEP::HepLorentzVector& m)

◆ KtResolution() [3/3]

template<>
Resolution hitfit::METTranslatorBase< pat::MET >::KtResolution ( const pat::MET m,
bool  useObjEmbRes 
) const

Definition at line 51 of file PatMETHitFitTranslator.cc.

51  {
52  return resolution_;
53  } // Resolution METTranslatorBase<pat::MET>::KtResolution(const pat::MET& m)

◆ METResolution() [1/3]

template<class AMet>
Resolution hitfit::METTranslatorBase< AMet >::METResolution ( const AMet &  met,
bool  useObjEmbRes = false 
) const

Alias for KtResolution(AMet& met)

Parameters
metThe missing transverse energy object whose resolution is wished to be known.
useObjEmbResBoolean parameter to indicate if the user would like to use the resolution embedded in the object, and not the resolution read when instantiating the class.

◆ METResolution() [2/3]

template<>
Resolution hitfit::METTranslatorBase< CLHEP::HepLorentzVector >::METResolution ( const CLHEP::HepLorentzVector &  m,
bool  useObjEmbRes 
) const

Definition at line 186 of file CLHEPHitFitTranslator.cc.

187  {
188  return KtResolution(m, useObjEmbRes);
189  } // Resolution METTranslatorBase<CLHEP::HepLorentzVector>::METResolution(const CLHEP::HepLorentzVector& m)

◆ METResolution() [3/3]

template<>
Resolution hitfit::METTranslatorBase< pat::MET >::METResolution ( const pat::MET m,
bool  useObjEmbRes 
) const

Definition at line 56 of file PatMETHitFitTranslator.cc.

56  {
57  return KtResolution(m, useObjEmbRes);
58  } // Resolution METTranslatorBase<pat::MET>::METResolution(const pat::MET& m)

◆ operator()() [1/3]

template<class AMet>
Fourvec hitfit::METTranslatorBase< AMet >::operator() ( const AMet &  met,
bool  useObjEmbRes = false 
)

Convert a missing transverse energy object of type AMet into HitFit four-momentum object of type Fourvec.

Parameters
metThe missing transverse energy object to be translated.
useObjEmbResBoolean parameter to indicate if the user would like to use the resolution embedded in the object, and not the resolution read when instantiating the class.

◆ operator()() [2/3]

template<>
Fourvec hitfit::METTranslatorBase< CLHEP::HepLorentzVector >::operator() ( const CLHEP::HepLorentzVector &  m,
bool  useObjEmbRes 
)

Definition at line 173 of file CLHEPHitFitTranslator.cc.

174  {
175  return Fourvec(m.px(), m.py(), 0.0, m.e());
176 
177  } // Fourvec METTranslatorBase<CLHEP::HepLorentzVector>::operator()(const CLHEP::HepLorentzVector& m)

◆ operator()() [3/3]

template<>
Fourvec hitfit::METTranslatorBase< pat::MET >::operator() ( const pat::MET m,
bool  useObjEmbRes 
)

Definition at line 42 of file PatMETHitFitTranslator.cc.

42  {
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)

Member Data Documentation

◆ resolution_

template<class AMet>
Resolution hitfit::METTranslatorBase< AMet >::resolution_
private

The resolution.

Definition at line 110 of file METTranslatorBase.h.

hitfit::METTranslatorBase::resolution_
Resolution resolution_
The resolution.
Definition: METTranslatorBase.h:110
hitfit::Fourvec
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:55
multPhiCorr_741_25nsDY_cfi.py
py
Definition: multPhiCorr_741_25nsDY_cfi.py:12
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:78
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
compare_using_db.ifile
ifile
Definition: compare_using_db.py:251
Resolution
Definition: trackSplitPlot.h:33
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
multPhiCorr_741_25nsDY_cfi.px
px
Definition: multPhiCorr_741_25nsDY_cfi.py:10
hitfit::METTranslatorBase::KtResolution
Resolution KtResolution(const AMet &met, bool useObjEmbRes=false) const
Return the resolution corresponding to an instance of missing transverse energy object.