File indexing completed on 2024-04-06 11:56:12
0001
0002
0003
0004
0005
0006
0007
0008 #include "DataFormats/GeometrySurface/interface/Surface.h"
0009
0010 #include "TrackingTools/PatternTools/interface/TwoTrackMinimumDistance.h"
0011
0012 #include "TrackingTools/TrajectoryState/interface/PerigeeConversions.h"
0013 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0014
0015 #include "Alignment/CommonAlignmentParametrization/interface/BeamSpotAlignmentDerivatives.h"
0016
0017 AlgebraicMatrix BeamSpotAlignmentDerivatives::operator()(const TrajectoryStateOnSurface &tsos) const {
0018 AlgebraicMatrix aliderivs(4, 2);
0019
0020 if (!tsos.isValid())
0021 return aliderivs;
0022
0023
0024
0025 LocalPoint lp = tsos.localPosition();
0026 double phi = tsos.globalMomentum().phi();
0027 double dz = lp.y();
0028 double sinphi = sin(phi);
0029 double cosphi = cos(phi);
0030
0031 aliderivs[0][0] = sinphi;
0032 aliderivs[0][1] = 0.0;
0033 aliderivs[1][0] = -cosphi;
0034 aliderivs[1][1] = 0.0;
0035 aliderivs[2][0] = sinphi * dz;
0036 aliderivs[2][1] = 0.0;
0037 aliderivs[3][0] = -cosphi * dz;
0038 aliderivs[3][1] = 0.0;
0039
0040 return (aliderivs);
0041 }