CMS 3D CMS Logo

Public Member Functions | Private Attributes

RKTestFieldProvider Class Reference

#include <RKTestPropagator.h>

Inheritance diagram for RKTestFieldProvider:
MagneticFieldProvider< float >

List of all members.

Public Member Functions

 RKTestFieldProvider (const MagneticField *field)
virtual LocalVectorType valueInTesla (const LocalPointType &lp) const

Private Attributes

const MagneticFieldtheField

Detailed Description

Definition at line 28 of file RKTestPropagator.h.


Constructor & Destructor Documentation

RKTestFieldProvider::RKTestFieldProvider ( const MagneticField field) [inline]

Definition at line 31 of file RKTestPropagator.h.

: theField(field) {}

Member Function Documentation

virtual LocalVectorType RKTestFieldProvider::valueInTesla ( const LocalPointType p) const [inline, virtual]

Returns the field vector in the local frame, at local position p

Implements MagneticFieldProvider< float >.

Definition at line 33 of file RKTestPropagator.h.

References MagneticField::inTesla(), theField, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

                                                                       {
   // NOTE: the following transformation only works for the central volume
   // where global and local coordinates are numerically equal !
   GlobalPoint gp(lp.x(), lp.y(), lp.z());
   GlobalVector gv =  theField->inTesla(gp);
   return LocalVectorType(gv.x(),gv.y(),gv.z());
 }

Member Data Documentation

Definition at line 43 of file RKTestPropagator.h.

Referenced by valueInTesla().