G4FieldManager that sets tight stepping for muons; disables magnetic field for other particles.
More...
#include <SwitchingFieldManager.h>
G4FieldManager that sets tight stepping for muons; disables magnetic field for other particles.
- Authors
- Evangelos Kourlitis, John Apostolakis
- Date
- 2021-06-07
Definition at line 19 of file SwitchingFieldManager.h.
◆ SwitchingFieldManager()
SwitchingFieldManager::SwitchingFieldManager |
( |
G4Field * |
field | ) |
|
◆ ~SwitchingFieldManager()
SwitchingFieldManager::~SwitchingFieldManager |
( |
| ) |
|
◆ Clone()
G4FieldManager * SwitchingFieldManager::Clone |
( |
| ) |
const |
|
override |
Definition at line 55 of file SwitchingFieldManager.cxx.
61 clone->SetDeltaOneStep( this->GetDeltaOneStep() );
62 clone->SetDeltaIntersection( this->GetDeltaIntersection() );
64 clone->GetChordFinder()->SetDeltaChord( this->GetChordFinder()->GetDeltaChord() );
◆ ConfigureForTrack()
void SwitchingFieldManager::ConfigureForTrack |
( |
const G4Track * |
track | ) |
|
|
override |
Definition at line 29 of file SwitchingFieldManager.cxx.
32 || GetDetectorField() ==
nullptr );
37 const bool isMuonTrack = (
track->GetDefinition()==G4MuonPlus::Definition() ||
38 track->GetDefinition()==G4MuonMinus::Definition() ||
39 track->GetDefinition()==G4ChargedGeantino::ChargedGeantinoDefinition());
41 const G4ThreeVector position =
track->GetPosition();
42 const G4double r2XY = position.x()*position.x() + position.y()*position.y();
43 const G4double
Z = position.z();
47 const bool inSide = (r2XY > r2Min) && (r2XY < r2Max) && (fabs(
Z) <
m_Zmax -
m_offset);
49 if ( inSide && DoesFieldExist() && !isMuonTrack )
50 ChangeDetectorField(
nullptr );
51 else if ( !inSide && !DoesFieldExist() )
◆ m_offset
G4double SwitchingFieldManager::m_offset = 0.0 |
|
private |
◆ m_radiusXYmax
G4double SwitchingFieldManager::m_radiusXYmax = 1900 |
|
private |
◆ m_radiusXYmin
G4double SwitchingFieldManager::m_radiusXYmin = 1500 |
|
private |
◆ m_savedField
G4Field* SwitchingFieldManager::m_savedField = nullptr |
|
private |
◆ m_Zmax
G4double SwitchingFieldManager::m_Zmax = 2000 |
|
private |
The documentation for this class was generated from the following files: