1
|
"""
|
2
|
Datacard to simulate 200MeV/c protons
|
3
|
"""
|
4
|
# pylint: disable=C0103, W0611
|
5
|
|
6
|
import os
|
7
|
|
8
|
output_json_file_name = "proton_check_simulation.json"
|
9
|
output_json_file_type = "text"
|
10
|
|
11
|
# Used by MapCppSimulation
|
12
|
keep_tracks = True # set to true to keep start and end point of every track
|
13
|
keep_steps = False # set to true to keep start and end point of every track and
|
14
|
# every step point
|
15
|
simulation_geometry_filename = "Stage4.dat" # geometry used by simulation
|
16
|
maximum_number_of_steps = 10000
|
17
|
simulation_reference_particle = {
|
18
|
"position":{"x":0.0, "y":-0.0, "z":2000.0},
|
19
|
"momentum":{"x":0.0, "y":0.0, "z":1.0},
|
20
|
"particle_id":2212, "energy":959.1, "time":0.0, "random_seed":10
|
21
|
}
|
22
|
|
23
|
|
24
|
# used by InputPySpillGenerator to determine the number of empty spills that
|
25
|
# will be generated by the simulation
|
26
|
spill_generator_number_of_spills = 1000
|
27
|
# used by MapPyBeamMaker to generate input particle
|
28
|
# This is a sample beam distribution based on guesses by Chris Rogers of what
|
29
|
# an optimised beam might look like
|
30
|
beam = {
|
31
|
"particle_generator":"binomial", # routine for generating empty primaries
|
32
|
"binomial_n":1.0, # number of coin tosses
|
33
|
"binomial_p":1.0, # probability of making a particle on each toss
|
34
|
"random_seed":5, # random seed for beam generation; controls also how the MC
|
35
|
# seeds are generated
|
36
|
"definitions":[
|
37
|
##### 200MeV/c PROTONS #######
|
38
|
{
|
39
|
"reference":simulation_reference_particle, # reference particle
|
40
|
"random_seed_algorithm":"incrementing_random", # algorithm for seeding MC
|
41
|
"weight":100., # probability of generating a particle
|
42
|
"transverse":{
|
43
|
"transverse_mode":"constant_solenoid", # transverse distribution matched to constant solenoid field
|
44
|
"emittance_4d":3., # 4d emittance
|
45
|
"normalised_angular_momentum":0.1, # angular momentum from diffuser
|
46
|
"bz":4.e-3 # magnetic field strength for angular momentum calculation
|
47
|
},
|
48
|
"longitudinal":{"longitudinal_mode":"sawtooth_time", # longitudinal distribution sawtooth in time
|
49
|
"momentum_variable":"p", # Gaussian in total momentum (options energy, pz)
|
50
|
"sigma_p":25., # RMS total momentum
|
51
|
"t_start":-1.e6, # start time of sawtooth
|
52
|
"t_end":+1.e6}, # end time of sawtooth
|
53
|
"coupling":{"coupling_mode":"none"} # no dispersion
|
54
|
}]
|
55
|
}
|
56
|
|
57
|
particle_decay = False
|