CMS 3D CMS Logo

List of all members | Public Member Functions
BeamSpotAlignmentDerivatives Class Reference

#include <BeamSpotAlignmentDerivatives.h>

Public Member Functions

AlgebraicMatrix operator() (const TrajectoryStateOnSurface &tsos) const
 Returns 4x2 jacobian matrix. More...
 

Detailed Description

Calculates derivatives for the alignable beam spot

Date
2007/03/12 21:28:48
Revision
1.4

(last update by

Author
cklae

)

Definition at line 16 of file BeamSpotAlignmentDerivatives.h.

Member Function Documentation

◆ operator()()

AlgebraicMatrix BeamSpotAlignmentDerivatives::operator() ( const TrajectoryStateOnSurface tsos) const

Returns 4x2 jacobian matrix.

Definition at line 17 of file BeamSpotAlignmentDerivatives.cc.

References funct::cos(), PVValHelper::dz, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localPosition(), phi, PV3DBase< T, PVType, FrameType >::phi(), funct::sin(), and PV3DBase< T, PVType, FrameType >::y().

17  {
18  AlgebraicMatrix aliderivs(4, 2);
19 
20  if (!tsos.isValid())
21  return aliderivs;
22 
23  // lp.x = transverse impact parameter
24  // lp.y = longitudinal impact parameter
25  LocalPoint lp = tsos.localPosition();
26  double phi = tsos.globalMomentum().phi();
27  double dz = lp.y();
28  double sinphi = sin(phi);
29  double cosphi = cos(phi);
30 
31  aliderivs[0][0] = sinphi;
32  aliderivs[0][1] = 0.0;
33  aliderivs[1][0] = -cosphi;
34  aliderivs[1][1] = 0.0;
35  aliderivs[2][0] = sinphi * dz;
36  aliderivs[2][1] = 0.0;
37  aliderivs[3][0] = -cosphi * dz;
38  aliderivs[3][1] = 0.0;
39 
40  return (aliderivs);
41 }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
T y() const
Definition: PV3DBase.h:60
CLHEP::HepMatrix AlgebraicMatrix
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
GlobalVector globalMomentum() const