Skip to content
Snippets Groups Projects
Commit 320ee4c4 authored by R D Schaffer's avatar R D Schaffer Committed by Walter Lampl
Browse files

Fixing thresholds for currents to not read in maps for online, and returning...

Fixing thresholds for currents to not read in maps for online, and returning zero b-field if no map is read
parent 04263fe9
No related branches found
No related tags found
No related merge requests found
...@@ -51,10 +51,8 @@ MagField::AtlasFieldCache::getField(const double* ATH_RESTRICT xyz, ...@@ -51,10 +51,8 @@ MagField::AtlasFieldCache::getField(const double* ATH_RESTRICT xyz,
{ {
// Allow for the case of no map for testing // Allow for the case of no map for testing
if (m_fieldMap == nullptr) { if (m_fieldMap == nullptr) {
// constant ATLAS magnetic field if no map has been set - for testing // return 0 bfield if map is missing
constexpr double TEST_BFIELD = 1.997; bxyz[0] = bxyz[1] = bxyz[2] = 0;
bxyz[0] = bxyz[1] = 0;
bxyz[2] = TEST_BFIELD;
if (deriv) { if (deriv) {
for (int i = 0; i < 9; i++) { for (int i = 0; i < 9; i++) {
deriv[i] = 0.; deriv[i] = 0.;
......
...@@ -260,9 +260,21 @@ MagField::AtlasFieldMapCondAlg::updateFieldMap(const EventContext& ctx, Cache& c ...@@ -260,9 +260,21 @@ MagField::AtlasFieldMapCondAlg::updateFieldMap(const EventContext& ctx, Cache& c
fullMapFilename = m_fullMapFilename; fullMapFilename = m_fullMapFilename;
soleMapFilename = m_soleMapFilename; soleMapFilename = m_soleMapFilename;
toroMapFilename = m_toroMapFilename; toroMapFilename = m_toroMapFilename;
cache.m_mapSoleCurrent = m_mapSoleCurrent; if (m_mapSoleCurrent < m_soleMinCurrent) {
cache.m_mapToroCurrent = m_mapToroCurrent; cache.m_mapSoleCurrent = 0;
ATH_MSG_INFO("updateFieldMap: requested solenoid current in JobOpt " << m_mapSoleCurrent << " is below allowed minimum " << m_soleMinCurrent << " setting to 0");
}
else {
cache.m_mapSoleCurrent = m_mapSoleCurrent;
}
if (m_mapToroCurrent < m_toroMinCurrent) {
cache.m_mapToroCurrent = 0;
ATH_MSG_INFO("updateFieldMap: requested toroid current in JobOpt " << m_mapToroCurrent << " is below allowed minimum " << m_toroMinCurrent << " setting to 0");
}
else {
cache.m_mapToroCurrent = m_mapToroCurrent;
}
// Create a range for the current run // Create a range for the current run
EventIDBase start, stop; EventIDBase start, stop;
start.set_run_number(ctx.eventID().run_number()); start.set_run_number(ctx.eventID().run_number());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment