CMS 3D CMS Logo

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