Skip to content
Snippets Groups Projects
Commit cbb0572a authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'larcond.LArConditionsCommon-20180323' into 'master'

Fixes for LAr conditions setup.

See merge request atlas/athena!9950
parents 250fc617 494e9347
No related branches found
No related tags found
No related merge requests found
Showing
with 92 additions and 88 deletions
include.block ( "LArConditionsCommon/LArConditionsCommon_MT_jobOptions.py" )
from LArConditionsCommon.LArCondFlags import larCondFlags
from IOVDbSvc.CondDB import conddb
if not larCondFlags.LoadElecCalib.is_locked():
larCondFlags.LoadElecCalib.set_Value(rec.readRDO())
#Import conditions algos
from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LAruA2MeVFlat_ as LAruA2MeVCondAlg
from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LArDAC2uAFlat_ as LArDAC2uACondAlg
from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LArRampFlat_ as LArRampCondAlg
from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LArPedestalFlat_ as LArPedestalCondAlg
from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LArHVScaleCorrFlat_ as LArHVScaleCorrCondAlg
from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LArMphysOverMcalFlat_ as LArMphysOverMcalCondAlg
from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LArOFCFlat_ as LArOFCCondAlg
from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LArShapeFlat_ as LArShapeCondAlg
from AthenaCommon.AlgSequence import AthSequencer
condSequence = AthSequencer("AthCondSeq")
for obj,calg in (("Pedestal",LArPedestalCondAlg),("uA2MeV",LAruA2MeVCondAlg),("DAC2uA",LArDAC2uACondAlg),("Ramp",LArRampCondAlg),("MphysOverMcal", LArMphysOverMcalCondAlg),("HVScaleCorr",LArHVScaleCorrCondAlg),("OFC",LArOFCCondAlg),("Shape",LArShapeCondAlg)):
conddb.addFolder("LAR_ONL","/LAR/ElecCalibFlat/"+obj,className="CondAttrListCollection")
condSequence+=calg(ReadKey="/LAR/ElecCalibFlat/"+obj,WriteKey="LAr"+obj)
...@@ -58,6 +58,7 @@ haveElecCalibInline=(conddb.dbdata=="CONDBR2") ...@@ -58,6 +58,7 @@ haveElecCalibInline=(conddb.dbdata=="CONDBR2")
if (haveElecCalibInline): if (haveElecCalibInline):
# TEMPORARY --- until everything's been changed to use conditions handles.
# Run 2 case: # Run 2 case:
#This service creates a objects in the DetectorStore that wrap the AttributeListCollections #This service creates a objects in the DetectorStore that wrap the AttributeListCollections
#with the inline representation of the electronic calibration and makes them accessible through the #with the inline representation of the electronic calibration and makes them accessible through the
...@@ -68,9 +69,32 @@ if (haveElecCalibInline): ...@@ -68,9 +69,32 @@ if (haveElecCalibInline):
svcMgr.ProxyProviderSvc.ProviderNames += [ "LArFlatConditionSvc" ] svcMgr.ProxyProviderSvc.ProviderNames += [ "LArFlatConditionSvc" ]
def addLArFlatFolder (db, obj, calg, qual=''):
from AthenaCommon.AlgSequence import AthSequencer
condSequence = AthSequencer("AthCondSeq")
folder = '/LAR/ElecCalibFlat/' + obj
conddb.addFolder(db, folder + forceRN + qual,
className = 'CondAttrListCollection')
condSequence += calg (ReadKey=folder, WriteKey='LAr'+obj)
return
def addLArFolder (db, obj, cls, qual=''):
if db.endswith ('OFL'):
folder = 'ElecCalibOfl'
else:
folder = 'ElecCalibOnl'
conddb.addFolder (db, '/LAR/' + folder + '/' + obj + forceRN+qual,
className = cls)
return
#Load HVScaleCorr. For run 2,these constants are also used by the CaloNoiseToolDB #Load HVScaleCorr. For run 2,these constants are also used by the CaloNoiseToolDB
if (haveElecCalibInline): if (haveElecCalibInline):
conddb.addFolder(ONLDB,"/LAR/ElecCalibFlat/HVScaleCorr"+forceRN+sqlDB) from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LArHVScaleCorrFlat_ as LArHVScaleCorrCondAlg
addLArFlatFolder (ONLDB, 'HVScaleCorr', LArHVScaleCorrCondAlg, sqlDB)
# TEMPORARY
theLArCondSvc.HVScaleCorrInput="/LAR/ElecCalibFlat/HVScaleCorr" theLArCondSvc.HVScaleCorrInput="/LAR/ElecCalibFlat/HVScaleCorr"
...@@ -93,56 +117,75 @@ if larCondFlags.LoadElecCalib(): ...@@ -93,56 +117,75 @@ if larCondFlags.LoadElecCalib():
# Run 2 case: # Run 2 case:
#1. uA2MeV #1. uA2MeV
if larCondFlags.ua2MeVFolder()=="": if larCondFlags.ua2MeVFolder()=="":
conddb.addFolder("LAR_ONL","/LAR/ElecCalibFlat/uA2MeV"+forceRN) from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LAruA2MeVFlat_ as LAruA2MeVCondAlg
addLArFlatFolder ('LAR_ONL', 'uA2MeV', LAruA2MeVCondAlg)
# TEMPORARY
theLArCondSvc.uA2MeVInput="/LAR/ElecCalibFlat/uA2MeV" theLArCondSvc.uA2MeVInput="/LAR/ElecCalibFlat/uA2MeV"
else: else:
#Load from offline database #Load from offline database
conddb.addFolder("LAR_OFL","/LAR/ElecCalibOfl/"+larCondFlags.ua2MeVFolder()+forceRN) addLArFolder ('LAR_OFL', larCondFlags.ua2MeVFolder(),
pass 'LAruA2MeVComplete')
#2. DAC2uA #2. DAC2uA
conddb.addFolder("LAR_ONL","/LAR/ElecCalibFlat/DAC2uA"+forceRN) from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LArDAC2uAFlat_ as LArDAC2uACondAlg
addLArFlatFolder ('LAR_ONL', 'DAC2uA', LArDAC2uACondAlg)
# TEMPORARY
theLArCondSvc.DAC2uAInput="/LAR/ElecCalibFlat/DAC2uA" theLArCondSvc.DAC2uAInput="/LAR/ElecCalibFlat/DAC2uA"
#3. Pedestal #3. Pedestal
conddb.addFolder(ONLDB,"/LAR/ElecCalibFlat/Pedestal"+forceRN+sqlDB) from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LArPedestalFlat_ as LArPedestalCondAlg
addLArFlatFolder (ONLDB, 'Pedestal', LArPedestalCondAlg, sqlDB)
# TEMPORARY
theLArCondSvc.PedestalInput="/LAR/ElecCalibFlat/Pedestal" theLArCondSvc.PedestalInput="/LAR/ElecCalibFlat/Pedestal"
#4. Ramp #4. Ramp
conddb.addFolder(ONLDB,"/LAR/ElecCalibFlat/Ramp"+forceRN+sqlDB) from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LArRampFlat_ as LArRampCondAlg
addLArFlatFolder (ONLDB, 'Ramp', LArRampCondAlg, sqlDB)
# TEMPORARY
theLArCondSvc.RampInput="/LAR/ElecCalibFlat/Ramp" theLArCondSvc.RampInput="/LAR/ElecCalibFlat/Ramp"
#5. MphysOverMcal #5. MphysOverMcal
if larCondFlags.MphysOverMcalFolder()=="": if larCondFlags.MphysOverMcalFolder()=="":
conddb.addFolder(ONLDB,"/LAR/ElecCalibFlat/MphysOverMcal"+forceRN+sqlDB) from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LArMphysOverMcalFlat_ as LArMphysOverMcalCondAlg
addLArFlatFolder (ONLDB, 'MphysOverMcal',
LArMphysOverMcalCondAlg, sqlDB)
# TEMPORARY
theLArCondSvc.MphysOverMcalInput="/LAR/ElecCalibFlat/MphysOverMcal" theLArCondSvc.MphysOverMcalInput="/LAR/ElecCalibFlat/MphysOverMcal"
else:
else:
#Load from offline database: #Load from offline database:
conddb.addFolder("LAR_OFL","/LAR/ElecCalibOfl/"+larCondFlags.MphysOverMcalFolder()+forceRN+sqlDB) addLArFolder ('LAR_OFL', larCondFlags.MphysOverMcalFolder(),
pass 'LArMphysOverMcalComplete', sqlDB)
#6. HVScaleCorr -> moved outside of the if loadElecCalib clause b/c it's now used by the CaloNoiseTool #6. HVScaleCorr -> moved outside of the if loadElecCalib clause b/c it's now used by the CaloNoiseTool
#conddb.addFolder(ONLDB,"/LAR/ElecCalibFlat/HVScaleCorr"+forceRN+sqlDB)
#theLArCondSvc.HVScaleCorrInput="/LAR/ElecCalibFlat/HVScaleCorr"
#7. OFCs #7. OFCs
if larCondFlags.OFCShapeFolder()=="": if larCondFlags.OFCShapeFolder()=="":
conddb.addFolder(ONLDB,"/LAR/ElecCalibFlat/OFC"+forceRN+sqlDB) from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LArOFCFlat_ as LArOFCCondAlg
addLArFlatFolder (ONLDB, 'OFC', LArOFCCondAlg, sqlDB)
# TEMPORARY
theLArCondSvc.OFCInput="/LAR/ElecCalibFlat/OFC" theLArCondSvc.OFCInput="/LAR/ElecCalibFlat/OFC"
else: else:
#Load from offline DB #Load from offline DB
conddb.addFolder("LAR_OFL","/LAR/ElecCalibOfl/OFC/PhysWave/RTM/"+larCondFlags.OFCShapeFolder()+selection+forceRN) addLArFolder ('LAR_OFL',
pass 'OFC/PhysWave/RTM/'+larCondFlags.OFCShapeFolder(),
'LArOFCComplete', selection)
#8.Shape #8.Shape
if larCondFlags.useShape(): if larCondFlags.useShape():
if larCondFlags.OFCShapeFolder()=="": if larCondFlags.OFCShapeFolder()=="":
conddb.addFolder(ONLDB,"/LAR/ElecCalibFlat/Shape"+forceRN+sqlDB) from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LArShapeFlat_ as LArShapeCondAlg
addLArFlatFolder (ONLDB, 'Shape', LArShapeCondAlg, sqlDB)
# TEMPORARY
theLArCondSvc.ShapeInput="/LAR/ElecCalibFlat/Shape" theLArCondSvc.ShapeInput="/LAR/ElecCalibFlat/Shape"
else: else:
#Load from offline database #Load from offline database
conddb.addFolder("LAR_OFL","/LAR/ElecCalibOfl/Shape/RTM/"+larCondFlags.OFCShapeFolder()+selection+forceRN) addLArFolder ('LAR_OFL',
pass 'Shape/RTM/'+larCondFlags.OFCShapeFolder(),
'LArShapeComplete', selection)
pass pass
pass pass
...@@ -163,47 +206,53 @@ if larCondFlags.LoadElecCalib(): ...@@ -163,47 +206,53 @@ if larCondFlags.LoadElecCalib():
#1. uA2MeV #1. uA2MeV
if larCondFlags.ua2MeVFolder()=="": if larCondFlags.ua2MeVFolder()=="":
conddb.addFolder("LAR_ONL","/LAR/ElecCalibOnl/uA2MeV"+forceRN) addLArFolder ('LAR_ONL', 'uA2MeV', 'LAruA2MeVMC')
else: else:
#Load from offline database #Load from offline database
conddb.addFolder("LAR_OFL","/LAR/ElecCalibOfl/"+larCondFlags.ua2MeVFolder()+forceRN) addLArFolder ('LAR_OFL', larCondFlags.ua2MeVFolder(), 'LAruA2MeVMC')
pass
#2. DAC2uA #2. DAC2uA
conddb.addFolder("LAR_ONL","/LAR/ElecCalibOnl/DAC2uA"+forceRN) addLArFolder ('LAR_ONL', 'DAC2uA', 'LArDAC2uAMC')
#3. Pedestal #3. Pedestal
conddb.addFolder("LAR_ONL","/LAR/ElecCalibOnl/Pedestal"+forceRN) addLArFolder ('LAR_ONL', 'Pedestal', 'LArPedestalComplete',
# POOL files set the key for this to `Pedestal',
# but we want to use `LArPedestal'.
'<key>LArPedestal</key>')
#4. Ramp #4. Ramp
conddb.addFolder("LAR_ONL","/LAR/ElecCalibOnl/Ramp"+forceRN) addLArFolder ('LAR_ONL', 'Ramp', 'LArRampComplete')
#5. MphysOverMcal #5. MphysOverMcal
if larCondFlags.MphysOverMcalFolder()=="": if larCondFlags.MphysOverMcalFolder()=="":
conddb.addFolder("LAR_ONL","/LAR/ElecCalibOnl/MphysOverMcal"+forceRN) addLArFolder ('LAR_ONL', MphysOverMcal,
'LArMphysOverMcalComplete')
else: else:
#Load from offline database: #Load from offline database:
conddb.addFolder("LAR_OFL","/LAR/ElecCalibOfl/"+larCondFlags.MphysOverMcalFolder()+forceRN) addLArFolder ('LAR_OFL', larCondFlags.MphysOverMcalFolder(),
pass 'LArMphysOverMcalComplete')
#6. HVScaleCorr #6. HVScaleCorr
conddb.addFolder("LAR_ONL","/LAR/ElecCalibOnl/HVScaleCorr"+forceRN) addLArFolder ('LAR_ONL', 'HVScaleCorr', 'LArHVScaleCorrComplete')
#7. OFCs #7. OFCs
if larCondFlags.OFCShapeFolder()=="": if larCondFlags.OFCShapeFolder()=="":
conddb.addFolder("LAR_ONL","/LAR/ElecCalibOnl/OFC"+forceRN) conddb.addFolder("LAR_ONL","/LAR/ElecCalibOnl/OFC"+forceRN)
addLArFolder ('LAR_ONL', 'OFC', 'LArOFCComplete')
else: else:
#Load from offline DB #Load from offline DB
conddb.addFolder("LAR_OFL","/LAR/ElecCalibOfl/OFC/PhysWave/RTM/"+larCondFlags.OFCShapeFolder()+selection+forceRN) addLArFolder ('LAR_OFL', 'OFC/PhysWave/RTM/'+larCondFlags.OFCShapeFolder(),
pass 'LArOFCComplete', selection)
#8.Shape #8.Shape
if larCondFlags.useShape(): if larCondFlags.useShape():
if larCondFlags.OFCShapeFolder()=="": if larCondFlags.OFCShapeFolder()=="":
conddb.addFolder("LAR_ONL","/LAR/ElecCalibOnl/Shape"+forceRN) addLArFolder ('LAR_ONL', 'Shape', 'LArShapeComplete')
else: else:
#Load from offline database #Load from offline database
conddb.addFolder("LAR_OFL","/LAR/ElecCalibOfl/Shape/RTM/"+larCondFlags.OFCShapeFolder()+selection+forceRN) addLArFolder ('LAR_OFL', 'Shape/RTM/'+larCondFlags.OFCShapeFolder(),
pass 'LArShapeComplete', selection)
pass pass
pass pass
pass pass
...@@ -14,11 +14,7 @@ theLArCosmicsMonTool = LArCosmicsMonTool(name="LArCosmicsMonTool", ...@@ -14,11 +14,7 @@ theLArCosmicsMonTool = LArCosmicsMonTool(name="LArCosmicsMonTool",
LArBadChannelMask = theLArBadChannelsMasker LArBadChannelMask = theLArBadChannelsMasker
) )
from AthenaCommon.BeamFlags import jobproperties theLArCosmicsMonTool.LArPedestalKey='LArPedestal'
if jobproperties.Global.DataSource.get_Value() == 'data':
theLArCosmicsMonTool.LArPedestalKey='Pedestal'
else:
theLArCosmicsMonTool.LArPedestalKey='LArPedestal'
ToolSvc += theLArCosmicsMonTool ToolSvc += theLArCosmicsMonTool
......
...@@ -48,11 +48,7 @@ theLArDigitMon = LArDigitMon(name="LArDigitMon", ...@@ -48,11 +48,7 @@ theLArDigitMon = LArDigitMon(name="LArDigitMon",
Streams = StreamsToMonitor Streams = StreamsToMonitor
) )
from AthenaCommon.BeamFlags import jobproperties theLArDigitMon.LArPedestalKey='LArPedestal'
if jobproperties.Global.DataSource.get_Value() == 'data':
theLArDigitMon.LArPedestalKey='Pedestal'
else:
theLArDigitMon.LArPedestalKey='LArPedestal'
ToolSvc += theLArDigitMon ToolSvc += theLArDigitMon
......
...@@ -22,11 +22,7 @@ if Type == 'Cosmic': ...@@ -22,11 +22,7 @@ if Type == 'Cosmic':
include("LArConditionsCommon/LArConditionsCommon_comm_jobOptions.py") include("LArConditionsCommon/LArConditionsCommon_comm_jobOptions.py")
include("CaloCosEx/LArSignalReco_Cosmics_jobOptions.py") include("CaloCosEx/LArSignalReco_Cosmics_jobOptions.py")
from AthenaCommon.BeamFlags import jobproperties theLArRawChannelBuilderPedestalDataBase.LArPedestalKey='LArPedestal'
if jobproperties.Global.DataSource.get_Value() == 'data':
theLArRawChannelBuilderPedestalDataBase.LArPedestalKey='Pedestal'
else:
theLArRawChannelBuilderPedestalDataBase.LArPedestalKey='LArPedestal'
else: else:
# Use a simple Tool # Use a simple Tool
......
...@@ -42,10 +42,7 @@ theLArOddCellsMonTool = LArOddCellsMonTool(name="LArOddCellsMonTool", ...@@ -42,10 +42,7 @@ theLArOddCellsMonTool = LArOddCellsMonTool(name="LArOddCellsMonTool",
) )
from AthenaCommon.BeamFlags import jobproperties from AthenaCommon.BeamFlags import jobproperties
if jobproperties.Global.DataSource.get_Value() == 'data': theLArOddCellsMonTool.LArPedestalKey='LArPedestal'
theLArOddCellsMonTool.LArPedestalKey='Pedestal'
else:
theLArOddCellsMonTool.LArPedestalKey='LArPedestal'
#The next line is actually getting all the information. I'm sure this is available offline at the T0, but #The next line is actually getting all the information. I'm sure this is available offline at the T0, but
......
...@@ -120,10 +120,7 @@ theLArRODMonTool = LArRODMonTool(name="LArRODMonTool", ...@@ -120,10 +120,7 @@ theLArRODMonTool = LArRODMonTool(name="LArRODMonTool",
) )
from AthenaCommon.BeamFlags import jobproperties from AthenaCommon.BeamFlags import jobproperties
if jobproperties.Global.DataSource.get_Value() == 'data': theLArRODMonTool.LArPedestalKey='LArPedestal'
theLArRODMonTool.LArPedestalKey='Pedestal'
else:
theLArRODMonTool.LArPedestalKey='LArPedestal'
from LArRecUtils.LArADC2MeVToolDefault import LArADC2MeVToolDefault from LArRecUtils.LArADC2MeVToolDefault import LArADC2MeVToolDefault
theLArRODMonTool.ADC2MeVTool=LArADC2MeVToolDefault() theLArRODMonTool.ADC2MeVTool=LArADC2MeVToolDefault()
......
...@@ -86,7 +86,7 @@ LArDigitMon::LArDigitMon(const std::string& type, ...@@ -86,7 +86,7 @@ LArDigitMon::LArDigitMon(const std::string& type,
/**bool use to mask the bad channels*/ /**bool use to mask the bad channels*/
declareProperty("IgnoreBadChannels", m_ignoreKnownBadChannels=false); declareProperty("IgnoreBadChannels", m_ignoreKnownBadChannels=false);
declareProperty("LArBadChannelMask",m_badChannelMask); declareProperty("LArBadChannelMask",m_badChannelMask);
declareProperty("LArPedestalKey", m_larPedestalKey="Pedestal"); declareProperty("LArPedestalKey", m_larPedestalKey="LArPedestal");
declareProperty("LArDigitContainerKey", m_LArDigitContainerKey = "FREE"); declareProperty("LArDigitContainerKey", m_LArDigitContainerKey = "FREE");
/**default cut to select events*/ /**default cut to select events*/
declareProperty("SigmaCut", m_SigmaCut=5); declareProperty("SigmaCut", m_SigmaCut=5);
......
from AthenaCommon.Include import Include, IncludeError, include from AthenaCommon.Include import Include, IncludeError, include
include("LArConditionsCommon/LArConditionsCommon_MT_jobOptions.py") include("LArConditionsCommon/LArConditionsCommon_comm_jobOptions.py")
include("LArRecUtils/LArOnOffMappingAlg.py") include("LArRecUtils/LArOnOffMappingAlg.py")
from LArRecUtils.LArRecUtilsConf import LArADC2MeVCondAlg from LArRecUtils.LArRecUtilsConf import LArADC2MeVCondAlg
from AthenaCommon.AlgSequence import AthSequencer from AthenaCommon.AlgSequence import AthSequencer
......
...@@ -96,7 +96,7 @@ LArFlatConditionSvc::LArFlatConditionSvc( const std::string& name, ISvcLocator* ...@@ -96,7 +96,7 @@ LArFlatConditionSvc::LArFlatConditionSvc( const std::string& name, ISvcLocator*
declareProperty("uA2MeVOutput", m_objInfo[0].m_outputKey="LAruA2MeV"); declareProperty("uA2MeVOutput", m_objInfo[0].m_outputKey="LAruA2MeV");
declareProperty("DAC2uAVOutput", m_objInfo[1].m_outputKey="LArDAC2uA"); declareProperty("DAC2uAVOutput", m_objInfo[1].m_outputKey="LArDAC2uA");
declareProperty("HVScaleCorrOutput", m_objInfo[2].m_outputKey="LArHVScaleCorr"); declareProperty("HVScaleCorrOutput", m_objInfo[2].m_outputKey="LArHVScaleCorr");
declareProperty("PedestalOutput", m_objInfo[3].m_outputKey="Pedestal"); declareProperty("PedestalOutput", m_objInfo[3].m_outputKey="LArPedestal");
declareProperty("RampOutput", m_objInfo[4].m_outputKey="LArRamp"); declareProperty("RampOutput", m_objInfo[4].m_outputKey="LArRamp");
declareProperty("MphysOverMcalOutput",m_objInfo[5].m_outputKey="LArMphysOverMcal"); declareProperty("MphysOverMcalOutput",m_objInfo[5].m_outputKey="LArMphysOverMcal");
declareProperty("OFCOutput", m_objInfo[6].m_outputKey="LArOFC"); declareProperty("OFCOutput", m_objInfo[6].m_outputKey="LArOFC");
......
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