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 Member Functions | Private Attributes
MagneticField Class Referenceabstract

#include <MagneticField.h>

Inheritance diagram for MagneticField:
LocalMagneticField MagVolume OAE85lParametrizedMagneticField OAEParametrizedMagneticField PolyFit2DParametrizedMagneticField PolyFit3DParametrizedMagneticField UniformMagneticField VolumeBasedMagneticField

Public Member Functions

virtual MagneticFieldclone () const
 
GlobalVector inInverseGeV (const GlobalPoint &gp) const
 Field value ad specified global point, in 1/Gev. More...
 
GlobalVector inKGauss (const GlobalPoint &gp) const
 Field value ad specified global point, in KGauss. More...
 
virtual GlobalVector inTesla (const GlobalPoint &gp) const =0
 Field value ad specified global point, in Tesla. More...
 
virtual GlobalVector inTeslaUnchecked (const GlobalPoint &gp) const
 
virtual bool isDefined (const GlobalPoint &gp) const
 True if the point is within the region where the concrete field. More...
 
 MagneticField ()
 
int nominalValue () const
 The nominal field value for this map in kGauss. More...
 
virtual ~MagneticField ()
 

Private Member Functions

virtual int computeNominalValue () const
 

Private Attributes

bool nominalValueCompiuted
 
int theNominalValue
 

Detailed Description

Base class for the different implementation of magnetic field engines.

Date:
2011/12/10 16:36:11
Revision:
1.11
Author
N. Amapane - CERN

Definition at line 18 of file MagneticField.h.

Constructor & Destructor Documentation

MagneticField::MagneticField ( )

Definition at line 10 of file MagneticField.cc.

10 : nominalValueCompiuted(false){}
bool nominalValueCompiuted
Definition: MagneticField.h:67
MagneticField::~MagneticField ( )
virtual

Definition at line 12 of file MagneticField.cc.

12 {}

Member Function Documentation

virtual MagneticField* MagneticField::clone ( void  ) const
inlinevirtual

Derived classes can implement cloning without ownership of the underlying engines.

Reimplemented in GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, VolumeBasedMagneticField, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, and GCC11_FINAL< T, TOPO >.

Definition at line 26 of file MagneticField.h.

26  {
27  return 0;
28  }
int MagneticField::computeNominalValue ( ) const
privatevirtual

Definition at line 15 of file MagneticField.cc.

References f, inTesla(), and detailsBasic3DVector::z.

Referenced by nominalValue().

15  {
16  return int((inTesla(GlobalPoint(0.f,0.f,0.f))).z() * 10.f + 0.5f);
17 }
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
float float float z
double f[11][100]
GlobalVector MagneticField::inInverseGeV ( const GlobalPoint gp) const
inline
GlobalVector MagneticField::inKGauss ( const GlobalPoint gp) const
inline

Field value ad specified global point, in KGauss.

Definition at line 35 of file MagneticField.h.

References inTesla().

Referenced by CSCDriftSim::getWireHit().

35  {
36  return inTesla(gp) * 10.F;
37  }
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
virtual GlobalVector MagneticField::inTesla ( const GlobalPoint gp) const
pure virtual
virtual GlobalVector MagneticField::inTeslaUnchecked ( const GlobalPoint gp) const
inlinevirtual

Optional implementation that derived classes can implement to provide faster query by skipping the check to isDefined.

Reimplemented in OAE85lParametrizedMagneticField, VolumeBasedMagneticField, OAEParametrizedMagneticField, PolyFit2DParametrizedMagneticField, PolyFit3DParametrizedMagneticField, and UniformMagneticField.

Definition at line 52 of file MagneticField.h.

References inTesla().

Referenced by VolumeBasedMagneticField::inTesla(), and VolumeBasedMagneticField::inTeslaUnchecked().

52  {
53  return inTesla(gp); // default dummy implementation
54  }
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
virtual bool MagneticField::isDefined ( const GlobalPoint gp) const
inlinevirtual

True if the point is within the region where the concrete field.

Reimplemented in VolumeBasedMagneticField, OAE85lParametrizedMagneticField, OAEParametrizedMagneticField, PolyFit2DParametrizedMagneticField, PolyFit3DParametrizedMagneticField, and UniformMagneticField.

Definition at line 46 of file MagneticField.h.

Referenced by VolumeBasedMagneticField::inTesla(), and VolumeBasedMagneticField::inTeslaUnchecked().

46  {
47  return true;
48  }
int MagneticField::nominalValue ( ) const
inline

Member Data Documentation

bool MagneticField::nominalValueCompiuted
mutableprivate

Definition at line 67 of file MagneticField.h.

Referenced by nominalValue().

int MagneticField::theNominalValue
mutableprivate

Definition at line 68 of file MagneticField.h.

Referenced by nominalValue().