Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4CachedMagneticField Class Reference

The cached magnetic field defined by the TVirtualMCApplication field map. More...

#include <TG4CachedMagneticField.h>

Inheritance diagram for TG4CachedMagneticField:

Public Member Functions

 TG4CachedMagneticField (TVirtualMagField *magField, G4double constDistance)
 
virtual ~TG4CachedMagneticField ()
 
virtual void GetFieldValue (const G4double point[3], G4double *bfield) const
 
virtual void PrintStatistics () const
 
void ClearCounter ()
 
void SetConstDistance (G4double value)
 
- Public Member Functions inherited from TG4MagneticField
 TG4MagneticField (TVirtualMagField *magField)
 
virtual ~TG4MagneticField ()
 

Private Attributes

G4ThreeVector fLastLocation
 The last evaluated location.
 
G4ThreeVector fLastValue
 The last evaluated value.
 
G4int fCallsCounter
 The counter of calls to GetFieldValue()
 
G4int fEvaluationsCounter
 The counter of field value evaluations in GetFieldValue()
 
G4double fConstDistanceSquare
 The square of the distance within which the field is considered constant.
 

Additional Inherited Members

- Protected Attributes inherited from TG4MagneticField
TVirtualMagField * fVirtualMagField
 The associated TGeo magnetic field.
 

Detailed Description

The cached magnetic field defined by the TVirtualMCApplication field map.

Overrides TG4MagneticField::GetFieldValue(); it uses the value from a previous call in case the distance of the new point from a previous one is smaller than the value of TG4FieldParameters::fConstDistance.

According to G4CachedMagneticField class.

Author
I. Hrivnacova; IPN, Orsay

Definition at line 45 of file TG4CachedMagneticField.h.

Constructor & Destructor Documentation

◆ TG4CachedMagneticField()

TG4CachedMagneticField::TG4CachedMagneticField ( TVirtualMagField * magField,
G4double constDistance )

Default constructor

Definition at line 23 of file TG4CachedMagneticField.cxx.

◆ ~TG4CachedMagneticField()

TG4CachedMagneticField::~TG4CachedMagneticField ( )
virtual

Destructor

Definition at line 36 of file TG4CachedMagneticField.cxx.

Member Function Documentation

◆ GetFieldValue()

void TG4CachedMagneticField::GetFieldValue ( const G4double point[3],
G4double * bfield ) const
virtual

Return the bfield values in the given point.

Reimplemented from TG4MagneticField.

Definition at line 46 of file TG4CachedMagneticField.cxx.

◆ PrintStatistics()

void TG4CachedMagneticField::PrintStatistics ( ) const
virtual

Print the caching statistics

Reimplemented from TG4MagneticField.

Definition at line 94 of file TG4CachedMagneticField.cxx.

◆ ClearCounter()

void TG4CachedMagneticField::ClearCounter ( )

Clear counters

Definition at line 112 of file TG4CachedMagneticField.cxx.

◆ SetConstDistance()

void TG4CachedMagneticField::SetConstDistance ( G4double value)

Set new const distance value

Definition at line 105 of file TG4CachedMagneticField.cxx.

Member Data Documentation

◆ fLastLocation

G4ThreeVector TG4CachedMagneticField::fLastLocation
mutableprivate

The last evaluated location.

Definition at line 62 of file TG4CachedMagneticField.h.

Referenced by GetFieldValue().

◆ fLastValue

G4ThreeVector TG4CachedMagneticField::fLastValue
mutableprivate

The last evaluated value.

Definition at line 64 of file TG4CachedMagneticField.h.

Referenced by GetFieldValue().

◆ fCallsCounter

G4int TG4CachedMagneticField::fCallsCounter
mutableprivate

The counter of calls to GetFieldValue()

Definition at line 66 of file TG4CachedMagneticField.h.

Referenced by ClearCounter(), GetFieldValue(), and PrintStatistics().

◆ fEvaluationsCounter

G4int TG4CachedMagneticField::fEvaluationsCounter
mutableprivate

The counter of field value evaluations in GetFieldValue()

Definition at line 68 of file TG4CachedMagneticField.h.

Referenced by ClearCounter(), GetFieldValue(), and PrintStatistics().

◆ fConstDistanceSquare

G4double TG4CachedMagneticField::fConstDistanceSquare
private

The square of the distance within which the field is considered constant.

Definition at line 70 of file TG4CachedMagneticField.h.

Referenced by GetFieldValue(), PrintStatistics(), and SetConstDistance().


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