CMS 3D CMS Logo

Public Member Functions

AnalyticalErrorPropagation Class Reference

#include <AnalyticalErrorPropagation.h>

List of all members.

Public Member Functions

std::pair
< TrajectoryStateOnSurface,
double > 
operator() (const FreeTrajectoryState &startingState, const Surface &surface, SurfaceSideDefinition::SurfaceSide side, const GlobalTrajectoryParameters &destParameters, const double &s) const

Detailed Description

Definition at line 15 of file AnalyticalErrorPropagation.h.


Member Function Documentation

std::pair< TrajectoryStateOnSurface, double > AnalyticalErrorPropagation::operator() ( const FreeTrajectoryState startingState,
const Surface surface,
SurfaceSideDefinition::SurfaceSide  side,
const GlobalTrajectoryParameters destParameters,
const double &  s 
) const

Definition at line 10 of file AnalyticalErrorPropagation.cc.

References FreeTrajectoryState::curvilinearError(), FreeTrajectoryState::hasError(), CurvilinearTrajectoryError::matrix(), GlobalTrajectoryParameters::momentum(), FreeTrajectoryState::parameters(), GlobalTrajectoryParameters::position(), and alignCSCRings::s.

{
  if (startingState.hasError()) {

    //
    // compute jacobian
    //

    // FIXME: Compute mean B field between startingState and destParameters and pass it to analyticalJacobian
    //GlobalPoint xStart = startingState.position();
    //GlobalPoint xDest = destParameters.position();
    //GlobalVector h1  = destParameters.magneticFieldInInverseGeV(xStart);
    //GlobalVector h2  = destParameters.magneticFieldInInverseGeV(xDest);
    //GlobalVector h = 0.5*(h1+h2);
    //LogDebug("RungeKutta") << "AnalyticalErrorPropagation: The Fields are: " << h1 << ", " << h2 << ", " << h ; 
    
    // 
    AnalyticalCurvilinearJacobian analyticalJacobian(startingState.parameters(), 
                                                     destParameters.position(), 
                                                     destParameters.momentum(), s);
    AlgebraicMatrix55 jacobian(analyticalJacobian.jacobian());
    CurvilinearTrajectoryError cte( ROOT::Math::Similarity(jacobian, startingState.curvilinearError().matrix()));
    return std::pair<TrajectoryStateOnSurface,double>(TrajectoryStateOnSurface(destParameters,cte,surface,side),s);
  }
  else {
    //
    // return state without errors
    //
    return std::pair<TrajectoryStateOnSurface,double>(TrajectoryStateOnSurface(destParameters,surface,side),s);
  }
}