k4SimGeant4
Loading...
Searching...
No Matches
sim::ConstantField Class Reference

Constant magnetic field inside the cylinder. More...

#include <SimG4Common/include/SimG4Common/ConstantField.h>

Inheritance diagram for sim::ConstantField:
Collaboration diagram for sim::ConstantField:

Public Member Functions

 ConstantField ()
 Default constructor.
 
 ConstantField (double bX, double bY, double bZ, double rMax, double zMax)
 Constructor setting parameters.
 
virtual ~ConstantField ()
 
virtual void GetFieldValue (const G4double point[4], double *bField) const final
 Get the value of the magnetic field value at position.
 
void setBx (double value)
 Set the x component of the field.
 
void setBy (double value)
 Set the y component of the field.
 
void setBz (double value)
 Set the z component of the field.
 
void setMaxR (double value)
 Set the extend of the field in radial direction.
 
void setMaxZ (double value)
 Set the extend of the field in longitudinal direction.
 

Private Attributes

double m_bX
 Field component in x.
 
double m_bY
 Field component in y.
 
double m_bZ
 Field component in Z.
 
double m_rMax
 Extend of the field in radial direction.
 
double m_zMax
 Extend of the field in longitudinal direction.
 

Detailed Description

Constant magnetic field inside the cylinder.

Author
Andrea Dell'Acqua

Constructor & Destructor Documentation

◆ ConstantField() [1/2]

sim::ConstantField::ConstantField ( )

Default constructor.

◆ ConstantField() [2/2]

sim::ConstantField::ConstantField ( double bX,
double bY,
double bZ,
double rMax,
double zMax )
explicit

Constructor setting parameters.

◆ ~ConstantField()

virtual sim::ConstantField::~ConstantField ( )
inlinevirtual

Member Function Documentation

◆ GetFieldValue()

void sim::ConstantField::GetFieldValue ( const G4double point[4],
double * bField ) const
finalvirtual

Get the value of the magnetic field value at position.

Parameters
[in]pointthe position where the field is to be returned
[out]bFieldthe return value

◆ setBx()

void sim::ConstantField::setBx ( double value)
inline

Set the x component of the field.

◆ setBy()

void sim::ConstantField::setBy ( double value)
inline

Set the y component of the field.

◆ setBz()

void sim::ConstantField::setBz ( double value)
inline

Set the z component of the field.

◆ setMaxR()

void sim::ConstantField::setMaxR ( double value)
inline

Set the extend of the field in radial direction.

◆ setMaxZ()

void sim::ConstantField::setMaxZ ( double value)
inline

Set the extend of the field in longitudinal direction.

Member Data Documentation

◆ m_bX

double sim::ConstantField::m_bX
private

Field component in x.

◆ m_bY

double sim::ConstantField::m_bY
private

Field component in y.

◆ m_bZ

double sim::ConstantField::m_bZ
private

Field component in Z.

◆ m_rMax

double sim::ConstantField::m_rMax
private

Extend of the field in radial direction.

◆ m_zMax

double sim::ConstantField::m_zMax
private

Extend of the field in longitudinal direction.


The documentation for this class was generated from the following files: