Added possibility to save and load initial values.
This commit is contained in:
parent
d86fdde7b1
commit
d14a857d9d
@ -3,36 +3,10 @@
|
||||
|
||||
# This is a template mac file for tuning the lem beamline with a spin rotator
|
||||
# You can use this to generate a beam envelope profile along z
|
||||
# Variables top set
|
||||
# L1VOLTAGE = The voltage on L1 lens
|
||||
# L3VOLTAGE = The voltage on L3 lens
|
||||
# BMAGSEPMAP= The name of the magnetic field map for the spin rotator
|
||||
# BMAGVAL = The value of magnetic field at the center
|
||||
# ELECSEPMAP= The name of the electric field map for the spin rotator
|
||||
# ELECVAL = The value of electric field at the center
|
||||
# RAVOLTAGE = The voltage on the ring anode sections (all equal)
|
||||
# PROFILEZ = The z coordinate to measure beam envelope
|
||||
|
||||
# save_slices_lines should be replaced by slices of save volumes to track the beam, e.g.:
|
||||
#/musr/command construct tubs save0 0 39 1.5 0 360 G4_Galactic 0 0 -2500 log_World norot dead 851
|
||||
#/musr/command construct tubs save1 0 39 1.5 0 360 G4_Galactic 0 0 -2450 log_World norot dead 852
|
||||
#/musr/command construct tubs save2 0 39 1.5 0 360 G4_Galactic 0 0 -2400 log_World norot dead 853
|
||||
#/musr/command construct tubs save3 0 39 1.5 0 360 G4_Galactic 0 0 -2350 log_World norot dead 854
|
||||
#/musr/command construct tubs save4 0 39 1.5 0 360 G4_Galactic 0 0 -2300 log_World norot dead 855
|
||||
#/musr/command construct tubs save5 0 39 1.5 0 360 G4_Galactic 0 0 -2250 log_World norot dead 856
|
||||
#/musr/command construct tubs save6 0 39 1.5 0 360 G4_Galactic 0 0 -2200 log_World norot dead 857
|
||||
# Make sure there is no overlap between slices and other volumes.
|
||||
|
||||
################################################################################################################
|
||||
# -- ROTATION MATRICES --
|
||||
################################################################################################################
|
||||
|
||||
# 3 parameters -> Define Euler angles (the 4th par. is set to zero).
|
||||
# 4 parameters -> Define axis + rotation.
|
||||
# HEP computations ordinarily use the active rotation viewpoint (object is rotated NOT axes).
|
||||
# Therefore, rotations about an axis imply ACTIVE COUNTER-CLOCKWISE rotation in this package.
|
||||
# Rotation around a specified axis means counter-clockwise rot. around the positive direction of the axis.
|
||||
|
||||
# Define rotations for the field maps of Trigger and Ring Anode:
|
||||
/musr/command rotation rotTrig 0 1 0 -45
|
||||
/musr/command rotation rotRAnR 0 0 1 -90
|
||||
@ -83,60 +57,60 @@
|
||||
/musr/command visattributes log_World invisible
|
||||
|
||||
# These are slices to map the beam envelope along the beam line. The radius should be less than 50mm
|
||||
/musr/command construct tubs save0 0 39 1.5 0 360 G4_Galactic 0 0 -2500 log_World norot dead 851
|
||||
/musr/command construct tubs save1 0 39 1.5 0 360 G4_Galactic 0 0 -2450 log_World norot dead 852
|
||||
/musr/command construct tubs save2 0 39 1.5 0 360 G4_Galactic 0 0 -2400 log_World norot dead 853
|
||||
/musr/command construct tubs save3 0 39 1.5 0 360 G4_Galactic 0 0 -2350 log_World norot dead 854
|
||||
/musr/command construct tubs save4 0 39 1.5 0 360 G4_Galactic 0 0 -2300 log_World norot dead 855
|
||||
/musr/command construct tubs save5 0 39 1.5 0 360 G4_Galactic 0 0 -2250 log_World norot dead 856
|
||||
/musr/command construct tubs save6 0 39 1.5 0 360 G4_Galactic 0 0 -2200 log_World norot dead 857
|
||||
/musr/command construct tubs save7 0 39 1.5 0 360 G4_Galactic 0 0 -2150 log_World norot dead 858
|
||||
/musr/command construct tubs save8 0 39 1.5 0 360 G4_Galactic 0 0 -2100 log_World norot dead 859
|
||||
/musr/command construct tubs save9 0 39 1.5 0 360 G4_Galactic 0 0 -2050 log_World norot dead 860
|
||||
/musr/command construct tubs save10 0 39 1.5 0 360 G4_Galactic 0 0 -2000 log_World norot dead 861
|
||||
/musr/command construct tubs save11 0 39 1.5 0 360 G4_Galactic 0 0 -1950 log_World norot dead 862
|
||||
/musr/command construct tubs save12 0 39 1.5 0 360 G4_Galactic 0 0 -1900 log_World norot dead 863
|
||||
/musr/command construct tubs save13 0 39 1.5 0 360 G4_Galactic 0 0 -1850 log_World norot dead 864
|
||||
/musr/command construct tubs save14 0 39 1.5 0 360 G4_Galactic 0 0 -1800 log_World norot dead 865
|
||||
/musr/command construct tubs save15 0 39 1.5 0 360 G4_Galactic 0 0 -1750 log_World norot dead 866
|
||||
/musr/command construct tubs save16 0 39 1.5 0 360 G4_Galactic 0 0 -1700 log_World norot dead 867
|
||||
/musr/command construct tubs save17 0 39 1.5 0 360 G4_Galactic 0 0 -1650 log_World norot dead 868
|
||||
/musr/command construct tubs save18 0 39 1.5 0 360 G4_Galactic 0 0 -1600 log_World norot dead 869
|
||||
/musr/command construct tubs save19 0 39 1.5 0 360 G4_Galactic 0 0 -1550 log_World norot dead 870
|
||||
/musr/command construct tubs save20 0 39 1.5 0 360 G4_Galactic 0 0 -1500 log_World norot dead 871
|
||||
/musr/command construct tubs save21 0 39 1.5 0 360 G4_Galactic 0 0 -1450 log_World norot dead 872
|
||||
/musr/command construct tubs save22 0 39 1.5 0 360 G4_Galactic 0 0 -1400 log_World norot dead 873
|
||||
/musr/command construct tubs save23 0 39 1.5 0 360 G4_Galactic 0 0 -1350 log_World norot dead 874
|
||||
/musr/command construct tubs save24 0 39 1.5 0 360 G4_Galactic 0 0 -1300 log_World norot dead 875
|
||||
/musr/command construct tubs save25 0 39 1.5 0 360 G4_Galactic 0 0 -1250 log_World norot dead 876
|
||||
/musr/command construct tubs save26 0 39 1.5 0 360 G4_Galactic 0 0 -1200 log_World norot dead 877
|
||||
/musr/command construct tubs save27 0 39 1.5 0 360 G4_Galactic 0 0 -1150 log_World norot dead 878
|
||||
/musr/command construct tubs save28 0 39 1.5 0 360 G4_Galactic 0 0 -1100 log_World norot dead 879
|
||||
/musr/command construct tubs save29 0 39 1.5 0 360 G4_Galactic 0 0 -1050 log_World norot dead 880
|
||||
/musr/command construct tubs save30 0 39 1.5 0 360 G4_Galactic 0 0 -1000 log_World norot dead 881
|
||||
/musr/command construct tubs save31 0 39 1.5 0 360 G4_Galactic 0 0 -950 log_World norot dead 882
|
||||
/musr/command construct tubs save32 0 39 1.5 0 360 G4_Galactic 0 0 -900 log_World norot dead 883
|
||||
/musr/command construct tubs save33 0 39 1.5 0 360 G4_Galactic 0 0 -850 log_World norot dead 884
|
||||
/musr/command construct tubs save34 0 39 1.5 0 360 G4_Galactic 0 0 -800 log_World norot dead 885
|
||||
/musr/command construct tubs save35 0 39 1.5 0 360 G4_Galactic 0 0 -750 log_World norot dead 886
|
||||
/musr/command construct tubs save36 0 39 1.5 0 360 G4_Galactic 0 0 -700 log_World norot dead 887
|
||||
/musr/command construct tubs save37 0 39 1.5 0 360 G4_Galactic 0 0 -650 log_World norot dead 888
|
||||
/musr/command construct tubs save38 0 39 1.5 0 360 G4_Galactic 0 0 -600 log_World norot dead 889
|
||||
/musr/command construct tubs save39 0 39 1.5 0 360 G4_Galactic 0 0 -550 log_World norot dead 890
|
||||
/musr/command construct tubs save40 0 39 1.5 0 360 G4_Galactic 0 0 -500 log_World norot dead 891
|
||||
/musr/command construct tubs save41 0 39 1.5 0 360 G4_Galactic 0 0 -450 log_World norot dead 892
|
||||
/musr/command construct tubs save42 0 39 1.5 0 360 G4_Galactic 0 0 -400 log_World norot dead 893
|
||||
/musr/command construct tubs save43 0 39 1.5 0 360 G4_Galactic 0 0 -350 log_World norot dead 894
|
||||
/musr/command construct tubs save44 0 39 1.5 0 360 G4_Galactic 0 0 -300 log_World norot dead 895
|
||||
/musr/command construct tubs save45 0 39 1.5 0 360 G4_Galactic 0 0 -250 log_World norot dead 896
|
||||
/musr/command construct tubs save46 0 39 1.5 0 360 G4_Galactic 0 0 -200 log_World norot dead 897
|
||||
/musr/command construct tubs save47 0 39 1.5 0 360 G4_Galactic 0 0 -150 log_World norot dead 898
|
||||
/musr/command construct tubs save48 0 39 1.5 0 360 G4_Galactic 0 0 -100 log_World norot dead 899
|
||||
/musr/command construct tubs save49 0 39 1.5 0 360 G4_Galactic 0 0 -50 log_World norot dead 900
|
||||
/musr/command construct tubs save50 0 39 1.5 0 360 G4_Galactic 0 0 0 log_World norot dead 901
|
||||
/musr/command construct tubs save51 0 39 1.5 0 360 G4_Galactic 0 0 50 log_World norot dead 902
|
||||
/musr/command construct tubs save52 0 39 1.5 0 360 G4_Galactic 0 0 100 log_World norot dead 903
|
||||
/musr/command construct tubs save53 0 39 1.5 0 360 G4_Galactic 0 0 150 log_World norot dead 904
|
||||
/musr/command construct tubs save0 0 39 0.05 0 360 G4_Galactic 0 0 -2500 log_World norot dead 851
|
||||
/musr/command construct tubs save1 0 39 0.05 0 360 G4_Galactic 0 0 -2450 log_World norot dead 852
|
||||
/musr/command construct tubs save2 0 39 0.05 0 360 G4_Galactic 0 0 -2400 log_World norot dead 853
|
||||
/musr/command construct tubs save3 0 39 0.05 0 360 G4_Galactic 0 0 -2350 log_World norot dead 854
|
||||
/musr/command construct tubs save4 0 39 0.05 0 360 G4_Galactic 0 0 -2300 log_World norot dead 855
|
||||
/musr/command construct tubs save5 0 39 0.05 0 360 G4_Galactic 0 0 -2250 log_World norot dead 856
|
||||
/musr/command construct tubs save6 0 39 0.05 0 360 G4_Galactic 0 0 -2200 log_World norot dead 857
|
||||
/musr/command construct tubs save7 0 39 0.05 0 360 G4_Galactic 0 0 -2150 log_World norot dead 858
|
||||
/musr/command construct tubs save8 0 39 0.05 0 360 G4_Galactic 0 0 -2100 log_World norot dead 859
|
||||
/musr/command construct tubs save9 0 39 0.05 0 360 G4_Galactic 0 0 -2050 log_World norot dead 860
|
||||
/musr/command construct tubs save10 0 39 0.05 0 360 G4_Galactic 0 0 -2000 log_World norot dead 861
|
||||
/musr/command construct tubs save11 0 39 0.05 0 360 G4_Galactic 0 0 -1950 log_World norot dead 862
|
||||
/musr/command construct tubs save12 0 39 0.05 0 360 G4_Galactic 0 0 -1900 log_World norot dead 863
|
||||
/musr/command construct tubs save13 0 39 0.05 0 360 G4_Galactic 0 0 -1850 log_World norot dead 864
|
||||
/musr/command construct tubs save14 0 39 0.05 0 360 G4_Galactic 0 0 -1800 log_World norot dead 865
|
||||
/musr/command construct tubs save15 0 39 0.05 0 360 G4_Galactic 0 0 -1750 log_World norot dead 866
|
||||
/musr/command construct tubs save16 0 39 0.05 0 360 G4_Galactic 0 0 -1700 log_World norot dead 867
|
||||
/musr/command construct tubs save17 0 39 0.05 0 360 G4_Galactic 0 0 -1650 log_World norot dead 868
|
||||
/musr/command construct tubs save18 0 39 0.05 0 360 G4_Galactic 0 0 -1600 log_World norot dead 869
|
||||
/musr/command construct tubs save19 0 39 0.05 0 360 G4_Galactic 0 0 -1550 log_World norot dead 870
|
||||
/musr/command construct tubs save20 0 39 0.05 0 360 G4_Galactic 0 0 -1500 log_World norot dead 871
|
||||
/musr/command construct tubs save21 0 39 0.05 0 360 G4_Galactic 0 0 -1450 log_World norot dead 872
|
||||
/musr/command construct tubs save22 0 39 0.05 0 360 G4_Galactic 0 0 -1400 log_World norot dead 873
|
||||
/musr/command construct tubs save23 0 39 0.05 0 360 G4_Galactic 0 0 -1350 log_World norot dead 874
|
||||
/musr/command construct tubs save24 0 39 0.05 0 360 G4_Galactic 0 0 -1300 log_World norot dead 875
|
||||
/musr/command construct tubs save25 0 39 0.05 0 360 G4_Galactic 0 0 -1250 log_World norot dead 876
|
||||
/musr/command construct tubs save26 0 39 0.05 0 360 G4_Galactic 0 0 -1200 log_World norot dead 877
|
||||
/musr/command construct tubs save27 0 39 0.05 0 360 G4_Galactic 0 0 -1150 log_World norot dead 878
|
||||
/musr/command construct tubs save28 0 39 0.05 0 360 G4_Galactic 0 0 -1100 log_World norot dead 879
|
||||
/musr/command construct tubs save29 0 39 0.05 0 360 G4_Galactic 0 0 -1050 log_World norot dead 880
|
||||
/musr/command construct tubs save30 0 39 0.05 0 360 G4_Galactic 0 0 -1000 log_World norot dead 881
|
||||
/musr/command construct tubs save31 0 39 0.05 0 360 G4_Galactic 0 0 -950 log_World norot dead 882
|
||||
/musr/command construct tubs save32 0 39 0.05 0 360 G4_Galactic 0 0 -900 log_World norot dead 883
|
||||
/musr/command construct tubs save33 0 39 0.05 0 360 G4_Galactic 0 0 -850 log_World norot dead 884
|
||||
/musr/command construct tubs save34 0 39 0.05 0 360 G4_Galactic 0 0 -800 log_World norot dead 885
|
||||
/musr/command construct tubs save35 0 39 0.05 0 360 G4_Galactic 0 0 -750 log_World norot dead 886
|
||||
/musr/command construct tubs save36 0 39 0.05 0 360 G4_Galactic 0 0 -700 log_World norot dead 887
|
||||
/musr/command construct tubs save37 0 39 0.05 0 360 G4_Galactic 0 0 -650 log_World norot dead 888
|
||||
/musr/command construct tubs save38 0 39 0.05 0 360 G4_Galactic 0 0 -600 log_World norot dead 889
|
||||
/musr/command construct tubs save39 0 39 0.05 0 360 G4_Galactic 0 0 -550 log_World norot dead 890
|
||||
/musr/command construct tubs save40 0 39 0.05 0 360 G4_Galactic 0 0 -500 log_World norot dead 891
|
||||
/musr/command construct tubs save41 0 39 0.05 0 360 G4_Galactic 0 0 -450 log_World norot dead 892
|
||||
/musr/command construct tubs save42 0 39 0.05 0 360 G4_Galactic 0 0 -400 log_World norot dead 893
|
||||
/musr/command construct tubs save43 0 39 0.05 0 360 G4_Galactic 0 0 -350 log_World norot dead 894
|
||||
/musr/command construct tubs save44 0 39 0.05 0 360 G4_Galactic 0 0 -300 log_World norot dead 895
|
||||
/musr/command construct tubs save45 0 39 0.05 0 360 G4_Galactic 0 0 -250 log_World norot dead 896
|
||||
/musr/command construct tubs save46 0 39 0.05 0 360 G4_Galactic 0 0 -200 log_World norot dead 897
|
||||
/musr/command construct tubs save47 0 39 0.05 0 360 G4_Galactic 0 0 -150 log_World norot dead 898
|
||||
/musr/command construct tubs save48 0 39 0.05 0 360 G4_Galactic 0 0 -100 log_World norot dead 899
|
||||
/musr/command construct tubs save49 0 39 0.05 0 360 G4_Galactic 0 0 -50 log_World norot dead 900
|
||||
/musr/command construct tubs save50 0 39 0.05 0 360 G4_Galactic 0 0 0 log_World norot dead 901
|
||||
/musr/command construct tubs save51 0 39 0.05 0 360 G4_Galactic 0 0 50 log_World norot dead 902
|
||||
/musr/command construct tubs save52 0 39 0.05 0 360 G4_Galactic 0 0 100 log_World norot dead 903
|
||||
/musr/command construct tubs save53 0 39 0.05 0 360 G4_Galactic 0 0 150 log_World norot dead 904
|
||||
|
||||
|
||||
################################################################################################################
|
||||
@ -233,24 +207,6 @@
|
||||
/musr/command construct tubs hInShell 80.0 84.0 65.5 0 360 G4_Al 0 0 66.5 log_DetV norot dead 70
|
||||
/musr/command construct tubs vInShell 80.0 85.0 60.0 0 360 G4_Al 0 0 -60.0 log_DetV norot dead 70
|
||||
|
||||
|
||||
# Old detectors
|
||||
## Inner Scintillators - I
|
||||
#/musr/command construct tubs ScID1 90 95 130 45 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_DetV norot musr/ScintSD 011
|
||||
#/musr/command construct tubs ScIR 90 95 130 135 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_DetV norot musr/ScintSD 012
|
||||
#/musr/command construct tubs ScID 90 95 130 225 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_DetV norot musr/ScintSD 013
|
||||
#/musr/command construct tubs ScIL 90 95 130 315 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_DetV norot musr/ScintSD 014
|
||||
|
||||
## Outer Scintillators - O
|
||||
#/musr/command construct tubs ScOU 96 101 130 45 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_DetV norot musr/ScintSD 021
|
||||
#/musr/command construct tubs ScOR 96 101 130 135 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_DetV norot musr/ScintSD 022
|
||||
#/musr/command construct tubs ScOD 96 101 130 225 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_DetV norot musr/ScintSD 023
|
||||
#/musr/command construct tubs ScOL 96 101 130 315 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_DetV norot musr/ScintSD 024
|
||||
|
||||
# For testing dimensions
|
||||
#/musr/command construct box test 2.5 19.7 60. Steel -88.5 -0.0 -60. log_DetV norot dead 3206
|
||||
#/musr/command construct sphere test 0 2 0 360 0 360 Steel 37.6643 -17.2901 1.17977 log_ScD1 norot dead 3206
|
||||
|
||||
# Visual attributes (optional)
|
||||
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE green
|
||||
#/musr/command visattributes log_ScD49 green
|
||||
@ -306,20 +262,16 @@
|
||||
|
||||
# Dummy, thin cylindres used for applying the SAME RA field-map (ROTATED by 90 deg.) to different anodes.
|
||||
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cons, tori, etc.!
|
||||
/musr/command construct tubs RA_U 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 322
|
||||
/musr/command construct tubs RA_T 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 322
|
||||
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.02 log_World rotRAnR dead 324
|
||||
/musr/command construct tubs RA_D 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 326
|
||||
/musr/command construct tubs RA_B 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 326
|
||||
/musr/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.06 log_World rotRAnL dead 328
|
||||
|
||||
# RA_G - Ring Anode Ground Cylinder
|
||||
/musr/command construct tubs RA_G 58 62.5 58.0 0 360 G4_Cu 0 0 -221.5 log_World norot dead 351
|
||||
|
||||
# Ring Anodes visual attributes (optional)
|
||||
#/musr/command visattributes log_RA_EU invisible
|
||||
#/musr/command visattributes log_RA_MR invisible
|
||||
/musr/command visattributes log_RA_G invisible
|
||||
#/musr/command visattributes log_RA_G Grid_style
|
||||
|
||||
|
||||
################################################################################################################
|
||||
# L3 - 3rd Einzel Lens # L3z = -56.7 cm.
|
||||
@ -412,7 +364,7 @@
|
||||
/musr/command visattributes log_TrigS oxsteel
|
||||
/musr/command visattributes log_TF1 oxsteel
|
||||
/musr/command visattributes log_TF2 oxsteel
|
||||
#*/musr/command visattributes saveCFoil MACOR_style
|
||||
/musr/command visattributes log_CFoil red
|
||||
#*/musr/command visattributes log_saveAfterTD darkred
|
||||
|
||||
|
||||
@ -459,6 +411,10 @@
|
||||
/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 0 0 -1929.5 log_World norot dead 600
|
||||
/musr/command visattributes log_L1ENV invisible
|
||||
|
||||
# Lens 1 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 246 mm)
|
||||
/musr/command construct tubs L1ST 70 73 60 0 360 Steel 0 0 0 log_L1ENV norot dead 650
|
||||
|
||||
|
||||
# GPn - Ground Potential Electrodes. (n = 1-2, inner dia: 80 mm, outer dia: 84 mm, length: 100 mm)
|
||||
# n = 1 - Ground Electrode 1 (further from SR).
|
||||
/musr/command construct tubs L1GP1 40 44 50 0 360 Steel 0 0 -100 log_L1ENV norot dead 651
|
||||
@ -492,13 +448,13 @@
|
||||
/musr/command construct tubs L3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -567.0 log_World norot dead 708 nofield
|
||||
|
||||
# LENS 1. Best L1 settings: 8.5 kV for 15 keV muons, 11.33 kV for 20 keV muons
|
||||
/musr/command globalfield Lens1EField 0. 0. -1929.5 fromfile 2DE L1_Erz.map log_L1EField 9
|
||||
/musr/command globalfield Lens1EField 0. 0. -1929.5 fromfile 2DE L1_Erz.map log_L1EField L1VOLTAGE
|
||||
|
||||
# LENS 2. Best L2 settings: 13 kV for 15 keV muons, 17.33 kV for 20 keV muons
|
||||
/musr/command globalfield Lens2EField 0. 0. -1411 fromfile 2DE L2_Erz.map log_L2EField 13.0
|
||||
/musr/command globalfield Lens2EField 0. 0. -1411 fromfile 2DE L2_Erz.map log_L2EField L2VOLTAGE
|
||||
|
||||
# LENS 3. Best L3 settings: 8.35 kV for 15 keV muons, 11.41 kV for 20 keV muons
|
||||
/musr/command globalfield Lens3EField 0. 0. -567.0 fromfile 2DE L3_Erz.map log_L3EField 8.35
|
||||
/musr/command globalfield Lens3EField 0. 0. -567.0 fromfile 2DE L3_Erz.map log_L3EField L3VOLTAGE
|
||||
|
||||
# Electrical Field areas in the Trigger Detector
|
||||
# En = Electrical Field n: TnFieldMgr (n = 1-3)
|
||||
@ -515,13 +471,15 @@
|
||||
/musr/command globalfield Trigg3_field 45 45 4 uniform 0. 0. -1038.0 log_TriggE3 0 0 0 0 0 -0.49375
|
||||
|
||||
### Electric field at RING ANODE - from 3DE field map
|
||||
# Typically set at +11.0 kV for a muon beam at 15 keV
|
||||
# To create an arbitrary configuration, switch on all fields and set different potentials.
|
||||
#######/musr/command globalfield RngAnU_field 0. 0. -167.00 fromfile 3DE EM_3D_extc.map log_RA_U 11.0
|
||||
/musr/command globalfield RngAnU_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_U 11
|
||||
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 11
|
||||
/musr/command globalfield RngAnD_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_D 11
|
||||
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 11
|
||||
/musr/command globalfield RngAnT_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_T RA_TVOL
|
||||
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R RA_RVOL
|
||||
/musr/command globalfield RngAnB_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_B RA_BVOL
|
||||
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L RA_LVOL
|
||||
|
||||
### Magnetic field at the sample
|
||||
/musr/command construct tubs SBField 0 0.01 0.005 0 360 G4_Galactic 0.0 0.0 15.0 log_World norot dead 709 nofield
|
||||
/musr/command globalfield SampleBField 0. 0. 15.0 fromfile 3DB wew_rs_ext.map log_SBField SAM_BFIELD
|
||||
|
||||
# Set parameters for particle tracking in an EM field
|
||||
/musr/command globalfield setparameter SetLargestAcceptableStep 5
|
||||
@ -619,8 +577,8 @@
|
||||
# VISUALIZATION options
|
||||
# To enable or disable visualization uncomment one of these lines
|
||||
# To modify visualization options edit the file vis.mac
|
||||
#*/vis/disable
|
||||
/control/execute vis.mac
|
||||
/vis/disable
|
||||
#*/control/execute vis.mac
|
||||
#*/control/execute visdawn.mac
|
||||
|
||||
|
||||
@ -753,7 +711,7 @@
|
||||
|
||||
# Set muon energy before hitting TD; a constant field in front of the C-foil accelerates the muons
|
||||
# to add 3.73 keV
|
||||
/gun/kenergy 15.0 keV
|
||||
/gun/kenergy ENERGY keV
|
||||
|
||||
# Set beam momentum direction
|
||||
/gun/direction 0.0 0.0 1.0
|
||||
@ -785,6 +743,6 @@
|
||||
|
||||
# BEAM ON
|
||||
#/run/beamOn 1000000
|
||||
#/run/beamOn 1
|
||||
#/run/beamOn 10000
|
||||
#/run/beamOn 10
|
||||
/run/beamOn 1000
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Form implementation generated from reading ui file 'QmuSRSim.ui'
|
||||
#
|
||||
# Created: Thu Apr 7 17:22:13 2011
|
||||
# Created: Fri Apr 8 15:45:19 2011
|
||||
# by: The PerlQt User Interface Compiler (puic)
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
@ -18368,17 +18368,73 @@ sub fileNew
|
||||
|
||||
sub fileOpen
|
||||
{
|
||||
print "QmuSRSim->fileOpen(): Not implemented yet.\n";
|
||||
|
||||
my $file=Qt::FileDialog::getOpenFileName(
|
||||
".",
|
||||
"Initialization file (.* *.*)",
|
||||
this,
|
||||
"open file dialog",
|
||||
"Choose an initialization file");
|
||||
|
||||
# If the user gave a valid filename try to read it
|
||||
if ($file ne "") {
|
||||
open (INF,q{<},"$file" );
|
||||
my @lines = <INF>;
|
||||
close(INF);
|
||||
my $Attrib="";
|
||||
foreach my $line (@lines) {
|
||||
# Remove white spaces
|
||||
$line =~ s/\s+//g;
|
||||
my @InitPar = split (/=/,$line);
|
||||
# Check it is not empty or title line
|
||||
if ($InitPar[0] ne "" && $InitPar[1] ne "") {
|
||||
$Attrib = child($InitPar[0]);
|
||||
$Attrib->setText($InitPar[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sub fileSave
|
||||
{
|
||||
print "QmuSRSim->fileSave(): Not implemented yet.\n";
|
||||
|
||||
my %All=CreateAllInput();
|
||||
my $InitFile="";
|
||||
for my $key (keys %All) {
|
||||
$InitFile=$InitFile.$key."=".$All{$key}."\n";
|
||||
}
|
||||
|
||||
# Save to default file name "TriumSP.cfg"
|
||||
my $file = "musrSim.cfg";
|
||||
open (OUTF,q{>},"$file" );
|
||||
print OUTF (" $InitFile");
|
||||
close(OUTF);
|
||||
|
||||
}
|
||||
|
||||
sub fileSaveAs
|
||||
{
|
||||
print "QmuSRSim->fileSaveAs(): Not implemented yet.\n";
|
||||
|
||||
my %All=CreateAllInput();
|
||||
my $InitFile="";
|
||||
for my $key (keys %All) {
|
||||
$InitFile=$InitFile.$key."=".$All{$key}."\n";
|
||||
}
|
||||
|
||||
my $file=Qt::FileDialog::getSaveFileName(
|
||||
"musrSim cfg",
|
||||
"musrSim GUI Initialization file (*.cfg)",
|
||||
this,
|
||||
"save file dialog",
|
||||
"Choose a filename to save under");
|
||||
# if the user gave a filename then sanesave copy to it
|
||||
if ($file ne "") {
|
||||
open (OUTF,q{>},"$file" );
|
||||
print OUTF (" $InitFile");
|
||||
close(OUTF);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sub filePrint
|
||||
@ -18388,7 +18444,14 @@ sub filePrint
|
||||
|
||||
sub fileExit
|
||||
{
|
||||
print "QmuSRSim->fileExit(): Not implemented yet.\n";
|
||||
|
||||
my $Ans = Qt::MessageBox::question( this, "Quit?","Are you sure you want to quit?","&Yes","&No","",0,1);
|
||||
if ($Ans==0) {
|
||||
# Then quit
|
||||
Qt::Application::exit( 0 );
|
||||
}
|
||||
# Otherwize go back
|
||||
|
||||
}
|
||||
|
||||
sub editUndo
|
||||
@ -18528,7 +18591,7 @@ sub StartCalc
|
||||
}
|
||||
|
||||
open(NEWMACF,">1000.mac");
|
||||
print (NEWMACF "@lines");
|
||||
print NEWMACF @lines;
|
||||
close(NEWMACF);
|
||||
|
||||
|
||||
|
@ -19,19 +19,69 @@ void QmuSRSim::fileNew()
|
||||
|
||||
void QmuSRSim::fileOpen()
|
||||
{
|
||||
my $file=Qt::FileDialog::getOpenFileName(
|
||||
".",
|
||||
"Initialization file (.* *.*)",
|
||||
this,
|
||||
"open file dialog",
|
||||
"Choose an initialization file");
|
||||
|
||||
# If the user gave a valid filename try to read it
|
||||
if ($file ne "") {
|
||||
open (INF,q{<},"$file" );
|
||||
my @lines = <INF>;
|
||||
close(INF);
|
||||
my $Attrib="";
|
||||
foreach my $line (@lines) {
|
||||
# Remove white spaces
|
||||
$line =~ s/\s+//g;
|
||||
my @InitPar = split (/=/,$line);
|
||||
# Check it is not empty or title line
|
||||
if ($InitPar[0] ne "" && $InitPar[1] ne "") {
|
||||
$Attrib = child($InitPar[0]);
|
||||
$Attrib->setText($InitPar[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void QmuSRSim::fileSave()
|
||||
{
|
||||
my %All=CreateAllInput();
|
||||
my $InitFile="";
|
||||
for my $key (keys %All) {
|
||||
$InitFile=$InitFile.$key."=".$All{$key}."\n";
|
||||
}
|
||||
|
||||
# Save to default file name "TriumSP.cfg"
|
||||
my $file = "musrSim.cfg";
|
||||
open (OUTF,q{>},"$file" );
|
||||
print OUTF (" $InitFile");
|
||||
close(OUTF);
|
||||
}
|
||||
|
||||
|
||||
void QmuSRSim::fileSaveAs()
|
||||
{
|
||||
my %All=CreateAllInput();
|
||||
my $InitFile="";
|
||||
for my $key (keys %All) {
|
||||
$InitFile=$InitFile.$key."=".$All{$key}."\n";
|
||||
}
|
||||
|
||||
my $file=Qt::FileDialog::getSaveFileName(
|
||||
"musrSim cfg",
|
||||
"musrSim GUI Initialization file (*.cfg)",
|
||||
this,
|
||||
"save file dialog",
|
||||
"Choose a filename to save under");
|
||||
# if the user gave a filename then sanesave copy to it
|
||||
if ($file ne "") {
|
||||
open (OUTF,q{>},"$file" );
|
||||
print OUTF (" $InitFile");
|
||||
close(OUTF);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -43,7 +93,12 @@ void QmuSRSim::filePrint()
|
||||
|
||||
void QmuSRSim::fileExit()
|
||||
{
|
||||
|
||||
my $Ans = Qt::MessageBox::question( this, "Quit?","Are you sure you want to quit?","&Yes","&No","",0,1);
|
||||
if ($Ans==0) {
|
||||
# Then quit
|
||||
Qt::Application::exit( 0 );
|
||||
}
|
||||
# Otherwize go back
|
||||
}
|
||||
|
||||
|
||||
@ -189,7 +244,7 @@ void QmuSRSim::StartCalc()
|
||||
}
|
||||
|
||||
open(NEWMACF,">1000.mac");
|
||||
print (NEWMACF "@lines");
|
||||
print NEWMACF @lines;
|
||||
close(NEWMACF);
|
||||
|
||||
}
|
||||
|
@ -262,17 +262,15 @@
|
||||
|
||||
# Dummy, thin cylindres used for applying the SAME RA field-map (ROTATED by 90 deg.) to different anodes.
|
||||
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cons, tori, etc.!
|
||||
/musr/command construct tubs RA_U 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 322
|
||||
/musr/command construct tubs RA_T 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 322
|
||||
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.02 log_World rotRAnR dead 324
|
||||
/musr/command construct tubs RA_D 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 326
|
||||
/musr/command construct tubs RA_B 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 326
|
||||
/musr/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.06 log_World rotRAnL dead 328
|
||||
|
||||
# RA_G - Ring Anode Ground Cylinder
|
||||
/musr/command construct tubs RA_G 58 62.5 58.0 0 360 G4_Cu 0 0 -221.5 log_World norot dead 351
|
||||
|
||||
# Ring Anodes visual attributes (optional)
|
||||
#/musr/command visattributes log_RA_EU invisible
|
||||
#/musr/command visattributes log_RA_MR invisible
|
||||
/musr/command visattributes log_RA_G invisible
|
||||
#/musr/command visattributes log_RA_G Grid_style
|
||||
|
||||
@ -446,6 +444,10 @@
|
||||
/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 0 0 -1929.5 log_World norot dead 600
|
||||
/musr/command visattributes log_L1ENV invisible
|
||||
|
||||
# Lens 1 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 246 mm)
|
||||
/musr/command construct tubs L1ST 70 73 60 0 360 Steel 0 0 0 log_L1ENV norot dead 650
|
||||
|
||||
|
||||
# GPn - Ground Potential Electrodes. (n = 1-2, inner dia: 80 mm, outer dia: 84 mm, length: 100 mm)
|
||||
# n = 1 - Ground Electrode 1 (further from SR).
|
||||
/musr/command construct tubs L1GP1 40 44 50 0 360 Steel 0 0 -100 log_L1ENV norot dead 651
|
||||
@ -457,6 +459,10 @@
|
||||
# Lens 1 visual attributes (optional)
|
||||
/musr/command visattributes log_L1HP darkred
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
###################################################################################
|
||||
################### E L E C T R O M G N E T I C F I E L D S ##################
|
||||
###################################################################################
|
||||
@ -509,6 +515,10 @@
|
||||
/musr/command globalfield RngAnB_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_B RA_BVOL
|
||||
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L RA_LVOL
|
||||
|
||||
### Magnetic field at the sample
|
||||
/musr/command construct tubs SBField 0 0.01 0.005 0 360 G4_Galactic 0.0 0.0 15.0 log_World norot dead 709 nofield
|
||||
/musr/command globalfield SampleBField 0. 0. 15.0 fromfile 3DB wew_rs_ext.map log_SBField SAM_BFIELD
|
||||
|
||||
# Set parameters for particle tracking in an EM field
|
||||
/musr/command globalfield setparameter SetLargestAcceptableStep 5
|
||||
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
|
||||
@ -605,8 +615,8 @@
|
||||
# VISUALIZATION options
|
||||
# To enable or disable visualization uncomment one of these lines
|
||||
# To modify visualization options edit the file vis.mac
|
||||
#*/vis/disable
|
||||
/control/execute vis.mac
|
||||
/vis/disable
|
||||
#*/control/execute vis.mac
|
||||
#*/control/execute visdawn.mac
|
||||
|
||||
|
||||
@ -739,7 +749,7 @@
|
||||
|
||||
# Set muon energy before hitting TD; a constant field in front of the C-foil accelerates the muons
|
||||
# to add 3.73 keV
|
||||
/gun/kenergy 15.0 keV
|
||||
/gun/kenergy ENERGY keV
|
||||
|
||||
# Set beam momentum direction
|
||||
/gun/direction 0.0 0.0 1.0
|
||||
@ -771,6 +781,6 @@
|
||||
|
||||
# BEAM ON
|
||||
#/run/beamOn 1000000
|
||||
#/run/beamOn 1
|
||||
#/run/beamOn 10000
|
||||
#/run/beamOn 10
|
||||
/run/beamOn 1000
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user