ATLAS Offline Software
Loading...
Searching...
No Matches
ConstantFieldSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef G4ATLASSERVICES_ConstantFieldSvc_H
6#define G4ATLASSERVICES_ConstantFieldSvc_H
7
8// Base classes
9#include "G4MagFieldSvcBase.h"
10
11// Geant4
12#include "G4MagneticField.hh"
13
14// STL library
15#include <string>
16
20{
21 public:
22
24 ConstantFieldSvc(const std::string& name, ISvcLocator* pSvcLocator);
25 ~ConstantFieldSvc() = default;
26
28 StatusCode initialize() override final;
29
31
33 G4MagneticField* makeField() override final;
34
35 private:
36
39 Gaudi::Property<double> m_fieldX{this, "FieldX", 0., "Field X component"};
40 Gaudi::Property<double> m_fieldY{this, "FieldY", 0., "Field Y component"};
41 Gaudi::Property<double> m_fieldZ{this, "FieldZ", 0., "Field Z component"};
43};
44
45#endif
#define protected
~ConstantFieldSvc()=default
ConstantFieldSvc(const std::string &name, ISvcLocator *pSvcLocator)
Basic constructor and destructor.
Gaudi::Property< double > m_fieldX
Gaudi::Property< double > m_fieldZ
StatusCode initialize() override final
Athena method.
G4MagneticField * makeField() override final
Create the field object.
Gaudi::Property< double > m_fieldY
G4MagFieldSvcBase(const std::string &name, ISvcLocator *pSvcLocator)
Standard constructor.
Support class for PropertyMgr.
Definition Property.h:23
=============================================================================
#define private