CMS 3D CMS Logo

ForwardProton.cc
Go to the documentation of this file.
1 /****************************************************************************
2  * Authors:
3  * Jan Kašpar
4  * Laurent Forthomme
5  ****************************************************************************/
6 
8 
9 #include <set>
10 
11 using namespace reco;
12 
14  : time_(0.),
15  time_err_(0.),
16  xi_(0.),
17  chi2_(0.),
18  ndof_(0),
19  valid_fit_(false),
20  method_(ReconstructionMethod::invalid) {}
21 
23  double ndof,
24  const Point& vtx,
25  const Vector& momentum,
26  float xi,
27  const CovarianceMatrix& cov,
29  const CTPPSLocalTrackLiteRefVector& local_tracks,
30  bool valid,
31  const float time,
32  const float time_err)
33  : vertex_(vtx),
34  momentum_(momentum),
35  time_(time),
36  time_err_(time_err),
37  xi_(xi),
38  covariance_(cov),
39  chi2_(chi2),
40  ndof_(ndof),
41  valid_fit_(valid),
42  method_(method),
43  contributing_local_tracks_(local_tracks) {}
44 
45 float ForwardProton::calculateT(double beam_mom, double proton_mom, double theta) {
46  const double t0 = 2. * (massSquared_ + beam_mom * proton_mom -
47  sqrt((massSquared_ + beam_mom * beam_mom) * (massSquared_ + proton_mom * proton_mom)));
48  const double S = sin(theta / 2.);
49  return t0 - 4. * beam_mom * proton_mom * S * S;
50 }
51 
52 float ForwardProton::t() const {
53  const double beam_mom = p() / (1. - xi());
54  const double theta = std::hypot(thetaX(), thetaY());
55  return calculateT(beam_mom, p(), theta);
56 }
MPlex< T, D1, D2, N > hypot(const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
Definition: Matriplex.h:616
static float calculateT(double beam_mom, double proton_mom, double theta)
compute the squared four-momentum transfer from incident and scattered momenta, and angular informati...
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
float thetaY() const
horizontal scattering angle, in rad
Definition: ForwardProton.h:83
float thetaX() const
vertical scattering angle, in rad
Definition: ForwardProton.h:81
ForwardProton()
default constructor
T sqrt(T t)
Definition: SSEVec.h:23
float xi() const
longitudinal fractional momentum loss
Definition: ForwardProton.h:79
static constexpr float massSquared_
proton mass squared, GeV^2
fixed size matrix
Structure Point Contains parameters of Gaussian fits to DMRs.
float p() const
scalar norm of fitted track momentum
Definition: ForwardProton.h:61
math::XYZVectorF Vector
spatial vector
Definition: ForwardProton.h:28
float t() const
four-momentum transfer squared, in GeV^2
ReconstructionMethod
type of reconstruction applied for this track
Definition: ForwardProton.h:32