CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AnalyticalErrorPropagation.cc
Go to the documentation of this file.
2 
5 
6 //#include "FWCore/MessageLogger/interface/MessageLogger.h"
7 
8 
9 std::pair<TrajectoryStateOnSurface,double>
11  const Surface& surface, SurfaceSideDefinition::SurfaceSide side,
12  const GlobalTrajectoryParameters& destParameters,
13  const double& s) const
14 {
15  if (startingState.hasError()) {
16 
17  //
18  // compute jacobian
19  //
20 
21  // FIXME: Compute mean B field between startingState and destParameters and pass it to analyticalJacobian
22  GlobalPoint xStart = startingState.position();
23  GlobalPoint xDest = destParameters.position();
24  GlobalVector h1 = destParameters.magneticFieldInInverseGeV(xStart);
25  GlobalVector h2 = destParameters.magneticFieldInInverseGeV(xDest);
26  GlobalVector h = 0.5*(h1+h2);
27  //LogDebug("RungeKutta") << "AnalyticalErrorPropagation: The Fields are: " << h1 << ", " << h2 << ", " << h ;
28 
29  //
30  AnalyticalCurvilinearJacobian analyticalJacobian(startingState.parameters(),
31  destParameters.position(),
32  destParameters.momentum(), s);
33  AlgebraicMatrix55 jacobian(analyticalJacobian.jacobian());
34  CurvilinearTrajectoryError cte( ROOT::Math::Similarity(jacobian, startingState.curvilinearError().matrix()));
35  return std::pair<TrajectoryStateOnSurface,double>(TrajectoryStateOnSurface(destParameters,cte,surface,side),s);
36  }
37  else {
38  //
39  // return state without errors
40  //
41  return std::pair<TrajectoryStateOnSurface,double>(TrajectoryStateOnSurface(destParameters,surface,side),s);
42  }
43 }
44 
const GlobalTrajectoryParameters & parameters() const
GlobalVector magneticFieldInInverseGeV(const GlobalPoint &x) const
const CurvilinearTrajectoryError & curvilinearError() const
std::pair< TrajectoryStateOnSurface, double > operator()(const FreeTrajectoryState &startingState, const Surface &surface, SurfaceSideDefinition::SurfaceSide side, const GlobalTrajectoryParameters &destParameters, const double &s) const
GlobalPoint position() const
const AlgebraicSymMatrix55 & matrix() const
string s
Definition: asciidump.py:422
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55