CMS 3D CMS Logo

Public Member Functions

BeamSpotAlignmentDerivatives Class Reference

#include <BeamSpotAlignmentDerivatives.h>

List of all members.

Public Member Functions

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

Detailed Description

Calculates derivatives for the alignable beam spot

Date:
2010/09/10 11:18:29
Revision:
1.1

(last update by

Author:
mussgill

)

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(), PV3DBase< T, PVType, FrameType >::phi(), phi, funct::sin(), and PV3DBase< T, PVType, FrameType >::y().

{ 
  AlgebraicMatrix aliderivs(4,2);

  if (!tsos.isValid()) return aliderivs;

  // lp.x = transverse impact parameter
  // lp.y = longitudinal impact parameter
  LocalPoint lp = tsos.localPosition();
  double phi = tsos.globalMomentum().phi();
  double dz = lp.y();
  double sinphi = sin(phi);
  double cosphi = cos(phi);

  aliderivs[0][0]=  sinphi;
  aliderivs[0][1]=  0.0;
  aliderivs[1][0]= -cosphi;
  aliderivs[1][1]=  0.0;
  aliderivs[2][0]=  sinphi*dz;
  aliderivs[2][1]=  0.0;
  aliderivs[3][0]= -cosphi*dz;
  aliderivs[3][1]=  0.0;
  
  return(aliderivs);
}