Go to the documentation of this file.
56 string field(
string s,
int i)
71 if (
pos == string::npos)
78 if (pos2 != string::npos)
81 while (
pos < pos2 && isspace(
s[
pos]))
84 return s.substr(
pos, pos2);
111 : _p_res(field(
s, 0)), _eta_res(field(
s, 1)), _phi_res(field(
s, 2)), _use_et(field(
s, 3) ==
"et") {}
126 : _p_res(p_res), _eta_res(eta_res), _phi_res(phi_res), _use_et(use_et) {}
198 double ee = use_et ?
v.perp() :
v.e();
199 return res.sigma(ee);
215 double sig = find_sigma(
v, _p_res, _use_et);
217 if (_p_res.inverse()) {
218 sig *=
v.perp() /
v.e();
220 sig *=
v.e() /
v.perp();
237 return find_sigma(
v, _eta_res, _use_et);
251 return find_sigma(
v, _phi_res, _use_et);
281 double rot =
res.pick(0, ee, engine);
310 double rot =
res.pick(0, ee, engine);
329 double ee = _use_et ?
v.perp() :
v.e();
330 v *= _p_res.pick(ee, ee, engine) / ee;
333 smear_eta(
v, ee, _eta_res, engine);
334 smear_phi(
v, ee, _phi_res, engine);
358 s <<
r._p_res <<
"/ " <<
r._eta_res <<
"/ " <<
r._phi_res;
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
void smear(Fourvec &v, CLHEP::HepRandomEngine &engine, bool do_smear_dir=false) const
Smear a four-momentum according to the resolutions.
double phi_sigma(const Fourvec &v) const
Calculate the azimuthal angle resolution of a four-momentum.
const Resolution & p_res() const
Return a constant reference to the momentum resolution.
Calculate and represent resolution for a vector of momentum , pseudorapidity , and azimuthal angle .
const Resolution & phi_res() const
Return a constant reference to the azimuthal angle resolution.
std::ostream & operator<<(std::ostream &s, const Constraint_Intermed &ci)
Output stream operator, print the content of this Constraint_Intermed to an output stream.
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.
bool use_et() const
Return the use_et flag.
void roteta(Fourvec &v, double eta)
Rotate four-vector v through a polar angle such that the four-vector pseudorapidity changes by a desi...
Define three-vector and four-vector classes for the HitFit package, and supply a few additional opera...
double eta_sigma(const Fourvec &v) const
Calculate the pseudorapidity resolution of a four-momentum.
Vector_Resolution()
Constructor, instantiate an instance of Vector_Resolution with infinite precision.