#include <BeamSpotAlignmentDerivatives.h>
Public Member Functions | |
AlgebraicMatrix | operator() (const TrajectoryStateOnSurface &tsos) const |
Returns 4x2 jacobian matrix. |
Calculates derivatives for the alignable beam spot
(last update by
)
Definition at line 16 of file BeamSpotAlignmentDerivatives.h.
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); }