Commit 5ba8ca72 authored by Hass AbouZeid's avatar Hass AbouZeid
Browse files

Merge branch 'AddPhysicsDecayToolUsage_ATLASSIM-3401_21.0' into '21.0'

Adding back missing functionality to decay SUSY particles within Geant4

See merge request !4018

Former-commit-id: 7ceed61b3735e6848415b6ffe9017a586c21e18c
parents 23f4cbe7 acbf5750
......@@ -41,3 +41,81 @@ def getCharginosPhysicsTool(name="CharginosPhysicsTool", **kwargs):
##kwargs.setdefault("NeutralinoShortlived", False)
return CfgMgr.CharginosPhysicsTool(name, **kwargs)
def getCharginoPlusToPiPlusNeutralino(name="CharginoPlusToPiPlusNeutralino", **kwargs):
from G4AtlasApps.SimFlags import simFlags
C1ToPiBR = 1.0
C1ToEleBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToEleBR", "-1.0"))
if C1ToEleBR > 0.0:
C1ToPiBR -= C1ToEleBR
C1ToMuBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToMuBR", "-1.0"))
if C1ToMuBR > 0.0:
C1ToPiBR -= C1ToMuBR
kwargs.setdefault("ParticleName","s_chi_plus_1")
kwargs.setdefault("BR",C1ToPiBR) #Branching Ratio
kwargs.setdefault("Daughters","s_chi_0_1,pi+")
return CfgMgr.AddPhysicsDecayTool(name, kwargs)
def getCharginoMinusToPiMinusNeutralino(name="CharginoMinusToPiMinusNeutralino", **kwargs):
from G4AtlasApps.SimFlags import simFlags
C1ToPiBR = 1.0
C1ToEleBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToEleBR", "-1.0"))
if C1ToEleBR > 0.0:
C1ToPiBR -= C1ToEleBR
C1ToMuBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToMuBR", "-1.0"))
if C1ToMuBR > 0.0:
C1ToPiBR -= C1ToMuBR
kwargs.setdefault("ParticleName","s_chi_minus_1")
kwargs.setdefault("BR",C1ToPiBR) #Branching Ratio
kwargs.setdefault("Daughters","s_chi_0_1,pi-")
return CfgMgr.AddPhysicsDecayTool(name, kwargs)
def getCharginoPlusToEPlusNeutralino(name="CharginoPlusToEPlusNeutralino", **kwargs):
from G4AtlasApps.SimFlags import simFlags
C1ToEBR = 0.0
C1ToEleBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToEleBR", "-1.0"))
if C1ToEleBR > 0.0:
C1ToEBR = C1ToEleBR
kwargs.setdefault("ParticleName","s_chi_plus_1")
kwargs.setdefault("BR",C1ToEBR) #Branching Ratio
kwargs.setdefault("Daughters","s_chi_0_1,e+")
return CfgMgr.AddPhysicsDecayTool(name, kwargs)
def getCharginoMinusToEMinusNeutralino(name="CharginoMinusToEMinusNeutralino", **kwargs):
from G4AtlasApps.SimFlags import simFlags
C1ToEBR = 0.0
C1ToEleBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToEleBR", "-1.0"))
if C1ToEleBR > 0.0:
C1ToEBR = C1ToEleBR
kwargs.setdefault("ParticleName","s_chi_minus_1")
kwargs.setdefault("BR",C1ToEBR) #Branching Ratio
kwargs.setdefault("Daughters","s_chi_0_1,e-")
return CfgMgr.AddPhysicsDecayTool(name, kwargs)
def getCharginoPlusToMuPlusNeutralino(name="CharginoPlusToMuPlusNeutralino", **kwargs):
from G4AtlasApps.SimFlags import simFlags
C1ToMuonBR = 0.0
C1ToMuBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToMuBR", "-1.0"))
if C1ToMuBR > 0.0:
C1ToMuonBR = C1ToMuBR
kwargs.setdefault("ParticleName","s_chi_plus_1")
kwargs.setdefault("BR",C1ToMuonBR) #Branching Ratio
kwargs.setdefault("Daughters","s_chi_0_1,mu+")
return CfgMgr.AddPhysicsDecayTool(name, kwargs)
def getCharginoMinusToMuMinusNeutralino(name="CharginoMinusToMuMinusNeutralino", **kwargs):
from G4AtlasApps.SimFlags import simFlags
C1ToMuonBR = 0.0
C1ToMuBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToMuBR", "-1.0"))
if C1ToMuBR > 0.0:
C1ToMuonBR = C1ToMuBR
kwargs.setdefault("ParticleName","s_chi_minus_1")
kwargs.setdefault("BR",C1ToMuonBR) #Branching Ratio
kwargs.setdefault("Daughters","s_chi_0_1,mu-")
return CfgMgr.AddPhysicsDecayTool(name, kwargs)
......@@ -2,3 +2,9 @@
from AthenaCommon.CfgGetter import addTool
addTool("Charginos.CharginosConfig.getCharginosPhysicsTool" , "CharginosPhysicsTool" )
addTool("Charginos.CharginosConfig.getCharginoPlusToPiPlusNeutralino", "CharginoPlusToPiPlusNeutralino"):
addTool("Charginos.CharginosConfig.getCharginoMinusToPiMinusNeutralino", "CharginoMinusToPiMinusNeutralino"):
addTool("Charginos.CharginosConfig.getCharginoPlusToEPlusNeutralino", "CharginoPlusToEPlusNeutralino"):
addTool("Charginos.CharginosConfig.getCharginoMinusToEMinusNeutralino", "CharginoMinusToEMinusNeutralino"):
addTool("Charginos.CharginosConfig.getCharginoMinusToEMinusNeutralino", "CharginoMinusToEMinusNeutralino"):
addTool("Charginos.CharginosConfig.getCharginoPlusToMuPlusNeutralino", "CharginoPlusToMuPlusNeutralino"):
......@@ -24,3 +24,10 @@ def getGauginosPhysicsTool(name="GauginosPhysicsTool", **kwargs):
##kwargs.setdefault("GravitinoLifetime", -1);
##kwargs.setdefault("GravitinoShortlived", False);
return CfgMgr.GauginosPhysicsTool(name, **kwargs)
def getNeutralinoToPhotonGravitino(name="NeutralinoToPhotonGravitino", **kwargs):
kwargs.setdefault("ParticleName","s_chi_0_1")
kwargs.setdefault("BR", 1.0) # Branching Ratio
kwargs.setdefault("Daughters","s_G,gamma")
return CfgMgr.AddPhysicsDecayTool(name, kwargs)
......@@ -2,3 +2,4 @@
from AthenaCommon.CfgGetter import addTool
addTool("Gauginos.GauginosConfig.getGauginosPhysicsTool" , "GauginosPhysicsTool" )
addTool("Gauginos.GauginosConfig.getNeutralinoToPhotonGravitino", "NeutralinoToPhotonGravitino")
......@@ -54,13 +54,18 @@ get_and_fix_PDGTABLE([(1000022, N1Mass, '~chi(0,1)', '0'), (1000024, C1Mass, '~c
if doG4SimConfig:
from G4AtlasApps.SimFlags import simFlags
simFlags.PhysicsOptions += ['CharginosPhysicsTool']
def amsb_applycalomctruthstrategy():
## Applying the MCTruth strategies: add decays in the Calorimeter
from G4AtlasApps import AtlasG4Eng
myDecay = AtlasG4Eng.G4Eng.Dict_MCTruthStrg.get('Decay')
myDecay.add_Volumes('CALO::CALO', 1)
simFlags.InitFunctions.add_function("postInit", amsb_applycalomctruthstrategy)
# Add Chargino decays if necessary
C1Lifetime = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1Lifetime", "-1.0"))
if C1Lifetime > 0.0:
simFlags.PhysicsOptions += ['CharginoPlusToPiPlusNeutralino']
simFlags.PhysicsOptions += ['CharginoMinusToPiMinusNeutralino']
C1ToEleBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToEleBR", "-1.0"))
if C1ToEleBR > 0.0:
simFlags.PhysicsOptions += ['CharginoPlusToEPlusNeutralino']
simFlags.PhysicsOptions += ['CharginoMinusToEMinusNeutralino']
C1ToMuBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToMuBR", "-1.0"))
if C1ToMuBR > 0.0:
simFlags.PhysicsOptions += ['CharginoPlusToMuPlusNeutralino']
simFlags.PhysicsOptions += ['CharginoMinusToMuMinusNeutralino']
del doG4SimConfig, simdict
......@@ -129,16 +129,9 @@ if doG4SimConfig:
from G4AtlasApps.SimFlags import simFlags
if GMSBIndex == 1: # generic neutralino to photon scenario
simFlags.PhysicsOptions += ["GauginosPhysicsTool"]
simFlags.PhysicsOptions += ["NeutralinoToPhotonGravitino"]
elif GMSBIndex == 2 or GMSBIndex == 3 or GMSBIndex == 4: # generic stau scenario
simFlags.PhysicsOptions += ["SleptonsPhysicsTool"]
del GMSBIndex
def gmsb_applycalomctruthstrategy():
## Applying the MCTruth strategies: add decays in the Calorimeter
from G4AtlasApps import AtlasG4Eng
myDecay = AtlasG4Eng.G4Eng.Dict_MCTruthStrg.get('Decay')
myDecay.add_Volumes('CALO::CALO', 1)
simFlags.InitFunctions.add_function("postInit", gmsb_applycalomctruthstrategy)
del doG4SimConfig, simdict
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment