ATLAS Offline Software
Simulation
G4Atlas
G4AtlasServices
src
ConstantFieldSvc.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ConstantFieldSvc.h
"
6
7
// Geant4 includes
8
#include "G4UniformMagField.hh"
9
10
ConstantFieldSvc::ConstantFieldSvc
(
const
std::string&
name
, ISvcLocator* pSvcLocator)
11
:
G4MagFieldSvcBase
(
name
, pSvcLocator)
12
{
13
}
14
15
StatusCode
ConstantFieldSvc::initialize
()
16
{
17
ATH_MSG_DEBUG
(
"Initializing "
<<
name
() );
18
return
StatusCode::SUCCESS;
19
}
20
21
G4MagneticField*
ConstantFieldSvc::makeField
()
22
{
23
ATH_MSG_VERBOSE
(
"ConstantFieldSvc::makeField"
);
24
const
G4ThreeVector fieldVec(
m_fieldX
,
m_fieldY
,
m_fieldZ
);
25
return
new
G4UniformMagField(fieldVec);
26
}
ConstantFieldSvc::ConstantFieldSvc
ConstantFieldSvc(const std::string &name, ISvcLocator *pSvcLocator)
Basic constructor and destructor.
Definition:
ConstantFieldSvc.cxx:10
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition:
AthMsgStreamMacros.h:28
ConstantFieldSvc::makeField
G4MagneticField * makeField() override final
Create the field object.
Definition:
ConstantFieldSvc.cxx:21
G4MagFieldSvcBase
Definition:
G4MagFieldSvcBase.h:29
ConstantFieldSvc.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition:
AthMsgStreamMacros.h:29
ConstantFieldSvc::m_fieldY
Gaudi::Property< double > m_fieldY
Definition:
ConstantFieldSvc.h:40
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
ConstantFieldSvc::m_fieldZ
Gaudi::Property< double > m_fieldZ
Definition:
ConstantFieldSvc.h:41
ConstantFieldSvc::initialize
StatusCode initialize() override final
Athena method.
Definition:
ConstantFieldSvc.cxx:15
ConstantFieldSvc::m_fieldX
Gaudi::Property< double > m_fieldX
Definition:
ConstantFieldSvc.h:39
Generated on Fri Jan 10 2025 21:08:28 for ATLAS Offline Software by
1.8.18