diff --git a/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py b/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py index bc55e0525661bc6a0626b90af6395f80248b775c..540992e5975ae60d2c570d8bfeb5e45e84b423f7 100644 --- a/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py +++ b/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py @@ -4,8 +4,8 @@ from AthenaCommon import CfgMgr def getGauginosPhysicsTool(name="GauginosPhysicsTool", **kwargs): from AthenaCommon.SystemOfUnits import GeV,MeV,eplus,ns from G4AtlasApps.SimFlags import simFlags - GMSBNeutralino = eval(simFlags.specialConfiguration.get_Value().get("GMSBNeutralino", None)) - GMSBTime = eval(simFlags.specialConfiguration.get_Value().get("GMSBLifeTime", None)) + GMSBNeutralino = eval(simFlags.specialConfiguration.get_Value().get("GMSBNeutralino", "0*GeV")) + GMSBTime = eval(simFlags.specialConfiguration.get_Value().get("GMSBLifeTime", "0*GeV")) kwargs.setdefault("NeutralinoMass", GMSBNeutralino) ##kwargs.setdefault("NeutralinoWidth", 0.0*GeV); ##kwargs.setdefault("NeutralinoCharge", 0); @@ -15,7 +15,7 @@ def getGauginosPhysicsTool(name="GauginosPhysicsTool", **kwargs): ##kwargs.setdefault("NeutralinoShortlived", False); if simFlags.specialConfiguration.get_Value().has_key("GMSBGravitino"): - GMSBGravitino = eval(simFlags.specialConfiguration.get_Value().get("GMSBGravitino", None)) + GMSBGravitino = eval(simFlags.specialConfiguration.get_Value().get("GMSBGravitino", "0*GeV")) kwargs.setdefault("GravitinoMass", GMSBGravitino); ##kwargs.setdefault("GravitinoWidth", 0.0*GeV); ##kwargs.setdefault("GravitinoCharge", 0); diff --git a/Simulation/G4Extensions/Sleptons/python/SleptonsConfig.py b/Simulation/G4Extensions/Sleptons/python/SleptonsConfig.py index b4f24f5f76e1f4c1d71177ac36458d5403309def..394a2dd28eb1dfa9ce9a926027bccd33400a76b3 100644 --- a/Simulation/G4Extensions/Sleptons/python/SleptonsConfig.py +++ b/Simulation/G4Extensions/Sleptons/python/SleptonsConfig.py @@ -1,59 +1,172 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr + +""" +Defining default settings for slepton/staus. Possible options are: +G4ParticleMass (default 0.0*GeV) +G4ParticleWidth (default 0.0*GeV) +G4ParticleCharge (default +/-1.*eplus) +G4ParticlePDGCode (default sparticle pdgid) +G4ParticleStable (default True) +G4ParticleLifetime (default -1) +G4ParticleShortlived (default False) +where Particle = [STau1Minus, STau1Plus, STau2Minus, STau2Plus, SElectronRMinus, SElectronRLinus, SElectronRPlus, SElectronLPlus, SMuonRMinus, SMuonLMinus, SMuonRPlus, SMuonLPlus] +""" def getSleptonsPhysicsTool(name="SleptonsPhysicsTool", **kwargs): from G4AtlasApps.SimFlags import simFlags from AthenaCommon.SystemOfUnits import GeV,MeV,eplus,ns GMSBStau = eval(simFlags.specialConfiguration.get_Value().get("GMSBStau", None)) - kwargs.setdefault("G4STauMinusMass", GMSBStau) - ##kwargs.setdefault("G4STauMinusWidth", 0.0*GeV) - ##kwargs.setdefault("G4STauMinusCharge", -1.*eplus) - ##kwargs.setdefault("G4STauMinusPDGCode", 1000015) - ##kwargs.setdefault("G4STauMinusStable", True) - ##kwargs.setdefault("G4STauMinusLifetime", -1) - ##kwargs.setdefault("G4STauMinusShortlived", False) - - kwargs.setdefault("G4STauPlusMass", GMSBStau) - ##kwargs.setdefault("G4STauPlusWidth", 0.0*GeV) - ##kwargs.setdefault("G4STauPlusCharge", 1.*eplus) - ##kwargs.setdefault("G4STauPlusPDGCode", -1000015) - ##kwargs.setdefault("G4STauPlusStable", True) - ##kwargs.setdefault("G4STauPlusLifetime", -1) - ##kwargs.setdefault("G4STauPlusShortlived", False) + kwargs.setdefault("G4STau1MinusMass", GMSBStau) + kwargs.setdefault("G4STau1PlusMass", GMSBStau) if simFlags.specialConfiguration.get_Value().has_key("GMSBSlepton"): GMSBSlepton = eval(simFlags.specialConfiguration.get_Value().get("GMSBSlepton", None)) - kwargs.setdefault("G4SElectronMinusMass", GMSBSlepton) - ##kwargs.setdefault("G4SElectronMinusWidth", 0.0*GeV) - ##kwargs.setdefault("G4SElectronMinusCharge", -1.*eplus) - ##kwargs.setdefault("G4SElectronMinusPDGCode", 2000011) - ##kwargs.setdefault("G4SElectronMinusStable", True) - ##kwargs.setdefault("G4SElectronMinusLifetime", -1) - ##kwargs.setdefault("G4SElectronMinusShortlived", False) - - kwargs.setdefault("G4SElectronPlusMass", GMSBSlepton) - ##kwargs.setdefault("G4SElectronPlusWidth", 0.0*GeV) - ##kwargs.setdefault("G4SElectronPlusCharge", 1.*eplus) - ##kwargs.setdefault("G4SElectronPlusPDGCode", -2000011) - ##kwargs.setdefault("G4SElectronPlusStable", True) - ##kwargs.setdefault("G4SElectronPlusLifetime", -1) - ##kwargs.setdefault("G4SElectronPlusShortlived", False) - - kwargs.setdefault("G4SMuonMinusMass", GMSBSlepton) - ##kwargs.setdefault("G4SMuonMinusWidth", 0.0*GeV) - ##kwargs.setdefault("G4SMuonMinusCharge", -1.*eplus) - ##kwargs.setdefault("G4SMuonMinusPDGCode", 2000013) - ##kwargs.setdefault("G4SMuonMinusStable", True) - ##kwargs.setdefault("G4SMuonMinusLifetime", -1) - ##kwargs.setdefault("G4SMuonMinusShortlived", False) - - kwargs.setdefault("G4SMuonPlusMass", GMSBSlepton) - ##kwargs.setdefault("G4SMuonPlusWidth", 0.0*GeV) - ##kwargs.setdefault("G4SMuonPlusCharge", 1.*eplus) - ##kwargs.setdefault("G4SMuonPlusPDGCode", -2000013) - ##kwargs.setdefault("G4SMuonPlusStable", True) - ##kwargs.setdefault("G4SMuonPlusLifetime", -1) - ##kwargs.setdefault("G4SMuonPlusShortlived", False) + kwargs.setdefault("G4SElectronRMinusMass", GMSBSlepton) + kwargs.setdefault("G4SElectronRPlusMass", GMSBSlepton) + kwargs.setdefault("G4SMuonRMinusMass", GMSBSlepton) + kwargs.setdefault("G4SMuonRPlusMass", GMSBSlepton) + + return CfgMgr.SleptonsPhysicsTool(name, **kwargs) + +def getAllSleptonsPhysicsTool(name="AllSleptonsPhysicsTool", **kwargs): + from G4AtlasApps.SimFlags import simFlags + from AthenaCommon.SystemOfUnits import GeV,MeV,eplus,ns + if simFlags.specialConfiguration.get_Value().has_key("GMSBStau"): + GMSBStau = eval(simFlags.specialConfiguration.get_Value().get("GMSBStau", None)) + GMSBStauTime = eval(simFlags.specialConfiguration.get_Value().get("GMSBStauTime", None)) + kwargs.setdefault("G4STau1MinusMass", GMSBStau) + kwargs.setdefault("G4STau1MinusPDGCode", 1000015) + kwargs.setdefault("G4STau1MinusStable", False) + kwargs.setdefault("G4STau1MinusLifetime", GMSBStauTime) + + kwargs.setdefault("G4STau1PlusMass", GMSBStau) + kwargs.setdefault("G4STau1PlusPDGCode", -1000015) + kwargs.setdefault("G4STau1PlusStable", False) + kwargs.setdefault("G4STau1PlusLifetime", GMSBStauTime) + + kwargs.setdefault("G4STau2MinusMass", GMSBStau) + kwargs.setdefault("G4STau2MinusPDGCode", 2000015) + kwargs.setdefault("G4STau2MinusStable", False) + kwargs.setdefault("G4STau2MinusLifetime", GMSBStauTime) + + kwargs.setdefault("G4STau2PlusMass", GMSBStau) + kwargs.setdefault("G4STau2PlusPDGCode", -2000015) + kwargs.setdefault("G4STau2PlusStable", False) + kwargs.setdefault("G4STau2PlusLifetime", GMSBStauTime) + + if simFlags.specialConfiguration.get_Value().has_key("GMSBSlepton"): + GMSBSlepton = eval(simFlags.specialConfiguration.get_Value().get("GMSBSlepton", None)) + GMSBSleptonTime = eval(simFlags.specialConfiguration.get_Value().get("GMSBSleptonTime", None)) + + kwargs.setdefault("G4SElectronLMinusMass", GMSBSlepton) + kwargs.setdefault("G4SElectronLMinusPDGCode", 1000011) + kwargs.setdefault("G4SElectronLMinusStable", False) + kwargs.setdefault("G4SElectronLMinusLifetime", GMSBSleptonTime) + + kwargs.setdefault("G4SElectronLPlusMass", GMSBSlepton) + kwargs.setdefault("G4SElectronLPlusPDGCode", -1000011) + kwargs.setdefault("G4SElectronLPlusStable", False) + kwargs.setdefault("G4SElectronLPlusLifetime", GMSBSleptonTime) + + kwargs.setdefault("G4SMuonLMinusMass", GMSBSlepton) + kwargs.setdefault("G4SMuonLMinusPDGCode", 1000013) + kwargs.setdefault("G4SMuonLMinusStable", False) + kwargs.setdefault("G4SMuonLMinusLifetime", GMSBSleptonTime) + + kwargs.setdefault("G4SMuonLPlusMass", GMSBSlepton) + kwargs.setdefault("G4SMuonLPlusPDGCode", -1000013) + kwargs.setdefault("G4SMuonLPlusStable", False) + kwargs.setdefault("G4SMuonLPlusLifetime", GMSBSleptonTime) + + kwargs.setdefault("G4SElectronRMinusMass", GMSBSlepton) + kwargs.setdefault("G4SElectronRMinusPDGCode", 2000011) + kwargs.setdefault("G4SElectronRMinusStable", False) + kwargs.setdefault("G4SElectronRMinusLifetime", GMSBSleptonTime) + + + kwargs.setdefault("G4SElectronRPlusMass", GMSBSlepton) + kwargs.setdefault("G4SElectronRPlusPDGCode", -2000011) + kwargs.setdefault("G4SElectronRPlusStable", False) + kwargs.setdefault("G4SElectronRPlusLifetime", GMSBSleptonTime) + + kwargs.setdefault("G4SMuonRMinusMass", GMSBSlepton) + kwargs.setdefault("G4SMuonRMinusPDGCode", 2000013) + kwargs.setdefault("G4SMuonRMinusStable", False) + kwargs.setdefault("G4SMuonRMinusLifetime", GMSBSleptonTime) + + kwargs.setdefault("G4SMuonRPlusMass", GMSBSlepton) + kwargs.setdefault("G4SMuonRPlusPDGCode", -2000013) + kwargs.setdefault("G4SMuonRPlusStable", False) + kwargs.setdefault("G4SMuonRPlusLifetime", GMSBSleptonTime) + return CfgMgr.SleptonsPhysicsTool(name, **kwargs) + + +def getSElectronRPlusToElectronGravitino(name="SElectronRPlusToElectronGravitino", **kwargs): + kwargs.setdefault("ParticleName","s_e_plus_R") + kwargs.setdefault("BR", 1.0) # Branching Ratio + kwargs.setdefault("Daughters","s_G,e+") + return CfgMgr.AddPhysicsDecayTool(name, **kwargs) +def getSElectronRMinusToElectronGravitino(name="SElectronRMinusToElectronGravitino", **kwargs): + kwargs.setdefault("ParticleName","s_e_minus_R") + kwargs.setdefault("BR", 1.0) # Branching Ratio + kwargs.setdefault("Daughters","s_G,e-") + return CfgMgr.AddPhysicsDecayTool(name, **kwargs) + +def getSMuonRPlusToMuonGravitino(name="SMuonRPlusToMuonGravitino", **kwargs): + kwargs.setdefault("ParticleName","s_mu_plus_R") + kwargs.setdefault("BR", 1.0) # Branching Ratio + kwargs.setdefault("Daughters","s_G,mu+") + return CfgMgr.AddPhysicsDecayTool(name, **kwargs) +def getSMuonRMinusToMuonGravitino(name="SMuonRMinusToMuonGravitino", **kwargs): + kwargs.setdefault("ParticleName","s_mu_minus_R") + kwargs.setdefault("BR", 1.0) # Branching Ratio + kwargs.setdefault("Daughters","s_G,mu-") + return CfgMgr.AddPhysicsDecayTool(name, **kwargs) + +def getSTauLPlusToTauGravitino(name="STauLPlusToTauGravitino", **kwargs): + kwargs.setdefault("ParticleName","s_tau_plus_1") + kwargs.setdefault("BR", 1.0) # Branching Ratio + kwargs.setdefault("Daughters","s_G,tau+") + return CfgMgr.AddPhysicsDecayTool(name, **kwargs) +def getSTauLMinusToTauGravitino(name="STauLMinusToTauGravitino", **kwargs): + kwargs.setdefault("ParticleName","s_tau_minus_1") + kwargs.setdefault("BR", 1.0) # Branching Ratio + kwargs.setdefault("Daughters","s_G,tau-") + return CfgMgr.AddPhysicsDecayTool(name, **kwargs) + +def getSElectronLPlusToElectronGravitino(name="SElectronLPlusToElectronGravitino", **kwargs): + kwargs.setdefault("ParticleName","s_e_plus_L") + kwargs.setdefault("BR", 1.0) # Branching Ratio + kwargs.setdefault("Daughters","s_G,e+") + return CfgMgr.AddPhysicsDecayTool(name, **kwargs) +def getSElectronLMinusToElectronGravitino(name="SElectronLMinusToElectronGravitino", **kwargs): + kwargs.setdefault("ParticleName","s_e_minus_L") + kwargs.setdefault("BR", 1.0) # Branching Ratio + kwargs.setdefault("Daughters","s_G,e-") + return CfgMgr.AddPhysicsDecayTool(name, **kwargs) + +def getSMuonLPlusToMuonGravitino(name="SMuonLPlusToMuonGravitino", **kwargs): + kwargs.setdefault("ParticleName","s_mu_plus_L") + kwargs.setdefault("BR", 1.0) # Branching Ratio + kwargs.setdefault("Daughters","s_G,mu+") + return CfgMgr.AddPhysicsDecayTool(name, **kwargs) +def getSMuonLMinusToMuonGravitino(name="SMuonLMinusToMuonGravitino", **kwargs): + kwargs.setdefault("ParticleName","s_mu_minus_L") + kwargs.setdefault("BR", 1.0) # Branching Ratio + kwargs.setdefault("Daughters","s_G,mu-") + return CfgMgr.AddPhysicsDecayTool(name, **kwargs) + +def getSTauRPlusToTauGravitino(name="STauRPlusToTauGravitino", **kwargs): + kwargs.setdefault("ParticleName","s_tau_plus_2") + kwargs.setdefault("BR", 1.0) # Branching Ratio + kwargs.setdefault("Daughters","s_G,tau+") + return CfgMgr.AddPhysicsDecayTool(name, **kwargs) +def getSTauRMinusToTauGravitino(name="STauRMinusToTauGravitino", **kwargs): + kwargs.setdefault("ParticleName","s_tau_minus_2") + kwargs.setdefault("BR", 1.0) # Branching Ratio + kwargs.setdefault("Daughters","s_G,tau-") + return CfgMgr.AddPhysicsDecayTool(name, **kwargs) diff --git a/Simulation/G4Extensions/Sleptons/python/SleptonsConfigDb.py b/Simulation/G4Extensions/Sleptons/python/SleptonsConfigDb.py index 174159d0c167677688e3e79b9749b0a6feff072f..a8669262adb530646fa83df2464f4aba6c27e27d 100644 --- a/Simulation/G4Extensions/Sleptons/python/SleptonsConfigDb.py +++ b/Simulation/G4Extensions/Sleptons/python/SleptonsConfigDb.py @@ -1,4 +1,18 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from AthenaCommon.CfgGetter import addTool -addTool("Sleptons.SleptonsConfig.getSleptonsPhysicsTool" , "SleptonsPhysicsTool" ) +addTool("Sleptons.SleptonsConfig.getSleptonsPhysicsTool" , "SleptonsPhysicsTool" ) +addTool("Sleptons.SleptonsConfig.getSleptonsRPhysicsTool" , "SleptonsRPhysicsTool" ) +addTool("Sleptons.SleptonsConfig.getAllSleptonsPhysicsTool" , "AllSleptonsPhysicsTool" ) +addTool("Sleptons.SleptonsConfig.getSElectronRPlusToElectronGravitino" , "SElectronRPlusToElectronGravitino" ) +addTool("Sleptons.SleptonsConfig.getSElectronRMinusToElectronGravitino" , "SElectronRMinusToElectronGravitino" ) +addTool("Sleptons.SleptonsConfig.getSMuonRPlusToMuonGravitino" , "SMuonRPlusToMuonGravitino" ) +addTool("Sleptons.SleptonsConfig.getSMuonRMinusToMuonGravitino" , "SMuonRMinusToMuonGravitino" ) +addTool("Sleptons.SleptonsConfig.getSTauLPlusToTauGravitino" , "STauLPlusToTauGravitino" ) +addTool("Sleptons.SleptonsConfig.getSTauLMinusToTauGravitino" , "STauLMinusToTauGravitino" ) +addTool("Sleptons.SleptonsConfig.getSElectronLPlusToElectronGravitino" , "SElectronLPlusToElectronGravitino" ) +addTool("Sleptons.SleptonsConfig.getSElectronLMinusToElectronGravitino" , "SElectronLMinusToElectronGravitino" ) +addTool("Sleptons.SleptonsConfig.getSMuonLPlusToMuonGravitino" , "SMuonLPlusToMuonGravitino" ) +addTool("Sleptons.SleptonsConfig.getSMuonLMinusToMuonGravitino" , "SMuonLMinusToMuonGravitino" ) +addTool("Sleptons.SleptonsConfig.getSTauRPlusToTauGravitino" , "STauRPlusToTauGravitino" ) +addTool("Sleptons.SleptonsConfig.getSTauRMinusToTauGravitino" , "STauRMinusToTauGravitino" ) diff --git a/Simulation/G4Extensions/Sleptons/src/G4SElectronLMinus.cxx b/Simulation/G4Extensions/Sleptons/src/G4SElectronLMinus.cxx new file mode 100755 index 0000000000000000000000000000000000000000..8c8fb30ac6b86caecf547681709c57c80ccf67d8 --- /dev/null +++ b/Simulation/G4Extensions/Sleptons/src/G4SElectronLMinus.cxx @@ -0,0 +1,55 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "G4SElectronLMinus.hh" +// ###################################################################### +// ### SElectronLMinus ### +// ###################################################################### + +G4SElectronLMinus* G4SElectronLMinus::theInstance = NULL; + +G4SElectronLMinus* G4SElectronLMinus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) +{ + + if (theInstance !=0 && (mass>=0. || width>=0. || lifetime>=0.) ) + { + G4ExceptionDescription description; + description << "Trying to redefine the G4SElectronL Minus properties after it has been constructed is not allowed"; + G4Exception("G4SElectronLMinus", "FailedRedefinition", FatalException, description); + abort(); + } + + if (theInstance != 0) + { + return theInstance; + } + + + // Arguments for constructor are as follows + // name mass width charge + // 2*spin parity C-conjugation + // 2*Isospin 2*Isospin3 G-parity + // type lepton number baryon number PDG encoding + // stable lifetime decay table + // shortlived subType anti_encoding + if (mass >= 0) { + G4ParticleDefinition* anInstance = + new G4ParticleDefinition("s_e_minus_L", mass, width, charge, + 0, 0, 0, + 0, 0, 0, + "slepton", 1, 0, PDG, + stable, lifetime, NULL, + shortlived, "SElectronLMinus"); + + theInstance = reinterpret_cast<G4SElectronLMinus*>(anInstance); + return theInstance; + } + else + { + G4ExceptionDescription description; + description << "Trying to create a particle with default constructor is not allowed"; + G4Exception("G4SElectronLMinus", "DefaultConstructorCalled", FatalException, description); + abort(); + } +} diff --git a/Simulation/G4Extensions/Sleptons/src/G4SElectronLMinus.hh b/Simulation/G4Extensions/Sleptons/src/G4SElectronLMinus.hh new file mode 100644 index 0000000000000000000000000000000000000000..c387103c099b30e8e0f54c523974dd4d4e0ae2ab --- /dev/null +++ b/Simulation/G4Extensions/Sleptons/src/G4SElectronLMinus.hh @@ -0,0 +1,28 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef SLEPTONS_G4SElectronLMinus_H +#define SLEPTONS_G4SElectronLMinus_H + +#include "globals.hh" +#include "G4ios.hh" +#include "G4ParticleDefinition.hh" + +class G4SElectronLMinus: public G4ParticleDefinition +{ + // singleton implementation + +private: + + static G4SElectronLMinus* theInstance; + G4SElectronLMinus(){} + ~G4SElectronLMinus(){} + +public: + + static G4SElectronLMinus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); + +}; + +#endif // SLEPTONS_G4SElectronLMinus_H diff --git a/Simulation/G4Extensions/Sleptons/src/G4SElectronMinus.cxx b/Simulation/G4Extensions/Sleptons/src/G4SElectronLPlus.cxx similarity index 75% rename from Simulation/G4Extensions/Sleptons/src/G4SElectronMinus.cxx rename to Simulation/G4Extensions/Sleptons/src/G4SElectronLPlus.cxx index 909695159a0797aac4861a86578d8a2061e60f47..ebfb7fd3e290816fc2b0b5022fb5a92c02a75f14 100755 --- a/Simulation/G4Extensions/Sleptons/src/G4SElectronMinus.cxx +++ b/Simulation/G4Extensions/Sleptons/src/G4SElectronLPlus.cxx @@ -2,21 +2,22 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "G4SElectronMinus.hh" +#include "G4SElectronLPlus.hh" // ###################################################################### -// ### SElectronMinus ### +// ### SElectronLPlus ### // ###################################################################### -G4SElectronMinus* G4SElectronMinus::theInstance = NULL; -G4SElectronMinus* G4SElectronMinus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) +G4SElectronLPlus* G4SElectronLPlus::theInstance = NULL; + +G4SElectronLPlus* G4SElectronLPlus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) { if (theInstance !=0 && (mass>=0. || width>=0. || lifetime>=0.) ) { G4ExceptionDescription description; - description << "Trying to redefine the G4SElectron Minus properties after it has been constructed is not allowed"; - G4Exception("G4SElectronMinus", "FailedRedefinition", FatalException, description); + description << "Trying to redefine the G4SElectronL Plus properties after it has been constructed is not allowed"; + G4Exception("G4SElectronLPlus", "FailedRedefinition", FatalException, description); abort(); } @@ -36,21 +37,21 @@ G4SElectronMinus* G4SElectronMinus::Definition(G4double mass, G4double width, G4 if (mass >= 0) { G4ParticleDefinition* anInstance = - new G4ParticleDefinition("s_e_minus_R", mass, width, charge, + new G4ParticleDefinition("s_e_plus_L", mass, width, charge, 0, 0, 0, 0, 0, 0, "slepton", 1, 0, PDG, stable, lifetime, NULL, - shortlived, "SElectronMinus"); + shortlived, "SElectronLPlus"); - theInstance = reinterpret_cast<G4SElectronMinus*>(anInstance); + theInstance = reinterpret_cast<G4SElectronLPlus*>(anInstance); return theInstance; } else { G4ExceptionDescription description; description << "Trying to create a particle with default constructor is not allowed"; - G4Exception("G4SElectronMinus", "DefaultConstructorCalled", FatalException, description); + G4Exception("G4SElectronLPlus", "DefaultConstructorCalled", FatalException, description); abort(); } } diff --git a/Simulation/G4Extensions/Sleptons/src/G4SElectronMinus.hh b/Simulation/G4Extensions/Sleptons/src/G4SElectronLPlus.hh similarity index 51% rename from Simulation/G4Extensions/Sleptons/src/G4SElectronMinus.hh rename to Simulation/G4Extensions/Sleptons/src/G4SElectronLPlus.hh index 13c66d8590e79bc2d00082eb49b14b7bdc3b0af2..0b759e95584e0c94a428f8d73846d3693a8a3ad1 100644 --- a/Simulation/G4Extensions/Sleptons/src/G4SElectronMinus.hh +++ b/Simulation/G4Extensions/Sleptons/src/G4SElectronLPlus.hh @@ -2,27 +2,27 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef SLEPTONS_G4SElectronMinus_H -#define SLEPTONS_G4SElectronMinus_H +#ifndef SLEPTONS_G4SElectronLPlus_H +#define SLEPTONS_G4SElectronLPlus_H #include "globals.hh" #include "G4ios.hh" #include "G4ParticleDefinition.hh" -class G4SElectronMinus: public G4ParticleDefinition +class G4SElectronLPlus: public G4ParticleDefinition { // singleton implementation private: - static G4SElectronMinus* theInstance; - G4SElectronMinus(){} - ~G4SElectronMinus(){} + static G4SElectronLPlus* theInstance; + G4SElectronLPlus(){} + ~G4SElectronLPlus(){} public: - static G4SElectronMinus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); + static G4SElectronLPlus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); }; -#endif // SLEPTONS_G4SElectronMinus_H +#endif //SLEPTONS_G4SElectronLPlus_H diff --git a/Simulation/G4Extensions/Sleptons/src/G4SElectronPlus.hh b/Simulation/G4Extensions/Sleptons/src/G4SElectronPlus.hh deleted file mode 100644 index f7400c42b49cf7adb00ff18ad8a9f345c6f01610..0000000000000000000000000000000000000000 --- a/Simulation/G4Extensions/Sleptons/src/G4SElectronPlus.hh +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef SLEPTONS_G4SElectronPlus_H -#define SLEPTONS_G4SElectronPlus_H - -#include "globals.hh" -#include "G4ios.hh" -#include "G4ParticleDefinition.hh" - -class G4SElectronPlus: public G4ParticleDefinition -{ - // singleton implementation - -private: - - static G4SElectronPlus* theInstance; - G4SElectronPlus(){} - ~G4SElectronPlus(){} - -public: - - static G4SElectronPlus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); - -}; - -#endif //SLEPTONS_G4SElectronPlus_H diff --git a/Simulation/G4Extensions/Sleptons/src/G4SElectronRMinus.cxx b/Simulation/G4Extensions/Sleptons/src/G4SElectronRMinus.cxx new file mode 100755 index 0000000000000000000000000000000000000000..6fc583b44a3583415288b77dd1af0f7f5a22343e --- /dev/null +++ b/Simulation/G4Extensions/Sleptons/src/G4SElectronRMinus.cxx @@ -0,0 +1,55 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "G4SElectronRMinus.hh" +// ###################################################################### +// ### SElectronRMinus ### +// ###################################################################### + +G4SElectronRMinus* G4SElectronRMinus::theInstance = NULL; + +G4SElectronRMinus* G4SElectronRMinus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) +{ + + if (theInstance !=0 && (mass>=0. || width>=0. || lifetime>=0.) ) + { + G4ExceptionDescription description; + description << "Trying to redefine the G4SElectronR Minus properties after it has been constructed is not allowed"; + G4Exception("G4SElectronRMinus", "FailedRedefinition", FatalException, description); + abort(); + } + + if (theInstance != 0) + { + return theInstance; + } + + + // Arguments for constructor are as follows + // name mass width charge + // 2*spin parity C-conjugation + // 2*Isospin 2*Isospin3 G-parity + // type lepton number baryon number PDG encoding + // stable lifetime decay table + // shortlived subType anti_encoding + if (mass >= 0) { + G4ParticleDefinition* anInstance = + new G4ParticleDefinition("s_e_minus_R", mass, width, charge, + 0, 0, 0, + 0, 0, 0, + "slepton", 1, 0, PDG, + stable, lifetime, NULL, + shortlived, "SElectronRMinus"); + + theInstance = reinterpret_cast<G4SElectronRMinus*>(anInstance); + return theInstance; + } + else + { + G4ExceptionDescription description; + description << "Trying to create a particle with default constructor is not allowed"; + G4Exception("G4SElectronRMinus", "DefaultConstructorCalled", FatalException, description); + abort(); + } +} diff --git a/Simulation/G4Extensions/Sleptons/src/G4SElectronRMinus.hh b/Simulation/G4Extensions/Sleptons/src/G4SElectronRMinus.hh new file mode 100644 index 0000000000000000000000000000000000000000..b99757adcae4b779cbd4cdd6988db9ae55df2f32 --- /dev/null +++ b/Simulation/G4Extensions/Sleptons/src/G4SElectronRMinus.hh @@ -0,0 +1,28 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef SLEPTONS_G4SElectronRMinus_H +#define SLEPTONS_G4SElectronRMinus_H + +#include "globals.hh" +#include "G4ios.hh" +#include "G4ParticleDefinition.hh" + +class G4SElectronRMinus: public G4ParticleDefinition +{ + // singleton implementation + +private: + + static G4SElectronRMinus* theInstance; + G4SElectronRMinus(){} + ~G4SElectronRMinus(){} + +public: + + static G4SElectronRMinus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); + +}; + +#endif // SLEPTONS_G4SElectronRMinus_H diff --git a/Simulation/G4Extensions/Sleptons/src/G4SElectronPlus.cxx b/Simulation/G4Extensions/Sleptons/src/G4SElectronRPlus.cxx similarity index 68% rename from Simulation/G4Extensions/Sleptons/src/G4SElectronPlus.cxx rename to Simulation/G4Extensions/Sleptons/src/G4SElectronRPlus.cxx index ac0482910fa10681cf75dadc2693340b8fbe870b..d841470a7364c9b5ef8bdcfd4ee8100afc83a615 100755 --- a/Simulation/G4Extensions/Sleptons/src/G4SElectronPlus.cxx +++ b/Simulation/G4Extensions/Sleptons/src/G4SElectronRPlus.cxx @@ -2,22 +2,22 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "G4SElectronPlus.hh" +#include "G4SElectronRPlus.hh" // ###################################################################### -// ### SElectronPlus ### +// ### SElectronRPlus ### // ###################################################################### -G4SElectronPlus* G4SElectronPlus::theInstance = NULL; +G4SElectronRPlus* G4SElectronRPlus::theInstance = NULL; -G4SElectronPlus* G4SElectronPlus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) +G4SElectronRPlus* G4SElectronRPlus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) { if (theInstance !=0 && (mass>=0. || width>=0. || lifetime>=0.) ) { G4ExceptionDescription description; - description << "Trying to redefine the G4SElectron Plus properties after it has been constructed is not allowed"; - G4Exception("G4SElectronPlus", "FailedRedefinition", FatalException, description); + description << "Trying to redefine the G4SElectronL Plus properties after it has been constructed is not allowed"; + G4Exception("G4SElectronRPlus", "FailedRedefinition", FatalException, description); abort(); } @@ -42,16 +42,16 @@ G4SElectronPlus* G4SElectronPlus::Definition(G4double mass, G4double width, G4do 0, 0, 0, "slepton", 1, 0, PDG, stable, lifetime, NULL, - shortlived, "SElectronPlus"); + shortlived, "SElectronRPlus"); - theInstance = reinterpret_cast<G4SElectronPlus*>(anInstance); + theInstance = reinterpret_cast<G4SElectronRPlus*>(anInstance); return theInstance; } else { G4ExceptionDescription description; description << "Trying to create a particle with default constructor is not allowed"; - G4Exception("G4SElectronPlus", "DefaultConstructorCalled", FatalException, description); + G4Exception("G4SElectronRPlus", "DefaultConstructorCalled", FatalException, description); abort(); } } diff --git a/Simulation/G4Extensions/Sleptons/src/G4SElectronRPlus.hh b/Simulation/G4Extensions/Sleptons/src/G4SElectronRPlus.hh new file mode 100644 index 0000000000000000000000000000000000000000..ded1ba517056e7a64f02692ab5774dccf965bad1 --- /dev/null +++ b/Simulation/G4Extensions/Sleptons/src/G4SElectronRPlus.hh @@ -0,0 +1,28 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef SLEPTONS_G4SElectronRPlus_H +#define SLEPTONS_G4SElectronRPlus_H + +#include "globals.hh" +#include "G4ios.hh" +#include "G4ParticleDefinition.hh" + +class G4SElectronRPlus: public G4ParticleDefinition +{ + // singleton implementation + +private: + + static G4SElectronRPlus* theInstance; + G4SElectronRPlus(){} + ~G4SElectronRPlus(){} + +public: + + static G4SElectronRPlus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); + +}; + +#endif //SLEPTONS_G4SElectronRPlus_H diff --git a/Simulation/G4Extensions/Sleptons/src/G4SMuonLMinus.cxx b/Simulation/G4Extensions/Sleptons/src/G4SMuonLMinus.cxx new file mode 100755 index 0000000000000000000000000000000000000000..5cf3612be21bd70121d9193b9cfda704e385bc9a --- /dev/null +++ b/Simulation/G4Extensions/Sleptons/src/G4SMuonLMinus.cxx @@ -0,0 +1,56 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "G4SMuonLMinus.hh" +// ###################################################################### +// ### SMuonLMinus ### +// ###################################################################### + + +G4SMuonLMinus* G4SMuonLMinus::theInstance = NULL; + +G4SMuonLMinus* G4SMuonLMinus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) +{ + + if (theInstance !=0 && (mass>=0. || width>=0. || lifetime>=0.) ) + { + G4ExceptionDescription description; + description << "Trying to redefine the G4SMuonL Minus properties after it has been constructed is not allowed"; + G4Exception("G4SMuonLMinus", "FailedRedefinition", FatalException, description); + abort(); + } + + if (theInstance != 0) + { + return theInstance; + } + + + // Arguments for constructor are as follows + // name mass width charge + // 2*spin parity C-conjugation + // 2*Isospin 2*Isospin3 G-parity + // type lepton number baryon number PDG encoding + // stable lifetime decay table + // shortlived subType anti_encoding + if (mass >= 0) { + G4ParticleDefinition* anInstance = + new G4ParticleDefinition("s_mu_minus_L", mass, width, charge, + 0, 0, 0, + 0, 0, 0, + "slepton", 1, 0, PDG, + stable, lifetime, NULL, + shortlived, "SMuonLMinus"); + + theInstance = reinterpret_cast<G4SMuonLMinus*>(anInstance); + return theInstance; + } + else + { + G4ExceptionDescription description; + description << "Trying to create a particle with default constructor is not allowed"; + G4Exception("G4SMuonLMinus", "DefaultConstructorCalled", FatalException, description); + abort(); + } +} diff --git a/Simulation/G4Extensions/Sleptons/src/G4SMuonLMinus.hh b/Simulation/G4Extensions/Sleptons/src/G4SMuonLMinus.hh new file mode 100644 index 0000000000000000000000000000000000000000..fdf5b306589dd32dce0373b71d4007085ee3da40 --- /dev/null +++ b/Simulation/G4Extensions/Sleptons/src/G4SMuonLMinus.hh @@ -0,0 +1,28 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef SLEPTONS_G4SMuonLMinus_H +#define SLEPTONS_G4SMuonLMinus_H + +#include "globals.hh" +#include "G4ios.hh" +#include "G4ParticleDefinition.hh" + +class G4SMuonLMinus: public G4ParticleDefinition +{ + // singleton implementation + +private: + + static G4SMuonLMinus* theInstance; + G4SMuonLMinus(){} + ~G4SMuonLMinus(){} + +public: + + static G4SMuonLMinus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); + +}; + +#endif //SLEPTONS_G4SMuonLMinus_H diff --git a/Simulation/G4Extensions/Sleptons/src/G4SMuonMinus.cxx b/Simulation/G4Extensions/Sleptons/src/G4SMuonLPlus.cxx similarity index 72% rename from Simulation/G4Extensions/Sleptons/src/G4SMuonMinus.cxx rename to Simulation/G4Extensions/Sleptons/src/G4SMuonLPlus.cxx index 3d1e285ce9e60c6661500f20e55f11ab5d34795e..a3885b964c14b2a0023126782afa4bb11644c13b 100755 --- a/Simulation/G4Extensions/Sleptons/src/G4SMuonMinus.cxx +++ b/Simulation/G4Extensions/Sleptons/src/G4SMuonLPlus.cxx @@ -2,22 +2,21 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "G4SMuonMinus.hh" +#include "G4SMuonLPlus.hh" // ###################################################################### -// ### SMuonMinus ### +// ### SMuonLPlus ### // ###################################################################### +G4SMuonLPlus* G4SMuonLPlus::theInstance = NULL; -G4SMuonMinus* G4SMuonMinus::theInstance = NULL; - -G4SMuonMinus* G4SMuonMinus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) +G4SMuonLPlus* G4SMuonLPlus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) { if (theInstance !=0 && (mass>=0. || width>=0. || lifetime>=0.) ) { G4ExceptionDescription description; - description << "Trying to redefine the G4SMuon Minus properties after it has been constructed is not allowed"; - G4Exception("G4SMuonMinus", "FailedRedefinition", FatalException, description); + description << "Trying to redefine the G4SMuonL Plus properties after it has been constructed is not allowed"; + G4Exception("G4SMuonLPlus", "FailedRedefinition", FatalException, description); abort(); } @@ -35,22 +34,24 @@ G4SMuonMinus* G4SMuonMinus::Definition(G4double mass, G4double width, G4double c // stable lifetime decay table // shortlived subType anti_encoding if (mass >= 0) { + G4ParticleDefinition* anInstance = - new G4ParticleDefinition("s_mu_minus_R", mass, width, charge, + new G4ParticleDefinition("s_mu_plus_L", mass, width, charge, 0, 0, 0, 0, 0, 0, "slepton", 1, 0, PDG, stable, lifetime, NULL, - shortlived, "SMuonMinus"); + shortlived, "SMuonLPlus"); - theInstance = reinterpret_cast<G4SMuonMinus*>(anInstance); + theInstance = reinterpret_cast<G4SMuonLPlus*>(anInstance); return theInstance; + } else { G4ExceptionDescription description; description << "Trying to create a particle with default constructor is not allowed"; - G4Exception("G4SMuonMinus", "DefaultConstructorCalled", FatalException, description); + G4Exception("G4SMuonLPlus", "DefaultConstructorCalled", FatalException, description); abort(); } } diff --git a/Simulation/G4Extensions/Sleptons/src/G4SMuonMinus.hh b/Simulation/G4Extensions/Sleptons/src/G4SMuonLPlus.hh similarity index 53% rename from Simulation/G4Extensions/Sleptons/src/G4SMuonMinus.hh rename to Simulation/G4Extensions/Sleptons/src/G4SMuonLPlus.hh index c4c214127bb8d19903a0606e2b008226bd687381..bd6af3ccebac7a7ef7d4dc7e296676b109b96b8a 100644 --- a/Simulation/G4Extensions/Sleptons/src/G4SMuonMinus.hh +++ b/Simulation/G4Extensions/Sleptons/src/G4SMuonLPlus.hh @@ -2,27 +2,27 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef SLEPTONS_G4SMuonMinus_H -#define SLEPTONS_G4SMuonMinus_H +#ifndef SLEPTONS_G4SMuonLPlus_H +#define SLEPTONS_G4SMuonLPlus_H #include "globals.hh" #include "G4ios.hh" #include "G4ParticleDefinition.hh" -class G4SMuonMinus: public G4ParticleDefinition +class G4SMuonLPlus: public G4ParticleDefinition { // singleton implementation private: - static G4SMuonMinus* theInstance; - G4SMuonMinus(){} - ~G4SMuonMinus(){} + static G4SMuonLPlus* theInstance; + G4SMuonLPlus(){} + ~G4SMuonLPlus(){} public: - static G4SMuonMinus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); + static G4SMuonLPlus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); }; -#endif //SLEPTONS_G4SMuonMinus_H +#endif //SLEPTONS_G4SMuonLPlus_H diff --git a/Simulation/G4Extensions/Sleptons/src/G4SMuonRMinus.cxx b/Simulation/G4Extensions/Sleptons/src/G4SMuonRMinus.cxx new file mode 100755 index 0000000000000000000000000000000000000000..ba35e7bf0ef870a6fcf70371c86cada1377eea9a --- /dev/null +++ b/Simulation/G4Extensions/Sleptons/src/G4SMuonRMinus.cxx @@ -0,0 +1,56 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "G4SMuonRMinus.hh" +// ###################################################################### +// ### SMuonRMinus ### +// ###################################################################### + + +G4SMuonRMinus* G4SMuonRMinus::theInstance = NULL; + +G4SMuonRMinus* G4SMuonRMinus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) +{ + + if (theInstance !=0 && (mass>=0. || width>=0. || lifetime>=0.) ) + { + G4ExceptionDescription description; + description << "Trying to redefine the G4SMuonL Minus properties after it has been constructed is not allowed"; + G4Exception("G4SMuonRMinus", "FailedRedefinition", FatalException, description); + abort(); + } + + if (theInstance != 0) + { + return theInstance; + } + + + // Arguments for constructor are as follows + // name mass width charge + // 2*spin parity C-conjugation + // 2*Isospin 2*Isospin3 G-parity + // type lepton number baryon number PDG encoding + // stable lifetime decay table + // shortlived subType anti_encoding + if (mass >= 0) { + G4ParticleDefinition* anInstance = + new G4ParticleDefinition("s_mu_minus_R", mass, width, charge, + 0, 0, 0, + 0, 0, 0, + "slepton", 1, 0, PDG, + stable, lifetime, NULL, + shortlived, "SMuonRMinus"); + + theInstance = reinterpret_cast<G4SMuonRMinus*>(anInstance); + return theInstance; + } + else + { + G4ExceptionDescription description; + description << "Trying to create a particle with default constructor is not allowed"; + G4Exception("G4SMuonRMinus", "DefaultConstructorCalled", FatalException, description); + abort(); + } +} diff --git a/Simulation/G4Extensions/Sleptons/src/G4SMuonRMinus.hh b/Simulation/G4Extensions/Sleptons/src/G4SMuonRMinus.hh new file mode 100644 index 0000000000000000000000000000000000000000..3badb1b4e343c78ef149eb1c696f90e5068fb8e7 --- /dev/null +++ b/Simulation/G4Extensions/Sleptons/src/G4SMuonRMinus.hh @@ -0,0 +1,28 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef SLEPTONS_G4SMuonRMinus_H +#define SLEPTONS_G4SMuonRMinus_H + +#include "globals.hh" +#include "G4ios.hh" +#include "G4ParticleDefinition.hh" + +class G4SMuonRMinus: public G4ParticleDefinition +{ + // singleton implementation + +private: + + static G4SMuonRMinus* theInstance; + G4SMuonRMinus(){} + ~G4SMuonRMinus(){} + +public: + + static G4SMuonRMinus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); + +}; + +#endif //SLEPTONS_G4SMuonRMinus_H diff --git a/Simulation/G4Extensions/Sleptons/src/G4SMuonRPlus.cxx b/Simulation/G4Extensions/Sleptons/src/G4SMuonRPlus.cxx new file mode 100755 index 0000000000000000000000000000000000000000..ee38b623e77c00c728d5a27d86ea9eebd773ac97 --- /dev/null +++ b/Simulation/G4Extensions/Sleptons/src/G4SMuonRPlus.cxx @@ -0,0 +1,57 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "G4SMuonRPlus.hh" +// ###################################################################### +// ### SMuonRPlus ### +// ###################################################################### + +G4SMuonRPlus* G4SMuonRPlus::theInstance = NULL; + +G4SMuonRPlus* G4SMuonRPlus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) +{ + + if (theInstance !=0 && (mass>=0. || width>=0. || lifetime>=0.) ) + { + G4ExceptionDescription description; + description << "Trying to redefine the G4SMuonL Plus properties after it has been constructed is not allowed"; + G4Exception("G4SMuonRPlus", "FailedRedefinition", FatalException, description); + abort(); + } + + if (theInstance != 0) + { + return theInstance; + } + + + // Arguments for constructor are as follows + // name mass width charge + // 2*spin parity C-conjugation + // 2*Isospin 2*Isospin3 G-parity + // type lepton number baryon number PDG encoding + // stable lifetime decay table + // shortlived subType anti_encoding + if (mass >= 0) { + + G4ParticleDefinition* anInstance = + new G4ParticleDefinition("s_mu_plus_R", mass, width, charge, + 0, 0, 0, + 0, 0, 0, + "slepton", 1, 0, PDG, + stable, lifetime, NULL, + shortlived, "SMuonRPlus"); + + theInstance = reinterpret_cast<G4SMuonRPlus*>(anInstance); + return theInstance; + + } + else + { + G4ExceptionDescription description; + description << "Trying to create a particle with default constructor is not allowed"; + G4Exception("G4SMuonRPlus", "DefaultConstructorCalled", FatalException, description); + abort(); + } +} diff --git a/Simulation/G4Extensions/Sleptons/src/G4SMuonRPlus.hh b/Simulation/G4Extensions/Sleptons/src/G4SMuonRPlus.hh new file mode 100644 index 0000000000000000000000000000000000000000..ddc393f7d26a3eb4f0c3825866375393372f176f --- /dev/null +++ b/Simulation/G4Extensions/Sleptons/src/G4SMuonRPlus.hh @@ -0,0 +1,28 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef SLEPTONS_G4SMuonRPlus_H +#define SLEPTONS_G4SMuonRPlus_H + +#include "globals.hh" +#include "G4ios.hh" +#include "G4ParticleDefinition.hh" + +class G4SMuonRPlus: public G4ParticleDefinition +{ + // singleton implementation + +private: + + static G4SMuonRPlus* theInstance; + G4SMuonRPlus(){} + ~G4SMuonRPlus(){} + +public: + + static G4SMuonRPlus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); + +}; + +#endif //SLEPTONS_G4SMuonRPlus_H diff --git a/Simulation/G4Extensions/Sleptons/src/G4STauMinus.cxx b/Simulation/G4Extensions/Sleptons/src/G4STau1Minus.cxx similarity index 80% rename from Simulation/G4Extensions/Sleptons/src/G4STauMinus.cxx rename to Simulation/G4Extensions/Sleptons/src/G4STau1Minus.cxx index e8714a67b0b6d51eab2ff2ed390124f32de85791..dbc131862359aa5d062a6921d3fcf74dbc665453 100755 --- a/Simulation/G4Extensions/Sleptons/src/G4STauMinus.cxx +++ b/Simulation/G4Extensions/Sleptons/src/G4STau1Minus.cxx @@ -2,14 +2,14 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "G4STauMinus.hh" +#include "G4STau1Minus.hh" // ###################################################################### -// ### STauMinus ### +// ### STau1Minus ### // ###################################################################### -G4STauMinus* G4STauMinus::theInstance = NULL; +G4STau1Minus* G4STau1Minus::theInstance = NULL; -G4STauMinus* G4STauMinus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) +G4STau1Minus* G4STau1Minus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) { if (theInstance !=0 && (mass>=0. || width>=0. || lifetime>=0.) ) @@ -42,9 +42,9 @@ G4STauMinus* G4STauMinus::Definition(G4double mass, G4double width, G4double cha 0, 0, 0, "slepton", 1, 0, PDG, stable, lifetime, NULL, - shortlived, "STauMinus"); + shortlived, "STau1Minus"); - theInstance = reinterpret_cast<G4STauMinus*>(anInstance); + theInstance = reinterpret_cast<G4STau1Minus*>(anInstance); return theInstance; } else diff --git a/Simulation/G4Extensions/Sleptons/src/G4STau1Minus.hh b/Simulation/G4Extensions/Sleptons/src/G4STau1Minus.hh new file mode 100644 index 0000000000000000000000000000000000000000..8f792e0634189ee942a581d6ff9f6f3e2d5229e8 --- /dev/null +++ b/Simulation/G4Extensions/Sleptons/src/G4STau1Minus.hh @@ -0,0 +1,28 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef SLEPTONS_G4STau1Minus_H +#define SLEPTONS_G4STau1Minus_H + +#include "globals.hh" +#include "G4ios.hh" +#include "G4ParticleDefinition.hh" + +class G4STau1Minus: public G4ParticleDefinition +{ + // singleton implementation + +private: + + static G4STau1Minus* theInstance; + G4STau1Minus(){} + ~G4STau1Minus(){} + +public: + + static G4STau1Minus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); + +}; + +#endif // SLEPTONS_G4STau1Minus_H diff --git a/Simulation/G4Extensions/Sleptons/src/G4SMuonPlus.cxx b/Simulation/G4Extensions/Sleptons/src/G4STau1Plus.cxx similarity index 72% rename from Simulation/G4Extensions/Sleptons/src/G4SMuonPlus.cxx rename to Simulation/G4Extensions/Sleptons/src/G4STau1Plus.cxx index 1e3d0c81e50b3ceca53ee26816941c5857ee2e4c..88d782c479254b5c0e673ae79f992753fbb8aac3 100755 --- a/Simulation/G4Extensions/Sleptons/src/G4SMuonPlus.cxx +++ b/Simulation/G4Extensions/Sleptons/src/G4STau1Plus.cxx @@ -2,23 +2,24 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "G4SMuonPlus.hh" +#include "G4STau1Plus.hh" // ###################################################################### -// ### SMuonPlus ### +// ### STau1Plus ### // ###################################################################### -G4SMuonPlus* G4SMuonPlus::theInstance = NULL; -G4SMuonPlus* G4SMuonPlus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) +G4STau1Plus* G4STau1Plus::theInstance = NULL; + +G4STau1Plus* G4STau1Plus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) { if (theInstance !=0 && (mass>=0. || width>=0. || lifetime>=0.) ) { G4ExceptionDescription description; - description << "Trying to redefine the G4SMuon Plus properties after it has been constructed is not allowed"; - G4Exception("G4SMuonPlus", "FailedRedefinition", FatalException, description); + description << "Trying to redefine the G4STau1 Plus properties after it has been constructed is not allowed"; + G4Exception("G4STau1Plus", "FailedRedefinition", FatalException, description); abort(); - } + } if (theInstance != 0) { @@ -36,22 +37,21 @@ G4SMuonPlus* G4SMuonPlus::Definition(G4double mass, G4double width, G4double cha if (mass >= 0) { G4ParticleDefinition* anInstance = - new G4ParticleDefinition("s_mu_plus_R", mass, width, charge, + new G4ParticleDefinition("s_tau_plus_1", mass, width, charge, 0, 0, 0, 0, 0, 0, "slepton", 1, 0, PDG, stable, lifetime, NULL, - shortlived, "SMuonPlus"); + shortlived, "STau1Plus"); - theInstance = reinterpret_cast<G4SMuonPlus*>(anInstance); + theInstance = reinterpret_cast<G4STau1Plus*>(anInstance); return theInstance; - } else { G4ExceptionDescription description; description << "Trying to create a particle with default constructor is not allowed"; - G4Exception("G4SMuonPlus", "DefaultConstructorCalled", FatalException, description); + G4Exception("G4STau1Plus", "DefaultConstructorCalled", FatalException, description); abort(); } } diff --git a/Simulation/G4Extensions/Sleptons/src/G4STauMinus.hh b/Simulation/G4Extensions/Sleptons/src/G4STau1Plus.hh similarity index 54% rename from Simulation/G4Extensions/Sleptons/src/G4STauMinus.hh rename to Simulation/G4Extensions/Sleptons/src/G4STau1Plus.hh index e6941ba0ead5d7b4812ed9f514cd6f07fa5e3c3d..361451e34d2f28d643bd0636d8c22089fe399455 100644 --- a/Simulation/G4Extensions/Sleptons/src/G4STauMinus.hh +++ b/Simulation/G4Extensions/Sleptons/src/G4STau1Plus.hh @@ -2,27 +2,27 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef SLEPTONS_G4STauMinus_H -#define SLEPTONS_G4STauMinus_H +#ifndef SLEPTONS_G4STau1Plus_H +#define SLEPTONS_G4STau1Plus_H #include "globals.hh" #include "G4ios.hh" #include "G4ParticleDefinition.hh" -class G4STauMinus: public G4ParticleDefinition +class G4STau1Plus: public G4ParticleDefinition { // singleton implementation private: - static G4STauMinus* theInstance; - G4STauMinus(){} - ~G4STauMinus(){} + static G4STau1Plus* theInstance; + G4STau1Plus(){} + ~G4STau1Plus(){} public: - static G4STauMinus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); + static G4STau1Plus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); }; -#endif // SLEPTONS_G4STauMinus_H +#endif // SLEPTONS_G4STau1Plus_H diff --git a/Simulation/G4Extensions/Sleptons/src/G4STau2Minus.cxx b/Simulation/G4Extensions/Sleptons/src/G4STau2Minus.cxx new file mode 100755 index 0000000000000000000000000000000000000000..f139a5ba855dd32c213d7d32b56655e54e2eaa41 --- /dev/null +++ b/Simulation/G4Extensions/Sleptons/src/G4STau2Minus.cxx @@ -0,0 +1,57 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "G4STau2Minus.hh" +// ###################################################################### +// ### STau2Minus ### +// ###################################################################### + +G4STau2Minus* G4STau2Minus::theInstance = NULL; + +G4STau2Minus* G4STau2Minus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) +{ + + if (theInstance !=0 && (mass>=0. || width>=0. || lifetime>=0.) ) + { + G4ExceptionDescription description; + description << "Trying to redefine the G4Stau Minus properties after it has been constructed is not allowed"; + G4Exception("G4StauMinus", "FailedRedefinition", FatalException, description); + abort(); + } + + if (theInstance != 0) + { + return theInstance; + } + + + // Arguments for constructor are as follows + // name mass width charge + // 2*spin parity C-conjugation + // 2*Isospin 2*Isospin3 G-parity + // type lepton number baryon number PDG encoding + // stable lifetime decay table + // shortlived subType anti_encoding + + if (mass >= 0) { + + G4ParticleDefinition* anInstance = + new G4ParticleDefinition("s_tau_minus_2", mass, width, charge, + 0, 0, 0, + 0, 0, 0, + "slepton", 1, 0, PDG, + stable, lifetime, NULL, + shortlived, "STau2Minus"); + + theInstance = reinterpret_cast<G4STau2Minus*>(anInstance); + return theInstance; + } + else + { + G4ExceptionDescription description; + description << "Trying to create a particle with default constructor is not allowed"; + G4Exception("G4StauMinus", "DefaultConstructorCalled", FatalException, description); + abort(); + } +} diff --git a/Simulation/G4Extensions/Sleptons/src/G4STau2Minus.hh b/Simulation/G4Extensions/Sleptons/src/G4STau2Minus.hh new file mode 100644 index 0000000000000000000000000000000000000000..4b285086176f1f42c9de14579c33477b1e93d62b --- /dev/null +++ b/Simulation/G4Extensions/Sleptons/src/G4STau2Minus.hh @@ -0,0 +1,28 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef SLEPTONS_G4STau2Minus_H +#define SLEPTONS_G4STau2Minus_H + +#include "globals.hh" +#include "G4ios.hh" +#include "G4ParticleDefinition.hh" + +class G4STau2Minus: public G4ParticleDefinition +{ + // singleton implementation + +private: + + static G4STau2Minus* theInstance; + G4STau2Minus(){} + ~G4STau2Minus(){} + +public: + + static G4STau2Minus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); + +}; + +#endif // SLEPTONS_G4STau2Minus_H diff --git a/Simulation/G4Extensions/Sleptons/src/G4STauPlus.cxx b/Simulation/G4Extensions/Sleptons/src/G4STau2Plus.cxx similarity index 64% rename from Simulation/G4Extensions/Sleptons/src/G4STauPlus.cxx rename to Simulation/G4Extensions/Sleptons/src/G4STau2Plus.cxx index 5a2100351fd1ab2f733d716e2f08865efe5c17d5..c7a76c31132f1a6742beba11e0f0e1fe82e17a0b 100755 --- a/Simulation/G4Extensions/Sleptons/src/G4STauPlus.cxx +++ b/Simulation/G4Extensions/Sleptons/src/G4STau2Plus.cxx @@ -2,22 +2,22 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "G4STauPlus.hh" +#include "G4STau2Plus.hh" // ###################################################################### -// ### STauPlus ### +// ### STau2Plus ### // ###################################################################### -G4STauPlus* G4STauPlus::theInstance = NULL; +G4STau2Plus* G4STau2Plus::theInstance = NULL; -G4STauPlus* G4STauPlus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) +G4STau2Plus* G4STau2Plus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived) { if (theInstance !=0 && (mass>=0. || width>=0. || lifetime>=0.) ) { G4ExceptionDescription description; - description << "Trying to redefine the G4STau Plus properties after it has been constructed is not allowed"; - G4Exception("G4STauPlus", "FailedRedefinition", FatalException, description); + description << "Trying to redefine the G4STau2 Plus properties after it has been constructed is not allowed"; + G4Exception("G4STau2Plus", "FailedRedefinition", FatalException, description); abort(); } @@ -37,21 +37,21 @@ G4STauPlus* G4STauPlus::Definition(G4double mass, G4double width, G4double charg if (mass >= 0) { G4ParticleDefinition* anInstance = - new G4ParticleDefinition("s_tau_plus_1", mass, width, charge, + new G4ParticleDefinition("s_tau_plus_2", mass, width, charge, 0, 0, 0, 0, 0, 0, "slepton", 1, 0, PDG, stable, lifetime, NULL, - shortlived, "STauPlus"); + shortlived, "STau2Plus"); - theInstance = reinterpret_cast<G4STauPlus*>(anInstance); + theInstance = reinterpret_cast<G4STau2Plus*>(anInstance); return theInstance; } else { G4ExceptionDescription description; description << "Trying to create a particle with default constructor is not allowed"; - G4Exception("G4STauPlus", "DefaultConstructorCalled", FatalException, description); + G4Exception("G4STau2Plus", "DefaultConstructorCalled", FatalException, description); abort(); } } diff --git a/Simulation/G4Extensions/Sleptons/src/G4SMuonPlus.hh b/Simulation/G4Extensions/Sleptons/src/G4STau2Plus.hh similarity index 54% rename from Simulation/G4Extensions/Sleptons/src/G4SMuonPlus.hh rename to Simulation/G4Extensions/Sleptons/src/G4STau2Plus.hh index 1e1bf47e669571cbaff75e44bceaf1e31d4ea5b7..9e05a53061a4441ad78318bc1c12e8aaa0bb2dde 100644 --- a/Simulation/G4Extensions/Sleptons/src/G4SMuonPlus.hh +++ b/Simulation/G4Extensions/Sleptons/src/G4STau2Plus.hh @@ -2,27 +2,27 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef SLEPTONS_G4SMuonPlus_H -#define SLEPTONS_G4SMuonPlus_H +#ifndef SLEPTONS_G4STau2Plus_H +#define SLEPTONS_G4STau2Plus_H #include "globals.hh" #include "G4ios.hh" #include "G4ParticleDefinition.hh" -class G4SMuonPlus: public G4ParticleDefinition +class G4STau2Plus: public G4ParticleDefinition { // singleton implementation private: - static G4SMuonPlus* theInstance; - G4SMuonPlus(){} - ~G4SMuonPlus(){} + static G4STau2Plus* theInstance; + G4STau2Plus(){} + ~G4STau2Plus(){} public: - static G4SMuonPlus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); + static G4STau2Plus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); }; -#endif //SLEPTONS_G4SMuonPlus_H +#endif // SLEPTONS_G4STau2Plus_H diff --git a/Simulation/G4Extensions/Sleptons/src/G4STauPlus.hh b/Simulation/G4Extensions/Sleptons/src/G4STauPlus.hh deleted file mode 100644 index 38082df3b772998c233bafd26dc44a75c22d2280..0000000000000000000000000000000000000000 --- a/Simulation/G4Extensions/Sleptons/src/G4STauPlus.hh +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef SLEPTONS_G4STauPlus_H -#define SLEPTONS_G4STauPlus_H - -#include "globals.hh" -#include "G4ios.hh" -#include "G4ParticleDefinition.hh" - -class G4STauPlus: public G4ParticleDefinition -{ - // singleton implementation - -private: - - static G4STauPlus* theInstance; - G4STauPlus(){} - ~G4STauPlus(){} - -public: - - static G4STauPlus* Definition(G4double mass=-1, G4double width=-1, G4double charge=-1, G4double PDG=-1, G4bool stable=true, G4double lifetime=-1, G4bool shortlived=false); - -}; - -#endif // SLEPTONS_G4STauPlus_H diff --git a/Simulation/G4Extensions/Sleptons/src/SleptonsPhysicsTool.cxx b/Simulation/G4Extensions/Sleptons/src/SleptonsPhysicsTool.cxx index dff042f6a6bf3ae8ca97ca69c1a724f25d1a51b7..9889a9f7d6834051825a3630a6d31df973ca087f 100644 --- a/Simulation/G4Extensions/Sleptons/src/SleptonsPhysicsTool.cxx +++ b/Simulation/G4Extensions/Sleptons/src/SleptonsPhysicsTool.cxx @@ -5,12 +5,18 @@ // class header #include "SleptonsPhysicsTool.h" // package headers -#include "G4SElectronMinus.hh" -#include "G4SElectronPlus.hh" -#include "G4SMuonMinus.hh" -#include "G4SMuonPlus.hh" -#include "G4STauMinus.hh" -#include "G4STauPlus.hh" +#include "G4SElectronLMinus.hh" +#include "G4SElectronLPlus.hh" +#include "G4SMuonLMinus.hh" +#include "G4SMuonLPlus.hh" +#include "G4STau1Minus.hh" +#include "G4STau1Plus.hh" +#include "G4SElectronRMinus.hh" +#include "G4SElectronRPlus.hh" +#include "G4SMuonRMinus.hh" +#include "G4SMuonRPlus.hh" +#include "G4STau2Minus.hh" +#include "G4STau2Plus.hh" // Geant4 headers #include "G4hIonisation.hh" #include "G4hMultipleScattering.hh" @@ -39,63 +45,114 @@ SleptonsPhysicsTool::SleptonsPhysicsTool( const std::string& type, const std::string& name,const IInterface* parent ) : base_class ( type, name , parent ) - , m_theSElectronMinus(nullptr) - , m_theSElectronPlus(nullptr) - , m_theSMuonMinus(nullptr) - , m_theSMuonPlus(nullptr) - , m_theSTauMinus(nullptr) - , m_theSTauPlus(nullptr) + , m_theSElectronLMinus(nullptr) + , m_theSElectronLPlus(nullptr) + , m_theSMuonLMinus(nullptr) + , m_theSMuonLPlus(nullptr) + , m_theSTau1Minus(nullptr) + , m_theSTau1Plus(nullptr) + , m_theSElectronRMinus(nullptr) + , m_theSElectronRPlus(nullptr) + , m_theSMuonRMinus(nullptr) + , m_theSMuonRPlus(nullptr) + , m_theSTau2Minus(nullptr) + , m_theSTau2Plus(nullptr) { - declareProperty("G4SElectronMinusMass",m_G4SElectronMinusMass=100.00*CLHEP::GeV,"G4SElectronMinus Mass"); - declareProperty("G4SElectronMinusWidth",m_G4SElectronMinusWidth=0.0*CLHEP::MeV,"G4SElectronMinus Width"); - declareProperty("G4SElectronMinusCharge",m_G4SElectronMinusCharge=-1.*CLHEP::eplus,"G4SElectronMinus charge"); - declareProperty("G4SElectronMinusPDGCode",m_G4SElectronMinusPDGCode=2000011,"G4SElectronMinus PDG CODE"); - declareProperty("G4SElectronMinusStable",m_G4SElectronMinusStable=true,"G4SElectronMinus Stable"); - declareProperty("G4SElectronMinusLifetime",m_G4SElectronMinusLifetime=-1,"G4SElectronMinus Lifetime"); - declareProperty("G4SElectronMinusShortlived",m_G4SElectronMinusShortlived=false,"G4SElectronMinus Shortlived"); - - declareProperty("G4SElectronPlusMass",m_G4SElectronPlusMass= 100.0*CLHEP::GeV,"G4SElectronPlus Mass"); - declareProperty("G4SElectronPlusWidth",m_G4SElectronPlusWidth=0.0*CLHEP::MeV,"G4SElectronPlus Width"); - declareProperty("G4SElectronPlusCharge",m_G4SElectronPlusCharge=+1.*CLHEP::eplus,"G4SElectronPlus charge"); - declareProperty("G4SElectronPlusPDGCode",m_G4SElectronPlusPDGCode=-2000011,"G4SElectronPlus PDG CODE"); - declareProperty("G4SElectronPlusStable",m_G4SElectronPlusStable=true,"G4SElectronPlus Stable"); - declareProperty("G4SElectronPlusLifetime",m_G4SElectronPlusLifetime=-1,"G4SElectronPlus Lifetime"); - declareProperty("G4SElectronPlusShortlived",m_G4SElectronPlusShortlived=false,"G4SElectronPlus Shortlived"); - - declareProperty("G4SMuonMinusMass",m_G4SMuonMinusMass= 100.0*CLHEP::GeV,"G4SMuonMinus Mass"); - declareProperty("G4SMuonMinusWidth",m_G4SMuonMinusWidth=0.0*CLHEP::MeV,"G4SMuonMinus Width"); - declareProperty("G4SMuonMinusCharge",m_G4SMuonMinusCharge=-1.*CLHEP::eplus,"G4SMuonMinus charge"); - declareProperty("G4SMuonMinusPDGCode",m_G4SMuonMinusPDGCode=2000013,"G4SMuonMinus PDG CODE"); - declareProperty("G4SMuonMinusStable",m_G4SMuonMinusStable=true,"G4SMuonMinus Stable"); - declareProperty("G4SMuonMinusLifetime",m_G4SMuonMinusLifetime=-1,"G4SMuonMinus Lifetime"); - declareProperty("G4SMuonMinusShortlived",m_G4SMuonMinusShortlived=false,"G4SMuonMinus Shortlived"); - - declareProperty("G4SMuonPlusMass",m_G4SMuonPlusMass= 100.0*CLHEP::GeV,"G4SMuonPlus Mass"); - declareProperty("G4SMuonPlusWidth",m_G4SMuonPlusWidth=0.0*CLHEP::MeV,"G4SMuonPlus Width"); - declareProperty("G4SMuonPlusCharge",m_G4SMuonPlusCharge=1.*CLHEP::eplus,"G4SMuonPlus charge"); - declareProperty("G4SMuonPlusPDGCode",m_G4SMuonPlusPDGCode=-2000013,"G4SMuonPlus PDG CODE"); - declareProperty("G4SMuonPlusStable",m_G4SMuonPlusStable=true,"G4SMuonPlus Stable"); - declareProperty("G4SMuonPlusLifetime",m_G4SMuonPlusLifetime=-1,"G4SMuonPlus Lifetime"); - declareProperty("G4SMuonPlusShortlived",m_G4SMuonPlusShortlived=false,"G4SMuonPlus Shortlived"); - - declareProperty("G4STauMinusMass",m_G4STauMinusMass= 100.0*CLHEP::GeV,"G4STauMinus Mass"); - declareProperty("G4STauMinusWidth",m_G4STauMinusWidth=0.0*CLHEP::MeV,"G4STauMinus Width"); - declareProperty("G4STauMinusCharge",m_G4STauMinusCharge=-1.*CLHEP::eplus,"G4STauMinus charge"); - declareProperty("G4STauMinusPDGCode",m_G4STauMinusPDGCode= 1000015,"G4STauMinus PDG CODE"); - declareProperty("G4STauMinusStable",m_G4STauMinusStable=true,"G4STauMinus Stable"); - declareProperty("G4STauMinusLifetime",m_G4STauMinusLifetime=-1,"G4STauMinus Lifetime"); - declareProperty("G4STauMinusShortlived",m_G4STauMinusShortlived=false,"G4STauMinus Shortlived"); - - declareProperty("G4STauPlusMass",m_G4STauPlusMass= 100.0*CLHEP::GeV,"G4STauPlus Mass"); - declareProperty("G4STauPlusWidth",m_G4STauPlusWidth=0.0*CLHEP::MeV,"G4STauPlus Width"); - declareProperty("G4STauPlusCharge",m_G4STauPlusCharge=+1.*CLHEP::eplus,"G4STauPlus charge"); - declareProperty("G4STauPlusPDGCode",m_G4STauPlusPDGCode=-1000015,"G4STauPlus PDG CODE"); - declareProperty("G4STauPlusStable",m_G4STauPlusStable=true,"G4STauPlus Stable"); - declareProperty("G4STauPlusLifetime",m_G4STauPlusLifetime=-1,"G4STauPlus Lifetime"); - declareProperty("G4STauPlusShortlived",m_G4STauPlusShortlived=false,"G4STauPlus Shortlived"); - - - + declareProperty("G4SElectronLMinusMass",m_G4SElectronLMinusMass=100.00*CLHEP::GeV,"G4SElectronLMinus Mass"); + declareProperty("G4SElectronLMinusWidth",m_G4SElectronLMinusWidth=0.0*CLHEP::MeV,"G4SElectronLMinus Width"); + declareProperty("G4SElectronLMinusCharge",m_G4SElectronLMinusCharge=-1.*CLHEP::eplus,"G4SElectronLMinus charge"); + declareProperty("G4SElectronLMinusPDGCode",m_G4SElectronLMinusPDGCode=2000011,"G4SElectronLMinus PDG CODE"); + declareProperty("G4SElectronLMinusStable",m_G4SElectronLMinusStable=true,"G4SElectronLMinus Stable"); + declareProperty("G4SElectronLMinusLifetime",m_G4SElectronLMinusLifetime=-1,"G4SElectronLMinus Lifetime"); + declareProperty("G4SElectronLMinusShortlived",m_G4SElectronLMinusShortlived=false,"G4SElectronLMinus Shortlived"); + + declareProperty("G4SElectronLPlusMass",m_G4SElectronLPlusMass= 100.0*CLHEP::GeV,"G4SElectronLPlus Mass"); + declareProperty("G4SElectronLPlusWidth",m_G4SElectronLPlusWidth=0.0*CLHEP::MeV,"G4SElectronLPlus Width"); + declareProperty("G4SElectronLPlusCharge",m_G4SElectronLPlusCharge=+1.*CLHEP::eplus,"G4SElectronLPlus charge"); + declareProperty("G4SElectronLPlusPDGCode",m_G4SElectronLPlusPDGCode=-2000011,"G4SElectronLPlus PDG CODE"); + declareProperty("G4SElectronLPlusStable",m_G4SElectronLPlusStable=true,"G4SElectronLPlus Stable"); + declareProperty("G4SElectronLPlusLifetime",m_G4SElectronLPlusLifetime=-1,"G4SElectronLPlus Lifetime"); + declareProperty("G4SElectronLPlusShortlived",m_G4SElectronLPlusShortlived=false,"G4SElectronLPlus Shortlived"); + + declareProperty("G4SMuonLMinusMass",m_G4SMuonLMinusMass= 100.0*CLHEP::GeV,"G4SMuonLMinus Mass"); + declareProperty("G4SMuonLMinusWidth",m_G4SMuonLMinusWidth=0.0*CLHEP::MeV,"G4SMuonLMinus Width"); + declareProperty("G4SMuonLMinusCharge",m_G4SMuonLMinusCharge=-1.*CLHEP::eplus,"G4SMuonLMinus charge"); + declareProperty("G4SMuonLMinusPDGCode",m_G4SMuonLMinusPDGCode=2000013,"G4SMuonLMinus PDG CODE"); + declareProperty("G4SMuonLMinusStable",m_G4SMuonLMinusStable=true,"G4SMuonLMinus Stable"); + declareProperty("G4SMuonLMinusLifetime",m_G4SMuonLMinusLifetime=-1,"G4SMuonLMinus Lifetime"); + declareProperty("G4SMuonLMinusShortlived",m_G4SMuonLMinusShortlived=false,"G4SMuonLMinus Shortlived"); + + declareProperty("G4SMuonLPlusMass",m_G4SMuonLPlusMass= 100.0*CLHEP::GeV,"G4SMuonLPlus Mass"); + declareProperty("G4SMuonLPlusWidth",m_G4SMuonLPlusWidth=0.0*CLHEP::MeV,"G4SMuonLPlus Width"); + declareProperty("G4SMuonLPlusCharge",m_G4SMuonLPlusCharge=1.*CLHEP::eplus,"G4SMuonLPlus charge"); + declareProperty("G4SMuonLPlusPDGCode",m_G4SMuonLPlusPDGCode=-2000013,"G4SMuonLPlus PDG CODE"); + declareProperty("G4SMuonLPlusStable",m_G4SMuonLPlusStable=true,"G4SMuonLPlus Stable"); + declareProperty("G4SMuonLPlusLifetime",m_G4SMuonLPlusLifetime=-1,"G4SMuonLPlus Lifetime"); + declareProperty("G4SMuonLPlusShortlived",m_G4SMuonLPlusShortlived=false,"G4SMuonLPlus Shortlived"); + + declareProperty("G4STau1MinusMass",m_G4STau1MinusMass= 100.0*CLHEP::GeV,"G4STau1Minus Mass"); + declareProperty("G4STau1MinusWidth",m_G4STau1MinusWidth=0.0*CLHEP::MeV,"G4STau1Minus Width"); + declareProperty("G4STau1MinusCharge",m_G4STau1MinusCharge=-1.*CLHEP::eplus,"G4STau1Minus charge"); + declareProperty("G4STau1MinusPDGCode",m_G4STau1MinusPDGCode= 1000015,"G4STau1Minus PDG CODE"); + declareProperty("G4STau1MinusStable",m_G4STau1MinusStable=true,"G4STau1Minus Stable"); + declareProperty("G4STau1MinusLifetime",m_G4STau1MinusLifetime=-1,"G4STau1Minus Lifetime"); + declareProperty("G4STau1MinusShortlived",m_G4STau1MinusShortlived=false,"G4STau1Minus Shortlived"); + + declareProperty("G4STau1PlusMass",m_G4STau1PlusMass= 100.0*CLHEP::GeV,"G4STau1Plus Mass"); + declareProperty("G4STau1PlusWidth",m_G4STau1PlusWidth=0.0*CLHEP::MeV,"G4STau1Plus Width"); + declareProperty("G4STau1PlusCharge",m_G4STau1PlusCharge=+1.*CLHEP::eplus,"G4STau1Plus charge"); + declareProperty("G4STau1PlusPDGCode",m_G4STau1PlusPDGCode=-1000015,"G4STau1Plus PDG CODE"); + declareProperty("G4STau1PlusStable",m_G4STau1PlusStable=true,"G4STau1Plus Stable"); + declareProperty("G4STau1PlusLifetime",m_G4STau1PlusLifetime=-1,"G4STau1Plus Lifetime"); + declareProperty("G4STau1PlusShortlived",m_G4STau1PlusShortlived=false,"G4STau1Plus Shortlived"); + + declareProperty("G4SElectronRMinusMass",m_G4SElectronRMinusMass=100.00*CLHEP::GeV,"G4SElectronRMinus Mass"); + declareProperty("G4SElectronRMinusWidth",m_G4SElectronRMinusWidth=0.0*CLHEP::MeV,"G4SElectronRMinus Width"); + declareProperty("G4SElectronRMinusCharge",m_G4SElectronRMinusCharge=-1.*CLHEP::eplus,"G4SElectronRMinus charge"); + declareProperty("G4SElectronRMinusPDGCode",m_G4SElectronRMinusPDGCode=2000011,"G4SElectronRMinus PDG CODE"); + declareProperty("G4SElectronRMinusStable",m_G4SElectronRMinusStable=true,"G4SElectronRMinus Stable"); + declareProperty("G4SElectronRMinusLifetime",m_G4SElectronRMinusLifetime=-1,"G4SElectronRMinus Lifetime"); + declareProperty("G4SElectronRMinusShortlived",m_G4SElectronRMinusShortlived=false,"G4SElectronRMinus Shortlived"); + + declareProperty("G4SElectronRPlusMass",m_G4SElectronRPlusMass= 100.0*CLHEP::GeV,"G4SElectronRPlus Mass"); + declareProperty("G4SElectronRPlusWidth",m_G4SElectronRPlusWidth=0.0*CLHEP::MeV,"G4SElectronRPlus Width"); + declareProperty("G4SElectronRPlusCharge",m_G4SElectronRPlusCharge=+1.*CLHEP::eplus,"G4SElectronRPlus charge"); + declareProperty("G4SElectronRPlusPDGCode",m_G4SElectronRPlusPDGCode=-2000011,"G4SElectronRPlus PDG CODE"); + declareProperty("G4SElectronRPlusStable",m_G4SElectronRPlusStable=true,"G4SElectronRPlus Stable"); + declareProperty("G4SElectronRPlusLifetime",m_G4SElectronRPlusLifetime=-1,"G4SElectronRPlus Lifetime"); + declareProperty("G4SElectronRPlusShortlived",m_G4SElectronRPlusShortlived=false,"G4SElectronRPlus Shortlived"); + + declareProperty("G4SMuonRMinusMass",m_G4SMuonRMinusMass= 100.0*CLHEP::GeV,"G4SMuonRMinus Mass"); + declareProperty("G4SMuonRMinusWidth",m_G4SMuonRMinusWidth=0.0*CLHEP::MeV,"G4SMuonRMinus Width"); + declareProperty("G4SMuonRMinusCharge",m_G4SMuonRMinusCharge=-1.*CLHEP::eplus,"G4SMuonRMinus charge"); + declareProperty("G4SMuonRMinusPDGCode",m_G4SMuonRMinusPDGCode=2000013,"G4SMuonRMinus PDG CODE"); + declareProperty("G4SMuonRMinusStable",m_G4SMuonRMinusStable=true,"G4SMuonRMinus Stable"); + declareProperty("G4SMuonRMinusLifetime",m_G4SMuonRMinusLifetime=-1,"G4SMuonRMinus Lifetime"); + declareProperty("G4SMuonRMinusShortlived",m_G4SMuonRMinusShortlived=false,"G4SMuonRMinus Shortlived"); + + declareProperty("G4SMuonRPlusMass",m_G4SMuonRPlusMass= 100.0*CLHEP::GeV,"G4SMuonRPlus Mass"); + declareProperty("G4SMuonRPlusWidth",m_G4SMuonRPlusWidth=0.0*CLHEP::MeV,"G4SMuonRPlus Width"); + declareProperty("G4SMuonRPlusCharge",m_G4SMuonRPlusCharge=1.*CLHEP::eplus,"G4SMuonRPlus charge"); + declareProperty("G4SMuonRPlusPDGCode",m_G4SMuonRPlusPDGCode=-2000013,"G4SMuonRPlus PDG CODE"); + declareProperty("G4SMuonRPlusStable",m_G4SMuonRPlusStable=true,"G4SMuonRPlus Stable"); + declareProperty("G4SMuonRPlusLifetime",m_G4SMuonRPlusLifetime=-1,"G4SMuonRPlus Lifetime"); + declareProperty("G4SMuonRPlusShortlived",m_G4SMuonRPlusShortlived=false,"G4SMuonRPlus Shortlived"); + + declareProperty("G4STau2MinusMass",m_G4STau2MinusMass= 100.0*CLHEP::GeV,"G4STau2Minus Mass"); + declareProperty("G4STau2MinusWidth",m_G4STau2MinusWidth=0.0*CLHEP::MeV,"G4STau2Minus Width"); + declareProperty("G4STau2MinusCharge",m_G4STau2MinusCharge=-1.*CLHEP::eplus,"G4STau2Minus charge"); + declareProperty("G4STau2MinusPDGCode",m_G4STau2MinusPDGCode= 1000015,"G4STau2Minus PDG CODE"); + declareProperty("G4STau2MinusStable",m_G4STau2MinusStable=true,"G4STau2Minus Stable"); + declareProperty("G4STau2MinusLifetime",m_G4STau2MinusLifetime=-1,"G4STau2Minus Lifetime"); + declareProperty("G4STau2MinusShortlived",m_G4STau2MinusShortlived=false,"G4STau2Minus Shortlived"); + + declareProperty("G4STau2PlusMass",m_G4STau2PlusMass= 100.0*CLHEP::GeV,"G4STau2Plus Mass"); + declareProperty("G4STau2PlusWidth",m_G4STau2PlusWidth=0.0*CLHEP::MeV,"G4STau2Plus Width"); + declareProperty("G4STau2PlusCharge",m_G4STau2PlusCharge=+1.*CLHEP::eplus,"G4STau2Plus charge"); + declareProperty("G4STau2PlusPDGCode",m_G4STau2PlusPDGCode=-1000015,"G4STau2Plus PDG CODE"); + declareProperty("G4STau2PlusStable",m_G4STau2PlusStable=true,"G4STau2Plus Stable"); + declareProperty("G4STau2PlusLifetime",m_G4STau2PlusLifetime=-1,"G4STau2Plus Lifetime"); + declareProperty("G4STau2PlusShortlived",m_G4STau2PlusShortlived=false,"G4STau2Plus Shortlived"); } //============================================================================= @@ -127,18 +184,53 @@ void SleptonsPhysicsTool::ConstructParticle() { ATH_MSG_DEBUG("ConstructParticle for the Sleptons being run"); + if (m_G4SElectronRMinusMass>0. && std::abs(m_G4SElectronRMinusPDGCode)>=2000000){ + m_theSElectronRMinus = G4SElectronRMinus::Definition(m_G4SElectronRMinusMass, m_G4SElectronRMinusWidth, m_G4SElectronRMinusCharge, m_G4SElectronRMinusPDGCode, m_G4SElectronRMinusStable, m_G4SElectronRMinusLifetime, m_G4SElectronRMinusShortlived ); + } + + if (m_G4SElectronRPlusMass>0. && std::abs(m_G4SElectronRPlusPDGCode)>=2000000){ + m_theSElectronRPlus = G4SElectronRPlus::Definition(m_G4SElectronRPlusMass, m_G4SElectronRPlusWidth, m_G4SElectronRPlusCharge, m_G4SElectronRPlusPDGCode, m_G4SElectronRPlusStable, m_G4SElectronRPlusLifetime, m_G4SElectronRPlusShortlived ); + } + + if (m_G4SMuonRMinusMass>0. && std::abs(m_G4SMuonRMinusPDGCode)>=2000000){ + m_theSMuonRMinus = G4SMuonRMinus::Definition(m_G4SMuonRMinusMass, m_G4SMuonRMinusWidth, m_G4SMuonRMinusCharge, m_G4SMuonRMinusPDGCode, m_G4SMuonRMinusStable, m_G4SMuonRMinusLifetime, m_G4SMuonRMinusShortlived ); + } + + if (m_G4SMuonRPlusMass>0. && std::abs(m_G4SMuonRPlusPDGCode)>=2000000){ + m_theSMuonRPlus = G4SMuonRPlus::Definition(m_G4SMuonRPlusMass, m_G4SMuonRPlusWidth, m_G4SMuonRPlusCharge, m_G4SMuonRPlusPDGCode, m_G4SMuonRPlusStable, m_G4SMuonRPlusLifetime, m_G4SMuonRPlusShortlived ); + } + + if (m_G4STau1MinusMass>0. && std::abs(m_G4STau1MinusPDGCode)<2000000){ + m_theSTau1Minus=G4STau1Minus::Definition(m_G4STau1MinusMass, m_G4STau1MinusWidth, m_G4STau1MinusCharge, m_G4STau1MinusPDGCode, m_G4STau1MinusStable, m_G4STau1MinusLifetime, m_G4STau1MinusShortlived ); + } - m_theSElectronMinus = G4SElectronMinus::Definition(m_G4SElectronMinusMass, m_G4SElectronMinusWidth, m_G4SElectronMinusCharge, m_G4SElectronMinusPDGCode, m_G4SElectronMinusStable, m_G4SElectronMinusLifetime, m_G4SElectronMinusShortlived ); + if (m_G4STau1PlusMass>0. && std::abs(m_G4STau1PlusPDGCode)<2000000){ + m_theSTau1Plus=G4STau1Plus::Definition(m_G4STau1PlusMass, m_G4STau1PlusWidth, m_G4STau1PlusCharge, m_G4STau1PlusPDGCode, m_G4STau1PlusStable, m_G4STau1PlusLifetime, m_G4STau1PlusShortlived ); + } + + if (m_G4SElectronLMinusMass>0. && std::abs(m_G4SElectronLMinusPDGCode)<2000000){ + m_theSElectronLMinus = G4SElectronLMinus::Definition(m_G4SElectronLMinusMass, m_G4SElectronLMinusWidth, m_G4SElectronLMinusCharge, m_G4SElectronLMinusPDGCode, m_G4SElectronLMinusStable, m_G4SElectronLMinusLifetime, m_G4SElectronLMinusShortlived ); + } - m_theSElectronPlus = G4SElectronPlus::Definition(m_G4SElectronPlusMass, m_G4SElectronPlusWidth, m_G4SElectronPlusCharge, m_G4SElectronPlusPDGCode, m_G4SElectronPlusStable, m_G4SElectronPlusLifetime, m_G4SElectronPlusShortlived ); + if (m_G4SElectronLPlusMass>0. && std::abs(m_G4SElectronLPlusPDGCode)<2000000){ + m_theSElectronLPlus = G4SElectronLPlus::Definition(m_G4SElectronLPlusMass, m_G4SElectronLPlusWidth, m_G4SElectronLPlusCharge, m_G4SElectronLPlusPDGCode, m_G4SElectronLPlusStable, m_G4SElectronLPlusLifetime, m_G4SElectronLPlusShortlived ); + } - m_theSMuonMinus = G4SMuonMinus::Definition(m_G4SMuonMinusMass, m_G4SMuonMinusWidth, m_G4SMuonMinusCharge, m_G4SMuonMinusPDGCode, m_G4SMuonMinusStable, m_G4SMuonMinusLifetime, m_G4SMuonMinusShortlived ); + if (m_G4SMuonLMinusMass>0. && std::abs(m_G4SMuonLMinusPDGCode)<2000000){ + m_theSMuonLMinus = G4SMuonLMinus::Definition(m_G4SMuonLMinusMass, m_G4SMuonLMinusWidth, m_G4SMuonLMinusCharge, m_G4SMuonLMinusPDGCode, m_G4SMuonLMinusStable, m_G4SMuonLMinusLifetime, m_G4SMuonLMinusShortlived ); + } - m_theSMuonPlus = G4SMuonPlus::Definition(m_G4SMuonPlusMass, m_G4SMuonPlusWidth, m_G4SMuonPlusCharge, m_G4SMuonPlusPDGCode, m_G4SMuonPlusStable, m_G4SMuonPlusLifetime, m_G4SMuonPlusShortlived ); + if (m_G4SMuonLPlusMass>0. && std::abs(m_G4SMuonLPlusPDGCode)<2000000){ + m_theSMuonLPlus = G4SMuonLPlus::Definition(m_G4SMuonLPlusMass, m_G4SMuonLPlusWidth, m_G4SMuonLPlusCharge, m_G4SMuonLPlusPDGCode, m_G4SMuonLPlusStable, m_G4SMuonLPlusLifetime, m_G4SMuonLPlusShortlived ); + } - m_theSTauMinus=G4STauMinus::Definition(m_G4STauMinusMass, m_G4STauMinusWidth, m_G4STauMinusCharge, m_G4STauMinusPDGCode, m_G4STauMinusStable, m_G4STauMinusLifetime, m_G4STauMinusShortlived ); + if (m_G4STau2MinusMass>0. && std::abs(m_G4STau2MinusPDGCode)>=2000000){ + m_theSTau2Minus=G4STau2Minus::Definition(m_G4STau2MinusMass, m_G4STau2MinusWidth, m_G4STau2MinusCharge, m_G4STau2MinusPDGCode, m_G4STau2MinusStable, m_G4STau2MinusLifetime, m_G4STau2MinusShortlived ); + } - m_theSTauPlus=G4STauPlus::Definition(m_G4STauPlusMass, m_G4STauPlusWidth, m_G4STauPlusCharge, m_G4STauPlusPDGCode, m_G4STauPlusStable, m_G4STauPlusLifetime, m_G4STauPlusShortlived ); + if (m_G4STau2PlusMass>0. && std::abs(m_G4STau2PlusPDGCode)>=2000000){ + m_theSTau2Plus=G4STau2Plus::Definition(m_G4STau2PlusMass, m_G4STau2PlusWidth, m_G4STau2PlusCharge, m_G4STau2PlusPDGCode, m_G4STau2PlusStable, m_G4STau2PlusLifetime, m_G4STau2PlusShortlived ); + } } @@ -149,7 +241,7 @@ void SleptonsPhysicsTool::ConstructProcess() while( (*PARTICLEITERATOR)() ){ G4ParticleDefinition* particle = PARTICLEITERATOR->value(); int pdgcode=std::abs(particle->GetPDGEncoding()); - if (pdgcode==2000011 || pdgcode==2000013 || pdgcode==1000015) + if (pdgcode==2000011 || pdgcode==2000013 || pdgcode==1000015 || pdgcode==1000011 || pdgcode==1000013 || pdgcode==2000015) { G4ProcessManager* proc=particle->GetProcessManager(); proc->AddProcess(new G4hMultipleScattering,-1,1,1); diff --git a/Simulation/G4Extensions/Sleptons/src/SleptonsPhysicsTool.h b/Simulation/G4Extensions/Sleptons/src/SleptonsPhysicsTool.h index d55b4e75b772aef9c0ed9b86b7e037eae4f44cf8..416333bca56f5354bd8cf376a562c28278a7a098 100644 --- a/Simulation/G4Extensions/Sleptons/src/SleptonsPhysicsTool.h +++ b/Simulation/G4Extensions/Sleptons/src/SleptonsPhysicsTool.h @@ -42,31 +42,58 @@ public: protected: - G4double m_G4SElectronMinusMass, m_G4SElectronMinusWidth, m_G4SElectronMinusCharge, m_G4SElectronMinusPDGCode, m_G4SElectronMinusLifetime; - G4bool m_G4SElectronMinusShortlived, m_G4SElectronMinusStable; + G4double m_G4SElectronLMinusMass, m_G4SElectronLMinusWidth, m_G4SElectronLMinusCharge, m_G4SElectronLMinusPDGCode, m_G4SElectronLMinusLifetime; + G4bool m_G4SElectronLMinusShortlived, m_G4SElectronLMinusStable; - G4double m_G4SElectronPlusMass, m_G4SElectronPlusWidth, m_G4SElectronPlusCharge, m_G4SElectronPlusPDGCode, m_G4SElectronPlusLifetime; - G4bool m_G4SElectronPlusShortlived, m_G4SElectronPlusStable; + G4double m_G4SElectronLPlusMass, m_G4SElectronLPlusWidth, m_G4SElectronLPlusCharge, m_G4SElectronLPlusPDGCode, m_G4SElectronLPlusLifetime; + G4bool m_G4SElectronLPlusShortlived, m_G4SElectronLPlusStable; - G4double m_G4SMuonMinusMass, m_G4SMuonMinusWidth, m_G4SMuonMinusCharge, m_G4SMuonMinusPDGCode, m_G4SMuonMinusLifetime; - G4bool m_G4SMuonMinusShortlived, m_G4SMuonMinusStable; + G4double m_G4SMuonLMinusMass, m_G4SMuonLMinusWidth, m_G4SMuonLMinusCharge, m_G4SMuonLMinusPDGCode, m_G4SMuonLMinusLifetime; + G4bool m_G4SMuonLMinusShortlived, m_G4SMuonLMinusStable; - G4double m_G4SMuonPlusMass, m_G4SMuonPlusWidth, m_G4SMuonPlusCharge, m_G4SMuonPlusPDGCode, m_G4SMuonPlusLifetime; - G4bool m_G4SMuonPlusShortlived, m_G4SMuonPlusStable; + G4double m_G4SMuonLPlusMass, m_G4SMuonLPlusWidth, m_G4SMuonLPlusCharge, m_G4SMuonLPlusPDGCode, m_G4SMuonLPlusLifetime; + G4bool m_G4SMuonLPlusShortlived, m_G4SMuonLPlusStable; - G4double m_G4STauMinusMass, m_G4STauMinusWidth, m_G4STauMinusCharge, m_G4STauMinusPDGCode, m_G4STauMinusLifetime; - G4bool m_G4STauMinusShortlived, m_G4STauMinusStable; + G4double m_G4STau1MinusMass, m_G4STau1MinusWidth, m_G4STau1MinusCharge, m_G4STau1MinusPDGCode, m_G4STau1MinusLifetime; + G4bool m_G4STau1MinusShortlived, m_G4STau1MinusStable; - G4double m_G4STauPlusMass, m_G4STauPlusWidth, m_G4STauPlusCharge, m_G4STauPlusPDGCode, m_G4STauPlusLifetime; - G4bool m_G4STauPlusShortlived, m_G4STauPlusStable; + G4double m_G4STau1PlusMass, m_G4STau1PlusWidth, m_G4STau1PlusCharge, m_G4STau1PlusPDGCode, m_G4STau1PlusLifetime; + G4bool m_G4STau1PlusShortlived, m_G4STau1PlusStable; - G4ParticleDefinition *m_theSElectronMinus; - G4ParticleDefinition *m_theSElectronPlus; - G4ParticleDefinition *m_theSMuonMinus; - G4ParticleDefinition *m_theSMuonPlus; - G4ParticleDefinition *m_theSTauMinus; - G4ParticleDefinition *m_theSTauPlus; + + G4double m_G4SElectronRMinusMass, m_G4SElectronRMinusWidth, m_G4SElectronRMinusCharge, m_G4SElectronRMinusPDGCode, m_G4SElectronRMinusLifetime; + G4bool m_G4SElectronRMinusShortlived, m_G4SElectronRMinusStable; + + G4double m_G4SElectronRPlusMass, m_G4SElectronRPlusWidth, m_G4SElectronRPlusCharge, m_G4SElectronRPlusPDGCode, m_G4SElectronRPlusLifetime; + G4bool m_G4SElectronRPlusShortlived, m_G4SElectronRPlusStable; + + G4double m_G4SMuonRMinusMass, m_G4SMuonRMinusWidth, m_G4SMuonRMinusCharge, m_G4SMuonRMinusPDGCode, m_G4SMuonRMinusLifetime; + G4bool m_G4SMuonRMinusShortlived, m_G4SMuonRMinusStable; + + G4double m_G4SMuonRPlusMass, m_G4SMuonRPlusWidth, m_G4SMuonRPlusCharge, m_G4SMuonRPlusPDGCode, m_G4SMuonRPlusLifetime; + G4bool m_G4SMuonRPlusShortlived, m_G4SMuonRPlusStable; + + G4double m_G4STau2MinusMass, m_G4STau2MinusWidth, m_G4STau2MinusCharge, m_G4STau2MinusPDGCode, m_G4STau2MinusLifetime; + G4bool m_G4STau2MinusShortlived, m_G4STau2MinusStable; + + G4double m_G4STau2PlusMass, m_G4STau2PlusWidth, m_G4STau2PlusCharge, m_G4STau2PlusPDGCode, m_G4STau2PlusLifetime; + G4bool m_G4STau2PlusShortlived, m_G4STau2PlusStable; + + + G4ParticleDefinition *m_theSElectronLMinus; + G4ParticleDefinition *m_theSElectronLPlus; + G4ParticleDefinition *m_theSMuonLMinus; + G4ParticleDefinition *m_theSMuonLPlus; + G4ParticleDefinition *m_theSTau1Minus; + G4ParticleDefinition *m_theSTau1Plus; + + G4ParticleDefinition *m_theSElectronRMinus; + G4ParticleDefinition *m_theSElectronRPlus; + G4ParticleDefinition *m_theSMuonRMinus; + G4ParticleDefinition *m_theSMuonRPlus; + G4ParticleDefinition *m_theSTau2Minus; + G4ParticleDefinition *m_theSTau2Plus; }; diff --git a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.SleptonsLLP.py b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.SleptonsLLP.py new file mode 100644 index 0000000000000000000000000000000000000000..0fe2c35979baa6723e3b28e101dbff556ff784b1 --- /dev/null +++ b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.SleptonsLLP.py @@ -0,0 +1,87 @@ +################################################################# +# preInclude.SLeptonsLLP.py - Emma Kuwertz, Dec 2017 # +################################################################# + +def get_and_fix_PDGTABLE(replace): + import os, shutil, re + + # Download generic PDGTABLE (do not overwrite existing one if it exists, use existing one instead) + os.system('get_files -data PDGTABLE.MeV') + shutil.move('PDGTABLE.MeV', 'PDGTABLE.MeV.org') + + # an example line to illustrate the fixed format, see PDGTABLE.MeV for more details + # M 1000022 0.E+00 +0.0E+00 -0.0E+00 ~chi(0,1) 0 + + lines = open('PDGTABLE.MeV.org').readlines() + for pdgid,mass,name,charge in replace: + if not re.search(r'[MW]\s+'+str(pdgid)+'\s+\S+', ''.join(lines)): + lines.append('M' + str(pdgid).rjust(8) +''.ljust(26) + + ('%11.5E' % mass).ljust(15) + + '+0.0E+00'.ljust(9) + '-0.0E+00'.ljust(9) + + name.strip() + ''.ljust(6) + charge.strip() + '\n') + lines.append('W' + str(pdgid).rjust(8) +''.ljust(26) + + '0.E+00'.ljust(15) + '+0.0E+00'.ljust(9) + '-0.0E+00'.ljust(9) + + name.strip() + ''.ljust(6) + charge.strip() + '\n') + else: + for i in xrange(len(lines)): + if re.search(r'M\s+'+str(pdgid)+'\s+\S+', lines[i]): + l = lines[i] + lines[i] = l[0:35] + ('%11.5E' % mass).ljust(14) + l[49:] + + update = open('PDGTABLE.MeV', 'w') + update.write(''.join(lines)) + update.close() + + print 'modfied PDGTABLE\n%s\n' % ''.join(lines) + +def load_files_for_sleptonLLP_scenario(simdict): + + if "GMSBSlepton" in simdict: + get_and_fix_PDGTABLE([ + (2000011, eval(simdict.get("GMSBSlepton",'0')), '~e(R)', '-'), + (2000013, eval(simdict.get("GMSBSlepton",'0')), '~mu(R)', '-'), + (1000011, eval(simdict.get("GMSBSlepton",'0')), '~e(L)', '-'), + (1000013, eval(simdict.get("GMSBSlepton",'0')), '~mu(L)', '-'), + ]) + if "GMSBStau" in simdict: + get_and_fix_PDGTABLE([ + (2000015, eval(simdict.get("GMSBStau",'0')), '~tau(R)', '-'), + (1000015, eval(simdict.get("GMSBStau",'0')), '~tau(L)', '-'), + ]) + if "GMSBGravitino" in simdict: + get_and_fix_PDGTABLE([ + (1000039, eval(simdict.get("GMSBGravitino",'0')), '~G', '0'), + ]) + +doG4SimConfig = True +from AthenaCommon.AthenaCommonFlags import athenaCommonFlags +import PyUtils.AthFile as af +try: + f = af.fopen(athenaCommonFlags.FilesInput()[0]) + + if "StreamHITS" in f.infos["stream_names"]: + from Digitization.DigitizationFlags import digitizationFlags + simdict = digitizationFlags.specialConfiguration.get_Value() + doG4SimConfig = False + else: + from G4AtlasApps.SimFlags import simFlags + simdict = simFlags.specialConfiguration.get_Value() +except: + from G4AtlasApps.SimFlags import simFlags + simdict = simFlags.specialConfiguration.get_Value() + +load_files_for_sleptonLLP_scenario(simdict) + +if doG4SimConfig: + simFlags.PhysicsOptions += ["GauginosPhysicsTool","AllSleptonsPhysicsTool"] + # Slepton decays from SleptonsConfig + if "GMSBSlepton" in simdict: + simFlags.PhysicsOptions += ["SElectronRPlusToElectronGravitino","SElectronLPlusToElectronGravitino"] + simFlags.PhysicsOptions += ["SElectronRMinusToElectronGravitino","SElectronLMinusToElectronGravitino"] + simFlags.PhysicsOptions += ["SMuonRPlusToMuonGravitino","SMuonLPlusToMuonGravitino"] + simFlags.PhysicsOptions += ["SMuonRMinusToMuonGravitino","SMuonLMinusToMuonGravitino"] + if "GMSBStau" in simdict: + simFlags.PhysicsOptions += ["STauRPlusToTauGravitino","STauLPlusToTauGravitino"] + simFlags.PhysicsOptions += ["STauRMinusToTauGravitino","STauLMinusToTauGravitino"] + +del doG4SimConfig, simdict