diff --git a/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py b/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py index 6d1bc1e3ad77d2c0339b64c96d51ef3510106a02..ac54005c81d55e0288a6879830ec19f8160e84b1 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py @@ -126,6 +126,9 @@ def fillAtlasMetadata(dbFiller): ## Don't write out random number seeds or RunDict as metadata if sp in ("RandomSeedList", "RandomSeedOffset", "RunDict", "RunAndLumiOverrideList"): continue + ## Don't write out UseShadowEvent property + if sp in ("UseShadowEvent"): + continue ## Don't write out Tool and Service names if sp in ("TruthService"): continue diff --git a/Simulation/G4Atlas/G4AtlasApps/python/SimFlags.py b/Simulation/G4Atlas/G4AtlasApps/python/SimFlags.py index 5d9be191d74a4c4ce3c414396643e2cff3be69d2..5c3264be97c4ff17427313840c4336a1a14a66d5 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/SimFlags.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/SimFlags.py @@ -922,6 +922,14 @@ class G4EMProcessesParticleList(JobProperty): allowedTypes = ['list'] StoredValue = [5132] +class UseShadowEvent(JobProperty): + """ + Use the new apporach to quasi-stable particle simulation + """ + statusOn = True + allowedTypes = ['bool'] + StoredValue = False + ## Definition and registration of the simulation flag container class SimFlags(JobPropertyContainer): """ diff --git a/Simulation/ISF/ISF_Example/python/ISF_Metadata.py b/Simulation/ISF/ISF_Example/python/ISF_Metadata.py index fb0f4e89649c27d0c3a32af753ffd2986a4b4e1c..88536249b75f66e6a892c95ca21489c008c3d9cb 100644 --- a/Simulation/ISF/ISF_Example/python/ISF_Metadata.py +++ b/Simulation/ISF/ISF_Example/python/ISF_Metadata.py @@ -130,7 +130,10 @@ def fillAtlasMetadata(dbFiller): ## Don't write out random number seeds or RunDict as metadata if sp in ("RandomSeedList", "RandomSeedOffset", "RunDict", "RunAndLumiOverrideList"): continue - ## Don't write out Tool and Service names + ## Don't write out UseShadowEvent property + if sp in ("UseShadowEvent"): + continue + ## Don't write out Tool and Service names if sp in ("TruthService"): continue ## Only store InitFunction names diff --git a/Simulation/SimulationConfig/python/SimConfigFlags.py b/Simulation/SimulationConfig/python/SimConfigFlags.py index ca62b25a8dac737c50978a7af6bedb08a8c9f83d..0df1652cd397d6d372c00f92392718ebe21f1055 100644 --- a/Simulation/SimulationConfig/python/SimConfigFlags.py +++ b/Simulation/SimulationConfig/python/SimConfigFlags.py @@ -71,6 +71,7 @@ def createSimConfigFlags(): scf.addFlag("Sim.RecordFlux", False) scf.addFlag("Sim.TruthStrategy", lambda prevFlags : TruthStrategy.Validation if prevFlags.Sim.ISF.ValidationMode else TruthStrategy.MC12, enum=TruthStrategy) + scf.addFlag("Sim.UseShadowEvent", False) scf.addFlag("Sim.G4Commands", ["/run/verbose 2"]) scf.addFlag("Sim.FlagAbortedEvents", False) scf.addFlag("Sim.KillAbortedEvents", True) diff --git a/Simulation/SimulationConfig/python/SimulationMetadata.py b/Simulation/SimulationConfig/python/SimulationMetadata.py index 83d50a215d7994758a931cbdfa603b18c2de01eb..52455898c5cc5c2a3ab76aa843b567bc73ff80e8 100644 --- a/Simulation/SimulationConfig/python/SimulationMetadata.py +++ b/Simulation/SimulationConfig/python/SimulationMetadata.py @@ -20,6 +20,9 @@ def fillAtlasMetadata(flags, dbFiller): if "Twiss" in flag and not flags.Detector.GeometryForward: # The various Twiss flags should only be written out when Forward Detector simulation is enabled continue + if "UseShadowEvent" in flag and not flags.Sim.UseShadowEvent: + # This flag is added temporarily to allow a new approach to quasi-stable particle simulation to be tested. + continue key = flag.split(".")[-1] #use final part of flag as the key value = flags._get(flag) if isinstance(value, FlagEnum):