5 include(
"EvgenProdTools/StdEvgenSetup.py")
8 import ParticleGun
as PG
10 class MyParticleSampler(PG.ParticleSampler):
12 A special sampler to generate single particles flat in 1/pT and in
13 impact parameter to the beam, with flat z0.
17 psamp = PG.PtEtaMPhiSampler(pt=PG.InvSampler(4000, 400000), eta=[0.1,0.3], phi=[0.3, 0.5])
18 xsamp = PG.PosSampler(0, 0, [-150,150], 0)
19 PG.ParticleSampler.__init__(self, pid={13,-13}, mom=psamp, pos=xsamp)
20 self.
ip = PG.mksampler([-2,2])
23 "Return a vector of sampled particles"
24 ps = PG.ParticleSampler.shoot(self)
28 m = -p.mom.X() / p.mom.Y()
29 x = self.
ip() / sqrt(1 + m**2)
35 topSeq += PG.ParticleGun()
36 topSeq.ParticleGun.randomSeed = 123456
39 include(
"EvgenProdTools/postJO.CopyWeights.py")
40 include(
"EvgenProdTools/postJO.PoolOutput.py")
41 include(
"EvgenProdTools/postJO.DumpMC.py")