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
RK4OneStepTempl< T, N > Class Template Reference

#include <RK4OneStepTempl.h>

Public Types

typedef T Scalar
 
typedef RKSmallVector< T, NVector
 

Public Member Functions

Vector operator() (Scalar startPar, const Vector &startState, const RKDerivative< T, N > &deriv, Scalar step) const
 

Detailed Description

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

Definition at line 9 of file RK4OneStepTempl.h.

Member Typedef Documentation

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

Definition at line 12 of file RK4OneStepTempl.h.

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

Definition at line 13 of file RK4OneStepTempl.h.

Member Function Documentation

template<typename T, int N>
Vector RK4OneStepTempl< T, N >::operator() ( Scalar  startPar,
const Vector startState,
const RKDerivative< T, N > &  deriv,
Scalar  step 
) const
inline

Definition at line 16 of file RK4OneStepTempl.h.

References relval_steps::k2, and mps_fire::result.

17  {
18 
19  // cout << "RK4OneStepTempl: starting from " << startPar << startState << endl;
20 
21  Vector k1 = step * deriv( startPar, startState);
22  Vector k2 = step * deriv( startPar+step/2, startState+k1/2);
23  Vector k3 = step * deriv( startPar+step/2, startState+k2/2);
24  Vector k4 = step * deriv( startPar+step, startState+k3);
25 
26  Vector result = startState + k1/6 + k2/3 + k3/3 + k4/6;
27 
28  // cout << "RK4OneStepTempl: result for step " << step << " is " << result << endl;
29 
30  return result;
31  }
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
tuple result
Definition: mps_fire.py:95