ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
G4Atlas
G4AtlasTools
src
TightMuonSteppingFieldManager.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TightMuonSteppingFieldManager.h
"
6
#include "
G4FieldManagerHelper.h
"
7
#include "G4Track.hh"
8
#include "G4ChordFinder.hh"
9
#include "G4MuonPlus.hh"
10
#include "G4MuonMinus.hh"
11
#include "G4ChargedGeantino.hh"
12
13
15
TightMuonSteppingFieldManager::TightMuonSteppingFieldManager
(G4Field *detectorField, G4ChordFinder *pChordFinder, G4bool b)
16
: G4FieldManager(detectorField,pChordFinder,b)
17
,
m_globalDeltaChord
(-1.)
18
,
m_globalDeltaOneStep
(-1.)
19
,
m_globalDeltaIntersection
(-1.)
20
,
m_globalMinEps
(-1.)
21
,
m_globalMaxEps
(-1.)
22
{}
23
25
TightMuonSteppingFieldManager::TightMuonSteppingFieldManager
(G4MagneticField *detectorMagneticField)
26
: G4FieldManager(detectorMagneticField)
27
,
m_globalDeltaChord
(-1.)
28
,
m_globalDeltaOneStep
(-1.)
29
,
m_globalDeltaIntersection
(-1.)
30
,
m_globalMinEps
(-1.)
31
,
m_globalMaxEps
(-1.)
32
{}
33
35
void
TightMuonSteppingFieldManager::ConfigureForTrack
(
const
G4Track * track)
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
);
58
G4FieldManagerHelper::SetMinAndMaxEpsilonStep
(
this
,
m_globalMinEps
,
m_globalMaxEps
);
59
}
60
61
}
G4FieldManagerHelper.h
Helper functions for G4FieldManager to adapt to changes in Geant4 interfaces since 10....
TightMuonSteppingFieldManager.h
TightMuonSteppingFieldManager::m_globalMaxEps
double m_globalMaxEps
Definition
TightMuonSteppingFieldManager.h:44
TightMuonSteppingFieldManager::m_globalDeltaOneStep
double m_globalDeltaOneStep
Definition
TightMuonSteppingFieldManager.h:41
TightMuonSteppingFieldManager::TightMuonSteppingFieldManager
TightMuonSteppingFieldManager(G4Field *detectorField=0, G4ChordFinder *pChordFinder=0, G4bool b=true)
Constructor.
Definition
TightMuonSteppingFieldManager.cxx:15
TightMuonSteppingFieldManager::m_globalMinEps
double m_globalMinEps
Definition
TightMuonSteppingFieldManager.h:43
TightMuonSteppingFieldManager::ConfigureForTrack
virtual void ConfigureForTrack(const G4Track *) override final
The one interesting method.
Definition
TightMuonSteppingFieldManager.cxx:35
TightMuonSteppingFieldManager::m_globalDeltaIntersection
double m_globalDeltaIntersection
Definition
TightMuonSteppingFieldManager.h:42
TightMuonSteppingFieldManager::m_globalDeltaChord
double m_globalDeltaChord
Parameters of the stepper.
Definition
TightMuonSteppingFieldManager.h:40
G4FieldManagerHelper::SetMinAndMaxEpsilonStep
G4bool SetMinAndMaxEpsilonStep(G4FieldManager *fieldMgr, double eps_min, double eps_max)
Set epsilon step range for a G4FieldManager instance accounting for Geant4 sanity checks.
Definition
G4FieldManagerHelper.h:23
Generated on
for ATLAS Offline Software by
1.17.0