3 # Write a ROOT file in the default geometry. This output file should
4 # be tested to make sure that all of the fields are readable.
6 OUTPUT=100TestTree.root
8 if [ -f ${OUTPUT} ]; then
12 cat > 100TestTree.mac <<EOF
13 #######################################
14 # Set the hit segment.
15 #######################################
16 /edep/hitSagitta drift 1.0 mm
17 /edep/hitLength drift 1.0 mm
20 # Make sure that the GPS generator is it's default state.
23 # Enable generating multiple particle guns per event.
24 /gps/source/multiplevertex true
26 #######################################
27 # The first particle source
28 #######################################
31 # Create the first particle source. This source will be used to
32 # specify the position of the vertex. The any of the GPS direction
33 # and energy commands can be used.
37 # This generates the position of the particle gun. It can be
38 # used for the other particle guns to create a multi particle event. The
39 # /gps/position command must come first.
40 /gps/position 0.0 0.0 -0.50 m
47 # This generates the direction of the muon.
49 # /gps/ang/maxtheta 15 deg
53 #########################################
54 # Create the second particle source.
55 #########################################
60 # This generates the direction of the second particle gun.
62 # /gps/ang/maxtheta 25 deg
66 # Create the GPS particle generator so it exists.
69 # Copy the vertex position of the first particle into the second particle.
70 /generator/combine 0 1
74 edep-sim -o ${OUTPUT} -C -e 100 100TestTree.mac