CMS 3D CMS Logo

AnalyticalErrorPropagation.h
Go to the documentation of this file.
1 #ifndef AnalyticalErrorPropagation_H
2 #define AnalyticalErrorPropagation_H
3 
11 
12 class Surface;
13 
14 inline
15 std::pair<TrajectoryStateOnSurface,double>
18  const GlobalTrajectoryParameters& destParameters,
19  const double& s) {
20  if UNLIKELY(!startingState.hasError())
21  // return state without errors
22  return std::pair<TrajectoryStateOnSurface,double>(TrajectoryStateOnSurface(destParameters,surface,side),s);
23 
24  //
25  // compute jacobian
26  //
27 
28  // FIXME: Compute mean B field between startingState and destParameters and pass it to analyticalJacobian
29  //GlobalPoint xStart = startingState.position();
30  //GlobalPoint xDest = destParameters.position();
31  //GlobalVector h1 = destParameters.magneticFieldInInverseGeV(xStart);
32  //GlobalVector h2 = destParameters.magneticFieldInInverseGeV(xDest);
33  //GlobalVector h = 0.5*(h1+h2);
34  //LogDebug("RungeKutta") << "AnalyticalErrorPropagation: The Fields are: " << h1 << ", " << h2 << ", " << h ;
35 
36  //
37  AnalyticalCurvilinearJacobian analyticalJacobian(startingState.parameters(),
38  destParameters.position(),
39  destParameters.momentum(), s);
40  auto const & jacobian = analyticalJacobian.jacobian();
41  return std::pair<TrajectoryStateOnSurface,double>(
42  TrajectoryStateOnSurface(destParameters,
43  ROOT::Math::Similarity(jacobian, startingState.curvilinearError().matrix()),
44  surface,side),
45  s);
46 }
47 
48 #endif
virtual Side side(const LocalPoint &p, Scalar tolerance=0) const =0
const GlobalTrajectoryParameters & parameters() const
const AlgebraicMatrix55 & jacobian() const
const CurvilinearTrajectoryError & curvilinearError() const
std::pair< TrajectoryStateOnSurface, double > analyticalErrorPropagation(const FreeTrajectoryState &startingState, const Surface &surface, SurfaceSideDefinition::SurfaceSide side, const GlobalTrajectoryParameters &destParameters, const double &s)
const AlgebraicSymMatrix55 & matrix() const
#define UNLIKELY(x)
Definition: Likely.h:21