56 string field(
string s,
int i)
70 pos = s.find(
'/', pos);
71 if (pos == string::npos)
78 if (pos2 != string::npos)
81 while (pos < pos2 && isspace(s[pos]))
84 return s.substr(pos, pos2);
198 double ee = use_et ? v.perp() : v.e();
199 return res.
sigma(ee);
218 sig *=
v.perp() /
v.e();
220 sig *=
v.e() /
v.perp();
281 double rot = res.
pick(0, ee, engine);
296 void smear_phi(
Fourvec& v,
double ee,
const Resolution& res, CLHEP::HepRandomEngine& engine)
310 double rot = res.
pick(0, ee, engine);
Calculate and represent resolution for a vector of momentum , pseudorapidity , and azimuthal angle ...
Define three-vector and four-vector classes for the HitFit package, and supply a few additional opera...
Calculate and represent resolution for a physical quantity.
bool use_et() const
Return the use_et flag.
bool inverse() const
Return the setting of the inverse flag.
double phi_sigma(const Fourvec &v) const
Calculate the azimuthal angle resolution of a four-momentum.
void roteta(Fourvec &v, double eta)
Rotate four-vector v through a polar angle such that the four-vector pseudorapidity changes by a desi...
double pick(double x, double p, CLHEP::HepRandomEngine &engine) const
Generate random value from a Gaussian distribution described by this resolution. Given a value ...
Vector_Resolution()
Constructor, instantiate an instance of Vector_Resolution with infinite precision.
double p_sigma(const Fourvec &v) const
Calculate the momentum resolution of a four-momentum.
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.
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
double sigma(double p) const
Return the uncertainty for a variable with magnitude p.
void smear(Fourvec &v, CLHEP::HepRandomEngine &engine, bool do_smear_dir=false) const
Smear a four-momentum according to the resolutions.
const Resolution & p_res() const
Return a constant reference to the momentum resolution.
const Resolution & phi_res() const
Return a constant reference to the azimuthal angle resolution.
friend 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 ...