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()
20
my_input = MAUS.InputCppRoot()
22
# Create an empty array of mappers, then populate it
23
# with the functionality you want to use.
24
my_map = MAUS.MapPyGroup()
27
# my_map.append(MAUS.MapPyBeamlineSimulation())
30
# my_map.append(MAUS.MapPyBeamMaker()) # beam construction
31
# my_map.append(MAUS.MapCppSimulation()) # geant4 simulation
34
# my_map.append(MAUS.MapPyMCReconSetup()) # geant4 simulation
37
# my_map.append(MAUS.MapCppTOFMCDigitizer()) # TOF MC Digitizer
38
# my_map.append(MAUS.MapCppTOFSlabHits()) # TOF MC Slab Hits
39
# my_map.append(MAUS.MapCppTOFSpacePoints()) # TOF Space Points
42
# my_map.append(MAUS.MapCppKLMCDigitizer()) # KL MC Digitizer
43
# my_map.append(MAUS.MapCppKLCellHits()) # KL CellHit Reco
46
my_map.append(MAUS.MapCppTrackerMCDigitization()) # SciFi electronics model
47
my_map.append(MAUS.MapCppTrackerRecon()) # SciFi Recon
49
# Global Digits - post detector digitisation
51
# Then construct a MAUS output component - filename comes from datacards
52
my_output = MAUS.OutputCppRoot()
54
# can specify datacards here or by using appropriate command line calls
55
datacards = io.StringIO(u"")
57
# The Go() drives all the components you pass in, then check the file
58
# (default simulation.out) for output
59
MAUS.Go(my_input, my_map, MAUS.ReducePyDoNothing(), my_output, datacards)
61
if __name__ == '__main__':