From 7abe51e0bd095a6c8d88a8ed0b7a1b9bb3643d42 Mon Sep 17 00:00:00 2001 From: shiroka Date: Mon, 16 Jun 2008 15:50:43 +0000 Subject: [PATCH] --- geant4/LEMuSR/run/1050.mac | 612 +++++++++++++++++++++++++++++++++++++ 1 file changed, 612 insertions(+) create mode 100644 geant4/LEMuSR/run/1050.mac diff --git a/geant4/LEMuSR/run/1050.mac b/geant4/LEMuSR/run/1050.mac new file mode 100644 index 0000000..5e32a42 --- /dev/null +++ b/geant4/LEMuSR/run/1050.mac @@ -0,0 +1,612 @@ +# Macro file for lem4.cc - Construct detector, set fields and other parameters. +# Last modified by T. Shiroka: 17.03.2008 + +# How to run: lem4 10xx.mac (append "idle" for prompt after running) +# lem4 10xx.mac > fname.txt (stores output on a txt file) + +############################################################################################### +# # +# Specify the geometry parameters in this file (all dimensions in mm) # +# a. Lines starting with hash marks "#" are comments # +# b Lines starting with #* are temporary comments. Remove/modify to change the configuration # +# c. Lines starting with /lem4/command are commands for the executable program # +# d. Lines starting with /vis, /gun, etc. are common macro commands # +# e. Beam-line components are ordered from exp. area (MCP2) to trigger detector (TD) # +#---------------------------------------------------------------------------------------------# +# Syntax example (following /lem4/command): # +# construct solid_type volume_name parameters_defining_solid material position mothers_name # +# (mothers_name starts with log_) # +############################################################################################### + +# For the meaning of the acronyms see also the original G3 file ugeom.F at: +# http://savannah.psi.ch/viewcvs/trunk/simulation/geant3/src/lemsr/ugeom.F?root=nemu%2Flem&rev=2964&view=markup + + + + + +################################################################################################################ +# -- 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: +/lem4/command rotation rotTrig 0 1 0 -45 +/lem4/command rotation rotRAnR 0 0 1 -90 +/lem4/command rotation rotRAnL 0 0 1 90 +/lem4/command rotation rotRAnD 0 0 1 180 + + + + + +################################################################################################################ +# -- LEM GEOMETRY -- +################################################################################################################ + +# WORLD = Laboratory reference frame +/lem4/command construct box World 250 250 2250 G4_Galactic 0 0 0 no_logical_volume norot dead -1 +# MINIMUM WORD HALF LENGTH 1250 mm! +#/lem4/command construct box World 2000 2000 4000 G4_Galactic 0 0 0 no_logical_volume norot dead -1 + +# World visual attributes (optional) +/lem4/command visattributes log_World invisible + + + + +#=============================================================================================================== +# Sc - Scintillators: U - up, D - down, L - left, R - right (with respect to muon's view - momentum direction) +# 8 Scintillators in two concentric rings - Inner and Outer (see also the convention for the Ring Anode) +#=============================================================================================================== + +## Inner Scintillators - I +#*/lem4/command construct tubs ScIU 90 95 130 45 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot lem4/ScintSD 011 nofield +#*/lem4/command construct tubs ScIR 90 95 130 135 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot lem4/ScintSD 012 nofield +#*/lem4/command construct tubs ScID 90 95 130 225 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot lem4/ScintSD 013 nofield +#*/lem4/command construct tubs ScIL 90 95 130 315 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot lem4/ScintSD 014 nofield + +## Outer Scintillators - O +/lem4/command construct tubs ScOU 96 101 130 45 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot lem4/ScintSD 021 nofield +/lem4/command construct tubs ScOR 96 101 130 135 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot lem4/ScintSD 022 nofield +/lem4/command construct tubs ScOD 96 101 130 225 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot lem4/ScintSD 023 nofield +/lem4/command construct tubs ScOL 96 101 130 315 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot lem4/ScintSD 024 nofield + +# Visual attributes (optional) +#*/lem4/command visattributes log_ScOU SCINT_style +#*/lem4/command visattributes log_ScOD dSCINT_style +#*/lem4/command visattributes log_ScOL darkred + + + + +#=============================================================================================================== +# Experimental Area - Can host EITHER the Cryostat OR the MCP2 (For the tests we usually use the MCP) +# Delimited by the F160 and F100 (blank end) flanges +#=============================================================================================================== + +# MCP - Multi-Channel Plate 2 Chamber; V - Vacuum, S - Solid # Note: VERY IMPORTANT: mcpv_z = -92.5 mm! +# OLD way of assigning a field +#/lem4/command construct tubs MCPV 0 76.5 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100 MCPSfield +/lem4/command construct tubs MCPV 0 76.5 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100 nofield +/lem4/command construct tubs MCPS 76.5 79.5 162.0 0 360 Steel 0 0 0 log_World norot dead 101 nofield + +# F - Flanges: F160, F100, F200 (used only when the Asymmetry check is OFF) +# F160 - 160 CF flange upstream of MCP2 tube +# F100 (Blank end flange) # OLD Value was 162.0 +/lem4/command construct tubs F160 79.5 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 901 nofield +/lem4/command construct tubs F100 0 76.5 10 0 360 Steel 0 0 172.0 log_World norot dead 902 nofield + +# NOTE: Original F100 referred to MCPV (as shown below) was moved to World. +#/lem4/command construct tubs F100 0 76.5 10 0 360 Steel 0 0 264.5 log_MCPV norot dead 902 nofield + + +# Experimental Area visual attributes (optional) +/lem4/command visattributes log_MCPV invisible +/lem4/command visattributes log_MCPS invisible +/lem4/command visattributes log_F160 blue_style +/lem4/command visattributes log_F100 blue_style + + + + +#=============================================================================================================== +# MCP - Micro Channel Plate Detector MCP2 (Used as an alternative to cryostat) # mcpv_z = -92.5 mm! +#=============================================================================================================== + +# MCPM1 - MCP Macor ring 1 +# MCPD - electron multiplying glass disk (also known as target) # Sensitive surface at z = 14 mm wrt. World +# MCPM2 - MCP Macor ring 2 +#*/lem4/command construct tubs MCPM1 24 32.5 0.75 0 360 Macor 0 0 105.75 log_MCPV norot dead 201 nofield +# Use it either as (DMCP-lem4/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz. +#*/lem4/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 108.0 log_MCPV norot dead 032 nofield +/lem4/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 110.25 log_MCPV norot dead 203 nofield +# NOTE: To intercept ALL the incoming muons, comment the DMCP and MCPM1 lines above and uncomment this one: +#*/lem4/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_MCPV norot lem4/ScintSD 202 nofield +/lem4/command construct tubs target 0 76.5 1.5 0 360 MCPglass 0 0 108 log_MCPV norot lem4/ScintSD 202 nofield + +# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole) +# MCVR - "Vacuum Ring" (circular hole) +/lem4/command construct box MCSR 36.5 36.5 1 Steel 0 0 112.5 log_MCPV norot dead 204 nofield +/lem4/command construct tubs MCVR 0 27.5 1 0 360 G4_Galactic 0 0 0 log_MCSR norot dead 205 nofield + +# MCPA = MCP Anode (modelled as a box with two symmetrically subtracted "vacuum" disks) +# ANVA1 - Anode "Vacuum" 1 - Part of MCP Anode +# ANVA2 - Anode "Vacuum" 2 - Part of MCP Anode +/lem4/command construct box MCPA 36.5 36.5 4 Steel 0 0 123.5 log_MCPV norot dead 206 nofield +/lem4/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 207 nofield +/lem4/command construct tubs ANVA2 0 27.5 1.5 0 360 G4_Galactic 0 0 2.5 log_MCPA norot dead 208 nofield + +# MCSS - MCP Stainless Steel Support Ring +/lem4/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 156.3 log_MCPV norot dead 209 nofield + + +# MCP2 visual attributes (optional) +#/lem4/command visattributes log_DMCP MCP_style +#*/lem4/command visattributes log_target MCP_style +#*/lem4/command visattributes log_MCPM1 MACOR_style +/lem4/command visattributes log_MCPM2 MACOR_style + + + + +#=============================================================================================================== +# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm) +#=============================================================================================================== + +# SAH - SAmple Holder components (Cu plate) Cu or Al plates 1. Cu plate (sample holder) on Cold finger, 0.5cm +# SAPH - SAPpHire plate mounted between 1st and 2nd Cu plates, 6 mm thick, 60 mm diameter. +# SAH3 is ignored because currently NOT use. +#*/lem4/command construct tubs SAH1 0 35 2.5 0 360 G4_Cu 0 0 119.0 log_MCPV norot dead 251 nofield +#*/lem4/command construct tubs SAH2 0 35 2 0 360 G4_Cu 0 0 108.5 log_MCPV norot dead 252 nofield +#/lem4/command construct tubs SAH3 20 35 0.5 0 360 G4_Cu 0 0 106.0 log_MCPV norot dead 253 nofield +#*/lem4/command construct tubs SAPH 0 30 3 0 360 G4_ALUMINUM_OXIDE 0 0 113.5 log_MCPV norot dead 254 nofield + +# Other components of the CRYostat (dimensions and position of CRY4 are only approx. because unknown) +# COFI - COld FInger +# CRY1 - End plate of cryostat (7 mm thick, 30 mm diameter) +# CRY2 - Heat exchanger (assuming a 10 mm opening - Original dimensions not known.) # OLD pos. 160.0 +# CRY3 - Mounting ring for He-shield +# CRY4 - 2 mm thick plate for mounting ring. This is just to close the downstream side. +# CRSH - Lateral He-shield +# CRSH2- Frontal He-shield Ring +#*/lem4/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 126.5 log_MCPV norot dead 261 nofield +#*/lem4/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 135.0 log_MCPV norot dead 262 nofield +#*/lem4/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 163.5 log_MCPV norot dead 263 nofield +#*/lem4/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 143.5 log_MCPV norot dead 264 nofield +#*/lem4/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 143.5 log_MCPV norot dead 265 nofield +#*/lem4/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 108.5 log_MCPV norot dead 266 nofield +#*/lem4/command construct tubs CRSH2 30 48 0.5 0 360 G4_Cu 0 0 63.0 log_MCPV norot dead 267 nofield + +# Electrical Field Guard Rings (distance between the guard rings: 16 mm) +#*/lem4/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 76.0 log_MCPV norot dead 271 nofield +#*/lem4/command construct tubs Guard2 29 38 1.5 0 360 G4_Cu 0 0 92.0 log_MCPV norot dead 272 nofield + + +# Cryostat visual attributes (optional) +#*/lem4/command visattributes log_SAH1 oxsteel +#*/lem4/command visattributes log_SAH2 oxsteel +#*/lem4/command visattributes log_SAPH MACOR_style +#/lem4/command visattributes log_SAH3 oxsteel +#/lem4/command visattributes log_CRSH invisible + + + + +#=============================================================================================================== +# RA - Ring Anode, M - middle part (closer to Ground Anode), E - end part (farther from the Ground Anode) +# U - up, D - down, L - left, R - right (with respect to muon's view - momentum direction) +# Note: 3.0 mm HALF gap at 45.1469 mm half radius => delta_ang = asin(3.0/45.1469)*180/pi = 3.81 deg. +# Note: delta_ang = 3.1744 deg. for 2.5 mm HG. The angular extension goes e.g. from (45 + da) to (90 - 2*da). +# Note: Ring Anode - Ground Anode distance was 15 mm => CHANGED to 12 mm! (Positions: 11.5 -> 8.5, -33.5 -> -36.5) +#=============================================================================================================== + +# RA_Ez = -10.35+2.25 = -8.1 cm; RA_Mz= -10.35 - 2.25 = -12.6 cm; RA_Gz= -25.45+3.75 = -21.7 cm; mcpv_z = -9.25 cm +/lem4/command construct cones RA_EU 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 8.5 log_MCPV norot dead 301 nofield +/lem4/command construct cones RA_MU 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -36.5 log_MCPV norot dead 302 nofield +/lem4/command construct cones RA_ER 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 8.5 log_MCPV rotRAnR dead 303 nofield +/lem4/command construct cones RA_MR 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -36.5 log_MCPV rotRAnR dead 304 nofield +/lem4/command construct cones RA_ED 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 8.5 log_MCPV rotRAnD dead 305 nofield +/lem4/command construct cones RA_MD 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -36.5 log_MCPV rotRAnD dead 306 nofield +/lem4/command construct cones RA_EL 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 8.5 log_MCPV rotRAnL dead 307 nofield +/lem4/command construct cones RA_ML 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -36.5 log_MCPV rotRAnL dead 308 nofield + + +# 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, cones, tori, etc.! +/lem4/command construct tubs RA_U 0 0.01 0.005 0 360 G4_Galactic 0 0 -50.50 log_MCPV norot dead 322 nofield +/lem4/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -50.52 log_MCPV rotRAnR dead 324 nofield +/lem4/command construct tubs RA_D 0 0.01 0.005 0 360 G4_Galactic 0 0 -50.54 log_MCPV rotRAnD dead 326 nofield +/lem4/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -50.56 log_MCPV rotRAnL dead 328 nofield + + +# RA_G - Ring Anode Ground Cylinder +/lem4/command construct tubs RA_G 58 62.5 58.0 0 360 G4_Cu 0 0 -129.0 log_MCPV norot dead 351 nofield + + +# Ring Anodes visual attributes (optional) +/lem4/command visattributes log_RA_EU oxsteel +/lem4/command visattributes log_RA_MR oxsteel +/lem4/command visattributes log_RA_G Grid_style + + +# Alternative placement using World as a mother volume (mcpv_z = -92.5 mm). Check latter. These values refer to a 5 mm GAP! +#/lem4/command construct cones RA_EU 45.1469 62.5 33.5 39.0 22.5 48.1711 83.6578 Steel 0 0 -81 log_World norot dead 301 nofield +#/lem4/command construct cones RA_MU 56.7937 62.5 45.147 62.5 22.5 48.1711 83.6578 Steel 0 0 -126 log_World norot dead 302 nofield + + + + +#=============================================================================================================== +# Gate Valve Area - Hosts the Ground Anode (upstream part of the Ring Anode) - Delimited by L3F1 and F200 flanges +#=============================================================================================================== + +# GATS - 200 CF flange upstream of MCP2 tube covering the whole length of the gate valve chamber. For simplicity, we +# choose the INNER diameter of the GATe valve Steel tube the same as the OUTER diameter of F200 (200 CF flange) +/lem4/command construct tubs GATS 103.25 126.5 92.5 0 360 Steel 0 0 -254.5 log_World norot dead 371 nofield + +# Vacuum "Ring" (to avoid intersections with MCPV) - Not needed if world is already filled with vacuum. +#*/lem4/command construct tubs GATV 76.5 103.25 92.5 0 360 G4_Galactic 0 0 -254.5 log_World norot dead 370 nofield + +# F200 - 200 CF flange upstream of MCP2 tube to connect to gate valve chamber +/lem4/command construct tubs F200 76.5 103.25 12 0 360 Steel 0 0 -174.0 log_World norot dead 372 nofield + +# NOTE: When using GATV comment the F200 above and uncomment the following (change mother to log_GATV). +#*/lem4/command construct tubs F200 76.5 103.25 12 0 360 Steel 0 0 80.5 log_GATV norot dead 372 nofield + + +# Gate Valve Area visual attributes (optional) +/lem4/command visattributes log_GATS SCINT_style +/lem4/command visattributes log_F200 blue_style + + + + +#=============================================================================================================== +# L3 - 3rd Einzel Lens # L3z = -56.7 cm. ATT: DUMMY FIELD change to electric L3Efield! +#=============================================================================================================== +# Lens Gap = 12.0 mm => G/D = 12/130 ~ 0.1 (Lens Gap = gap between Ground and Anode, D - Diameter) + +# L3 envelope (Tube + Flanges) +# L3VA - Lens 3 Vacuum +# L3ST - Lens 3 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 720 mm) +# L3F1 - Lens 3 Flange 1, z = L3z + 208 mm +# L3F2 - Lens 3 Flange 2, z = L3z - 208 mm + +/lem4/command construct tubs L3VA 0 100 220 0 360 G4_Galactic 0 0 -567 log_World norot dead 400 nofield +/lem4/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 -567 log_World norot dead 401 nofield +/lem4/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -359 log_World norot dead 402 nofield +/lem4/command construct tubs L3F2 103 126.5 12 0 360 Steel 0 0 -775 log_World norot dead 403 nofield + +# GPn - Ground Potential Electrodes +# n = 1-4 and 5-8 - components of the Ground Electrodes +# GP1 - Ground Electrode (inner dia: 130 mm, outer dia: 134 mm, length: 133 mm) +# GP2 - outer electrode surface (LN2 cooling vessel) +# GP3 - first ring cap +# GP4 - second ring cap + +# n = 1-4 - Ground Electrode 1 (further from TD). See above for the meaning of acronyms. +/lem4/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3VA norot dead 421 nofield +/lem4/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3VA norot dead 422 nofield +/lem4/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3VA norot dead 423 nofield +/lem4/command construct tubs L3GP4 67 81 4 0 360 Steel 0 0 71.0 log_L3VA norot dead 424 nofield + +# n = 5-8 - Ground Electrode 2 (closer to TD). See above for the meaning of acronyms. +/lem4/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3VA norot dead 431 nofield +/lem4/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3VA norot dead 432 nofield +/lem4/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3VA norot dead 433 nofield +/lem4/command construct tubs L3GP8 67 81 4 0 360 Steel 0 0 -71.0 log_L3VA norot dead 434 nofield + +# HP - High Potential Electrode (Central Anode - usually at +8.7 kV, for a 15 keV muon beam) +/lem4/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3VA norot dead 451 nofield + + +# Lens 3 visual attributes (optional) +/lem4/command visattributes log_L3VA invisible +/lem4/command visattributes log_L3ST invisible +/lem4/command visattributes log_L3HP darkred + + + + +#=============================================================================================================== +# IP - Intermediate Piece (between Trigger Detector and Einzel Lens 3) +# Original name was CGate - B-field Coil Compensation Gate?! # CompGatez = -86.55 cm; // L3z - 22 - 7.85 cm +#=============================================================================================================== +# IPV (but also others) are just empty volumes "filled" with vacuum. Sometimes used to apply EM fields to restricted areas. +/lem4/command construct tubs IPV 0 100 78.5 0 360 G4_Galactic 0 0 -865.5 log_World norot dead 500 nofield +# IPCF - Intermediate Piece Central Flange (same as L3 Flanges) +# IPST - Intermediate Piece Steel Tube (same diameter as L3 Steel Tube) +/lem4/command construct tubs IPCF 103 126.5 12.0 0 360 Steel 0 0 -865.5 log_World norot dead 501 nofield +/lem4/command construct tubs IPST 100 103 78.5 0 360 Steel 0 0 -865.5 log_World norot dead 502 nofield + + +# IP visual attributes (optional) +/lem4/command visattributes log_IPV invisible +/lem4/command visattributes log_IPCF blue_style +/lem4/command visattributes log_IPST gray + + + + +#=============================================================================================================== +# Trigger - Trigger Detector # Triggerz = -1092 mm +#=============================================================================================================== + +# Trigger tube and relative vacuum +/lem4/command construct tubs TriggerV 0 100 148 0 360 G4_Galactic 0 0 -1092 log_World norot dead 600 nofield +/lem4/command construct tubs Trigger 100 103 148 0 360 Steel 0 0 -1092 log_World norot dead 601 nofield + +# TF - Trigger tube flanges +/lem4/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 -956 log_World norot dead 611 nofield +/lem4/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -1228 log_World norot dead 612 nofield + +# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm). +# USE THE NAME CFoil or coulombCFoil, otherwise lem4MuFormation won't work! +####/lem4/command construct box CFoil 60 60 0.000005147 G4_GRAPHITE 0 0 -45 log_TriggerV norot dead 621 nofield +/lem4/command construct box CFoil 60 60 0.000006471 G4_GRAPHITE 0 0 -45 log_TriggerV norot dead 621 nofield +####/lem4/command construct box coulombCFoil 60 60 0.000005147 G4_GRAPHITE 0 0 -45 log_TriggerV norot dead 621 nofield + +# Notes: NIST tables use G4_GRAPHITE with 1.7 g/cm3 and 78 eV ioniz. energy. +# An area density of 2.20 ug/cm2 implies a CF thickn. = (2.20*1.e-6/1.70)*cm = 1.294e-5 mm - Total thickness +# An area density of 1.75 ug/cm2 implies a CF thickn. = (1.75*1.e-6/1.70)*cm = 1.029e-5 mm - Total thickness +# If necessary, use Graphite as defined in lem4DetectorConstruction.cc and set any density. + +# Dummy plane to intercept outgoing muons from the Carbon foil. +/lem4/command construct box saveCFoil 60 60 5e-4 G4_Galactic 0 0 -44.995 log_TriggerV norot dead 623 nofield + + +# Electrical Field areas in the Trigger Detector +# En = Electrical Field n: TnFieldMgr (n = 1-3) +# Original TriggE2: [4.*sqrt(2), 4.5, 0.7/sqrt(2)] cm -> changed due to overlaps with E1 and E3 +/lem4/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -38.5 log_TriggerV norot dead 631 nofield +/lem4/command construct box TriggE2 45 45 4.9497 G4_Galactic 0 0 2.25 log_TriggerV rotTrig dead 632 nofield +/lem4/command construct box TriggE3 45 45 4 G4_Galactic 0 0 43.0 log_TriggerV norot dead 633 + +# Beam spot (just for having a visual idea!) +/lem4/command construct tubs BSpot 0 20 1 0 360 G4_Galactic 0 0 -48.0 log_TriggerV norot dead 650 nofield + + +# Trigger visual attributes (optional) +/lem4/command visattributes log_TriggerV invisible +/lem4/command visattributes log_Trigger invisible +#/lem4/command visattributes log_CFoil MACOR_style +/lem4/command visattributes log_BSpot fblue_style + +# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL. +# E.g. /lem4/command visattributes Steel red + + + + + +################################################################################################################ +# -- Setting the ELECTRIC and MAGNETIC fields -- +################################################################################################################ + +# Use ABSOLUTE coordinates to specify the field position (i.e. with respect to GLOBAL WORLD)! +# Default field units: Magnetic - T, Electric - kV/mm (or kV for E-field maps). +# NOTE: Applying a field to an invisible log_vol makes is visible! + +### Electric field at TRIGGER Detector TD: Three different uniform fields +/lem4/command globalfield Trigg1_field 0. 0. -1130.5 uniform log_TriggE1 0 0 0 0 0 -0.02375 +/lem4/command globalfield Trigg2_field 0. 0. -1089.75 uniform log_TriggE2 0 0 0 0 0 0.041416 +/lem4/command globalfield Trigg3_field 0. 0. -1049.0 uniform log_TriggE3 0 0 0 0 0 -0.49375 + + +### Electric field at Einzel LENS 3 - from folded 2D axial field map (f - folded, i.e. symmetric) +# Typically V = +8.7 kV for a muon beam at 15 keV. Use either 2DE L3_Erz.map or +# +# ATTENTION: The electric field is ANTI-symmetric: DO NOT use folded field map L3_Erz4.map!! +# +/lem4/command globalfield Lens3_field 0. 0. -567. fromfile 2DE L3_Erz.map log_L3VA 6.78 +# To change the field in regular steps (e.g. for testing) use (f_min f_max step_no), e.g.: +#*/lem4/command globalfield Lens3_field 0. 0. -567. fromfile 2DE L3_Erz.map log_L3VA 7 11 5 + + +### 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. +#######/lem4/command globalfield RngAnU_field 0. 0. -167.00 fromfile 3DE EM_3D_extc.map log_RA_U 11.0 +/lem4/command globalfield RngAnU_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_U 8.6 +/lem4/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 8.6 +/lem4/command globalfield RngAnD_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_D 8.6 +/lem4/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 8.6 + +### LAST FIELD OK: EM_3D_ext2f.map +# EXTENDED MAPS (from -28 to +20 mm) EM_3D_extc.map or EM_3D_extf.map (coord + field or field only) +# "Best" results with EM_RA_3D.map, even though this is not a precise map (poor meshing). +#RA_1kV_upf_raw.map +#RA_1kV_upf.map # EM_extendf2.map give rise to "strange spots" -> lem4_1047_RA13.eps + +### Electric field at SAMPLE space. Three possible field maps: Sample, G1 and G2 (closest to sample) +# To create an arbitrary configuration, switch on all fields and set different potentials. +# Field extension along z: 50 mm. Center of MCPV at z = -92.5 mm. Sample face at: z = 108.5 (4 mm thick - SAH2). +# Position of the field: (-92.5 - 50/2) + (108.5 - 4/2) = -11 mm wrt. WORLD! => +#*/lem4/command globalfield Sample_field 0. 0. -11.0 fromfile 2DE sample_Erz.map log_MCPV 9.0 +#*/lem4/command globalfield Guard2_field 0. 0. -11.0 fromfile 2DE guard2_Erz.map log_MCPV 6.0 +#*/lem4/command globalfield Guard1_field 0. 0. -11.0 fromfile 2DE guard1_Erz.map log_MCPV 3.0 + + +### Magnetic field at SAMPLE space (use either a uniform field or a field map). +# Use either DMCP or MCPV to apply a CONSTANT field strictly to the sample or also to the surroundings, resp.! +#*/lem4/command globalfield Magnet_field 0. 0. 14.5 uniform log_DMCP 0 0.005 0 0 0 0 +# Use field map to set field to 20 G TF +# Extended map has -100/100 cm z extension, field center at +70, original -85/85, center at +85 +#######/lem4/command globalfield Magnet_field 0. 0. -836.0 fromfile 2DB sample_Brz.map log_IPV 0.002 +#*/lem4/command globalfield Magnet_field 0. 0. -686.0 fromfile 2DB sample_Brz_ext.map log_L3VA 0.002 + + +# Set parameters for particle tracking in an EM field +/lem4/command globalfield setparameter SetLargestAcceptableStep 5 +/lem4/command globalfield setparameter SetMinimumEpsilonStep 5e-5 +/lem4/command globalfield setparameter SetMaximumEpsilonStep 0.001 +/lem4/command globalfield setparameter SetDeltaOneStep 0.1 +/lem4/command globalfield setparameter SetDeltaIntersection 0.01 +/lem4/command globalfield printparameters + + + + +################################################################################################################ +# -- Testing the ELECTRIC and MAGNETIC fields (OPTIONAL) -- +################################################################################################################ + +# FIELD CHECKS at different beam transport components (from trigg. to sample) +# All distances in mm and in GLOBAL coordinates (preferably at field center) +# The test points below are just some examples. Any point can be checked. + +# Trigger 1 +/lem4/command globalfield printFieldValueAtPoint 0. 0. -1130.5 +# Trigger 2 +/lem4/command globalfield printFieldValueAtPoint 0. 0. -1089.75 +# Trigger 3 +/lem4/command globalfield printFieldValueAtPoint 0. 0. -1049.0 + +# Einzel Lens 3 - L3 (center at -567.0, but max field at rel. +/-62 mm) +/lem4/command globalfield printFieldValueAtPoint 0. 0. -507.0 + +# Ring Anode - RA (center at -167.0, but max field at rel. -16/+132 mm) +/lem4/command globalfield printFieldValueAtPoint 0. 0. -35.0 + +# Sample space (center at -11.0, but max field at rel. +24 mm) +/lem4/command globalfield printFieldValueAtPoint 0. 0. 13.0 + +# Check magnetic field at sample space +#*/lem4/command globalfield printFieldValueAtPoint 10. 0. 13.0 +# Check magnetic field at the lower field end limit +#*/lem4/command globalfield printFieldValueAtPoint 0. 20. -1680. + + + + +################################################################################################################ +# -- Setting simulation PARAMETERS -- +################################################################################################################ + +# Set processes from: lowenergy, penelope, coulombAndMultiple (default, Coul. only for CFoil), coulomb (for all, very slow). +/lem4/command typeofprocesses coulombAndMultiple +#*/lem4/command typeofprocesses penelope +#*/lem4/command includeMuoniumProcesses false + +# Set the overall range cut (default 0.1 mm) +#*/run/setCut 1 mm + +# Set the range cut on particular volumes (in mm) +/lem4/command SetUserLimits log_CFoil 1e-8 +#*/lem4/command SetUserLimits log_target 0.01 +#*/lem4/command SetUserLimits log_targetscint 0.01 +#*/lem4/command SetUserLimits log_cryostatscint 0.01 + +# Set particle energy cuts on particular volumes (in eV) +/lem4/command SetUserMinEkine log_World 0.1 + +# Store ALL the events in a ROOT tree or just the interesting ones? (default is true) +#*/lem4/command storeOnlyEventsWithHits false + +# Set the minimum time separation between two subsequent signals in the same detector (in ns) +/lem4/command signalSeparationTime 0.1 + +# Override runID number +#*/lem4/run/runID 21 + +# Set the frequency of event printing +/lem4/run/howOftenToPrintEvent 1000 + +# RANDOM option choices: (specify the random number generator initialisation) +# 0 ... no initialisation (default) +# 1 ... use actual computer time to initialise now +# 2 ... use event number to initialise at the beginning of each event +# 3 ... read in the random no. initial values for each event from a file +/lem4/run/randomOption 2 + +# 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 + + + + + +################################################################################################################ +# -- Setting PARTICLE GUN parameters -- +################################################################################################################ + +# Default momentum direction: 001, i.e. 0z. +# Default muon spin direction: 100, i.e. 0x. +# Default particle type: mu+ (can be changed to Mu) + +# Set particle type +#*/gun/particle Mu +/gun/particle mu+ + +# Set beam vertex (CFoil at -1137. To start after C Foil use z = -1130, before -1170) +/gun/vertex 0. 0. -1138. mm + +# A point-like uniform beam +/gun/vertexsigma -0.1 -0.1 0 mm + +# Set beam transverse spread (default GAUSSIAN spread) +# If FWHM = 10 mm ==> sigma = 10/2.354 = 4.2481 mm (last 0 is a dummy value) +# Negative sigma values => random FLAT RECTANGULAR distribution (area 2x.2y) +# Use vertexboundary with (vb < sigma_xy) to obtain a CIRCULAR beam spot +# /gun/vertexsigma 0 0 0 mm ==> Very SLOW with mag. field ON and centered beam +#*/gun/vertexsigma 42.5 42.5 0 mm +/gun/vertexsigma -20 -20 0 mm +/gun/vertexboundary 20 -1e6 1e6 mm + +# /gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed # Beam AND gating +#*/gun/vertexboundary 7 -1314.4 -1305 mm +# Without restrictions in z, but only on r: +#*/gun/vertexboundary 3 -1e6 1e6 mm + +# Set beam momentum (USE only as an ALTERNATIVE to setting energy!) +# /gun/momentum 0 0 29.79 MeV +#*/gun/momentum 0 0 1.8 MeV +# Energy loss at p = 1.2 MeV/c (E = 6.8 keV) => 1.23 +/- 0.2 keV +# Energy loss at p = 1.8 MeV/c (E = 15.3 keV) => 1.25 +/- 0.3 keV +# 1.2 MeV/c -> 6.8 keV, 1.8 MeV/c -> 15.3 keV +# muon rest mass = 105.658 MeV/c2 + +# With Trigger ON use 15 keV, with Trigger OFF use 11.27 keV (15 - 3.73 = 11.27 keV) +/gun/kenergy 12.0 keV + +# Set beam momentum direction +/gun/direction 0.0 0.0 1.0 + +# Set muon spin direction +/gun/muonPolarizVector 1 0 0 + + +# Other useful test parameters: +# +# FWHM = 3% ==> sigma = 29.79*0.03/2.354 = 0.37965 MeV/c +#*/gun/momentumsmearing 0.37965 MeV +#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy +#*/gun/momentumboundary 20 40 0 MeV +#---/gun/tilt: xangle, yangle, dummy +#*/gun/tilt 0 0.5 0 deg +#---/gun/tiltsigma: xangleSigma, yangleSigma, dummy (1 degree at 1 m => 17 mm) +#*/gun/tiltsigma 0.2 0.2 0 deg +#*/gun/pitch 0.5 deg +#---/gun/decaytimelimits: decayMin, decayMax, decayTime +#*/gun/decaytimelimits 10400 10420 2197.03 ns + +# Selectively inactivate or activate sensitive detectors +#*/hits/inactivate /lem4/ScintSD + +# Only for code debugging! +#/tracking/verbose 1 + +# BEAM ON +#*/run/beamOn 1000000 +#*/run/beamOn 2 +/run/beamOn 10000 +