Skip to content
Snippets Groups Projects
Commit 30001d31 authored by Deion Elgin Fellers's avatar Deion Elgin Fellers
Browse files

update CaloRecTools to access new db folder where both HV_ref and charge_ref...

update CaloRecTools to access new db folder where both HV_ref and charge_ref payloads are in the MIP_ref folder
parent 21e22014
No related branches found
No related tags found
No related merge requests found
......@@ -20,8 +20,7 @@ def CaloRecToolCfg(flags, name="CaloRecTool", **kwargs):
dbInstance = kwargs.get("dbInstance", "TRIGGER_OFL")
acc.merge(addFolders(flags, "/WAVE/Calibration/HV", dbInstance, className="CondAttrListCollection"))
acc.merge(addFolders(flags, "/WAVE/Calibration/HV_ref", dbInstance, className="CondAttrListCollection"))
acc.merge(addFolders(flags, "/WAVE/Calibration/MIP_charge_ref", dbInstance, className="CondAttrListCollection"))
acc.merge(addFolders(flags, "/WAVE/Calibration/MIP_ref", dbInstance, className="CondAttrListCollection"))
return acc
......
......@@ -23,8 +23,7 @@ CaloRecTool::initialize() {
// Set keys to read calibratiion variables from data base
ATH_CHECK( m_PMT_HV_ReadKey.initialize() );
ATH_CHECK( m_PMT_HV_ref_ReadKey.initialize() );
ATH_CHECK( m_MIPcharge_ref_ReadKey.initialize() );
ATH_CHECK( m_MIP_ref_ReadKey.initialize() );
// access and store calo PMT HV gain curves
HVgaincurves_rootFile = TFile::Open(m_PMT_HV_Gain_Curve_file.value().c_str(),"read"); // open root file that has TF1 gain curves stored
......@@ -112,7 +111,7 @@ float CaloRecTool::getHV_ref(const EventContext& ctx, int channel) const {
float HV_ref=0.;
// Read Cond Handle
SG::ReadCondHandle<CondAttrListCollection> readHandle{m_PMT_HV_ref_ReadKey, ctx};
SG::ReadCondHandle<CondAttrListCollection> readHandle{m_MIP_ref_ReadKey, ctx};
const CondAttrListCollection* readCdo{*readHandle};
if (readCdo==nullptr) {
ATH_MSG_FATAL("Null pointer to the read conditions object");
......@@ -154,7 +153,7 @@ float CaloRecTool::getMIPcharge_ref(const EventContext& ctx, int channel) const
float MIP_charge_ref =0.;
// Read Cond Handle
SG::ReadCondHandle<CondAttrListCollection> readHandle{m_MIPcharge_ref_ReadKey, ctx};
SG::ReadCondHandle<CondAttrListCollection> readHandle{m_MIP_ref_ReadKey, ctx};
const CondAttrListCollection* readCdo{*readHandle};
if (readCdo==nullptr) {
ATH_MSG_FATAL("Null pointer to the read conditions object");
......@@ -172,8 +171,8 @@ float CaloRecTool::getMIPcharge_ref(const EventContext& ctx, int channel) const
// Read offset for specific channel
const CondAttrListCollection::AttributeList& payload{readCdo->attributeList(channel)};
if (payload.exists("MIP_charge_ref") and not payload["MIP_charge_ref"].isNull()) {
MIP_charge_ref = payload["MIP_charge_ref"].data<float>();
if (payload.exists("charge_ref") and not payload["charge_ref"].isNull()) {
MIP_charge_ref = payload["charge_ref"].data<float>();
ATH_MSG_DEBUG("Found digitizer channel " << channel << ", MIP_charge_ref as " << MIP_charge_ref);
} else {
ATH_MSG_WARNING("No valid MIP_charge_ref found for channel "<<channel<<"!");
......
......@@ -78,8 +78,7 @@ class CaloRecTool: public extends<AthAlgTool, ICaloRecTool> {
// Read Cond Handle
SG::ReadCondHandleKey<CondAttrListCollection> m_PMT_HV_ReadKey{this, "PMT_HV_ReadKey", "/WAVE/Calibration/HV", "Key of folder for PMT HV reading"};
SG::ReadCondHandleKey<CondAttrListCollection> m_PMT_HV_ref_ReadKey{this, "PMT_HV_ref_ReadKey", "/WAVE/Calibration/HV_ref", "Key of folder for PMT HV at time of MIP calibration measurement"};
SG::ReadCondHandleKey<CondAttrListCollection> m_MIPcharge_ref_ReadKey{this, "MIPcharge_ref_ReadKey", "/WAVE/Calibration/MIP_charge_ref", "Key of folder for MIPcharge calibration measurment"};
SG::ReadCondHandleKey<CondAttrListCollection> m_MIP_ref_ReadKey{this, "MIP_ref_ReadKey", "/WAVE/Calibration/MIP_ref", "Key of folder for MIP charge calibration measurment, also stores PMT HV used to measure the reference MIP charge"};
};
......
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