CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions
RKOne4OrderStep< T, N > Class Template Reference

#include <RKOne4OrderStep.h>

Public Types

typedef T Scalar
 
typedef RKSmallVector< T, NVector
 

Public Member Functions

std::pair< Vector, Toperator() (Scalar startPar, const Vector &startState, const RKDerivative< T, N > &deriv, const RKDistance< T, N > &dist, Scalar step)
 

Detailed Description

template<typename T, int N>
class RKOne4OrderStep< T, N >

Definition at line 10 of file RKOne4OrderStep.h.

Member Typedef Documentation

template<typename T , int N>
typedef T RKOne4OrderStep< T, N >::Scalar

Definition at line 13 of file RKOne4OrderStep.h.

template<typename T , int N>
typedef RKSmallVector<T,N> RKOne4OrderStep< T, N >::Vector

Definition at line 14 of file RKOne4OrderStep.h.

Member Function Documentation

template<typename T , int N>
std::pair< Vector, T> RKOne4OrderStep< T, N >::operator() ( Scalar  startPar,
const Vector startState,
const RKDerivative< T, N > &  deriv,
const RKDistance< T, N > &  dist,
Scalar  step 
)
inline

Definition at line 17 of file RKOne4OrderStep.h.

References funct::abs(), and mps_update::diff.

19  {
20  const Scalar huge = 1.e5; // ad hoc protection against infinities, must be done better!
21  const Scalar hugediff = 100.;
22 
23  RK4OneStepTempl<T,N> solver;
24  Vector one( solver(startPar, startState, deriv, step));
25  if (std::abs(one[0])>huge || std::abs(one(1)>huge)) return std::pair<Vector, Scalar>(one,hugediff);
26 
27  Vector firstHalf( solver(startPar, startState, deriv, step/2));
28  Vector secondHalf(solver(startPar+step/2, firstHalf, deriv, step/2));
29  Scalar diff = dist(one, secondHalf, startPar+step);
30  return std::pair<Vector, Scalar>(secondHalf,diff);
31  }
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
list diff
Definition: mps_update.py:85
Abs< T >::type abs(const T &t)
Definition: Abs.h:22