28
28
# where the file format has a JSON document per line. I just toss the file
29
29
# in here for simplicity.
30
input_file = io.StringIO(number_of_spills*u"""{"mc": [{"primary":{"position": { "x": 0.0, "y": -0.0, "z": -5000.0 },"particle_id" : 13,"energy" : 210.0, "random_seed" : 10, "momentum" : { "x":0.0, "y":0.0, "z":1.0 }, "time" : 0.0}}]}\n""") # pylint: disable=C0301
30
input_file = io.StringIO(number_of_spills*u"""{"mc": []}\n""") # pylint: disable=C0301
32
32
my_input = MAUS.InputPyJSON(input_file)
34
34
# Create an empty array of mappers, then populate it
35
35
# with the functionality you want to use.
36
36
my_map = MAUS.MapPyGroup()
37
my_map.append(MAUS.MapPyBeamMaker()) # beam construction
37
38
my_map.append(MAUS.MapCppSimulation()) # geant4 simulation
38
39
my_map.append(MAUS.MapCppTOFDigitization()) # TOF electronics model
39
my_map.append(MAUS.MapCppTrackerDigitization()) # SCiFi electronics model
40
my_map.append(MAUS.MapCppTrackerDigitization()) # SciFi electronics model
41
datacards = io.StringIO(u"keep_tracks = False")
42
datacards = io.StringIO(u"")
42
43
# You may specify datacards if you wish. To do so you create a file object
43
44
# which can either be a StringIO object or a native python file. If you
44
45
# want to store your datacards in a file 'datacards.dat' then uncomment: