~chris-rogers/maus/emr_mc_digitization

« back to all changes in this revision

Viewing changes to src/map/MapPyBeamlineSimulation/G4bl/TargetModel/beam_secondaries_with_protons.in

  • Committer: Chris Rogers
  • Date: 2014-04-16 11:48:45 UTC
  • mfrom: (707 merge)
  • mto: This revision was merged to the branch mainline in revision 711.
  • Revision ID: chris.rogers@stfc.ac.uk-20140416114845-h3u3q7pdcxkxvovs
Update to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
*       beam_secondaries.in  2007/06/12 TJR
 
2
#
 
3
#       This file generates a beam corresponding to the G4beamline
 
4
#       simulation of secondaries from the MICE target. It includes
 
5
#       protons, pi+, pi-, e+, e-, and gammas.
 
6
#
 
7
#       The number of events generated is controlled by Protons, 1.97E9 gives:
 
8
#       79k protons, 6.5k pi+, 1.9k pi-, .49k e+, .49k e-, 7.2k gamma
 
9
#
 
10
#       These values include the absolute normalization, and the value of
 
11
#       Protons corresponds to protons intersecting the MICE target.
 
12
#       The target simulation tracked 1E7 protons and gave the above numbers
 
13
#       of secondaries into the annulus 20-30 degrees. This file generates
 
14
#       into a much smaller solid angle, 1/197 of the one used in the
 
15
#       target simulation.
 
16
#
 
17
param -unset Protons=1.97E9 first=0 viewer=none
 
18
 
 
19
#       The following parameters control the generation of individual particles
 
20
#       set positives=1, negatives=1, or set ALL of the individual particles
 
21
param -unset positives=0 negatives=0
 
22
if $positives
 
23
#####   param piplus=1 piminus=0 eplus=1 eminus=0 proton=1 gamma=0
 
24
#####   I do GENERATE all
 
25
        param piplus=1 piminus=1 eplus=1 eminus=1 proton=1 gamma=1
 
26
endif
 
27
if $negatives
 
28
#####   param piplus=0 piminus=1 eplus=0 eminus=1 proton=0 gamma=0
 
29
#####   I do GENERATE all
 
30
        param piplus=1 piminus=1 eplus=1 eminus=1 proton=1 gamma=1 
 
31
endif
 
32
param -unset piplus=1 piminus=1 eplus=1 eminus=1 proton=1 gamma=1
 
33
 
 
34
#       protonWeight will reduce the number of protons generated.
 
35
param -unset protonWeight=1.0
 
36
 
 
37
# Target is 1mm wide and 10mm long: (1*cos(25*deg)+10*sin(25*deg))/2 = 2.57
 
38
# For now we assume the target dips 2mm into the ISIS beam.
 
39
# sigmaXp, and sigmaYp are determined empirically to be larger than 
 
40
# the actual beamline acceptance.
 
41
param n1=floor(4350*$Protons/1.97E9/$protonWeight)
 
42
param n2=floor(64650*$Protons/1.97E9/$protonWeight)
 
43
param n3=floor(10000*$Protons/1.97E9/$protonWeight)
 
44
if $proton
 
45
    if $protonWeight!=1.0
 
46
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
47
                particle=proton meanMomentum=1450 sigmaP=2.15 nEvents=$n1 \
 
48
                firstEvent=$first weight=$protonWeight
 
49
        param first=$first+$n1
 
50
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
51
                particle=proton meanMomentum=775 sigmaP=-575 nEvents=$n2 \
 
52
                firstEvent=$first weight=$protonWeight
 
53
        param first=$first+$n2
 
54
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
55
                particle=proton meanMomentum=1275 sigmaP=80 nEvents=$n3 \
 
56
                firstEvent=$first weight=$protonWeight
 
57
        param first=$first+$n3
 
58
    else
 
59
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
60
                particle=proton meanMomentum=1450 sigmaP=2.15 nEvents=$n1 \
 
61
                firstEvent=$first
 
62
        param first=$first+$n1
 
63
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
64
                particle=proton meanMomentum=775 sigmaP=-575 nEvents=$n2 \
 
65
                firstEvent=$first
 
66
        param first=$first+$n2
 
67
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
68
                particle=proton meanMomentum=1275 sigmaP=80 nEvents=$n3 \
 
69
                firstEvent=$first
 
70
        param first=$first+$n3
 
71
    endif
 
72
endif
 
73
param n4=floor(4650*$Protons/1.97E9)
 
74
param n5=floor(650*$Protons/1.97E9)
 
75
param n6=floor(1000*$Protons/1.97E9)
 
76
param n6a=floor(200*$Protons/1.97E9)
 
77
if $piplus
 
78
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
79
                particle=pi+ meanMomentum=320 sigmaP=-220 nEvents=$n4 \
 
80
                firstEvent=$first
 
81
        param first=$first+$n4
 
82
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
83
                particle=pi+ meanMomentum=190 sigmaP=30 nEvents=$n5 \
 
84
                firstEvent=$first
 
85
        param first=$first+$n5
 
86
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
87
                particle=pi+ meanMomentum=440 sigmaP=50 nEvents=$n6 \
 
88
                firstEvent=$first
 
89
        param first=$first+$n6
 
90
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
91
                particle=pi+ meanMomentum=600 sigmaP=-60 nEvents=$n6a \
 
92
                firstEvent=$first
 
93
        param first=$first+$n6a
 
94
endif
 
95
param n7=floor(1600*$Protons/1.97E9)
 
96
param n8=floor(300*$Protons/1.97E9)
 
97
if $piminus
 
98
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
99
                particle=pi- meanMomentum=320 sigmaP=-220 nEvents=$n7 \
 
100
                firstEvent=$first
 
101
        param first=$first+$n7
 
102
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
103
                particle=pi- meanMomentum=150 sigmaP=30 nEvents=$n8 \
 
104
                firstEvent=$first
 
105
        param first=$first+$n8
 
106
endif
 
107
param n9=floor(250*$Protons/1.97E9)
 
108
param n10=floor(120*$Protons/1.97E9)
 
109
param n11=floor(80*$Protons/1.97E9)
 
110
param n12=floor(40*$Protons/1.97E9)
 
111
if $eminus
 
112
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
113
                particle=e- meanMomentum=35 sigmaP=-25 nEvents=$n9 \
 
114
                firstEvent=$first
 
115
        param first=$first+$n9
 
116
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
117
                particle=e- meanMomentum=90 sigmaP=-30 nEvents=$n10 \
 
118
                firstEvent=$first
 
119
        param first=$first+$n10
 
120
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
121
                particle=e- meanMomentum=200 sigmaP=-80 nEvents=$n11 \
 
122
                firstEvent=$first
 
123
        param first=$first+$n11
 
124
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
125
                particle=e- meanMomentum=380 sigmaP=-100 nEvents=$n12 \
 
126
                firstEvent=$first
 
127
        param first=$first+$n12
 
128
endif
 
129
if $eplus
 
130
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
131
                particle=e+ meanMomentum=35 sigmaP=-25 nEvents=$n9 \
 
132
                firstEvent=$first
 
133
        param first=$first+$n9
 
134
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
135
                particle=e+ meanMomentum=90 sigmaP=-30 nEvents=$n10 \
 
136
                firstEvent=$first
 
137
        param first=$first+$n10
 
138
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
139
                particle=e+ meanMomentum=200 sigmaP=-80 nEvents=$n11 \
 
140
                firstEvent=$first
 
141
        param first=$first+$n11
 
142
        beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
143
                particle=e+ meanMomentum=380 sigmaP=-100 nEvents=$n12 \
 
144
                firstEvent=$first
 
145
        param first=$first+$n12
 
146
endif
 
147
param n13=floor(400*$Protons/1.97E9)
 
148
param n14=floor(2900*$Protons/1.97E9)
 
149
param n15=floor(1800*$Protons/1.97E9)
 
150
param n16=floor(1200*$Protons/1.97E9)
 
151
param n17=floor(600*$Protons/1.97E9)
 
152
param n18=floor(300*$Protons/1.97E9)
 
153
if $gamma
 
154
    beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
155
        particle=gamma meanMomentum=25 sigmaP=-15 nEvents=$n13 \
 
156
        firstEvent=$first
 
157
    param first=$first+$n13
 
158
    beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
159
        particle=gamma meanMomentum=90 sigmaP=-50 nEvents=$n14 \
 
160
        firstEvent=$first
 
161
    param first=$first+$n14
 
162
    beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
163
        particle=gamma meanMomentum=190 sigmaP=-50 nEvents=$n15 \
 
164
        firstEvent=$first
 
165
    param first=$first+$n15
 
166
    beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
167
        particle=gamma meanMomentum=290 sigmaP=-50 nEvents=$n16 \
 
168
        firstEvent=$first
 
169
    param first=$first+$n16
 
170
    beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
171
        particle=gamma meanMomentum=390 sigmaP=-50 nEvents=$n17 \
 
172
        firstEvent=$first
 
173
    param first=$first+$n17
 
174
    beam gaussian sigmaX=-2.57 sigmaY=-1.0 sigmaXp=-0.040 sigmaYp=-0.020 \
 
175
        particle=gamma meanMomentum=500 sigmaP=-60 nEvents=$n18 \
 
176
        firstEvent=$first
 
177
    param first=$first+$n18
 
178
endif