ATLAS Offline Software
ParticleGun_SingleHECO.py
Go to the documentation of this file.
1 
2 PDG = 10000000 + int(float(charge)*100.0)
3 loE = (float(mass) + 10.)*1000.
4 hiE = (float(mass) + 6000.)*1000.
5 MeVmass=float(mass)*1000.
6 #--------------------------------------------------------------
7 # Configuration for EvgenJobTransforms
8 #--------------------------------------------------------------
9 evgenConfig.description = "Single HECO generation for Mass=%s, Charge=%s in MC15" % (mass,charge)
10 evgenConfig.keywords = ["exotic", "singleParticle","highElectricChargeObject"]
11 evgenConfig.generators = ["ParticleGun"]
12 evgenConfig.contact = ["anlionti@cern.ch"]
13 
14 evgenConfig.specialConfig = 'MASS=%s;CHARGE=%s;preInclude=SimulationJobOptions/preInclude.Qball.py' % (mass,charge)
15 
16 
17 
18 #--------------------------------------------------------------
19 # Configuration for ParticleGun
20 #--------------------------------------------------------------
21 include("ParticleGun/ParticleGun_Common.py")
22 
23 import ParticleGun as PG
24 PG.MASSES[PDG] = float(MeVmass)
25 genSeq.ParticleGun.sampler.pid = (-PDG, PDG)
26 genSeq.ParticleGun.sampler.mom = PG.EEtaMPhiSampler(energy=[loE,hiE], eta=[-2,2])
27 
28 
29 #--------------------------------------------------------------
30 # Edit PDGTABLE.MeV with monopole mass
31 #--------------------------------------------------------------
32 ALINE1="M %s %s.E+03 +0.0E+00 -0.0E+00 Monopole 0" % (PDG,mass)
33 ALINE2="W %s 0.E+00 +0.0E+00 -0.0E+00 Monopole 0" % (PDG)
34 
35 import os
36 import sys
37 
38 pdgmod = os.path.isfile('PDGTABLE.MeV')
39 if pdgmod is True:
40  os.remove('PDGTABLE.MeV')
41 os.system('get_files -data PDGTABLE.MeV')
42 f=open('PDGTABLE.MeV','a')
43 f.writelines(str(ALINE1))
44 f.writelines('\n')
45 f.writelines(str(ALINE2))
46 f.writelines('\n')
47 f.close()
48 
49 del ALINE1
50 del ALINE2
51 
52 #--------------------------------------------------------------
53 # Edit G4particle_acceptlist.txt with monopole
54 #--------------------------------------------------------------
55 
56 ALINE1="%s qb %s.E+03 (Mev/c) lepton %s" % (PDG,mass,charge)
57 ALINE2="-%s qbbar %s.E+03 (Mev/c) lepton -%s" % (PDG,mass,charge)
58 
59 import os
60 import sys
61 
62 pdgmod = os.path.isfile('G4particle_acceptlist.txt')
63 if pdgmod is True:
64  os.remove('G4particle_acceptlist.txt')
65 os.system('get_files -data G4particle_acceptlist.txt')
66 f=open('G4particle_acceptlist.txt','a')
67 f.writelines(str(ALINE1))
68 f.writelines('\n')
69 f.writelines(str(ALINE2))
70 f.writelines('\n')
71 f.close()
72 
73 del ALINE1
74 del ALINE2
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.Include.include
include
Definition: Include.py:318
Trk::open
@ open
Definition: BinningType.h:40
str
Definition: BTagTrackIpAccessor.cxx:11
readCCLHist.float
float
Definition: readCCLHist.py:83