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

LArHVCorrMaker: do not rescale, write only flat blob

parent a8ebeedc
No related branches found
No related tags found
No related merge requests found
......@@ -42,14 +42,11 @@ class LArHVCorrMaker : public AthAlgorithm
private:
const LArOnlineID* m_lar_on_id = nullptr;
Gaudi::Property<std::string> m_keyOutput{this,"keyOutput","LArHVScaleCorr","Output key for LArHVScaleCorr"};
Gaudi::Property<std::string> m_folderName{this,"folderName", "/LAR/ElecCalibFlat/HVScaleCorr",
"Folder to store the CondAttrListCollection containing the HVScale correction"};
SG::ReadCondHandleKey<ILArHVScaleCorr> m_scaleCorrKey
{ this, "LArHVScaleCorr", "LArHVScaleCorrRecomputed", "" };
SG::ReadCondHandleKey<ILArHVScaleCorr> m_onlineScaleCorrKey
{ this, "OnlineLArHVScaleCorr", "LArHVScaleCorr", "" };
SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey
{ this, "CablingKey", "LArOnOffIdMap", "SG Key of LArOnOffIdMapping object" };
......
......@@ -27,7 +27,6 @@ StatusCode LArHVCorrMaker::initialize()
ATH_MSG_INFO ( " in initialize " );
ATH_CHECK( detStore()->retrieve(m_lar_on_id,"LArOnlineID") );
ATH_CHECK( m_scaleCorrKey.initialize() );
ATH_CHECK( m_onlineScaleCorrKey.initialize() );
ATH_CHECK( m_cablingKey.initialize() );
return StatusCode::SUCCESS;
}
......@@ -47,7 +46,6 @@ StatusCode LArHVCorrMaker::stop()
const EventContext& ctx = Gaudi::Hive::currentContext();
SG::ReadCondHandle<ILArHVScaleCorr> scaleCorr (m_scaleCorrKey, ctx);
SG::ReadCondHandle<ILArHVScaleCorr> onlineScaleCorr (m_onlineScaleCorrKey, ctx);
SG::ReadCondHandle<LArOnOffIdMapping> cabling (m_cablingKey, ctx);
const unsigned hashMax=m_lar_on_id->channelHashMax();
......@@ -69,19 +67,11 @@ StatusCode LArHVCorrMaker::stop()
const HWIdentifier hwid = cabling->createSignalChannelID (id);
ATH_MSG_VERBOSE("Filling value for id " << id.get_identifier32().get_compact());
value=scaleCorr->HVScaleCorr(hwid);
// Scales in scaleCorr have been normalized by online correction.
// Undo to make the scale absolute.
value *= onlineScaleCorr->HVScaleCorr(hwid);
}
pblob[hs]=value;
}
coll->add(1,attrList); //Add as channel 1 to AttrListCollection
auto flatHVScale = std::make_unique<LArHVScaleCorrFlat>(coll.get());
ATH_CHECK( detStore()->record(std::move(coll), m_folderName) );
ATH_CHECK( detStore()->record(std::move(flatHVScale), m_keyOutput) );
ATH_CHECK( detStore()->record(std::move(coll), m_folderName) );
return StatusCode::SUCCESS;
}
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