#include <ConstantFieldSvc.h>
|
| G4MagneticField * | makeField () override final |
| | Create the field object.
|
|
| Gaudi::Property< double > | m_fieldX {this, "FieldX", 0., "Field X component"} |
| Gaudi::Property< double > | m_fieldY {this, "FieldY", 0., "Field Y component"} |
| Gaudi::Property< double > | m_fieldZ {this, "FieldZ", 0., "Field Z component"} |
- Todo
- Needs documentation
Definition at line 19 of file ConstantFieldSvc.h.
◆ ConstantFieldSvc()
| ConstantFieldSvc::ConstantFieldSvc |
( |
const std::string & | name, |
|
|
ISvcLocator * | pSvcLocator ) |
Basic constructor and destructor.
Definition at line 10 of file ConstantFieldSvc.cxx.
12{
13}
G4MagFieldSvcBase(const std::string &name, ISvcLocator *pSvcLocator)
Standard constructor.
◆ ~ConstantFieldSvc()
| ConstantFieldSvc::~ConstantFieldSvc |
( |
| ) |
|
|
default |
◆ getField()
| G4MagneticField * G4MagFieldSvcBase::getField |
( |
| ) |
|
|
finaloverrideinherited |
Retrieve a G4 magnetic field object.
If one doesn't yet exist in the current thread, it will be created.
Definition at line 31 of file G4MagFieldSvcBase.cxx.
32{
34
35
36 static thread_local std::unique_ptr<G4MagneticField>
field{
makeField()};
37
39}
virtual G4MagneticField * makeField()=0
This method must be overridden by concrete tools to create a new field.
◆ initialize()
| StatusCode ConstantFieldSvc::initialize |
( |
| ) |
|
|
finaloverride |
Athena method.
called at initialization time, being customized here
Definition at line 15 of file ConstantFieldSvc.cxx.
16{
18 return StatusCode::SUCCESS;
19}
◆ makeField()
| G4MagneticField * ConstantFieldSvc::makeField |
( |
| ) |
|
|
finaloverrideprotectedvirtual |
Create the field object.
Implements G4MagFieldSvcBase.
Definition at line 21 of file ConstantFieldSvc.cxx.
22{
25 return new G4UniformMagField(fieldVec);
26}
#define ATH_MSG_VERBOSE(x)
Gaudi::Property< double > m_fieldX
Gaudi::Property< double > m_fieldZ
Gaudi::Property< double > m_fieldY
◆ m_fieldX
| Gaudi::Property<double> ConstantFieldSvc::m_fieldX {this, "FieldX", 0., "Field X component"} |
|
private |
◆ m_fieldY
| Gaudi::Property<double> ConstantFieldSvc::m_fieldY {this, "FieldY", 0., "Field Y component"} |
|
private |
◆ m_fieldZ
| Gaudi::Property<double> ConstantFieldSvc::m_fieldZ {this, "FieldZ", 0., "Field Z component"} |
|
private |
The documentation for this class was generated from the following files: