Skip to content
Snippets Groups Projects
Commit 401a585d authored by R D Schaffer's avatar R D Schaffer
Browse files

moving to allow for LockMapCurrents = True the field to turn on and off

parent 336cd863
No related branches found
No related tags found
No related merge requests found
...@@ -87,14 +87,11 @@ MagField::AtlasFieldCacheCondAlg::execute(const EventContext& ctx) const { ...@@ -87,14 +87,11 @@ MagField::AtlasFieldCacheCondAlg::execute(const EventContext& ctx) const {
//This will need to be filled before we construct the condition object //This will need to be filled before we construct the condition object
Cache cache{}; Cache cache{};
// set current scale factor from either conditions or from jobOption parameters if not locked if (m_useDCS) {
if (!m_lockMapCurrents) { ATH_CHECK( updateCurrentFromConditions(ctx, cache) );
if (m_useDCS) { }
ATH_CHECK( updateCurrentFromConditions(ctx, cache) ); else {
} ATH_CHECK( updateCurrentFromParameters(cache) );
else {
ATH_CHECK( updateCurrentFromParameters(cache) );
}
} }
// Must read map cond object to get previously created map // Must read map cond object to get previously created map
...@@ -113,6 +110,11 @@ MagField::AtlasFieldCacheCondAlg::execute(const EventContext& ctx) const { ...@@ -113,6 +110,11 @@ MagField::AtlasFieldCacheCondAlg::execute(const EventContext& ctx) const {
scaleField(cache, fieldMap); scaleField(cache, fieldMap);
} }
else { else {
// For locked currents, we allow the SF to be either 0 or 1, i.e. allow the DCS currents to
// say whether or not the solenoid or toroid is on or not
cache.m_solScaleFactor = (cache.m_solenoidCurrent > 0) ? 1 : 0;
cache.m_torScaleFactor = (cache.m_toroidCurrent > 0) ? 1 : 0;
ATH_MSG_INFO( "execute: map currents locked"); ATH_MSG_INFO( "execute: map currents locked");
ATH_MSG_INFO( "execute: Solenoid field scale factor " << cache.m_solScaleFactor << ". Desired current and map current: " ATH_MSG_INFO( "execute: Solenoid field scale factor " << cache.m_solScaleFactor << ". Desired current and map current: "
<< cache.m_solenoidCurrent << "," << ((fieldMap) ? fieldMap->solenoidCurrent() : 0)); << cache.m_solenoidCurrent << "," << ((fieldMap) ? fieldMap->solenoidCurrent() : 0));
...@@ -235,6 +237,7 @@ MagField::AtlasFieldCacheCondAlg::updateCurrentFromConditions(const EventContext ...@@ -235,6 +237,7 @@ MagField::AtlasFieldCacheCondAlg::updateCurrentFromConditions(const EventContext
torcur = 0.0; torcur = 0.0;
ATH_MSG_INFO( "UpdateCurrentFromConditions: Toroids are off" ); ATH_MSG_INFO( "UpdateCurrentFromConditions: Toroids are off" );
} }
cache.m_solenoidCurrent = solcur; cache.m_solenoidCurrent = solcur;
cache.m_toroidCurrent = torcur; cache.m_toroidCurrent = torcur;
......
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