CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

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

Returns 4x2 jacobian matrix.

Definition at line 18 of file BeamSpotAlignmentDerivatives.cc.

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

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
GlobalVector globalMomentum() const