diff --git a/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py b/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py index 94bd4c7dd4408b1698e3bcc4084b109788d8a1a7..31ddfe496a4df48d6560ba0de9dad16375accb0b 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py @@ -105,7 +105,7 @@ def createSimConfigFlags(): doID = True doCALO = True doMUON = True - elif simstr in ("ATLFASTII", "G4FastCalo"): + elif simstr in ("ATLFASTII", "G4FastCalo", "ATLFAST3MT", "ATLFAST3MT_QS"): doID = False doCALO = True doMUON = False diff --git a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfigNew.py b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfigNew.py index 1811d2daff5bcb10ef30e4c5b45fe1e6e74f9156..f25d52ebacd9e2df67cef620dc5959e5f5fc0dbc 100644 --- a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfigNew.py +++ b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfigNew.py @@ -67,7 +67,7 @@ def PassBackG4TrackProcessorUserActionToolCfg(flags, name="PassBackG4TrackProces def AFII_G4TrackProcessorUserActionToolCfg(flags, name="AFII_G4TrackProcessorUserActionTool", **kwargs): result = ComponentAccumulator() - if flags.Sim.ISF.Simulator in ["PassBackG4MT", "ATLFASTIIMT", "G4FastCaloMT"]: + if flags.Sim.ISF.Simulator in ["PassBackG4MT", "ATLFASTIIMT", "ATLFAST3MT", "ATLFAST3MT_QS"]: kwargs.setdefault("ParticleBroker", "") if flags.Sim.ISF.Simulator in ["ATLFASTII","ATLFASTIIF_G4MS"]: result.merge(AFIIParticleBrokerSvcCfg(flags)) diff --git a/Simulation/ISF/ISF_Config/python/FlagSetters.py b/Simulation/ISF/ISF_Config/python/FlagSetters.py index 1960f8b6e13068b92c25abd9047ca5ba68f87842..be063b7540f8543803cf46f19e397aa008591d54 100644 --- a/Simulation/ISF/ISF_Config/python/FlagSetters.py +++ b/Simulation/ISF/ISF_Config/python/FlagSetters.py @@ -151,40 +151,56 @@ def configureFlagsATLFASTII_PileUp(): ## methods for simulators which use G4 + FastCaloSim V2 -def configureFlagsG4FastCalo(): - configureFlagsATLFASTII() +def configureFlagsATLFAST3(): from G4AtlasApps.SimFlags import simFlags - simFlags.SimulationFlavour = "G4FastCalo" + simFlags.SimulationFlavour = "ATLFAST3" + from ISF_Config.ISF_jobProperties import ISF_Flags + ISF_Flags.UsingGeant4 = True + mergeDict = {'ID':False, 'CALO':True, 'MUON':False} + ISF_Flags.HITSMergingRequired.get_Value().update(mergeDict) + ISF_Flags.ParticleBroker = "ISF_AFIIParticleBrokerSvc" return -def configureFlagsG4FastCaloEnergyOrdered(): - configureFlagsATLFASTII() - ISF_Flags.ParticleBroker = "ISF_AFIIEnergyOrderedParticleBrokerSvc" +def configureFlagsATLFAST3_QS(): + configureFlagsATLFAST3() from G4AtlasApps.SimFlags import simFlags - simFlags.SimulationFlavour = "G4FastCalo" + simFlags.SimulationFlavour = "ATLFAST3_QS" return -def configureFlagsG4FastCaloMT(): - configureFlagsATLFASTII() +def configureFlagsATLFAST3MT(): + configureFlagsATLFAST3() ISF_Flags.ParticleBroker = "" from G4AtlasApps.SimFlags import simFlags - simFlags.SimulationFlavour = "G4FastCaloMT" + simFlags.SimulationFlavour = "ATLFAST3MT" -def configureFlagsG4FastCalo_QS(): - configureFlagsATLFASTII() +def configureFlagsATLFAST3MT_QS(): + configureFlagsATLFAST3() from G4AtlasApps.SimFlags import simFlags - simFlags.SimulationFlavour = "G4FastCalo_QS" + simFlags.SimulationFlavour = "ATLFAST3MT_QS" return -def configureFlagsG4FastCaloMTEnergyOrdered(): - configureFlagsATLFASTII() +def configureFlagsATLFAST3MTEnergyOrdered(): + configureFlagsATLFAST3() ISF_Flags.ParticleBroker = "" from G4AtlasApps.SimFlags import simFlags - simFlags.SimulationFlavour = "G4FastCaloMT" + simFlags.SimulationFlavour = "ATLFAST3MT" + return + +def configureFlagsG4FastCalo(): + configureFlagsATLFAST3() + from G4AtlasApps.SimFlags import simFlags + simFlags.SimulationFlavour = "G4FastCalo" + return + +def configureFlagsATLFAST3EnergyOrdered(): + configureFlagsATLFAST3() + ISF_Flags.ParticleBroker = "ISF_AFIIEnergyOrderedParticleBrokerSvc" + from G4AtlasApps.SimFlags import simFlags + simFlags.SimulationFlavour = "G4FastCalo" return def configureFlagsG4FastCaloTest(): - configureFlagsATLFASTII() + configureFlagsATLFAST3() from G4AtlasApps.SimFlags import simFlags simFlags.SimulationFlavour = "G4FastCaloTest" return diff --git a/Simulation/ISF/ISF_Config/python/ISF_ConfigConfigDb.py b/Simulation/ISF/ISF_Config/python/ISF_ConfigConfigDb.py index d70ea69b7230f00cea9b13a3fd12c8570d4b8e16..fa3a2445c1312e453e82ee81da77fd9abf1c7ac7 100644 --- a/Simulation/ISF/ISF_Config/python/ISF_ConfigConfigDb.py +++ b/Simulation/ISF/ISF_Config/python/ISF_ConfigConfigDb.py @@ -47,13 +47,15 @@ addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_ATLFASTII_PileUp", "ISF_Kern addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_G4HS_FastPileup", "ISF_Kernel_G4HS_FastPileup") addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_ATLFASTIIF_IDOnly", "ISF_Kernel_ATLFASTIIF_IDOnly") addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_ATLFASTIIF_IDCalo", "ISF_Kernel_ATLFASTIIF_IDCalo") +addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_ATLFAST3", "ISF_Kernel_ATLFAST3") addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_G4FastCalo", "ISF_Kernel_G4FastCalo") -addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_G4FastCaloEnergyOrdered", "ISF_Kernel_G4FastCaloEnergyOrdered") -addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_G4FastCalo_QS", "ISF_Kernel_G4FastCalo_QS") +addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_ATLFAST3EnergyOrdered", "ISF_Kernel_ATLFAST3EnergyOrdered") +addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_ATLFAST3_QS", "ISF_Kernel_ATLFAST3_QS") addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_G4FastCaloTest", "ISF_Kernel_G4FastCaloTest") addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_G4FastCaloDNN", "ISF_Kernel_G4FastCaloDNN") -addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_G4FastCaloMT", "ISF_Kernel_G4FastCaloMT") -addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_G4FastCaloMTEnergyOrdered", "ISF_Kernel_G4FastCaloMTEnergyOrdered") +addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_ATLFAST3MT", "ISF_Kernel_ATLFAST3MT") +addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_ATLFAST3MT_QS", "ISF_Kernel_ATLFAST3MT_QS") +addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_ATLFAST3MTEnergyOrdered", "ISF_Kernel_ATLFAST3MTEnergyOrdered") addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_Fatras_newExtrapolation","ISF_Kernel_Fatras_newExtrapolation") addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_Fatras_newExtrapolation_IDOnly","ISF_Kernel_Fatras_newExtrapolation_IDOnly") addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_FastOnly", "ISF_Kernel_FastOnly") diff --git a/Simulation/ISF/ISF_Config/python/ISF_MainConfig.py b/Simulation/ISF/ISF_Config/python/ISF_MainConfig.py index 7874d6331189f74a2dc45d287a63c42eb835c2ec..d8a9d802ea650cdbc11ae9688643e8b40bbb5eed 100644 --- a/Simulation/ISF/ISF_Config/python/ISF_MainConfig.py +++ b/Simulation/ISF/ISF_Config/python/ISF_MainConfig.py @@ -362,40 +362,36 @@ def getKernel_MC12G4_IDCalo(name="ISF_Kernel_MC12G4_IDCalo", **kwargs): # Legacy only return getKernel_FullG4_IDCalo(name, **kwargs) -############## Simulator: G4FastCalo ############### -def getKernel_G4FastCalo(name="ISF_Kernel_G4FastCalo", **kwargs): - kwargs.setdefault("ParticleBroker" , 'ISF_AFIIParticleBrokerSvc') +############## Simulator: ATLFAST3 ################# +def getKernel_ATLFAST3(name="ISF_Kernel_ATLFAST3", **kwargs): + kwargs.setdefault("ParticleBroker" , 'ISF_AFIIParticleBrokerSvc' ) kwargs.setdefault("BeamPipeSimulationSelectors", [ 'ISF_DefaultAFIIGeant4Selector' ] ) kwargs.setdefault("IDSimulationSelectors" , [ 'ISF_DefaultAFIIGeant4Selector' ] ) kwargs.setdefault("CaloSimulationSelectors" , [ 'ISF_MuonAFIIGeant4Selector', 'ISF_EtaGreater5ParticleKillerSimSelector', - 'ISF_PionG4FastCaloGeant4Selector', - 'ISF_ProtonG4FastCaloGeant4Selector', - 'ISF_NeutronG4FastCaloGeant4Selector', - 'ISF_ChargedKaonG4FastCaloGeant4Selector', - 'ISF_KLongG4FastCaloGeant4Selector', - 'ISF_DefaultFastCaloSimV2Selector' ] ) + 'ISF_PionATLFAST3Geant4Selector', + 'ISF_ProtonATLFAST3Geant4Selector', + 'ISF_NeutronATLFAST3Geant4Selector', + 'ISF_ChargedKaonATLFAST3Geant4Selector', + 'ISF_KLongATLFAST3Geant4Selector', + 'ISF_DefaultFastCaloSimV2Selector' ] ) kwargs.setdefault("MSSimulationSelectors" , [ 'ISF_DefaultAFIIGeant4Selector' ] ) kwargs.setdefault("CavernSimulationSelectors" , [ 'ISF_DefaultParticleKillerSelector' ] ) from G4AtlasApps.SimFlags import simFlags - simFlags.SimulationFlavour = "G4FastCalo" + simFlags.SimulationFlavour = "ATLFAST3" return getKernel_GenericSimulator(name, **kwargs) -def getKernel_G4FastCaloEnergyOrdered(name="ISF_Kernel_G4FastCaloEnergyOrdered", **kwargs): - kwargs.setdefault("ParticleBroker" , 'ISF_AFIIEnergyOrderedParticleBrokerSvc') - return getKernel_G4FastCalo(name, **kwargs) - -############## Simulator: G4FastCaloMT ############### -def getKernel_G4FastCaloMT(name="ISF_Kernel_G4FastCaloMT", **kwargs): +############## Simulator: ATLFAST3MT ############### +def getKernel_ATLFAST3MT(name="ISF_Kernel_ATLFAST3MT", **kwargs): kwargs.setdefault("BeamPipeSimulationSelectors", [ 'ISF_DefaultAFIIGeant4Selector' ] ) kwargs.setdefault("IDSimulationSelectors" , [ 'ISF_DefaultAFIIGeant4Selector' ] ) kwargs.setdefault("CaloSimulationSelectors" , [ 'ISF_MuonAFIIGeant4Selector', 'ISF_EtaGreater5ParticleKillerSimSelector', - 'ISF_PionG4FastCaloGeant4Selector', - 'ISF_ProtonG4FastCaloGeant4Selector', - 'ISF_NeutronG4FastCaloGeant4Selector', - 'ISF_ChargedKaonG4FastCaloGeant4Selector', - 'ISF_KLongG4FastCaloGeant4Selector', + 'ISF_PionATLFAST3Geant4Selector', + 'ISF_ProtonATLFAST3Geant4Selector', + 'ISF_NeutronATLFAST3Geant4Selector', + 'ISF_ChargedKaonATLFAST3Geant4Selector', + 'ISF_KLongATLFAST3Geant4Selector', 'ISF_DefaultFastCaloSimV2Selector' ] ) kwargs.setdefault("MSSimulationSelectors" , [ 'ISF_DefaultAFIIGeant4Selector' ] ) kwargs.setdefault("CavernSimulationSelectors" , [ 'ISF_DefaultParticleKillerSelector' ] ) @@ -405,35 +401,85 @@ def getKernel_G4FastCaloMT(name="ISF_Kernel_G4FastCaloMT", **kwargs): kwargs.setdefault("ParticleOrderingTool" , 'ISF_ParticleOrderingTool' ) kwargs.setdefault('EntryLayerTool' , 'ISF_AFIIEntryLayerToolMT') from G4AtlasApps.SimFlags import simFlags - simFlags.SimulationFlavour = "G4FastCaloMT" + simFlags.SimulationFlavour = "ATLFAST3MT" return getKernel_GenericSimulatorMT(name, **kwargs) -def getKernel_G4FastCaloMTEnergyOrdered(name="ISF_Kernel_G4FastCaloMTEnergyOrdered", **kwargs): +############## Simulator: ATLFAST3MT ############### +def getKernel_ATLFAST3MTEnergyOrdered(name="ISF_Kernel_ATLFAST3MTEnergyOrdered", **kwargs): kwargs.setdefault("ParticleOrderingTool" , 'ISF_EnergyParticleOrderingTool' ) - return getKernel_G4FastCaloMT(name, **kwargs) + return getKernel_ATLFAST3MT(name, **kwargs) -############## Simulator: G4FastCalo_QS ############### -def getKernel_G4FastCalo_QS(name="ISF_Kernel_G4FastCalo_QS", **kwargs): +############## Simulator: ATLFAST3_QS ############### +def getKernel_ATLFAST3_QS(name="ISF_Kernel_ATLFAST3_QS", **kwargs): kwargs.setdefault("ParticleBroker" , 'ISF_AFIIParticleBrokerSvc' ) kwargs.setdefault("BeamPipeSimulationSelectors", [ 'ISF_DefaultAFII_QS_Geant4Selector' ] ) kwargs.setdefault("IDSimulationSelectors" , [ 'ISF_DefaultAFII_QS_Geant4Selector' ] ) kwargs.setdefault("CaloSimulationSelectors" , [ 'ISF_MuonAFII_QS_Geant4Selector', 'ISF_EtaGreater5ParticleKillerSimSelector', - 'ISF_PionG4FastCalo_QS_Geant4Selector', - 'ISF_ProtonG4FastCalo_QS_Geant4Selector', - 'ISF_NeutronG4FastCalo_QS_Geant4Selector', - 'ISF_ChargedKaonG4FastCalo_QS_Geant4Selector', - 'ISF_KLongG4FastCalo_QS_Geant4Selector', + 'ISF_PionATLFAST3_QS_Geant4Selector', + 'ISF_ProtonATLFAST3_QS_Geant4Selector', + 'ISF_NeutronATLFAST3_QS_Geant4Selector', + 'ISF_ChargedKaonATLFAST3_QS_Geant4Selector', + 'ISF_KLongATLFAST3_QS_Geant4Selector', 'ISF_DefaultFastCaloSimV2Selector' ] ) kwargs.setdefault("MSSimulationSelectors" , [ 'ISF_DefaultAFII_QS_Geant4Selector' ] ) kwargs.setdefault("CavernSimulationSelectors" , [ 'ISF_DefaultParticleKillerSelector' ] ) kwargs.setdefault("InputConverter" , 'ISF_LongLivedInputConverter' ) kwargs.setdefault("QuasiStablePatcher" , 'ZeroLifetimePositioner' ) from G4AtlasApps.SimFlags import simFlags - simFlags.SimulationFlavour = "G4FastCalo_QS" + simFlags.SimulationFlavour = "ATLFAST3_QS" return getKernel_GenericSimulator(name, **kwargs) +############## Simulator: ATLFAST3MT_QS ############### +def getKernel_ATLFAST3MT_QS(name="ISF_Kernel_ATLFAST3MT_QS", **kwargs): + kwargs.setdefault("BeamPipeSimulationSelectors", [ 'ISF_DefaultAFII_QS_Geant4Selector' ] ) + kwargs.setdefault("IDSimulationSelectors" , [ 'ISF_DefaultAFII_QS_Geant4Selector' ] ) + kwargs.setdefault("CaloSimulationSelectors" , [ 'ISF_MuonAFII_QS_Geant4Selector', + 'ISF_EtaGreater5ParticleKillerSimSelector', + 'ISF_PionATLFAST3_QS_Geant4Selector', + 'ISF_ProtonATLFAST3_QS_Geant4Selector', + 'ISF_NeutronATLFAST3_QS_Geant4Selector', + 'ISF_ChargedKaonATLFAST3_QS_Geant4Selector', + 'ISF_KLongATLFAST3_QS_Geant4Selector', + 'ISF_DefaultFastCaloSimV2Selector' ] ) + kwargs.setdefault("MSSimulationSelectors" , [ 'ISF_DefaultAFII_QS_Geant4Selector' ] ) + kwargs.setdefault("CavernSimulationSelectors" , [ 'ISF_DefaultParticleKillerSelector' ] ) + kwargs.setdefault("SimulationTools" , [ 'ISF_ParticleKillerTool', + 'ISF_FastCaloSimV2Tool', + 'AFII_QS_Geant4Tool']) + kwargs.setdefault("ParticleOrderingTool" , 'ISF_ParticleOrderingTool' ) + kwargs.setdefault('EntryLayerTool' , 'ISF_AFIIEntryLayerToolMT') + kwargs.setdefault("InputConverter" , 'ISF_LongLivedInputConverter') + kwargs.setdefault("QuasiStablePatcher" , 'ZeroLifetimePositioner' ) + from G4AtlasApps.SimFlags import simFlags + simFlags.SimulationFlavour = "ATLFAST3MT_QS" + return getKernel_GenericSimulatorMT(name, **kwargs) + +############## Simulator: G4FastCalo ############### +def getKernel_G4FastCalo(name="ISF_Kernel_G4FastCalo", **kwargs): + kwargs.setdefault("ParticleBroker" , 'ISF_AFIIParticleBrokerSvc') + kwargs.setdefault("BeamPipeSimulationSelectors", [ 'ISF_DefaultAFIIGeant4Selector' ] ) + kwargs.setdefault("IDSimulationSelectors" , [ 'ISF_DefaultAFIIGeant4Selector' ] ) + kwargs.setdefault("CaloSimulationSelectors" , [ 'ISF_MuonAFIIGeant4Selector', + 'ISF_EtaGreater5ParticleKillerSimSelector', + 'ISF_PionATLFAST3Geant4Selector', + 'ISF_ProtonATLFAST3Geant4Selector', + 'ISF_NeutronATLFAST3Geant4Selector', + 'ISF_ChargedKaonATLFAST3Geant4Selector', + 'ISF_KLongATLFAST3Geant4Selector', + 'ISF_DefaultFastCaloSimV2Selector' ] ) + kwargs.setdefault("MSSimulationSelectors" , [ 'ISF_DefaultAFIIGeant4Selector' ] ) + kwargs.setdefault("CavernSimulationSelectors" , [ 'ISF_DefaultParticleKillerSelector' ] ) + from G4AtlasApps.SimFlags import simFlags + simFlags.SimulationFlavour = "G4FastCalo" + return getKernel_GenericSimulator(name, **kwargs) + +############## Simulator: ATLFAST3EnergyOrdered ############### +def getKernel_ATLFAST3EnergyOrdered(name="ISF_Kernel_ATLFAST3EnergyOrdered", **kwargs): + kwargs.setdefault("ParticleBroker" , 'ISF_AFIIEnergyOrderedParticleBrokerSvc') + return getKernel_G4FastCalo(name, **kwargs) + ############## Simulator: G4FastCaloTest ############### def getKernel_G4FastCaloTest(name="ISF_Kernel_G4FastCaloTest", **kwargs): kwargs.setdefault("ParticleBroker" , 'ISF_AFIIParticleBrokerSvc') diff --git a/Simulation/ISF/ISF_Config/python/ISF_MainConfigNew.py b/Simulation/ISF/ISF_Config/python/ISF_MainConfigNew.py index 30cd05cef4995778a4d680a8c66aa2bf71487c70..4a5de6e366ddaffe9bc7da84cc0dad1b42eef43c 100644 --- a/Simulation/ISF/ISF_Config/python/ISF_MainConfigNew.py +++ b/Simulation/ISF/ISF_Config/python/ISF_MainConfigNew.py @@ -20,19 +20,26 @@ from ISF_SimulationSelectors.ISF_SimulationSelectorsConfigNew import ( EtaGreater5ParticleKillerSimSelectorCfg, FullGeant4SelectorCfg, MuonAFIIGeant4SelectorCfg, + MuonAFII_QS_Geant4SelectorCfg, PassBackGeant4SelectorCfg, DefaultFastCaloSimV2SelectorCfg, - PionG4FastCaloGeant4Selector, - ProtonG4FastCaloGeant4Selector, - NeutronG4FastCaloGeant4Selector, - ChargedKaonG4FastCaloGeant4Selector, - KLongG4FastCaloGeant4Selector, + PionATLFAST3Geant4SelectorCfg, + PionATLFAST3_QS_Geant4SelectorCfg, + ProtonATLFAST3Geant4SelectorCfg, + ProtonATLFAST3_QS_Geant4SelectorCfg, + NeutronATLFAST3Geant4SelectorCfg, + NeutronATLFAST3_QS_Geant4SelectorCfg, + ChargedKaonATLFAST3Geant4SelectorCfg, + ChargedKaonATLFAST3_QS_Geant4SelectorCfg, + KLongATLFAST3Geant4SelectorCfg, + KLongATLFAST3_QS_Geant4SelectorCfg, DefaultFatrasSelectorCfg, MuonFatrasSelectorCfg, DefaultFastCaloSimSelectorCfg ) from ISF_Geant4Tools.ISF_Geant4ToolsConfigNew import ( AFIIGeant4ToolCfg, + AFII_QS_Geant4ToolCfg, FullGeant4ToolCfg, LongLivedGeant4ToolCfg, PassBackGeant4ToolCfg, @@ -139,6 +146,7 @@ def Kernel_FullG4MT_LongLivedCfg(flags, name="ISF_Kernel_FullG4MT_LongLived", ** def Kernel_PassBackG4MTCfg(flags, name="ISF_Kernel_PassBackG4MT", **kwargs): acc = ComponentAccumulator() + acc.merge(Kernel_GenericSimulatorMTCfg(flags, name, **kwargs)) # Workaround defaultG4SelectorRegions = set(["BeamPipeSimulationSelectors", "IDSimulationSelectors", "CaloSimulationSelectors", "MSSimulationSelectors"]) if defaultG4SelectorRegions - kwargs.keys(): # i.e. if any of these have not been defined yet @@ -171,6 +179,7 @@ def Kernel_PassBackG4MTCfg(flags, name="ISF_Kernel_PassBackG4MT", **kwargs): def Kernel_ATLFASTIIMTCfg(flags, name="ISF_Kernel_ATLFASTIIMT", **kwargs): acc = ComponentAccumulator() + acc.merge(Kernel_GenericSimulatorMTCfg(flags, name, **kwargs)) # Workaround tool = acc.popToolsAndMerge(DefaultAFIIGeant4SelectorCfg(flags)) acc.addPublicTool(tool) @@ -215,6 +224,7 @@ def Kernel_ATLFASTIIMTCfg(flags, name="ISF_Kernel_ATLFASTIIMT", **kwargs): def Kernel_ATLFASTIIFMTCfg(flags, name="ISF_Kernel_ATLFASTIIFMT", **kwargs): acc = ComponentAccumulator() + acc.merge(Kernel_GenericSimulatorMTCfg(flags, name, **kwargs)) # Workaround kwargs.setdefault("SimulationTools", [ acc.popToolsAndMerge(ParticleKillerToolCfg(flags)), @@ -227,8 +237,9 @@ def Kernel_ATLFASTIIFMTCfg(flags, name="ISF_Kernel_ATLFASTIIFMT", **kwargs): return acc -def Kernel_G4FastCaloMT(flags, name="ISF_Kernel_G4FastCaloMT", **kwargs): +def Kernel_ATLFAST3MTCfg(flags, name="ISF_Kernel_ATLFAST3MT", **kwargs): acc = ComponentAccumulator() + acc.merge(Kernel_GenericSimulatorMTCfg(flags, name, **kwargs)) # Workaround # BeamPipe, ID, MS Simulation Selectors tool = acc.popToolsAndMerge(DefaultAFIIGeant4SelectorCfg(flags)) @@ -241,19 +252,19 @@ def Kernel_G4FastCaloMT(flags, name="ISF_Kernel_G4FastCaloMT", **kwargs): # CaloSimulationSelectors acc.addPublicTool(acc.popToolsAndMerge(MuonAFIIGeant4SelectorCfg(flags))) acc.addPublicTool(acc.popToolsAndMerge(EtaGreater5ParticleKillerSimSelectorCfg(flags))) - acc.addPublicTool(acc.popToolsAndMerge(PionG4FastCaloGeant4Selector(flags))) - acc.addPublicTool(acc.popToolsAndMerge(ProtonG4FastCaloGeant4Selector(flags))) - acc.addPublicTool(acc.popToolsAndMerge(NeutronG4FastCaloGeant4Selector(flags))) - acc.addPublicTool(acc.popToolsAndMerge(ChargedKaonG4FastCaloGeant4Selector(flags))) - acc.addPublicTool(acc.popToolsAndMerge(KLongG4FastCaloGeant4Selector(flags))) + acc.addPublicTool(acc.popToolsAndMerge(PionATLFAST3Geant4SelectorCfg(flags))) + acc.addPublicTool(acc.popToolsAndMerge(ProtonATLFAST3Geant4SelectorCfg(flags))) + acc.addPublicTool(acc.popToolsAndMerge(NeutronATLFAST3Geant4SelectorCfg(flags))) + acc.addPublicTool(acc.popToolsAndMerge(ChargedKaonATLFAST3Geant4SelectorCfg(flags))) + acc.addPublicTool(acc.popToolsAndMerge(KLongATLFAST3Geant4SelectorCfg(flags))) acc.addPublicTool(acc.popToolsAndMerge(DefaultFastCaloSimV2SelectorCfg(flags))) kwargs.setdefault("CaloSimulationSelectors" , [ acc.getPublicTool("ISF_MuonAFIIGeant4Selector"), acc.getPublicTool("ISF_EtaGreater5ParticleKillerSimSelector"), - acc.getPublicTool("ISF_PionG4FastCaloGeant4Selector"), - acc.getPublicTool("ISF_ProtonG4FastCaloGeant4Selector"), - acc.getPublicTool("ISF_NeutronG4FastCaloGeant4Selector"), - acc.getPublicTool("ISF_ChargedKaonG4FastCaloGeant4Selector"), - acc.getPublicTool("ISF_KLongG4FastCaloGeant4Selector"), + acc.getPublicTool("ISF_PionATLFAST3Geant4Selector"), + acc.getPublicTool("ISF_ProtonATLFAST3Geant4Selector"), + acc.getPublicTool("ISF_NeutronATLFAST3Geant4Selector"), + acc.getPublicTool("ISF_ChargedKaonATLFAST3Geant4Selector"), + acc.getPublicTool("ISF_KLongATLFAST3Geant4Selector"), acc.getPublicTool("ISF_DefaultFastCaloSimV2Selector") ]) # CavernSimulationSelectors acc.addPublicTool(acc.popToolsAndMerge(DefaultParticleKillerSelectorCfg(flags))) @@ -271,6 +282,53 @@ def Kernel_G4FastCaloMT(flags, name="ISF_Kernel_G4FastCaloMT", **kwargs): return acc +def Kernel_ATLFAST3MT_QSCfg(flags, name="ISF_Kernel_ATLFAST3MT_QS", **kwargs): + acc = ComponentAccumulator() + acc.merge(LongLivedInputConverterCfg(flags)) + kwargs.setdefault("InputConverter", acc.getService("ISF_LongLivedInputConverter")) + kwargs.setdefault("ParticleOrderingTool" , acc.popToolsAndMerge(ParticleOrderingToolCfg(flags))) + + tool = acc.popToolsAndMerge(AFIIEntryLayerToolMTCfg(flags)) + acc.addPublicTool(tool) + kwargs.setdefault("EntryLayerTool" , acc.getPublicTool(tool.name)) # public ToolHandle + acc.merge(Kernel_GenericSimulatorMTCfg(flags, name, **kwargs)) # Workaround + + # BeamPipe, ID, MS Simulation Selectors + tool = acc.popToolsAndMerge(DefaultAFIIGeant4SelectorCfg(flags)) + acc.addPublicTool(tool) + pubTool = acc.getPublicTool(tool.name) + kwargs.setdefault("BeamPipeSimulationSelectors", [pubTool]) + kwargs.setdefault("IDSimulationSelectors" , [pubTool]) + kwargs.setdefault("MSSimulationSelectors" , [pubTool]) + + # CaloSimulationSelectors + acc.addPublicTool(acc.popToolsAndMerge(MuonAFII_QS_Geant4SelectorCfg(flags))) + acc.addPublicTool(acc.popToolsAndMerge(EtaGreater5ParticleKillerSimSelectorCfg(flags))) + acc.addPublicTool(acc.popToolsAndMerge(PionATLFAST3_QS_Geant4SelectorCfg(flags))) + acc.addPublicTool(acc.popToolsAndMerge(ProtonATLFAST3_QS_Geant4SelectorCfg(flags))) + acc.addPublicTool(acc.popToolsAndMerge(NeutronATLFAST3_QS_Geant4SelectorCfg(flags))) + acc.addPublicTool(acc.popToolsAndMerge(ChargedKaonATLFAST3_QS_Geant4SelectorCfg(flags))) + acc.addPublicTool(acc.popToolsAndMerge(KLongATLFAST3_QS_Geant4SelectorCfg(flags))) + acc.addPublicTool(acc.popToolsAndMerge(DefaultFastCaloSimV2SelectorCfg(flags))) + kwargs.setdefault("CaloSimulationSelectors" , [ acc.getPublicTool("ISF_MuonAFII_QS_Geant4Selector"), + acc.getPublicTool("ISF_EtaGreater5ParticleKillerSimSelector"), + acc.getPublicTool("ISF_PionATLFAST3_QS_Geant4Selector"), + acc.getPublicTool("ISF_ProtonATLFAST3_QS_Geant4Selector"), + acc.getPublicTool("ISF_NeutronATLFAST3_QS_Geant4Selector"), + acc.getPublicTool("ISF_ChargedKaonATLFAST3_QS_Geant4Selector"), + acc.getPublicTool("ISF_KLongATLFAST3_QS_Geant4Selector"), + acc.getPublicTool("ISF_DefaultFastCaloSimV2Selector") ]) + # CavernSimulationSelectors + acc.addPublicTool(acc.popToolsAndMerge(DefaultParticleKillerSelectorCfg(flags))) + kwargs.setdefault("CavernSimulationSelectors" , [ acc.getPublicTool("ISF_DefaultParticleKillerSelector") ]) + + kwargs.setdefault("SimulationTools" , [ acc.popToolsAndMerge(ParticleKillerToolCfg(flags)), + acc.popToolsAndMerge(FastCaloSimV2ToolCfg(flags)), + acc.popToolsAndMerge(AFII_QS_Geant4ToolCfg(flags)) ]) + acc.merge(Kernel_GenericSimulatorMTCfg(flags, name, **kwargs)) + return acc + + def Kernel_GenericSimulatorCfg(flags, name="ISF_Kernel_GenericSimulator", **kwargs): acc = ComponentAccumulator() @@ -303,7 +361,7 @@ def Kernel_GenericSimulatorCfg(flags, name="ISF_Kernel_GenericSimulator", **kwar def Kernel_ATLFASTIIF_G4MSCfg(flags, name="ISF_Kernel_ATLFASTIIF_G4MS", **kwargs): acc = ComponentAccumulator() - + acc.merge(Kernel_GenericSimulatorCfg(flags, name, **kwargs)) # Force the SimKernel to be before the CollectionMerger by adding it here acc.addPublicTool(acc.popToolsAndMerge(DefaultParticleKillerSelectorCfg(flags))) acc.addPublicTool(acc.popToolsAndMerge(DefaultFatrasSelectorCfg(flags))) acc.addPublicTool(acc.popToolsAndMerge(MuonFatrasSelectorCfg(flags))) @@ -321,7 +379,7 @@ def Kernel_ATLFASTIIF_G4MSCfg(flags, name="ISF_Kernel_ATLFASTIIF_G4MS", **kwargs # not migrated simFlags.SimulationFlavour = "ATLFASTIIF_MS" # simFlags.SimulationFlavour = "ATLFASTIIF_G4MS" - acc.merge(Kernel_GenericSimulatorCfg(flags, name, **kwargs)) + acc.merge(Kernel_GenericSimulatorCfg(flags, name, **kwargs)) # Merge properly configured SimKernel here and let deduplication sort it out. return acc def ISF_KernelCfg(flags): @@ -332,8 +390,10 @@ def ISF_KernelCfg(flags): acc.merge(Kernel_FullG4MT_LongLivedCfg(flags)) elif flags.Sim.ISF.Simulator in ('PassBackG4MT'): acc.merge(Kernel_PassBackG4MTCfg(flags)) - elif flags.Sim.ISF.Simulator in ('G4FastCaloMT'): - acc.merge(Kernel_G4FastCaloMT(flags)) + elif flags.Sim.ISF.Simulator in ('ATLFAST3MT'): + acc.merge(Kernel_ATLFAST3MTCfg(flags)) + elif flags.Sim.ISF.Simulator in ('ATLFAST3MT_QS'): + acc.merge(Kernel_ATLFAST3MT_QSCfg(flags)) elif flags.Sim.ISF.Simulator in ('ATLFASTIIMT'): acc.merge(Kernel_ATLFASTIIMTCfg(flags)) elif flags.Sim.ISF.Simulator in ('ATLFASTIIFMT'): diff --git a/Simulation/ISF/ISF_Example/python/ISF_Metadata.py b/Simulation/ISF/ISF_Example/python/ISF_Metadata.py index c4eade3480317e7fd07046685cfddbce02c33355..74cdd81773395267b5f217eec7307e4056494ba3 100644 --- a/Simulation/ISF/ISF_Example/python/ISF_Metadata.py +++ b/Simulation/ISF/ISF_Example/python/ISF_Metadata.py @@ -182,7 +182,7 @@ def fillTestBeamMetadata(dbFiller): def fillISFMetadata(dbFiller): from ISF_Config.ISF_jobProperties import ISF_Flags dbFiller.addSimParam('Simulator', ISF_Flags.Simulator()) - if ISF_Flags.Simulator() in ['G4FastCalo', 'G4FastCaloTest', 'G4FastCaloDNN', 'G4FastCalo_QS']: + if ISF_Flags.Simulator() in ['G4FastCalo', 'G4FastCaloTest', 'G4FastCaloDNN', 'ATLFAST3', 'ATLFAST3MT', 'ATLFAST3_QS', 'ATLFAST3MT_QS']: from ISF_FastCaloSimServices.ISF_FastCaloSimJobProperties import ISF_FastCaloSimFlags dbFiller.addSimParam('FCSParamFile', ISF_FastCaloSimFlags.ParamsInputFilename()) diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/AdditionalConfig.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/AdditionalConfig.py index 8a1c9be4173e14eee279fa8b0805dc5b0f3f0229..8ee38f71ea754e2e8ea0f0099ddc2a9edd9429f6 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/AdditionalConfig.py +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/AdditionalConfig.py @@ -665,7 +665,6 @@ def getPunchThroughTool(name="ISF_PunchThroughTool", **kwargs): kwargs.setdefault("InitiatorsEtaRange" , [ -2.7, 2.7 ] ) kwargs.setdefault("PunchThroughParticles" , [ 2212, 211, 22, 11, 13 ] ) kwargs.setdefault("DoAntiParticles" , [ False, True, False, True, True ] ) - #kwargs.setdefault("CorrelatedParticle" , [ 211, 2212, 11, 22, 0 ] ) kwargs.setdefault("CorrelatedParticle" , [] ) kwargs.setdefault("FullCorrelationEnergy" , [ 100000., 100000., 100000., 100000., 0. ] ) kwargs.setdefault("MinEnergy" , [ 938.3, 135.6, 50., 50., 105.7 ] ) diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimJobProperties.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimJobProperties.py index eca8fe28ae3feab9694dc1de8af3066b35e4e95e..bd519a55f804f8aace8868db88497e5a533a8f7e 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimJobProperties.py +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimJobProperties.py @@ -60,13 +60,13 @@ class ParamsInputFilename(JobProperty): """ Filename of the input parametrizations file. """ statusOn = True allowedTypes = ['str'] - StoredValue = 'FastCaloSim/MC16/TFCSparam_v011.root' + StoredValue = 'FastCaloSim/MC16/TFCSparam_dev_v13_Hybrid8_16_131_262.root' class DoPunchThroughSimulation(JobProperty): """ Determines whether to run the punch through simulation""" statusOn = True allowedTypes = ['bool'] - StoredValue = False + StoredValue = True class PunchThroughParamsInputFilename(JobProperty): """ Filename of the muon punch through input parametrizations file. """ diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimServicesConfigNew.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimServicesConfigNew.py index 8db19fab8ab3c9f137b388b093f70dcfdabee7c5..d0efbfbc6e4f7c2412699651a074e4e7d1a82631 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimServicesConfigNew.py +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimServicesConfigNew.py @@ -24,7 +24,7 @@ def PunchThroughToolCfg(flags, name="ISF_PunchThroughTool", **kwargs): acc.merge(dSFMT(seed)) kwargs.setdefault("RandomNumberService", acc.getService("AtDSFMTGenSvc")) kwargs.setdefault("RandomStreamName", "FastCaloSimRnd") - kwargs.setdefault("FilenameLookupTable", 'FastCaloSim/MC16/TFCSparam_mpt_v01.root') + kwargs.setdefault("FilenameLookupTable", "FastCaloSim/MC16/TFCSparam_mpt_v01.root") kwargs.setdefault("PunchThroughInitiators", [211]) kwargs.setdefault("InitiatorsMinEnergy" , [ 65536 ] ) kwargs.setdefault("InitiatorsEtaRange" , [ -2.7, 2.7 ] ) diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimServicesTestHelpers.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimServicesTestHelpers.py index f497bd781402599eec0b8c9efdcd1588548817c4..82cec4704f7e1b5dc165a032c234f71f8f8e15d7 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimServicesTestHelpers.py +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimServicesTestHelpers.py @@ -64,8 +64,8 @@ def defaultTestFlags(configFlags, args): configFlags.Sim.BeamPipeSimMode = 'FastSim' configFlags.Sim.ReleaseGeoModel = False configFlags.Sim.ISFRun = True - configFlags.Sim.ISF.Simulator = "G4FastCaloMT" - configFlags.Sim.FastCalo.ParamsInputFilename = "FastCaloSim/MC16/TFCSparam_v011.root" + configFlags.Sim.ISF.Simulator = "ATLFAST3MT" + configFlags.Sim.FastCalo.ParamsInputFilename = "FastCaloSim/MC16/TFCSparam_dev_v13_Hybrid8_16_131_262.root" configFlags.Sim.FastCalo.CaloCellsName = "AllCalo" configFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-14" diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/test/FastCaloSimServicesTest.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/test/FastCaloSimServicesTest.py index bd79d9936b172709fc3b1976d44d3bf885cb6462..c7b1bbce1d358db6951f1f1e47190c20fc14ce96 100755 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/test/FastCaloSimServicesTest.py +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/test/FastCaloSimServicesTest.py @@ -35,9 +35,9 @@ def FastCaloSimServicesMainCfg(ConfigFlags): from BeamEffects.BeamEffectsAlgConfig import BeamEffectsAlgCfg acc.merge(BeamEffectsAlgCfg(ConfigFlags)) - # Add Kernel_G4FastCaloMT from ISF_MainConfig - from ISF_Config.ISF_MainConfigNew import Kernel_G4FastCaloMT - acc.merge(Kernel_G4FastCaloMT(ConfigFlags)) + # Add Kernel_ATLFAST3MT from ISF_MainConfig + from ISF_Config.ISF_MainConfigNew import Kernel_ATLFAST3MT_QSCfg + acc.merge(Kernel_ATLFAST3MT_QSCfg(ConfigFlags)) from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg from SimuJobTransforms.SimOutputConfig import getStreamHITS_ItemList diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfig.py b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfig.py index 43bd7d3cde97ff82fb626c6ed305d8c9efc02aba..bbe3b42eee1e012d7a7a063f5c15363e79338c2f 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfig.py +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfig.py @@ -47,7 +47,7 @@ def getPassBackG4TrackProcessorUserActionTool(name='PassBackG4TrackProcessorUser def getAFII_G4TrackProcessorUserActionTool(name='AFII_G4TrackProcessorUserActionTool', **kwargs): from ISF_Config.ISF_jobProperties import ISF_Flags - if ISF_Flags.Simulator.get_Value() in ['PassBackG4MT', 'ATLFASTIIMT', 'G4FastCaloMT', 'G4FastCaloMTEnergyOrdered', 'ATLFASTIIF_ACTS']: + if ISF_Flags.Simulator.get_Value() in ['PassBackG4MT', 'ATLFASTIIMT', 'ATLFAST3MT', 'ATLFAST3MT_QS', 'ATLFAST3MTEnergyOrdered', 'ATLFASTIIF_ACTS']: kwargs.setdefault('ParticleBroker', '') from AthenaCommon.SystemOfUnits import MeV kwargs.setdefault('GeoIDSvc' , 'ISF_AFIIGeoIDSvc' ) @@ -80,7 +80,13 @@ def getGeant4Tool(name="ISF_Geant4Tool", **kwargs): kwargs.setdefault('FastSimMasterTool', 'FastSimulationMasterTool') from AthenaCommon import CfgMgr # Workaround to keep other simulation flavours working while we migrate everything to be AthenaMT-compatible. - if ISF_Flags.Simulator.get_Value() in ['FullG4', 'FullG4MT', 'PassBackG4', 'PassBackG4MT', 'G4FastCalo', 'G4FastCaloMT', 'G4FastCaloEnergyOrdered', 'G4FastCaloMTEnergyOrdered', 'ATLFASTIIF_ACTS']: + if ISF_Flags.Simulator.get_Value() in ['FullG4', 'FullG4MT', + 'PassBackG4', 'PassBackG4MT', + 'G4FastCalo', + 'ATLFAST3', 'ATLFAST3MT', + 'ATLFAST3_QS', 'ATLFAST3MT_QS', + 'ATLFAST3EnergyOrdered', 'ATLFAST3MTEnergyOrdered', + 'ATLFASTIIF_ACTS']: return CfgMgr.iGeant4__G4TransportTool(name, **kwargs) else: return CfgMgr.iGeant4__G4LegacyTransportTool(name, **kwargs) diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfigNew.py b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfigNew.py index 2b8a891c038e0ae273ae4de9725109f547223173..ade47fecedf59e6e871eed573a76a814b226eafa 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfigNew.py +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfigNew.py @@ -62,7 +62,7 @@ def Geant4ToolCfg(flags, name="ISF_Geant4Tool", **kwargs): kwargs.setdefault("PhysicsListSvc", acc.getService("PhysicsListSvc")) # Workaround to keep other simulation flavours working while we migrate everything to be AthenaMT-compatible. - if flags.Sim.ISF.Simulator in ["FullG4", "FullG4MT", "PassBackG4", "PassBackG4MT", "G4FastCalo", "G4FastCaloMT"]: + if flags.Sim.ISF.Simulator in ["FullG4", "FullG4MT", "PassBackG4", "PassBackG4MT", "G4FastCalo", "ATLFAST3MT", "ATLFAST3MT_QS"]: acc.setPrivateTools(CompFactory.iGeant4.G4TransportTool(name, **kwargs)) else: tool = acc.popToolsAndMerge(G4RunManagerHelperCfg(flags)) diff --git a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfig.py b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfig.py index 332fdc918a4d658e379a0036ebab1eb4cad6f395..3055dd0a1f662fcfb2e509422399ef5af8e140c7 100644 --- a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfig.py +++ b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration """ ISF_SimulationSelectors configurations for ISF Elmar Ritsch, 04/02/2013 @@ -10,7 +10,7 @@ from ISF_SimulationSelectors import SimulationFlavor def usesSimKernelMT(): from ISF_Config.ISF_jobProperties import ISF_Flags - return (ISF_Flags.Simulator.get_Value() in ['FullG4MT', 'PassBackG4MT', 'ATLFASTIIMT', 'G4FastCaloMT', 'FullG4MT_LongLived', 'ATLFASTIIF_ACTS']) + return (ISF_Flags.Simulator.get_Value() in ['FullG4MT', 'PassBackG4MT', 'ATLFASTIIMT', 'ATLFAST3MT', 'ATLFAST3MT_QS', 'FullG4MT_LongLived', 'ATLFASTIIF_ACTS']) def getDefaultSimSelector(name="ISF_DefaultSimSelector", **kwargs): return CfgMgr.ISF__DefaultSimSelector(name, **kwargs ) @@ -127,7 +127,7 @@ def getDefaultFatrasNewExtrapolationSelector(name="ISF_DefaultFatrasNewExtrapola def getDefaultActsSelector(name="ISF_DefaultActsSelector", **kwargs): if not usesSimKernelMT(): raise RuntimeError("SimulationSelector '%s' does not support running with SimKernel." % name) - kwargs.setdefault('SimulationFlavor', SimulationFlavor.Fatras) + kwargs.setdefault('SimulationFlavor', SimulationFlavor.Fatras) return getDefaultSimSelector(name, **kwargs) def getDefaultParametricSimulationSelector(name="ISF_DefaultParametricSimulationSelector", **kwargs): @@ -137,9 +137,11 @@ def getDefaultParametricSimulationSelector(name="ISF_DefaultParametricSimulation kwargs.setdefault('SimulationFlavor', SimulationFlavor.Parametric) return getDefaultSimSelector(name, **kwargs ) -### PileUpSimSelector Configurations +### KinematicPileUpSimSelector Configurations def getPileupSimSelector(name="ISF_PileupSimSelector", **kwargs): + if not usesSimKernelMT(): + raise RuntimeError("SimulationSelector '%s' does not support running with SimKernel." % name) return CfgMgr.ISF__KinematicPileupSimSelector(name, **kwargs ) def getFatrasPileupSelector(name="ISF_FatrasPileupSelector", **kwargs): @@ -168,229 +170,194 @@ def getFastCaloSimPileupOTSelector(name="ISF_FastCaloSimPileupOTSelector", **kwa kwargs.setdefault('SimulationFlavor', SimulationFlavor.FastCaloSimPileup) return getPileupSimSelector(name, **kwargs ) +def getMuonFatrasPileupSelector(name="ISF_MuonFatrasPileupSelector", **kwargs): + kwargs.setdefault('ParticlePDG' , 13) + kwargs.setdefault("PileupBCID" , [1]) + kwargs.setdefault('Simulator' , 'ISF_FatrasPileupSimSvc') + kwargs.setdefault('SimulationFlavor', SimulationFlavor.Fatras) + return getPileupSimSelector(name, **kwargs) + +def getEtaGreater5PileupParticleKillerSimSelector(name="ISF_EtaGreater5PileupParticleKillerSimSelector", **kwargs): + kwargs.setdefault('MinPosEta' , -5.0 ) + kwargs.setdefault('MaxPosEta' , 5.0 ) + kwargs.setdefault('InvertCuts' , True ) + kwargs.setdefault('Simulator' , 'ISF_ParticleKillerSvc') + kwargs.setdefault('SimulationFlavor', SimulationFlavor.ParticleKiller) + return getPileupSimSelector(name, **kwargs) + ### KinematicSimSelector Configurations -def getElectronGeant4Selector(name="ISF_ElectronGeant4Selector", **kwargs): - kwargs.setdefault('ParticlePDG' , 11) +# BASE METHODS +def getKinematicGeant4Selector(name="DONOTUSEDIRECTLY", **kwargs): if usesSimKernelMT(): kwargs.setdefault('Simulator', '') kwargs.setdefault('Simulator' , 'ISF_Geant4SimSvc') kwargs.setdefault('SimulationFlavor', SimulationFlavor.Geant4) return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) -def getNeutralGeant4Selector(name="ISF_NeutralGeant4Selector", **kwargs): - kwargs.setdefault('Charge' , 0) - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_Geant4SimSvc') - kwargs.setdefault('SimulationFlavor', SimulationFlavor.Geant4) - return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) - -def getProtonAFIIGeant4Selector(name="ISF_ProtonAFIIGeant4Selector", **kwargs): - kwargs.setdefault('MaxMom' , 750) - kwargs.setdefault('ParticlePDG' , 2212) +def getKinematicAFIIGeant4Selector(name="DONOTUSEDIRECTLY", **kwargs): if usesSimKernelMT(): kwargs.setdefault('Simulator', '') kwargs.setdefault('Simulator' , 'ISF_AFIIGeant4SimSvc') kwargs.setdefault('SimulationFlavor', SimulationFlavor.Geant4) return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) -def getProtonAFII_QS_Geant4Selector(name="ISF_ProtonAFII_QS_Geant4Selector", **kwargs): +def getKinematicAFII_QS_Geant4Selector(name="DONOTUSEDIRECTLY", **kwargs): if usesSimKernelMT(): kwargs.setdefault('Simulator', '') kwargs.setdefault('Simulator' , 'ISF_AFII_QS_Geant4SimSvc') - return getProtonAFIIGeant4Selector(name, **kwargs) + return getKinematicAFIIGeant4Selector(name, **kwargs) -def getPionAFIIGeant4Selector(name="ISF_PionAFIIGeant4Selector", **kwargs): - kwargs.setdefault('MaxMom' , 200) - kwargs.setdefault('ParticlePDG' , 211) +def getKinematicFatrasSelector(name="DONOTUSEDIRECTLY", **kwargs): if usesSimKernelMT(): kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_AFIIGeant4SimSvc') - kwargs.setdefault('SimulationFlavor', SimulationFlavor.Geant4) + kwargs.setdefault('Simulator' , 'ISF_FatrasSimSvc') + kwargs.setdefault('SimulationFlavor', SimulationFlavor.Fatras) return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) -def getPionG4FastCaloGeant4Selector(name="ISF_PionG4FastCaloGeant4Selector", **kwargs): - kwargs.setdefault('MaxEkin' , 200) - kwargs.setdefault('ParticlePDG' , 211) +def getKinematicFastCaloSimSelector(name="DONOTUSEDIRECTLY", **kwargs): if usesSimKernelMT(): kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_AFIIGeant4SimSvc') - kwargs.setdefault('SimulationFlavor', SimulationFlavor.Geant4) + kwargs.setdefault('Simulator' , 'ISF_FastCaloSimSvc') + kwargs.setdefault('SimulationFlavor', SimulationFlavor.FastCaloSim) return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) -def getPionG4FastCalo_QS_Geant4Selector(name="ISF_PionG4FastCalo_QS_Geant4Selector", **kwargs): - kwargs.setdefault('MaxEkin' , 200) - kwargs.setdefault('ParticlePDG' , 211) - kwargs.setdefault('Simulator' , 'ISF_AFII_QS_Geant4SimSvc') +def getKinematicParticleKillerSimSelector(name="DONOTUSEDIRECTLY", **kwargs): + if usesSimKernelMT(): + kwargs.setdefault('Simulator', '') + kwargs.setdefault('Simulator' , 'ISF_ParticleKillerSvc') + kwargs.setdefault('SimulationFlavor', SimulationFlavor.ParticleKiller) return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) -def getProtonG4FastCaloGeant4Selector(name="ISF_ProtonG4FastCaloGeant4Selector", **kwargs): +# Electrons +def getElectronGeant4Selector(name="ISF_ElectronGeant4Selector", **kwargs): + kwargs.setdefault('ParticlePDG' , 11) + return getKinematicGeant4Selector(name, **kwargs) + +# Neutrals +def getNeutralGeant4Selector(name="ISF_NeutralGeant4Selector", **kwargs): + kwargs.setdefault('Charge' , 0) + return getKinematicGeant4Selector(name, **kwargs) + +# Protons +def getProtonAFIIGeant4Selector(name="ISF_ProtonAFIIGeant4Selector", **kwargs): + kwargs.setdefault('MaxMom' , 750) + kwargs.setdefault('ParticlePDG' , 2212) + return getKinematicAFIIGeant4Selector(name, **kwargs) + +def getProtonAFII_QS_Geant4Selector(name="ISF_ProtonAFII_QS_Geant4Selector", **kwargs): + kwargs.setdefault('MaxMom' , 750) + kwargs.setdefault('ParticlePDG' , 2212) + return getKinematicAFII_QS_Geant4Selector(name, **kwargs) + +def getProtonATLFAST3Geant4Selector(name="ISF_ProtonATLFAST3Geant4Selector", **kwargs): kwargs.setdefault('MaxEkin' , 400) kwargs.setdefault('ParticlePDG' , 2212) - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_AFIIGeant4SimSvc') - kwargs.setdefault('SimulationFlavor', SimulationFlavor.Geant4) - return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) + return getKinematicAFIIGeant4Selector(name, **kwargs) -def getProtonG4FastCalo_QS_Geant4Selector(name="ISF_ProtonG4FastCalo_QS_Geant4Selector", **kwargs): +def getProtonATLFAST3_QS_Geant4Selector(name="ISF_ProtonATLFAST3_QS_Geant4Selector", **kwargs): kwargs.setdefault('MaxEkin' , 400) kwargs.setdefault('ParticlePDG' , 2212) - kwargs.setdefault('Simulator' , 'ISF_AFII_QS_Geant4SimSvc') - return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) + return getKinematicAFII_QS_Geant4Selector(name, **kwargs) + +# Pions +def getPionAFIIGeant4Selector(name="ISF_PionAFIIGeant4Selector", **kwargs): + kwargs.setdefault('MaxMom' , 200) + kwargs.setdefault('ParticlePDG' , 211) + return getKinematicAFIIGeant4Selector(name, **kwargs) -def getNeutronG4FastCaloGeant4Selector(name="ISF_NeutronG4FastCaloGeant4Selector", **kwargs): +def getPionATLFAST3Geant4Selector(name="ISF_PionATLFAST3Geant4Selector", **kwargs): + return getPionAFIIGeant4Selector(name, **kwargs) + +def getPionAFII_QS_Geant4Selector(name="ISF_PionAFII_QS_Geant4Selector", **kwargs): + kwargs.setdefault('MaxMom' , 200) + kwargs.setdefault('ParticlePDG' , 211) + return getKinematicAFII_QS_Geant4Selector(name, **kwargs) + +def getPionATLFAST3_QS_Geant4Selector(name="ISF_PionATLFAST3_QS_Geant4Selector", **kwargs): + return getPionAFII_QS_Geant4Selector(name, **kwargs) + +# Neutrons +def getNeutronATLFAST3Geant4Selector(name="ISF_NeutronATLFAST3Geant4Selector", **kwargs): kwargs.setdefault('MaxEkin' , 400) kwargs.setdefault('ParticlePDG' , 2112) - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_AFIIGeant4SimSvc') - kwargs.setdefault('SimulationFlavor', SimulationFlavor.Geant4) - return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) + return getKinematicAFIIGeant4Selector(name, **kwargs) -def getNeutronG4FastCalo_QS_Geant4Selector(name="ISF_NeutronG4FastCalo_QS_Geant4Selector", **kwargs): +def getNeutronATLFAST3_QS_Geant4Selector(name="ISF_NeutronATLFAST3_QS_Geant4Selector", **kwargs): kwargs.setdefault('MaxEkin' , 400) kwargs.setdefault('ParticlePDG' , 2112) - kwargs.setdefault('Simulator' , 'ISF_AFII_QS_Geant4SimSvc') - return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) + return getKinematicAFII_QS_Geant4Selector(name, **kwargs) -def getChargedKaonG4FastCaloGeant4Selector(name="ISF_ChargedKaonG4FastCaloGeant4Selector", **kwargs): - kwargs.setdefault('MaxEkin' , 400) +# Charged Kaons +def getChargedKaonAFIIGeant4Selector(name="ISF_ChargedKaonAFIIGeant4Selector", **kwargs): + kwargs.setdefault('MaxMom' , 750) kwargs.setdefault('ParticlePDG' , 321) - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_AFIIGeant4SimSvc') - kwargs.setdefault('SimulationFlavor', SimulationFlavor.Geant4) - return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) + return getKinematicAFIIGeant4Selector(name, **kwargs) -def getChargedKaonG4FastCalo_QS_Geant4Selector(name="ISF_ChargedKaonG4FastCalo_QS_Geant4Selector", **kwargs): +def getChargedKaonATLFAST3Geant4Selector(name="ISF_ChargedKaonATLFAST3Geant4Selector", **kwargs): kwargs.setdefault('MaxEkin' , 400) kwargs.setdefault('ParticlePDG' , 321) - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_AFII_QS_Geant4SimSvc') - return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) + return getKinematicAFIIGeant4Selector(name, **kwargs) -def getKLongG4FastCaloGeant4Selector(name="ISF_KLongG4FastCaloGeant4Selector", **kwargs): - kwargs.setdefault('MaxEkin' , 400) - kwargs.setdefault('ParticlePDG' , 130) - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_AFIIGeant4SimSvc') - kwargs.setdefault('SimulationFlavor', SimulationFlavor.Geant4) - return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) - -def getKLongG4FastCalo_QS_Geant4Selector(name="ISF_KLongG4FastCalo_QS_Geant4Selector", **kwargs): - kwargs.setdefault('MaxEkin' , 400) - kwargs.setdefault('ParticlePDG' , 130) - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_AFII_QS_Geant4SimSvc') - return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) - -def getPionAFII_QS_Geant4Selector(name="ISF_PionAFII_QS_Geant4Selector", **kwargs): - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_AFII_QS_Geant4SimSvc') - return getPionAFIIGeant4Selector(name, **kwargs) - -def getChargedKaonAFIIGeant4Selector(name="ISF_ChargedKaonAFIIGeant4Selector", **kwargs): +def getChargedKaonAFII_QS_Geant4Selector(name="ISF_ChargedKaonAFII_QS_Geant4Selector", **kwargs): kwargs.setdefault('MaxMom' , 750) kwargs.setdefault('ParticlePDG' , 321) - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_AFIIGeant4SimSvc') - kwargs.setdefault('SimulationFlavor', SimulationFlavor.Geant4) - return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) + return getKinematicAFII_QS_Geant4Selector(name, **kwargs) -def getChargedKaonAFII_QS_Geant4Selector(name="ISF_ChargedKaonAFII_QS_Geant4Selector", **kwargs): - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_AFII_QS_Geant4SimSvc') - return getChargedKaonAFIIGeant4Selector(name, **kwargs) +def getChargedKaonATLFAST3_QS_Geant4Selector(name="ISF_ChargedKaonATLFAST3_QS_Geant4Selector", **kwargs): + kwargs.setdefault('MaxEkin' , 400) + kwargs.setdefault('ParticlePDG' , 321) + return getKinematicAFII_QS_Geant4Selector(name, **kwargs) +# KLongs def getKLongAFIIGeant4Selector(name="ISF_KLongAFIIGeant4Selector", **kwargs): kwargs.setdefault('MaxMom' , 750) kwargs.setdefault('ParticlePDG' , 130) - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_AFIIGeant4SimSvc') - kwargs.setdefault('SimulationFlavor', SimulationFlavor.Geant4) - return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) + return getKinematicAFIIGeant4Selector(name, **kwargs) + +def getKLongATLFAST3Geant4Selector(name="ISF_KLongATLFAST3Geant4Selector", **kwargs): + kwargs.setdefault('MaxEkin' , 400) + kwargs.setdefault('ParticlePDG' , 130) + return getKinematicAFIIGeant4Selector(name, **kwargs) def getKLongAFII_QS_Geant4Selector(name="ISF_KLongAFII_QS_Geant4Selector", **kwargs): - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_AFII_QS_Geant4SimSvc') - return getKLongAFIIGeant4Selector(name, **kwargs) + kwargs.setdefault('MaxMom' , 750) + kwargs.setdefault('ParticlePDG' , 130) + return getKinematicAFII_QS_Geant4Selector(name, **kwargs) -def getMuonSelector(name="ISF_MuonSelector", **kwargs): - kwargs.setdefault('ParticlePDG' , 13) - return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) +def getKLongATLFAST3_QS_Geant4Selector(name="ISF_KLongATLFAST3_QS_Geant4Selector", **kwargs): + kwargs.setdefault('MaxEkin' , 400) + kwargs.setdefault('ParticlePDG' , 130) + return getKinematicAFII_QS_Geant4Selector(name, **kwargs) +# Muons def getMuonGeant4Selector(name="ISF_MuonGeant4Selector", **kwargs): - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_Geant4SimSvc') - kwargs.setdefault('SimulationFlavor', SimulationFlavor.Geant4) - return getMuonSelector(name, **kwargs) + kwargs.setdefault('ParticlePDG' , 13) + return getKinematicGeant4Selector(name, **kwargs) def getMuonAFIIGeant4Selector(name="ISF_MuonAFIIGeant4Selector", **kwargs): - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_AFIIGeant4SimSvc') - kwargs.setdefault('SimulationFlavor', SimulationFlavor.Geant4) - return getMuonGeant4Selector(name, **kwargs) + kwargs.setdefault('ParticlePDG' , 13) + return getKinematicAFIIGeant4Selector(name, **kwargs) def getMuonAFII_QS_Geant4Selector(name="ISF_MuonAFII_QS_Geant4Selector", **kwargs): - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_AFII_QS_Geant4SimSvc') - return getMuonGeant4Selector(name, **kwargs) + kwargs.setdefault('ParticlePDG' , 13) + return getKinematicAFII_QS_Geant4Selector(name, **kwargs) def getMuonFatrasSelector(name="ISF_MuonFatrasSelector", **kwargs): - kwargs.setdefault('Simulator' , 'ISF_FatrasSimSvc') - kwargs.setdefault('SimulationFlavor', SimulationFlavor.Fatras) - return getMuonSelector(name, **kwargs) - -def getMuonFatrasPileupSelector(name="ISF_MuonFatrasPileupSelector", **kwargs): - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_FatrasPileupSimSvc') - kwargs.setdefault("PileupBCID" , [1]) kwargs.setdefault('ParticlePDG' , 13) - kwargs.setdefault('SimulationFlavor', SimulationFlavor.Fatras) - return getPileupSimSelector(name, **kwargs) + return getKinematicFatrasSelector(name, **kwargs) +# General Eta-based selectors def getWithinEta5FastCaloSimSelector(name="ISF_WithinEta5FastCaloSimSelector", **kwargs): - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_FastCaloSimSvc') kwargs.setdefault('MinPosEta' , -5.0 ) kwargs.setdefault('MaxPosEta' , 5.0 ) - kwargs.setdefault('SimulationFlavor', SimulationFlavor.FastCaloSim) - return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) + return getKinematicFastCaloSimSelector(name, **kwargs) def getEtaGreater5ParticleKillerSimSelector(name="ISF_EtaGreater5ParticleKillerSimSelector", **kwargs): - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_ParticleKillerSvc') kwargs.setdefault('MinPosEta' , -5.0 ) kwargs.setdefault('MaxPosEta' , 5.0 ) kwargs.setdefault('InvertCuts' , True ) - kwargs.setdefault('SimulationFlavor', SimulationFlavor.ParticleKiller) - return CfgMgr.ISF__KinematicSimSelector(name, **kwargs) - -def getEtaGreater5PileupParticleKillerSimSelector(name="ISF_EtaGreater5PileupParticleKillerSimSelector", **kwargs): - if usesSimKernelMT(): - kwargs.setdefault('Simulator', '') - kwargs.setdefault('Simulator' , 'ISF_ParticleKillerSvc') - kwargs.setdefault('MinPosEta' , -5.0 ) - kwargs.setdefault('MaxPosEta' , 5.0 ) - kwargs.setdefault('InvertCuts' , True ) - kwargs.setdefault('SimulationFlavor', SimulationFlavor.ParticleKiller) - return CfgMgr.ISF__KinematicPileupSimSelector(name, **kwargs) + return getKinematicParticleKillerSimSelector(name, **kwargs) ### ConeSimSelector Configurations diff --git a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigDb.py b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigDb.py index 1fe40c6f54530cbd6381b3c2f6050552f8d3eac6..f22f47f81323e79f26dc5e37016cb7bc2522398b 100644 --- a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigDb.py +++ b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigDb.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration """ Configuration database for ISF_SimulationSelectors Elmar Ritsch, 10/11/2014 @@ -12,16 +12,16 @@ addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getMuonGeant4Sele addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getProtonAFIIGeant4Selector" , "ISF_ProtonAFIIGeant4Selector" ) addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getProtonAFII_QS_Geant4Selector" , "ISF_ProtonAFII_QS_Geant4Selector" ) addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getPionAFIIGeant4Selector" , "ISF_PionAFIIGeant4Selector" ) -addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getPionG4FastCaloGeant4Selector" , "ISF_PionG4FastCaloGeant4Selector" ) -addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getPionG4FastCalo_QS_Geant4Selector" , "ISF_PionG4FastCalo_QS_Geant4Selector" ) -addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getProtonG4FastCaloGeant4Selector" , "ISF_ProtonG4FastCaloGeant4Selector" ) -addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getProtonG4FastCalo_QS_Geant4Selector" , "ISF_ProtonG4FastCalo_QS_Geant4Selector" ) -addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getNeutronG4FastCaloGeant4Selector" , "ISF_NeutronG4FastCaloGeant4Selector" ) -addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getNeutronG4FastCalo_QS_Geant4Selector" , "ISF_NeutronG4FastCalo_QS_Geant4Selector" ) -addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getChargedKaonG4FastCaloGeant4Selector" , "ISF_ChargedKaonG4FastCaloGeant4Selector" ) -addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getChargedKaonG4FastCalo_QS_Geant4Selector", "ISF_ChargedKaonG4FastCalo_QS_Geant4Selector" ) -addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getKLongG4FastCaloGeant4Selector" , "ISF_KLongG4FastCaloGeant4Selector" ) -addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getKLongG4FastCalo_QS_Geant4Selector" , "ISF_KLongG4FastCalo_QS_Geant4Selector" ) +addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getPionATLFAST3Geant4Selector" , "ISF_PionATLFAST3Geant4Selector" ) +addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getPionATLFAST3_QS_Geant4Selector" , "ISF_PionATLFAST3_QS_Geant4Selector" ) +addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getProtonATLFAST3Geant4Selector" , "ISF_ProtonATLFAST3Geant4Selector" ) +addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getProtonATLFAST3_QS_Geant4Selector" , "ISF_ProtonATLFAST3_QS_Geant4Selector" ) +addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getNeutronATLFAST3Geant4Selector" , "ISF_NeutronATLFAST3Geant4Selector" ) +addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getNeutronATLFAST3_QS_Geant4Selector" , "ISF_NeutronATLFAST3_QS_Geant4Selector" ) +addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getChargedKaonATLFAST3Geant4Selector" , "ISF_ChargedKaonATLFAST3Geant4Selector" ) +addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getChargedKaonATLFAST3_QS_Geant4Selector", "ISF_ChargedKaonATLFAST3_QS_Geant4Selector" ) +addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getKLongATLFAST3Geant4Selector" , "ISF_KLongATLFAST3Geant4Selector" ) +addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getKLongATLFAST3_QS_Geant4Selector" , "ISF_KLongATLFAST3_QS_Geant4Selector" ) addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getPionAFII_QS_Geant4Selector" , "ISF_PionAFII_QS_Geant4Selector" ) addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getChargedKaonAFIIGeant4Selector" , "ISF_ChargedKaonAFIIGeant4Selector" ) addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getChargedKaonAFII_QS_Geant4Selector" , "ISF_ChargedKaonAFII_QS_Geant4Selector" ) diff --git a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigNew.py b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigNew.py index 768de860c276e602af6d464a6d62e87624726036..12f56630844cb68ea7d7c7de46c77dce08d78a7f 100644 --- a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigNew.py +++ b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigNew.py @@ -181,7 +181,7 @@ def DefaultParametricSimulationSelectorCfg(flags, name="ISF_DefaultParametricSim # PileUpSimSelector Configurations -def PileupSimSelectorCfg(flags, name="ISF_PileupSimSelector", **kwargs): +def PileupSimSelectorCfg(flags, name="DONOTUSEDIRECTLY", **kwargs): acc = ComponentAccumulator() acc.setPrivateTools(CompFactory.ISF.KinematicPileupSimSelector(name, **kwargs)) return acc @@ -203,18 +203,6 @@ def FatrasPileupSelectorCfg(flags, name="ISF_FatrasPileupSelector", **kwargs): # due to missing getter for Simulator "ISF_FatrasPileupSimSvc_noHits" -def FastCaloSimPileupSelectorCfg(flags, name="ISF_FastCaloSimPileupSelector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("PileupBCID" , flags.Sim.FastChain.BCID) - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(FastCaloSimPileupSvcCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_FastCaloSimPileupSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSimPileup) - tool = acc.popToolsAndMerge(PileupSimSelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) - return acc - - def FastCaloSimPileupOTSelectorCfg(flags, name="ISF_FastCaloSimPileupOTSelector", **kwargs): acc = ComponentAccumulator() kwargs.setdefault("PileupBCID", flags.Sim.FastChain.BCID) @@ -227,512 +215,263 @@ def FastCaloSimPileupOTSelectorCfg(flags, name="ISF_FastCaloSimPileupOTSelector" return acc -# KinematicSimSelector Configurations -def ElectronGeant4SelectorCfg(flags, name="ISF_ElectronGeant4Selector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("ParticlePDG", 11) - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(Geant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) - return acc - - -def NeutralGeant4SelectorCfg(flags, name="ISF_NeutralGeant4Selector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("Charge", 0) - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(Geant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) - return acc - - -def ProtonAFIIGeant4SelectorCfg(flags, name="ISF_ProtonAFIIGeant4Selector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("MaxMom", 750) - kwargs.setdefault("ParticlePDG", 2212) - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(AFIIGeant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) - return acc - - -def ProtonAFII_QS_Geant4SelectorCfg(flags, name="ISF_ProtonAFII_QS_Geant4Selector", **kwargs): - acc = ComponentAccumulator() - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(AFII_QS_Geant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc")) - tool = acc.popToolsAndMerge(ProtonAFIIGeant4SelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) - return acc - - -def PionAFIIGeant4SelectorCfg(flags, name="ISF_PionAFIIGeant4Selector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("MaxMom", 200) - kwargs.setdefault("ParticlePDG", 211) - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(AFIIGeant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) - return acc - - -def PionG4FastCaloGeant4Selector(flags, name="ISF_PionG4FastCaloGeant4Selector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("MaxEkin", 200) - kwargs.setdefault("ParticlePDG", 211) - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(AFIIGeant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) - return acc - - -def ProtonG4FastCaloGeant4Selector(flags, name="ISF_ProtonG4FastCaloGeant4Selector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("MaxEkin", 400) - kwargs.setdefault("ParticlePDG", 2212) - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(AFIIGeant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) - return acc - - -def NeutronG4FastCaloGeant4Selector(flags, name="ISF_NeutronG4FastCaloGeant4Selector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("MaxEkin", 400) - kwargs.setdefault("ParticlePDG", 2112) - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(AFIIGeant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) - return acc - - -def ChargedKaonG4FastCaloGeant4Selector(flags, name="ISF_ChargedKaonG4FastCaloGeant4Selector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("MaxEkin", 400) - kwargs.setdefault("ParticlePDG", 321) - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(AFIIGeant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) - return acc - - -def KLongG4FastCaloGeant4Selector(flags, name="ISF_KLongG4FastCaloGeant4Selector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("MaxEkin", 400) - kwargs.setdefault("ParticlePDG", 130) - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(AFIIGeant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) - return acc - - -def PionAFII_QS_Geant4SelectorCfg(flags, name="ISF_PionAFII_QS_Geant4Selector", **kwargs): +def MuonFatrasPileupSelectorCfg(flags, name="ISF_MuonFatrasPileupSelector", **kwargs): acc = ComponentAccumulator() if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(AFII_QS_Geant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc")) - tool = acc.popToolsAndMerge(PionAFIIGeant4SelectorCfg(flags, name, **kwargs)) + acc.merge(fatrasPileupSimServiceIDCfg(flags)) + kwargs.setdefault("Simulator", acc.getService("ISF_FatrasPileupSimSvc")) + kwargs.setdefault("PileupBCID", [1]) + kwargs.setdefault("ParticlePDG", 13) + kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras) + tool = acc.popToolsAndMerge(PileupSimSelectorCfg(flags, name, **kwargs)) acc.setPrivateTools(tool) return acc -def ChargedKaonAFIIGeant4SelectorCfg(flags, name="ISF_ChargedKaonAFIIGeant4Selector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("MaxMom", 750) - kwargs.setdefault("ParticlePDG", 321) - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(AFIIGeant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) - return acc - - -def ChargedKaonAFII_QS_Geant4SelectorCfg(flags, name="ISF_ChargedKaonAFII_QS_Geant4Selector", **kwargs): +def EtaGreater5PileupParticleKillerSimSelectorCfg(flags, name="ISF_EtaGreater5PileupParticleKillerSimSelector", **kwargs): acc = ComponentAccumulator() if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(AFII_QS_Geant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc")) - tool = acc.popToolsAndMerge(ChargedKaonAFIIGeant4SelectorCfg(flags, name, **kwargs)) + acc.merge(ParticleKillerSvcCfg(flags)) + kwargs.setdefault("Simulator", acc.getService("ISF_ParticleKillerSvc")) + kwargs.setdefault("MinPosEta", -5.0) + kwargs.setdefault("MaxPosEta", 5.0) + kwargs.setdefault("InvertCuts", True) + kwargs.setdefault("SimulationFlavor", SimulationFlavor.ParticleKiller) + tool = acc.popToolsAndMerge(PileupSimSelectorCfg(flags, name, **kwargs)) acc.setPrivateTools(tool) return acc -def KLongAFIIGeant4SelectorCfg(flags, name="ISF_KLongAFIIGeant4Selector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("MaxMom", 750) - kwargs.setdefault("ParticlePDG", 130) - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(AFIIGeant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) - return acc - - -def KLongAFII_QS_Geant4SelectorCfg(flags, name="ISF_KLongAFII_QS_Geant4Selector", **kwargs): +def FastCaloSimPileupSelectorCfg(flags, name="ISF_FastCaloSimPileupSelector", **kwargs): acc = ComponentAccumulator() + kwargs.setdefault("PileupBCID" , flags.Sim.FastChain.BCID) if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(AFII_QS_Geant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc")) - tool = acc.popToolsAndMerge(KLongAFIIGeant4SelectorCfg(flags, name, **kwargs)) + acc.merge(FastCaloSimPileupSvcCfg(flags)) + kwargs.setdefault("Simulator", acc.getService("ISF_FastCaloSimPileupSvc")) + kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSimPileup) + tool = acc.popToolsAndMerge(PileupSimSelectorCfg(flags, name, **kwargs)) acc.setPrivateTools(tool) return acc -def MuonSelectorCfg(flags, name="ISF_MuonSelector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("ParticlePDG", 13) - acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) - return acc - +### KinematicSimSelector Configurations -def MuonGeant4SelectorCfg(flags, name="ISF_MuonGeant4Selector", **kwargs): +# BASE METHODS +def BaseKinematicGeant4SelectorCfg(flags, name="DONOTUSEDIRECTLY", **kwargs): acc = ComponentAccumulator() if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: acc.merge(Geant4SimCfg(flags)) kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc")) kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - tool = acc.popToolsAndMerge(MuonSelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) + acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) return acc -def MuonAFIIGeant4SelectorCfg(flags, name="ISF_MuonAFIIGeant4Selector", **kwargs): +def BaseKinematicAFIIGeant4SelectorCfg(flags, name="DONOTUSEDIRECTLY", **kwargs): acc = ComponentAccumulator() if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: acc.merge(AFIIGeant4SimCfg(flags)) kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc")) kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - tool = acc.popToolsAndMerge(MuonGeant4SelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) + acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) return acc -def MuonAFII_QS_Geant4SelectorCfg(flags, name="ISF_MuonAFII_QS_Geant4Selector", **kwargs): +def BaseKinematicAFII_QS_Geant4SelectorCfg(flags, name="DONOTUSEDIRECTLY", **kwargs): acc = ComponentAccumulator() if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: acc.merge(AFII_QS_Geant4SimCfg(flags)) kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc")) - tool = acc.popToolsAndMerge(MuonGeant4SelectorCfg(flags, name, **kwargs)) + tool = acc.popToolsAndMerge(BaseKinematicAFIIGeant4SelectorCfg(flags, name, **kwargs)) acc.setPrivateTools(tool) return acc -def MuonFatrasSelectorCfg(flags, name="ISF_MuonFatrasSelector", **kwargs): +def BaseKinematicFatrasSelectorCfg(flags, name="DONOTUSEDIRECTLY", **kwargs): acc = ComponentAccumulator() if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: acc.merge(fatrasSimServiceIDCfg(flags)) kwargs.setdefault("Simulator", acc.getService("ISF_FatrasSimSvc")) kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras) - tool = acc.popToolsAndMerge(MuonSelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) - return acc - - -def MuonFatrasPileupSelectorCfg(flags, name="ISF_MuonFatrasPileupSelector", **kwargs): - acc = ComponentAccumulator() - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(fatrasPileupSimServiceIDCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_FatrasPileupSimSvc")) - kwargs.setdefault("PileupBCID", [1]) - kwargs.setdefault("ParticlePDG", 13) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras) - tool = acc.popToolsAndMerge(PileupSimSelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) + acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) return acc -def WithinEta5FastCaloSimSelectorCfg(flags, name="ISF_WithinEta5FastCaloSimSelector", **kwargs): +def BaseKinematicFastCaloSimSelectorCfg(flags, name="DONOTUSEDIRECTLY", **kwargs): acc = ComponentAccumulator() if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: acc.merge(FastCaloSimSvcCfg(flags)) kwargs.setdefault("Simulator", acc.getService("ISF_FastCaloSimSvc")) - kwargs.setdefault("MinPosEta", -5.0) - kwargs.setdefault("MaxPosEta", 5.0) kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSim) acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) return acc -def EtaGreater5ParticleKillerSimSelectorCfg(flags, name="ISF_EtaGreater5ParticleKillerSimSelector", **kwargs): +def BaseKinematicParticleKillerSimSelectorCfg(flags, name="DONOTUSEDIRECTLY", **kwargs): acc = ComponentAccumulator() if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: acc.merge(ParticleKillerSvcCfg(flags)) kwargs.setdefault("Simulator", acc.getService("ISF_ParticleKillerSvc")) - kwargs.setdefault("MinPosEta", -5.0) - kwargs.setdefault("MaxPosEta", 5.0) - kwargs.setdefault("InvertCuts", True) kwargs.setdefault("SimulationFlavor", SimulationFlavor.ParticleKiller) acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs)) return acc -def EtaGreater5PileupParticleKillerSimSelectorCfg(flags, name="ISF_EtaGreater5PileupParticleKillerSimSelector", **kwargs): - acc = ComponentAccumulator() - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(ParticleKillerSvcCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_ParticleKillerSvc")) - kwargs.setdefault("MinPosEta", -5.0) - kwargs.setdefault("MaxPosEta", 5.0) - kwargs.setdefault("InvertCuts", True) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.ParticleKiller) - acc.setPrivateTools(CompFactory.ISF.KinematicPileupSimSelector(name, **kwargs)) - return acc +# Electrons +def ElectronGeant4SelectorCfg(flags, name="ISF_ElectronGeant4Selector", **kwargs): + kwargs.setdefault("ParticlePDG", 11) + return BaseKinematicGeant4SelectorCfg(flags, name, **kwargs) -# ConeSimSelector Configurations -def PhotonConeSelectorCfg(flags, name="ISF_PhotonConeSelector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("ConeCreatorPDGs", [22]) # photons - kwargs.setdefault("ConeCreatorMinPt", 20.*GeV) - kwargs.setdefault("ConeSize", 0.6) - kwargs.setdefault("CheckConeCreatorAncestors", False) - acc.setPrivateTools(CompFactory.ISF.ConeSimSelector(name, **kwargs)) - return acc +#Neutrals +def NeutralGeant4SelectorCfg(flags, name="ISF_NeutralGeant4Selector", **kwargs): + kwargs.setdefault("Charge", 0) + return BaseKinematicGeant4SelectorCfg(flags, name, **kwargs) -def PhotonConeFatrasSelectorCfg(flags, name="ISF_PhotonConeFatrasSelector", **kwargs): - acc = ComponentAccumulator() - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(fatrasSimServiceIDCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_FatrasSimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras) - tool = acc.popToolsAndMerge(PhotonConeSelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) - return acc +#Protons +def ProtonAFIIGeant4SelectorCfg(flags, name="ISF_ProtonAFIIGeant4Selector", **kwargs): + kwargs.setdefault("MaxMom", 750) + kwargs.setdefault("ParticlePDG", 2212) + return BaseKinematicAFIIGeant4SelectorCfg(flags, name, **kwargs) -def PhotonConeGeant4SelectorCfg(flags, name="ISF_PhotonConeGeant4Selector", **kwargs): - acc = ComponentAccumulator() - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(Geant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - tool = acc.popToolsAndMerge(PhotonConeSelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) - return acc +def ProtonATLFAST3Geant4SelectorCfg(flags, name="ISF_ProtonATLFAST3Geant4Selector", **kwargs): + kwargs.setdefault("MaxEkin", 400) + kwargs.setdefault("ParticlePDG", 2212) + return BaseKinematicAFIIGeant4SelectorCfg(flags, name, **kwargs) -def HiggsLeptonsConeSimSelectorCfg(flags, name="ISF_HiggsLeptonsConeSimSelector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("ConeCreatorPDGs", [11, 13]) # e, mu - kwargs.setdefault("ConeCreatorMinPt", 0.) - kwargs.setdefault("ConeSize", 0.4) - kwargs.setdefault("CheckConeCreatorAncestors", True) - kwargs.setdefault("ConeCreatorAncestor", [24, 23]) # W , Z - # see HepMC manual for HepMC::GenVertex::particle iterator - # 0=parents, 1=family, 2=ancestors, 3=relatives - kwargs.setdefault("ConeCreatorAncestorRelation", 1) - acc.setPrivateTools(CompFactory.ISF.ConeSimSelector(name, **kwargs)) - return acc +def ProtonAFII_QS_Geant4SelectorCfg(flags, name="ISF_ProtonAFII_QS_Geant4Selector", **kwargs): + kwargs.setdefault("MaxMom", 750) + kwargs.setdefault("ParticlePDG", 2212) + return BaseKinematicAFII_QS_Geant4SelectorCfg(flags, name, **kwargs) -def HiggsLeptonsConeGeant4SelectorCfg(flags, name="ISF_HiggsLeptonsConeGeant4Selector", **kwargs): - acc = ComponentAccumulator() - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(Geant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - tool = acc.popToolsAndMerge(HiggsLeptonsConeSimSelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) - return acc +def ProtonATLFAST3_QS_Geant4SelectorCfg(flags, name="ISF_ProtonATLFAST3_QS_Geant4Selector", **kwargs): + kwargs.setdefault("MaxEkin", 400) + kwargs.setdefault("ParticlePDG", 2212) + return BaseKinematicAFII_QS_Geant4SelectorCfg(flags, name, **kwargs) -def ElectronsMuonsConeSimSelectorCfg(flags, name="ISF_ElectronsMuonsConeSimSelector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("ConeCreatorPDGs", [11, 13]) # e, mu - acc.setPrivateTools(CompFactory.ISF.ConeSimSelector(name, **kwargs)) - return acc +#Pions +def PionAFIIGeant4SelectorCfg(flags, name="ISF_PionAFIIGeant4Selector", **kwargs): + kwargs.setdefault("MaxMom", 200) + kwargs.setdefault("ParticlePDG", 211) + return BaseKinematicAFIIGeant4SelectorCfg(flags, name, **kwargs) -def HiggsLeptonsConeGeant4CaloSelectorCfg(flags, name="ISF_HiggsLeptonsConeGeant4CaloSelector", **kwargs): - kwargs.setdefault("ExtrapolateToCaloEntry", True) - kwargs.setdefault("Extrapolator", "ISF_CaloEntryTrkExtrapolator") - return HiggsLeptonsConeGeant4SelectorCfg(flags, name, **kwargs) +def PionATLFAST3Geant4SelectorCfg(flags, name="ISF_PionATLFAST3Geant4Selector", **kwargs): + kwargs.setdefault("MaxEkin", 200) + kwargs.setdefault("ParticlePDG", 211) + return BaseKinematicAFIIGeant4SelectorCfg(flags, name, **kwargs) -def WLeptonsConeGeant4SelectorCfg(flags, name="ISF_WLeptonsConeGeant4Selector", **kwargs): - acc = ComponentAccumulator() - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(Geant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - kwargs.setdefault("ConeCreatorMinPt", 0.) - kwargs.setdefault("ConeSize", 0.4) - kwargs.setdefault("CheckConeCreatorAncestors", True) - kwargs.setdefault("ConeCreatorAncestor", [24]) # W - # see HepMC manual for HepMC::GenVertex::particle iterator - # 0=parents, 1=family, 2=ancestors, 3=relatives - kwargs.setdefault("ConeCreatorAncestorRelation", 0) - tool = acc.popToolsAndMerge(ElectronsMuonsConeSimSelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) - return acc +def PionAFII_QS_Geant4SelectorCfg(flags, name="ISF_PionAFII_QS_Geant4Selector", **kwargs): + kwargs.setdefault("MaxEkin", 200) + kwargs.setdefault("ParticlePDG", 211) + return BaseKinematicAFII_QS_Geant4SelectorCfg(flags, name, **kwargs) -def ZLeptonsDirectionConeGeant4SelectorCfg(flags, name="ISF_ZLeptonsDirectionConeGeant4Selector", **kwargs): - # this selector picks all particles with a mometum direction - # within DeltaR<ConeSize relative to the Z decay lepton directions - acc = ComponentAccumulator() - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(Geant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - kwargs.setdefault("ConeCreatorMinPt", 0.) - kwargs.setdefault("ConeSize", 0.4) - kwargs.setdefault("CheckConeCreatorAncestors", True) - kwargs.setdefault("ConeCreatorAncestor", [23]) # Z - # see HepMC manual for HepMC::GenVertex::particle iterator - # 0=parents, 1=family, 2=ancestors, 3=relatives - kwargs.setdefault("ConeCreatorAncestorRelation", 0) - tool = acc.popToolsAndMerge(ElectronsMuonsConeSimSelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) - return acc +def PionATLFAST3_QS_Geant4SelectorCfg (flags, name="ISF_PionATLFAST3_QS_Geant4Selector", **kwargs): + kwargs.setdefault("MaxEkin", 200) + kwargs.setdefault("ParticlePDG", 211) + return BaseKinematicAFII_QS_Geant4SelectorCfg(flags, name, **kwargs) + + +# Neutrons +def NeutronATLFAST3Geant4SelectorCfg(flags, name="ISF_NeutronATLFAST3Geant4Selector", **kwargs): + kwargs.setdefault("MaxEkin", 400) + kwargs.setdefault("ParticlePDG", 2112) + return BaseKinematicAFIIGeant4SelectorCfg(flags, name, **kwargs) -def ZLeptonsPositionConeGeant4SelectorCfg(flags, name="ISF_ZLeptonsPositionConeGeant4Selector", **kwargs): - # this selector picks all particles with a position inside a cone - # around the Z decay leptons directions - kwargs.setdefault("CheckParticlePosition", True) - return ZLeptonsDirectionConeGeant4SelectorCfg(flags, name, **kwargs) +def NeutronATLFAST3_QS_Geant4SelectorCfg(flags, name="ISF_NeutronATLFAST3_QS_Geant4Selector", **kwargs): + kwargs.setdefault("MaxEkin", 400) + kwargs.setdefault("ParticlePDG", 2112) + return BaseKinematicAFII_QS_Geant4SelectorCfg(flags, name, **kwargs) -def JPsiLeptonsConeGeant4SelectorCfg(flags, name="ISF_JPsiLeptonsConeGeant4Selector", **kwargs): - acc = ComponentAccumulator() - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(Geant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - kwargs.setdefault("ConeCreatorMinPt", 0.) - kwargs.setdefault("ConeSize", 0.4) - kwargs.setdefault("CheckConeCreatorAncestors", True) - kwargs.setdefault("ConeCreatorAncestor", [443]) # J/Psi - # see HepMC manual for HepMC::GenVertex::particle iterator - # 0=parents, 1=family, 2=ancestors, 3=relatives - kwargs.setdefault("ConeCreatorAncestorRelation", 0) - tool = acc.popToolsAndMerge(ElectronsMuonsConeSimSelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) - return acc +# Charged Kaons +def ChargedKaonAFIIGeant4SelectorCfg(flags, name="ISF_ChargedKaonAFIIGeant4Selector", **kwargs): + kwargs.setdefault("MaxMom", 750) + kwargs.setdefault("ParticlePDG", 321) + return BaseKinematicAFIIGeant4SelectorCfg(flags, name, **kwargs) -# TruthAssocSimSelector configurations -def BHadronProductsSimSelectorCfg(flags, name="ISF_BHadronProductsSimSelector", **kwargs): - acc = ComponentAccumulator() - B_hadrons = [ - 511, 521, 531, 541, - 5122, 5112, 5132, - 5232, 5212, 5222 - ] - kwargs.setdefault("RelativesPDGCode", B_hadrons) - # see HepMC manual for HepMC::GenVertex::particle iterator - # 0=parents, 1=family, 2=ancestors, 3=relatives - kwargs.setdefault("Relation", 2) - acc.setPrivateTools(CompFactory.ISF.TruthAssocSimSelector(name, **kwargs)) - return acc +def ChargedKaonATLFAST3Geant4SelectorCfg(flags, name="ISF_ChargedKaonATLFAST3Geant4Selector", **kwargs): + kwargs.setdefault("MaxEkin", 400) + kwargs.setdefault("ParticlePDG", 321) + return BaseKinematicAFIIGeant4SelectorCfg(flags, name, **kwargs) -def BHadronProductsGeant4SelectorCfg(flags, name="ISF_BHadronProductsGeant4Selector", **kwargs): - acc = ComponentAccumulator() - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(Geant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - tool = acc.popToolsAndMerge(BHadronProductsSimSelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) - return acc +def ChargedKaonAFII_QS_Geant4SelectorCfg(flags, name="ISF_ChargedKaonAFII_QS_Geant4Selector", **kwargs): + kwargs.setdefault("MaxMom", 750) + kwargs.setdefault("ParticlePDG", 321) + return BaseKinematicAFII_QS_Geant4SelectorCfg(flags, name, **kwargs) -def BHadronProductsFatrasSelectorCfg(flags, name="ISF_BHadronProductsFatrasSelector", **kwargs): - acc = ComponentAccumulator() - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(fatrasSimServiceIDCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISF_FatrasSimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras) - tool = acc.popToolsAndMerge(BHadronProductsSimSelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) - return acc +def ChargedKaonATLFAST3_QS_Geant4SelectorCfg(flags, name="ISF_ChargedKaonATLFAST3_QS_Geant4Selector", **kwargs): + kwargs.setdefault("MaxEkin", 400) + kwargs.setdefault("ParticlePDG", 321) + return BaseKinematicAFII_QS_Geant4SelectorCfg(flags, name, **kwargs) -def TauProductsSimSelectorCfg(flags, name="ISF_TauProductsSimSelector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("RelativesPDGCode", [15]) # tau - # see HepMC manual for HepMC::GenVertex::particle iterator - # 0=parents, 1=family, 2=ancestors, 3=relatives - kwargs.setdefault("Relation", 0) - acc.setPrivateTools(CompFactory.ISF.TruthAssocSimSelector(name, **kwargs)) - return acc +# KLongs +def KLongAFIIGeant4SelectorCfg(flags, name="ISF_KLongAFIIGeant4Selector", **kwargs): + kwargs.setdefault("MaxMom", 750) + kwargs.setdefault("ParticlePDG", 130) + return BaseKinematicAFIIGeant4SelectorCfg(flags, name, **kwargs) -def TauProductsGeant4SelectorCfg(flags, name="ISF_TauProductsGeant4Selector", **kwargs): - acc = ComponentAccumulator() - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(Geant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - tool = acc.popToolsAndMerge(TauProductsSimSelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) - return acc +def KLongATLFAST3Geant4SelectorCfg(flags, name="ISF_KLongATLFAST3Geant4Selector", **kwargs): + kwargs.setdefault("MaxEkin", 400) + kwargs.setdefault("ParticlePDG", 130) + return BaseKinematicAFIIGeant4SelectorCfg(flags, name, **kwargs) -def ZProductsSimSelectorCfg(flags, name="ISF_ZProductsSimSelector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("RelativesPDGCode", [23]) # Z - # see HepMC manual for HepMC::GenVertex::particle iterator - # 0=parents, 1=family, 2=ancestors, 3=relatives - kwargs.setdefault("Relation", 0) - acc.setPrivateTools(CompFactory.ISF.TruthAssocSimSelector(name, **kwargs)) - return acc +def KLongAFII_QS_Geant4SelectorCfg(flags, name="ISF_KLongAFII_QS_Geant4Selector", **kwargs): + kwargs.setdefault("MaxMom", 750) + kwargs.setdefault("ParticlePDG", 130) + return BaseKinematicAFII_QS_Geant4SelectorCfg(flags, name, **kwargs) -def ZProductsGeant4SelectorCfg(flags, name="ISF_ZProductsGeant4Selector", **kwargs): - acc = ComponentAccumulator() - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(Geant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - tool = acc.popToolsAndMerge(ZProductsSimSelectorCfg(flags, name, **kwargs)) - acc.setPrivateTools(tool) - return acc +def KLongATLFAST3_QS_Geant4SelectorCfg(flags, name="ISF_KLongATLFAST3_QS_Geant4Selector", **kwargs): + kwargs.setdefault('MaxEkin' , 400) + kwargs.setdefault('ParticlePDG' , 130) + return BaseKinematicAFII_QS_Geant4SelectorCfg(flags, name, **kwargs) -# HistorySimSelector Configurations -def SubDetStickyGeant4SimSelectorCfg(flags, name="ISF_SubDetStickyGeant4SimSelector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("RequiresUnchangedGeoID", True) - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(Geant4SimCfg(flags)) - kwargs.setdefault("PrevSimSvc", acc.getService("ISFG4SimSvc")) - kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - acc.setPrivateTools(CompFactory.ISF.HistorySimSelector(name, **kwargs)) - return acc +#Muons +def MuonGeant4SelectorCfg(flags, name="ISF_MuonGeant4Selector", **kwargs): + kwargs.setdefault("ParticlePDG", 13) + return BaseKinematicGeant4SelectorCfg(flags, name, **kwargs) -def GlobalStickyGeant4SimSelectorCfg(flags, name="ISF_GlobalStickyGeant4SimSelector", **kwargs): - acc = ComponentAccumulator() - kwargs.setdefault("PrevSimSvc", acc.getService("ISFG4SimSvc")) - kwargs.setdefault("RequiresUnchangedGeoID", False) - if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator: - acc.merge(Geant4SimCfg(flags)) - kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc")) - kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4) - acc.setPrivateTools(CompFactory.ISF.HistorySimSelector(name, **kwargs)) - return acc +def MuonAFIIGeant4SelectorCfg(flags, name="ISF_MuonAFIIGeant4Selector", **kwargs): + kwargs.setdefault("ParticlePDG", 13) + return BaseKinematicAFIIGeant4SelectorCfg(flags, name, **kwargs) + + +def MuonAFII_QS_Geant4SelectorCfg(flags, name="ISF_MuonAFII_QS_Geant4Selector", **kwargs): + kwargs.setdefault("ParticlePDG", 13) + return BaseKinematicAFII_QS_Geant4SelectorCfg(flags, name, **kwargs) + + +def MuonFatrasSelectorCfg(flags, name="ISF_MuonFatrasSelector", **kwargs): + kwargs.setdefault("ParticlePDG", 13) + return BaseKinematicFatrasSelectorCfg(flags, name, **kwargs) + + +# General Eta-based selectors +def WithinEta5FastCaloSimSelectorCfg(flags, name="ISF_WithinEta5FastCaloSimSelector", **kwargs): + kwargs.setdefault('MinPosEta' , -5.0 ) + kwargs.setdefault('MaxPosEta' , 5.0 ) + return BaseKinematicFastCaloSimSelectorCfg(flags, name, **kwargs) + + +def EtaGreater5ParticleKillerSimSelectorCfg(flags, name="ISF_EtaGreater5ParticleKillerSimSelector", **kwargs): + kwargs.setdefault("MinPosEta", -5.0) + kwargs.setdefault("MaxPosEta", 5.0) + kwargs.setdefault("InvertCuts", True) + return BaseKinematicParticleKillerSimSelectorCfg(flags, name, **kwargs) diff --git a/Simulation/Tests/ISF_Validation/test/test_MC16_ATLFAST3_QS_ttbar.sh b/Simulation/Tests/ISF_Validation/test/test_MC16_ATLFAST3_QS_ttbar.sh new file mode 100755 index 0000000000000000000000000000000000000000..552801b0f9b558a204dd8e7d9324e8f2ca88fdbc --- /dev/null +++ b/Simulation/Tests/ISF_Validation/test/test_MC16_ATLFAST3_QS_ttbar.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# +# art-description: MC16-style simulation using ATLFAST3 +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# art-include: 21.9/Athena +# art-include: master/Athena +# art-type: grid +# art-output: test.HITS.pool.root +# art-output: truth.root + +# MC16 setup +# ATLAS-R2-2016-01-00-01 and OFLCOND-MC16-SDR-14 + +export ATHENA_PROC_NUMBER=4 + +Sim_tf.py \ +--conditionsTag 'default:OFLCOND-MC16-SDR-14' \ +--physicsList 'FTFP_BERT_ATL' \ +--truthStrategy 'MC15aPlus' \ +--simulator 'ATLFAST3_QS' \ +--postInclude 'default:PyJobTransforms/UseFrontier.py' \ +--preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' \ +--preExec 'EVNTtoHITS:simFlags.TightMuonStepping=True' \ +--DataRunNumber '284500' \ +--geometryVersion 'default:ATLAS-R2-2016-01-00-01' \ +--inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.evgen.EVNT.e4993.EVNT.08166201._000012.pool.root.1" \ +--outputHITSFile "test.HITS.pool.root" \ +--maxEvents 20 \ +--imf False + +rc=$? +rc2=-9999 +echo "art-result: $rc simulation" +if [ $rc -eq 0 ] +then + ArtPackage=$1 + ArtJobName=$2 + art.py compare grid --entries 4 ${ArtPackage} ${ArtJobName} --mode=semi-detailed + rc2=$? +fi + +echo "art-result: $rc2 regression" diff --git a/Simulation/Tests/ISF_Validation/test/test_MC16_ATLFAST3_ttbar.sh b/Simulation/Tests/ISF_Validation/test/test_MC16_ATLFAST3_ttbar.sh new file mode 100755 index 0000000000000000000000000000000000000000..affbacb5eb3fb3e3aab0466817efdc5ae439e859 --- /dev/null +++ b/Simulation/Tests/ISF_Validation/test/test_MC16_ATLFAST3_ttbar.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# +# art-description: MC16-style simulation using ATLFAST3 +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# art-include: 21.9/Athena +# art-include: master/Athena +# art-type: grid +# art-output: test.HITS.pool.root +# art-output: truth.root + +# MC16 setup +# ATLAS-R2-2016-01-00-01 and OFLCOND-MC16-SDR-14 + +export ATHENA_PROC_NUMBER=4 + +Sim_tf.py \ +--conditionsTag 'default:OFLCOND-MC16-SDR-14' \ +--physicsList 'FTFP_BERT_ATL' \ +--truthStrategy 'MC15aPlus' \ +--simulator 'ATLFAST3' \ +--postInclude 'default:PyJobTransforms/UseFrontier.py' \ +--preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' \ +--preExec 'EVNTtoHITS:simFlags.TightMuonStepping=True' \ +--DataRunNumber '284500' \ +--geometryVersion 'default:ATLAS-R2-2016-01-00-01' \ +--inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.evgen.EVNT.e4993.EVNT.08166201._000012.pool.root.1" \ +--outputHITSFile "test.HITS.pool.root" \ +--maxEvents 20 \ +--imf False + +rc=$? +rc2=-9999 +echo "art-result: $rc simulation" +if [ $rc -eq 0 ] +then + ArtPackage=$1 + ArtJobName=$2 + art.py compare grid --entries 4 ${ArtPackage} ${ArtJobName} --mode=semi-detailed + rc2=$? +fi + +echo "art-result: $rc2 regression" diff --git a/Simulation/Tests/ISF_ValidationMT/test/test_MC16_G4FastCalo_ttbar_MTvsST.sh b/Simulation/Tests/ISF_ValidationMT/test/test_MC16_ATLFAST3_ttbar_MTvsST.sh similarity index 81% rename from Simulation/Tests/ISF_ValidationMT/test/test_MC16_G4FastCalo_ttbar_MTvsST.sh rename to Simulation/Tests/ISF_ValidationMT/test/test_MC16_ATLFAST3_ttbar_MTvsST.sh index ee46c1c0e85c22a7f0d74722e9a2ec1c612e05ea..798d241be3572ad05fe1aaaec6e14dcd368bb441 100755 --- a/Simulation/Tests/ISF_ValidationMT/test/test_MC16_G4FastCalo_ttbar_MTvsST.sh +++ b/Simulation/Tests/ISF_ValidationMT/test/test_MC16_ATLFAST3_ttbar_MTvsST.sh @@ -20,16 +20,16 @@ Sim_tf.py \ --DataRunNumber '284500' \ --physicsList 'FTFP_BERT_ATL' \ --truthStrategy 'MC15aPlus' \ ---simulator 'G4FastCaloMTEnergyOrdered' \ +--simulator 'ATLFAST3MTEnergyOrdered' \ --postInclude 'default:PyJobTransforms/UseFrontier.py' \ --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py' \ --preExec 'EVNTtoHITS:simFlags.TightMuonStepping=True' #\ -#--postExec 'EVNTtoHITS:ServiceMgr.MessageSvc.enableSuppression=False;topSeq.ISF_Kernel_G4FastCaloMT.OutputLevel=VERBOSE;' \ +#--postExec 'EVNTtoHITS:ServiceMgr.MessageSvc.enableSuppression=False;topSeq.ISF_Kernel_ATLFAST3MT.OutputLevel=VERBOSE;' \ #--imf False rc=$? -mv log.EVNTtoHITS log.G4FastCaloMTAthenaMT -echo "art-result: $rc G4FastCaloMTAthenaMT" +mv log.EVNTtoHITS log.ATLFAST3MTAthenaMT +echo "art-result: $rc ATLFAST3MTAthenaMT" rc=0 rc2=-9999 if [ $rc -eq 0 ] @@ -46,16 +46,16 @@ then --DataRunNumber '284500' \ --physicsList 'FTFP_BERT_ATL' \ --truthStrategy 'MC15aPlus' \ - --simulator 'G4FastCaloMTEnergyOrdered' \ + --simulator 'ATLFAST3MTEnergyOrdered' \ --postInclude 'default:PyJobTransforms/UseFrontier.py' \ --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py' \ --preExec 'EVNTtoHITS:simFlags.TightMuonStepping=True' #\ -# --postExec 'EVNTtoHITS:ServiceMgr.MessageSvc.enableSuppression=False;topSeq.ISF_Kernel_G4FastCaloMT.OutputLevel=VERBOSE;' \ +# --postExec 'EVNTtoHITS:ServiceMgr.MessageSvc.enableSuppression=False;topSeq.ISF_Kernel_ATLFAST3MT.OutputLevel=VERBOSE;' \ # --imf False rc2=$? - mv log.EVNTtoHITS log.G4FastCaloMTAthena + mv log.EVNTtoHITS log.ATLFAST3MTAthena fi -echo "art-result: $rc2 G4FastCaloMTAthena" +echo "art-result: $rc2 ATLFAST3MTAthena" rc3=-9999 if [ $rc -eq 0 ] then @@ -71,27 +71,27 @@ then --DataRunNumber '284500' \ --physicsList 'FTFP_BERT_ATL' \ --truthStrategy 'MC15aPlus' \ - --simulator 'G4FastCaloEnergyOrdered' \ + --simulator 'ATLFAST3EnergyOrdered' \ --postInclude 'default:PyJobTransforms/UseFrontier.py' \ --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py' \ --preExec 'EVNTtoHITS:simFlags.TightMuonStepping=True' #\ -# --postExec 'EVNTtoHITS:ServiceMgr.MessageSvc.enableSuppression=False;topSeq.ISF_Kernel_G4FastCalo.OutputLevel=VERBOSE;ServiceMgr.ISF_AFIIParticleBrokerSvc.OutputLevel=VERBOSE;' \ +# --postExec 'EVNTtoHITS:ServiceMgr.MessageSvc.enableSuppression=False;topSeq.ISF_Kernel_ATLFAST3.OutputLevel=VERBOSE;ServiceMgr.ISF_AFIIParticleBrokerSvc.OutputLevel=VERBOSE;' \ # --imf False rc3=$? - mv log.EVNTtoHITS log.G4FastCaloAthena + mv log.EVNTtoHITS log.ATLFAST3Athena fi -echo "art-result: $rc3 G4FastCaloAthena" +echo "art-result: $rc3 ATLFAST3Athena" rc4=-9999 if [ $rc2 -eq 0 ] then acmd.py diff-root test.MT.HITS.pool.root test.ST.HITS.pool.root --error-mode=resilient --mode=semi-detailed --order-trees --ignore-leaves RecoTimingObj_p1_EVNTtoHITS_timings index_ref rc4=$? fi -echo "art-result: $rc4 G4FastCaloMT_STvsMT" +echo "art-result: $rc4 ATLFAST3MT_STvsMT" rc5=-9999 if [ $rc3 -eq 0 ] then acmd.py diff-root test.ST.HITS.pool.root test.ST.old.HITS.pool.root --error-mode=resilient --mode=semi-detailed --order-trees --ignore-leaves RecoTimingObj_p1_EVNTtoHITS_timings index_ref rc5=$? fi -echo "art-result: $rc5 G4FastCaloMTvsG4FastCalo" +echo "art-result: $rc5 ATLFAST3MTvsATLFAST3"