test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BeamSpotAlignmentDerivatives.cc
Go to the documentation of this file.
1 
9 
11 
14 
16 
19 {
20  AlgebraicMatrix aliderivs(4,2);
21 
22  if (!tsos.isValid()) return aliderivs;
23 
24  // lp.x = transverse impact parameter
25  // lp.y = longitudinal impact parameter
26  LocalPoint lp = tsos.localPosition();
27  double phi = tsos.globalMomentum().phi();
28  double dz = lp.y();
29  double sinphi = sin(phi);
30  double cosphi = cos(phi);
31 
32  aliderivs[0][0]= sinphi;
33  aliderivs[0][1]= 0.0;
34  aliderivs[1][0]= -cosphi;
35  aliderivs[1][1]= 0.0;
36  aliderivs[2][0]= sinphi*dz;
37  aliderivs[2][1]= 0.0;
38  aliderivs[3][0]= -cosphi*dz;
39  aliderivs[3][1]= 0.0;
40 
41  return(aliderivs);
42 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T y() const
Definition: PV3DBase.h:63
CLHEP::HepMatrix AlgebraicMatrix
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
AlgebraicMatrix operator()(const TrajectoryStateOnSurface &tsos) const
Returns 4x2 jacobian matrix.
GlobalVector globalMomentum() const
Definition: DDAxes.h:10