CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
RKTestFieldProvider Class Reference

#include <RKTestPropagator.h>

Inheritance diagram for RKTestFieldProvider:
MagneticFieldProvider< float >

Public Member Functions

 RKTestFieldProvider (const MagneticField *field)
 
virtual LocalVectorType valueInTesla (const LocalPointType &lp) const
 
- Public Member Functions inherited from MagneticFieldProvider< float >
virtual LocalVectorType derivativeInTeslaPerMeter (const LocalPointType &p, int N) const
 
virtual int hasDerivatives () const
 
virtual ~MagneticFieldProvider ()
 

Private Attributes

const MagneticFieldtheField
 

Additional Inherited Members

- Public Types inherited from MagneticFieldProvider< float >
typedef Point3DBase< float,
GlobalTag
GlobalPointType
 
typedef Vector3DBase< float,
GlobalTag
GlobalVectorType
 
typedef Point3DBase< float,
LocalTag
LocalPointType
 
typedef Vector3DBase< float,
LocalTag
LocalVectorType
 

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.

31 : theField(field) {}
const MagneticField * theField

Member Function Documentation

virtual LocalVectorType RKTestFieldProvider::valueInTesla ( const LocalPointType p) const
inlinevirtual

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().

33  {
34  // NOTE: the following transformation only works for the central volume
35  // where global and local coordinates are numerically equal !
36  GlobalPoint gp(lp.x(), lp.y(), lp.z());
37  GlobalVector gv = theField->inTesla(gp);
38  return LocalVectorType(gv.x(),gv.y(),gv.z());
39  }
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
const MagneticField * theField
Vector3DBase< float, LocalTag > LocalVectorType

Member Data Documentation

const MagneticField* RKTestFieldProvider::theField
private

Definition at line 43 of file RKTestPropagator.h.

Referenced by valueInTesla().