diff --git a/LArCalorimeter/LArCabling/python/LArCablingConfig.py b/LArCalorimeter/LArCabling/python/LArCablingConfig.py index 60d3c022b5116c3066c268df60d6c478a518de48..259a9ee73e7743373cf9d0783b29c89b2b902cdb 100644 --- a/LArCalorimeter/LArCabling/python/LArCablingConfig.py +++ b/LArCalorimeter/LArCabling/python/LArCablingConfig.py @@ -5,7 +5,7 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from IOVDbSvc.IOVDbSvcConfig import IOVDbSvcCfg, addFolders LArOnOffMappingAlg, LArFebRodMappingAlg, LArCalibLineMappingAlg,LArLATOMEMappingAlg=CompFactory.getComps("LArOnOffMappingAlg","LArFebRodMappingAlg","LArCalibLineMappingAlg","LArLATOMEMappingAlg") -def _larCablingCfg(configFlags,algo,folder): +def _larCablingCfg(configFlags,algo,folder,algName=None): result=ComponentAccumulator() result.merge(IOVDbSvcCfg(configFlags)) @@ -28,7 +28,10 @@ def _larCablingCfg(configFlags,algo,folder): db='LAR_ONL' folderwithtag=folder - result.addCondAlgo(algo(ReadKey=folder),primary=True) + if algName is None: + result.addCondAlgo(algo(ReadKey=folder),primary=True) + else: + result.addCondAlgo(algo(name=algName, ReadKey=folder),primary=True) result.merge(addFolders(configFlags,folderwithtag,className="AthenaAttributeList",detDb=db)) return result @@ -46,10 +49,16 @@ def LArOnOffIdMappingCfg(configFlags): return _larCablingCfg(configFlags,LArOnOffMappingAlg,"/LAR/Identifier/OnOffIdMap") def LArOnOffIdMappingSCCfg(configFlags): + result = ComponentAccumulator() if configFlags.Input.isMC: - return _larCablingCfg(configFlags,LArOnOffMappingAlg,"/LAR/IdentifierOfl/OnOffIdMap_SC") + result.merge(_larCablingCfg(configFlags,LArOnOffMappingAlg,"/LAR/IdentifierOfl/OnOffIdMap_SC","LArOnOffMappingAlgSC")) + from IOVDbSvc.IOVDbSvcConfig import addOverride + result.merge(addOverride(configFlags, "/LAR/IdentifierOfl/OnOffIdMap_SC", "LARIdentifierOflOnOffIdMap_SC-000")) # FIXME temporary? else: - return _larCablingCfg(configFlags,LArOnOffMappingAlg,"/LAR/Identifier/OnOffIdMap_SC") + result.merge(_larCablingCfg(configFlags,LArOnOffMappingAlg,"/LAR/Identifier/OnOffIdMap_SC","LArOnOffMappingAlgSC")) + result.getCondAlgo("LArOnOffMappingAlgSC").WriteKey = "LArOnOffIdMapSC" + result.getCondAlgo("LArOnOffMappingAlgSC").isSuperCell = True + return result def LArFebRodMappingCfg(configFlags): return _larCablingCfg(configFlags,LArFebRodMappingAlg,"/LAR/Identifier/FebRodMap") diff --git a/LArCalorimeter/LArConfiguration/python/LArElecCalibDBConfig.py b/LArCalorimeter/LArConfiguration/python/LArElecCalibDBConfig.py index 0d9f5aa07c49a0dd57ac1234b75837e0c47112a7..f070425131c0ad221425b92ceb805c1469ff5562 100644 --- a/LArCalorimeter/LArConfiguration/python/LArElecCalibDBConfig.py +++ b/LArCalorimeter/LArConfiguration/python/LArElecCalibDBConfig.py @@ -30,6 +30,14 @@ LArMphysOverMcalCondAlg = CompFactory.getComp("LArFlatConditionsAlg") LArShapeCondAlg = CompFactory.getComp("LArFlatConditionsAlg") +LArDAC2uASCCondAlg = CompFactory.getComp("LArFlatConditionsAlg") +LArRampSCCondAlg = CompFactory.getComp("LArFlatConditionsAlg") +LAruA2MeVSCCondAlg = CompFactory.getComp("LArFlatConditionsAlg") +LArfSamplSCCondAlg = CompFactory.getComp("LArFlatConditionsAlg") +LArShapeSCCondAlg = CompFactory.getComp("LArFlatConditionsAlg") +LArPedestalSCCondAlg = CompFactory.getComp("LArFlatConditionsAlg") +LArNoiseSCCondAlg = CompFactory.getComp("LArFlatConditionsAlg") +LArAutoCorrSCCondAlg = CompFactory.getComp("LArFlatConditionsAlg") def LArElecCalibDbCfg(ConfigFlags,condObjs): @@ -138,7 +146,8 @@ def LArElecCalibDBRun1Cfg(ConfigFlags,condObjs): def LArElecCalibDBMCCfg(ConfigFlags,folders): - _larCondDBFoldersMC = {"Ramp":("LArRampMC","/LAR/ElecCalibMC/Ramp","LArRamp", LArRampSymAlg ), + _larCondDBFoldersMC = { + "Ramp":("LArRampMC","/LAR/ElecCalibMC/Ramp","LArRamp", LArRampSymAlg ), "AutoCorr":("LArAutoCorrMC","/LAR/ElecCalibMC/AutoCorr","LArAutoCorr", LArAutoCorrSymAlg), "DAC2uA":("LArDAC2uAMC","/LAR/ElecCalibMC/DAC2uA","LArDAC2uA",LArDAC2uASymAlg), "Pedestal":("LArPedestalMC","/LAR/ElecCalibMC/Pedestal","LArPedestal",None), @@ -171,7 +180,34 @@ def LArElecCalibDBMCCfg(ConfigFlags,folders): result.merge(addFolderList(ConfigFlags,folderlist)) return result - + + +def LArElecCalibDBMCSCCfg(ConfigFlags,folders): + _larCondDBFoldersMC = { + "RampSC":('CondAttrListCollection',"/LAR/ElecCalibMCSC/Ramp","LArRampSC", LArRampSCCondAlg ), + "DAC2uASC":('CondAttrListCollection',"/LAR/ElecCalibMCSC/DAC2uA","LArDAC2uASC",LArDAC2uASCCondAlg), + "uA2MeVSC":('CondAttrListCollection',"/LAR/ElecCalibMCSC/uA2MeV","LAruA2MeVSC",LAruA2MeVSCCondAlg), + "fSamplSC":('CondAttrListCollection','/LAR/ElecCalibMCSC/fSampl',"LArfSamplSC",LArfSamplSCCondAlg), + "ShapeSC":('CondAttrListCollection','/LAR/ElecCalibMCSC/Shape',"LArShapeSC",LArShapeSCCondAlg), + "PedestalSC":('CondAttrListCollection','/LAR/ElecCalibMCSC/Pedestal',"LArPedestalSC",LArPedestalSCCondAlg), + "NoiseSC":('CondAttrListCollection','/LAR/ElecCalibMCSC/Noise',"LArNoiseSC",LArNoiseSCCondAlg), + "AutoCorrSC":('CondAttrListCollection','/LAR/ElecCalibMCSC/AutoCorr',"LArAutoCorrSC",LArAutoCorrSCCondAlg) + } + + result=ComponentAccumulator() + folderlist=[] + for folder in folders: + try: + classname,fldr,key,calg=_larCondDBFoldersMC[folder] + except KeyError: + raise ConfigurationError("No conditions data %s found for Monte Carlo" % folder) + + folderlist+=[(fldr,"LAR_OFL",classname),] + if calg is not None: + result.addCondAlgo(calg(ReadKey=fldr,WriteKey=key)) + + result.merge(addFolderList(ConfigFlags,folderlist)) + return result if __name__ == "__main__": diff --git a/LArCalorimeter/LArDigitization/python/LArDigitizationConfigNew.py b/LArCalorimeter/LArDigitization/python/LArDigitizationConfigNew.py index 4e88b69e07703c3b545f271096fa8fe43b4409a6..39d35065b0da4c4433af7418c47cf56f6099c183 100644 --- a/LArCalorimeter/LArDigitization/python/LArDigitizationConfigNew.py +++ b/LArCalorimeter/LArDigitization/python/LArDigitizationConfigNew.py @@ -217,6 +217,57 @@ def LArOverlayCfg(flags, **kwargs): return acc +def LArAutoCorrNoiseCondSCAlgCfg(flags, **kwargs): + acc = ComponentAccumulator() + + requiredConditions=["AutoCorrSC"] + from LArConfiguration.LArElecCalibDBConfig import LArElecCalibDBMCSCCfg + acc.merge(LArElecCalibDBMCSCCfg(flags,requiredConditions)) + kwargs.setdefault("LArAutoCorrObjKey", "LArAutoCorrSC") # Provided by LArFlatConditionsAlg + + from LArCabling.LArCablingConfig import LArOnOffIdMappingSCCfg + acc.merge(LArOnOffIdMappingSCCfg(flags)) + kwargs.setdefault("LArOnOffIdMappingObjKey", 'LArOnOffIdMapSC') + kwargs.setdefault("nSampl", flags.LAr.ROD.nSamples + 2) # See ATLASSIM-5483 + kwargs.setdefault("isSuperCell", True) + kwargs.setdefault("LArAutoCorrNoiseObjKey", "LArAutoCorrNoiseSC") # output + acc.addCondAlgo(CompFactory.LArAutoCorrNoiseCondAlg(name="LArAutoCorrNoiseSCCondAlg", **kwargs)) + return acc + + +def LArSCL1MakerCfg(flags, **kwargs): + """Return ComponentAccumulator for LArSCL1Maker""" + acc = LArDigitizationBasicCfg(flags) + kwargs.setdefault("LArHitEMapKey", "StoreGateSvc+LArHitEMap") # Provided by LArPileUpTool + + from LArRecUtils.LArADC2MeVSCCondAlgConfig import LArADC2MeVSCCondAlgCfg + acc.merge(LArADC2MeVSCCondAlgCfg(flags)) + kwargs.setdefault("LArADC2MeVKey", "ConditionStore+LArADC2MeVSC") # Provided by LArADC2MeVSCCondAlg + + from LArCabling.LArCablingConfig import LArOnOffIdMappingSCCfg + acc.merge(LArOnOffIdMappingSCCfg(flags)) + # '/LAR/IdentifierOfl/OnOffIdMap_SC LARIdentifierOflOnOffIdMap_SC-000' Do we need to add this override in the IOVDbSvc or just add the conditions properly in the Run3 conditions global tag??? + kwargs.setdefault("ScCablingKey", "ConditionStore+LArOnOffIdMapSC") # Provided by LArOnOffMappingAlgSC + + requiredConditions=["fSamplSC","ShapeSC","PedestalSC","NoiseSC"] + from LArConfiguration.LArElecCalibDBConfig import LArElecCalibDBMCSCCfg + acc.merge(LArElecCalibDBMCSCCfg(flags,requiredConditions)) + kwargs.setdefault("FracSKey", "ConditionStore+LArfSamplSC") # Provided by LArFlatConditionsAlg + kwargs.setdefault("ShapeKey", "ConditionStore+LArShapeSC") # Provided by LArFlatConditionsAlg + kwargs.setdefault("PedestalKey", "ConditionStore+LArPedestalSC") # Provided by LArFlatConditionsAlg + kwargs.setdefault("LArNoiseKey", "ConditionStore+LArNoiseSC") # Provided by LArFlatConditionsAlg + + acc.merge(LArAutoCorrNoiseCondSCAlgCfg(flags)) + kwargs.setdefault("LArAutoCorrKey", "ConditionStore+LArAutoCorrNoiseSC") # Provided by LArAutoCorrNoiseCondAlg/LArAutoCorrNoiseSCCondAlg + kwargs.setdefault("NSamples", flags.LAr.ROD.nSamples + 2) # For consistency with LArAutoCorrNoiseSC - see ATLASSIM-5483 + from RngComps.RandomServices import RNG + acc.merge(RNG(flags.Random.Engine)) + kwargs.setdefault("RndmSvc", "AthRNGSvc") + kwargs.setdefault("SCL1ContainerName","LArDigitSCL2") # Output - why L2?? + acc.addEventAlgo(CompFactory.LArSCL1Maker(**kwargs)) + return acc + + def LArTriggerDigitizationBasicCfg(flags, **kwargs): """Return ComponentAccumulator for LAr Trigger Tower""" acc = LArDigitizationBasicCfg(flags) @@ -230,6 +281,8 @@ def LArTriggerDigitizationBasicCfg(flags, **kwargs): kwargs.setdefault("HadTTL1ContainerName", flags.Overlay.BkgPrefix + "LArTTL1HAD") LArTTL1Maker = CompFactory.LArTTL1Maker acc.addEventAlgo(LArTTL1Maker(**kwargs)) + if flags.GeoModel.Run in ['RUN3']: + acc.merge(LArSCL1MakerCfg(flags)) return acc @@ -238,6 +291,8 @@ def LArTriggerDigitizationCfg(flags, **kwargs): acc = LArTriggerDigitizationBasicCfg(flags) acc.merge(LArOutputCfg(flags)) acc.merge(OutputStreamCfg(flags, "RDO", ["LArTTL1Container#*"])) + if flags.GeoModel.Run in ['RUN3']: + acc.merge(OutputStreamCfg(flags, "RDO", ["LArDigitContainer#LArDigitSCL2"])) return acc diff --git a/LArCalorimeter/LArL1Sim/python/LArSCL1Getter.py b/LArCalorimeter/LArL1Sim/python/LArSCL1Getter.py index 9a4ca63b6b1924a9ea8ee2bd005f04a02eb6e62f..835e125e9a069e7d09c516e3f65f182f607d6f99 100644 --- a/LArCalorimeter/LArL1Sim/python/LArSCL1Getter.py +++ b/LArCalorimeter/LArL1Sim/python/LArSCL1Getter.py @@ -69,7 +69,8 @@ class LArSCL1Getter ( Configured ) : from LArRecUtils.LArADC2MeVSCCondAlgDefault import LArADC2MeVSCCondAlgDefault LArADC2MeVSCCondAlgDefault() theLArSCL1Maker=LArSCL1Maker() - + from LArROD.LArRODFlags import larRODFlags + theLArSCL1Maker.NSamples = larRODFlags.nSamples() + 2 # For consistency with LArAutoCorrNoiseSC - see ATLASSIM-5483 theLArSCL1Maker.SCL1ContainerName = "LArDigitSCL2" self._LArSCL1Maker = theLArSCL1Maker diff --git a/LArCalorimeter/LArRecUtils/python/LArADC2MeVSCCondAlgConfig.py b/LArCalorimeter/LArRecUtils/python/LArADC2MeVSCCondAlgConfig.py index 0155fe3358a21e5fe48c0b57accea87d6df85b2b..b25a73f83a4466506960a6842356e9e1416bd444 100644 --- a/LArCalorimeter/LArRecUtils/python/LArADC2MeVSCCondAlgConfig.py +++ b/LArCalorimeter/LArRecUtils/python/LArADC2MeVSCCondAlgConfig.py @@ -4,26 +4,29 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory def LArADC2MeVSCCondAlgCfg(configFlags): - from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg - from LArConfiguration.LArElecCalibDBConfig import LArElecCalibDbCfg + from LArConfiguration.LArElecCalibDBConfig import LArElecCalibDbCfg, LArElecCalibDBMCSCCfg from LArGeoAlgsNV.LArGMConfig import LArGMCfg - + result=ComponentAccumulator() - result.merge(LArOnOffIdMappingCfg(configFlags)) + from LArCabling.LArCablingConfig import LArOnOffIdMappingSCCfg + result.merge(LArOnOffIdMappingSCCfg(configFlags)) result.merge(LArGMCfg(configFlags)) #Needed for identifier helpers - theADC2MeVCondAlg=CompFactory.LArADC2MeVCondAlg(LArADC2MeVKey = 'LArADC2MeVSC') + theADC2MeVCondAlg=CompFactory.LArADC2MeVCondAlg(name = "LArADC2MeVSCCondAlg", LArADC2MeVKey = 'LArADC2MeVSC') isMC=configFlags.Input.isMC - + if isMC: - requiredConditions=["Ramp","DAC2uA","uA2MeV","MphysOverMcal","HVScaleCorr"] + requiredConditions=["RampSC","DAC2uASC","uA2MeVSC"] theADC2MeVCondAlg.LAruA2MeVKey="LAruA2MeVSC" theADC2MeVCondAlg.LArDAC2uAKey="LArDAC2uASC" theADC2MeVCondAlg.LArRampKey="LArRampSC" - theADC2MeVCondAlg.LArMphysOverMcalKey="LArMphysOverMcalSC" - theADC2MeVCondAlg.LArHVScaleCorrKey="LArHVScaleCorr" + theADC2MeVCondAlg.LArMphysOverMcalKey="" + theADC2MeVCondAlg.LArHVScaleCorrKey="" theADC2MeVCondAlg.UseFEBGainTresholds=False + theADC2MeVCondAlg.LArOnOffIdMappingKey="LArOnOffIdMapSC" + theADC2MeVCondAlg.isSuperCell=True + result.merge(LArElecCalibDBMCSCCfg(configFlags,requiredConditions)) else: # not MC: requiredConditions=["Ramp","DAC2uA","uA2MeV","MphysOverMcal","HVScaleCorr"] from LArRecUtils.LArFebConfigCondAlgConfig import LArFebConfigCondAlgCfg @@ -31,8 +34,7 @@ def LArADC2MeVSCCondAlgCfg(configFlags): theADC2MeVCondAlg.LAruA2MeVKey="LAruA2MeVSC" theADC2MeVCondAlg.LArDAC2uAKey="LArDAC2uASC" result.merge(LArFebConfigCondAlgCfg(configFlags)) - - result.merge(LArElecCalibDbCfg(configFlags,requiredConditions)) + result.merge(LArElecCalibDbCfg(configFlags,requiredConditions)) result.addCondAlgo(theADC2MeVCondAlg,primary=True) return result diff --git a/LArCalorimeter/LArRecUtils/python/LArAutoCorrNoiseSCCondAlgDefault.py b/LArCalorimeter/LArRecUtils/python/LArAutoCorrNoiseSCCondAlgDefault.py index db3225c83c2436f36a5d41b00ae6a14aa3202487..a9af6dd8bc8748353806b1f83add5bf1eebe3331 100644 --- a/LArCalorimeter/LArRecUtils/python/LArAutoCorrNoiseSCCondAlgDefault.py +++ b/LArCalorimeter/LArRecUtils/python/LArAutoCorrNoiseSCCondAlgDefault.py @@ -30,7 +30,7 @@ def LArAutoCorrNoiseSCCondAlgDefault(): from LArROD.LArRODFlags import larRODFlags # we need to keep one sample before, another after - theAutoCorrNoiseCondAlg.nSampl = larRODFlags.nSamples()+2 + theAutoCorrNoiseCondAlg.nSampl = larRODFlags.nSamples() + 2 # See ATLASSIM-5483 condSeq+=theAutoCorrNoiseCondAlg return theAutoCorrNoiseCondAlg diff --git a/LArCalorimeter/LArRecUtils/python/LArAutoCorrTotalCondAlgDefault.py b/LArCalorimeter/LArRecUtils/python/LArAutoCorrTotalCondAlgDefault.py index c77ed7f7beb44ff83802bebb5aa2a99f40f58ec1..4813d9c7c68a458196069668c1a5c2444308ebff 100644 --- a/LArCalorimeter/LArRecUtils/python/LArAutoCorrTotalCondAlgDefault.py +++ b/LArCalorimeter/LArRecUtils/python/LArAutoCorrTotalCondAlgDefault.py @@ -41,7 +41,7 @@ def LArAutoCorrTotalCondAlgDefault(): theAutoCorrTotalCondAlg.Nminbias=jobproperties.Beam.numberOfCollisions() mlog.info(" setup for Ncollisions %f deltaBunch %f", jobproperties.Beam.numberOfCollisions(), jobproperties.Beam.bunchSpacing()) else: - theAutoCorrTotalCondAlg.Nminbias=0 + theAutoCorrTotalCondAlg.Nminbias=0. mlog.info(" setup for computing total noise autocorrelation without pileup") diff --git a/Simulation/Digitization/python/DigiOutput.py b/Simulation/Digitization/python/DigiOutput.py index c6a264a20dd94f7f1d59cb30b845969a17a80137..a562320bd5aa904d57eeed9b4d94e2918326ded2 100644 --- a/Simulation/Digitization/python/DigiOutput.py +++ b/Simulation/Digitization/python/DigiOutput.py @@ -203,6 +203,9 @@ def getStreamRDO_ItemList(log): if DetFlags.simulateLVL1.LAr_on(): if DetFlags.writeRDOPool.LAr_on(): StreamRDO_ItemList+=["LArTTL1Container#*"] + from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as commonGeoFlags + if commonGeoFlags.Run()=="RUN3": + StreamRDO_ItemList+=["LArDigitContainer#LArDigitSCL2"] if DetFlags.simulateLVL1.Tile_on(): if DetFlags.writeRDOPool.Tile_on(): StreamRDO_ItemList+=["TileTTL1Container#*"] diff --git a/Simulation/Digitization/share/LVL1Digitization.py b/Simulation/Digitization/share/LVL1Digitization.py index 4aaf1807f7a875d8145780678add74eab25b0845..deb97ad17a9251e61e3197e38add0f8aad65fac1 100755 --- a/Simulation/Digitization/share/LVL1Digitization.py +++ b/Simulation/Digitization/share/LVL1Digitization.py @@ -38,6 +38,10 @@ if DetFlags.simulateLVL1.LAr_on(): topSequence.LArTTL1Maker.PileUp = True else: topSequence.LArTTL1Maker.PileUp = False + from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as commonGeoFlags + if commonGeoFlags.Run()=="RUN3": + from LArL1Sim.LArSCL1Getter import * + theLArSCL1Getter = LArSCL1Getter() if DetFlags.simulateLVL1.Tile_on(): protectedInclude( "TileSimAlgs/TileTTL1_jobOptions.py" )