CMS 3D CMS Logo

UniformMagneticField Class Reference

A MagneticField engine that returns a constant programmable field value. More...

#include <MagneticField/UniformEngine/src/UniformMagneticField.h>

Inheritance diagram for UniformMagneticField:

MagneticField

List of all members.

Public Member Functions

GlobalVector inTesla (const GlobalPoint &gp) const
 Field value ad specified global point, in Tesla.
GlobalVector inTeslaUnchecked (const GlobalPoint &gp) const
 Optional implementation that derived classes can implement to provide faster query by skipping the check to isDefined.
bool isDefined (const GlobalPoint &gp) const
 True if the point is within the region where the concrete field.
 UniformMagneticField (double value)
 Construct passing the Z field component in Tesla.
virtual ~UniformMagneticField ()

Private Attributes

GlobalVector theField


Detailed Description

A MagneticField engine that returns a constant programmable field value.

Date
2008/05/06 12:40:04
Revision
1.3
Author:
N. Amapane - CERN

Definition at line 16 of file UniformMagneticField.h.


Constructor & Destructor Documentation

UniformMagneticField::UniformMagneticField ( double  value  ) 

Construct passing the Z field component in Tesla.

Definition at line 13 of file UniformMagneticField.cc.

00014   : theField(0.,0.,value) {}

virtual UniformMagneticField::~UniformMagneticField (  )  [inline, virtual]

Definition at line 22 of file UniformMagneticField.h.

00022 {}


Member Function Documentation

GlobalVector UniformMagneticField::inTesla ( const GlobalPoint gp  )  const [virtual]

Field value ad specified global point, in Tesla.

Implements MagneticField.

Definition at line 17 of file UniformMagneticField.cc.

References theField.

00017                                                                        {
00018   return theField;
00019 }

GlobalVector UniformMagneticField::inTeslaUnchecked ( const GlobalPoint gp  )  const [virtual]

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

Reimplemented from MagneticField.

Definition at line 21 of file UniformMagneticField.cc.

References theField.

00021                                                                                 {
00022   return theField;
00023 }

bool UniformMagneticField::isDefined ( const GlobalPoint gp  )  const [inline, virtual]

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

Reimplemented from MagneticField.

Definition at line 28 of file UniformMagneticField.h.

00028 {return true;}


Member Data Documentation

GlobalVector UniformMagneticField::theField [private]

Definition at line 31 of file UniformMagneticField.h.

Referenced by inTesla(), and inTeslaUnchecked().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:34:51 2009 for CMSSW by  doxygen 1.5.4