4
Simulate the MICE experiment
6
This will simulate MICE spills through the entirety of MICE using Geant4, then
7
digitize and reconstruct TOF and tracker hits to space points.
10
import io # generic python library for I/O
12
import MAUS # MAUS libraries
18
# This input generates empty spills, to be filled by the beam maker later on
19
my_input = MAUS.InputPySpillGenerator()
21
# Create an empty array of mappers, then populate it
22
# with the functionality you want to use.
23
my_map = MAUS.MapPyGroup()
26
# my_map.append(MAUS.MapPyBeamlineSimulation())
29
my_map.append(MAUS.MapPyBeamMaker()) # beam construction
30
my_map.append(MAUS.MapCppSimulation()) # geant4 simulation
33
my_map.append(MAUS.MapPyMCReconSetup()) # geant4 simulation
36
# my_map.append(MAUS.MapCppTOFMCDigitizer()) # TOF MC Digitizer
37
# my_map.append(MAUS.MapCppTOFSlabHits()) # TOF MC Slab Hits
38
# my_map.append(MAUS.MapCppTOFSpacePoints()) # TOF Space Points
41
# my_map.append(MAUS.MapCppKLMCDigitizer()) # KL MC Digitizer
42
# my_map.append(MAUS.MapCppKLCellHits()) # KL CellHit Reco
45
my_map.append(MAUS.MapCppTrackerMCDigitization()) # SciFi electronics model
46
my_map.append(MAUS.MapCppTrackerRecon()) # SciFi Recon
48
# Global Digits - post detector digitisation
50
# Then construct a MAUS output component - filename comes from datacards
51
my_output = MAUS.OutputCppRoot()
53
# can specify datacards here or by using appropriate command line calls
54
datacards = io.StringIO(u"")
56
# The Go() drives all the components you pass in, then check the file
57
# (default simulation.out) for output
58
MAUS.Go(my_input, my_map, MAUS.ReducePyDoNothing(), my_output, datacards)
60
if __name__ == '__main__':