QwGeant4
myTrackingRun.in
Go to the documentation of this file.
1 # Programmer: Wouter Deconinck
2 # Purpose: This is the basis for a macro file that include HDC, VDC, and TS in simulation
3 #
4 # Date: 2015-07-13
5 # Modified:
6 # Assisted By:
7 #
8 
9 # Load/execute the default Qweak configuration setup
10 /control/execute myQweakConfiguration.mac
11 /control/execute macros/peiqing_2011.mac
12 
13 # Do not write out random seed information for every event
14 /random/setSavingFlag 0
15 /random/setDirectoryName random/%name%_%jobid%
16 # Start from the specified seeds
17 /random/setSeeds %seedA% %seedB%
18 
19 # Track all primaries and all secondaries
20 /TrackingAction/TrackingFlag 3
21 
22 # Trigger on scintillator detector only
23 #/Trigger/Disable cer
24 #/Trigger/Enable scint
25 /Trigger/Show
26 
27 # Set the rootfile name
28 /Analysis/RootFileName rootfiles/%name%_%jobid%_workdir/%name%_%jobid%.root
29 
30 # Select octant 1-5 (i.e. 9)
31 /EventGen/SelectOctant %evoct%
32 # Package 1 is at 180 degrees, not at 0 degrees
33 /HDC/SetRotationAngleInPhi %R2phi% degree
34 /VDC/SetRotationAngleInPhi %R3phi% degree
35 
36 # Target
37 /EventGen/SelectReactionType %reaction_type%
38 /EventGen/SelectReactionRegion %reaction_region%
39 /Target/SetTarget %target%
40 
41 # 4 mm x 4 mm raster
42 /PrimaryEvent/SetRasterXmin -2.0 mm
43 /PrimaryEvent/SetRasterYmin -2.0 mm
44 /PrimaryEvent/SetRasterXmax 2.0 mm
45 /PrimaryEvent/SetRasterYmax 2.0 mm
46 
47 # Set the beam positions (steps of 0.5 mm)
48 # and beam directions (steps of 0.5 mrad)
49 /PrimaryEvent/SetBeamPositionX %posx% mm
50 /PrimaryEvent/SetBeamPositionY %posy% mm
51 /PrimaryEvent/SetBeamDirectionX %dirx% mrad
52 /PrimaryEvent/SetBeamDirectionY %diry% mrad
53 
54 # Simulate number of events
55 /run/beamOn %nevents%