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