Skip to content
Snippets Groups Projects
Commit 766f2e9b authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'fiedCache_fieldOffFix' into 'master'

Fixing thresholds for currents to not read in maps for online, and returning zero b-field if no map is read

See merge request atlas/athena!36073
parents 215d7fd8 320ee4c4
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!36073Fixing thresholds for currents to not read in maps for online, and returning zero b-field if no map is read
...@@ -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