Calculate and represent resolution for a vector of , pseudorapidity , and azimuthal angle . An instance of this class holds three Resolution objects, one each for , , and . In addition, we have a flag to indicate if the momentum resolution is in or . This flag is set by appending [/et] at the end of the string. More...
#include <Vector_Resolution.h>
Public Member Functions | |
const Resolution & | eta_res () const |
Return a constant reference to the pseudorapidity resolution. | |
double | eta_sigma (const Fourvec &v) const |
Calculate the pseudorapidity resolution of a four-momentum. | |
const Resolution & | p_res () const |
Return a constant reference to the momentum resolution. | |
double | p_sigma (const Fourvec &v) const |
Calculate the momentum resolution of a four-momentum. | |
const Resolution & | phi_res () const |
Return a constant reference to the azimuthal angle resolution. | |
double | phi_sigma (const Fourvec &v) const |
Calculate the azimuthal angle resolution of a four-momentum. | |
void | smear (Fourvec &v, CLHEP::HepRandomEngine &engine, bool do_smear_dir=false) const |
Smear a four-momentum according to the resolutions. | |
bool | use_et () const |
Return the use_et flag. | |
Vector_Resolution (std::string s) | |
Constructor, instantiate an instance of Vector_Resolution from a string using format as described in the class description. | |
Vector_Resolution () | |
Constructor, instantiate an instance of Vector_Resolution with infinite precision. | |
Vector_Resolution (const Resolution &p_res, const Resolution &eta_res, const Resolution &phi_res, bool use_et=false) | |
Constructor, instantiate an instance of Vector_Resolution from three instances of Resolution objects. | |
Private Member Functions | |
void | smear_dir (Fourvec &v, CLHEP::HepRandomEngine &engine) const |
Helper function to smear direction. | |
Private Attributes | |
Resolution | _eta_res |
Resolution | _p_res |
Resolution | _phi_res |
bool | _use_et |
Friends | |
std::ostream & | operator<< (std::ostream &s, const Vector_Resolution &r) |
Output stream operator, print the content of this Vector_Resolution object to an output stream. |
Calculate and represent resolution for a vector of , pseudorapidity , and azimuthal angle . An instance of this class holds three Resolution objects, one each for , , and . In addition, we have a flag to indicate if the momentum resolution is in or . This flag is set by appending [/et] at the end of the string.
This class is initialized from a string with format
<p-resolution>/<eta-resolution>/<phi-resolution>[/et]
where the resolution formats are given in the documentation for the Resolution class.
Addendum by Haryo Sumowidagdo: When using the inverse flag, only the inverse flag in p-resolution will be used by the fitter to set that flag which says the error in 'p' is really the error on '1/p'. The inverse flag for in eta-resolution and in phi-resolution are not used by the fitter. As usually the angular resolution is of the form
where can be the magnitude of the momentum ( ) or or transverse momentum ( ), one then can (and should!) use the inverse flag for and resolution.
Definition at line 94 of file Vector_Resolution.h.
hitfit::Vector_Resolution::Vector_Resolution | ( | ) |
Constructor, instantiate an instance of Vector_Resolution with infinite precision.
Definition at line 98 of file Vector_Resolution.cc.
hitfit::Vector_Resolution::Vector_Resolution | ( | std::string | s | ) |
Constructor, instantiate an instance of Vector_Resolution from a string using format as described in the class description.
s | String enconding the resolution parameters. |
Definition at line 112 of file Vector_Resolution.cc.
hitfit::Vector_Resolution::Vector_Resolution | ( | const Resolution & | p_res, |
const Resolution & | eta_res, | ||
const Resolution & | phi_res, | ||
bool | use_et = false |
||
) |
Constructor, instantiate an instance of Vector_Resolution from three instances of Resolution objects.
p_res | The momentum resolution. |
eta_res | The pseudorapidity resolution. |
phi_res | The azimuthal angle resolution. |
use_et | If TRUE then use instead of for momentum resolution. |
Definition at line 128 of file Vector_Resolution.cc.
const Resolution & hitfit::Vector_Resolution::eta_res | ( | ) | const |
Return a constant reference to the pseudorapidity resolution.
Definition at line 161 of file Vector_Resolution.cc.
References _eta_res.
{ return _eta_res; }
double hitfit::Vector_Resolution::eta_sigma | ( | const Fourvec & | v | ) | const |
Calculate the pseudorapidity resolution of a four-momentum.
v | The four-momentum. |
Definition at line 255 of file Vector_Resolution.cc.
Referenced by hitfit::Lepjets_Event_Lep::eta_sigma().
const Resolution & hitfit::Vector_Resolution::p_res | ( | ) | const |
Return a constant reference to the momentum resolution.
Definition at line 149 of file Vector_Resolution.cc.
References _p_res.
{ return _p_res; }
double hitfit::Vector_Resolution::p_sigma | ( | const Fourvec & | v | ) | const |
Calculate the momentum resolution of a four-momentum.
v | The four-momentum. |
Definition at line 232 of file Vector_Resolution.cc.
Referenced by hitfit::Lepjets_Event_Lep::p_sigma().
const Resolution & hitfit::Vector_Resolution::phi_res | ( | ) | const |
Return a constant reference to the azimuthal angle resolution.
Definition at line 173 of file Vector_Resolution.cc.
References _phi_res.
{ return _phi_res; }
double hitfit::Vector_Resolution::phi_sigma | ( | const Fourvec & | v | ) | const |
Calculate the azimuthal angle resolution of a four-momentum.
v | The four-momentum. |
Definition at line 270 of file Vector_Resolution.cc.
Referenced by hitfit::Lepjets_Event_Lep::phi_sigma().
void hitfit::Vector_Resolution::smear | ( | Fourvec & | v, |
CLHEP::HepRandomEngine & | engine, | ||
bool | do_smear_dir = false |
||
) | const |
Smear a four-momentum according to the resolutions.
v | The four-momentum to smear. |
engine | The underlying random number generator. |
do_smear_dir | If FALSE, only smear the energy. If TRUE, also smear the direction. |
Definition at line 354 of file Vector_Resolution.cc.
Referenced by hitfit::Lepjets_Event_Lep::smear().
void hitfit::Vector_Resolution::smear_dir | ( | Fourvec & | v, |
CLHEP::HepRandomEngine & | engine | ||
) | const [private] |
Helper function to smear direction.
v | The four-momentum to smear. |
engine | The underlying random number generator. |
bool hitfit::Vector_Resolution::use_et | ( | ) | const |
Return the use_et flag.
Definition at line 185 of file Vector_Resolution.cc.
References _use_et.
{ return _use_et; }
std::ostream& operator<< | ( | std::ostream & | s, |
const Vector_Resolution & | r | ||
) | [friend] |
Output stream operator, print the content of this Vector_Resolution object to an output stream.
s | The stream to which to write. |
r | The instance of Vector_Resolution to be printed. |
Definition at line 387 of file Vector_Resolution.cc.
The pseudorapidity resolution.
Definition at line 209 of file Vector_Resolution.h.
Referenced by eta_res(), and hitfit::operator<<().
Resolution hitfit::Vector_Resolution::_p_res [private] |
The momentum resolution.
Definition at line 204 of file Vector_Resolution.h.
Referenced by hitfit::operator<<(), and p_res().
The phi resolution.
Definition at line 214 of file Vector_Resolution.h.
Referenced by hitfit::operator<<(), and phi_res().
bool hitfit::Vector_Resolution::_use_et [private] |
The momentum resolution.
Definition at line 219 of file Vector_Resolution.h.
Referenced by hitfit::operator<<(), and use_et().