ATLAS Offline Software
Loading...
Searching...
No Matches
TightMuonSteppingFieldManager Class Reference

G4FieldManager that sets tight stepping for muons; caches global values for other particles. More...

#include <TightMuonSteppingFieldManager.h>

Inheritance diagram for TightMuonSteppingFieldManager:
Collaboration diagram for TightMuonSteppingFieldManager:

Public Member Functions

 TightMuonSteppingFieldManager (G4Field *detectorField=0, G4ChordFinder *pChordFinder=0, G4bool b=true)
 Constructor.
 TightMuonSteppingFieldManager (G4MagneticField *detectorMagneticField)
 Simple constructor.
virtual ~TightMuonSteppingFieldManager ()
 Simple destructor.
virtual void ConfigureForTrack (const G4Track *) override final
 The one interesting method.

Private Attributes

double m_globalDeltaChord
 Parameters of the stepper.
double m_globalDeltaOneStep
double m_globalDeltaIntersection
double m_globalMinEps
double m_globalMaxEps

Detailed Description

G4FieldManager that sets tight stepping for muons; caches global values for other particles.

Author
Zach Marshall
Date
2016-06-01

Definition at line 23 of file TightMuonSteppingFieldManager.h.

Constructor & Destructor Documentation

◆ TightMuonSteppingFieldManager() [1/2]

TightMuonSteppingFieldManager::TightMuonSteppingFieldManager ( G4Field * detectorField = 0,
G4ChordFinder * pChordFinder = 0,
G4bool b = true )

Constructor.

Normal constructor.

Definition at line 15 of file TightMuonSteppingFieldManager.cxx.

◆ TightMuonSteppingFieldManager() [2/2]

TightMuonSteppingFieldManager::TightMuonSteppingFieldManager ( G4MagneticField * detectorMagneticField)

Simple constructor.

Definition at line 25 of file TightMuonSteppingFieldManager.cxx.

26 : G4FieldManager(detectorMagneticField)
30 , m_globalMinEps(-1.)
31 , m_globalMaxEps(-1.)
32{}

◆ ~TightMuonSteppingFieldManager()

virtual TightMuonSteppingFieldManager::~TightMuonSteppingFieldManager ( )
inlinevirtual

Simple destructor.

Definition at line 33 of file TightMuonSteppingFieldManager.h.

33{}

Member Function Documentation

◆ ConfigureForTrack()

void TightMuonSteppingFieldManager::ConfigureForTrack ( const G4Track * track)
finaloverridevirtual

The one interesting method.

Definition at line 35 of file TightMuonSteppingFieldManager.cxx.

36{
37 // If they have not been set yet, get the settings for the global field manager
38 if (m_globalDeltaChord<0){
39 m_globalDeltaChord = GetChordFinder()->GetDeltaChord();
40 m_globalDeltaOneStep = GetDeltaOneStep();
41 m_globalDeltaIntersection = GetDeltaIntersection();
42 m_globalMinEps = GetMinimumEpsilonStep();
43 m_globalMaxEps = GetMaximumEpsilonStep();
44 }
45
46 // If this is a muon, set tight parameters; otherwise go back to the defaults
47 if (track->GetDefinition()==G4MuonPlus::Definition() ||
48 track->GetDefinition()==G4MuonMinus::Definition() ||
49 track->GetDefinition()==G4ChargedGeantino::ChargedGeantinoDefinition()) {
50 GetChordFinder()->SetDeltaChord(0.00000002);
51 SetDeltaOneStep(0.000001);
52 SetDeltaIntersection(0.00000002);
53 G4FieldManagerHelper::SetMinAndMaxEpsilonStep(this, 0.0000009, 0.000001);
54 } else {
55 GetChordFinder()->SetDeltaChord(m_globalDeltaChord);
56 SetDeltaOneStep(m_globalDeltaOneStep);
57 SetDeltaIntersection(m_globalDeltaIntersection);
59 }
60
61}
G4bool SetMinAndMaxEpsilonStep(G4FieldManager *fieldMgr, double eps_min, double eps_max)
Set epsilon step range for a G4FieldManager instance accounting for Geant4 sanity checks.

Member Data Documentation

◆ m_globalDeltaChord

double TightMuonSteppingFieldManager::m_globalDeltaChord
private

Parameters of the stepper.

This is to cache the global ones; the muon ones will be hard-coded

Definition at line 40 of file TightMuonSteppingFieldManager.h.

◆ m_globalDeltaIntersection

double TightMuonSteppingFieldManager::m_globalDeltaIntersection
private

Definition at line 42 of file TightMuonSteppingFieldManager.h.

◆ m_globalDeltaOneStep

double TightMuonSteppingFieldManager::m_globalDeltaOneStep
private

Definition at line 41 of file TightMuonSteppingFieldManager.h.

◆ m_globalMaxEps

double TightMuonSteppingFieldManager::m_globalMaxEps
private

Definition at line 44 of file TightMuonSteppingFieldManager.h.

◆ m_globalMinEps

double TightMuonSteppingFieldManager::m_globalMinEps
private

Definition at line 43 of file TightMuonSteppingFieldManager.h.


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