~chris-rogers/maus/emr_mc_digitization

« back to all changes in this revision

Viewing changes to src/map/MapPyBeamlineSimulation/G4bl/MAY09-Stage0.in

  • Committer: Durga Rajaram
  • Date: 2014-04-08 19:20:18 UTC
  • mfrom: (663.40.35 trunk2)
  • mto: (697.1.1 release)
  • mto: This revision was merged to the branch mainline in revision 700.
  • Revision ID: durga@fnal.gov-20140408192018-kkkzew8ss2rne2pp
candidate 0.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
*       JAN08-Stage0.in  January 29, 2008; TJR
 
2
#
 
3
#       This file is intended to be included from the specific input file;
 
4
#       this file does not define parameters that vary with beam momentum
 
5
#       or emittance.
 
6
#
 
7
#       Command-line parameters (optional - default as follows):
 
8
#               first=0 Protons=6900 viewer=none
 
9
#
 
10
 
 
11
# include default_values
 
12
include $WRKDIR/defaults/default_values.in
 
13
 
 
14
# HistoScope filename from first event #
 
15
param histoFile=$first.root histoUpdate=1000000000 FIRST=$first
 
16
 
 
17
physics QGSP_BIC doStochastics=$STOCHASTICS
 
18
trackcuts keep=$keep kineticEnergyCut=5 maxTime=100000000
 
19
if "($C 1)==+1"
 
20
        particlecolor proton=1,0,0 pi+=0,1,0 mu+=0,0,1 plus=1,0,1 minus=1,1,0 \
 
21
                neutral=0,1,1 reference=1,1,1
 
22
else
 
23
        particlecolor proton=1,0,0 pi-=0,1,0 mu-=0,0,1 plus=1,0,1 minus=1,1,0 \
 
24
                neutral=0,1,1 reference=1,1,1
 
25
endif
 
26
 
 
27
# include Materials
 
28
include $WRKDIR/defaults/materials.in
 
29
 
 
30
# The MICE TargetBox -- assumed a cube, not actual size but correct along 
 
31
# MICE beamline; assumed normal to MICE beam, not actual orientation, but
 
32
# correct for the window; ignore rounded corners of window.
 
33
# Window for MICE beam is 2 mm of SS304.
 
34
include $WRKDIR/defaults/mice_tgt_box.in
 
35
 
 
36
# The MICE magnets
 
37
include $WRKDIR/defaults/magnets.in
 
38
 
 
39
# The Beamline Vacuum Components
 
40
include $WRKDIR/defaults/vacuum.in
 
41
 
 
42
# The PID detectors
 
43
include $WRKDIR/defaults/pid.in
 
44
 
 
45
###
 
46
### Lay out the beamline
 
47
###
 
48
 
 
49
# reference particle for tuning B1
 
50
#reference referenceMomentum=$piMomentumRef particle=proton beamZ=0
 
51
reference referenceMomentum=$piMomentumRef particle=pi$C beamZ=0
 
52
#tune B1Field z0=3500 z1=9595 initial=$B1 step=0.01 maxIter=100 expr="Px1/Pz1" \
 
53
        tolerance=0.000001
 
54
 
 
55
###
 
56
### beam - TargetModel for positives 
 
57
### NOTE: set Protons to determine the # events, and particle params for content
 
58
###
 
59
param positives=1
 
60
randomseed Now $random_seed
 
61
include $WRKDIR/TargetModel/beam_secondaries.in
 
62
#beam rectangular particle=211 firstEvent=$first lastEvent=$last beamHeight=50 beamWidth=50 \
 
63
meanMomentum=$piMomentumRef
 
64
 
 
65
# test - point beam
 
66
#beam gaussian particle=proton meanMomentum=$piMomentumRef \
 
67
#       firstEvent=$first lastEvent=$last sigmaXp=$sigmaXp sigmaYp=$sigmaYp \
 
68
#       beamZ=0
 
69
 
 
70
###beam gaussian sigmaX=-2.55 sigmaY=-1.0 sigmaXp=-0.033 sigmaYp=-0.014 \
 
71
###     particle=pi+ meanMomentum=$piMomentumRef sigmaP=15.0 \
 
72
###     firstEvent=$first lastEvent=$last \
 
73
###        beamZ=0      
 
74
 
 
75
place TargetBox z=0
 
76
place vacuumWindow z=239.4
 
77
 
 
78
place TargetShield z=250
 
79
 
 
80
#place TargetDet2 z=1000 parent=vacuum1
 
81
place vacuum1 z=1391.5
 
82
place pipe1 z=1391.5
 
83
 
 
84
#place Q1Det z=2542.25   rename=Q1USDet
 
85
 
 
86
place QuadTypeIV rename=Q1 gradient=$q_1 z=3000
 
87
 
 
88
#place DummyDet  z=3200.   rename=Dum3
 
89
#place Q1Det z=3457.5   rename=Q1DSDet
 
90
 
 
91
place vacuum2 z=3700
 
92
place pipe2 z=3700
 
93
 
 
94
place QuadTypeIV rename=Q2 gradient=$q_2 z=4400 ironColor=0,0,.6
 
95
 
 
96
place vacuum2 z=5100
 
97
place pipe2 z=5100
 
98
 
 
99
place QuadTypeIV rename=Q3 gradient=$q_3 z=5800
 
100
 
 
101
place vacuum3 z=7078.5
 
102
 
 
103
place BendTypeI6inIron rename=B1 z=7979.1 x=200 rotation=Y30 By=0 \
 
104
        fieldMaterial=$USAirOrVacuum
 
105
place TypeI6inTaperedField z=7979.1 x=200 rotation=Y30 \
 
106
        current=$d_1
 
107
cornerarc z=7495.28 angle=60 centerRadius=1038 radiusCut=1000
 
108
 
 
109
############place Foil z=8720
 
110
//virtualdetector AfterB1Det   length=.01 height=500 width=500
 
111
//place AfterB1Det   z=8718
 
112
place vacuumWindow z=9641.7
 
113
############place Counter rename=Count1 z=9545.45
 
114
 
 
115
############place vacuumWindow z=9595.45
 
116
place DecaySolenoid z=12210.7
 
117
place vacuumWindow z=14779.7
 
118
 
 
119
# Proton Absorber
 
120
box ProtonAbsorber width=400 height=400 length=$proton_absorber_thickness material=polyethylene \
 
121
        color=1,0,1
 
122
place ProtonAbsorber z=14880
 
123
 
 
124
#first Geneva Counter 
 
125
place GenevaBeamCounter rename=GVA1 z=15050
 
126
 
 
127
# reference particle for tuning B2 and RF
 
128
# omit if pi = mu momentum (so pi is tuned to the end)
 
129
#if $piMomentumRef!=$muMomentumRef
 
130
        #reference referenceMomentum=$muMomentumRef particle=mu$C beamZ=12164.7
 
131
        #tune B2Field z0=12370 z1=17053 initial=$B2 step=0.002 \
 
132
                start="PDGid0==-13" expr="Px1/Pz1" tolerance=0.000001
 
133
###start="PDGid0==-($C 13)"
 
134
#else
 
135
        #tune B2Field z0=12370 z1=17053 initial=$B2 step=0.002 \
 
136
                expr="Px1/Pz1" tolerance=0.000001
 
137
#endif
 
138
 
 
139
zntuple z=15050 format=ascii file=G4BLoutput.txt
 
140
#ntuple TriggerParticles category=NTuples detectors=*
 
141
 
 
142
#place BendTypeI6inIron rename=B2 z=15808.1 x=100 rotation=Y15 By=0 \
 
143
        fieldMaterial=Air
 
144
#place TypeI6inTaperedField z=15808.1 x=100 rotation=Y15 \
 
145
        current=$B2
 
146
#cornerarc z=15298.3 angle=30 centerRadius=2005.2 radiusCut=1000
 
147
 
 
148
#place BeamMonitor rename=BM1 z=16992
 
149
 
 
150
 
 
151