diff --git a/Generators/DIFGenerator/python/DIFSampler.py b/Generators/DIFGenerator/python/DIFSampler.py index 24659c0178d8cbefc9843a24a1a10ef38bbcde21..ae0d83d647cc015f7677938c82e54e4a3f0a71a4 100644 --- a/Generators/DIFGenerator/python/DIFSampler.py +++ b/Generators/DIFGenerator/python/DIFSampler.py @@ -5,7 +5,7 @@ import ParticleGun as PG from math import sqrt, sin, cos, acos from random import uniform -from AthenaCommon.SystemOfUnits import TeV, MeV +from AthenaCommon.SystemOfUnits import TeV, GeV, MeV from AthenaCommon.PhysicalConstants import pi from ROOT import TLorentzVector @@ -90,7 +90,10 @@ class DIFSampler(PG.ParticleSampler): else: self.mom = None - def __init__(self, daughter1_pid = 11, daughter2_pid = -11, mother_pid = None, mother_mom = PG.EThetaMPhiSampler(sqrt((1*TeV)**2 + (10*MeV)**2),0,10*MeV,0),mother_pos = CylinderSampler([0, 100**2],[0, 2*pi],[-1500, 0],0)): + # def __init__(self, daughter1_pid = 11, daughter2_pid = -11, mother_pid = None, mother_mom = PG.EThetaMPhiSampler(sqrt((1*TeV)**2 + (10*MeV)**2),0,10*MeV,0),mother_pos = CylinderSampler([0, 100**2],[0, 2*pi],[-1500, 0],0)): + def __init__(self, daughter1_pid=13, daughter2_pid=-13, mother_pid=None, + mother_mom=PG.EThetaMPhiSampler([sqrt((10*GeV)**2 + (500*MeV)**2), sqrt((1*TeV)**2 + (500*MeV)**2)], [0, 0.015], 500*MeV, [0, 2*pi]), + mother_pos=CylinderSampler([0, 100**2], [0, 2*pi], [-1500, 0], 0)): self._mother_sampler = PG.ParticleSampler(pid = mother_pid, mom = mother_mom, pos = mother_pos) self.daughter1 = self.particle(daughter1_pid) diff --git a/Generators/FaserParticleGun/python/FaserParticleGunConfig.py b/Generators/FaserParticleGun/python/FaserParticleGunConfig.py index 28bb6147a3276b510f3b4c3de83ad281a2997af4..93cd84a40fd7f99e5783cacc6293aa3479e986df 100644 --- a/Generators/FaserParticleGun/python/FaserParticleGunConfig.py +++ b/Generators/FaserParticleGun/python/FaserParticleGunConfig.py @@ -141,7 +141,7 @@ def FaserParticleGunDecayInFlightCfg(ConfigFlags, **kwargs) : return cfg def FaserParticleGunCfg(ConfigFlags) : - generator = ConfigFlags.Sim.Gun.setdefault("Generator", "SingleParticle") + generator = ConfigFlags.Sim.Gun.setdefault("Generator", "DecayInFlight") kwargs = ConfigFlags.Sim.Gun if generator == "SingleEcalParticle" : return FaserParticleGunSingleEcalParticleCfg(ConfigFlags, **kwargs)