13 Example creating small sample of monopole anti-monopole pairs
14 with given magnetic charge (in e+ units), electric charge and mass (in GeV/c^2)
17 from simulation
import add_simulation
18 from reconstruction
import add_reconstruction
23 print(
"Expected args: magCharge elCharge mass\
24 Using default: 1 0 4.5")
29 mag = float(sys.argv[1])
30 el = float(sys.argv[2])
31 mass = float(sys.argv[3])
35 main = b2.create_path()
36 main.add_module(
"EventInfoSetter", expList=0, runList=1, evtNumList=num_events)
43 pairgen = b2.register_module(
'PairGen')
44 pairgen.param(
'pdgCode', 99666)
45 pairgen.param(
'saveBoth',
True)
46 main.add_module(pairgen)
49 gearbox = b2.register_module(
'Gearbox')
50 gearbox.param(
'fileName',
'/geometry/Beast2_phase2.xml')
51 main.add_module(gearbox)
53 geometry = b2.register_module(
'Geometry')
54 main.add_module(geometry)
57 g4sim = b2.register_module(
'FullSim')
58 g4sim.param(
'RegisterMonopoles',
True)
59 g4sim.param(
'MonopoleMagCharge', mag)
60 g4sim.param(
'trajectoryStore', 1)
61 main.add_module(g4sim)
64 add_reconstruction(main)
67 output = b2.register_module(
'RootOutput')
68 output.param(
'outputFileName',
'MonopolePair.root')
69 main.add_module(output)
def add_particle(name, pdgCode, mass, width, charge, spin, max_width=None, lifetime=0, pythiaID=0, define_anti_particle=False)