Athena service for constructing the AtlasField object.
More...
#include <StandardFieldSvc.h>
Athena service for constructing the AtlasField object.
Definition at line 67 of file StandardFieldSvc.h.
◆ StandardFieldSvc()
StandardFieldSvc::StandardFieldSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~StandardFieldSvc()
StandardFieldSvc::~StandardFieldSvc |
( |
| ) |
|
|
default |
◆ createFieldMap()
StatusCode StandardFieldSvc::createFieldMap |
( |
| ) |
|
|
private |
Definition at line 76 of file StandardFieldSvc.cxx.
90 return StatusCode::SUCCESS;
93 ATH_MSG_INFO (
"StandardFieldSvc::createFieldMap: Set map currents from FieldSvc: solenoid/toroid "
95 ATH_MSG_INFO (
"StandardFieldSvc::createFieldMap: Use map file " << mapFile);
99 if ( resolvedMapFile.empty() ) {
100 ATH_MSG_ERROR(
"StandardFieldSvc::createFieldMap: Field map file " << mapFile <<
" not found" );
101 return StatusCode::FAILURE;
104 if ( resolvedMapFile.find(
".root") == std::string::npos ) {
105 ATH_MSG_ERROR(
"StandardFieldSvc::createFieldMap: input file name '" << resolvedMapFile <<
"' does not end with .root");
106 return StatusCode::FAILURE;
109 std::unique_ptr<TFile>
rootfile = std::make_unique<TFile>(resolvedMapFile.c_str(),
"OLD");
111 ATH_MSG_ERROR(
"StandardFieldSvc::createFieldMap: failed to open " << resolvedMapFile);
112 return StatusCode::FAILURE;
116 ATH_MSG_ERROR(
"StandardFieldSvc::createFieldMap: unable to cd() into the ROOT field map TFile");
118 return StatusCode::FAILURE;
122 if (
tree ==
nullptr ) {
124 ATH_MSG_ERROR(
"StandardFieldSvc::createFieldMap: TTree 'BFieldMap' does not exist in ROOT field map");
126 return StatusCode::FAILURE;
130 m_fieldMap = std::make_unique<MagField::AtlasFieldMap>();
135 ATH_MSG_ERROR(
"StandardFieldSvc::createFieldMap: unable to initialize the map for AtlasFieldMap for file " << resolvedMapFile);
137 return StatusCode::FAILURE;
142 ATH_MSG_INFO(
"StandardFieldSvc::createFieldMap: Initialized the field map from " << resolvedMapFile );
143 return StatusCode::SUCCESS;
◆ 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 29 of file G4MagFieldSvcBase.cxx.
◆ initialize()
StatusCode StandardFieldSvc::initialize |
( |
| ) |
|
|
finaloverride |
Athena method. called at initialization time, being customized here.
Definition at line 32 of file StandardFieldSvc.cxx.
44 ATH_MSG_INFO(
"initialize: using created map for field cache ");
47 return StatusCode::SUCCESS;
◆ makeField()
G4MagneticField * StandardFieldSvc::makeField |
( |
| ) |
|
|
finaloverrideprotectedvirtual |
◆ solenoidOn()
bool StandardFieldSvc::solenoidOn |
( |
| ) |
|
|
inlineprivate |
◆ toroidOn()
bool StandardFieldSvc::toroidOn |
( |
| ) |
|
|
inlineprivate |
◆ m_fieldHolder
◆ m_fieldMap
◆ m_fullMapFilename
Gaudi::Property<std::string> StandardFieldSvc::m_fullMapFilename |
|
private |
Initial value:{this,
"FullMapFile", "MagneticFieldMaps/bfieldmap_7730_20400_14m.root",
"File storing the full magnetic field map"}
map file names
Definition at line 108 of file StandardFieldSvc.h.
◆ m_magFieldSvc
Handle to the the Forward ATLAS magnetic field service.
Definition at line 99 of file StandardFieldSvc.h.
◆ m_mapSoleCurrent
Gaudi::Property<double> StandardFieldSvc::m_mapSoleCurrent |
|
private |
Initial value:{this,
"MapSoleCurrent", 7730., "Nominal solenoid current (A)"}
nominal current for the maps
Definition at line 118 of file StandardFieldSvc.h.
◆ m_mapToroCurrent
Gaudi::Property<double> StandardFieldSvc::m_mapToroCurrent |
|
private |
Initial value:{this,
"MapToroCurrent", 20400., "Nominal toroid current (A)"}
Definition at line 120 of file StandardFieldSvc.h.
◆ m_soleMapFilename
Gaudi::Property<std::string> StandardFieldSvc::m_soleMapFilename |
|
private |
Initial value:{this,
"SoleMapFile", "MagneticFieldMaps/bfieldmap_7730_0_14m.root",
"File storing the solenoid-only magnetic field map"}
Definition at line 111 of file StandardFieldSvc.h.
◆ m_toroMapFilename
Gaudi::Property<std::string> StandardFieldSvc::m_toroMapFilename |
|
private |
Initial value:{this,
"ToroMapFile", "MagneticFieldMaps/bfieldmap_0_20400_14m.root",
"File storing the toroid-only magnetic field map"}
Definition at line 114 of file StandardFieldSvc.h.
◆ m_useMagFieldSvc
Gaudi::Property<bool> StandardFieldSvc::m_useMagFieldSvc |
|
private |
Initial value:{this,
"UseMagFieldSvc", false, "Use magnetic field service - Should ONLY be used for ForwardRegionFieldSvc"}
Definition at line 95 of file StandardFieldSvc.h.
◆ m_useSoleCurrent
Gaudi::Property<double> StandardFieldSvc::m_useSoleCurrent |
|
private |
Initial value:{this,
"UseSoleCurrent", 7730., "Configured solenoid current (A)"}
configurable current for map scaling
Definition at line 123 of file StandardFieldSvc.h.
◆ m_useToroCurrent
Gaudi::Property<double> StandardFieldSvc::m_useToroCurrent |
|
private |
Initial value:{this,
"UseToroCurrent", 20400., "Configured toroid current (A)"}
Definition at line 125 of file StandardFieldSvc.h.
The documentation for this class was generated from the following files: