ATLAS Offline Software
Loading...
Searching...
No Matches
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
7#include "G4Track.hh"
8#include "G4ChordFinder.hh"
9#include "G4MuonPlus.hh"
10#include "G4MuonMinus.hh"
11#include "G4ChargedGeantino.hh"
12
13
15TightMuonSteppingFieldManager::TightMuonSteppingFieldManager(G4Field *detectorField, G4ChordFinder *pChordFinder, G4bool b)
16 : G4FieldManager(detectorField,pChordFinder,b)
20 , m_globalMinEps(-1.)
21 , m_globalMaxEps(-1.)
22{}
23
26 : G4FieldManager(detectorMagneticField)
30 , m_globalMinEps(-1.)
31 , m_globalMaxEps(-1.)
32{}
33
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}
Helper functions for G4FieldManager to adapt to changes in Geant4 interfaces since 10....
TightMuonSteppingFieldManager(G4Field *detectorField=0, G4ChordFinder *pChordFinder=0, G4bool b=true)
Constructor.
virtual void ConfigureForTrack(const G4Track *) override final
The one interesting method.
double m_globalDeltaChord
Parameters of the stepper.
G4bool SetMinAndMaxEpsilonStep(G4FieldManager *fieldMgr, double eps_min, double eps_max)
Set epsilon step range for a G4FieldManager instance accounting for Geant4 sanity checks.