ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
G4Atlas
G4AtlasTools
G4AtlasTools
G4FieldManagerToolBase.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef G4ATLASTOOLS_G4FieldManagerToolBase_H
6
#define G4ATLASTOOLS_G4FieldManagerToolBase_H
7
8
// Framework includes
9
#include "GaudiKernel/ServiceHandle.h"
10
#include "GaudiKernel/ToolHandle.h"
11
#include "
AthenaBaseComps/AthAlgTool.h
"
12
13
// G4Atlas includes
14
#include "
G4AtlasInterfaces/IEquationOfMotionTool.h
"
15
#include "
G4AtlasInterfaces/IFieldManagerTool.h
"
16
#include "
G4AtlasInterfaces/IG4FieldSvc.h
"
17
18
// Geant4 includes
19
#include "G4Version.hh"
20
21
// Forward declarations
22
class
G4VIntegrationDriver;
23
class
G4MagIntegratorStepper;
24
25
33
class
G4FieldManagerToolBase
:
public
extends<AthAlgTool, IFieldManagerTool>
34
{
35
36
public
:
38
G4FieldManagerToolBase
(
const
std::string&
type
,
const
std::string& name,
39
const
IInterface* parent);
40
42
virtual
~G4FieldManagerToolBase
(){}
43
45
virtual
StatusCode
initialize
( )
override
;
46
47
protected
:
48
49
#if G4VERSION_NUMBER >= 1040
51
G4VIntegrationDriver*
52
createDriverAndStepper(
const
std::string& stepperType, G4MagneticField* field)
const
;
53
#endif
54
55
#if G4VERSION_NUMBER < 1040
57
G4MagIntegratorStepper*
58
getStepper
(
const
std::string& stepperType, G4MagneticField* field)
const
;
59
#endif
60
62
StatusCode
setFieldParameters
(G4FieldManager* fieldMgr)
const
;
63
65
ServiceHandle<IG4FieldSvc>
m_fieldSvc
{
this
,
"FieldSvc"
,
"G4FieldSvc"
,
"Service providing a G4MagneticField"
};
66
68
Gaudi::Property<bool>
m_fieldOn
{
this
,
"FieldOn"
,
true
,
"Toggles field on/off"
};
69
71
Gaudi::Property<std::string>
m_integratorStepper
{
this
,
"IntegratorStepper"
,
"AtlasRK4"
,
"Integrator stepper name"
};
72
74
ToolHandle<IEquationOfMotionTool>
m_equationOfMotion
{
this
,
"EquationOfMotion"
,
""
,
""
};
75
//std::string m_equationOfMotion;
76
79
Gaudi::Property<double>
m_minEps
{
this
,
"MinimumEpsilonStep"
, -1.0,
"Minimum epsilon (see G4 documentation)"
};
80
Gaudi::Property<double>
m_maxEps
{
this
,
"MaximumEpsilonStep"
, -1.0,
"Maximum epsilon (see G4 documentation)"
};
81
Gaudi::Property<double>
m_deltaChord
{
this
,
"DeltaChord"
, -1.0,
"Missing distance for the chord finder"
};
82
Gaudi::Property<double>
m_deltaOneStep
{
this
,
"DeltaOneStep"
, -1.0,
"Delta(one-step)"
};
83
Gaudi::Property<double>
m_deltaIntersection
{
this
,
"DeltaIntersection"
, -1.0,
"Accuracy for boundary intersection"
};
84
Gaudi::Property<double>
m_maxStep
{
this
,
"MaximumStep"
, -1.0,
"Maximum step length in field (see G4 documentation)"
};
85
Gaudi::Property<double>
m_minStep
{
this
,
"MinimumStep"
,1e-2,
"Minimum step length in field (see G4 documentation)"
};
87
88
};
89
90
#endif
// G4ATLASTOOLS_G4FieldManagerToolBase_H
AthAlgTool.h
IEquationOfMotionTool.h
IFieldManagerTool.h
IG4FieldSvc.h
G4FieldManagerToolBase::setFieldParameters
StatusCode setFieldParameters(G4FieldManager *fieldMgr) const
Common method to apply configuredfield parameters.
Definition
G4FieldManagerToolBase.cxx:239
G4FieldManagerToolBase::m_deltaChord
Gaudi::Property< double > m_deltaChord
Definition
G4FieldManagerToolBase.h:81
G4FieldManagerToolBase::getStepper
G4MagIntegratorStepper * getStepper(const std::string &stepperType, G4MagneticField *field) const
Common method to construct a stepper of requested type.
Definition
G4FieldManagerToolBase.cxx:190
G4FieldManagerToolBase::~G4FieldManagerToolBase
virtual ~G4FieldManagerToolBase()
Destructor.
Definition
G4FieldManagerToolBase.h:42
G4FieldManagerToolBase::m_equationOfMotion
ToolHandle< IEquationOfMotionTool > m_equationOfMotion
The type of equation of motion to use.
Definition
G4FieldManagerToolBase.h:74
G4FieldManagerToolBase::m_maxStep
Gaudi::Property< double > m_maxStep
Definition
G4FieldManagerToolBase.h:84
G4FieldManagerToolBase::initialize
virtual StatusCode initialize() override
Initialize method.
Definition
G4FieldManagerToolBase.cxx:62
G4FieldManagerToolBase::m_maxEps
Gaudi::Property< double > m_maxEps
Definition
G4FieldManagerToolBase.h:80
G4FieldManagerToolBase::m_deltaIntersection
Gaudi::Property< double > m_deltaIntersection
Definition
G4FieldManagerToolBase.h:83
G4FieldManagerToolBase::m_fieldSvc
ServiceHandle< IG4FieldSvc > m_fieldSvc
Handle to the G4 field service.
Definition
G4FieldManagerToolBase.h:65
G4FieldManagerToolBase::m_fieldOn
Gaudi::Property< bool > m_fieldOn
Definition
G4FieldManagerToolBase.h:68
G4FieldManagerToolBase::m_deltaOneStep
Gaudi::Property< double > m_deltaOneStep
Definition
G4FieldManagerToolBase.h:82
G4FieldManagerToolBase::G4FieldManagerToolBase
G4FieldManagerToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition
G4FieldManagerToolBase.cxx:52
G4FieldManagerToolBase::m_minStep
Gaudi::Property< double > m_minStep
Definition
G4FieldManagerToolBase.h:85
G4FieldManagerToolBase::m_minEps
Gaudi::Property< double > m_minEps
Definition
G4FieldManagerToolBase.h:79
G4FieldManagerToolBase::m_integratorStepper
Gaudi::Property< std::string > m_integratorStepper
The type of stepper to use.
Definition
G4FieldManagerToolBase.h:71
ServiceHandle
Definition
ClusterMakerTool.h:36
type
Generated on
for ATLAS Offline Software by
1.17.0