5 Example creating small sample of monopole anti-monopole pairs
6 with given magnetic charge (in e+ units), electric charge and mass (in GeV/c^2)
9 from simulation
import add_simulation
10 from reconstruction
import add_reconstruction
16 print(
"Expected args: magCharge elCharge mass\
17 Using default: 1 0 4.5")
22 mag = float(sys.argv[1])
23 el = float(sys.argv[2])
24 mass = float(sys.argv[3])
29 main.add_module(
"EventInfoSetter", expList=0, runList=1, evtNumList=num_events)
36 pairgen = register_module(
'PairGen')
37 pairgen.param(
'pdgCode', 99666)
38 pairgen.param(
'saveBoth',
True)
39 main.add_module(pairgen)
42 gearbox = register_module(
'Gearbox')
43 gearbox.param(
'fileName',
'/geometry/Beast2_phase2.xml')
44 main.add_module(gearbox)
46 geometry = register_module(
'Geometry')
47 main.add_module(geometry)
50 g4sim = register_module(
'FullSim')
51 g4sim.param(
'RegisterMonopoles',
True)
52 g4sim.param(
'MonopoleMagCharge', mag)
53 g4sim.param(
'trajectoryStore', 1)
54 main.add_module(g4sim)
57 add_reconstruction(main)
60 output = register_module(
'RootOutput')
61 output.param(
'outputFileName',
'MonopolePair.root')
62 main.add_module(output)