2 evgenConfig.description =
"Single particle gun for E/p event generation"
3 evgenConfig.keywords = [
"singleParticle",]
4 evgenConfig.generators = [
"ParticleGun"]
5 evgenConfig.contact = [
"zach.marshall@cern.ch"]
7 import ParticleGun
as PG
11 "Create a 4-momentum vector from pt, eta, m and phi distributions/samplers."
13 def __init__(self, momentum, eta, pid=211, phi=[0, math.pi*2.]):
16 pdg_table = ROOT.TDatabasePDG.Instance()
17 mass = pdg_table.GetParticle(pid).Mass()*1000.
31 "Pseudorapidity sampler"
47 "Azimuthal angle sampler"
54 v4 = ROOT.TLorentzVector()
55 pt = p / math.cosh(self.
eta())
56 v4.SetPtEtaPhiM(pt, self.
eta(), self.
phi(), self.
mass())
62 pg.sampler.pid =
int(a_particle)
63 pg.sampler.mom =
PEtaSampler(momentum=(500,800,1000,1200,1500,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,13000,15000,17000,20000,\
64 25000,35000,50000,75000,100000,200000,350000,500000), eta=[-0.3,0.3], pid=
int(a_particle))