34 Commits

Author SHA1 Message Date
351b6d5f08 Update README.md
proper spacing
2025-12-16 12:14:15 +01:00
51dbf73090 Update README.md
pointing now to the proper push mirror
2025-12-16 12:13:00 +01:00
7bd4510ad5 Restore run folder. 2025-03-27 22:05:05 +01:00
e3cf1484a7 Reduce size 2025-03-27 22:00:53 +01:00
479942cb95 Updated documentation. 2024-02-06 21:51:13 +01:00
3f0bec5f8b More tweeking. 2024-02-06 21:05:03 +01:00
670aa60bd9 More tweeking. 2024-02-06 21:04:01 +01:00
1e452e161c Updated instructions. 2024-02-06 19:09:11 +01:00
4f8f291728 More details. 2024-02-06 11:22:41 +01:00
Zaher Salman
c7ef08d7fa More details for rhel with root 6.30 2024-02-06 09:52:06 +00:00
Zaher Salman
ff2a5599d8 Added instruction for rhel8 2024-02-06 09:34:33 +00:00
31689d60f4 Fix type 2024-02-06 10:23:52 +01:00
1ce7d91c23 Added files for compilation on rhel8, use scl enable gcc-toolset-13 'make -j8' 2024-02-06 10:19:20 +01:00
a2b2db8e36 Makefile compatible with c++17. 2023-12-14 17:24:12 +01:00
ddf9006b15 Add requirement for minimum gcc version. 2023-06-20 15:41:03 +02:00
1886092feb Readme change 2023-02-12 11:11:05 +01:00
a9ce8a47b1 Update the README file. 2023-02-12 10:56:42 +01:00
Janka Gianluca
41e82f44cf Merge branch 'master' of https://git.psi.ch/nemu/musrsim 2023-02-07 16:18:40 +01:00
Janka Gianluca
6ea856c591 Fixed VIS issue, G4UI_USE and G4VIS_USE retired in 4.10.06 2023-02-07 16:17:46 +01:00
b566fcb73c Ignore build folder and LaTex compilation files. 2023-02-06 13:44:23 +01:00
e45a7729f3 Added gitignore template from github 2023-02-06 13:41:58 +01:00
ce373f2a71 Remove SiPixel run directory from git repository 2023-02-06 13:31:32 +01:00
5399b0d6a6 Fixed some bugs with the code and included better handeling for Si Pixel detectors. 2023-02-02 09:01:37 +01:00
91f145b2fb Correct typo. 2023-02-02 09:00:52 +01:00
7968554278 Added missing figures for documentation. 2023-02-02 08:58:35 +01:00
ec7abeeab1 Added some relevant particle IDs to the documentation. Updated documentation to compile with modern LaTex. 2023-02-02 08:56:58 +01:00
Janka Gianluca
023d7dc701 Improved sim speed at high energies by stopping muons from wiggling in moderator wires 2023-01-13 15:53:53 +01:00
Janka Gianluca
3dc1b9bbfe Additional minor changes to make musrSim comaptible with Geant4 v11.0.3 2023-01-13 15:51:33 +01:00
c4960c039d Added SiPixel templates and root macros 2022-11-21 14:22:18 +01:00
9bae289cb3 Update README.md 2022-11-04 17:18:11 +01:00
7db3d1cfcb Update README.md 2022-11-04 17:15:32 +01:00
296b604658 Merge branch 'salman-master-patch-83333' into 'master'
Update README.md

See merge request nemu/musrsim!1
2022-11-04 15:59:17 +00:00
e75a329c0a Update README.md 2022-11-04 15:58:48 +00:00
9bf9d5c4e1 Add readme 2022-11-03 14:32:33 +01:00
76 changed files with 1465015 additions and 27379 deletions

39
.gitignore vendored Normal file
View File

@@ -0,0 +1,39 @@
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
# Build Folder
build/
# Latex compilation
*.aux
*.log

View File

@@ -3,6 +3,14 @@
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(musrSim)
#----------------------------------------------------------------------------
# gcc minimum version 10.0 required
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0")
message(FATAL_ERROR "Minimum required version of GCC is 10.0")
endif()
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

100
CMakeLists_rhel8.txt Normal file
View File

@@ -0,0 +1,100 @@
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(musrSim)
#----------------------------------------------------------------------------
# gcc minimum version 10.0 required
#if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.0")
# message(FATAL_ERROR "Minimum required version of GCC is 10.0")
# endif()
#endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
#----------------------------------------------------------------------------
# KAMIL CHANGES:
#include_directories ("/home/download/Root_5.24_source/root/include")
# Load some basic macros which are needed later on
include(FindROOT.cmake)
set(INCLUDE_DIRECTORIES ${ROOT_INCLUDE_DIR})
include_directories( ${INCLUDE_DIRECTORIES})
set(LINK_DIRECTORIES${ROOT_LIBRARY_DIR})
link_directories( ${LINK_DIRECTORIES})
#----------------------------------------------------------------------------
# Find Geant4 package, activating all available UI and Vis drivers by default
# You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui
# to build a batch mode only executable
#
option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON)
if(WITH_GEANT4_UIVIS)
find_package(Geant4 REQUIRED ui_all vis_all)
else()
find_package(Geant4 REQUIRED)
endif()
#----------------------------------------------------------------------------
# Setup Geant4 include directories and compile definitions
# Setup include directory for this project
#
include(${Geant4_USE_FILE})
include_directories(${PROJECT_SOURCE_DIR}/include)
#----------------------------------------------------------------------------
# Locate sources and headers for this project
# NB: headers are included so they will show up in IDEs
#
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
#----------------------------------------------------------------------------
# Add the executable, and link it to the Geant4 libraries
#
add_executable(musrSim musrSim.cc ${sources} ${headers})
##FIND_PACKAGE( ROOT )
#SET(ROOT_CONFIG_EXECUTABLE /home/download/Root_5.24_source/root/bin/root-config)
## ask root-config for the library varaibles
#EXEC_PROGRAM( ${ROOT_CONFIG_EXECUTABLE}
# ARGS "--noldflags --noauxlibs --libs"
# OUTPUT_VARIABLE root_flags )
##SET(ROOT_LIBRARIES ${root_flags})
#EchoString("Kamil ${root_flags} Kamil")
#target_link_libraries(musrSim ${Geant4_LIBRARIES} ${root_flags})
target_link_libraries(musrSim ${Geant4_LIBRARIES} ${ROOT_LIBRARIES})
#----------------------------------------------------------------------------
# Copy all scripts to the build directory, i.e. the directory in which we
# build B1. This is so that we can run the executable directly because it
# relies on these scripts being in the current working directory.
#
set(EXAMPLEB1_SCRIPTS
run/101.mac
run/102.mac
)
foreach(_script ${EXAMPLEB1_SCRIPTS})
configure_file(
${PROJECT_SOURCE_DIR}/${_script}
${PROJECT_BINARY_DIR}/${_script}
COPYONLY
)
endforeach()
#----------------------------------------------------------------------------
# For internal Geant4 use - but has no effect if you build this
# example standalone
#
#add_custom_target(musrSim DEPENDS musrSim)
#----------------------------------------------------------------------------
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
#
install(TARGETS musrSim DESTINATION bin)

266
FindROOT_6.30.cmake Normal file
View File

@@ -0,0 +1,266 @@
# - Finds ROOT instalation
# This module sets up ROOT information
# It defines:
# ROOT_FOUND If the ROOT is found
# ROOT_INCLUDE_DIR PATH to the include directory
# ROOT_INCLUDE_DIRS PATH to the include directories (not cached)
# ROOT_LIBRARIES Most common libraries
# ROOT_<name>_LIBRARY Full path to the library <name>
# ROOT_LIBRARY_DIR PATH to the library directory
# ROOT_DEFINITIONS Compiler definitions and flags
# ROOT_LINK_FLAGS Linker flags
#
# The modern CMake 3 imported targets are also created:
# ROOT::Libraries (Most common libraries)
# ROOT::<name> (The library with name)
#
# Updated by K. Smith (ksmith37@nd.edu) to properly handle
# dependencies in ROOT_GENERATE_DICTIONARY
# Updated by H. Schreiner (hschrein@cern.ch) to support CMake 3 syntax
find_program(ROOT_CONFIG_EXECUTABLE root-config
PATHS $ENV{ROOTSYS}/bin)
if(ROOT_CONFIG_EXECUTABLE)
execute_process(
COMMAND ${ROOT_CONFIG_EXECUTABLE} --prefix
OUTPUT_VARIABLE ROOTSYS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(
COMMAND ${ROOT_CONFIG_EXECUTABLE} --version
OUTPUT_VARIABLE ROOT_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(
COMMAND ${ROOT_CONFIG_EXECUTABLE} --incdir
OUTPUT_VARIABLE ROOT_INCLUDE_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(ROOT_INCLUDE_DIRS ${ROOT_INCLUDE_DIR})
execute_process(
COMMAND ${ROOT_CONFIG_EXECUTABLE} --libdir
OUTPUT_VARIABLE ROOT_LIBRARY_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(ROOT_LIBRARY_DIRS ${ROOT_LIBRARY_DIR})
execute_process(
COMMAND ${ROOT_CONFIG_EXECUTABLE} --cflags
OUTPUT_VARIABLE ROOT_DEFINITIONS
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX REPLACE "(^|[ ]*)-I[^ ]*" "" ROOT_DEFINITIONS ${ROOT_DEFINITIONS})
set(ROOT_DEF_LIST ${ROOT_DEFINITIONS})
separate_arguments(ROOT_DEF_LIST)
execute_process(
COMMAND ${ROOT_CONFIG_EXECUTABLE} --ldflags
OUTPUT_VARIABLE ROOT_LINK_FLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(ROOT_LINK_LIST ${ROOT_LINK_FLAGS})
separate_arguments(ROOT_LINK_LIST)
# Needed because ROOT on Mac does not use Mac conventions
set(CMAKE_SHARED_LIBRARY_SUFFIX .so)
file(GLOB ROOT_LIBFILELIST
LIST_DIRECTORIES false
RELATIVE "${ROOT_LIBRARY_DIR}"
"${ROOT_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}*${CMAKE_SHARED_LIBRARY_SUFFIX}")
if(NOT ROOT_LIBFILELIST)
message(FATAL_ERROR "ROOT libraries not found at ${ROOT_LIBRARY_DIR}")
endif()
set(ROOT_ALLLIBS "")
foreach(_file ${ROOT_LIBFILELIST})
string(REGEX REPLACE "^${CMAKE_SHARED_LIBRARY_PREFIX}" "" _newer ${_file})
string(REGEX REPLACE "${CMAKE_SHARED_LIBRARY_SUFFIX}$" "" _newest ${_newer})
list(APPEND ROOT_ALLLIBS ${_newest})
endforeach()
set(ROOT_CORELIBS Core RIO Net Hist Graf Graf3d Gpad Tree Rint Postscript Matrix Physics MathCore Thread MultiProc)
add_library(ROOT::Libraries INTERFACE IMPORTED)
set(ROOT_LIBRARIES)
foreach(_cpt ${ROOT_ALLLIBS})
find_library(ROOT_${_cpt}_LIBRARY ${_cpt} HINTS ${ROOT_LIBRARY_DIR})
if(ROOT_${_cpt}_LIBRARY)
mark_as_advanced(ROOT_${_cpt}_LIBRARY)
add_library(ROOT::${_cpt} SHARED IMPORTED)
set_target_properties(ROOT::${_cpt} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${ROOT_INCLUDE_DIRS}"
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${ROOT_${_cpt}_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "$<$<BUILD_INTERFACE:$<COMPILE_LANGUAGE:CXX>>:${ROOT_DEF_LIST}>"
INTERFACE_LINK_LIBRARIES "${ROOT_LINK_LIST}")
endif()
endforeach()
set(targetlist)
foreach(_cpt ${ROOT_CORELIBS} ${ROOT_FIND_COMPONENTS})
if(ROOT_${_cpt}_LIBRARY)
list(APPEND ROOT_LIBRARIES "${ROOT_${_cpt}_LIBRARY}")
list(REMOVE_ITEM ROOT_FIND_COMPONENTS ${_cpt})
list(APPEND targetlist ROOT::${_cpt})
endif()
endforeach()
set_target_properties(ROOT::Libraries PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${ROOT_INCLUDE_DIRS}")
set_target_properties(ROOT::Libraries PROPERTIES
INTERFACE_LINK_LIBRARIES "${targetlist}")
unset(targetlist)
list(REMOVE_DUPLICATES ROOT_LIBRARIES)
execute_process(
COMMAND ${ROOT_CONFIG_EXECUTABLE} --features
OUTPUT_VARIABLE _root_options
OUTPUT_STRIP_TRAILING_WHITESPACE)
foreach(_opt ${_root_options})
set(ROOT_${_opt}_FOUND TRUE)
endforeach()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ROOT DEFAULT_MSG ROOT_CONFIG_EXECUTABLE
ROOTSYS ROOT_VERSION ROOT_INCLUDE_DIR ROOT_LIBRARIES ROOT_LIBRARY_DIR)
mark_as_advanced(ROOT_CONFIG_EXECUTABLE)
include(CMakeParseArguments)
find_program(ROOTCINT_EXECUTABLE rootcint PATHS $ENV{ROOTSYS}/bin)
find_program(GENREFLEX_EXECUTABLE genreflex PATHS $ENV{ROOTSYS}/bin)
find_package(GCCXML)
if(EXISTS "$ENV{ROOTSYS}/cmake/modules/RootNewMacros.cmake")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} $ENV{ROOTSYS}/cmake/modules)
include(RootNewMacros)
elseif(EXISTS "${ROOTSYS}/cmake/modules/RootNewMacros.cmake")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ROOTSYS}/cmake/modules)
include(RootNewMacros)
else()
#----------------------------------------------------------------------------
# function ROOT_GENERATE_DICTIONARY( dictionary
# header1 header2 ...
# LINKDEF linkdef1 ...
# OPTIONS opt1...)
function(ROOT_GENERATE_DICTIONARY dictionary)
CMAKE_PARSE_ARGUMENTS(ARG "" "" "LINKDEF;OPTIONS" "" ${ARGN})
#---Get the list of include directories------------------
get_directory_property(incdirs INCLUDE_DIRECTORIES)
set(includedirs)
foreach( d ${incdirs})
set(includedirs ${includedirs} -I${d})
endforeach()
#---Get the list of header files-------------------------
set(headerfiles)
foreach(fp ${ARG_UNPARSED_ARGUMENTS})
if(${fp} MATCHES "[*?]") # Is this header a globbing expression?
file(GLOB files ${fp})
foreach(f ${files})
if(NOT f MATCHES LinkDef) # skip LinkDefs from globbing result
set(headerfiles ${headerfiles} ${f})
endif()
endforeach()
else()
find_file(headerFile ${fp} PATHS ${incdirs})
set(headerfiles ${headerfiles} ${headerFile})
unset(headerFile CACHE)
endif()
endforeach()
#---Get LinkDef.h file------------------------------------
set(linkdefs)
foreach( f ${ARG_LINKDEF})
find_file(linkFile ${f} PATHS ${incdirs})
set(linkdefs ${linkdefs} ${linkFile})
unset(linkFile CACHE)
endforeach()
#---call rootcint------------------------------------------
add_custom_command(OUTPUT ${dictionary}.cxx ${dictionary}.h
COMMAND ${ROOTCINT_EXECUTABLE} -cint -f ${dictionary}.cxx
-c ${ARG_OPTIONS} ${includedirs} ${headerfiles} ${linkdefs}
DEPENDS ${headerfiles} ${linkdefs} VERBATIM)
endfunction()
#----------------------------------------------------------------------------
# function REFLEX_GENERATE_DICTIONARY(dictionary
# header1 header2 ...
# SELECTION selectionfile ...
# OPTIONS opt1...)
function(REFLEX_GENERATE_DICTIONARY dictionary)
CMAKE_PARSE_ARGUMENTS(ARG "" "" "SELECTION;OPTIONS" "" ${ARGN})
#---Get the list of header files-------------------------
set(headerfiles)
foreach(fp ${ARG_UNPARSED_ARGUMENTS})
file(GLOB files ${fp})
if(files)
foreach(f ${files})
set(headerfiles ${headerfiles} ${f})
endforeach()
else()
set(headerfiles ${headerfiles} ${fp})
endif()
endforeach()
#---Get Selection file------------------------------------
if(IS_ABSOLUTE ${ARG_SELECTION})
set(selectionfile ${ARG_SELECTION})
else()
set(selectionfile ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_SELECTION})
endif()
#---Get the list of include directories------------------
get_directory_property(incdirs INCLUDE_DIRECTORIES)
set(includedirs)
foreach( d ${incdirs})
set(includedirs ${includedirs} -I${d})
endforeach()
#---Get preprocessor definitions--------------------------
get_directory_property(defs COMPILE_DEFINITIONS)
foreach( d ${defs})
set(definitions ${definitions} -D${d})
endforeach()
#---Nanes and others---------------------------------------
set(gensrcdict ${dictionary}.cpp)
if(MSVC)
set(gccxmlopts "--gccxmlopt=\"--gccxml-compiler cl\"")
else()
#set(gccxmlopts "--gccxmlopt=\'--gccxml-cxxflags -m64 \'")
set(gccxmlopts)
endif()
#set(rootmapname ${dictionary}Dict.rootmap)
#set(rootmapopts --rootmap=${rootmapname} --rootmap-lib=${libprefix}${dictionary}Dict)
#---Check GCCXML and get path-----------------------------
if(GCCXML)
get_filename_component(gccxmlpath ${GCCXML} PATH)
else()
message(WARNING "GCCXML not found. Install and setup your environment to find 'gccxml' executable")
endif()
#---Actual command----------------------------------------
add_custom_command(OUTPUT ${gensrcdict} ${rootmapname}
COMMAND ${GENREFLEX_EXECUTABLE} ${headerfiles} -o ${gensrcdict} ${gccxmlopts} ${rootmapopts} --select=${selectionfile}
--gccxmlpath=${gccxmlpath} ${ARG_OPTIONS} ${includedirs} ${definitions}
DEPENDS ${headerfiles} ${selectionfile})
endfunction()
endif()
mark_as_advanced(ROOTCINT_EXECUTABLE GENREFLEX_EXECUTABLE)
# Modern add dictionary command
# Call with the name of the output dictionary
# Followed by sources (usually header files)
# with an optional LinkDef.h at the end
#
# Add the created dictionary target to the linked libraries
# root_add_dictionary(MyDict MyClass.h LinkDef.h)
function(root_add_dictionary OUTNAME)
add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OUTNAME}.cxx"
COMMAND "${ROOTCINT_EXECUTABLE}" -v4 -f "${CMAKE_CURRENT_BINARY_DIR}/${OUTNAME}.cxx" ${ARGN}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS ${ARN}
)
add_library(${OUTNAME} STATIC "${CMAKE_CURRENT_BINARY_DIR}/${OUTNAME}.cxx")
target_link_libraries(${OUTNAME} PUBLIC ROOT::Libraries)
endfunction()

79
README.md Normal file
View File

@@ -0,0 +1,79 @@
# musrSim simulation #
### Contents ###
This is the C++ source code for the musrSim simulation software which is intended to be a general tool to design and simulate µSR spectrometer with very high accuracy. To compile and run musrSim, the user must have a recent Geant4 (tested with v11.0.3 and v11.2.0) and Root installed (tested with v6-22-06 and v6-30-02, but the version should not be critical).
* The code is specifically tuned to simulate muon spin spectrometers.
* The code is maintained by the Laboratory for Muon Spin Spectroscopy at PSI.
### Supported platforms ###
* Linux and any other decent OS that can run Root and GEANT4.
### Installation ###
Compile and install Geant4, we recommend the use of the following cmake flags
cmake -DCMAKE_INSTALL_PREFIX=/path/to/G4installation /path/to/G4source -DGEANT4_USE_QT=ON -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11=ON
We also recommend that you use [`view3dscene`](https://castle-engine.io/view3dscene.php) as a VRML viewer.
Following the installation of Gean4, set the correct environment variables. This can be done easily by editing `/path/to/G4installation/bin/geant4.sh` to uncomment the lines defining Geant4 data location:
export G4NEUTRONHPDATA=$GEANT4_DATA_DIR/G4NDL4.7
export G4LEDATA=$GEANT4_DATA_DIR/G4EMLOW8.5
export G4LEVELGAMMADATA=$GEANT4_DATA_DIR/PhotonEvaporation5.7
export G4RADIOACTIVEDATA=$GEANT4_DATA_DIR/RadioactiveDecay5.6
export G4PARTICLEXSDATA=$GEANT4_DATA_DIR/G4PARTICLEXS4.0
export G4PIIDATA=$GEANT4_DATA_DIR/G4PII1.3
export G4REALSURFACEDATA=$GEANT4_DATA_DIR/RealSurface2.2
export G4SAIDXSDATA=$GEANT4_DATA_DIR/G4SAIDDATA2.0
export G4ABLADATA=$GEANT4_DATA_DIR/G4ABLA3.3
export G4INCLDATA=$GEANT4_DATA_DIR/G4INCL1.2
export G4ENSDFSTATEDATA=$GEANT4_DATA_DIR/G4ENSDFSTATE2.3
Then run the following to setup the correct variables
. /path/to/G4installation/bin/geant4.sh
You will probably need to do that everytime you want to run the simulation or add the line above to your `.bashrc`.
Clone the musrSim repository
git clone https://bitbucket.org/muonspin/musrsim.git
then (see below for RedHat or other old systems)
cd musrsim
mkdir build
cd build
cmake ../
make -j8
make install
This will install the `musrSim` binary in `/usr/local/bin`, but it can be moved to any other directory in your `PATH`.
### Running the simulations ###
Prepare a file, `finlename.mac`, with your beamline and spectrometer design following the instruction in the [musrSim manual](https://bitbucket.org/muonspin/musrsim/src/master/doc/musrSim.pdf). Create a folder `data` and then run the simulation
musrSim filename.mac
### RedHat and old systems ###
For compilation on RedHat systems:
* Make sure that the `gcc-toolset-13` package is installed
* Use the follwoing compilation command: `scl enable gcc-toolset-13 'make -j8'`
* Use `CMakeLists_rhel8.txt`: `cp CMakeLists_rhel8.txt CMakeLists.txt`
* If you have Root 6.30 use `FindROOT_6.30.cmake`: `cp FindROOT_6.30.cmake FindROOT.cmake`
### Contact ###
Thomas Prokscha <thomas.prokscha@psi.ch>
Zaher Salman <zaher.salman@psi.ch>

Binary file not shown.

View File

@@ -1,5 +1,5 @@
\documentclass[twoside]{dis04}
\usepackage{epsfig}
%\usepackage{epsfig}
%\def\runauthor{Kamil Sedl\'{a}k}
\def\runauthor{PSI}
% for the H1 collaboration}
@@ -121,21 +121,18 @@ On the other hand, there are also some drawbacks and limitations:
%=============================================================================================
\section{How to install and run musrSim}
To install and run musrSim, one has to install Geant4 and Root first.
The present version of musrSim has been tested with Geant version 4.9.4,
and with Root version 5.24.00. While the version of Root should not be critical,
The present version of musrSim has been tested with Geant version 11.2.0,
and with Root version 6.30.02. While the version of Root should not be critical,
the users of musrSim are encouraged to always use the latest version of Geant4
due to continuous improvements of this package. A novice
due to continuous improvements of this package. Up to date
instructions are available on
https://bitbucket.org/zaher-salman/musrsim/. A novice
user of Geant4 may consider reading 30 pages of chapter~2 of the
Geant4 User's Guide for Application Developers, called
``Getting Started with Geant4 - Running a Simple Example''.
Once Geant4 has been successfully installed and some of the default Geant4 examples
has been run, the musrSim installation package can be downloaded from the web page
http://lmu.web.psi.ch/simulation/index.html.
Usually the ``env.sh'' script has to be run to set-up the environment variables
appropriately before the musrSim (and/or any other Geant4 application) can be compiled
and run.
The simulation is started by executing:
Once Geant4 and musrSim have been successfully installed the
simulation is started by executing:
{\bf $>$ musrSim \emph{RUNNUMBER}.mac} \\
where \emph{RUNNUMBER}.mac is a ``macro file'' containing the information about
@@ -1260,6 +1257,8 @@ The list of variables that can be stored in the Root tree:
If the track ID is negative, there were more than just one track contributing to this hit. The absolute value
of det\_VrtxTrackID[det\_n] corresponds to the first (in time) track.
\item{\bf det\_VrtxParticleID[det\_n]} (array of Int\_t) -- particle ID of the first particle that belongs to the given hit.
(Some relevant particle IDs: Muon+=-13, Muon-=+13, Electron=11, Positron=-11,
Gamma=22, Proton=2212, Neutron=2112, Pion-=-211, Pion+=211.)
\item{\bf det\_Vvv*****[det\_n]} -- similar to the variables det\_Vrtx*****[det\_n] above, but if the first particle
belonging to the hit was created inside of the logical volume where the hit occurs, then it's track is followed
to its mother track (even several times) until the track (particle) is found that has been created outside the
@@ -1300,6 +1299,8 @@ The list of variables that can be stored in the Root tree:
the given ``save'' volume. Save volumes can therefore be made of vacuum.
\item{\bf save\_detID[save\_n]} (array of Int\_t) -- ID number of the save volume.
\item{\bf save\_particleID[save\_n]} (array of Int\_t) -- particle ID of the particle that entered the save volume.
(Some relevant particle IDs: Muon+=-13, Muon-=+13, Electron=11, Positron=-11,
Gamma=22, Proton=2212, Neutron=2112, Pion-=-211, Pion+=211.)
\item{\bf save\_time[save\_n]} (array of Double\_t) -- time when the particle entered in the volume (in $\mu$s).
\item{\bf save\_x[save\_n], save\_y[save\_n], save\_z[save\_n]} (array of Double\_t) -- position of the particle where it
entered the save volume (``GetPreStepPoint()'') (in mm).
@@ -1379,10 +1380,10 @@ One of the easiest example to illustrate the basic features of the musrSim (and/
shoot electrons into a scintillator block, and to observe the energy deposited inside it.
Figure~\ref{vis101}
%
\begin{figure}[tb]\centering
\epsfig{file=pict/vis_101_a.eps,width=8cm,%\linewidth,%
%bbllx=83pt,bblly=330pt,bburx=538pt,bbury=513pt,
clip=}
\begin{figure}[htb]\centering
\includegraphics[width=8cm]{pict/vis_101_a.pdf}
%\epsfig{file=pict/vis_101_a.eps,width=8cm}
%\linewidth,%%bbllx=83pt,bblly=330pt,bburx=538pt,bbury=513pt,clip=}
\caption{A simple simulation of an electron passing through two
scintillator tiles.}
\label{vis101}
@@ -1487,9 +1488,9 @@ where some of the elements present in the simulation (beampipe, magnet, aluminiu
for simplicity.
The most important parameters of the simulation are summarised in table~\ref{dimensions}.
%
\begin{figure}[tbp]\centering
\epsfig{file=pict/vis_201_1.eps,width=0.5\linewidth,%
bbllx=70pt,bblly=270pt,bburx=455pt,bbury=640pt,clip=}
\begin{figure}[htbp]\centering
\includegraphics[width=0.5\linewidth]{pict/vis_201_1.pdf}
% \epsfig{file=pict/vis_201_1.eps,width=0.5\linewidth,bbllx=70pt,bblly=270pt,bburx=455pt,bbury=640pt,clip=}
\caption{3D view at the GPD detector system (run 201). Blue colour indicates the positron counters,
magenta stands for collimators, red is the muon counter. GPD magnet, some Aluminium U-profiles and beampipe
are not shown in the plot, however they are included in the simulation.}
@@ -1497,25 +1498,25 @@ are not shown in the plot, however they are included in the simulation.}
\end{figure}
%
%
\begin{figure}[tbp]\centering
\epsfig{file=pict/vis_201_2.eps,width=0.8\linewidth,%
bbllx=90pt,bblly=310pt,bburx=450pt,bbury=525pt,clip=}
\begin{figure}[htbp]\centering
\includegraphics[width=0.7\linewidth]{pict/vis_201_2.pdf}
% \epsfig{file=pict/vis_201_2.eps,width=0.8\linewidth,bbllx=90pt,bblly=310pt,bburx=450pt,bbury=525pt,clip=}
\caption{Side view of the GPD detector.}
\label{fig:vis_201_2}
\end{figure}
%
%
\begin{figure}[tbp]\centering
\epsfig{file=pict/vis_201_3.eps,width=0.4\linewidth,%
bbllx=210pt,bblly=320pt,bburx=380pt,bbury=525pt,clip=}
\begin{figure}[htbp]\centering
\includegraphics[width=0.4\linewidth]{pict/vis_201_3.pdf}
% \epsfig{file=pict/vis_201_3.eps,width=0.4\linewidth,bbllx=210pt,bblly=320pt,bburx=380pt,bbury=525pt,clip=}
\caption{Front view of the GPD detector.}
\label{fig:vis_201_3}
\end{figure}
%
%
\begin{figure}[tbp]\centering
\epsfig{file=pict/vis_201_4.eps,width=0.9\linewidth,%
bbllx=70pt,bblly=309pt,bburx=485pt,bbury=513pt,clip=}
\begin{figure}[htbp]\centering
\includegraphics[width=0.8\linewidth]{pict/vis_201_4.pdf}
% \epsfig{file=pict/vis_201_4.eps,width=0.9\linewidth,bbllx=70pt,bblly=309pt,bburx=485pt,bbury=513pt,clip=}
\caption{Top view of the GPD detector.}
\label{fig:vis_201_4}
\end{figure}
@@ -1588,7 +1589,7 @@ and typically can be found in subdirectories of the high field project:
/afs/psi.ch/project/HighFieldMuSR/.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
%\clearpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

BIN
doc/pict/vis_101_a.pdf Normal file

Binary file not shown.

BIN
doc/pict/vis_101_b.pdf Normal file

Binary file not shown.

BIN
doc/pict/vis_201_1.pdf Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
doc/pict/vis_201_2.pdf Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
doc/pict/vis_201_3.pdf Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
doc/pict/vis_201_4.pdf Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -1,3 +0,0 @@
latex musrSim.tex
dvips -o musrSim.ps musrSim.dvi
dvipdf musrSim.dvi

View File

@@ -10,9 +10,7 @@
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4UIterminal.hh"
#ifdef G4UI_USE_TCSH
#include "G4UItcsh.hh" //JSL: should be commented on windows ?
#endif
//#include <TApplication.h>
//#include <TSystem.h>
@@ -28,11 +26,9 @@
// #include <X11/Xlib.h> //JSL
#ifdef G4VIS_USE
// #include "musrVisManager.hh"
#include "G4VisExecutive.hh"
#include "G4TrajectoryDrawByCharge.hh" // TS Trajectory drawing by ID or charge
#endif
#include "musrRootOutput.hh"
#include "musrParameters.hh"
@@ -90,12 +86,10 @@ int main(int argc,char** argv) {
runManager->SetUserInitialization(musrdetector);
runManager->SetUserInitialization(new musrPhysicsList);
#ifdef G4VIS_USE
// Visualization, if you choose to have it!
// G4VisManager* visManager = new musrVisManager;
G4VisManager* visManager = new G4VisExecutive; // TS Trajectory drawing by ID or charge
visManager->Initialize();
#endif
// UserAction classes
runManager->SetUserAction(new musrPrimaryGeneratorAction(musrdetector));
@@ -116,11 +110,7 @@ int main(int argc,char** argv) {
{
// G4UIterminal is a (dumb) terminal.
G4UIsession * session = 0;
#ifdef G4UI_USE_TCSH
session = new G4UIterminal(new G4UItcsh);
#else
session = new G4UIterminal();
#endif
UI->ApplyCommand("/control/execute vis.mac");
session->SessionStart();
@@ -136,11 +126,7 @@ int main(int argc,char** argv) {
G4String SecondArgument = argv[2];
if (SecondArgument=="idle") {
G4UIsession * session = 0;
#ifdef G4UI_USE_TCSH
session = new G4UIterminal(new G4UItcsh);
#else
session = new G4UIterminal();
#endif
G4cout<<"Go to idle state now:"<<G4endl;
session->SessionStart();
delete session;
@@ -150,9 +136,7 @@ int main(int argc,char** argv) {
// myapp->Run(kTRUE);
#ifdef G4VIS_USE
delete visManager;
#endif
delete myRootOutput;
delete myErrorMessage;
delete myParameters;

View File

@@ -5,7 +5,7 @@
CPP=g++
#CPPFLAGS= -I$(ROOTSYS)/include -I/userdisk/sedlak/myLCG/CondDBMySQL_new/CondDBMySQL/include -I/usr/include/mysql
#LDFLAGS= $(shell root-config --glibs) -L/userdisk/sedlak/myLCG/CondDBMySQL_new/CondDBMySQL/src/.libs -lconddb -L/usr/lib/mysql -lmysqlclient
CPPFLAGS= -I$(ROOTSYS)/include/root -std=c++11
CPPFLAGS= -I$(ROOTSYS)/include -std=c++17
LDFLAGS= $(shell root-config --glibs) -lMinuit
all: musrRoot

View File

@@ -1,182 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for the simulation of electron/positrons from the Sr decay
# passing through the scintiallator detectors (blocks).
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
###################################################################################
############################# G E O M E T R Y ###################################
#
# WORLD
/musr/command construct box World 10 10 100 G4_AIR 0 0 0 no_logical_volume norot dead -1
#
# Sr SOURCE
#/musr/command construct sphere source 0 0.02 0 360 0 180 G4_Sr 0 0 0 log_World norot dead 301
#
# SCINTILLATOR BLOCKS
/musr/command construct box scintFarAwayC1 1.5 1.5 1 G4_PLASTIC_SC_VINYLTOLUENE 0 0 5 log_World norot musr/ScintSD 10
/musr/command construct box scintFarAwayC2 1.5 1.5 1 G4_PLASTIC_SC_VINYLTOLUENE 0 0 14 log_World norot musr/ScintSD 11
#
#============================================================
/musr/command visattributes log_World invisible
#/musr/command visattributes log_source red
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE lightblue
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.4
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
#/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
#/musr/command process addProcess mu- G4MuIonisation -1 2 2
#/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu- G4MuPairProduction -1 4 4
#/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addProcess mu+ G4MuIonisation -1 2 2
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
#/musr/command storeOnlyEventsWithHits false
/musr/command storeOnlyEventsWithHitInDetID 11
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 50
#
/musr/run/howOftenToPrintEvent 10000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
/musr/command rootOutput weight off
/musr/command rootOutput BFieldAtDecay off
/musr/command rootOutput muIniPosX off
/musr/command rootOutput muIniPosY off
/musr/command rootOutput muIniPosZ off
/musr/command rootOutput muIniMomX off
/musr/command rootOutput muIniMomY off
/musr/command rootOutput muIniMomZ off
/musr/command rootOutput muIniPolX off
/musr/command rootOutput muIniPolY off
/musr/command rootOutput muIniPolZ off
/musr/command rootOutput muIniTime off
/musr/command rootOutput muDecayDetID off
/musr/command rootOutput muDecayPosX off
/musr/command rootOutput muDecayPosY off
/musr/command rootOutput muDecayPosZ off
/musr/command rootOutput muDecayTime off
/musr/command rootOutput muDecayPolX off
/musr/command rootOutput muDecayPolY off
/musr/command rootOutput muDecayPolZ off
/musr/command rootOutput muTargetTime off
/musr/command rootOutput muTargetPolX off
/musr/command rootOutput muTargetPolY off
/musr/command rootOutput muTargetPolZ off
/musr/command rootOutput muM0Time off
/musr/command rootOutput muM0PolX off
/musr/command rootOutput muM0PolY off
/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
/musr/command rootOutput det_edep_el off
/musr/command rootOutput det_edep_pos off
/musr/command rootOutput det_edep_gam off
/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
/musr/command rootOutput odet_ID off
/musr/command rootOutput nOptPhot off
/musr/command rootOutput odet_nPhot off
/musr/command rootOutput odet_timeFirst off
/musr/command rootOutput odet_timeA off
/musr/command rootOutput odet_timeB off
/musr/command rootOutput odet_timeC off
/musr/command rootOutput odet_timeD off
/musr/command rootOutput odet_timeE off
/musr/command rootOutput odet_timeMean off
/musr/command rootOutput odet_timeLast off
/musr/command rootOutput odet_timeCFD off
/musr/command rootOutput odet_amplCFD off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
/vis/disable
#/control/execute visFromToni.mac
#/control/execute visDawn101.mac
#/control/execute visVRML.mac
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
/gun/primaryparticle e-
/gun/vertex 0 0 0 mm
/gun/momentum 2.15 MeV
# sigma = 3% ==> sigma 27*0.03 = 0.81
#/gun/momentumsmearing 0.3 MeV
#/gun/tiltsigma 5.15 5.15 0 deg
#/gun/pitch 10.0573 deg
#
#/gps/particle ion
#/gps/ion 39 86
#/gps/ion 27 57 0 0
#/gps/ion 38 90 0 0
# /gps/position seems to be in cm !!!!
#/gps/position 0 0 0
#/gps/energy 0 keV
#/gps/ang/maxtheta 2 deg
#/gps/ang/maxphi 2 deg
######################## B E A M O N #######################################
#/run/beamOn 1000
/run/beamOn 5

View File

@@ -1,173 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for the simulation of electron/positrons from the Sr decay
# passing through the scintiallator detectors (blocks).
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
###################################################################################
############################# G E O M E T R Y ###################################
#
# WORLD
/musr/command construct box World 10 10 100 G4_AIR 0 0 0 no_logical_volume norot dead -1
#
# Sr SOURCE
/musr/command construct sphere source 0 0.02 0 360 0 180 G4_Sr 0 0 0 log_World norot dead 301
#
# SCINTILLATOR BLOCKS
/musr/command construct box scintFarAwayC1 1.5 1.5 1 G4_PLASTIC_SC_VINYLTOLUENE 0 0 5 log_World norot musr/ScintSD 10
/musr/command construct box scintFarAwayC2 1.5 1.5 1 G4_PLASTIC_SC_VINYLTOLUENE 0 0 14 log_World norot musr/ScintSD 11
#
#============================================================
/musr/command visattributes log_World invisible
/musr/command visattributes log_source red
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE lightblue
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.4
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
#/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
#/musr/command process addProcess mu- G4MuIonisation -1 2 2
#/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu- G4MuPairProduction -1 4 4
#/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addProcess mu+ G4MuIonisation -1 2 2
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
#/musr/command storeOnlyEventsWithHits false
/musr/command storeOnlyEventsWithHitInDetID 11
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 50
#
/musr/run/howOftenToPrintEvent 10000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
/musr/command rootOutput weight off
/musr/command rootOutput BFieldAtDecay off
/musr/command rootOutput muIniPosX off
/musr/command rootOutput muIniPosY off
/musr/command rootOutput muIniPosZ off
/musr/command rootOutput muIniMomX off
/musr/command rootOutput muIniMomY off
/musr/command rootOutput muIniMomZ off
/musr/command rootOutput muIniPolX off
/musr/command rootOutput muIniPolY off
/musr/command rootOutput muIniPolZ off
/musr/command rootOutput muIniTime off
/musr/command rootOutput muDecayDetID off
/musr/command rootOutput muDecayPosX off
/musr/command rootOutput muDecayPosY off
/musr/command rootOutput muDecayPosZ off
/musr/command rootOutput muDecayTime off
/musr/command rootOutput muDecayPolX off
/musr/command rootOutput muDecayPolY off
/musr/command rootOutput muDecayPolZ off
/musr/command rootOutput muTargetTime off
/musr/command rootOutput muTargetPolX off
/musr/command rootOutput muTargetPolY off
/musr/command rootOutput muTargetPolZ off
/musr/command rootOutput muM0Time off
/musr/command rootOutput muM0PolX off
/musr/command rootOutput muM0PolY off
/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
/musr/command rootOutput det_edep_el off
/musr/command rootOutput det_edep_pos off
/musr/command rootOutput det_edep_gam off
/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
/musr/command rootOutput odet_ID off
/musr/command rootOutput nOptPhot off
/musr/command rootOutput odet_nPhot off
/musr/command rootOutput odet_timeFirst off
/musr/command rootOutput odet_timeA off
/musr/command rootOutput odet_timeB off
/musr/command rootOutput odet_timeC off
/musr/command rootOutput odet_timeD off
/musr/command rootOutput odet_timeE off
/musr/command rootOutput odet_timeMean off
/musr/command rootOutput odet_timeLast off
/musr/command rootOutput odet_timeCFD off
/musr/command rootOutput odet_amplCFD off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
/vis/disable
#/control/execute visFromToni.mac
#/control/execute visDawn102.mac
#/control/execute visVRML.mac
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
#/gps/particle ion
#/gps/ion 39 86
#/gps/ion 27 57 0 0
/gps/ion 38 90 0 0
# /gps/position seems to be in cm !!!!
/gps/position 0 0 0
/gps/energy 0 keV
#/gps/ang/maxtheta 2 deg
#/gps/ang/maxphi 2 deg
######################## B E A M O N #######################################
/run/beamOn 1000000

View File

@@ -1,812 +0,0 @@
# Macro file for musr.cc - Construct detector, set fields and other parameters.
# Last modified by T. Shiroka: 17.03.2008
#
# Corrected TD and MCP2 distances by T. Prokscha, 07.11.2008.
#
# How to run: musr 10xx.mac (append "idle" for prompt after running)
# musr 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 /musr/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 /musr/command):
# construct solid_type volume_name parameters_defining_solid material position mothers_name
# (mothers_name starts with log_)
# Examples
#
# Generate rotation matrix about n=(x,y,z) by th degrees
# /musr/command rotation MName x y z th
#
# Construct a volume
# /musr/command construct Type Name <volume parameters> Material X Y Z MotherVolume RotationMatrix Sensitivity RootID [nofield]
# Type - can be tubs (cylindrical), box, sphere etc.
# Name - Just the name of the volume
# <volume parameters> - Depend on the Type you are creating
# Material - Is the material in the volume, it can be G4_Galactic (vacuum), G4_PLASTIC_SC_VINYLTOLUENE (scintillator) etc.
# X Y Z - The position vector relative to the MotherVolume
# RotationMatrix - The rotation to be applied on the volume, it can be norot (no rotation) or other MName
# Sensitivity - If the volume has a respones, it can be musr/ScintSD (detector), dead (no response)
# RootID - An ID that will be saved in the root file for analysis
# nofield - Obsolete, should be removed.
#
# Uniform field in volume
# /musr/command globalfield FieldName half_x half_y half_z uniform X Y Z MotherVolume Bx By Bz Ex Ey Ez
# FieldName - A simple name for the field
# half_x half_y half_z - half lenghts of the box, within which the field is defined
# X Y Z - Position vector relative to MotherVolume
# MotherVolume - The volume containing the field
# Bx By Bz - Magnetic field vector
# Ex Ey Ez - Electric field vector
#
# Non-Uniform field according to a field map
# /musr/command globalfield FieldName X Y Z fromfile MapDim MapFileName.map MotherVolume ModBE
# FieldName - A simple name for the field
# X Y Z - Position vector relative to MotherVolume
# MotherVolume - The volume containing the field
# MapDim - Dimension and type of field, it can be 2DE (2D Electric), 2DB (2D Magnetic), 3DE (3D Electric) and 3DB (3D Magnetic)
# The 2D maps are propagated along the z axis to form the 3D map (to reduce the size of the map file)
# MapFileName.map - The field where the field map is stored
# ModBE - The size of the field (to scale the field map).
###############################################################################################
# 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:
/musr/command rotation rotTrig 0 1 0 -45
/musr/command rotation rotRAnR 0 0 1 -90
/musr/command rotation rotRAnL 0 0 1 90
/musr/command rotation rotRAnD 0 0 1 180
################################################################################################################
# -- LEM GEOMETRY --
################################################################################################################
# WORLD = Laboratory reference frame, the origin is in the centre of the LEM sample tube
/musr/command construct box World 250 250 2250 G4_Galactic 0 0 0 no_logical_volume norot dead -1
# MINIMUM WORD HALF LENGTH 1250 mm!
#/musr/command construct box World 2000 2000 4000 G4_Galactic 0 0 0 no_logical_volume norot dead -1
# World visual attributes (optional)
/musr/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
/musr/command construct tubs ScIU 90 95 130 45 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 011 nofield
/musr/command construct tubs ScIR 90 95 130 135 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 012 nofield
/musr/command construct tubs ScID 90 95 130 225 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 013 nofield
/musr/command construct tubs ScIL 90 95 130 315 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 014 nofield
## Outer Scintillators - O
/musr/command construct tubs ScOU 96 101 130 45 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 021 nofield
/musr/command construct tubs ScOR 96 101 130 135 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 022 nofield
/musr/command construct tubs ScOD 96 101 130 225 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 023 nofield
/musr/command construct tubs ScOL 96 101 130 315 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 024 nofield
# Visual attributes (optional)
#*/musr/command visattributes log_ScOU SCINT_style
#*/musr/command visattributes log_ScOD dSCINT_style
/musr/command visattributes log_ScOL darkred
/musr/command visattributes log_ScIL 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
#
# 07/Nov/2008: correct sample tube dimensions: the new tubes have 75 mm / 78 mm inner/outer radius
#
#===============================================================================================================
# MCP - Multi-Channel Plate 2 Chamber; V - Vacuum, S - Solid # Note: VERY IMPORTANT: mcpv_z = -92.5 mm!
# OLD way of assigning a field
#/musr/command construct tubs MCPV 0 76.5 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100 MCPSfield
/musr/command construct tubs MCPV 0 75.0 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100 nofield
/musr/command construct tubs MCPS 75.0 78.0 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
/musr/command construct tubs F160 78.0 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 901 nofield
/musr/command construct tubs F100 0 75.0 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.
#/musr/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)
/musr/command visattributes log_MCPV invisible
/musr/command visattributes log_MCPS invisible
/musr/command visattributes log_F160 blue_style
/musr/command visattributes log_F100 blue_style
#===============================================================================================================
# MCP - Micro Channel Plate Detector MCP2 (Used as an alternative to cryostat) # mcpv_z = -92.5 mm!
#
# We have a 324 mm long sample tube;
# the MCP2 front side is at 142 mm from the end of the sample tube.
# the front face of the sample plate of the cryostat is 145 mm from the end of the sample tube.
#
#===============================================================================================================
# MCPM1 - MCP Macor ring 1
# MCPD - electron multiplying glass disk (also known as target)
# Sensitive surface at z = 20 mm wrt. World
# MCPM2 - MCP Macor ring 2
/musr/command construct tubs MCPM1 24 32.5 0.75 0 360 Macor 0 0 111.75 log_MCPV norot dead 201 nofield
# Use it either as (DMCP-musr/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz.
#*/musr/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 108.0 log_MCPV norot dead 032 nofield
/musr/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 116.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:
#*aa/musr/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_MCPV norot musr/ScintSD 202 nofield
/musr/command construct tubs target 0 21.0 1.5 0 360 MCPglass 0 0 114 log_MCPV norot musr/ScintSD 202 nofield
/musr/command construct tubs saveTarget 0 75.0 0.2 0 360 G4_Galactic 0 0 110.79 log_MCPV norot dead 222 nofield
# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole)
# MCVR - "Vacuum Ring" (circular hole)
/musr/command construct box MCSR 36.5 36.5 1 Steel 0 0 118.5 log_MCPV norot dead 204 nofield
/musr/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
/musr/command construct box MCPA 36.5 36.5 4 Steel 0 0 129.5 log_MCPV norot dead 206 nofield
/musr/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 207 nofield
/musr/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
/musr/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 162.3 log_MCPV norot dead 209 nofield
# MCP2 visual attributes (optional)
#/musr/command visattributes log_DMCP MCP_style
#*/musr/command visattributes log_target MCP_style
#*/musr/command visattributes log_MCPM1 MACOR_style
#*------ /musr/command visattributes log_MCPM2 MACOR_style
#===============================================================================================================
# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm)
#
# at the moment, sample plate front face is still at z = 14.0mm --> should be changed to 17mm.
#===============================================================================================================
# 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.
#*/musr/command construct tubs SAH1 0 35 2.5 0 360 G4_Cu 0 0 119.0 log_MCPV norot dead 251 nofield
#*/musr/command construct tubs SAH2 0 35 2 0 360 G4_Cu 0 0 108.5 log_MCPV norot dead 252 nofield
#/musr/command construct tubs target 0 35 2 0 360 G4_Al 0 0 108.5 log_MCPV norot musr/ScintSD 252 nofield
#*/musr/command construct tubs saveTarget 0 44 0.2 0 360 G4_Galactic 0 0 106.29 log_MCPV norot dead 253 nofield
#/musr/command construct tubs SAH3 20 35 0.5 0 360 G4_Cu 0 0 106.0 log_MCPV norot dead 253 nofield
#*/musr/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
#*/musr/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 126.5 log_MCPV norot dead 261 nofield
#*/musr/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 135.0 log_MCPV norot dead 262 nofield
#*/musr/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 163.5 log_MCPV norot dead 263 nofield
#*/musr/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 143.5 log_MCPV norot dead 264 nofield
#*/musr/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 143.5 log_MCPV norot dead 265 nofield
#*/musr/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 108.5 log_MCPV norot dead 266 nofield
#*/musr/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)
#*/musr/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 76.0 log_MCPV norot dead 271 nofield
#*/musr/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)
#*/musr/command visattributes log_SAH1 oxsteel
#*/musr/command visattributes log_SAH2 oxsteel
#*/musr/command visattributes log_target oxsteel
#*/musr/command visattributes log_SAPH MACOR_style
#*/musr/command visattributes log_SAH3 oxsteel
#*/musr/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
/musr/command construct cons 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
/musr/command construct cons 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
/musr/command construct cons 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
/musr/command construct cons 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
/musr/command construct cons 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
/musr/command construct cons 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
/musr/command construct cons 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
/musr/command construct cons 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.!
/musr/command construct tubs RA_U 0 0.01 0.005 0 360 G4_Galactic 0 0 -50.50 log_MCPV norot dead 322 nofield
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -50.52 log_MCPV rotRAnR dead 324 nofield
/musr/command construct tubs RA_D 0 0.01 0.005 0 360 G4_Galactic 0 0 -50.54 log_MCPV rotRAnD dead 326 nofield
/musr/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
/musr/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)
/musr/command visattributes log_RA_EU oxsteel
/musr/command visattributes log_RA_MR oxsteel
/musr/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!
#/musr/command construct cons 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
#/musr/command construct cons 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)
/musr/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.
#*/musr/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
/musr/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).
#*/musr/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)
/musr/command visattributes log_GATS SCINT_style
/musr/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
/musr/command construct tubs L3VA 0 100 220 0 360 G4_Galactic 0 0 -567 log_World norot dead 400 nofield
/musr/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 -567 log_World norot dead 401 nofield
/musr/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -359 log_World norot dead 402 nofield
/musr/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.
/musr/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3VA norot dead 421 nofield
/musr/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3VA norot dead 422 nofield
/musr/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3VA norot dead 423 nofield
/musr/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.
/musr/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3VA norot dead 431 nofield
/musr/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3VA norot dead 432 nofield
/musr/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3VA norot dead 433 nofield
/musr/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)
/musr/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3VA norot dead 451 nofield
# Lens 3 visual attributes (optional)
/musr/command visattributes log_L3VA invisible
/musr/command visattributes log_L3ST invisible
/musr/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.
/musr/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)
/musr/command construct tubs IPCF 103 126.5 12.0 0 360 Steel 0 0 -865.5 log_World norot dead 501 nofield
/musr/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)
/musr/command visattributes log_IPV invisible
/musr/command visattributes log_IPCF blue_style
/musr/command visattributes log_IPST gray
#===============================================================================================================
# Trigger - Trigger Detector # Triggerz = -1092 mm; total length of TD is 110 mm; carbon foil at -1144 mm.
#===============================================================================================================
# Trigger tube and relative vacuum
/musr/command construct tubs TriggerV 0 100 148 0 360 G4_Galactic 0 0 -1092 log_World norot dead 600 nofield
/musr/command construct tubs Trigger 100 103 148 0 360 Steel 0 0 -1092 log_World norot dead 601 nofield
# TF - Trigger tube flanges
/musr/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 -956 log_World norot dead 611 nofield
/musr/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -1228 log_World norot dead 612 nofield
#-------------------------------------------------------------
# trigger foil is 52mm upstream of Triggerz, i.e. at -1144 mm
#-------------------------------------------------------------
# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm).
# USE THE NAME CFoil or coulombCFoil, otherwise musrMuFormation won't work!
####/musr/command construct box CFoil 60 60 0.000005147 G4_GRAPHITE 0 0 -45 log_TriggerV norot dead 621 nofield
/musr/command construct box CFoil 60 60 0.0000044 G4_GRAPHITE 0 0 -52.1 log_TriggerV norot dead 621 nofield
####/musr/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 musrDetectorConstruction.cc and set any density.
# Dummy plane to intercept outgoing muons from the Carbon foil.
#*/musr/command construct box saveCFoil 60 60 5e-4 G4_Galactic 0 0 -52.0005 log_TriggerV norot dead 623 nofield
#*/musr/command construct box saveBeforeCFoil 60 60 5e-4 G4_Galactic 0 0 -52.105 log_TriggerV norot dead 623 nofield
#*/musr/command construct box saveAfterTD 60 60 5e-4 G4_Galactic 0 0 58.0006 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
/musr/command construct box TriggE0 45 45 5 G4_Galactic 0 0 -57.15 log_TriggerV norot dead 630 nofield
/musr/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -48.0 log_TriggerV norot dead 631 nofield
/musr/command construct box TriggE2 45 45 4.9497 G4_Galactic 0 0 2.25 log_TriggerV rotTrig dead 632 nofield
/musr/command construct box TriggE3 45 45 4 G4_Galactic 0 0 54.0 log_TriggerV norot dead 633
# Beam spot (just for having a visual idea!)
/musr/command construct tubs BSpot 0 20 1 0 360 G4_Galactic 0 0 -63.15 log_TriggerV norot dead 650 nofield
# Trigger visual attributes (optional)
/musr/command visattributes log_TriggerV invisible
/musr/command visattributes log_Trigger invisible
/musr/command visattributes saveCFoil invisible
# Bug: It seems that if you set this to invisible the program stops. I see no reason for that!
#/musr/command visattributes log_saveAfterTD invisible
/musr/command visattributes log_BSpot invisible
#*/musr/command visattributes saveCFoil MACOR_style
#*/musr/command visattributes log_saveAfterTD darkred
/musr/command visattributes log_BSpot darkred
# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL.
# E.g. /musr/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
/musr/command globalfield Trigg0_field 45 45 5 uniform 0. 0. -1149.15 log_TriggE0 0 0 0 0 0 0.373
/musr/command globalfield Trigg1_field 45 45 4 uniform 0. 0. -1140. log_TriggE1 0 0 0 0 0 -0.02375
/musr/command globalfield Trigg2_field 45 45 4.9497 uniform 0. 0. -1089.75 log_TriggE2 0 0 0 0 0 0.041416
/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 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!!
#
/musr/command globalfield Lens3_field 0. 0. -567. fromfile 2DE L3_Erz.map log_L3VA 8.352
# To change the field in regular steps (e.g. for testing) use (f_min f_max step_no), e.g.:
#*/musr/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.
#######/musr/command globalfield RngAnU_field 0. 0. -167.00 fromfile 3DE EM_3D_extc.map log_RA_U 11.0
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 10.145
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 10.955
/musr/command globalfield RngAnU_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_U 10.560
/musr/command globalfield RngAnD_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_D 10.569
### 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! =>
#*/musr/command globalfield Sample_field 0. 0. -11.0 fromfile 2DE sample_Erz.map log_MCPV 9.0
#*/musr/command globalfield Guard2_field 0. 0. -11.0 fromfile 2DE guard2_Erz.map log_MCPV 6.0
#*/musr/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.!
#*/musr/command globalfield Magnet_field ? ? ? uniform 0. 0. 14.5 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
#######/musr/command globalfield Magnet_field 0. 0. -836.0 fromfile 2DB sample_Brz.map log_IPV 0.002
#*/musr/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
/musr/command globalfield setparameter SetLargestAcceptableStep 5
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/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 0
/musr/command globalfield printFieldValueAtPoint 0. 0. -1149.15
# Trigger 1
/musr/command globalfield printFieldValueAtPoint 0. 0. -1140.
# Trigger 2
/musr/command globalfield printFieldValueAtPoint 0. 0. -1089.75
# Trigger 3
/musr/command globalfield printFieldValueAtPoint 0. 0. -1038.0
# Einzel Lens 3 - L3 (center at -567.0, but max field at rel. +/-62 mm)
/musr/command globalfield printFieldValueAtPoint 0. 0. -507.0
# Ring Anode - RA (center at -167.0, but max field at rel. -16/+132 mm)
/musr/command globalfield printFieldValueAtPoint 0. 0. -35.0
# Sample space (center at -11.0, but max field at rel. +24 mm)
/musr/command globalfield printFieldValueAtPoint 0. 0. 13.0
# Check magnetic field at sample space
#*/musr/command globalfield printFieldValueAtPoint 10. 0. 13.0
# Check magnetic field at the lower field end limit
#*/musr/command globalfield printFieldValueAtPoint 0. 20. -1680.
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# --- Low Energy (default) ---
/musr/command process addDiscreteProcess gamma G4LowEnergyPhotoElectric
/musr/command process addDiscreteProcess gamma G4LowEnergyCompton
/musr/command process addDiscreteProcess gamma G4LowEnergyGammaConversion
/musr/command process addDiscreteProcess gamma G4LowEnergyRayleigh
/musr/command process addProcess e- G4MultipleScattering -1 1 1
#/musr/command process addDiscreteProcess e- G4CoulombScattering
/musr/command process addProcess e- G4LowEnergyIonisation -1 2 2
/musr/command process addProcess e- G4LowEnergyBremsstrahlung -1 -1 3
/musr/command process addProcess e+ G4MultipleScattering -1 1 1
#/musr/command process addDiscreteProcess e+ G4CoulombScattering
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
#
# --- High Energy ---
#/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
#/musr/command process addDiscreteProcess gamma G4ComptonScattering
#/musr/command process addDiscreteProcess gamma G4GammaConversion
#/musr/command process addProcess e- G4MultipleScattering -1 1 1
##/musr/command process addDiscreteProcess e- G4CoulombScattering
#/musr/command process addProcess e- G4eIonisation -1 2 2
#/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
#/musr/command process addProcess e+ G4MultipleScattering -1 1 1
##/musr/command process addDiscreteProcess e+ G4CoulombScattering
#/musr/command process addProcess e+ G4eIonisation -1 2 2
#/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
#/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
#
# --- Penelope ---
#/musr/command process addDiscreteProcess gamma G4PenelopePhotoElectric
#/musr/command process addDiscreteProcess gamma G4PenelopeCompton
#/musr/command process addDiscreteProcess gamma G4PenelopeGammaConversion
#/musr/command process addDiscreteProcess gamma G4PenelopeRayleigh
#/musr/command process addProcess e- G4MultipleScattering -1 1 1
##/musr/command process addDiscreteProcess e- G4CoulombScattering
#/musr/command process addProcess e- G4PenelopeIonisation -1 2 2
#/musr/command process addProcess e- G4PenelopeBremsstrahlung -1 -1 3
#/musr/command process addProcess e+ G4MultipleScattering -1 1 1
##/musr/command process addDiscreteProcess e+ G4CoulombScattering
#/musr/command process addProcess e+ G4PenelopeIonisation, -1 2 2
#/musr/command process addProcess e+ G4PenelopeBremsstrahlung, -1 -1 3
#/musr/command process addProcess e+ G4PenelopeAnnihilation, 0 -1 4
#
# --- Muons ---
/musr/command process addProcess mu+ G4MultipleScattering -1 1 1
#/musr/command process addProcess mu+ MultipleAndCoulombScattering -1 1 1 goulombRegion
#/musr/command process addDiscreteProcess mu+ G4CoulombScattering
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
/musr/command process addProcess mu- G4MultipleScattering -1 1 1
#/musr/command process addDiscreteProcess mu- G4CoulombScattering
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
# --- Muonium ---
/musr/command process addProcess mu+ musrMuFormation -1 -1 2
#cks - the following line not supported yet, has to be tested (at the moment, musrMuScatter is hard wired in the musrPhysicsList.cc):
#/musr/command process addProcess Mu musrMuScatter -1 -1 1
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
#/musr/command rootOutput weight off
#/musr/command rootOutput BFieldAtDecay off
#/musr/command rootOutput muIniPosX off
#/musr/command rootOutput muIniPosY off
#/musr/command rootOutput muIniPosZ off
#/musr/command rootOutput muIniMomX off
#/musr/command rootOutput muIniMomY off
#/musr/command rootOutput muIniMomZ off
#/musr/command rootOutput muIniPolX off
#/musr/command rootOutput muIniPolY off
#/musr/command rootOutput muIniPolZ off
#/musr/command rootOutput muDecayDetID off
#/musr/command rootOutput muDecayPosX off
#/musr/command rootOutput muDecayPosY off
#/musr/command rootOutput muDecayPosZ off
#/musr/command rootOutput muDecayTime off
#/musr/command rootOutput muDecayPolX off
#/musr/command rootOutput muDecayPolY off
#/musr/command rootOutput muDecayPolZ off
#/musr/command rootOutput muTargetTime off
#/musr/command rootOutput muTargetPolX off
#/musr/command rootOutput muTargetPolY off
#/musr/command rootOutput muTargetPolZ off
#/musr/command rootOutput muM0Time off
#/musr/command rootOutput muM0PolX off
#/musr/command rootOutput muM0PolY off
#/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
#/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
#
################################################################################################################
# -- Setting simulation PARAMETERS --
################################################################################################################
# Set the overall range cut (default 0.1 mm)
#*/run/setCut 1 mm
# Set the range cut on particular volumes (in mm)
#/musr/command SetUserLimits log_CFoil 1e-8 -1 -1 -1 -1
#*/musr/command SetUserLimits log_target 0.01 -1 -1 -1 -1
#*/musr/command SetUserLimits log_targetscint 0.01 -1 -1 -1 -1
#*/musr/command SetUserLimits log_cryostatscint 0.01 -1 -1 -1 -1
# Set particle energy cuts on particular volumes (in MeV)
#/musr/command SetUserLimits log_World ustepMax(mm) utrakMax(mm) utimeMax(ns) uekinMin(MeV) urangMin(mm)
/musr/command SetUserLimits log_World -1 -1 -1 1e-7 -1
# Store ALL the events in a ROOT tree or just the interesting ones? (default is true)
#*/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
# Override runID number
#*/musr/run/runID 21
# Set the frequency of event printing
/musr/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
/musr/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 -1144 mm, acceleration starts at -1154.15 mm
/gun/vertex 0. 0. -1155. 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
# 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
# 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 /musr/ScintSD
# Only for code debugging!
#/tracking/verbose 1
# BEAM ON
#*/run/beamOn 1000000
#*/run/beamOn 2
/run/beamOn 1000

View File

@@ -1,697 +0,0 @@
# Macro file for musr.cc - Construct detector, set fields and other parameters.
# Last modified by T. Shiroka: 17.03.2008
#
# Corrected TD and MCP2 distances by T. Prokscha, 07.11.2008.
#
# How to run: musr 10xx.mac (append "idle" for prompt after running)
# musr 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 /musr/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 /musr/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:
/musr/command rotation rotTrig 0 1 0 -45
/musr/command rotation rotRAnR 0 0 1 -90
/musr/command rotation rotRAnL 0 0 1 90
/musr/command rotation rotRAnD 0 0 1 180
################################################################################################################
# -- LEM GEOMETRY --
################################################################################################################
# WORLD = Laboratory reference frame, the origin is in the centre of the LEM sample tube
/musr/command construct box World 250 250 2250 G4_Galactic 0 0 0 no_logical_volume norot dead -1
# MINIMUM WORD HALF LENGTH 1250 mm!
#/musr/command construct box World 2000 2000 4000 G4_Galactic 0 0 0 no_logical_volume norot dead -1
# World visual attributes (optional)
/musr/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
/musr/command construct tubs ScIU 90 95 130 45 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 011 nofield
/musr/command construct tubs ScIR 90 95 130 135 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 012 nofield
/musr/command construct tubs ScID 90 95 130 225 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 013 nofield
/musr/command construct tubs ScIL 90 95 130 315 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 014 nofield
## Outer Scintillators - O
/musr/command construct tubs ScOU 96 101 130 45 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 021 nofield
/musr/command construct tubs ScOR 96 101 130 135 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 022 nofield
/musr/command construct tubs ScOD 96 101 130 225 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 023 nofield
/musr/command construct tubs ScOL 96 101 130 315 90 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 024 nofield
# Visual attributes (optional)
#*/musr/command visattributes log_ScOU SCINT_style
#*/musr/command visattributes log_ScOD dSCINT_style
/musr/command visattributes log_ScOL darkred
/musr/command visattributes log_ScIL 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
#
# 07/Nov/2008: correct sample tube dimensions: the new tubes have 75 mm / 78 mm inner/outer radius
#
#===============================================================================================================
# MCP - Multi-Channel Plate 2 Chamber; V - Vacuum, S - Solid # Note: VERY IMPORTANT: mcpv_z = -92.5 mm!
# OLD way of assigning a field
#/musr/command construct tubs MCPV 0 76.5 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100 MCPSfield
/musr/command construct tubs MCPV 0 75.0 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100 nofield
/musr/command construct tubs MCPS 75.0 78.0 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
/musr/command construct tubs F160 78.0 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 901 nofield
/musr/command construct tubs F100 0 75.0 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.
#/musr/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)
/musr/command visattributes log_MCPV invisible
/musr/command visattributes log_MCPS invisible
/musr/command visattributes log_F160 blue_style
/musr/command visattributes log_F100 blue_style
#===============================================================================================================
# MCP - Micro Channel Plate Detector MCP2 (Used as an alternative to cryostat) # mcpv_z = -92.5 mm!
#
# We have a 324 mm long sample tube;
# the MCP2 front side is at 142 mm from the end of the sample tube.
# the front face of the sample plate of the cryostat is 145 mm from the end of the sample tube.
#
#===============================================================================================================
# MCPM1 - MCP Macor ring 1
# MCPD - electron multiplying glass disk (also known as target)
# Sensitive surface at z = 20 mm wrt. World
# MCPM2 - MCP Macor ring 2
#*/musr/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-musr/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz.
#*/musr/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 108.0 log_MCPV norot dead 032 nofield
/musr/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 116.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:
#*/musr/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_MCPV norot musr/ScintSD 202 nofield
/musr/command construct tubs target 0 75.0 1.5 0 360 MCPglass 0 0 114 log_MCPV norot musr/ScintSD 202 nofield
# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole)
# MCVR - "Vacuum Ring" (circular hole)
/musr/command construct box MCSR 36.5 36.5 1 Steel 0 0 118.5 log_MCPV norot dead 204 nofield
/musr/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
/musr/command construct box MCPA 36.5 36.5 4 Steel 0 0 129.5 log_MCPV norot dead 206 nofield
/musr/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 207 nofield
/musr/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
/musr/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 162.3 log_MCPV norot dead 209 nofield
# MCP2 visual attributes (optional)
#/musr/command visattributes log_DMCP MCP_style
#*/musr/command visattributes log_target MCP_style
#*/musr/command visattributes log_MCPM1 MACOR_style
/musr/command visattributes log_MCPM2 MACOR_style
#===============================================================================================================
# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm)
#
# at the moment, sample plate front face is still at z = 14.0mm --> should be changed to 17mm.
#===============================================================================================================
# 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.
#*/musr/command construct tubs SAH1 0 35 2.5 0 360 G4_Cu 0 0 119.0 log_MCPV norot dead 251 nofield
#*/musr/command construct tubs SAH2 0 35 2 0 360 G4_Cu 0 0 108.5 log_MCPV norot dead 252 nofield
#/musr/command construct tubs SAH3 20 35 0.5 0 360 G4_Cu 0 0 106.0 log_MCPV norot dead 253 nofield
#*/musr/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
#*/musr/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 126.5 log_MCPV norot dead 261 nofield
#*/musr/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 135.0 log_MCPV norot dead 262 nofield
#*/musr/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 163.5 log_MCPV norot dead 263 nofield
#*/musr/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 143.5 log_MCPV norot dead 264 nofield
#*/musr/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 143.5 log_MCPV norot dead 265 nofield
#*/musr/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 108.5 log_MCPV norot dead 266 nofield
#*/musr/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)
#*/musr/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 76.0 log_MCPV norot dead 271 nofield
#*/musr/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)
#*/musr/command visattributes log_SAH1 oxsteel
#*/musr/command visattributes log_SAH2 oxsteel
#*/musr/command visattributes log_SAPH MACOR_style
#/musr/command visattributes log_SAH3 oxsteel
#/musr/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
/musr/command construct cons 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
/musr/command construct cons 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
/musr/command construct cons 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
/musr/command construct cons 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
/musr/command construct cons 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
/musr/command construct cons 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
/musr/command construct cons 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
/musr/command construct cons 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.!
/musr/command construct tubs RA_U 0 0.01 0.005 0 360 G4_Galactic 0 0 -50.50 log_MCPV norot dead 322 nofield
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -50.52 log_MCPV rotRAnR dead 324 nofield
/musr/command construct tubs RA_D 0 0.01 0.005 0 360 G4_Galactic 0 0 -50.54 log_MCPV rotRAnD dead 326 nofield
/musr/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
/musr/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)
/musr/command visattributes log_RA_EU oxsteel
/musr/command visattributes log_RA_MR oxsteel
/musr/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!
#/musr/command construct cons 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
#/musr/command construct cons 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)
/musr/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.
#*/musr/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
/musr/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).
#*/musr/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)
/musr/command visattributes log_GATS SCINT_style
/musr/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
/musr/command construct tubs L3VA 0 100 220 0 360 G4_Galactic 0 0 -567 log_World norot dead 400 nofield
/musr/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 -567 log_World norot dead 401 nofield
/musr/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -359 log_World norot dead 402 nofield
/musr/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.
/musr/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3VA norot dead 421 nofield
/musr/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3VA norot dead 422 nofield
/musr/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3VA norot dead 423 nofield
/musr/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.
/musr/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3VA norot dead 431 nofield
/musr/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3VA norot dead 432 nofield
/musr/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3VA norot dead 433 nofield
/musr/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)
/musr/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3VA norot dead 451 nofield
# Lens 3 visual attributes (optional)
/musr/command visattributes log_L3VA invisible
/musr/command visattributes log_L3ST invisible
/musr/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.
/musr/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)
/musr/command construct tubs IPCF 103 126.5 12.0 0 360 Steel 0 0 -865.5 log_World norot dead 501 nofield
/musr/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)
/musr/command visattributes log_IPV invisible
/musr/command visattributes log_IPCF blue_style
/musr/command visattributes log_IPST gray
#===============================================================================================================
# Trigger - Trigger Detector # Triggerz = -1092 mm; total length of TD is 110 mm; carbon foil at -1144 mm.
#===============================================================================================================
# Trigger tube and relative vacuum
/musr/command construct tubs TriggerV 0 100 148 0 360 G4_Galactic 0 0 -1092 log_World norot dead 600 nofield
/musr/command construct tubs Trigger 100 103 148 0 360 Steel 0 0 -1092 log_World norot dead 601 nofield
# TF - Trigger tube flanges
/musr/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 -956 log_World norot dead 611 nofield
/musr/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -1228 log_World norot dead 612 nofield
#-------------------------------------------------------------
# trigger foil is 52mm upstream of Triggerz, i.e. at -1144 mm
#-------------------------------------------------------------
# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm).
# USE THE NAME CFoil or coulombCFoil, otherwise musrMuFormation won't work!
####/musr/command construct box CFoil 60 60 0.000005147 G4_GRAPHITE 0 0 -45 log_TriggerV norot dead 621 nofield
/musr/command construct box CFoil 60 60 0.0000049 G4_GRAPHITE 0 0 -52.1 log_TriggerV norot dead 621 nofield
####/musr/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 musrDetectorConstruction.cc and set any density.
# Dummy plane to intercept outgoing muons from the Carbon foil.
#*/musr/command construct box saveCFoil 60 60 5e-4 G4_Galactic 0 0 -52.0005 log_TriggerV norot dead 623 nofield
/musr/command construct box saveAfterTD 60 60 5e-4 G4_Galactic 0 0 58.0006 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
/musr/command construct box TriggE0 45 45 5 G4_Galactic 0 0 -57.15 log_TriggerV norot dead 630 nofield
/musr/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -48.0 log_TriggerV norot dead 631 nofield
/musr/command construct box TriggE2 45 45 4.9497 G4_Galactic 0 0 2.25 log_TriggerV rotTrig dead 632 nofield
/musr/command construct box TriggE3 45 45 4 G4_Galactic 0 0 54.0 log_TriggerV norot dead 633
# Beam spot (just for having a visual idea!)
/musr/command construct tubs BSpot 0 20 1 0 360 G4_Galactic 0 0 -63.15 log_TriggerV norot dead 650 nofield
# Trigger visual attributes (optional)
/musr/command visattributes log_TriggerV invisible
/musr/command visattributes log_Trigger invisible
#*/musr/command visattributes saveCFoil MACOR_style
/musr/command visattributes log_saveAfterTD darkred
/musr/command visattributes log_BSpot darkred
# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL.
# E.g. /musr/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
/musr/command globalfield Trigg0_field 45 45 5 uniform 0. 0. -1149.15 log_TriggE0 0 0 0 0 0 0.373
/musr/command globalfield Trigg1_field 45 45 4 uniform 0. 0. -1140. log_TriggE1 0 0 0 0 0 -0.02375
/musr/command globalfield Trigg2_field 45 45 4.9497 uniform 0. 0. -1089.75 log_TriggE2 0 0 0 0 0 0.041416
/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 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!!
#
/musr/command globalfield Lens3_field 0. 0. -567. fromfile 2DE L3_Erz.map log_L3VA 6.51
# To change the field in regular steps (e.g. for testing) use (f_min f_max step_no), e.g.:
#*/musr/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.
#######/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 8.26
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 8.26
/musr/command globalfield RngAnD_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_D 8.26
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 8.26
### 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! =>
#*/musr/command globalfield Sample_field 0. 0. -11.0 fromfile 2DE sample_Erz.map log_MCPV 9.0
#*/musr/command globalfield Guard2_field 0. 0. -11.0 fromfile 2DE guard2_Erz.map log_MCPV 6.0
#*/musr/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.!
#*/musr/command globalfield Magnet_field ? ? ? uniform 0. 0. 14.5 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
#######/musr/command globalfield Magnet_field 0. 0. -836.0 fromfile 2DB sample_Brz.map log_IPV 0.002
#*/musr/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
/musr/command globalfield setparameter SetLargestAcceptableStep 5
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/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 0
/musr/command globalfield printFieldValueAtPoint 0. 0. -1149.15
# Trigger 1
/musr/command globalfield printFieldValueAtPoint 0. 0. -1140.
# Trigger 2
/musr/command globalfield printFieldValueAtPoint 0. 0. -1089.75
# Trigger 3
/musr/command globalfield printFieldValueAtPoint 0. 0. -1038.0
# Einzel Lens 3 - L3 (center at -567.0, but max field at rel. +/-62 mm)
/musr/command globalfield printFieldValueAtPoint 0. 0. -507.0
# Ring Anode - RA (center at -167.0, but max field at rel. -16/+132 mm)
/musr/command globalfield printFieldValueAtPoint 0. 0. -35.0
# Sample space (center at -11.0, but max field at rel. +24 mm)
/musr/command globalfield printFieldValueAtPoint 0. 0. 13.0
# Check magnetic field at sample space
#*/musr/command globalfield printFieldValueAtPoint 10. 0. 13.0
# Check magnetic field at the lower field end limit
#*/musr/command globalfield printFieldValueAtPoint 0. 20. -1680.
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# --- Low Energy (default) ---
/musr/command process addDiscreteProcess gamma G4LowEnergyPhotoElectric
/musr/command process addDiscreteProcess gamma G4LowEnergyCompton
/musr/command process addDiscreteProcess gamma G4LowEnergyGammaConversion
/musr/command process addDiscreteProcess gamma G4LowEnergyRayleigh
/musr/command process addProcess e- G4MultipleScattering -1 1 1
#/musr/command process addDiscreteProcess e- G4CoulombScattering
/musr/command process addProcess e- G4LowEnergyIonisation -1 2 2
/musr/command process addProcess e- G4LowEnergyBremsstrahlung -1 -1 3
/musr/command process addProcess e+ G4MultipleScattering -1 1 1
#/musr/command process addDiscreteProcess e+ G4CoulombScattering
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
#
# --- High Energy ---
#/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
#/musr/command process addDiscreteProcess gamma G4ComptonScattering
#/musr/command process addDiscreteProcess gamma G4GammaConversion
#/musr/command process addProcess e- G4MultipleScattering -1 1 1
##/musr/command process addDiscreteProcess e- G4CoulombScattering
#/musr/command process addProcess e- G4eIonisation -1 2 2
#/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
#/musr/command process addProcess e+ G4MultipleScattering -1 1 1
##/musr/command process addDiscreteProcess e+ G4CoulombScattering
#/musr/command process addProcess e+ G4eIonisation -1 2 2
#/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
#/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
#
# --- Penelope ---
#/musr/command process addDiscreteProcess gamma G4PenelopePhotoElectric
#/musr/command process addDiscreteProcess gamma G4PenelopeCompton
#/musr/command process addDiscreteProcess gamma G4PenelopeGammaConversion
#/musr/command process addDiscreteProcess gamma G4PenelopeRayleigh
#/musr/command process addProcess e- G4MultipleScattering -1 1 1
##/musr/command process addDiscreteProcess e- G4CoulombScattering
#/musr/command process addProcess e- G4PenelopeIonisation -1 2 2
#/musr/command process addProcess e- G4PenelopeBremsstrahlung -1 -1 3
#/musr/command process addProcess e+ G4MultipleScattering -1 1 1
##/musr/command process addDiscreteProcess e+ G4CoulombScattering
#/musr/command process addProcess e+ G4PenelopeIonisation, -1 2 2
#/musr/command process addProcess e+ G4PenelopeBremsstrahlung, -1 -1 3
#/musr/command process addProcess e+ G4PenelopeAnnihilation, 0 -1 4
#
# --- Muons ---
/musr/command process addProcess mu+ G4MultipleScattering -1 1 1
#/musr/command process addProcess mu+ MultipleAndCoulombScattering -1 1 1 goulombRegion
#/musr/command process addDiscreteProcess mu+ G4CoulombScattering
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
/musr/command process addProcess mu- G4MultipleScattering -1 1 1
#/musr/command process addDiscreteProcess mu- G4CoulombScattering
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
# --- Muonium ---
/musr/command process addProcess mu+ musrMuFormation -1 -1 2
#cks - the following line not supported yet, has to be tested (at the moment, musrMuScatter is hard wired in the musrPhysicsList.cc):
#/musr/command process addProcess Mu musrMuScatter -1 -1 1
################################################################################################################
# -- Setting simulation PARAMETERS --
################################################################################################################
# Set the overall range cut (default 0.1 mm)
#*/run/setCut 1 mm
# Set the range cut on particular volumes (in mm)
/musr/command SetUserLimits log_CFoil 1e-8
#*/musr/command SetUserLimits log_target 0.01
#*/musr/command SetUserLimits log_targetscint 0.01
#*/musr/command SetUserLimits log_cryostatscint 0.01
# Set particle energy cuts on particular volumes (in MeV)
#/musr/command SetUserMinEkine log_World 0.1
#/musr/command SetUserLimits log_World ustepMax(mm) utrakMax(mm) utimeMax(ns) uekinMin(MeV) urangMin(mm)
/musr/command SetUserLimits log_World -1 -1 -1 1e-7 -1
# Store ALL the events in a ROOT tree or just the interesting ones? (default is true)
#*/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
# Override runID number
#*/musr/run/runID 21
# Set the frequency of event printing
/musr/run/howOftenToPrintEvent 1000
# RANDOM option choices: (specify the random number generator initialisation)
# 0 ... no initialisation (default)
# 1 ... use actual computer time to initialise now # Pseudo-random numbers
# 2 ... use event number to initialise at the beginning of each event # Reproducible numbers
# 3 ... read in the random no. initial values for each event from a file
/musr/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 -1144 mm, acceleration starts at -1154.15 mm
/gun/vertex 0. 0. -1155. 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
# 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 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 /musr/ScintSD
# Only for code debugging!
#/tracking/verbose 1
# BEAM ON
#*/run/beamOn 1000000
#*/run/beamOn 2
/run/beamOn 1000

View File

@@ -1,241 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for the simulation of electron/positrons from the Sr decay
# passing through the scintiallator detectors (blocks).
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
###################################################################################
############################# G E O M E T R Y ###################################
#
# WORLD
/musr/command construct box World 10 10 100 G4_AIR 0 0 0 no_logical_volume norot dead -1
#
# Sr SOURCE
/musr/command construct sphere source 0 0.02 0 360 0 180 G4_Sr 0 0 0 log_World norot dead 301
#
# SCINTILLATOR BLOCKS
/musr/command construct box scintFarAwayC1 1.5 1.5 1 G4_PLASTIC_SC_VINYLTOLUENE 0 0 5 log_World norot musr/ScintSD 10
/musr/command construct box scintFarAwayC2 1.5 1.5 1 G4_PLASTIC_SC_VINYLTOLUENE 0 0 14 log_World norot musr/ScintSD 11
#
# APDs
/musr/command construct box APD1 0.1 1.5 1.5 G4_Cu 1.6 0 5 log_World norot dead 20
/musr/command construct box APD2 0.1 1.5 1.5 G4_Cu 1.6 0 14 log_World norot dead 21
#
# Plastic holders
/musr/command construct box Holder1 0.75 4 4 G4_GLASS_PLATE 2.5 0 5 log_World norot dead 30
/musr/command construct box Holder2 0.75 4 4 G4_GLASS_PLATE 2.5 0 14 log_World norot dead 31
#============================================================
/musr/command visattributes log_World invisible
/musr/command visattributes log_source red
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE lightblue
/musr/command visattributes log_APD1 red
###################################################################################
########################## O P T I C A L P H O T O N S #########################
# PhotonEnergy[nEntries] =
# { 2.695*eV, 2.75489*eV, 2.8175*eV, 2.88302*eV, // 460, 450, 440, 430 nm
# 2.95167*eV, 3.02366*eV, 3.09925*eV, 3.17872*eV, 3.26237*eV, // 420, 410, 400, 390, 380 nm
# 3.30587*eV, 3.35054*eV, 3.44361*eV, 3.542*eV, 3.64618*eV }; // 375, 370, 360, 350, 340 nm
#/musr/command materialPropertiesTable optScintMPT ABSLENGTH 2 2.695e-6 3.64618e-6 80 80
/musr/command materialPropertiesTable optScintMPT RINDEX 2 2.695e-6 3.64618e-6 1.58 1.58
/musr/command materialPropertiesTable optScintMPT FASTCOMPONENT 14 2.695e-6 2.75489e-6 2.8175e-6 2.88302e-6 2.95167e-6 3.02366e-6 3.09925e-6 3.17872e-6 3.26237e-6 3.30587e-6 3.35054e-6 3.44361e-6 3.542e-6 3.64618e-6 0.01 0.07 0.15 0.26 0.375 0.52 0.65 0.80 0.95 1 0.88 0.44 0.08 0.01
#/musr/command materialPropertiesTable optScintMPT SLOWCOMPONENT 14 2.695e-6 2.75489e-6 2.8175e-6 2.88302e-6 2.95167e-6 3.02366e-6 3.09925e-6 3.17872e-6 3.26237e-6 3.30587e-6 3.35054e-6 3.44361e-6 3.542e-6 3.64618e-6 0.01 0.07 0.15 0.26 0.375 0.52 0.65 0.80 0.95 1 0.88 0.44 0.08 0.01
/musr/command materialPropertiesTable optScintMPT SCINTILLATIONYIELD 0 9167.
/musr/command materialPropertiesTable optScintMPT RESOLUTIONSCALE 0 1.0
/musr/command materialPropertiesTable optScintMPT FASTTIMECONSTANT 0 1.32
/musr/command materialPropertiesTable optScintMPT FASTSCINTILLATIONRISETIME 0 0.063
#/musr/command materialPropertiesTable optScintMPT SLOWTIMECONSTANT 0 1.6
/musr/command materialPropertiesTable optScintMPT YIELDRATIO 0 1.0
/musr/command setMaterialPropertiesTable optScintMPT G4_PLASTIC_SC_VINYLTOLUENE
#
# AIR
/musr/command materialPropertiesTable optAIR_MPT ABSLENGTH 2 2.0e-6 4.5e-6 0.001 0.001
/musr/command materialPropertiesTable optAIR_MPT RINDEX 2 2.0e-6 4.5e-6 1.0003 1.0003
/musr/command setMaterialPropertiesTable optAIR_MPT G4_AIR
#
# OPTICAL BOUNDARY: SCINTILLATOR -> AIR
#/musr/command materialPropertiesTable airWrap1 REFLECTIVITY 2 2.0e-6 4.5e-6 1.0 1.0
#/musr/command materialPropertiesTable airWrap1 EFFICIENCY 2 2.0e-6 4.5e-6 0. 0.
#/musr/command materialPropertiesTable airWrap1
#/musr/command opticalSurface airBoundary1 phys_scintFarAwayC1 phys_World dielectric_dielectric polished unified airWrap1
/musr/command opticalSurface airBoundary1 phys_scintFarAwayC1 phys_World dielectric_dielectric polishedteflonair LUT
# OPTICAL BOUNDARY: SCINTILLATOR -> AIR
#/musr/command materialPropertiesTable airWrap2 REFLECTIVITY 2 2.0e-6 4.5e-6 1.0 1.0
#/musr/command materialPropertiesTable airWrap2 EFFICIENCY 2 2.0e-6 4.5e-6 0. 0.
/musr/command opticalSurface airBoundary2 phys_scintFarAwayC2 phys_World dielectric_dielectric polishedteflonair LUT
#
# OPTICAL BOUNDARY: SCINTILLATOR -> APD 1
/musr/command materialPropertiesTable apdWrapping1 REFLECTIVITY 2 2.0e-6 4.5e-6 0.0 0.0
/musr/command materialPropertiesTable apdWrapping1 EFFICIENCY 2 2.0e-6 4.5e-6 0.25 0.25
/musr/command opticalSurface APDsurface phys_scintFarAwayC1 phys_APD1 dielectric_metal polished LUT apdWrapping1
#
# OPTICAL BOUNDARY: SCINTILLATOR -> APD 2
/musr/command materialPropertiesTable apdWrapping2 REFLECTIVITY 2 2.0e-6 4.5e-6 0.0 0.0
/musr/command materialPropertiesTable apdWrapping2 EFFICIENCY 2 2.0e-6 4.5e-6 0.25 0.25
/musr/command opticalSurface APDsurface phys_scintFarAwayC2 phys_APD2 dielectric_metal polished LUT apdWrapping2
#
#
/musr/command OPSA signalSeparationTime 1000
#/musr/command OPSA eventsForOPSAhistos -2 0
/musr/command OPSA OPSAhist 1000 0. 10.
/musr/command OPSA pulseShapeArray APDpulseShapeFile_2011_1e_Z.txt
/musr/command OPSA CFD -0.2 0.4 -1.8
/musr/command OPSA APDcells 1 60 60 0.1 1.5 1.5
/musr/command OPSA photonFractions 0.01 0.05 0.5 0.2
/musr/command OPSA SetAPDcellsTimeVariationSigma 0.1
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.4
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addDiscreteProcess opticalphoton G4OpAbsorption
/musr/command process addDiscreteProcess opticalphoton G4OpRayleigh
/musr/command process addDiscreteProcess opticalphoton G4OpBoundaryProcess
#/musr/command process addDiscreteProcess opticalphoton G4OpWLS
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e- G4Scintillation 4 -1 4
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess e+ G4Scintillation 5 -1 5
#/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
#/musr/command process addProcess mu- G4MuIonisation -1 2 2
#/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu- G4MuPairProduction -1 4 4
#/musr/command process addProcess mu- G4Scintillation 5 -1 5
#/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addProcess mu+ G4MuIonisation -1 2 2
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#/musr/command process addProcess mu+ G4Scintillation 5 -1 5
#
#
###/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
#/process/msc/StepLimit UseSafety
###/process/msc/LateralDisplacement
#/process/msc/RangeFactor 0.04
#/process/msc/GeomFactor 2.5
###/process/msc/FactorForAngleLimit
#/process/msc/Skin 3.0
###/process/msc/ThetaLimit 0.2 rad
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
#/musr/command rootOutputDirectoryName /home/sedlak/simData
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
#/musr/command storeOnlyEventsWithHits false
#/musr/command storeOnlyEventsWithHitInDetID 11
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 50
#
/musr/command maximumRunTimeAllowed 400000
/musr/run/howOftenToPrintEvent 1
/musr/run/randomOption 2
# Use optical photons:
/musr/command G4OpticalPhotons true
#/tracking/verbose 5
#/process/verbose 5
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
/musr/command rootOutput weight off
/musr/command rootOutput BFieldAtDecay off
/musr/command rootOutput muIniPosX off
/musr/command rootOutput muIniPosY off
/musr/command rootOutput muIniPosZ off
/musr/command rootOutput muIniMomX off
/musr/command rootOutput muIniMomY off
/musr/command rootOutput muIniMomZ off
/musr/command rootOutput muIniPolX off
/musr/command rootOutput muIniPolY off
/musr/command rootOutput muIniPolZ off
/musr/command rootOutput muIniTime off
/musr/command rootOutput muDecayDetID off
/musr/command rootOutput muDecayPosX off
/musr/command rootOutput muDecayPosY off
/musr/command rootOutput muDecayPosZ off
/musr/command rootOutput muDecayTime off
/musr/command rootOutput muDecayPolX off
/musr/command rootOutput muDecayPolY off
/musr/command rootOutput muDecayPolZ off
/musr/command rootOutput muTargetTime off
/musr/command rootOutput muTargetPolX off
/musr/command rootOutput muTargetPolY off
/musr/command rootOutput muTargetPolZ off
/musr/command rootOutput muM0Time off
/musr/command rootOutput muM0PolX off
/musr/command rootOutput muM0PolY off
/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
/musr/command rootOutput det_edep_el off
/musr/command rootOutput det_edep_pos off
/musr/command rootOutput det_edep_gam off
/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
/vis/disable
#/control/execute visFromToni.mac
#/control/execute visDawn1.mac
#/control/execute visVRML201.mac
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
/gun/primaryparticle e-
/gun/vertex 0 0 0 mm
/gun/momentum 2.15 MeV
######################## B E A M O N #######################################
/run/beamOn 20
#/run/beamOn 5000000

View File

@@ -1,301 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for muSR instrument simulations
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
###################################################################################
############################# G E O M E T R Y ###################################
###################################################################################
# ROTATION MATRIXES:
/musr/command rotation matrix1 0 0 45
/musr/command rotation matrix2 0 180 0
# WORLD VOLUME
/musr/command construct box World 300 300 2000 G4_Galactic 0 0 0 no_logical_volume norot dead -1
# ---- BEAMPIPE ----
# Between the face of the last quadrupole and the MANTEL, there is 395 mm distance
# = tube with the same diameter as the MANTEL.
# MANTEL
/musr/command construct tubs mantel_A 159 165 210 0 360 G4_Al 0 0 -1152 log_World norot dead 8301
/musr/command construct tubs mantel_B 76.5 159 12.5 0 360 G4_Al 0 0 -954.5 log_World norot dead 8302
/musr/command construct tubs mantel_C 165 185 8.5 0 360 G4_Al 0 0 -1353.5 log_World norot dead 8303
# NEW HIGH FIELD "ZWICHENROHR" (Gezeichnet 7.2.2011)
/musr/command construct tubs zwichenrohr_A 35 41 322 0 360 G4_Al 0 0 -620 log_World norot dead 8201
/musr/command construct tubs zwichenrohr_B 0 35 322 0 360 G4_Galactic 0 0 -620 log_World norot dead 8202
/musr/command construct tubs zwichenrohr_C 41 90 6 0 360 G4_Al 0 0 -936 log_World norot dead 8203
/musr/command construct tubs zwichenrohr_D 25 35 5 0 360 G4_Al 0 0 317 log_zwichenrohr_B norot dead 8204
# SECOND COLLIMATOR
/musr/command construct tubs collimatorA2 7.5 35 25 0 360 G4_Cu 0 0 287 log_zwichenrohr_B norot dead 341
# NOSE EXTENSION
/musr/command construct tubs noseExtensionA 15 25 2.0 0 360 G4_Al 0 0 -47 log_World norot dead 300
/musr/command construct tubs noseExtensionB 25 28 126.5 0 360 G4_Al 0 0 -171.5 log_World norot dead 302
/musr/command construct tubs noseExtensionC 28 41 4.0 0 360 G4_Al 0 0 -294 log_World norot dead 304
/musr/command construct tubs noseKaptonWindow 0 15 0.015 0 360 G4_KAPTON 0 0 -45.1 log_World norot dead 309
# COLLIMATOR
#/musr/command construct tubs collimatorA 2.5 25 15 0 360 G4_Pb 0 0 -49 log_World norot dead 310
#/musr/command construct tubs collimatorB 5.0 25 10 0 360 G4_Pb 0 0 -74 log_World norot dead 312
#/musr/command construct tubs collimatorC 7.5 25 25 0 360 G4_Pb 0 0 -309 log_World norot dead 312
# COLLIMATOR
/musr/command construct tubs collimatorA 2.5 25 15 0 360 G4_Pb 0 0 -64 log_World norot dead 310
/musr/command construct tubs collimatorB 3.5 25 10 0 360 G4_Pb 0 0 -89 log_World norot dead 312
/musr/command construct tubs collimatorC 5.0 25 10 0 360 G4_Pb 0 0 -109 log_World norot dead 314
#
# ---- MAGNET -----
/musr/command construct tubs magnet 44.4 100 150 0 360 G4_Sn 0 0 0 log_World norot dead 221
# MAGNET WALL
/musr/command construct tubs mag_wall 44.4 46.5 150 0 360 G4_Cu 0 0 0 log_magnet norot dead 222
#
# ---- CRYOSTAT ----
/musr/command construct tubs cryo_1_cyl 7 7.5 13.0 0 360 G4_Al 0 0 2.5 log_World norot dead 511
/musr/command construct tubs cryo_1_window 0 7.0 0.005 0 360 G4_MYLAR 0 0 -5.4 log_World norot dead 513
/musr/command construct tubs cryo_1_cyl_b 9.8 10.5 16 0 360 G4_Al 0 0 32.5 log_World norot dead 515
/musr/command construct tubs cryo_1_flange_b 7 10.5 0.5 0 360 G4_Al 0 0 16 log_World norot dead 516
/musr/command construct cons cryo_1_conical 9.8 10.5 13.5 14.2 10 0 360 G4_Al 0 0 58.5 log_World norot dead 517
/musr/command construct tubs cryo_1_cyl_c 13.5 14.2 60 0 360 G4_Al 0 0 128.5 log_World norot dead 518
#
/musr/command construct tubs cryo_2_cyl 15.5 16 33.0 0 360 G4_Al 0 0 13.0 log_World norot dead 521
/musr/command construct tubs cryo_2_flange 10 15.5 0.25 0 360 G4_Al 0 0 -19.75 log_World norot dead 522
/musr/command construct tubs cryo_2_window 0 11 0.005 0 360 G4_MYLAR 0 0 -20.1 log_World norot dead 523
/musr/command construct tubs cryo_2_flange_b 15.5 29.5 0.5 0 360 G4_Al 0 0 46.5 log_World norot dead 525
/musr/command construct tubs cryo_2_cyl_b 28.5 29.5 61.25 0 360 G4_Al 0 0 108.25 log_World norot dead 526
#
/musr/command construct tubs cryo_3_cyl 18.0 18.5 33.0 0 360 G4_Al 0 0 8.5 log_World norot dead 531
/musr/command construct tubs cryo_3_flange 8 18.0 0.25 0 360 G4_Al 0 0 -24.25 log_World norot dead 532
/musr/command construct tubs cryo_3_window 0 9 0.005 0 360 G4_MYLAR 0 0 -24.6 log_World norot dead 533
/musr/command construct tubs cryo_3_flange_b 18.0 34.5 0.5 0 360 G4_Al 0 0 42 log_World norot dead 535
/musr/command construct tubs cryo_3_cyl_b 33.5 34.5 61.25 0 360 G4_Al 0 0 103.75 log_World norot dead 536
#
/musr/command construct tubs cryo_4_cyl 20 21 31.25 0 360 G4_Al 0 0 4.25 log_World norot dead 541
/musr/command construct tubs cryo_4_flange 6 20 0.5 0 360 G4_Al 0 0 -26.5 log_World norot dead 542
/musr/command construct tubs cryo_4_window 0 7 0.005 0 360 G4_Ti 0 0 -27.1 log_World norot dead 543
/musr/command construct tubs cryo_4_flange_b 20 41 1 0 360 G4_Al 0 0 36.5 log_World norot dead 545
/musr/command construct tubs cryo_4_cyl_b 39 41 61.25 0 360 G4_Al 0 0 98.75 log_World norot dead 546
#
# Back Flange 45
/musr/command construct tubs backFlangeA 30 34.5 1.5 0 360 G4_Al 0 0 22.75 log_World norot dead 240
/musr/command construct tubs backFlangeB 22.5 40.5 1.5 0 360 G4_Al 0 0 25.75 log_World norot dead 241
# Main Holder 45
/musr/command construct tubs mainHolder 30.19 34.19 21.2 0 360 G4_Al 0 0 0 log_World norot dead 250
# SPACER 45
/musr/command construct tubs spacer 29.88 34.5 4.9 0 360 G4_Al 0 0 -26.1 log_World norot dead 260
# MPPC Holder 45
/musr/command construct tubs frontLid1A 16.5 34.5 5.5 0 360 G4_Al 0 0 -36.5 log_World norot dead 270
/musr/command construct tubs frontLid1D 6.0 16.5 1.0 0 360 G4_Al 0 0 -32.0 log_World norot dead 277
#
# Front Flange 45
/musr/command construct tubs frontLid2 6.0 34.5 1.5 0 360 G4_Al 0 0 -43.5 log_World norot dead 290
#
# NOSE EXTENSION
#/musr/command construct tubs noseExtensionA 15 25 2.0 0 360 G4_Al 0 0 -47 log_World norot dead 300
#/musr/command construct tubs noseExtensionB 25 28 126.5 0 360 G4_Al 0 0 -171.5 log_World norot dead 302
#/musr/command construct tubs noseExtensionC 28 41 4.0 0 360 G4_Al 0 0 -294 log_World norot dead 304
#
#
# M COUNTERS AND M COUNTER HOLDER
/musr/command construct tubs M0_holder1 5.5 7.5 3.25 0 360 G4_Al 0 0 -36.31 log_World norot dead 330
/musr/command construct tubs M0_holder2 3.5 5.5 0.75 0 360 G4_PLEXIGLASS 0 0 -37.06 log_World norot dead 333
/musr/command construct tubs M0_holder3 4.0 5.5 0.75 0 360 G4_PLEXIGLASS 0 0 -35.56 log_World norot dead 335
/musr/command construct tubs M0 0 4 0.15 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -36.15 log_World norot musr/ScintSD 102
/musr/command construct tubs M0_electronics 4.0 9 0.85 0 360 G4_POLYCARBONATE 0 0 -40.41 log_World norot dead 337
# TARGET SPACE
#/musr/command construct tubs targetspace 0 5 50 0 360 G4_He 0 0 -20 log_cryostat
# SCINTILLATOR BEFORE TARGET
#/musr/command construct tubs coulombM1 0 3.0 0.1 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2 log_World norot musr/ScintSD 101
# TARGET
/musr/command construct tubs target 0 2.5 0.215 0 360 G4_Ag 0 0 0 log_World norot dead 201
/musr/command construct tubs targetFieldVol 0 0.5 0.015 0 360 G4_Ag 0 0 0 log_target norot dead 202
#/musr/command construct tubs vetoTarget 0 5.0 1. 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 1.220 log_World norot musr/ScintSD 160
#/musr/command construct tubs vetoCyl 5 6.0 3.6 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -1.39 log_World norot musr/ScintSD 161
#/musr/command construct TubeWithTubeHole vetoTarget 7 9 5.1 0 360 8.2 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2.89 log_World norot musr/ScintSD 160
#/musr/command construct TubeWithHoleAndTubeHole vetoTarget 1.5 6 5.1 0 360 4 8.2 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2.89 log_World norot musr/ScintSD 160
/musr/command construct tubs sampleHolder 0 4 31.39 0 360 G4_Ag 0 0 31.61 log_World norot dead 165
/musr/command construct tubs sampleHolder2 0 7.5 108.5 0 360 G4_Ag 0 0 171.5 log_World norot dead 166
#
/musr/command construct box ScintB1 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE 0.00 25.50 -8.75 log_World norot musr/ScintSD 1
/musr/command construct box ScintB2 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE -18.03 18.03 -8.75 log_World matrix1 musr/ScintSD 2
/musr/command construct box ScintB3 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE -25.50 0.00 -8.75 log_World norot musr/ScintSD 3
/musr/command construct box ScintB4 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE -18.03 -18.03 -8.75 log_World matrix1 musr/ScintSD 4
/musr/command construct box ScintB5 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE 0.00 -25.50 -8.75 log_World norot musr/ScintSD 5
/musr/command construct box ScintB6 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE 18.03 -18.03 -8.75 log_World matrix1 musr/ScintSD 6
/musr/command construct box ScintB7 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE 25.50 0.00 -8.75 log_World norot musr/ScintSD 7
/musr/command construct box ScintB8 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE 18.03 18.03 -8.75 log_World matrix1 musr/ScintSD 8
/musr/command construct box ScintF1 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE 0.00 25.50 8.75 log_World norot musr/ScintSD 11
/musr/command construct box ScintF2 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE -18.03 18.03 8.75 log_World matrix1 musr/ScintSD 12
/musr/command construct box ScintF3 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE -25.50 0.00 8.75 log_World norot musr/ScintSD 13
/musr/command construct box ScintF4 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE -18.03 -18.03 8.75 log_World matrix1 musr/ScintSD 14
/musr/command construct box ScintF5 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE 0.00 -25.50 8.75 log_World norot musr/ScintSD 15
/musr/command construct box ScintF6 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE 18.03 -18.03 8.75 log_World matrix1 musr/ScintSD 16
/musr/command construct box ScintF7 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE 25.50 0.00 8.75 log_World norot musr/ScintSD 17
/musr/command construct box ScintF8 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE 18.03 18.03 8.75 log_World matrix1 musr/ScintSD 18
#
/musr/command construct TubeWithHolePlusTubeHole PlexyCyl1 3.5 12.3 4.5 0 360 7 12.5 5 G4_PLEXIGLASS 0 0 -10. log_World matrix2 dead 45
/musr/command construct tubs PlexyCyl2 7.6 12.3 2.5 0 360 G4_PLEXIGLASS 0 0 11.5 log_World norot dead 46
/musr/command construct TubeWithHolePlusTubeHole vetoCyl 2.5 12. 5. 0 360 3.5 12 9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -10.5 log_World matrix2 musr/ScintSD 51
/musr/command construct tubs vetoCylB1 8.25 11.25 4 69.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 61
/musr/command construct tubs vetoCylB2 8.25 11.25 4 114.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 62
/musr/command construct tubs vetoCylB3 8.25 11.25 4 159.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 63
/musr/command construct tubs vetoCylB4 8.25 11.25 4 204.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 64
/musr/command construct tubs vetoCylB5 8.25 11.25 4 249.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 65
/musr/command construct tubs vetoCylB6 8.25 11.25 4 294.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 66
/musr/command construct tubs vetoCylB7 8.25 11.25 4 339.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 67
/musr/command construct tubs vetoCylB8 8.25 11.25 4 24.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 68
/musr/command construct tubs vetoCylF1 8.25 11.25 4 69.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 71
/musr/command construct tubs vetoCylF2 8.25 11.25 4 114.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 72
/musr/command construct tubs vetoCylF3 8.25 11.25 4 159.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 73
/musr/command construct tubs vetoCylF4 8.25 11.25 4 204.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 74
/musr/command construct tubs vetoCylF5 8.25 11.25 4 249.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 75
/musr/command construct tubs vetoCylF6 8.25 11.25 4 294.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 76
/musr/command construct tubs vetoCylF7 8.25 11.25 4 339.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 77
/musr/command construct tubs vetoCylF8 8.25 11.25 4 24.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 78
#
#---------------------------------------------------------
#
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE red
/musr/command visattributes G4_PLEXIGLASS yellow
/musr/command visattributes G4_Pb blue
#/musr/command visattributes log_beampipe invisible
#/musr/command visattributes log_beampipeAshell invisible
#/musr/command visattributes log_beampipeBshell invisible
/musr/command visattributes log_World invisible
/musr/command visattributes log_target yellow
/musr/command visattributes log_magnet invisible
/musr/command visattributes log_mag_wall invisible
#/musr/command visattributes log_magnet yellow
#/musr/command visattributes log_mag_wall yellow
#/musr/command visattributes log_sh0 invisible
#/musr/command visattributes log_sh2 invisible
#/musr/command visattributes log_vetoTarget green
/musr/command visattributes log_vetoCyl green
###################################################################################
######################### M A G N E T I C F I E L D #########################
###################################################################################
# Set magnetic field (set field intensity in T and sigma in mm)
# syntax for magneticfield: fromfile filename fieldValue
# uniform fieldValue
# gaussian fieldValue sigma
#
/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 2D x10cm_z2m.table log_targetFieldVol -10.
/musr/command globalfield setparameter SetLargestAcceptableStep 2
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
/musr/command globalfield printFieldValueAtPoint 0 0 0
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.5
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
#
#/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
/process/msc/StepLimit UseSafety
#/process/msc/LateralDisplacement
/process/msc/RangeFactor 0.04
/process/msc/GeomFactor 2.5
#/process/msc/FactorForAngleLimit
/process/msc/Skin 3.0
#/process/msc/ThetaLimit 0.2 rad
#
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
#
/musr/run/howOftenToPrintEvent 100000
/musr/command maximumRunTimeAllowed 86000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
/vis/disable
#/control/execute visVRML.mac
#/control/execute visFromToni.mac
#/control/execute visDawn14010.mac
#/vis/open VRML2FILE
#/vis/open DAWNFILE
### (if too many tracks cause core dump => storeTrajectory 0)
#/vis/scene/create
#
#/tracking/storeTrajectory 1
#/vis/viewer/set/viewpointThetaPhi 90 0
##/vis/viewer/set/globalLineWidthScale 3
#/vis/viewer/zoom 30
###/vis/scene/add/trajectories
#/vis/drawVolume
#/vis/viewer/flush
####/hits/verbose 2
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
/gun/vertex 0 0 -1000 mm
# FWHM 10mm ==> sigma = 10/2.354 = 4.2481mm
#/gun/vertexsigma 20 20 0 mm
#---/gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed
/gun/vertexboundary 128 -999999 999999 mm
#/gun/momentum 27.0 MeV
# sigma = 3% ==> sigma 27*0.03 = 0.81
#/gun/momentumsmearing 0.81 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#/gun/momentumboundary 20 40 0 MeV
# TURTLE
#/gun/turtlefilename FOR061_2008_04_22.DAT
#/gun/turtlefilename FOR070_2008_10_17_XXII.DAT
#/gun/turtlefilename FOR077_pie3_HiField_d05_x30.dat
#/gun/turtlefilename FOR077_reggiani_Jan2010_NEW.dat
/gun/turtlefilename FOR077_reggiani_Feb2010.dat
#/gun/turtleZ0position -900 mm
#---/gun/tilt: xangle, yangle, dummy
#/gun/tilt 0 0.5 0 deg
#---/gun/tiltsigma: xangleSigma, yangleSigma, dummy (1 degree on 1 meter ~ 17mm)
#/gun/tiltsigma 0.2 0.2 0 deg
#/gun/pitch 0.5 deg
/gun/muonPolarizVector 1 0 0
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
/gun/decaytimelimits 400 410 2197.03 ns
#/gun/decaytimelimits -1 -1 2197.03 ns
###################################################################################
######################## B E A M O N #########################################
###################################################################################
#/run/beamOn 3000000
/run/beamOn 1000
#/run/beamOn 1000000

View File

@@ -1,217 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for the GPD muSR instrument simulation, as the geometry looked like in 2010.
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
###################################################################################
############################# G E O M E T R Y ###################################
###################################################################################
# ROTATION MATRIXES:
/musr/command rotation matrix1 1 0 0 90
/musr/command rotation matrix2 0 1 0 28.81
/musr/command rotation matrix3 0 1 0 151.19
/musr/command rotation matrix4 0 0 1 45
/musr/command rotation matrix5 0 1 0 90
/musr/command rotation matrix6 180 90 90
/musr/command rotation matrix7 0 90 90
# --- WORLD VOLUME ---
/musr/command construct box World 2100 2100 11000 G4_AIR 0 0 0 no_logical_volume norot dead -1
# --- BEAMPIPE ---
/musr/command construct tubs beampipeA 0 2005 4500 0 360 G4_Galactic 0 0 -6100 log_World norot dead 230
/musr/command construct tubs beampipe 0 405 500 0 360 G4_Galactic 0 0 -1100 log_World norot dead 231
/musr/command construct tubs beampipeshell 100 105 500 0 360 G4_Al 0 0 0 log_beampipe norot dead 232
/musr/command construct tubs beampipewindow 0 100 0.05 0 360 G4_MYLAR 0 0 499.9 log_beampipe norot dead 233
# PASSIVE COLLIMATOR (for BEAMPIPE vers.1)
# GPDcollimator - thickness in the thinner location is x2+(x9-x4) = 20+59-59
/musr/command construct GPDcollimator GPDcollimator 40 15 60 59 60.01 0 360 0 59 0 2.5 6 G4_Cu 0 0 -59 log_World matrix1 dead 251
/musr/command construct box Firstcollimator 70 70 15 G4_Pb 0 0 -100 log_World norot dead 255
/musr/command construct box Firstcollimatorhole 2 5 15 G4_Galactic 0 0 0 log_Firstcollimator norot dead 256
/musr/command construct box SecondCollimator 45 75 15 G4_Pb 0 0 -250 log_World norot dead 261
/musr/command construct tubs SecondCollHole 0 8 15 0 360 G4_Galactic 0 0 0 log_SecondCollimator norot dead 262
/musr/command construct box AlumPlate 60 90 5 G4_Al 0 0 -80 log_World norot dead 265
/musr/command construct tubs AlumPlateHole 0 25 5 0 360 G4_Galactic 0 0 0 log_AlumPlate norot dead 267
# --- SAMPLE HOLDER ---
/musr/command construct GPDsampleHolderA GPDsampleHolderA 0 0 0 0 0 G4_Al 0 -111.25 0 log_World matrix1 dead 300
/musr/command construct tubs GPDsampleHolderB 37.51 58 7 0 360 G4_Al 0 57 0 log_World matrix1 dead 301
/musr/command construct tubs GPDsampleHolderC 37.51 58 7 0 360 G4_Al 0 -57 0 log_World matrix1 dead 302
/musr/command construct box GPDsampleHolderD 12 0.5 50 G4_Al 38 0 28 log_World matrix1 dead 303
/musr/command construct box GPDsampleHolderE 12 0.5 50 G4_Al 38 0 -28 log_World matrix1 dead 304
/musr/command construct box GPDsampleHolderF 12 0.5 50 G4_Al -38 0 28 log_World matrix1 dead 305
/musr/command construct box GPDsampleHolderG 12 0.5 50 G4_Al -38 0 -28 log_World matrix1 dead 306
/musr/command construct tubs GPDsampleHolderH 0 9 50 180 50 G4_Al 48 0 29 log_World matrix1 dead 307
/musr/command construct tubs GPDsampleHolderI 0 9 50 130 50 G4_Al 48 0 -29 log_World matrix1 dead 308
/musr/command construct tubs GPDsampleHolderJ 0 9 50 310 50 G4_Al -48 0 29 log_World matrix1 dead 309
/musr/command construct tubs GPDsampleHolderK 0 9 50 0 50 G4_Al -48 0 -29 log_World matrix1 dead 310
#
/musr/command construct tubs GPDsampleHolderW 58.01 58.2 64 25 130 G4_POLYETHYLENE 0 0 0 log_World matrix1 dead 313
/musr/command construct tubs GPDsampleHolderX 58.01 58.2 64 205 130 G4_POLYETHYLENE 0 0 0 log_World matrix1 dead 314
/musr/command construct tubs GPDsampleHolderY 36.79 36.99 64 45 90 G4_POLYETHYLENE 0 0 0 log_World matrix1 dead 315
/musr/command construct tubs GPDsampleHolderZ 36.79 36.99 64 225 90 G4_POLYETHYLENE 0 0 0 log_World matrix1 dead 316
# --- SAMPLE CELL ---
/musr/command construct tubs GPDsampleCell 0 12 50 0 360 G4_Cu 0 0 0 log_World matrix1 dead 211
# --- SAMPLE ---
/musr/command construct tubs target 0 3.5 7 0 360 G4_Cu 0 0 0 log_GPDsampleCell norot dead 201
#/musr/command construct tubs targetFieldVol 0 3.5 7 0 360 G4_Cu 0 0 0 log_GPDsampleCell norot dead 201
# --- SCINTILLATOR ---
/musr/command construct box ScintB1 13 45 2.5 G4_PLASTIC_SC_VINYLTOLUENE 22 0 -40 log_World matrix2 musr/ScintSD 1
/musr/command construct box ScintB2 13 45 2.5 G4_PLASTIC_SC_VINYLTOLUENE -22 0 -40 log_World matrix3 musr/ScintSD 2
/musr/command construct box ScintF1 13 45 2.5 G4_PLASTIC_SC_VINYLTOLUENE -22 0 40 log_World matrix2 musr/ScintSD 11
/musr/command construct box ScintF2 13 45 2.5 G4_PLASTIC_SC_VINYLTOLUENE 22 0 40 log_World matrix3 musr/ScintSD 12
/musr/command construct box ScintF3 7 45 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 46 log_World norot musr/ScintSD 13
#/musr/command construct box KoincB1 20 90 2.5 G4_PLASTIC_SC_VINYLTOLUENE 33 0 -60 log_World matrix2 musr/ScintSD 21
#/musr/command construct box KoincB2 20 90 2.5 G4_PLASTIC_SC_VINYLTOLUENE -33 0 -60 log_World matrix3 musr/ScintSD 22
# --- M0 ---
/musr/command construct box M0 5 5 1.0 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -46 log_World matrix4 musr/ScintSD 102
/musr/command construct GPDmHolder GPDmHolder 5 25 1.0 G4_PLASTIC_SC_VINYLTOLUENE 0 -25 -46 log_World norot dead 103
# --- Magnet ---
/musr/command construct tubs Magnet1 180 375 78 0 360 G4_Cu 133 0 0 log_World matrix5 dead 291
/musr/command construct tubs Magnet2 180 375 78 0 360 G4_Cu -133 0 0 log_World matrix5 dead 292
/musr/command construct uprofile Uprof1 25 10 400 5 G4_Al -45 0 200 log_World matrix6 dead 293
/musr/command construct uprofile Uprof2 25 10 400 5 G4_Al -45 0 -200 log_World matrix6 dead 293
/musr/command construct uprofile Uprof3 25 10 400 5 G4_Al 45 0 200 log_World matrix7 dead 293
/musr/command construct uprofile Uprof4 25 10 400 5 G4_Al 45 0 -200 log_World matrix7 dead 293
#
##---------------------------------------------------------
#/musr/command logicalVolumeToBeReweighted mu log_pbCollimator_1 6
#/musr/command logicalVolumeToBeReweighted mu log_pbCollimator_2 5
#/musr/command logicalVolumeToBeReweighted mu log_activeCollim 4
##---------------------------------------------------------
/musr/command visattributes log_World invisible
/musr/command visattributes log_beampipewindow red
/musr/command visattributes log_GPDsampleHolderD red
/musr/command visattributes log_GPDsampleHolderE red
/musr/command visattributes log_GPDsampleHolderF red
/musr/command visattributes log_GPDsampleHolderG red
/musr/command visattributes log_GPDcollimator green
/musr/command visattributes log_GPDcollimator2 blue
/musr/command visattributes log_GPDmHolder magenta
/musr/command visattributes log_target blue
/musr/command visattributes log_M0 yellow
#/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE red
#/musr/command visattributes G4_Pb blue
####################################################################################
######################### M A G N E T I C F I E L D #########################
###################################################################################
# Set magnetic field (set field intensity in T and sigma in mm)
# syntax for magneticfield: fromfile filename fieldValue
# uniform fieldValue
# gaussian fieldValue sigma
#
/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 2D GPD_coil_primitive.table log_target 0.03
/musr/command globalfield setparameter SetLargestAcceptableStep 200
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
/musr/command globalfield printFieldValueAtPoint 0 0 0
/musr/command globalfield printFieldValueAtPoint 0 0 10
/musr/command globalfield printFieldValueAtPoint 0 0 20
/musr/command globalfield printFieldValueAtPoint 0 0 30
/musr/command globalfield printFieldValueAtPoint 0 0 50
/musr/command globalfield printFieldValueAtPoint 0 0 100
/musr/command globalfield printFieldValueAtPoint 0 0 200
/musr/command globalfield printFieldValueAtPoint 0 0 300
/musr/command globalfield printFieldValueAtPoint 0 0 400
/musr/command globalfield printFieldValueAtPoint 0 0 500
/musr/command globalfield printFieldValueAtPoint 10 0 0
/musr/command globalfield printFieldValueAtPoint 100 0 0
/musr/command globalfield printFieldValueAtPoint 300 0 0
/musr/command globalfield printFieldValueAtPoint 0 10 0
/musr/command globalfield printFieldValueAtPoint 0 100 0
/musr/command globalfield printFieldValueAtPoint 0 300 0
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.4
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
#/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
/process/msc/StepLimit UseSafety
#/process/msc/LateralDisplacement
/process/msc/RangeFactor 0.04
/process/msc/GeomFactor 2.5
#/process/msc/FactorForAngleLimit
/process/msc/Skin 3.0
#/process/msc/ThetaLimit 0.2 rad
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 10
#
#/musr/run/howOftenToPrintEvent 10
/musr/command maximumRunTimeAllowed 220000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
/musr/command rootOutput nOptPhot off
/musr/command rootOutput odet_ID off
/musr/command rootOutput odet_nPhot off
/musr/command rootOutput odet_timeFirst off
/musr/command rootOutput odet_timeA off
/musr/command rootOutput odet_timeB off
/musr/command rootOutput odet_timeC off
/musr/command rootOutput odet_timeD off
/musr/command rootOutput odet_timeE off
/musr/command rootOutput odet_timeLast off
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
#/vis/disable
/control/execute vis.mac
#/control/execute visVRML.mac
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
/gun/vertex 0 0 -1000 mm
/gun/vertexsigma 25 25 0 mm
#---/gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed
/gun/vertexboundary 100 -999999 999999 mm
/gun/momentum 100.0 MeV
# sigma = 3% ==> sigma 27*0.03 = 0.81
/gun/momentumsmearing 3.00 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 on 1 meter ~ 17mm)
/gun/tiltsigma 0.15 0.15 0 deg
/gun/pitch 0.08 deg
/gun/muonPolarizVector 0 0 -1
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
/gun/decaytimelimits -1 -1 2197.03 ns
###################################################################################
######################## B E A M O N #########################################
###################################################################################
#/run/beamOn 8000000
/run/beamOn 10

View File

@@ -1,344 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for muSR instrument simulations
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
###################################################################################
############################# G E O M E T R Y ###################################
###################################################################################
# ROTATION MATRIXES:
/musr/command rotation matrix1 0 0 45
/musr/command rotation matrix2 0 180 0
/musr/command rotation matrix3 0 270 0
#/musr/command rotation matrix3 90 90
/musr/command arrayDef zPlaneGPSveto 12 0. 5. 91. 105. 115. 125. 135. 145. 155. 168.49 168.5 172.5
/musr/command arrayDef rInnerGPSveto 12 10. 11. 31. 31. 28.75 24.8. 19.7 14 10.3 9. 0. 0.
/musr/command arrayDef rOuterGPSveto 12 12.5 15.11 35.11 35. 32.85 29.1 24.2 18.6 14.6 13.2 13.0 13.0
# Rotation "fieldRot 0 0.57295 0" corresponds to 10 mrad (2.5mm/25cm) tilt of the magnetic field
#/musr/command rotation fieldRot 0 0.57295 0
#/musr/command rotation fieldRot 0 1.1459 0
# WORLD VOLUME
/musr/command construct box World 300 300 2000 G4_Galactic 0 0 0 no_logical_volume norot dead -1
# ---- BEAMPIPE vers. 1 (ALC-like)
#/musr/command construct tubs beampipe 0 34 810 0 360 G4_Galactic 0 0 -840 log_World norot dead 232
#/musr/command construct tubs beampipeshell 34 36 810 0 360 G4_Al 0 0 -840 log_World norot dead 231
# PASSIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs pbCollimator_1 16.5 34 25 0 360 G4_Pb 0 0 540 log_beampipe norot dead 241
# ACTIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs activeCollim 2.5 34. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -27 log_World norot musr/ScintSD 150
#
# ---- BEAMPIPE vers. 2 (SEGMENTED and BROAD, small section 30cm long)
#/musr/command construct tubs beampipeA 0 128 500 0 360 G4_Galactic 0 0 -800 log_World norot dead 232
#/musr/command construct tubs beampipeAshell 128 130 500 0 360 G4_Al 0 0 -800 log_World norot dead 231
#/musr/command construct tubs beampipeB 0 34 135 0 360 G4_Galactic 0 0 -165 log_World norot dead 234
#/musr/command construct tubs beampipeBshell 34 36 135 0 360 G4_Al 0 0 -165 log_World norot dead 233
# PASSIVE COLLIMATOR (for BEAMPIPE vers.2)
#/musr/command construct tubs pbCollimator_1 34 128 25 0 360 G4_Pb 0 0 475 log_beampipeA norot dead 241
#/musr/command construct tubs pbCollimator_2 16.5 34 25 0 360 G4_Pb 0 0 65 log_beampipeB norot dead 242
# ACTIVE COLLIMATOR (for BEAMPIPE vers.2)
#/musr/command construct tubs activeCollim 2.5 36. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -27 log_World norot musr/ScintSD 150
#
# ---- BEAMPIPE vers. 3 (SEGMENTED and BROAD, small section 50cm long)
#/musr/command construct tubs beampipeA 0 128 400 0 360 G4_Galactic 0 0 -900 log_World norot dead 232
#/musr/command construct tubs beampipeAshell 128 130 400 0 360 G4_Al 0 0 -900 log_World norot dead 231
#/musr/command construct tubs beampipeB 0 34 230 0 360 G4_Galactic 0 0 -270 log_World norot dead 234
#/musr/command construct tubs beampipeBshell 34 36 230 0 360 G4_Al 0 0 -270 log_World norot dead 233
# PASSIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs pbCollimator_1 20 128 15 0 360 G4_Pb 0 0 385 log_beampipeA norot dead 241
#/musr/command construct cons pbCollimator_2 122 128 34 128 70 0 360 G4_Pb 0 0 300 log_beampipeA norot dead 242
#/musr/command construct tubs pbCollimator_11 2.5 34 15 0 360 G4_Pb 0 0 215 log_beampipeB norot dead 245
#/musr/command construct cons pbCollimator_12 32 34 2.5 34 25 0 360 G4_Pb 0 0 175 log_beampipeB norot dead 246
# ACTIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs activeCollim 2.5 5. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -31 log_World norot musr/ScintSD 150
#/musr/command construct tubs activeCollimB 5. 10. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -31 log_World norot musr/ScintSD 151
#/musr/command construct tubs activeCollimC 10. 36. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -31 log_World norot musr/ScintSD 152
#
# OLD ALC BEAMPIPE
# OLD ALC DESIGN: MSR 20.05.082 Tube
/musr/command construct tubs tube 35.45 38.05 315 0 360 Steel 0 0 -613 log_World norot dead 8201
/musr/command construct tubs tube_a 0 35.45 315 0 360 G4_Galactic 0 0 -613 log_World norot dead 8251
# SECOND COLLIMATOR
/musr/command construct tubs shield_collimatorA2 10 35 25 0 360 G4_Cu 0 0 290 log_tube_a norot dead 341
# OLD ALC DESIGN: MSR 20.05.083 Flange
/musr/command construct tubs flange 38.05 90 6 0 360 Steel 0 0 -934 log_World norot dead 8301
# ----
# POSITRON COUNTERS
/musr/command construct GPSforward forwardCounter 25 25 2.5 12.51 15.12 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 1
/musr/command construct GPSbackward backwardCounter 30 30 2.5 8.80 7.64 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -30.0 log_World norot musr/ScintSD 2
/musr/command construct box up 2.5 40 45 G4_PLASTIC_SC_VINYLTOLUENE 40 0 0. log_World norot musr/ScintSD 3
/musr/command construct box down 2.5 40 45 G4_PLASTIC_SC_VINYLTOLUENE -40 0 0. log_World norot musr/ScintSD 4
/musr/command construct box rite 45 2.5 60 G4_PLASTIC_SC_VINYLTOLUENE 0 -54.5 0 log_World norot musr/ScintSD 5
#/musr/command construct box up 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE 57.5 0 0.log_World norot musr/ScintSD 3
#/musr/command construct box down 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE -57.5 0 0.log_World norot musr/ScintSD 4
#/musr/command construct box rite1 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 -38 log_World norot musr/ScintSD 5
#/musr/command construct box rite2 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 38 log_World norot musr/ScintSD 6
#/musr/command construct box rite3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 -51.25 0 log_World norot musr/ScintSD 7
#/musr/command construct box left1 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 -48.3 log_World norot musr/ScintSD 8
#/musr/command construct box left2 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 48.3 log_World norot musr/ScintSD 9
#/musr/command construct box left3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 53.75 0 log_World norot musr/ScintSD 10
# FORWARD VETO
/musr/command construct polyconeA forwardVeto 0 360 12 zPlaneGPSveto rInnerGPSveto rOuterGPSveto G4_PLASTIC_SC_VINYLTOLUENE 0 0 24 log_World norot musr/ScintSD 51
# BACKWARD VETO
/musr/command construct GPSbackwardVeto backwardVeto 35.13 7.63 35.13 7.63 60 31 3.5 31 3.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -87.5 log_World norot musr/ScintSD 52
#---------------------
# OUTER SHIELD
/musr/command construct tubeWithWindows tube1 20 21 33.5 14.5 33.5 14.5 33.5 G4_Cu 0 0 0 log_World matrix3 dead 401
/musr/command construct tubs bottom1 0 20 0.5 0 360 G4_Cu 0 -33.0 0 log_World matrix3 dead 402
/musr/command construct tubs window1 21 21.010 15 0 360 G4_Cu 0 0 0 log_World matrix3 dead 403
/musr/command construct tubs bottom1a 0 20 0.5 0 360 G4_Cu 0 33.0 0 log_World matrix3 dead 404
# INNER SHIELD
/musr/command construct tubeWithWindows tube2 11.5 12.5 21.5 7.5 21.5 10. 21.5 G4_Cu 0 0 0 log_World matrix3 dead 411
/musr/command construct tubs bottom2 0 11.5 3.0 0 360 G4_Cu 0 -21.5 0 log_World matrix3 dead 412
/musr/command construct tubs window2 12.5 12.510 8 0 360 G4_Cu 0 0 0 log_World matrix3 dead 413
/musr/command construct tubs bottom2a 0 11.5 3.0 0 360 G4_Cu 0 21.5 0 log_World matrix3 dead 414
# HEATER
/musr/command construct tubs heater 16 16.3 7.5 0 360 G4_Cu 0 -18.5 0 log_World matrix3 dead 415
#
#---------------------
# MAGNET
#/musr/command construct tubs magnet 44.4 100 150 0 360 G4_He 0 0 0 log_World norot dead 221
# MAGNET WALL
#/musr/command construct tubs mag_wall 44.4 46.5 150 0 360 G4_Cu 0 0 0 log_magnet norot dead 222
# MAGNET VOLUME TO DELETE TRACKS
#/musr/command construct tubs sh0 46.5 100 150 0 360 G4_Cu 0 0 0 log_magnet norot dead 223
# SHIELD TO DELETE TRACKS
#/musr/command construct tubs shield1 36 100 5 0 360 G4_AIR 0 0 -105 log_World norot dead -2
#/musr/command construct tubs sh2 0 100 5 0 360 G4_AIR 0 0 205 log_World norot dead -3
# NOSE EXTENSION
#/musr/command construct tubs noseExtensionA 15 25 2.0 0 360 G4_Al 0 0 -47 log_World norot dead 300
#/musr/command construct tubs noseExtensionB 25 28 126.5 0 360 G4_Al 0 0 -171.5 log_World norot dead 302
#/musr/command construct tubs noseExtensionC 28 41 4.0 0 360 G4_Al 0 0 -294 log_World norot dead 304
#
# COLLIMATOR
#/musr/command construct tubs collimatorA 2.5 25 15 0 360 G4_Pb 0 0 -64 log_World norot dead 310
#/musr/command construct tubs collimatorB 3.5 25 10 0 360 G4_Pb 0 0 -89 log_World norot dead 312
#/musr/command construct tubs collimatorC 5.0 25 10 0 360 G4_Pb 0 0 -109 log_World norot dead 314
#
# M COUNTERS AND M COUNTER HOLDER
#/musr/command construct tubs M0_holder1 5.5 7.5 3.25 0 360 G4_Al 0 0 -36.31 log_World norot dead 330
#/musr/command construct tubs M0_holder2 3.5 5.5 0.75 0 360 G4_PLEXIGLASS 0 0 -37.06 log_World norot dead 333
#/musr/command construct tubs M0_holder3 4.0 5.5 0.75 0 360 G4_PLEXIGLASS 0 0 -35.56 log_World norot dead 335
/musr/command construct tubs M0 0 7.5 0.15 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -25.0 log_World norot musr/ScintSD 102
#/musr/command construct tubs M0_electronics 4.0 9 0.85 0 360 G4_POLYCARBONATE 0 0 -40.41 log_World norot dead 337
#
# TARGET SPACE
#/musr/command construct tubs targetspace 0 5 50 0 360 G4_He 0 0 -20 log_cryostat
# SCINTILLATOR BEFORE TARGET
#/musr/command construct tubs coulombM1 0 3.0 0.1 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2 log_World norot musr/ScintSD 101
# TARGET
/musr/command construct tubs target 0 4.0 0.215 0 360 G4_Ag 0 0 0 log_World norot dead 201
/musr/command construct tubs targetFieldVol 0 0.5 0.015 0 360 G4_Ag 0 0 0 log_target norot dead 202
#/musr/command construct tubs vetoTarget 0 5.0 1. 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 1.220 log_World norot musr/ScintSD 160
#/musr/command construct tubs vetoCyl 5 6.0 3.6 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -1.39 log_World norot musr/ScintSD 161
#/musr/command construct TubeWithTubeHole vetoTarget 7 9 5.1 0 360 8.2 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2.89 log_World norot musr/ScintSD 160
#/musr/command construct TubeWithHoleAndTubeHole vetoTarget 1.5 6 5.1 0 360 4 8.2 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2.89 log_World norot musr/ScintSD 160
#/musr/command construct tubs sampleHolder 0 4 31.39 0 360 G4_Ag 0 0 31.61 log_World norot dead 165
#/musr/command construct tubs sampleHolder2 0 7.5 108.5 0 360 G4_Ag 0 0 171.5 log_World norot dead 166
#
#/musr/command construct TubeWithHolePlusTubeHole PlexyCyl1 4 12.5 4.5 0 360 7 12.5 5 G4_PLEXIGLASS 0 0 -10. log_World matrix2 dead 45
#/musr/command construct tubs PlexyCyl2 7.5 12.5 2 0 360 G4_PLEXIGLASS 0 0 12.5 log_World norot dead 46
#/musr/command construct TubeWithHolePlusTubeHole vetoCyl 2.5 12. 5. 0 360 4 12 9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -10.5 log_World matrix2 musr/ScintSD 51
#/musr/command construct tubs vetoCylA 8.0 12.0 10 91 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 61
#/musr/command construct tubs vetoCylB 8.0 12.0 10 181 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 62
#/musr/command construct tubs vetoCylC 8.0 12.0 10 271 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 63
#/musr/command construct tubs vetoCylD 8.0 12.0 10 1 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 64
#
#---------------------------------------------------------
#/musr/command region define goulombRegion log_target
#/musr/command region define goulombRegion log_M0
#/musr/command region setProductionCut goulombRegion 0.01 0.01 0.01
#---------------------------------------------------------
#/musr/command logicalVolumeToBeReweighted mu log_pbCollimator_1 6
#/musr/command logicalVolumeToBeReweighted mu log_pbCollimator_2 5
#/musr/command logicalVolumeToBeReweighted mu log_activeCollim 4
#---------------------------------------------------------
#
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE red
/musr/command visattributes G4_PLEXIGLASS yellow
/musr/command visattributes G4_Pb blue
#/musr/command visattributes log_beampipe invisible
#/musr/command visattributes log_beampipeAshell invisible
#/musr/command visattributes log_beampipeBshell invisible
/musr/command visattributes log_World invisible
/musr/command visattributes log_target yellow
#/musr/command visattributes log_magnet invisible
#/musr/command visattributes log_mag_wall invisible
#/musr/command visattributes log_magnet yellow
#/musr/command visattributes log_mag_wall yellow
#/musr/command visattributes log_sh0 invisible
#/musr/command visattributes log_sh2 invisible
#/musr/command visattributes log_vetoTarget green
#/musr/command visattributes log_vetoCyl green
###################################################################################
######################### M A G N E T I C F I E L D #########################
###################################################################################
# Set magnetic field (set field intensity in T and sigma in mm)
# syntax for magneticfield: fromfile filename fieldValue
# uniform fieldValue
# gaussian fieldValue sigma
#
/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 2D GPS_6kG_yAx_xRad_cgs.table log_targetFieldVol 0.005
/musr/command globalfield setparameter SetLargestAcceptableStep 2
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
/musr/command globalfield printFieldValueAtPoint 0 0 10
/musr/command globalfield printFieldValueAtPoint 0 0 -10
/musr/command globalfield printFieldValueAtPoint 0 10 10
/musr/command globalfield printFieldValueAtPoint 10 0 10
/musr/command globalfield printFieldValueAtPoint -10 0 10
/musr/command globalfield printFieldValueAtPoint 10 10 10
/musr/command globalfield printFieldValueAtPoint 40 40 100
/musr/command globalfield printFieldValueAtPoint 40 40 900
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.3
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
#
#/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
/process/msc/StepLimit UseSafety
#/process/msc/LateralDisplacement
/process/msc/RangeFactor 0.04
/process/msc/GeomFactor 2.5
#/process/msc/FactorForAngleLimit
/process/msc/Skin 3.0
#/process/msc/ThetaLimit 0.2 rad
#
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
#/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
#
/musr/run/howOftenToPrintEvent 100000
/musr/command maximumRunTimeAllowed 86000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
/musr/command rootOutput det_edep_el off
/musr/command rootOutput det_edep_pos off
/musr/command rootOutput det_edep_gam off
/musr/command rootOutput det_edep_mup off
/musr/command rootOutput det_nsteps off
/musr/command rootOutput det_length off
/musr/command rootOutput det_time_end off
/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
/musr/command rootOutput odet_ID off
/musr/command rootOutput odet_nPhot off
/musr/command rootOutput odet_timeFirst off
/musr/command rootOutput odet_timeSecond off
/musr/command rootOutput odet_timeThird off
/musr/command rootOutput odet_timeA off
/musr/command rootOutput odet_timeB off
/musr/command rootOutput odet_timeC off
/musr/command rootOutput odet_timeD off
/musr/command rootOutput odet_timeMean off
/musr/command rootOutput odet_timeLast off
/musr/command rootOutput odet_timeCFD off
/musr/command rootOutput odet_amplCFD off
/musr/command rootOutput nOptPhot off
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
/vis/disable
#/control/execute visVRML.mac
#/control/execute visFromToni.mac
#/control/execute visDawn50001.mac
#/vis/open VRML2FILE
#/vis/open DAWNFILE
### (if too many tracks cause core dump => storeTrajectory 0)
#/vis/scene/create
#
#/tracking/storeTrajectory 1
#/vis/viewer/set/viewpointThetaPhi 90 0
##/vis/viewer/set/globalLineWidthScale 3
#/vis/viewer/zoom 30
###/vis/scene/add/trajectories
#/vis/drawVolume
#/vis/viewer/flush
####/hits/verbose 2
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
/gun/vertex 0 0 -1000 mm
# FWHM 10mm ==> sigma = 10/2.354 = 4.2481mm
#/gun/vertexsigma 20 20 0 mm
#---/gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed
/gun/vertexboundary 128 -999999 999999 mm
#/gun/momentum 27.0 MeV
# sigma = 3% ==> sigma 27*0.03 = 0.81
#/gun/momentumsmearing 0.81 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#/gun/momentumboundary 20 40 0 MeV
# TURTLE
#/gun/turtlefilename FOR061_2008_04_22.DAT
#/gun/turtlefilename FOR070_2008_10_17_XXII.DAT
#/gun/turtlefilename FOR077_pie3_HiField_d05_x30.dat
#/gun/turtlefilename FOR077_reggiani_Jan2010_NEW.dat
/gun/turtlefilename FOR077_reggiani_Feb2010.dat
#/gun/turtleZ0position -900 mm
#---/gun/tilt: xangle, yangle, dummy
#/gun/tilt 0 0.5 0 deg
#---/gun/tiltsigma: xangleSigma, yangleSigma, dummy (1 degree on 1 meter ~ 17mm)
#/gun/tiltsigma 0.2 0.2 0 deg
#/gun/pitch 0.5 deg
# Spin rotated by 50 degrees upwards:
/gun/muonPolarizVector 0.766043969 0. -0.642788174
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#/gun/decaytimelimits 400 410 2197.03 ns
/gun/decaytimelimits -1 -1 2197.03 ns
###################################################################################
######################## B E A M O N #########################################
###################################################################################
#/run/beamOn 3000000
#/run/beamOn 10
/run/beamOn 10000000

View File

@@ -1,341 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for muSR instrument simulations
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
###################################################################################
############################# G E O M E T R Y ###################################
###################################################################################
# ROTATION MATRIXES:
/musr/command rotation matrix1 0 0 45
/musr/command rotation matrix2 0 180 0
/musr/command rotation matrix3 0 270 0
#/musr/command rotation matrix3 90 90
/musr/command arrayDef zPlaneGPSveto 12 0. 5. 91. 105. 115. 125. 135. 145. 155. 168.49 168.5 172.5
/musr/command arrayDef rInnerGPSveto 12 10. 11. 31. 31. 28.75 24.8. 19.7 14 10.3 9. 0. 0.
/musr/command arrayDef rOuterGPSveto 12 12.5 15.11 35.11 35. 32.85 29.1 24.2 18.6 14.6 13.2 13.0 13.0
# Rotation "fieldRot 0 0.57295 0" corresponds to 10 mrad (2.5mm/25cm) tilt of the magnetic field
#/musr/command rotation fieldRot 0 0.57295 0
#/musr/command rotation fieldRot 0 1.1459 0
# WORLD VOLUME
/musr/command construct box World 300 300 2000 G4_Galactic 0 0 0 no_logical_volume norot dead -1
# ---- BEAMPIPE vers. 1 (ALC-like)
#/musr/command construct tubs beampipe 0 34 810 0 360 G4_Galactic 0 0 -840 log_World norot dead 232
#/musr/command construct tubs beampipeshell 34 36 810 0 360 G4_Al 0 0 -840 log_World norot dead 231
# PASSIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs pbCollimator_1 16.5 34 25 0 360 G4_Pb 0 0 540 log_beampipe norot dead 241
# ACTIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs activeCollim 2.5 34. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -27 log_World norot musr/ScintSD 150
#
# ---- BEAMPIPE vers. 2 (SEGMENTED and BROAD, small section 30cm long)
#/musr/command construct tubs beampipeA 0 128 500 0 360 G4_Galactic 0 0 -800 log_World norot dead 232
#/musr/command construct tubs beampipeAshell 128 130 500 0 360 G4_Al 0 0 -800 log_World norot dead 231
#/musr/command construct tubs beampipeB 0 34 135 0 360 G4_Galactic 0 0 -165 log_World norot dead 234
#/musr/command construct tubs beampipeBshell 34 36 135 0 360 G4_Al 0 0 -165 log_World norot dead 233
# PASSIVE COLLIMATOR (for BEAMPIPE vers.2)
#/musr/command construct tubs pbCollimator_1 34 128 25 0 360 G4_Pb 0 0 475 log_beampipeA norot dead 241
#/musr/command construct tubs pbCollimator_2 16.5 34 25 0 360 G4_Pb 0 0 65 log_beampipeB norot dead 242
# ACTIVE COLLIMATOR (for BEAMPIPE vers.2)
#/musr/command construct tubs activeCollim 2.5 36. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -27 log_World norot musr/ScintSD 150
#
# ---- BEAMPIPE vers. 3 (SEGMENTED and BROAD, small section 50cm long)
#/musr/command construct tubs beampipeA 0 128 400 0 360 G4_Galactic 0 0 -900 log_World norot dead 232
#/musr/command construct tubs beampipeAshell 128 130 400 0 360 G4_Al 0 0 -900 log_World norot dead 231
#/musr/command construct tubs beampipeB 0 34 230 0 360 G4_Galactic 0 0 -270 log_World norot dead 234
#/musr/command construct tubs beampipeBshell 34 36 230 0 360 G4_Al 0 0 -270 log_World norot dead 233
# PASSIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs pbCollimator_1 20 128 15 0 360 G4_Pb 0 0 385 log_beampipeA norot dead 241
#/musr/command construct cons pbCollimator_2 122 128 34 128 70 0 360 G4_Pb 0 0 300 log_beampipeA norot dead 242
#/musr/command construct tubs pbCollimator_11 2.5 34 15 0 360 G4_Pb 0 0 215 log_beampipeB norot dead 245
#/musr/command construct cons pbCollimator_12 32 34 2.5 34 25 0 360 G4_Pb 0 0 175 log_beampipeB norot dead 246
# ACTIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs activeCollim 2.5 5. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -31 log_World norot musr/ScintSD 150
#/musr/command construct tubs activeCollimB 5. 10. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -31 log_World norot musr/ScintSD 151
#/musr/command construct tubs activeCollimC 10. 36. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -31 log_World norot musr/ScintSD 152
#
# OLD ALC BEAMPIPE
# OLD ALC DESIGN: MSR 20.05.082 Tube
/musr/command construct tubs tube 35.45 38.05 315 0 360 Steel 0 0 -613 log_World norot dead 8201
/musr/command construct tubs tube_a 0 35.45 315 0 360 G4_Galactic 0 0 -613 log_World norot dead 8251
# SECOND COLLIMATOR
/musr/command construct tubs shield_collimatorA2 10 35 25 0 360 G4_Cu 0 0 290 log_tube_a norot dead 341
# OLD ALC DESIGN: MSR 20.05.083 Flange
/musr/command construct tubs flange 38.05 90 6 0 360 Steel 0 0 -934 log_World norot dead 8301
# ----
# POSITRON COUNTERS
/musr/command construct GPSforward forwardCounter 25 25 2.5 12.51 15.12 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 1
/musr/command construct GPSbackward backwardCounter 30 30 2.5 8.80 7.64 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -30.0 log_World norot musr/ScintSD 2
/musr/command construct box up 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE 57.5 0 0.log_World norot musr/ScintSD 3
/musr/command construct box down 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE -57.5 0 0.log_World norot musr/ScintSD 4
/musr/command construct box rite1 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 -38 log_World norot musr/ScintSD 5
/musr/command construct box rite2 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 38 log_World norot musr/ScintSD 6
/musr/command construct box rite3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 -51.25 0 log_World norot musr/ScintSD 7
/musr/command construct box left1 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 -48.3 log_World norot musr/ScintSD 8
/musr/command construct box left2 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 48.3 log_World norot musr/ScintSD 9
/musr/command construct box left3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 53.75 0 log_World norot musr/ScintSD 10
# FORWARD VETO
/musr/command construct polyconeA forwardVeto 0 360 12 zPlaneGPSveto rInnerGPSveto rOuterGPSveto G4_PLASTIC_SC_VINYLTOLUENE 0 0 24 log_World norot musr/ScintSD 51
# BACKWARD VETO
/musr/command construct GPSbackwardVeto backwardVeto 35.13 7.63 35.13 7.63 60 31 3.5 31 3.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -87.5 log_World norot musr/ScintSD 52
#---------------------
# OUTER SHIELD
/musr/command construct tubeWithWindows tube1 20 21 33.5 14.5 33.5 14.5 33.5 G4_Cu 0 0 0 log_World matrix3 dead 401
/musr/command construct tubs bottom1 0 20 0.5 0 360 G4_Cu 0 -33.0 0 log_World matrix3 dead 402
/musr/command construct tubs window1 21 21.010 15 0 360 G4_Cu 0 0 0 log_World matrix3 dead 403
/musr/command construct tubs bottom1a 0 20 0.5 0 360 G4_Cu 0 33.0 0 log_World matrix3 dead 404
# INNER SHIELD
/musr/command construct tubeWithWindows tube2 11.5 12.5 21.5 7.5 21.5 10. 21.5 G4_Cu 0 0 0 log_World matrix3 dead 411
/musr/command construct tubs bottom2 0 11.5 3.0 0 360 G4_Cu 0 -21.5 0 log_World matrix3 dead 412
/musr/command construct tubs window2 12.5 12.510 8 0 360 G4_Cu 0 0 0 log_World matrix3 dead 413
/musr/command construct tubs bottom2a 0 11.5 3.0 0 360 G4_Cu 0 21.5 0 log_World matrix3 dead 414
# HEATER
/musr/command construct tubs heater 16 16.3 7.5 0 360 G4_Cu 0 -18.5 0 log_World matrix3 dead 415
#
#---------------------
# MAGNET
#/musr/command construct tubs magnet 44.4 100 150 0 360 G4_He 0 0 0 log_World norot dead 221
# MAGNET WALL
#/musr/command construct tubs mag_wall 44.4 46.5 150 0 360 G4_Cu 0 0 0 log_magnet norot dead 222
# MAGNET VOLUME TO DELETE TRACKS
#/musr/command construct tubs sh0 46.5 100 150 0 360 G4_Cu 0 0 0 log_magnet norot dead 223
# SHIELD TO DELETE TRACKS
#/musr/command construct tubs shield1 36 100 5 0 360 G4_AIR 0 0 -105 log_World norot dead -2
#/musr/command construct tubs sh2 0 100 5 0 360 G4_AIR 0 0 205 log_World norot dead -3
# NOSE EXTENSION
#/musr/command construct tubs noseExtensionA 15 25 2.0 0 360 G4_Al 0 0 -47 log_World norot dead 300
#/musr/command construct tubs noseExtensionB 25 28 126.5 0 360 G4_Al 0 0 -171.5 log_World norot dead 302
#/musr/command construct tubs noseExtensionC 28 41 4.0 0 360 G4_Al 0 0 -294 log_World norot dead 304
#
# COLLIMATOR
#/musr/command construct tubs collimatorA 2.5 25 15 0 360 G4_Pb 0 0 -64 log_World norot dead 310
#/musr/command construct tubs collimatorB 3.5 25 10 0 360 G4_Pb 0 0 -89 log_World norot dead 312
#/musr/command construct tubs collimatorC 5.0 25 10 0 360 G4_Pb 0 0 -109 log_World norot dead 314
#
# M COUNTERS AND M COUNTER HOLDER
#/musr/command construct tubs M0_holder1 5.5 7.5 3.25 0 360 G4_Al 0 0 -36.31 log_World norot dead 330
#/musr/command construct tubs M0_holder2 3.5 5.5 0.75 0 360 G4_PLEXIGLASS 0 0 -37.06 log_World norot dead 333
#/musr/command construct tubs M0_holder3 4.0 5.5 0.75 0 360 G4_PLEXIGLASS 0 0 -35.56 log_World norot dead 335
/musr/command construct tubs M0 0 7.5 0.15 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -25.0 log_World norot musr/ScintSD 102
#/musr/command construct tubs M0_electronics 4.0 9 0.85 0 360 G4_POLYCARBONATE 0 0 -40.41 log_World norot dead 337
#
# TARGET SPACE
#/musr/command construct tubs targetspace 0 5 50 0 360 G4_He 0 0 -20 log_cryostat
# SCINTILLATOR BEFORE TARGET
#/musr/command construct tubs coulombM1 0 3.0 0.1 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2 log_World norot musr/ScintSD 101
# TARGET
/musr/command construct tubs target 0 4.0 0.215 0 360 G4_Ag 0 0 0 log_World norot dead 201
/musr/command construct tubs targetFieldVol 0 0.5 0.015 0 360 G4_Ag 0 0 0 log_target norot dead 202
#/musr/command construct tubs vetoTarget 0 5.0 1. 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 1.220 log_World norot musr/ScintSD 160
#/musr/command construct tubs vetoCyl 5 6.0 3.6 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -1.39 log_World norot musr/ScintSD 161
#/musr/command construct TubeWithTubeHole vetoTarget 7 9 5.1 0 360 8.2 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2.89 log_World norot musr/ScintSD 160
#/musr/command construct TubeWithHoleAndTubeHole vetoTarget 1.5 6 5.1 0 360 4 8.2 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2.89 log_World norot musr/ScintSD 160
#/musr/command construct tubs sampleHolder 0 4 31.39 0 360 G4_Ag 0 0 31.61 log_World norot dead 165
#/musr/command construct tubs sampleHolder2 0 7.5 108.5 0 360 G4_Ag 0 0 171.5 log_World norot dead 166
#
#/musr/command construct TubeWithHolePlusTubeHole PlexyCyl1 4 12.5 4.5 0 360 7 12.5 5 G4_PLEXIGLASS 0 0 -10. log_World matrix2 dead 45
#/musr/command construct tubs PlexyCyl2 7.5 12.5 2 0 360 G4_PLEXIGLASS 0 0 12.5 log_World norot dead 46
#/musr/command construct TubeWithHolePlusTubeHole vetoCyl 2.5 12. 5. 0 360 4 12 9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -10.5 log_World matrix2 musr/ScintSD 51
#/musr/command construct tubs vetoCylA 8.0 12.0 10 91 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 61
#/musr/command construct tubs vetoCylB 8.0 12.0 10 181 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 62
#/musr/command construct tubs vetoCylC 8.0 12.0 10 271 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 63
#/musr/command construct tubs vetoCylD 8.0 12.0 10 1 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 64
#
#---------------------------------------------------------
#/musr/command region define goulombRegion log_target
#/musr/command region define goulombRegion log_M0
#/musr/command region setProductionCut goulombRegion 0.01 0.01 0.01
#---------------------------------------------------------
#/musr/command logicalVolumeToBeReweighted mu log_pbCollimator_1 6
#/musr/command logicalVolumeToBeReweighted mu log_pbCollimator_2 5
#/musr/command logicalVolumeToBeReweighted mu log_activeCollim 4
#---------------------------------------------------------
#
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE red
/musr/command visattributes G4_PLEXIGLASS yellow
/musr/command visattributes G4_Pb blue
#/musr/command visattributes log_beampipe invisible
#/musr/command visattributes log_beampipeAshell invisible
#/musr/command visattributes log_beampipeBshell invisible
/musr/command visattributes log_World invisible
/musr/command visattributes log_target yellow
#/musr/command visattributes log_magnet invisible
#/musr/command visattributes log_mag_wall invisible
#/musr/command visattributes log_magnet yellow
#/musr/command visattributes log_mag_wall yellow
#/musr/command visattributes log_sh0 invisible
#/musr/command visattributes log_sh2 invisible
#/musr/command visattributes log_vetoTarget green
#/musr/command visattributes log_vetoCyl green
###################################################################################
######################### M A G N E T I C F I E L D #########################
###################################################################################
# Set magnetic field (set field intensity in T and sigma in mm)
# syntax for magneticfield: fromfile filename fieldValue
# uniform fieldValue
# gaussian fieldValue sigma
#
/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 2D GPS_6kG_yAx_xRad_cgs.table log_targetFieldVol 0.005
/musr/command globalfield setparameter SetLargestAcceptableStep 2
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
/musr/command globalfield printFieldValueAtPoint 0 0 10
/musr/command globalfield printFieldValueAtPoint 0 0 -10
/musr/command globalfield printFieldValueAtPoint 0 10 10
/musr/command globalfield printFieldValueAtPoint 10 0 10
/musr/command globalfield printFieldValueAtPoint -10 0 10
/musr/command globalfield printFieldValueAtPoint 10 10 10
/musr/command globalfield printFieldValueAtPoint 40 40 100
/musr/command globalfield printFieldValueAtPoint 40 40 900
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.3
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
#
#/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
/process/msc/StepLimit UseSafety
#/process/msc/LateralDisplacement
/process/msc/RangeFactor 0.04
/process/msc/GeomFactor 2.5
#/process/msc/FactorForAngleLimit
/process/msc/Skin 3.0
#/process/msc/ThetaLimit 0.2 rad
#
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
#/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
#
/musr/run/howOftenToPrintEvent 100000
/musr/command maximumRunTimeAllowed 86000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
/musr/command rootOutput det_edep_el off
/musr/command rootOutput det_edep_pos off
/musr/command rootOutput det_edep_gam off
/musr/command rootOutput det_edep_mup off
/musr/command rootOutput det_nsteps off
/musr/command rootOutput det_length off
/musr/command rootOutput det_time_end off
/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
/musr/command rootOutput odet_ID off
/musr/command rootOutput odet_nPhot off
/musr/command rootOutput odet_timeFirst off
/musr/command rootOutput odet_timeSecond off
/musr/command rootOutput odet_timeThird off
/musr/command rootOutput odet_timeA off
/musr/command rootOutput odet_timeB off
/musr/command rootOutput odet_timeC off
/musr/command rootOutput odet_timeD off
/musr/command rootOutput odet_timeMean off
/musr/command rootOutput odet_timeLast off
/musr/command rootOutput odet_timeCFD off
/musr/command rootOutput odet_amplCFD off
/musr/command rootOutput nOptPhot off
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
/vis/disable
#/control/execute visVRML.mac
#/control/execute visFromToni.mac
#/control/execute visDawn50001.mac
#/vis/open VRML2FILE
#/vis/open DAWNFILE
### (if too many tracks cause core dump => storeTrajectory 0)
#/vis/scene/create
#
#/tracking/storeTrajectory 1
#/vis/viewer/set/viewpointThetaPhi 90 0
##/vis/viewer/set/globalLineWidthScale 3
#/vis/viewer/zoom 30
###/vis/scene/add/trajectories
#/vis/drawVolume
#/vis/viewer/flush
####/hits/verbose 2
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
/gun/vertex 0 0 -1000 mm
# FWHM 10mm ==> sigma = 10/2.354 = 4.2481mm
#/gun/vertexsigma 20 20 0 mm
#---/gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed
/gun/vertexboundary 128 -999999 999999 mm
#/gun/momentum 27.0 MeV
# sigma = 3% ==> sigma 27*0.03 = 0.81
#/gun/momentumsmearing 0.81 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#/gun/momentumboundary 20 40 0 MeV
# TURTLE
#/gun/turtlefilename FOR061_2008_04_22.DAT
#/gun/turtlefilename FOR070_2008_10_17_XXII.DAT
#/gun/turtlefilename FOR077_pie3_HiField_d05_x30.dat
#/gun/turtlefilename FOR077_reggiani_Jan2010_NEW.dat
/gun/turtlefilename FOR077_reggiani_Feb2010.dat
#/gun/turtleZ0position -900 mm
#---/gun/tilt: xangle, yangle, dummy
#/gun/tilt 0 0.5 0 deg
#---/gun/tiltsigma: xangleSigma, yangleSigma, dummy (1 degree on 1 meter ~ 17mm)
#/gun/tiltsigma 0.2 0.2 0 deg
#/gun/pitch 0.5 deg
# Spin rotated by 50 degrees upwards:
/gun/muonPolarizVector 0.766043969 0. -0.642788174
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#/gun/decaytimelimits 400 410 2197.03 ns
/gun/decaytimelimits -1 -1 2197.03 ns
###################################################################################
######################## B E A M O N #########################################
###################################################################################
#/run/beamOn 3000000
#/run/beamOn 10
/run/beamOn 10000000

View File

@@ -1,349 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for muSR instrument simulations
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
###################################################################################
############################# G E O M E T R Y ###################################
###################################################################################
# ROTATION MATRIXES:
/musr/command rotation matrix1 0 0 45
/musr/command rotation matrix2 0 180 0
/musr/command rotation matrix3 0 270 0
#/musr/command rotation matrix3 90 90
/musr/command arrayDef zPlaneGPSveto 12 0. 5. 91. 105. 115. 125. 135. 145. 155. 168.49 168.5 172.5
/musr/command arrayDef rInnerGPSveto 12 10. 11. 31. 31. 28.75 24.8. 19.7 14 10.3 9. 0. 0.
/musr/command arrayDef rOuterGPSveto 12 12.5 15.11 35.11 35. 32.85 29.1 24.2 18.6 14.6 13.2 13.0 13.0
# Rotation "fieldRot 0 0.57295 0" corresponds to 10 mrad (2.5mm/25cm) tilt of the magnetic field
#/musr/command rotation fieldRot 0 0.57295 0
#/musr/command rotation fieldRot 0 1.1459 0
# WORLD VOLUME
/musr/command construct box World 300 300 2000 G4_Galactic 0 0 0 no_logical_volume norot dead -1
# ---- BEAMPIPE vers. 1 (ALC-like)
#/musr/command construct tubs beampipe 0 34 810 0 360 G4_Galactic 0 0 -840 log_World norot dead 232
#/musr/command construct tubs beampipeshell 34 36 810 0 360 G4_Al 0 0 -840 log_World norot dead 231
# PASSIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs pbCollimator_1 16.5 34 25 0 360 G4_Pb 0 0 540 log_beampipe norot dead 241
# ACTIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs activeCollim 2.5 34. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -27 log_World norot musr/ScintSD 150
#
# ---- BEAMPIPE vers. 2 (SEGMENTED and BROAD, small section 30cm long)
#/musr/command construct tubs beampipeA 0 128 500 0 360 G4_Galactic 0 0 -800 log_World norot dead 232
#/musr/command construct tubs beampipeAshell 128 130 500 0 360 G4_Al 0 0 -800 log_World norot dead 231
#/musr/command construct tubs beampipeB 0 34 135 0 360 G4_Galactic 0 0 -165 log_World norot dead 234
#/musr/command construct tubs beampipeBshell 34 36 135 0 360 G4_Al 0 0 -165 log_World norot dead 233
# PASSIVE COLLIMATOR (for BEAMPIPE vers.2)
#/musr/command construct tubs pbCollimator_1 34 128 25 0 360 G4_Pb 0 0 475 log_beampipeA norot dead 241
#/musr/command construct tubs pbCollimator_2 16.5 34 25 0 360 G4_Pb 0 0 65 log_beampipeB norot dead 242
# ACTIVE COLLIMATOR (for BEAMPIPE vers.2)
#/musr/command construct tubs activeCollim 2.5 36. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -27 log_World norot musr/ScintSD 150
#
# ---- BEAMPIPE vers. 3 (SEGMENTED and BROAD, small section 50cm long)
#/musr/command construct tubs beampipeA 0 128 400 0 360 G4_Galactic 0 0 -900 log_World norot dead 232
#/musr/command construct tubs beampipeAshell 128 130 400 0 360 G4_Al 0 0 -900 log_World norot dead 231
#/musr/command construct tubs beampipeB 0 34 230 0 360 G4_Galactic 0 0 -270 log_World norot dead 234
#/musr/command construct tubs beampipeBshell 34 36 230 0 360 G4_Al 0 0 -270 log_World norot dead 233
# PASSIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs pbCollimator_1 20 128 15 0 360 G4_Pb 0 0 385 log_beampipeA norot dead 241
#/musr/command construct cons pbCollimator_2 122 128 34 128 70 0 360 G4_Pb 0 0 300 log_beampipeA norot dead 242
#/musr/command construct tubs pbCollimator_11 2.5 34 15 0 360 G4_Pb 0 0 215 log_beampipeB norot dead 245
#/musr/command construct cons pbCollimator_12 32 34 2.5 34 25 0 360 G4_Pb 0 0 175 log_beampipeB norot dead 246
# ACTIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs activeCollim 2.5 5. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -31 log_World norot musr/ScintSD 150
#/musr/command construct tubs activeCollimB 5. 10. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -31 log_World norot musr/ScintSD 151
#/musr/command construct tubs activeCollimC 10. 36. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -31 log_World norot musr/ScintSD 152
#
# OLD ALC BEAMPIPE
# OLD ALC DESIGN: MSR 20.05.082 Tube
/musr/command construct tubs tube 35.45 38.05 315 0 360 Steel 0 0 -613 log_World norot dead 8201
/musr/command construct tubs tube_a 0 35.45 315 0 360 G4_Galactic 0 0 -613 log_World norot dead 8251
# SECOND COLLIMATOR
/musr/command construct tubs shield_collimatorA2 10 35 25 0 360 G4_Cu 0 0 290 log_tube_a norot dead 341
# OLD ALC DESIGN: MSR 20.05.083 Flange
/musr/command construct tubs flange 38.05 90 6 0 360 Steel 0 0 -934 log_World norot dead 8301
# ----
# POSITRON COUNTERS
#/musr/command construct GPSforward forwardCounter 25 25 2.5 12.51 15.12 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 1
/musr/command construct GPSbackward forwardCounter 25 25 2.5 9.1 11.9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 1
/musr/command construct GPSbackward backwardCounter 30 30 2.5 8.80 7.64 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -30.0 log_World norot musr/ScintSD 2
/musr/command construct box up 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE 57.5 0 0.log_World norot musr/ScintSD 3
/musr/command construct box down 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE -57.5 0 0.log_World norot musr/ScintSD 4
/musr/command construct box rite1 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 -38 log_World norot musr/ScintSD 5
/musr/command construct box rite2 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 38 log_World norot musr/ScintSD 6
/musr/command construct box rite3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 -51.25 0 log_World norot musr/ScintSD 7
/musr/command construct box left1 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 -48.3 log_World norot musr/ScintSD 8
/musr/command construct box left2 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 48.3 log_World norot musr/ScintSD 9
/musr/command construct box left3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 53.75 0 log_World norot musr/ScintSD 10
# FORWARD VETO
#/musr/command construct polyconeA forwardVeto 0 360 12 zPlaneGPSveto rInnerGPSveto rOuterGPSveto G4_PLASTIC_SC_VINYLTOLUENE 0 0 24 log_World norot musr/ScintSD 51
/musr/command construct GPSbackwardVeto forwVetoA 9. 11.8 9. 11.8 2.5 6.25 6.7 6.25 6.7 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 51
/musr/command construct GPSbackwardVeto forwVetoB 11.8 23.5 11.8 23.5 37.5 6.7 18.4 6.7 18.4 G4_PLASTIC_SC_VINYLTOLUENE 0 0 66.5 log_World norot musr/ScintSD 51
/musr/command construct GPSbackwardVeto forwVetoC 23.5 16.1 23.5 16.1 17.5 18.4 11. 18.4 11. G4_PLASTIC_SC_VINYLTOLUENE 0 0 121.5 log_World norot musr/ScintSD 51
/musr/command construct box forwVetoD 16. 16. 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 141.5 log_World norot musr/ScintSD 51
#/musr/command construct box forwVetoD 23.5 23.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 106.5 log_World norot musr/ScintSD 51
#/musr/command construct GPSbackwardVeto forwVetoB 11.8 18.9 11.8 18.9 15 6.7 13.8 6.7 13.8 G4_PLASTIC_SC_VINYLTOLUENE 0 0 44.0 log_World norot musr/ScintSD 51
#/musr/command construct box forwVetoD 18.9 18.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 61.5 log_World norot musr/ScintSD 51
# BACKWARD VETO
/musr/command construct GPSbackwardVeto backwardVeto 35.13 7.63 35.13 7.63 60 31 3.5 31 3.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -87.5 log_World norot musr/ScintSD 52
#---------------------
# OUTER SHIELD
/musr/command construct tubeWithWindows tube1 20 21 33.5 14.5 33.5 14.5 33.5 G4_Cu 0 0 0 log_World matrix3 dead 401
/musr/command construct tubs bottom1 0 20 0.5 0 360 G4_Cu 0 -33.0 0 log_World matrix3 dead 402
/musr/command construct tubs window1 21 21.010 15 0 360 G4_Cu 0 0 0 log_World matrix3 dead 403
/musr/command construct tubs bottom1a 0 20 0.5 0 360 G4_Cu 0 33.0 0 log_World matrix3 dead 404
# INNER SHIELD
/musr/command construct tubeWithWindows tube2 11.5 12.5 21.5 7.5 21.5 10. 21.5 G4_Cu 0 0 0 log_World matrix3 dead 411
/musr/command construct tubs bottom2 0 11.5 3.0 0 360 G4_Cu 0 -21.5 0 log_World matrix3 dead 412
/musr/command construct tubs window2 12.5 12.510 8 0 360 G4_Cu 0 0 0 log_World matrix3 dead 413
/musr/command construct tubs bottom2a 0 11.5 3.0 0 360 G4_Cu 0 21.5 0 log_World matrix3 dead 414
# HEATER
/musr/command construct tubs heater 16 16.3 7.5 0 360 G4_Cu 0 -18.5 0 log_World matrix3 dead 415
#
#---------------------
# MAGNET
#/musr/command construct tubs magnet 44.4 100 150 0 360 G4_He 0 0 0 log_World norot dead 221
# MAGNET WALL
#/musr/command construct tubs mag_wall 44.4 46.5 150 0 360 G4_Cu 0 0 0 log_magnet norot dead 222
# MAGNET VOLUME TO DELETE TRACKS
#/musr/command construct tubs sh0 46.5 100 150 0 360 G4_Cu 0 0 0 log_magnet norot dead 223
# SHIELD TO DELETE TRACKS
#/musr/command construct tubs shield1 36 100 5 0 360 G4_AIR 0 0 -105 log_World norot dead -2
#/musr/command construct tubs sh2 0 100 5 0 360 G4_AIR 0 0 205 log_World norot dead -3
# NOSE EXTENSION
#/musr/command construct tubs noseExtensionA 15 25 2.0 0 360 G4_Al 0 0 -47 log_World norot dead 300
#/musr/command construct tubs noseExtensionB 25 28 126.5 0 360 G4_Al 0 0 -171.5 log_World norot dead 302
#/musr/command construct tubs noseExtensionC 28 41 4.0 0 360 G4_Al 0 0 -294 log_World norot dead 304
#
# COLLIMATOR
#/musr/command construct tubs collimatorA 2.5 25 15 0 360 G4_Pb 0 0 -64 log_World norot dead 310
#/musr/command construct tubs collimatorB 3.5 25 10 0 360 G4_Pb 0 0 -89 log_World norot dead 312
#/musr/command construct tubs collimatorC 5.0 25 10 0 360 G4_Pb 0 0 -109 log_World norot dead 314
#
# M COUNTERS AND M COUNTER HOLDER
#/musr/command construct tubs M0_holder1 5.5 7.5 3.25 0 360 G4_Al 0 0 -36.31 log_World norot dead 330
#/musr/command construct tubs M0_holder2 3.5 5.5 0.75 0 360 G4_PLEXIGLASS 0 0 -37.06 log_World norot dead 333
#/musr/command construct tubs M0_holder3 4.0 5.5 0.75 0 360 G4_PLEXIGLASS 0 0 -35.56 log_World norot dead 335
/musr/command construct tubs M0 0 7.5 0.15 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -25.0 log_World norot musr/ScintSD 102
#/musr/command construct tubs M0_electronics 4.0 9 0.85 0 360 G4_POLYCARBONATE 0 0 -40.41 log_World norot dead 337
#
# TARGET SPACE
#/musr/command construct tubs targetspace 0 5 50 0 360 G4_He 0 0 -20 log_cryostat
# SCINTILLATOR BEFORE TARGET
#/musr/command construct tubs coulombM1 0 3.0 0.1 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2 log_World norot musr/ScintSD 101
# TARGET
/musr/command construct tubs target 0 4.0 0.215 0 360 G4_Ag 0 0 0 log_World norot dead 201
/musr/command construct tubs targetFieldVol 0 0.5 0.015 0 360 G4_Ag 0 0 0 log_target norot dead 202
#/musr/command construct tubs vetoTarget 0 5.0 1. 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 1.220 log_World norot musr/ScintSD 160
#/musr/command construct tubs vetoCyl 5 6.0 3.6 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -1.39 log_World norot musr/ScintSD 161
#/musr/command construct TubeWithTubeHole vetoTarget 7 9 5.1 0 360 8.2 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2.89 log_World norot musr/ScintSD 160
#/musr/command construct TubeWithHoleAndTubeHole vetoTarget 1.5 6 5.1 0 360 4 8.2 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2.89 log_World norot musr/ScintSD 160
#/musr/command construct tubs sampleHolder 0 4 31.39 0 360 G4_Ag 0 0 31.61 log_World norot dead 165
#/musr/command construct tubs sampleHolder2 0 7.5 108.5 0 360 G4_Ag 0 0 171.5 log_World norot dead 166
#
#/musr/command construct TubeWithHolePlusTubeHole PlexyCyl1 4 12.5 4.5 0 360 7 12.5 5 G4_PLEXIGLASS 0 0 -10. log_World matrix2 dead 45
#/musr/command construct tubs PlexyCyl2 7.5 12.5 2 0 360 G4_PLEXIGLASS 0 0 12.5 log_World norot dead 46
#/musr/command construct TubeWithHolePlusTubeHole vetoCyl 2.5 12. 5. 0 360 4 12 9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -10.5 log_World matrix2 musr/ScintSD 51
#/musr/command construct tubs vetoCylA 8.0 12.0 10 91 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 61
#/musr/command construct tubs vetoCylB 8.0 12.0 10 181 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 62
#/musr/command construct tubs vetoCylC 8.0 12.0 10 271 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 63
#/musr/command construct tubs vetoCylD 8.0 12.0 10 1 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 64
#
#---------------------------------------------------------
#/musr/command region define goulombRegion log_target
#/musr/command region define goulombRegion log_M0
#/musr/command region setProductionCut goulombRegion 0.01 0.01 0.01
#---------------------------------------------------------
#/musr/command logicalVolumeToBeReweighted mu log_pbCollimator_1 6
#/musr/command logicalVolumeToBeReweighted mu log_pbCollimator_2 5
#/musr/command logicalVolumeToBeReweighted mu log_activeCollim 4
#---------------------------------------------------------
#
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE red
/musr/command visattributes G4_PLEXIGLASS yellow
/musr/command visattributes G4_Pb blue
#/musr/command visattributes log_beampipe invisible
#/musr/command visattributes log_beampipeAshell invisible
#/musr/command visattributes log_beampipeBshell invisible
/musr/command visattributes log_World invisible
/musr/command visattributes log_target yellow
#/musr/command visattributes log_magnet invisible
#/musr/command visattributes log_mag_wall invisible
#/musr/command visattributes log_magnet yellow
#/musr/command visattributes log_mag_wall yellow
#/musr/command visattributes log_sh0 invisible
#/musr/command visattributes log_sh2 invisible
#/musr/command visattributes log_vetoTarget green
#/musr/command visattributes log_vetoCyl green
###################################################################################
######################### M A G N E T I C F I E L D #########################
###################################################################################
# Set magnetic field (set field intensity in T and sigma in mm)
# syntax for magneticfield: fromfile filename fieldValue
# uniform fieldValue
# gaussian fieldValue sigma
#
/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 2D GPS_6kG_yAx_xRad_cgs.table log_targetFieldVol 0.005
/musr/command globalfield setparameter SetLargestAcceptableStep 2
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
/musr/command globalfield printFieldValueAtPoint 0 0 10
/musr/command globalfield printFieldValueAtPoint 0 0 -10
/musr/command globalfield printFieldValueAtPoint 0 10 10
/musr/command globalfield printFieldValueAtPoint 10 0 10
/musr/command globalfield printFieldValueAtPoint -10 0 10
/musr/command globalfield printFieldValueAtPoint 10 10 10
/musr/command globalfield printFieldValueAtPoint 40 40 100
/musr/command globalfield printFieldValueAtPoint 40 40 900
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.3
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
#
#/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
/process/msc/StepLimit UseSafety
#/process/msc/LateralDisplacement
/process/msc/RangeFactor 0.04
/process/msc/GeomFactor 2.5
#/process/msc/FactorForAngleLimit
/process/msc/Skin 3.0
#/process/msc/ThetaLimit 0.2 rad
#
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
#/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
#
/musr/run/howOftenToPrintEvent 100000
/musr/command maximumRunTimeAllowed 86000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
/musr/command rootOutput det_edep_el off
/musr/command rootOutput det_edep_pos off
/musr/command rootOutput det_edep_gam off
/musr/command rootOutput det_edep_mup off
/musr/command rootOutput det_nsteps off
/musr/command rootOutput det_length off
/musr/command rootOutput det_time_end off
/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
/musr/command rootOutput odet_ID off
/musr/command rootOutput odet_nPhot off
/musr/command rootOutput odet_timeFirst off
/musr/command rootOutput odet_timeSecond off
/musr/command rootOutput odet_timeThird off
/musr/command rootOutput odet_timeA off
/musr/command rootOutput odet_timeB off
/musr/command rootOutput odet_timeC off
/musr/command rootOutput odet_timeD off
/musr/command rootOutput odet_timeMean off
/musr/command rootOutput odet_timeLast off
/musr/command rootOutput odet_timeCFD off
/musr/command rootOutput odet_amplCFD off
/musr/command rootOutput nOptPhot off
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
/vis/disable
#/control/execute visVRML.mac
#/control/execute visFromToni.mac
#/control/execute visDawn50001.mac
#/vis/open VRML2FILE
#/vis/open DAWNFILE
### (if too many tracks cause core dump => storeTrajectory 0)
#/vis/scene/create
#
#/tracking/storeTrajectory 1
#/vis/viewer/set/viewpointThetaPhi 90 0
##/vis/viewer/set/globalLineWidthScale 3
#/vis/viewer/zoom 30
###/vis/scene/add/trajectories
#/vis/drawVolume
#/vis/viewer/flush
####/hits/verbose 2
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
/gun/vertex 0 0 -1000 mm
# FWHM 10mm ==> sigma = 10/2.354 = 4.2481mm
#/gun/vertexsigma 20 20 0 mm
#---/gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed
/gun/vertexboundary 128 -999999 999999 mm
#/gun/momentum 27.0 MeV
# sigma = 3% ==> sigma 27*0.03 = 0.81
#/gun/momentumsmearing 0.81 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#/gun/momentumboundary 20 40 0 MeV
# TURTLE
#/gun/turtlefilename FOR061_2008_04_22.DAT
#/gun/turtlefilename FOR070_2008_10_17_XXII.DAT
#/gun/turtlefilename FOR077_pie3_HiField_d05_x30.dat
#/gun/turtlefilename FOR077_reggiani_Jan2010_NEW.dat
/gun/turtlefilename FOR077_reggiani_Feb2010.dat
#/gun/turtleZ0position -900 mm
#---/gun/tilt: xangle, yangle, dummy
#/gun/tilt 0 0.5 0 deg
#---/gun/tiltsigma: xangleSigma, yangleSigma, dummy (1 degree on 1 meter ~ 17mm)
#/gun/tiltsigma 0.2 0.2 0 deg
#/gun/pitch 0.5 deg
# Spin rotated by 50 degrees upwards:
/gun/muonPolarizVector 0.766043969 0. -0.642788174
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#/gun/decaytimelimits 400 410 2197.03 ns
/gun/decaytimelimits -1 -1 2197.03 ns
###################################################################################
######################## B E A M O N #########################################
###################################################################################
#/run/beamOn 3000000
#/run/beamOn 10
/run/beamOn 10000000

View File

@@ -1,349 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for muSR instrument simulations
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
###################################################################################
############################# G E O M E T R Y ###################################
###################################################################################
# ROTATION MATRIXES:
/musr/command rotation matrix1 0 0 45
/musr/command rotation matrix2 0 180 0
/musr/command rotation matrix3 0 270 0
#/musr/command rotation matrix3 90 90
/musr/command arrayDef zPlaneGPSveto 12 0. 5. 91. 105. 115. 125. 135. 145. 155. 168.49 168.5 172.5
/musr/command arrayDef rInnerGPSveto 12 10. 11. 31. 31. 28.75 24.8. 19.7 14 10.3 9. 0. 0.
/musr/command arrayDef rOuterGPSveto 12 12.5 15.11 35.11 35. 32.85 29.1 24.2 18.6 14.6 13.2 13.0 13.0
# Rotation "fieldRot 0 0.57295 0" corresponds to 10 mrad (2.5mm/25cm) tilt of the magnetic field
#/musr/command rotation fieldRot 0 0.57295 0
#/musr/command rotation fieldRot 0 1.1459 0
# WORLD VOLUME
/musr/command construct box World 300 300 2000 G4_Galactic 0 0 0 no_logical_volume norot dead -1
# ---- BEAMPIPE vers. 1 (ALC-like)
#/musr/command construct tubs beampipe 0 34 810 0 360 G4_Galactic 0 0 -840 log_World norot dead 232
#/musr/command construct tubs beampipeshell 34 36 810 0 360 G4_Al 0 0 -840 log_World norot dead 231
# PASSIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs pbCollimator_1 16.5 34 25 0 360 G4_Pb 0 0 540 log_beampipe norot dead 241
# ACTIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs activeCollim 2.5 34. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -27 log_World norot musr/ScintSD 150
#
# ---- BEAMPIPE vers. 2 (SEGMENTED and BROAD, small section 30cm long)
#/musr/command construct tubs beampipeA 0 128 500 0 360 G4_Galactic 0 0 -800 log_World norot dead 232
#/musr/command construct tubs beampipeAshell 128 130 500 0 360 G4_Al 0 0 -800 log_World norot dead 231
#/musr/command construct tubs beampipeB 0 34 135 0 360 G4_Galactic 0 0 -165 log_World norot dead 234
#/musr/command construct tubs beampipeBshell 34 36 135 0 360 G4_Al 0 0 -165 log_World norot dead 233
# PASSIVE COLLIMATOR (for BEAMPIPE vers.2)
#/musr/command construct tubs pbCollimator_1 34 128 25 0 360 G4_Pb 0 0 475 log_beampipeA norot dead 241
#/musr/command construct tubs pbCollimator_2 16.5 34 25 0 360 G4_Pb 0 0 65 log_beampipeB norot dead 242
# ACTIVE COLLIMATOR (for BEAMPIPE vers.2)
#/musr/command construct tubs activeCollim 2.5 36. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -27 log_World norot musr/ScintSD 150
#
# ---- BEAMPIPE vers. 3 (SEGMENTED and BROAD, small section 50cm long)
#/musr/command construct tubs beampipeA 0 128 400 0 360 G4_Galactic 0 0 -900 log_World norot dead 232
#/musr/command construct tubs beampipeAshell 128 130 400 0 360 G4_Al 0 0 -900 log_World norot dead 231
#/musr/command construct tubs beampipeB 0 34 230 0 360 G4_Galactic 0 0 -270 log_World norot dead 234
#/musr/command construct tubs beampipeBshell 34 36 230 0 360 G4_Al 0 0 -270 log_World norot dead 233
# PASSIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs pbCollimator_1 20 128 15 0 360 G4_Pb 0 0 385 log_beampipeA norot dead 241
#/musr/command construct cons pbCollimator_2 122 128 34 128 70 0 360 G4_Pb 0 0 300 log_beampipeA norot dead 242
#/musr/command construct tubs pbCollimator_11 2.5 34 15 0 360 G4_Pb 0 0 215 log_beampipeB norot dead 245
#/musr/command construct cons pbCollimator_12 32 34 2.5 34 25 0 360 G4_Pb 0 0 175 log_beampipeB norot dead 246
# ACTIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs activeCollim 2.5 5. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -31 log_World norot musr/ScintSD 150
#/musr/command construct tubs activeCollimB 5. 10. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -31 log_World norot musr/ScintSD 151
#/musr/command construct tubs activeCollimC 10. 36. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -31 log_World norot musr/ScintSD 152
#
# OLD ALC BEAMPIPE
# OLD ALC DESIGN: MSR 20.05.082 Tube
/musr/command construct tubs tube 35.45 38.05 315 0 360 Steel 0 0 -613 log_World norot dead 8201
/musr/command construct tubs tube_a 0 35.45 315 0 360 G4_Galactic 0 0 -613 log_World norot dead 8251
# SECOND COLLIMATOR
/musr/command construct tubs shield_collimatorA2 10 35 25 0 360 G4_Cu 0 0 290 log_tube_a norot dead 341
# OLD ALC DESIGN: MSR 20.05.083 Flange
/musr/command construct tubs flange 38.05 90 6 0 360 Steel 0 0 -934 log_World norot dead 8301
# ----
# POSITRON COUNTERS
#/musr/command construct GPSforward forwardCounter 25 25 2.5 12.51 15.12 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 1
/musr/command construct GPSbackward forwardCounter 25 25 2.5 9.1 11.9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 1
/musr/command construct GPSbackward backwardCounter 30 30 2.5 8.80 7.64 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -30.0 log_World norot musr/ScintSD 2
/musr/command construct box up 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE 57.5 0 0.log_World norot musr/ScintSD 3
/musr/command construct box down 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE -57.5 0 0.log_World norot musr/ScintSD 4
/musr/command construct box rite1 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 -38 log_World norot musr/ScintSD 5
/musr/command construct box rite2 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 38 log_World norot musr/ScintSD 6
/musr/command construct box rite3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 -51.25 0 log_World norot musr/ScintSD 7
/musr/command construct box left1 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 -48.3 log_World norot musr/ScintSD 8
/musr/command construct box left2 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 48.3 log_World norot musr/ScintSD 9
/musr/command construct box left3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 53.75 0 log_World norot musr/ScintSD 10
# FORWARD VETO
#/musr/command construct polyconeA forwardVeto 0 360 12 zPlaneGPSveto rInnerGPSveto rOuterGPSveto G4_PLASTIC_SC_VINYLTOLUENE 0 0 24 log_World norot musr/ScintSD 51
/musr/command construct GPSbackwardVeto forwVetoA 9. 11.8 9. 11.8 2.5 6.25 6.7 6.25 6.7 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 51
/musr/command construct GPSbackwardVeto forwVetoB 11.8 23.5 11.8 23.5 37.5 6.7 18.4 6.7 18.4 G4_PLASTIC_SC_VINYLTOLUENE 0 0 66.5 log_World norot musr/ScintSD 51
#/musr/command construct GPSbackwardVeto forwVetoC 23.5 16.1 23.5 16.1 17.5 18.4 11. 18.4 11. G4_PLASTIC_SC_VINYLTOLUENE 0 0 121.5 log_World norot musr/ScintSD 51
#/musr/command construct box forwVetoD 16. 16. 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 141.5 log_World norot musr/ScintSD 51
/musr/command construct box forwVetoD 23.5 23.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 106.5 log_World norot musr/ScintSD 51
#/musr/command construct GPSbackwardVeto forwVetoB 11.8 18.9 11.8 18.9 15 6.7 13.8 6.7 13.8 G4_PLASTIC_SC_VINYLTOLUENE 0 0 44.0 log_World norot musr/ScintSD 51
#/musr/command construct box forwVetoD 18.9 18.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 61.5 log_World norot musr/ScintSD 51
# BACKWARD VETO
/musr/command construct GPSbackwardVeto backwardVeto 35.13 7.63 35.13 7.63 60 31 3.5 31 3.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -87.5 log_World norot musr/ScintSD 52
#---------------------
# OUTER SHIELD
/musr/command construct tubeWithWindows tube1 20 21 33.5 14.5 33.5 14.5 33.5 G4_Cu 0 0 0 log_World matrix3 dead 401
/musr/command construct tubs bottom1 0 20 0.5 0 360 G4_Cu 0 -33.0 0 log_World matrix3 dead 402
/musr/command construct tubs window1 21 21.010 15 0 360 G4_Cu 0 0 0 log_World matrix3 dead 403
/musr/command construct tubs bottom1a 0 20 0.5 0 360 G4_Cu 0 33.0 0 log_World matrix3 dead 404
# INNER SHIELD
/musr/command construct tubeWithWindows tube2 11.5 12.5 21.5 7.5 21.5 10. 21.5 G4_Cu 0 0 0 log_World matrix3 dead 411
/musr/command construct tubs bottom2 0 11.5 3.0 0 360 G4_Cu 0 -21.5 0 log_World matrix3 dead 412
/musr/command construct tubs window2 12.5 12.510 8 0 360 G4_Cu 0 0 0 log_World matrix3 dead 413
/musr/command construct tubs bottom2a 0 11.5 3.0 0 360 G4_Cu 0 21.5 0 log_World matrix3 dead 414
# HEATER
/musr/command construct tubs heater 16 16.3 7.5 0 360 G4_Cu 0 -18.5 0 log_World matrix3 dead 415
#
#---------------------
# MAGNET
#/musr/command construct tubs magnet 44.4 100 150 0 360 G4_He 0 0 0 log_World norot dead 221
# MAGNET WALL
#/musr/command construct tubs mag_wall 44.4 46.5 150 0 360 G4_Cu 0 0 0 log_magnet norot dead 222
# MAGNET VOLUME TO DELETE TRACKS
#/musr/command construct tubs sh0 46.5 100 150 0 360 G4_Cu 0 0 0 log_magnet norot dead 223
# SHIELD TO DELETE TRACKS
#/musr/command construct tubs shield1 36 100 5 0 360 G4_AIR 0 0 -105 log_World norot dead -2
#/musr/command construct tubs sh2 0 100 5 0 360 G4_AIR 0 0 205 log_World norot dead -3
# NOSE EXTENSION
#/musr/command construct tubs noseExtensionA 15 25 2.0 0 360 G4_Al 0 0 -47 log_World norot dead 300
#/musr/command construct tubs noseExtensionB 25 28 126.5 0 360 G4_Al 0 0 -171.5 log_World norot dead 302
#/musr/command construct tubs noseExtensionC 28 41 4.0 0 360 G4_Al 0 0 -294 log_World norot dead 304
#
# COLLIMATOR
#/musr/command construct tubs collimatorA 2.5 25 15 0 360 G4_Pb 0 0 -64 log_World norot dead 310
#/musr/command construct tubs collimatorB 3.5 25 10 0 360 G4_Pb 0 0 -89 log_World norot dead 312
#/musr/command construct tubs collimatorC 5.0 25 10 0 360 G4_Pb 0 0 -109 log_World norot dead 314
#
# M COUNTERS AND M COUNTER HOLDER
#/musr/command construct tubs M0_holder1 5.5 7.5 3.25 0 360 G4_Al 0 0 -36.31 log_World norot dead 330
#/musr/command construct tubs M0_holder2 3.5 5.5 0.75 0 360 G4_PLEXIGLASS 0 0 -37.06 log_World norot dead 333
#/musr/command construct tubs M0_holder3 4.0 5.5 0.75 0 360 G4_PLEXIGLASS 0 0 -35.56 log_World norot dead 335
/musr/command construct tubs M0 0 7.5 0.15 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -25.0 log_World norot musr/ScintSD 102
#/musr/command construct tubs M0_electronics 4.0 9 0.85 0 360 G4_POLYCARBONATE 0 0 -40.41 log_World norot dead 337
#
# TARGET SPACE
#/musr/command construct tubs targetspace 0 5 50 0 360 G4_He 0 0 -20 log_cryostat
# SCINTILLATOR BEFORE TARGET
#/musr/command construct tubs coulombM1 0 3.0 0.1 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2 log_World norot musr/ScintSD 101
# TARGET
/musr/command construct tubs target 0 4.0 0.215 0 360 G4_Ag 0 0 0 log_World norot dead 201
/musr/command construct tubs targetFieldVol 0 0.5 0.015 0 360 G4_Ag 0 0 0 log_target norot dead 202
#/musr/command construct tubs vetoTarget 0 5.0 1. 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 1.220 log_World norot musr/ScintSD 160
#/musr/command construct tubs vetoCyl 5 6.0 3.6 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -1.39 log_World norot musr/ScintSD 161
#/musr/command construct TubeWithTubeHole vetoTarget 7 9 5.1 0 360 8.2 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2.89 log_World norot musr/ScintSD 160
#/musr/command construct TubeWithHoleAndTubeHole vetoTarget 1.5 6 5.1 0 360 4 8.2 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2.89 log_World norot musr/ScintSD 160
#/musr/command construct tubs sampleHolder 0 4 31.39 0 360 G4_Ag 0 0 31.61 log_World norot dead 165
#/musr/command construct tubs sampleHolder2 0 7.5 108.5 0 360 G4_Ag 0 0 171.5 log_World norot dead 166
#
#/musr/command construct TubeWithHolePlusTubeHole PlexyCyl1 4 12.5 4.5 0 360 7 12.5 5 G4_PLEXIGLASS 0 0 -10. log_World matrix2 dead 45
#/musr/command construct tubs PlexyCyl2 7.5 12.5 2 0 360 G4_PLEXIGLASS 0 0 12.5 log_World norot dead 46
#/musr/command construct TubeWithHolePlusTubeHole vetoCyl 2.5 12. 5. 0 360 4 12 9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -10.5 log_World matrix2 musr/ScintSD 51
#/musr/command construct tubs vetoCylA 8.0 12.0 10 91 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 61
#/musr/command construct tubs vetoCylB 8.0 12.0 10 181 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 62
#/musr/command construct tubs vetoCylC 8.0 12.0 10 271 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 63
#/musr/command construct tubs vetoCylD 8.0 12.0 10 1 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 64
#
#---------------------------------------------------------
#/musr/command region define goulombRegion log_target
#/musr/command region define goulombRegion log_M0
#/musr/command region setProductionCut goulombRegion 0.01 0.01 0.01
#---------------------------------------------------------
#/musr/command logicalVolumeToBeReweighted mu log_pbCollimator_1 6
#/musr/command logicalVolumeToBeReweighted mu log_pbCollimator_2 5
#/musr/command logicalVolumeToBeReweighted mu log_activeCollim 4
#---------------------------------------------------------
#
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE red
/musr/command visattributes G4_PLEXIGLASS yellow
/musr/command visattributes G4_Pb blue
#/musr/command visattributes log_beampipe invisible
#/musr/command visattributes log_beampipeAshell invisible
#/musr/command visattributes log_beampipeBshell invisible
/musr/command visattributes log_World invisible
/musr/command visattributes log_target yellow
#/musr/command visattributes log_magnet invisible
#/musr/command visattributes log_mag_wall invisible
#/musr/command visattributes log_magnet yellow
#/musr/command visattributes log_mag_wall yellow
#/musr/command visattributes log_sh0 invisible
#/musr/command visattributes log_sh2 invisible
#/musr/command visattributes log_vetoTarget green
#/musr/command visattributes log_vetoCyl green
###################################################################################
######################### M A G N E T I C F I E L D #########################
###################################################################################
# Set magnetic field (set field intensity in T and sigma in mm)
# syntax for magneticfield: fromfile filename fieldValue
# uniform fieldValue
# gaussian fieldValue sigma
#
/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 2D GPS_6kG_yAx_xRad_cgs.table log_targetFieldVol 0.005
/musr/command globalfield setparameter SetLargestAcceptableStep 2
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
/musr/command globalfield printFieldValueAtPoint 0 0 10
/musr/command globalfield printFieldValueAtPoint 0 0 -10
/musr/command globalfield printFieldValueAtPoint 0 10 10
/musr/command globalfield printFieldValueAtPoint 10 0 10
/musr/command globalfield printFieldValueAtPoint -10 0 10
/musr/command globalfield printFieldValueAtPoint 10 10 10
/musr/command globalfield printFieldValueAtPoint 40 40 100
/musr/command globalfield printFieldValueAtPoint 40 40 900
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.3
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
#
#/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
/process/msc/StepLimit UseSafety
#/process/msc/LateralDisplacement
/process/msc/RangeFactor 0.04
/process/msc/GeomFactor 2.5
#/process/msc/FactorForAngleLimit
/process/msc/Skin 3.0
#/process/msc/ThetaLimit 0.2 rad
#
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
#/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
#
/musr/run/howOftenToPrintEvent 100000
/musr/command maximumRunTimeAllowed 86000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
/musr/command rootOutput det_edep_el off
/musr/command rootOutput det_edep_pos off
/musr/command rootOutput det_edep_gam off
/musr/command rootOutput det_edep_mup off
/musr/command rootOutput det_nsteps off
/musr/command rootOutput det_length off
/musr/command rootOutput det_time_end off
/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
/musr/command rootOutput odet_ID off
/musr/command rootOutput odet_nPhot off
/musr/command rootOutput odet_timeFirst off
/musr/command rootOutput odet_timeSecond off
/musr/command rootOutput odet_timeThird off
/musr/command rootOutput odet_timeA off
/musr/command rootOutput odet_timeB off
/musr/command rootOutput odet_timeC off
/musr/command rootOutput odet_timeD off
/musr/command rootOutput odet_timeMean off
/musr/command rootOutput odet_timeLast off
/musr/command rootOutput odet_timeCFD off
/musr/command rootOutput odet_amplCFD off
/musr/command rootOutput nOptPhot off
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
/vis/disable
#/control/execute visVRML.mac
#/control/execute visFromToni.mac
#/control/execute visDawn50001.mac
#/vis/open VRML2FILE
#/vis/open DAWNFILE
### (if too many tracks cause core dump => storeTrajectory 0)
#/vis/scene/create
#
#/tracking/storeTrajectory 1
#/vis/viewer/set/viewpointThetaPhi 90 0
##/vis/viewer/set/globalLineWidthScale 3
#/vis/viewer/zoom 30
###/vis/scene/add/trajectories
#/vis/drawVolume
#/vis/viewer/flush
####/hits/verbose 2
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
/gun/vertex 0 0 -1000 mm
# FWHM 10mm ==> sigma = 10/2.354 = 4.2481mm
#/gun/vertexsigma 20 20 0 mm
#---/gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed
/gun/vertexboundary 128 -999999 999999 mm
#/gun/momentum 27.0 MeV
# sigma = 3% ==> sigma 27*0.03 = 0.81
#/gun/momentumsmearing 0.81 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#/gun/momentumboundary 20 40 0 MeV
# TURTLE
#/gun/turtlefilename FOR061_2008_04_22.DAT
#/gun/turtlefilename FOR070_2008_10_17_XXII.DAT
#/gun/turtlefilename FOR077_pie3_HiField_d05_x30.dat
#/gun/turtlefilename FOR077_reggiani_Jan2010_NEW.dat
/gun/turtlefilename FOR077_reggiani_Feb2010.dat
#/gun/turtleZ0position -900 mm
#---/gun/tilt: xangle, yangle, dummy
#/gun/tilt 0 0.5 0 deg
#---/gun/tiltsigma: xangleSigma, yangleSigma, dummy (1 degree on 1 meter ~ 17mm)
#/gun/tiltsigma 0.2 0.2 0 deg
#/gun/pitch 0.5 deg
# Spin rotated by 50 degrees upwards:
/gun/muonPolarizVector 0.766043969 0. -0.642788174
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#/gun/decaytimelimits 400 410 2197.03 ns
/gun/decaytimelimits -1 -1 2197.03 ns
###################################################################################
######################## B E A M O N #########################################
###################################################################################
#/run/beamOn 3000000
#/run/beamOn 10
/run/beamOn 10000000

View File

@@ -1,349 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for muSR instrument simulations
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
###################################################################################
############################# G E O M E T R Y ###################################
###################################################################################
# ROTATION MATRIXES:
/musr/command rotation matrix1 0 0 45
/musr/command rotation matrix2 0 180 0
/musr/command rotation matrix3 0 270 0
#/musr/command rotation matrix3 90 90
/musr/command arrayDef zPlaneGPSveto 12 0. 5. 91. 105. 115. 125. 135. 145. 155. 168.49 168.5 172.5
/musr/command arrayDef rInnerGPSveto 12 10. 11. 31. 31. 28.75 24.8. 19.7 14 10.3 9. 0. 0.
/musr/command arrayDef rOuterGPSveto 12 12.5 15.11 35.11 35. 32.85 29.1 24.2 18.6 14.6 13.2 13.0 13.0
# Rotation "fieldRot 0 0.57295 0" corresponds to 10 mrad (2.5mm/25cm) tilt of the magnetic field
#/musr/command rotation fieldRot 0 0.57295 0
#/musr/command rotation fieldRot 0 1.1459 0
# WORLD VOLUME
/musr/command construct box World 300 300 2000 G4_Galactic 0 0 0 no_logical_volume norot dead -1
# ---- BEAMPIPE vers. 1 (ALC-like)
#/musr/command construct tubs beampipe 0 34 810 0 360 G4_Galactic 0 0 -840 log_World norot dead 232
#/musr/command construct tubs beampipeshell 34 36 810 0 360 G4_Al 0 0 -840 log_World norot dead 231
# PASSIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs pbCollimator_1 16.5 34 25 0 360 G4_Pb 0 0 540 log_beampipe norot dead 241
# ACTIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs activeCollim 2.5 34. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -27 log_World norot musr/ScintSD 150
#
# ---- BEAMPIPE vers. 2 (SEGMENTED and BROAD, small section 30cm long)
#/musr/command construct tubs beampipeA 0 128 500 0 360 G4_Galactic 0 0 -800 log_World norot dead 232
#/musr/command construct tubs beampipeAshell 128 130 500 0 360 G4_Al 0 0 -800 log_World norot dead 231
#/musr/command construct tubs beampipeB 0 34 135 0 360 G4_Galactic 0 0 -165 log_World norot dead 234
#/musr/command construct tubs beampipeBshell 34 36 135 0 360 G4_Al 0 0 -165 log_World norot dead 233
# PASSIVE COLLIMATOR (for BEAMPIPE vers.2)
#/musr/command construct tubs pbCollimator_1 34 128 25 0 360 G4_Pb 0 0 475 log_beampipeA norot dead 241
#/musr/command construct tubs pbCollimator_2 16.5 34 25 0 360 G4_Pb 0 0 65 log_beampipeB norot dead 242
# ACTIVE COLLIMATOR (for BEAMPIPE vers.2)
#/musr/command construct tubs activeCollim 2.5 36. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -27 log_World norot musr/ScintSD 150
#
# ---- BEAMPIPE vers. 3 (SEGMENTED and BROAD, small section 50cm long)
#/musr/command construct tubs beampipeA 0 128 400 0 360 G4_Galactic 0 0 -900 log_World norot dead 232
#/musr/command construct tubs beampipeAshell 128 130 400 0 360 G4_Al 0 0 -900 log_World norot dead 231
#/musr/command construct tubs beampipeB 0 34 230 0 360 G4_Galactic 0 0 -270 log_World norot dead 234
#/musr/command construct tubs beampipeBshell 34 36 230 0 360 G4_Al 0 0 -270 log_World norot dead 233
# PASSIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs pbCollimator_1 20 128 15 0 360 G4_Pb 0 0 385 log_beampipeA norot dead 241
#/musr/command construct cons pbCollimator_2 122 128 34 128 70 0 360 G4_Pb 0 0 300 log_beampipeA norot dead 242
#/musr/command construct tubs pbCollimator_11 2.5 34 15 0 360 G4_Pb 0 0 215 log_beampipeB norot dead 245
#/musr/command construct cons pbCollimator_12 32 34 2.5 34 25 0 360 G4_Pb 0 0 175 log_beampipeB norot dead 246
# ACTIVE COLLIMATOR (for BEAMPIPE vers.1)
#/musr/command construct tubs activeCollim 2.5 5. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -31 log_World norot musr/ScintSD 150
#/musr/command construct tubs activeCollimB 5. 10. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -31 log_World norot musr/ScintSD 151
#/musr/command construct tubs activeCollimC 10. 36. 2.5 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -31 log_World norot musr/ScintSD 152
#
# OLD ALC BEAMPIPE
# OLD ALC DESIGN: MSR 20.05.082 Tube
/musr/command construct tubs tube 35.45 38.05 315 0 360 Steel 0 0 -613 log_World norot dead 8201
/musr/command construct tubs tube_a 0 35.45 315 0 360 G4_Galactic 0 0 -613 log_World norot dead 8251
# SECOND COLLIMATOR
/musr/command construct tubs shield_collimatorA2 10 35 25 0 360 G4_Cu 0 0 290 log_tube_a norot dead 341
# OLD ALC DESIGN: MSR 20.05.083 Flange
/musr/command construct tubs flange 38.05 90 6 0 360 Steel 0 0 -934 log_World norot dead 8301
# ----
# POSITRON COUNTERS
#/musr/command construct GPSforward forwardCounter 25 25 2.5 12.51 15.12 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 1
/musr/command construct GPSbackward forwardCounter 25 25 2.5 9.1 11.9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 1
/musr/command construct GPSbackward backwardCounter 30 30 2.5 8.80 7.64 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -30.0 log_World norot musr/ScintSD 2
/musr/command construct box up 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE 57.5 0 0.log_World norot musr/ScintSD 3
/musr/command construct box down 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE -57.5 0 0.log_World norot musr/ScintSD 4
/musr/command construct box rite1 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 -38 log_World norot musr/ScintSD 5
/musr/command construct box rite2 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 38 log_World norot musr/ScintSD 6
/musr/command construct box rite3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 -51.25 0 log_World norot musr/ScintSD 7
/musr/command construct box left1 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 -48.3 log_World norot musr/ScintSD 8
/musr/command construct box left2 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 48.3 log_World norot musr/ScintSD 9
/musr/command construct box left3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 53.75 0 log_World norot musr/ScintSD 10
# FORWARD VETO
#/musr/command construct polyconeA forwardVeto 0 360 12 zPlaneGPSveto rInnerGPSveto rOuterGPSveto G4_PLASTIC_SC_VINYLTOLUENE 0 0 24 log_World norot musr/ScintSD 51
/musr/command construct GPSbackwardVeto forwVetoA 9. 11.8 9. 11.8 2.5 6.25 6.7 6.25 6.7 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 51
#/musr/command construct GPSbackwardVeto forwVetoB 11.8 23.5 11.8 23.5 37.5 6.7 18.4 6.7 18.4 G4_PLASTIC_SC_VINYLTOLUENE 0 0 66.5 log_World norot musr/ScintSD 51
#/musr/command construct GPSbackwardVeto forwVetoC 23.5 16.1 23.5 16.1 17.5 18.4 11. 18.4 11. G4_PLASTIC_SC_VINYLTOLUENE 0 0 121.5 log_World norot musr/ScintSD 51
#/musr/command construct box forwVetoD 16. 16. 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 141.5 log_World norot musr/ScintSD 51
#/musr/command construct box forwVetoD 23.5 23.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 106.5 log_World norot musr/ScintSD 51
/musr/command construct GPSbackwardVeto forwVetoB 11.8 18.9 11.8 18.9 15 6.7 13.8 6.7 13.8 G4_PLASTIC_SC_VINYLTOLUENE 0 0 44.0 log_World norot musr/ScintSD 51
/musr/command construct box forwVetoD 18.9 18.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 61.5 log_World norot musr/ScintSD 51
# BACKWARD VETO
/musr/command construct GPSbackwardVeto backwardVeto 35.13 7.63 35.13 7.63 60 31 3.5 31 3.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -87.5 log_World norot musr/ScintSD 52
#---------------------
# OUTER SHIELD
/musr/command construct tubeWithWindows tube1 20 21 33.5 14.5 33.5 14.5 33.5 G4_Cu 0 0 0 log_World matrix3 dead 401
/musr/command construct tubs bottom1 0 20 0.5 0 360 G4_Cu 0 -33.0 0 log_World matrix3 dead 402
/musr/command construct tubs window1 21 21.010 15 0 360 G4_Cu 0 0 0 log_World matrix3 dead 403
/musr/command construct tubs bottom1a 0 20 0.5 0 360 G4_Cu 0 33.0 0 log_World matrix3 dead 404
# INNER SHIELD
/musr/command construct tubeWithWindows tube2 11.5 12.5 21.5 7.5 21.5 10. 21.5 G4_Cu 0 0 0 log_World matrix3 dead 411
/musr/command construct tubs bottom2 0 11.5 3.0 0 360 G4_Cu 0 -21.5 0 log_World matrix3 dead 412
/musr/command construct tubs window2 12.5 12.510 8 0 360 G4_Cu 0 0 0 log_World matrix3 dead 413
/musr/command construct tubs bottom2a 0 11.5 3.0 0 360 G4_Cu 0 21.5 0 log_World matrix3 dead 414
# HEATER
/musr/command construct tubs heater 16 16.3 7.5 0 360 G4_Cu 0 -18.5 0 log_World matrix3 dead 415
#
#---------------------
# MAGNET
#/musr/command construct tubs magnet 44.4 100 150 0 360 G4_He 0 0 0 log_World norot dead 221
# MAGNET WALL
#/musr/command construct tubs mag_wall 44.4 46.5 150 0 360 G4_Cu 0 0 0 log_magnet norot dead 222
# MAGNET VOLUME TO DELETE TRACKS
#/musr/command construct tubs sh0 46.5 100 150 0 360 G4_Cu 0 0 0 log_magnet norot dead 223
# SHIELD TO DELETE TRACKS
#/musr/command construct tubs shield1 36 100 5 0 360 G4_AIR 0 0 -105 log_World norot dead -2
#/musr/command construct tubs sh2 0 100 5 0 360 G4_AIR 0 0 205 log_World norot dead -3
# NOSE EXTENSION
#/musr/command construct tubs noseExtensionA 15 25 2.0 0 360 G4_Al 0 0 -47 log_World norot dead 300
#/musr/command construct tubs noseExtensionB 25 28 126.5 0 360 G4_Al 0 0 -171.5 log_World norot dead 302
#/musr/command construct tubs noseExtensionC 28 41 4.0 0 360 G4_Al 0 0 -294 log_World norot dead 304
#
# COLLIMATOR
#/musr/command construct tubs collimatorA 2.5 25 15 0 360 G4_Pb 0 0 -64 log_World norot dead 310
#/musr/command construct tubs collimatorB 3.5 25 10 0 360 G4_Pb 0 0 -89 log_World norot dead 312
#/musr/command construct tubs collimatorC 5.0 25 10 0 360 G4_Pb 0 0 -109 log_World norot dead 314
#
# M COUNTERS AND M COUNTER HOLDER
#/musr/command construct tubs M0_holder1 5.5 7.5 3.25 0 360 G4_Al 0 0 -36.31 log_World norot dead 330
#/musr/command construct tubs M0_holder2 3.5 5.5 0.75 0 360 G4_PLEXIGLASS 0 0 -37.06 log_World norot dead 333
#/musr/command construct tubs M0_holder3 4.0 5.5 0.75 0 360 G4_PLEXIGLASS 0 0 -35.56 log_World norot dead 335
/musr/command construct tubs M0 0 7.5 0.15 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -25.0 log_World norot musr/ScintSD 102
#/musr/command construct tubs M0_electronics 4.0 9 0.85 0 360 G4_POLYCARBONATE 0 0 -40.41 log_World norot dead 337
#
# TARGET SPACE
#/musr/command construct tubs targetspace 0 5 50 0 360 G4_He 0 0 -20 log_cryostat
# SCINTILLATOR BEFORE TARGET
#/musr/command construct tubs coulombM1 0 3.0 0.1 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2 log_World norot musr/ScintSD 101
# TARGET
/musr/command construct tubs target 0 4.0 0.215 0 360 G4_Ag 0 0 0 log_World norot dead 201
/musr/command construct tubs targetFieldVol 0 0.5 0.015 0 360 G4_Ag 0 0 0 log_target norot dead 202
#/musr/command construct tubs vetoTarget 0 5.0 1. 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 1.220 log_World norot musr/ScintSD 160
#/musr/command construct tubs vetoCyl 5 6.0 3.6 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -1.39 log_World norot musr/ScintSD 161
#/musr/command construct TubeWithTubeHole vetoTarget 7 9 5.1 0 360 8.2 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2.89 log_World norot musr/ScintSD 160
#/musr/command construct TubeWithHoleAndTubeHole vetoTarget 1.5 6 5.1 0 360 4 8.2 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2.89 log_World norot musr/ScintSD 160
#/musr/command construct tubs sampleHolder 0 4 31.39 0 360 G4_Ag 0 0 31.61 log_World norot dead 165
#/musr/command construct tubs sampleHolder2 0 7.5 108.5 0 360 G4_Ag 0 0 171.5 log_World norot dead 166
#
#/musr/command construct TubeWithHolePlusTubeHole PlexyCyl1 4 12.5 4.5 0 360 7 12.5 5 G4_PLEXIGLASS 0 0 -10. log_World matrix2 dead 45
#/musr/command construct tubs PlexyCyl2 7.5 12.5 2 0 360 G4_PLEXIGLASS 0 0 12.5 log_World norot dead 46
#/musr/command construct TubeWithHolePlusTubeHole vetoCyl 2.5 12. 5. 0 360 4 12 9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -10.5 log_World matrix2 musr/ScintSD 51
#/musr/command construct tubs vetoCylA 8.0 12.0 10 91 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 61
#/musr/command construct tubs vetoCylB 8.0 12.0 10 181 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 62
#/musr/command construct tubs vetoCylC 8.0 12.0 10 271 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 63
#/musr/command construct tubs vetoCylD 8.0 12.0 10 1 88 G4_PLASTIC_SC_VINYLTOLUENE 0 0 0 log_World norot musr/ScintSD 64
#
#---------------------------------------------------------
#/musr/command region define goulombRegion log_target
#/musr/command region define goulombRegion log_M0
#/musr/command region setProductionCut goulombRegion 0.01 0.01 0.01
#---------------------------------------------------------
#/musr/command logicalVolumeToBeReweighted mu log_pbCollimator_1 6
#/musr/command logicalVolumeToBeReweighted mu log_pbCollimator_2 5
#/musr/command logicalVolumeToBeReweighted mu log_activeCollim 4
#---------------------------------------------------------
#
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE red
/musr/command visattributes G4_PLEXIGLASS yellow
/musr/command visattributes G4_Pb blue
#/musr/command visattributes log_beampipe invisible
#/musr/command visattributes log_beampipeAshell invisible
#/musr/command visattributes log_beampipeBshell invisible
/musr/command visattributes log_World invisible
/musr/command visattributes log_target yellow
#/musr/command visattributes log_magnet invisible
#/musr/command visattributes log_mag_wall invisible
#/musr/command visattributes log_magnet yellow
#/musr/command visattributes log_mag_wall yellow
#/musr/command visattributes log_sh0 invisible
#/musr/command visattributes log_sh2 invisible
#/musr/command visattributes log_vetoTarget green
#/musr/command visattributes log_vetoCyl green
###################################################################################
######################### M A G N E T I C F I E L D #########################
###################################################################################
# Set magnetic field (set field intensity in T and sigma in mm)
# syntax for magneticfield: fromfile filename fieldValue
# uniform fieldValue
# gaussian fieldValue sigma
#
/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 2D GPS_6kG_yAx_xRad_cgs.table log_targetFieldVol 0.005
/musr/command globalfield setparameter SetLargestAcceptableStep 2
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
/musr/command globalfield printFieldValueAtPoint 0 0 10
/musr/command globalfield printFieldValueAtPoint 0 0 -10
/musr/command globalfield printFieldValueAtPoint 0 10 10
/musr/command globalfield printFieldValueAtPoint 10 0 10
/musr/command globalfield printFieldValueAtPoint -10 0 10
/musr/command globalfield printFieldValueAtPoint 10 10 10
/musr/command globalfield printFieldValueAtPoint 40 40 100
/musr/command globalfield printFieldValueAtPoint 40 40 900
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.3
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
#
#/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
/process/msc/StepLimit UseSafety
#/process/msc/LateralDisplacement
/process/msc/RangeFactor 0.04
/process/msc/GeomFactor 2.5
#/process/msc/FactorForAngleLimit
/process/msc/Skin 3.0
#/process/msc/ThetaLimit 0.2 rad
#
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
#/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
#
/musr/run/howOftenToPrintEvent 100000
/musr/command maximumRunTimeAllowed 86000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
/musr/command rootOutput det_edep_el off
/musr/command rootOutput det_edep_pos off
/musr/command rootOutput det_edep_gam off
/musr/command rootOutput det_edep_mup off
/musr/command rootOutput det_nsteps off
/musr/command rootOutput det_length off
/musr/command rootOutput det_time_end off
/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
/musr/command rootOutput odet_ID off
/musr/command rootOutput odet_nPhot off
/musr/command rootOutput odet_timeFirst off
/musr/command rootOutput odet_timeSecond off
/musr/command rootOutput odet_timeThird off
/musr/command rootOutput odet_timeA off
/musr/command rootOutput odet_timeB off
/musr/command rootOutput odet_timeC off
/musr/command rootOutput odet_timeD off
/musr/command rootOutput odet_timeMean off
/musr/command rootOutput odet_timeLast off
/musr/command rootOutput odet_timeCFD off
/musr/command rootOutput odet_amplCFD off
/musr/command rootOutput nOptPhot off
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
/vis/disable
#/control/execute visVRML.mac
#/control/execute visFromToni.mac
#/control/execute visDawn50001.mac
#/vis/open VRML2FILE
#/vis/open DAWNFILE
### (if too many tracks cause core dump => storeTrajectory 0)
#/vis/scene/create
#
#/tracking/storeTrajectory 1
#/vis/viewer/set/viewpointThetaPhi 90 0
##/vis/viewer/set/globalLineWidthScale 3
#/vis/viewer/zoom 30
###/vis/scene/add/trajectories
#/vis/drawVolume
#/vis/viewer/flush
####/hits/verbose 2
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
/gun/vertex 0 0 -1000 mm
# FWHM 10mm ==> sigma = 10/2.354 = 4.2481mm
#/gun/vertexsigma 20 20 0 mm
#---/gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed
/gun/vertexboundary 128 -999999 999999 mm
#/gun/momentum 27.0 MeV
# sigma = 3% ==> sigma 27*0.03 = 0.81
#/gun/momentumsmearing 0.81 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#/gun/momentumboundary 20 40 0 MeV
# TURTLE
#/gun/turtlefilename FOR061_2008_04_22.DAT
#/gun/turtlefilename FOR070_2008_10_17_XXII.DAT
#/gun/turtlefilename FOR077_pie3_HiField_d05_x30.dat
#/gun/turtlefilename FOR077_reggiani_Jan2010_NEW.dat
/gun/turtlefilename FOR077_reggiani_Feb2010.dat
#/gun/turtleZ0position -900 mm
#---/gun/tilt: xangle, yangle, dummy
#/gun/tilt 0 0.5 0 deg
#---/gun/tiltsigma: xangleSigma, yangleSigma, dummy (1 degree on 1 meter ~ 17mm)
#/gun/tiltsigma 0.2 0.2 0 deg
#/gun/pitch 0.5 deg
# Spin rotated by 50 degrees upwards:
/gun/muonPolarizVector 0.766043969 0. -0.642788174
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#/gun/decaytimelimits 400 410 2197.03 ns
/gun/decaytimelimits -1 -1 2197.03 ns
###################################################################################
######################## B E A M O N #########################################
###################################################################################
#/run/beamOn 3000000
#/run/beamOn 10
/run/beamOn 10000000

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,611 +0,0 @@
301 1 2 1
1 X [LENGU]
2 Y [LENGU]
3 Z [LENGU]
4 HX [FIELU]
5 HZ [FIELU]
6 HMOD [FIELU]
fieldNormalisation 880.169809
0
0.0000000e+00 0 0 0 1.1361444e-03 0
0.0000000e+00 0 20 0 1.1361444e-03 0
1.0000000e+00 0 0 0 1.1362377e-03 0
1.0000000e+00 0 20 0 1.1362377e-03 0
2.0000000e+00 0 0 0 1.1365074e-03 0
2.0000000e+00 0 20 0 1.1365074e-03 0
3.0000000e+00 0 0 0 1.1369226e-03 0
3.0000000e+00 0 20 0 1.1369226e-03 0
4.0000000e+00 0 0 0 1.1374296e-03 0
4.0000000e+00 0 20 0 1.1374296e-03 0
5.0000000e+00 0 0 0 1.1379495e-03 0
5.0000000e+00 0 20 0 1.1379495e-03 0
6.0000000e+00 0 0 0 1.1383740e-03 0
6.0000000e+00 0 20 0 1.1383740e-03 0
7.0000000e+00 0 0 0 1.1385589e-03 0
7.0000000e+00 0 20 0 1.1385589e-03 0
8.0000000e+00 0 0 0 1.1383168e-03 0
8.0000000e+00 0 20 0 1.1383168e-03 0
9.0000000e+00 0 0 0 1.1374066e-03 0
9.0000000e+00 0 20 0 1.1374066e-03 0
1.0000000e+01 0 0 0 1.1355196e-03 0
1.0000000e+01 0 20 0 1.1355196e-03 0
1.1000000e+01 0 0 0 1.1322640e-03 0
1.1000000e+01 0 20 0 1.1322640e-03 0
1.2000000e+01 0 0 0 1.1271451e-03 0
1.2000000e+01 0 20 0 1.1271451e-03 0
1.3000000e+01 0 0 0 1.1195471e-03 0
1.3000000e+01 0 20 0 1.1195471e-03 0
1.4000000e+01 0 0 0 1.1087207e-03 0
1.4000000e+01 0 20 0 1.1087207e-03 0
1.5000000e+01 0 0 0 1.0937932e-03 0
1.5000000e+01 0 20 0 1.0937932e-03 0
1.6000000e+01 0 0 0 1.0738238e-03 0
1.6000000e+01 0 20 0 1.0738238e-03 0
1.7000000e+01 0 0 0 1.0479326e-03 0
1.7000000e+01 0 20 0 1.0479326e-03 0
1.8000000e+01 0 0 0 1.0155087e-03 0
1.8000000e+01 0 20 0 1.0155087e-03 0
1.9000000e+01 0 0 0 9.7642128e-04 0
1.9000000e+01 0 20 0 9.7642128e-04 0
2.0000000e+01 0 0 0 9.3109490e-04 0
2.0000000e+01 0 20 0 9.3109490e-04 0
2.1000000e+01 0 0 0 8.8037814e-04 0
2.1000000e+01 0 20 0 8.8037814e-04 0
2.2000000e+01 0 0 0 8.2530227e-04 0
2.2000000e+01 0 20 0 8.2530227e-04 0
2.3000000e+01 0 0 0 7.6687852e-04 0
2.3000000e+01 0 20 0 7.6687852e-04 0
2.4000000e+01 0 0 0 7.0599560e-04 0
2.4000000e+01 0 20 0 7.0599560e-04 0
2.5000000e+01 0 0 0 6.4339740e-04 0
2.5000000e+01 0 20 0 6.4339740e-04 0
2.6000000e+01 0 0 0 5.7970163e-04 0
2.6000000e+01 0 20 0 5.7970163e-04 0
2.7000000e+01 0 0 0 5.1543274e-04 0
2.7000000e+01 0 20 0 5.1543274e-04 0
2.8000000e+01 0 0 0 4.5105685e-04 0
2.8000000e+01 0 20 0 4.5105685e-04 0
2.9000000e+01 0 0 0 3.8701483e-04 0
2.9000000e+01 0 20 0 3.8701483e-04 0
3.0000000e+01 0 0 0 3.2375422e-04 0
3.0000000e+01 0 20 0 3.2375422e-04 0
3.1000000e+01 0 0 0 2.6176224e-04 0
3.1000000e+01 0 20 0 2.6176224e-04 0
3.2000000e+01 0 0 0 2.0160348e-04 0
3.2000000e+01 0 20 0 2.0160348e-04 0
3.3000000e+01 0 0 0 1.4396412e-04 0
3.3000000e+01 0 20 0 1.4396412e-04 0
3.4000000e+01 0 0 0 8.9697678e-05 0
3.4000000e+01 0 20 0 8.9697678e-05 0
3.5000000e+01 0 0 0 3.9848332e-05 0
3.5000000e+01 0 20 0 3.9848332e-05 0
3.6000000e+01 0 0 0 -4.4041645e-06 0
3.6000000e+01 0 20 0 -4.4041645e-06 0
3.7000000e+01 0 0 0 -4.1948665e-05 0
3.7000000e+01 0 20 0 -4.1948665e-05 0
3.8000000e+01 0 0 0 -7.2089079e-05 0
3.8000000e+01 0 20 0 -7.2089079e-05 0
3.9000000e+01 0 0 0 -9.4844419e-05 0
3.9000000e+01 0 20 0 -9.4844419e-05 0
4.0000000e+01 0 0 0 -1.1095290e-04 0
4.0000000e+01 0 20 0 -1.1095290e-04 0
4.1000000e+01 0 0 0 -1.2157438e-04 0
4.1000000e+01 0 20 0 -1.2157438e-04 0
4.2000000e+01 0 0 0 -1.2793545e-04 0
4.2000000e+01 0 20 0 -1.2793545e-04 0
4.3000000e+01 0 0 0 -1.3111042e-04 0
4.3000000e+01 0 20 0 -1.3111042e-04 0
4.4000000e+01 0 0 0 -1.3195272e-04 0
4.4000000e+01 0 20 0 -1.3195272e-04 0
4.5000000e+01 0 0 0 -1.3110933e-04 0
4.5000000e+01 0 20 0 -1.3110933e-04 0
4.6000000e+01 0 0 0 -1.2906196e-04 0
4.6000000e+01 0 20 0 -1.2906196e-04 0
4.7000000e+01 0 0 0 -1.2616788e-04 0
4.7000000e+01 0 20 0 -1.2616788e-04 0
4.8000000e+01 0 0 0 -1.2269274e-04 0
4.8000000e+01 0 20 0 -1.2269274e-04 0
4.9000000e+01 0 0 0 -1.1883471e-04 0
4.9000000e+01 0 20 0 -1.1883471e-04 0
5.0000000e+01 0 0 0 -1.1474199e-04 0
5.0000000e+01 0 20 0 -1.1474199e-04 0
5.1000000e+01 0 0 0 -1.1052536e-04 0
5.1000000e+01 0 20 0 -1.1052536e-04 0
5.2000000e+01 0 0 0 -1.0626737e-04 0
5.2000000e+01 0 20 0 -1.0626737e-04 0
5.3000000e+01 0 0 0 -1.0202909e-04 0
5.3000000e+01 0 20 0 -1.0202909e-04 0
5.4000000e+01 0 0 0 -9.7855223e-05 0
5.4000000e+01 0 20 0 -9.7855223e-05 0
5.5000000e+01 0 0 0 -9.3777888e-05 0
5.5000000e+01 0 20 0 -9.3777888e-05 0
5.6000000e+01 0 0 0 -8.9819586e-05 0
5.6000000e+01 0 20 0 -8.9819586e-05 0
5.7000000e+01 0 0 0 -8.5995449e-05 0
5.7000000e+01 0 20 0 -8.5995449e-05 0
5.8000000e+01 0 0 0 -8.2314978e-05 0
5.8000000e+01 0 20 0 -8.2314978e-05 0
5.9000000e+01 0 0 0 -7.8783399e-05 0
5.9000000e+01 0 20 0 -7.8783399e-05 0
6.0000000e+01 0 0 0 -7.5402713e-05 0
6.0000000e+01 0 20 0 -7.5402713e-05 0
6.1000000e+01 0 0 0 -7.2172507e-05 0
6.1000000e+01 0 20 0 -7.2172507e-05 0
6.2000000e+01 0 0 0 -6.9090590e-05 0
6.2000000e+01 0 20 0 -6.9090590e-05 0
6.3000000e+01 0 0 0 -6.6153484e-05 0
6.3000000e+01 0 20 0 -6.6153484e-05 0
6.4000000e+01 0 0 0 -6.3356805e-05 0
6.4000000e+01 0 20 0 -6.3356805e-05 0
6.5000000e+01 0 0 0 -6.0695551e-05 0
6.5000000e+01 0 20 0 -6.0695551e-05 0
6.6000000e+01 0 0 0 -5.8164335e-05 0
6.6000000e+01 0 20 0 -5.8164335e-05 0
6.7000000e+01 0 0 0 -5.5757548e-05 0
6.7000000e+01 0 20 0 -5.5757548e-05 0
6.8000000e+01 0 0 0 -5.3469496e-05 0
6.8000000e+01 0 20 0 -5.3469496e-05 0
6.9000000e+01 0 0 0 -5.1294495e-05 0
6.9000000e+01 0 20 0 -5.1294495e-05 0
7.0000000e+01 0 0 0 -4.9226940e-05 0
7.0000000e+01 0 20 0 -4.9226940e-05 0
7.1000000e+01 0 0 0 -4.7261364e-05 0
7.1000000e+01 0 20 0 -4.7261364e-05 0
7.2000000e+01 0 0 0 -4.5392469e-05 0
7.2000000e+01 0 20 0 -4.5392469e-05 0
7.3000000e+01 0 0 0 -4.3615153e-05 0
7.3000000e+01 0 20 0 -4.3615153e-05 0
7.4000000e+01 0 0 0 -4.1924529e-05 0
7.4000000e+01 0 20 0 -4.1924529e-05 0
7.5000000e+01 0 0 0 -4.0315927e-05 0
7.5000000e+01 0 20 0 -4.0315927e-05 0
7.6000000e+01 0 0 0 -3.8784905e-05 0
7.6000000e+01 0 20 0 -3.8784905e-05 0
7.7000000e+01 0 0 0 -3.7327244e-05 0
7.7000000e+01 0 20 0 -3.7327244e-05 0
7.8000000e+01 0 0 0 -3.5938946e-05 0
7.8000000e+01 0 20 0 -3.5938946e-05 0
7.9000000e+01 0 0 0 -3.4616230e-05 0
7.9000000e+01 0 20 0 -3.4616230e-05 0
8.0000000e+01 0 0 0 -3.3355521e-05 0
8.0000000e+01 0 20 0 -3.3355521e-05 0
8.1000000e+01 0 0 0 -3.2153447e-05 0
8.1000000e+01 0 20 0 -3.2153447e-05 0
8.2000000e+01 0 0 0 -3.1006827e-05 0
8.2000000e+01 0 20 0 -3.1006827e-05 0
8.3000000e+01 0 0 0 -2.9912663e-05 0
8.3000000e+01 0 20 0 -2.9912663e-05 0
8.4000000e+01 0 0 0 -2.8868131e-05 0
8.4000000e+01 0 20 0 -2.8868131e-05 0
8.5000000e+01 0 0 0 -2.7870571e-05 0
8.5000000e+01 0 20 0 -2.7870571e-05 0
8.6000000e+01 0 0 0 -2.6917478e-05 0
8.6000000e+01 0 20 0 -2.6917478e-05 0
8.7000000e+01 0 0 0 -2.6006495e-05 0
8.7000000e+01 0 20 0 -2.6006495e-05 0
8.8000000e+01 0 0 0 -2.5135405e-05 0
8.8000000e+01 0 20 0 -2.5135405e-05 0
8.9000000e+01 0 0 0 -2.4302117e-05 0
8.9000000e+01 0 20 0 -2.4302117e-05 0
9.0000000e+01 0 0 0 -2.3504665e-05 0
9.0000000e+01 0 20 0 -2.3504665e-05 0
9.1000000e+01 0 0 0 -2.2741199e-05 0
9.1000000e+01 0 20 0 -2.2741199e-05 0
9.2000000e+01 0 0 0 -2.2009975e-05 0
9.2000000e+01 0 20 0 -2.2009975e-05 0
9.3000000e+01 0 0 0 -2.1309350e-05 0
9.3000000e+01 0 20 0 -2.1309350e-05 0
9.4000000e+01 0 0 0 -2.0637779e-05 0
9.4000000e+01 0 20 0 -2.0637779e-05 0
9.5000000e+01 0 0 0 -1.9993803e-05 0
9.5000000e+01 0 20 0 -1.9993803e-05 0
9.6000000e+01 0 0 0 -1.9376048e-05 0
9.6000000e+01 0 20 0 -1.9376048e-05 0
9.7000000e+01 0 0 0 -1.8783220e-05 0
9.7000000e+01 0 20 0 -1.8783220e-05 0
9.8000000e+01 0 0 0 -1.8214096e-05 0
9.8000000e+01 0 20 0 -1.8214096e-05 0
9.9000000e+01 0 0 0 -1.7667524e-05 0
9.9000000e+01 0 20 0 -1.7667524e-05 0
1.0000000e+02 0 0 0 -1.7142415e-05 0
1.0000000e+02 0 20 0 -1.7142415e-05 0
1.0100000e+02 0 0 0 -1.6637742e-05 0
1.0100000e+02 0 20 0 -1.6637742e-05 0
1.0200000e+02 0 0 0 -1.6152534e-05 0
1.0200000e+02 0 20 0 -1.6152534e-05 0
1.0300000e+02 0 0 0 -1.5685876e-05 0
1.0300000e+02 0 20 0 -1.5685876e-05 0
1.0400000e+02 0 0 0 -1.5236899e-05 0
1.0400000e+02 0 20 0 -1.5236899e-05 0
1.0500000e+02 0 0 0 -1.4804785e-05 0
1.0500000e+02 0 20 0 -1.4804785e-05 0
1.0600000e+02 0 0 0 -1.4388759e-05 0
1.0600000e+02 0 20 0 -1.4388759e-05 0
1.0700000e+02 0 0 0 -1.3988086e-05 0
1.0700000e+02 0 20 0 -1.3988086e-05 0
1.0800000e+02 0 0 0 -1.3602072e-05 0
1.0800000e+02 0 20 0 -1.3602072e-05 0
1.0900000e+02 0 0 0 -1.3230060e-05 0
1.0900000e+02 0 20 0 -1.3230060e-05 0
1.1000000e+02 0 0 0 -1.2871425e-05 0
1.1000000e+02 0 20 0 -1.2871425e-05 0
1.1100000e+02 0 0 0 -1.2525578e-05 0
1.1100000e+02 0 20 0 -1.2525578e-05 0
1.1200000e+02 0 0 0 -1.2191958e-05 0
1.1200000e+02 0 20 0 -1.2191958e-05 0
1.1300000e+02 0 0 0 -1.1870033e-05 0
1.1300000e+02 0 20 0 -1.1870033e-05 0
1.1400000e+02 0 0 0 -1.1559300e-05 0
1.1400000e+02 0 20 0 -1.1559300e-05 0
1.1500000e+02 0 0 0 -1.1259280e-05 0
1.1500000e+02 0 20 0 -1.1259280e-05 0
1.1600000e+02 0 0 0 -1.0969518e-05 0
1.1600000e+02 0 20 0 -1.0969518e-05 0
1.1700000e+02 0 0 0 -1.0689581e-05 0
1.1700000e+02 0 20 0 -1.0689581e-05 0
1.1800000e+02 0 0 0 -1.0419061e-05 0
1.1800000e+02 0 20 0 -1.0419061e-05 0
1.1900000e+02 0 0 0 -1.0157566e-05 0
1.1900000e+02 0 20 0 -1.0157566e-05 0
1.2000000e+02 0 0 0 -9.9047248e-06 0
1.2000000e+02 0 20 0 -9.9047248e-06 0
1.2100000e+02 0 0 0 -9.6601849e-06 0
1.2100000e+02 0 20 0 -9.6601849e-06 0
1.2200000e+02 0 0 0 -9.4236097e-06 0
1.2200000e+02 0 20 0 -9.4236097e-06 0
1.2300000e+02 0 0 0 -9.1946792e-06 0
1.2300000e+02 0 20 0 -9.1946792e-06 0
1.2400000e+02 0 0 0 -8.9730884e-06 0
1.2400000e+02 0 20 0 -8.9730884e-06 0
1.2500000e+02 0 0 0 -8.7585467e-06 0
1.2500000e+02 0 20 0 -8.7585467e-06 0
1.2600000e+02 0 0 0 -8.5507773e-06 0
1.2600000e+02 0 20 0 -8.5507773e-06 0
1.2700000e+02 0 0 0 -8.3495160e-06 0
1.2700000e+02 0 20 0 -8.3495160e-06 0
1.2800000e+02 0 0 0 -8.1545110e-06 0
1.2800000e+02 0 20 0 -8.1545110e-06 0
1.2900000e+02 0 0 0 -7.9655218e-06 0
1.2900000e+02 0 20 0 -7.9655218e-06 0
1.3000000e+02 0 0 0 -7.7823191e-06 0
1.3000000e+02 0 20 0 -7.7823191e-06 0
1.3100000e+02 0 0 0 -7.6046838e-06 0
1.3100000e+02 0 20 0 -7.6046838e-06 0
1.3200000e+02 0 0 0 -7.4324065e-06 0
1.3200000e+02 0 20 0 -7.4324065e-06 0
1.3300000e+02 0 0 0 -7.2652875e-06 0
1.3300000e+02 0 20 0 -7.2652875e-06 0
1.3400000e+02 0 0 0 -7.1031356e-06 0
1.3400000e+02 0 20 0 -7.1031356e-06 0
1.3500000e+02 0 0 0 -6.9457681e-06 0
1.3500000e+02 0 20 0 -6.9457681e-06 0
1.3600000e+02 0 0 0 -6.7930102e-06 0
1.3600000e+02 0 20 0 -6.7930102e-06 0
1.3700000e+02 0 0 0 -6.6446950e-06 0
1.3700000e+02 0 20 0 -6.6446950e-06 0
1.3800000e+02 0 0 0 -6.5006623e-06 0
1.3800000e+02 0 20 0 -6.5006623e-06 0
1.3900000e+02 0 0 0 -6.3607590e-06 0
1.3900000e+02 0 20 0 -6.3607590e-06 0
1.4000000e+02 0 0 0 -6.2248386e-06 0
1.4000000e+02 0 20 0 -6.2248386e-06 0
1.4100000e+02 0 0 0 -6.0927605e-06 0
1.4100000e+02 0 20 0 -6.0927605e-06 0
1.4200000e+02 0 0 0 -5.9643902e-06 0
1.4200000e+02 0 20 0 -5.9643902e-06 0
1.4300000e+02 0 0 0 -5.8395988e-06 0
1.4300000e+02 0 20 0 -5.8395988e-06 0
1.4400000e+02 0 0 0 -5.7182625e-06 0
1.4400000e+02 0 20 0 -5.7182625e-06 0
1.4500000e+02 0 0 0 -5.6002629e-06 0
1.4500000e+02 0 20 0 -5.6002629e-06 0
1.4600000e+02 0 0 0 -5.4854861e-06 0
1.4600000e+02 0 20 0 -5.4854861e-06 0
1.4700000e+02 0 0 0 -5.3738232e-06 0
1.4700000e+02 0 20 0 -5.3738232e-06 0
1.4800000e+02 0 0 0 -5.2651692e-06 0
1.4800000e+02 0 20 0 -5.2651692e-06 0
1.4900000e+02 0 0 0 -5.1594237e-06 0
1.4900000e+02 0 20 0 -5.1594237e-06 0
1.5000000e+02 0 0 0 -5.0564902e-06 0
1.5000000e+02 0 20 0 -5.0564902e-06 0
1.5100000e+02 0 0 0 -4.9562759e-06 0
1.5100000e+02 0 20 0 -4.9562759e-06 0
1.5200000e+02 0 0 0 -4.8586917e-06 0
1.5200000e+02 0 20 0 -4.8586917e-06 0
1.5300000e+02 0 0 0 -4.7636519e-06 0
1.5300000e+02 0 20 0 -4.7636519e-06 0
1.5400000e+02 0 0 0 -4.6710744e-06 0
1.5400000e+02 0 20 0 -4.6710744e-06 0
1.5500000e+02 0 0 0 -4.5808798e-06 0
1.5500000e+02 0 20 0 -4.5808798e-06 0
1.5600000e+02 0 0 0 -4.4929922e-06 0
1.5600000e+02 0 20 0 -4.4929922e-06 0
1.5700000e+02 0 0 0 -4.4073382e-06 0
1.5700000e+02 0 20 0 -4.4073382e-06 0
1.5800000e+02 0 0 0 -4.3238475e-06 0
1.5800000e+02 0 20 0 -4.3238475e-06 0
1.5900000e+02 0 0 0 -4.2424522e-06 0
1.5900000e+02 0 20 0 -4.2424522e-06 0
1.6000000e+02 0 0 0 -4.1630870e-06 0
1.6000000e+02 0 20 0 -4.1630870e-06 0
1.6100000e+02 0 0 0 -4.0856892e-06 0
1.6100000e+02 0 20 0 -4.0856892e-06 0
1.6200000e+02 0 0 0 -4.0101980e-06 0
1.6200000e+02 0 20 0 -4.0101980e-06 0
1.6300000e+02 0 0 0 -3.9365553e-06 0
1.6300000e+02 0 20 0 -3.9365553e-06 0
1.6400000e+02 0 0 0 -3.8647049e-06 0
1.6400000e+02 0 20 0 -3.8647049e-06 0
1.6500000e+02 0 0 0 -3.7945925e-06 0
1.6500000e+02 0 20 0 -3.7945925e-06 0
1.6600000e+02 0 0 0 -3.7261659e-06 0
1.6600000e+02 0 20 0 -3.7261659e-06 0
1.6700000e+02 0 0 0 -3.6593749e-06 0
1.6700000e+02 0 20 0 -3.6593749e-06 0
1.6800000e+02 0 0 0 -3.5941708e-06 0
1.6800000e+02 0 20 0 -3.5941708e-06 0
1.6900000e+02 0 0 0 -3.5305069e-06 0
1.6900000e+02 0 20 0 -3.5305069e-06 0
1.7000000e+02 0 0 0 -3.4683379e-06 0
1.7000000e+02 0 20 0 -3.4683379e-06 0
1.7100000e+02 0 0 0 -3.4076203e-06 0
1.7100000e+02 0 20 0 -3.4076203e-06 0
1.7200000e+02 0 0 0 -3.3483118e-06 0
1.7200000e+02 0 20 0 -3.3483118e-06 0
1.7300000e+02 0 0 0 -3.2903720e-06 0
1.7300000e+02 0 20 0 -3.2903720e-06 0
1.7400000e+02 0 0 0 -3.2337616e-06 0
1.7400000e+02 0 20 0 -3.2337616e-06 0
1.7500000e+02 0 0 0 -3.1784426e-06 0
1.7500000e+02 0 20 0 -3.1784426e-06 0
1.7600000e+02 0 0 0 -3.1243785e-06 0
1.7600000e+02 0 20 0 -3.1243785e-06 0
1.7700000e+02 0 0 0 -3.0715338e-06 0
1.7700000e+02 0 20 0 -3.0715338e-06 0
1.7800000e+02 0 0 0 -3.0198745e-06 0
1.7800000e+02 0 20 0 -3.0198745e-06 0
1.7900000e+02 0 0 0 -2.9693674e-06 0
1.7900000e+02 0 20 0 -2.9693674e-06 0
1.8000000e+02 0 0 0 -2.9199807e-06 0
1.8000000e+02 0 20 0 -2.9199807e-06 0
1.8100000e+02 0 0 0 -2.8716834e-06 0
1.8100000e+02 0 20 0 -2.8716834e-06 0
1.8200000e+02 0 0 0 -2.8244456e-06 0
1.8200000e+02 0 20 0 -2.8244456e-06 0
1.8300000e+02 0 0 0 -2.7782385e-06 0
1.8300000e+02 0 20 0 -2.7782385e-06 0
1.8400000e+02 0 0 0 -2.7330342e-06 0
1.8400000e+02 0 20 0 -2.7330342e-06 0
1.8500000e+02 0 0 0 -2.6888054e-06 0
1.8500000e+02 0 20 0 -2.6888054e-06 0
1.8600000e+02 0 0 0 -2.6455262e-06 0
1.8600000e+02 0 20 0 -2.6455262e-06 0
1.8700000e+02 0 0 0 -2.6031711e-06 0
1.8700000e+02 0 20 0 -2.6031711e-06 0
1.8800000e+02 0 0 0 -2.5617156e-06 0
1.8800000e+02 0 20 0 -2.5617156e-06 0
1.8900000e+02 0 0 0 -2.5211360e-06 0
1.8900000e+02 0 20 0 -2.5211360e-06 0
1.9000000e+02 0 0 0 -2.4814092e-06 0
1.9000000e+02 0 20 0 -2.4814092e-06 0
1.9100000e+02 0 0 0 -2.4425130e-06 0
1.9100000e+02 0 20 0 -2.4425130e-06 0
1.9200000e+02 0 0 0 -2.4044257e-06 0
1.9200000e+02 0 20 0 -2.4044257e-06 0
1.9300000e+02 0 0 0 -2.3671265e-06 0
1.9300000e+02 0 20 0 -2.3671265e-06 0
1.9400000e+02 0 0 0 -2.3305950e-06 0
1.9400000e+02 0 20 0 -2.3305950e-06 0
1.9500000e+02 0 0 0 -2.2948117e-06 0
1.9500000e+02 0 20 0 -2.2948117e-06 0
1.9600000e+02 0 0 0 -2.2597574e-06 0
1.9600000e+02 0 20 0 -2.2597574e-06 0
1.9700000e+02 0 0 0 -2.2254136e-06 0
1.9700000e+02 0 20 0 -2.2254136e-06 0
1.9800000e+02 0 0 0 -2.1917626e-06 0
1.9800000e+02 0 20 0 -2.1917626e-06 0
1.9900000e+02 0 0 0 -2.1587868e-06 0
1.9900000e+02 0 20 0 -2.1587868e-06 0
2.0000000e+02 0 0 0 -2.1264695e-06 0
2.0000000e+02 0 20 0 -2.1264695e-06 0
2.0100000e+02 0 0 0 -2.0947942e-06 0
2.0100000e+02 0 20 0 -2.0947942e-06 0
2.0200000e+02 0 0 0 -2.0637452e-06 0
2.0200000e+02 0 20 0 -2.0637452e-06 0
2.0300000e+02 0 0 0 -2.0333069e-06 0
2.0300000e+02 0 20 0 -2.0333069e-06 0
2.0400000e+02 0 0 0 -2.0034646e-06 0
2.0400000e+02 0 20 0 -2.0034646e-06 0
2.0500000e+02 0 0 0 -1.9742035e-06 0
2.0500000e+02 0 20 0 -1.9742035e-06 0
2.0600000e+02 0 0 0 -1.9455098e-06 0
2.0600000e+02 0 20 0 -1.9455098e-06 0
2.0700000e+02 0 0 0 -1.9173696e-06 0
2.0700000e+02 0 20 0 -1.9173696e-06 0
2.0800000e+02 0 0 0 -1.8897697e-06 0
2.0800000e+02 0 20 0 -1.8897697e-06 0
2.0900000e+02 0 0 0 -1.8626972e-06 0
2.0900000e+02 0 20 0 -1.8626972e-06 0
2.1000000e+02 0 0 0 -1.8361395e-06 0
2.1000000e+02 0 20 0 -1.8361395e-06 0
2.1100000e+02 0 0 0 -1.8100845e-06 0
2.1100000e+02 0 20 0 -1.8100845e-06 0
2.1200000e+02 0 0 0 -1.7845203e-06 0
2.1200000e+02 0 20 0 -1.7845203e-06 0
2.1300000e+02 0 0 0 -1.7594355e-06 0
2.1300000e+02 0 20 0 -1.7594355e-06 0
2.1400000e+02 0 0 0 -1.7348188e-06 0
2.1400000e+02 0 20 0 -1.7348188e-06 0
2.1500000e+02 0 0 0 -1.7106593e-06 0
2.1500000e+02 0 20 0 -1.7106593e-06 0
2.1600000e+02 0 0 0 -1.6869465e-06 0
2.1600000e+02 0 20 0 -1.6869465e-06 0
2.1700000e+02 0 0 0 -1.6636702e-06 0
2.1700000e+02 0 20 0 -1.6636702e-06 0
2.1800000e+02 0 0 0 -1.6408202e-06 0
2.1800000e+02 0 20 0 -1.6408202e-06 0
2.1900000e+02 0 0 0 -1.6183870e-06 0
2.1900000e+02 0 20 0 -1.6183870e-06 0
2.2000000e+02 0 0 0 -1.5963610e-06 0
2.2000000e+02 0 20 0 -1.5963610e-06 0
2.2100000e+02 0 0 0 -1.5747331e-06 0
2.2100000e+02 0 20 0 -1.5747331e-06 0
2.2200000e+02 0 0 0 -1.5534942e-06 0
2.2200000e+02 0 20 0 -1.5534942e-06 0
2.2300000e+02 0 0 0 -1.5326357e-06 0
2.2300000e+02 0 20 0 -1.5326357e-06 0
2.2400000e+02 0 0 0 -1.5121491e-06 0
2.2400000e+02 0 20 0 -1.5121491e-06 0
2.2500000e+02 0 0 0 -1.4920261e-06 0
2.2500000e+02 0 20 0 -1.4920261e-06 0
2.2600000e+02 0 0 0 -1.4722587e-06 0
2.2600000e+02 0 20 0 -1.4722587e-06 0
2.2700000e+02 0 0 0 -1.4528392e-06 0
2.2700000e+02 0 20 0 -1.4528392e-06 0
2.2800000e+02 0 0 0 -1.4337598e-06 0
2.2800000e+02 0 20 0 -1.4337598e-06 0
2.2900000e+02 0 0 0 -1.4150131e-06 0
2.2900000e+02 0 20 0 -1.4150131e-06 0
2.3000000e+02 0 0 0 -1.3965920e-06 0
2.3000000e+02 0 20 0 -1.3965920e-06 0
2.3100000e+02 0 0 0 -1.3784893e-06 0
2.3100000e+02 0 20 0 -1.3784893e-06 0
2.3200000e+02 0 0 0 -1.3606983e-06 0
2.3200000e+02 0 20 0 -1.3606983e-06 0
2.3300000e+02 0 0 0 -1.3432122e-06 0
2.3300000e+02 0 20 0 -1.3432122e-06 0
2.3400000e+02 0 0 0 -1.3260246e-06 0
2.3400000e+02 0 20 0 -1.3260246e-06 0
2.3500000e+02 0 0 0 -1.3091291e-06 0
2.3500000e+02 0 20 0 -1.3091291e-06 0
2.3600000e+02 0 0 0 -1.2925195e-06 0
2.3600000e+02 0 20 0 -1.2925195e-06 0
2.3700000e+02 0 0 0 -1.2761899e-06 0
2.3700000e+02 0 20 0 -1.2761899e-06 0
2.3800000e+02 0 0 0 -1.2601342e-06 0
2.3800000e+02 0 20 0 -1.2601342e-06 0
2.3900000e+02 0 0 0 -1.2443469e-06 0
2.3900000e+02 0 20 0 -1.2443469e-06 0
2.4000000e+02 0 0 0 -1.2288222e-06 0
2.4000000e+02 0 20 0 -1.2288222e-06 0
2.4100000e+02 0 0 0 -1.2135549e-06 0
2.4100000e+02 0 20 0 -1.2135549e-06 0
2.4200000e+02 0 0 0 -1.1985395e-06 0
2.4200000e+02 0 20 0 -1.1985395e-06 0
2.4300000e+02 0 0 0 -1.1837709e-06 0
2.4300000e+02 0 20 0 -1.1837709e-06 0
2.4400000e+02 0 0 0 -1.1692440e-06 0
2.4400000e+02 0 20 0 -1.1692440e-06 0
2.4500000e+02 0 0 0 -1.1549539e-06 0
2.4500000e+02 0 20 0 -1.1549539e-06 0
2.4600000e+02 0 0 0 -1.1408959e-06 0
2.4600000e+02 0 20 0 -1.1408959e-06 0
2.4700000e+02 0 0 0 -1.1270652e-06 0
2.4700000e+02 0 20 0 -1.1270652e-06 0
2.4800000e+02 0 0 0 -1.1134572e-06 0
2.4800000e+02 0 20 0 -1.1134572e-06 0
2.4900000e+02 0 0 0 -1.1000674e-06 0
2.4900000e+02 0 20 0 -1.1000674e-06 0
2.5000000e+02 0 0 0 -1.0868916e-06 0
2.5000000e+02 0 20 0 -1.0868916e-06 0
2.5100000e+02 0 0 0 -1.0739254e-06 0
2.5100000e+02 0 20 0 -1.0739254e-06 0
2.5200000e+02 0 0 0 -1.0611648e-06 0
2.5200000e+02 0 20 0 -1.0611648e-06 0
2.5300000e+02 0 0 0 -1.0486055e-06 0
2.5300000e+02 0 20 0 -1.0486055e-06 0
2.5400000e+02 0 0 0 -1.0362438e-06 0
2.5400000e+02 0 20 0 -1.0362438e-06 0
2.5500000e+02 0 0 0 -1.0240757e-06 0
2.5500000e+02 0 20 0 -1.0240757e-06 0
2.5600000e+02 0 0 0 -1.0120974e-06 0
2.5600000e+02 0 20 0 -1.0120974e-06 0
2.5700000e+02 0 0 0 -1.0003052e-06 0
2.5700000e+02 0 20 0 -1.0003052e-06 0
2.5800000e+02 0 0 0 -9.8869563e-07 0
2.5800000e+02 0 20 0 -9.8869563e-07 0
2.5900000e+02 0 0 0 -9.7726506e-07 0
2.5900000e+02 0 20 0 -9.7726506e-07 0
2.6000000e+02 0 0 0 -9.6601007e-07 0
2.6000000e+02 0 20 0 -9.6601007e-07 0
2.6100000e+02 0 0 0 -9.5492732e-07 0
2.6100000e+02 0 20 0 -9.5492732e-07 0
2.6200000e+02 0 0 0 -9.4401351e-07 0
2.6200000e+02 0 20 0 -9.4401351e-07 0
2.6300000e+02 0 0 0 -9.3326544e-07 0
2.6300000e+02 0 20 0 -9.3326544e-07 0
2.6400000e+02 0 0 0 -9.2267997e-07 0
2.6400000e+02 0 20 0 -9.2267997e-07 0
2.6500000e+02 0 0 0 -9.1225405e-07 0
2.6500000e+02 0 20 0 -9.1225405e-07 0
2.6600000e+02 0 0 0 -9.0198466e-07 0
2.6600000e+02 0 20 0 -9.0198466e-07 0
2.6700000e+02 0 0 0 -8.9186889e-07 0
2.6700000e+02 0 20 0 -8.9186889e-07 0
2.6800000e+02 0 0 0 -8.8190387e-07 0
2.6800000e+02 0 20 0 -8.8190387e-07 0
2.6900000e+02 0 0 0 -8.7208681e-07 0
2.6900000e+02 0 20 0 -8.7208681e-07 0
2.7000000e+02 0 0 0 -8.6241497e-07 0
2.7000000e+02 0 20 0 -8.6241497e-07 0
2.7100000e+02 0 0 0 -8.5288566e-07 0
2.7100000e+02 0 20 0 -8.5288566e-07 0
2.7200000e+02 0 0 0 -8.4349629e-07 0
2.7200000e+02 0 20 0 -8.4349629e-07 0
2.7300000e+02 0 0 0 -8.3424427e-07 0
2.7300000e+02 0 20 0 -8.3424427e-07 0
2.7400000e+02 0 0 0 -8.2512712e-07 0
2.7400000e+02 0 20 0 -8.2512712e-07 0
2.7500000e+02 0 0 0 -8.1614239e-07 0
2.7500000e+02 0 20 0 -8.1614239e-07 0
2.7600000e+02 0 0 0 -8.0728767e-07 0
2.7600000e+02 0 20 0 -8.0728767e-07 0
2.7700000e+02 0 0 0 -7.9856062e-07 0
2.7700000e+02 0 20 0 -7.9856062e-07 0
2.7800000e+02 0 0 0 -7.8995895e-07 0
2.7800000e+02 0 20 0 -7.8995895e-07 0
2.7900000e+02 0 0 0 -7.8148042e-07 0
2.7900000e+02 0 20 0 -7.8148042e-07 0
2.8000000e+02 0 0 0 -7.7312283e-07 0
2.8000000e+02 0 20 0 -7.7312283e-07 0
2.8100000e+02 0 0 0 -7.6488402e-07 0
2.8100000e+02 0 20 0 -7.6488402e-07 0
2.8200000e+02 0 0 0 -7.5676191e-07 0
2.8200000e+02 0 20 0 -7.5676191e-07 0
2.8300000e+02 0 0 0 -7.4875442e-07 0
2.8300000e+02 0 20 0 -7.4875442e-07 0
2.8400000e+02 0 0 0 -7.4085954e-07 0
2.8400000e+02 0 20 0 -7.4085954e-07 0
2.8500000e+02 0 0 0 -7.3307530e-07 0
2.8500000e+02 0 20 0 -7.3307530e-07 0
2.8600000e+02 0 0 0 -7.2539977e-07 0
2.8600000e+02 0 20 0 -7.2539977e-07 0
2.8700000e+02 0 0 0 -7.1783106e-07 0
2.8700000e+02 0 20 0 -7.1783106e-07 0
2.8800000e+02 0 0 0 -7.1036730e-07 0
2.8800000e+02 0 20 0 -7.1036730e-07 0
2.8900000e+02 0 0 0 -7.0300670e-07 0
2.8900000e+02 0 20 0 -7.0300670e-07 0
2.9000000e+02 0 0 0 -6.9574747e-07 0
2.9000000e+02 0 20 0 -6.9574747e-07 0
2.9100000e+02 0 0 0 -6.8858787e-07 0
2.9100000e+02 0 20 0 -6.8858787e-07 0
2.9200000e+02 0 0 0 -6.8152620e-07 0
2.9200000e+02 0 20 0 -6.8152620e-07 0
2.9300000e+02 0 0 0 -6.7456080e-07 0
2.9300000e+02 0 20 0 -6.7456080e-07 0
2.9400000e+02 0 0 0 -6.6769001e-07 0
2.9400000e+02 0 20 0 -6.6769001e-07 0
2.9500000e+02 0 0 0 -6.6091226e-07 0
2.9500000e+02 0 20 0 -6.6091226e-07 0
2.9600000e+02 0 0 0 -6.5422595e-07 0
2.9600000e+02 0 20 0 -6.5422595e-07 0
2.9700000e+02 0 0 0 -6.4762956e-07 0
2.9700000e+02 0 20 0 -6.4762956e-07 0
2.9800000e+02 0 0 0 -6.4112159e-07 0
2.9800000e+02 0 20 0 -6.4112159e-07 0
2.9900000e+02 0 0 0 -6.3470054e-07 0
2.9900000e+02 0 20 0 -6.3470054e-07 0
3.0000000e+02 0 0 0 -6.2836498e-07 0
3.0000000e+02 0 20 0 -6.2836498e-07 0

View File

@@ -0,0 +1,949 @@
# Template suitable for beam profile detectioon with the spin rotator in place
# Zaher Salman 7/10/2010
#
# Thomas Prokscha 22/Nov/2012
# Moved sample stack on cryostat 3mm downstream to fit to positions in apparatus
# Changed positions of positron counters according to corrected drawing LEM 37.01.024 (19/Sep/2012)
#
# Position downstream detectors: z=+62.5mm original value: z=+66.5mm
# Position upstream detectors: z=-64.0mm original value: z=-60.0mm
#
# 2013 setup: 1mm Ti sample tube
#
# 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
#
# Ran Xiao 25/Sep/2014
# Start muons at moderator at x=499, assume cosA angular distribution, assume energy distribution
#
################################################################################################################
# -- ROTATION MATRICES --
################################################################################################################
# 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
/musr/command rotation rotRAnL 0 0 1 90
/musr/command rotation rotRAnD 0 0 1 180
# More Rotations
/musr/command rotation rotD1 0 0 1 11.250
/musr/command rotation rotD2 0 0 1 33.750
/musr/command rotation rotD3 0 0 1 56.250
/musr/command rotation rotD4 0 0 1 78.750
/musr/command rotation rotD5 0 0 1 101.250
/musr/command rotation rotD6 0 0 1 123.750
/musr/command rotation rotD7 0 0 1 146.250
/musr/command rotation rotD8 0 0 1 168.750
/musr/command rotation rotD9 0 0 1 191.250
/musr/command rotation rotD10 0 0 1 213.750
/musr/command rotation rotD11 0 0 1 236.250
/musr/command rotation rotD12 0 0 1 258.750
/musr/command rotation rotD13 0 0 1 281.250
/musr/command rotation rotD14 0 0 1 303.750
/musr/command rotation rotD15 0 0 1 326.250
/musr/command rotation rotD16 0 0 1 348.750
/musr/command rotation rotD17 0 0 1 11.250
/musr/command rotation rotD18 0 0 1 33.750
/musr/command rotation rotD19 0 0 1 56.250
/musr/command rotation rotD20 0 0 1 78.750
/musr/command rotation rotD21 0 0 1 101.250
/musr/command rotation rotD22 0 0 1 123.750
/musr/command rotation rotD23 0 0 1 146.250
/musr/command rotation rotD24 0 0 1 168.750
/musr/command rotation rotD25 0 0 1 191.250
/musr/command rotation rotD26 0 0 1 213.750
/musr/command rotation rotD27 0 0 1 236.250
/musr/command rotation rotD28 0 0 1 258.750
/musr/command rotation rotD29 0 0 1 281.250
/musr/command rotation rotD30 0 0 1 303.750
/musr/command rotation rotD31 0 0 1 326.250
/musr/command rotation rotD32 0 0 1 348.750
# Beam line bend at mirror
/musr/command rotation rotBend 0 1 0 -90
/musr/command rotation rotMirr 0 1 0 -45
################################################################################################################
# -- LEM GEOMETRY --
################################################################################################################
# WORLD = Laboratory reference frame, the origin is in the centre of the LEM sample tube
/musr/command construct box World 900 350 2600 G4_Galactic 0 0 0 no_logical_volume norot dead -1
/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 60 0.05 0 360 G4_Galactic 850 0 -1678 log_World rotBend dead 851
/musr/command construct tubs save1 0 60 0.05 0 360 G4_Galactic 800 0 -1678 log_World rotBend dead 852
/musr/command construct tubs save2 0 60 0.05 0 360 G4_Galactic 750 0 -1678 log_World rotBend dead 853
/musr/command construct tubs save3 0 60 0.05 0 360 G4_Galactic 700 0 -1678 log_World rotBend dead 854
/musr/command construct tubs save4 0 60 0.05 0 360 G4_Galactic 650 0 -1678 log_World rotBend dead 855
/musr/command construct tubs save5 0 60 0.05 0 360 G4_Galactic 600 0 -1678 log_World rotBend dead 856
/musr/command construct tubs save6 0 60 0.05 0 360 G4_Galactic 550 0 -1678 log_World rotBend dead 857
/musr/command construct tubs save7 0 60 0.05 0 360 G4_Galactic 500 0 -1678 log_World rotBend dead 858
/musr/command construct tubs save8 0 60 0.05 0 360 G4_Galactic 450 0 -1678 log_World rotBend dead 859
/musr/command construct tubs save9 0 60 0.05 0 360 G4_Galactic 400 0 -1678 log_World rotBend dead 860
/musr/command construct tubs save10 0 60 0.05 0 360 G4_Galactic 350 0 -1678 log_World rotBend dead 861
/musr/command construct tubs save11 0 60 0.05 0 360 G4_Galactic 300 0 -1678 log_World rotBend dead 862
/musr/command construct tubs save12 0 60 0.05 0 360 G4_Galactic 240 0 -1678 log_World rotBend dead 863
/musr/command construct tubs save13 0 60 0.05 0 360 G4_Galactic 200 0 -1678 log_World rotBend dead 864
/musr/command construct tubs save14 0 60 0.05 0 360 G4_Galactic 150 0 -1678 log_World rotBend dead 865
/musr/command construct tubs save15 0 60 0.05 0 360 G4_Galactic 100 0 -1678 log_World rotBend dead 866
/musr/command construct tubs save16 0 60 0.05 0 360 G4_Galactic 70 0 -1678 log_World rotBend dead 867
/musr/command construct tubs save17 0 60 0.05 0 360 G4_Galactic 0 0 -1620 log_World norot dead 868
/musr/command construct tubs save18 0 60 0.05 0 360 G4_Galactic 0 0 -1600 log_World norot dead 869
/musr/command construct tubs save19 0 60 0.05 0 360 G4_Galactic 0 0 -1550 log_World norot dead 870
/musr/command construct tubs save20 0 60 0.05 0 360 G4_Galactic 0 0 -1500 log_World norot dead 871
/musr/command construct tubs save21 0 60 0.05 0 360 G4_Galactic 0 0 -1450 log_World norot dead 872
/musr/command construct tubs save22 0 60 0.05 0 360 G4_Galactic 0 0 -1400 log_World norot dead 873
/musr/command construct tubs save23 0 60 0.05 0 360 G4_Galactic 0 0 -1350 log_World norot dead 874
/musr/command construct tubs save24 0 60 0.05 0 360 G4_Galactic 0 0 -1300 log_World norot dead 875
/musr/command construct tubs save25 0 60 0.05 0 360 G4_Galactic 0 0 -1250 log_World norot dead 876
/musr/command construct tubs save26 0 60 0.05 0 360 G4_Galactic 0 0 -1200 log_World norot dead 877
/musr/command construct tubs save27 0 60 0.05 0 360 G4_Galactic 0 0 -1150 log_World norot dead 878
/musr/command construct tubs save28 0 60 0.05 0 360 G4_Galactic 0 0 -1100 log_World norot dead 879
/musr/command construct tubs save29 0 60 0.05 0 360 G4_Galactic 0 0 -1050 log_World norot dead 880
/musr/command construct tubs save30 0 60 0.05 0 360 G4_Galactic 0 0 -1000 log_World norot dead 881
/musr/command construct tubs save31 0 60 0.05 0 360 G4_Galactic 0 0 -950 log_World norot dead 882
/musr/command construct tubs save32 0 60 0.05 0 360 G4_Galactic 0 0 -900 log_World norot dead 883
/musr/command construct tubs save33 0 60 0.05 0 360 G4_Galactic 0 0 -850 log_World norot dead 884
/musr/command construct tubs save34 0 60 0.05 0 360 G4_Galactic 0 0 -800 log_World norot dead 885
/musr/command construct tubs save35 0 60 0.05 0 360 G4_Galactic 0 0 -750 log_World norot dead 886
/musr/command construct tubs save36 0 60 0.05 0 360 G4_Galactic 0 0 -700 log_World norot dead 887
/musr/command construct tubs save37 0 60 0.05 0 360 G4_Galactic 0 0 -650 log_World norot dead 888
/musr/command construct tubs save38 0 60 0.05 0 360 G4_Galactic 0 0 -600 log_World norot dead 889
/musr/command construct tubs save39 0 60 0.05 0 360 G4_Galactic 0 0 -525 log_World norot dead 890
/musr/command construct tubs save40 0 60 0.05 0 360 G4_Galactic 0 0 -450 log_World norot dead 891
/musr/command construct tubs save41 0 60 0.05 0 360 G4_Galactic 0 0 -420 log_World norot dead 892
/musr/command construct tubs save42 0 60 0.05 0 360 G4_Galactic 0 0 -400 log_World norot dead 893
/musr/command construct tubs save43 0 60 0.05 0 360 G4_Galactic 0 0 -350 log_World norot dead 894
/musr/command construct tubs save44 0 60 0.05 0 360 G4_Galactic 0 0 -300 log_World norot dead 895
/musr/command construct tubs save45 0 60 0.05 0 360 G4_Galactic 0 0 -250 log_World norot dead 896
/musr/command construct tubs save46 0 60 0.05 0 360 G4_Galactic 0 0 -200 log_World norot dead 897
/musr/command construct tubs save47 0 60 0.05 0 360 G4_Galactic 0 0 -150 log_World norot dead 898
/musr/command construct tubs save48 0 60 0.05 0 360 G4_Galactic 0 0 -100 log_World norot dead 899
/musr/command construct tubs save49 0 60 0.05 0 360 G4_Galactic 0 0 -50 log_World norot dead 900
/musr/command construct tubs save50 0 60 0.05 0 360 G4_Galactic 0 0 0 log_World norot dead 901
/musr/command construct tubs save51 0 60 0.05 0 360 G4_Galactic 0 0 16 log_World norot dead 902
/musr/command construct tubs save52 0 60 0.05 0 360 G4_Galactic 0 0 100 log_World norot dead 903
/musr/command construct tubs save53 0 60 0.05 0 360 G4_Galactic 0 0 150 log_World norot dead 904
/musr/command visattributes G4_Galactic invisible
################################################################################################################
# -- APD Scintillators --
################################################################################################################
# Detectors volume (0,0,0) coninsides with World (0,0,0)
/musr/command construct tubs DetV 80 105 133 0 360 G4_Galactic 0 0 0 log_World norot dead 100
/musr/command visattributes log_DetV invisible
# For final design set
# BackHW=60
# BackCR=-64.0, 19/Sep/2012
# ForwHW=65.5
# ForwCR=62.5, 19/Sep/2012
# Back inner sections (Upstream) (v.i.)
# Final design (30 Jun 09, 19 Sep 12) BackHW=60.0mm (Half width or length), BackCR=-4-BackHW=-64.0mm (Center z coordinate)
/musr/command construct trd90y ScD1 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 -17.265493 -64.0 log_DetV rotD1 musr/ScintSD 1
/musr/command construct trd90y ScD2 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 -49.167966 -64.0 log_DetV rotD2 musr/ScintSD 2
/musr/command construct trd90y ScD3 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 -73.585061 -64.0 log_DetV rotD3 musr/ScintSD 3
/musr/command construct trd90y ScD4 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 -86.799497 -64.0 log_DetV rotD4 musr/ScintSD 4
/musr/command construct trd90y ScD5 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 -86.799497 -64.0 log_DetV rotD5 musr/ScintSD 5
/musr/command construct trd90y ScD6 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 -73.585061 -64.0 log_DetV rotD6 musr/ScintSD 6
/musr/command construct trd90y ScD7 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 -49.167966 -64.0 log_DetV rotD7 musr/ScintSD 7
/musr/command construct trd90y ScD8 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 -17.265493 -64.0 log_DetV rotD8 musr/ScintSD 8
/musr/command construct trd90y ScD9 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 17.265493 -64.0 log_DetV rotD9 musr/ScintSD 9
/musr/command construct trd90y ScD10 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 49.167966 -64.0 log_DetV rotD10 musr/ScintSD 10
/musr/command construct trd90y ScD11 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 73.585061 -64.0 log_DetV rotD11 musr/ScintSD 11
/musr/command construct trd90y ScD12 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 86.799497 -64.0 log_DetV rotD12 musr/ScintSD 12
/musr/command construct trd90y ScD13 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 86.799497 -64.0 log_DetV rotD13 musr/ScintSD 13
/musr/command construct trd90y ScD14 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 73.585061 -64.0 log_DetV rotD14 musr/ScintSD 14
/musr/command construct trd90y ScD15 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 49.167966 -64.0 log_DetV rotD15 musr/ScintSD 15
/musr/command construct trd90y ScD16 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 17.265493 -64.0 log_DetV rotD16 musr/ScintSD 16
# Forward inner sections (Downstream) (h.i.)
# Final design (30 June 09, 19 Sep 12) ForwHW=65.5mm (Half width or length), ForwCR=-3+ForwHW=62.5mm (Center z coordinate)
/musr/command construct trd90y ScD17 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 -17.070403 62.5 log_DetV rotD17 musr/ScintSD 17
/musr/command construct trd90y ScD18 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 -48.612395 62.5 log_DetV rotD18 musr/ScintSD 18
/musr/command construct trd90y ScD19 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 -72.753591 62.5 log_DetV rotD19 musr/ScintSD 19
/musr/command construct trd90y ScD20 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 -85.818712 62.5 log_DetV rotD20 musr/ScintSD 20
/musr/command construct trd90y ScD21 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 -85.818712 62.5 log_DetV rotD21 musr/ScintSD 21
/musr/command construct trd90y ScD22 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 -72.753591 62.5 log_DetV rotD22 musr/ScintSD 22
/musr/command construct trd90y ScD23 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 -48.612395 62.5 log_DetV rotD23 musr/ScintSD 23
/musr/command construct trd90y ScD24 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 -17.070403 62.5 log_DetV rotD24 musr/ScintSD 24
/musr/command construct trd90y ScD25 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 17.070403 62.5 log_DetV rotD25 musr/ScintSD 25
/musr/command construct trd90y ScD26 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 48.612395 62.5 log_DetV rotD26 musr/ScintSD 26
/musr/command construct trd90y ScD27 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 72.753591 62.5 log_DetV rotD27 musr/ScintSD 27
/musr/command construct trd90y ScD28 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 85.818712 62.5 log_DetV rotD28 musr/ScintSD 28
/musr/command construct trd90y ScD29 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 85.818712 62.5 log_DetV rotD29 musr/ScintSD 29
/musr/command construct trd90y ScD30 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 72.753591 62.5 log_DetV rotD30 musr/ScintSD 30
/musr/command construct trd90y ScD31 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 48.612395 62.5 log_DetV rotD31 musr/ScintSD 31
/musr/command construct trd90y ScD32 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 17.070403 62.5 log_DetV rotD32 musr/ScintSD 32
# Back outer sections (v.a.)
/musr/command construct trd ScD33 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 -18.631126 -64.0 log_DetV rotD1 musr/ScintSD 33
/musr/command construct trd ScD34 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 -53.056957 -64.0 log_DetV rotD2 musr/ScintSD 34
/musr/command construct trd ScD35 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 -79.405348 -64.0 log_DetV rotD3 musr/ScintSD 35
/musr/command construct trd ScD36 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 -93.664994 -64.0 log_DetV rotD4 musr/ScintSD 36
/musr/command construct trd ScD37 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 -93.664994 -64.0 log_DetV rotD5 musr/ScintSD 37
/musr/command construct trd ScD38 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 -79.405348 -64.0 log_DetV rotD6 musr/ScintSD 38
/musr/command construct trd ScD39 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 -53.056957 -64.0 log_DetV rotD7 musr/ScintSD 39
/musr/command construct trd ScD40 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 -18.631126 -64.0 log_DetV rotD8 musr/ScintSD 40
/musr/command construct trd ScD41 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 18.631126 -64.0 log_DetV rotD9 musr/ScintSD 41
/musr/command construct trd ScD42 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 53.056957 -64.0 log_DetV rotD10 musr/ScintSD 42
/musr/command construct trd ScD43 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 79.405348 -64.0 log_DetV rotD11 musr/ScintSD 43
/musr/command construct trd ScD44 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 93.664994 -64.0 log_DetV rotD12 musr/ScintSD 44
/musr/command construct trd ScD45 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 93.664994 -64.0 log_DetV rotD13 musr/ScintSD 45
/musr/command construct trd ScD46 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 79.405348 -64.0 log_DetV rotD14 musr/ScintSD 46
/musr/command construct trd ScD47 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 53.056957 -64.0 log_DetV rotD15 musr/ScintSD 47
/musr/command construct trd ScD48 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 18.631126 -64.0 log_DetV rotD16 musr/ScintSD 48
# Forward outer sections (h.a.)
/musr/command construct trd ScD49 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 -18.436035 62.5 log_DetV rotD1 musr/ScintSD 49
/musr/command construct trd ScD50 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 -52.501387 62.5 log_DetV rotD2 musr/ScintSD 50
/musr/command construct trd ScD51 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 -78.573878 62.5 log_DetV rotD3 musr/ScintSD 51
/musr/command construct trd ScD52 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 -92.684209 62.5 log_DetV rotD4 musr/ScintSD 52
/musr/command construct trd ScD53 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 -92.684209 62.5 log_DetV rotD5 musr/ScintSD 53
/musr/command construct trd ScD54 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 -78.573878 62.5 log_DetV rotD6 musr/ScintSD 54
/musr/command construct trd ScD55 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 -52.501387 62.5 log_DetV rotD7 musr/ScintSD 55
/musr/command construct trd ScD56 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 -18.436035 62.5 log_DetV rotD8 musr/ScintSD 56
/musr/command construct trd ScD57 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 18.436035 62.5 log_DetV rotD9 musr/ScintSD 57
/musr/command construct trd ScD58 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 52.501387 62.5 log_DetV rotD10 musr/ScintSD 58
/musr/command construct trd ScD59 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 78.573878 62.5 log_DetV rotD11 musr/ScintSD 59
/musr/command construct trd ScD60 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 92.684209 62.5 log_DetV rotD12 musr/ScintSD 60
/musr/command construct trd ScD61 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 92.684209 62.5 log_DetV rotD13 musr/ScintSD 61
/musr/command construct trd ScD62 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 78.573878 62.5 log_DetV rotD14 musr/ScintSD 62
/musr/command construct trd ScD63 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 52.501387 62.5 log_DetV rotD15 musr/ScintSD 63
/musr/command construct trd ScD64 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 18.436035 62.5 log_DetV rotD16 musr/ScintSD 64
# Structural support inside the detectors vessel
# Carbon fibre, inner radius 80, thickness 2 mm.
# Additional Al plate removed, 2 mm thick for h.i and h.a and 3 mm thick for v.i. and v.a
/musr/command construct tubs hInShell 80.0 82.0 65.5 0 360 G4_C 0 0 62 log_DetV norot dead 70
/musr/command construct tubs vInShell 80.0 82.0 60.0 0 360 G4_C 0 0 -64.5 log_DetV norot dead 70
# Visual attributes (optional)
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE green
#/musr/command visattributes log_ScD49 green
#/musr/command visattributes log_ScD50 green
#/musr/command visattributes log_test red
################################################################################################################
# Sample vacuum/tube up to gate valve - Can host either the Cryostat or the MCP2
################################################################################################################
# Vacuum space
# /musr/command construct tubs SamV 0 75.0 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100
# Sample tube
#/musr/command construct tubs SamS 75.0 77.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# 2012: 2mm Ti tube, 2013: 1mm
/musr/command construct tubs SamS 75.0 76.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# F160 - 160 CF flange upstream of MCP2 tube
/musr/command construct tubs F160 78.0 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 102
# F100 (Blank end flange)
/musr/command construct tubs F100 0 75.0 10 0 360 Steel 0 0 172.0 log_World norot dead 103
# 200 CF flange upstream of MCP2 tube covering the whole length of the gate valve chamber.
/musr/command construct tubs GATS 103.25 126.5 92.5 0 360 Steel 0 0 -254.5 log_World norot dead 371
# F200 - 200 CF flange upstream of MCP2 tube to connect to gate valve chamber
/musr/command construct tubs F200 76.5 103.25 12 0 360 Steel 0 0 -174.0 log_World norot dead 372
# Visual attributes (optional)
#/musr/command visattributes log_SamV invisible
/musr/command visattributes log_SamS oxsteel
/musr/command visattributes log_F160 oxsteel
#/musr/command visattributes log_F100 oxsteel
/musr/command visattributes log_GATS oxsteel
/musr/command visattributes log_F200 oxsteel
################################################################################################################
# MCP - Micro Channel Plate Detector MCP2
# mcpv_z = -92.5 mm!
#
# We have a 324 mm long sample tube;
# the MCP2 front side is at 142 mm from the end of the sample tube.
# the front face of the sample plate of the cryostat is 145 mm from the end of the sample tube.
#
################################################################################################################
#
# MCPM1 - MCP Macor ring 1
# MCPD - electron multiplying glass disk (also known as target)
# Sensitive surface at z = 20 mm wrt. World
# MCPM2 - MCP Macor ring 2
# /musr/command construct tubs MCPM1 24 32.5 0.75 0 360 Macor 0 0 19.25 log_World norot dead 251
# Use it either as (DMCP-musr/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz.
# /musr/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 21.5 log_World norot dead 252
# /musr/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 23.75 log_World norot dead 253
# NOTE: To intercept ALL the incoming muons, comment the DMCP and MCPM1 lines above and uncomment this one:
#*aa/musr/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs target 0 21.0 1.5 0 360 MCPglass 0 0 114 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs saveTarget 0 75.0 0.2 0 360 G4_Galactic 0 0 110.79 log_SamV norot dead 222
#
# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole)
# MCVR - "Vacuum Ring" (circular hole)
# /musr/command construct box MCSR 36.5 36.5 1 Steel 0 0 25.5 log_World norot dead 254
# /musr/command construct tubs MCVR 0 27.5 1 0 360 G4_Galactic 0 0 0 log_MCSR norot dead 255
# 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
# /musr/command construct box MCPA 36.5 36.5 4 Steel 0 0 37 log_World norot dead 256
# /musr/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 257
# /musr/command construct tubs ANVA2 0 27.5 1.5 0 360 G4_Galactic 0 0 2.5 log_MCPA norot dead 258
# MCSS - MCP Stainless Steel Support Ring
# /musr/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 69.8 log_World norot dead 259
# MCP2 visual attributes (optional)
#/musr/command visattributes log_DMCP MCP_style
#*/musr/command visattributes log_target MCP_style
#*/musr/command visattributes log_MCPM1 MACOR_style
#*------ /musr/command visattributes log_MCPM2 MACOR_style
################################################################################################################
# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm)
#
# sample plate front face is at z = 17mm:
# cold finger distance to CF100: 130mm
# 5mm base plate + 6mm sapphire + 4mm sample plate = 15mm
# sample plate front face from CF100: 145mm
# z-position of sample plate front face: 324/2-145mm = 17mm
# --> sample plate center is at 17+2=19mm
#
################################################################################################################
# Dimensions for large/small sample plates SamPL=35/21 and SaphPL=SamPL35-5
/musr/command construct tubs target 0 35 2 0 360 G4_Al 0 0 19.0 log_World norot dead 251
/musr/command construct tubs SAPH 0 30 3 0 360 G4_ALUMINUM_OXIDE 0 0 24.0 log_World norot dead 252
/musr/command construct tubs SAH1 0 35 2.5 0 360 G4_Al 0 0 29.5 log_World norot dead 253
# Special save target volume
/musr/command construct tubs saveTarget 0 40 0.05 0 360 G4_Galactic 0 0 16.9 log_World norot dead 253
# Other components of the cryostat (dimensions and position of CRY4 are only approx. because unknown)
# COld Finger
/musr/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 37.0 log_World norot dead 261
# End plate of cryostat (7 mm thick, 30 mm diameter)
/musr/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 45.5 log_World norot dead 262
# Heat exchanger (assuming a 10 mm opening - Original dimensions not known.) # OLD pos. 160.0
/musr/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 74.0 log_World norot dead 263
# Mounting ring for He-shield
/musr/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 54.0 log_World norot dead 264
# 2 mm thick plate for mounting ring. This is just to close the downstream side.
/musr/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 54.0 log_World norot dead 265
# Radiation shield
/musr/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 19.0 log_World norot dead 266
# Front part of the radiation shield
/musr/command construct tubs CRSH2 30 48 0.5 0 360 G4_Cu 0 0 -26.5 log_World norot dead 267
# Electrical Field Guard Rings (distance between the guard rings: 16 mm)
# /musr/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 -13.5 log_World norot dead 271
# /musr/command construct tubs Guard2 29 38 1.5 0 360 G4_Cu 0 0 2.5 log_World norot dead 272
# Cryostat visual attributes (optional)
/musr/command visattributes log_SAH1 oxsteel
#/musr/command visattributes log_SAH2 oxsteel
/musr/command visattributes log_target oxsteel
/musr/command visattributes log_SAPH MACOR_style
#/musr/command visattributes log_SAH3 oxsteel
/musr/command visattributes log_CRSH yellow
/musr/command visattributes log_CRSH2 yellow
#/musr/command visattributes log_test red
################################################################################################################
# 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
/musr/command construct cons RA_EU 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World norot dead 801
/musr/command construct cons RA_MU 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World norot dead 802
/musr/command construct cons RA_ER 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnR dead 803
/musr/command construct cons RA_MR 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnR dead 804
/musr/command construct cons RA_ED 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnD dead 805
/musr/command construct cons RA_MD 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnD dead 806
/musr/command construct cons RA_EL 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnL dead 807
/musr/command construct cons RA_ML 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnL dead 808
# 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_T 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 822
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.02 log_World rotRAnR dead 824
/musr/command construct tubs RA_B 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 826
/musr/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.06 log_World rotRAnL dead 828
# 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 831
# Ring Anodes visual attributes (optional)
/musr/command visattributes log_RA_G invisible
#/musr/command visattributes log_RA_G Grid_style
################################################################################################################
# Trigger - Trigger Detector # Triggerz = -1092 mm; total length of TD is 110 mm; carbon foil at -1144 mm.
################################################################################################################
# Trigger volume
/musr/command construct tubs TrigV 90 127 148 0 360 G4_Galactic 0 0 -495 log_World norot dead 600
# Trigger tube
/musr/command construct tubs TrigS 100 103 148 0 360 Steel 0 0 0 log_TrigV norot dead 601
# TF - Trigger tube flanges
/musr/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 136 log_TrigV norot dead 611
/musr/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -136 log_TrigV norot dead 612
# trigger foil is 52-55mm upstream of TrigV center
# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm).
# USE THE NAME CFoil or coulombCFoil, otherwise musrMuFormation won't work!
#/musr/command construct box CFoil 60 60 0.0000025 G4_GRAPHITE 0 0 -550 log_World norot dead 621
/musr/command construct box CFoil 60 60 0.000002 G4_GRAPHITE 0 0 -550 log_World norot dead 621
# 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 musrDetectorConstruction.cc and set any density.
# Trigger visual attributes (optional)
/musr/command visattributes log_TrigV oxsteel
/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_saveAfterTD darkred
# Trigger Lens, L3, center -382 length 70mm radius 65mm.
/musr/command construct tubs TL3S 65.0 70.0 35.0 0 360 G4_Galactic 0 0 -382 log_World norot dead 706 nofield
/musr/command visattributes log_TL3S red
# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL.
# E.g. /musr/command visattributes Steel red
################################################################################################################
# L2 - 2nd Einzel Lens # L3z = -56.7 cm. (it was "L3" in 2011 and before)
# Lens Gap = 12.0 mm => G/D = 12/130 ~ 0.1 (Lens Gap = gap between Ground and Anode, D - Diameter)
################################################################################################################
# L3 volume
/musr/command construct tubs L3V 65 127 220 0 360 G4_Galactic 0 0 -863 log_World norot dead 400
# Lens 3 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 720 mm)
/musr/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 0 log_L3V norot dead 401
# Lens 3 Flange 1, z = L3z + 208 mm
/musr/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -208 log_L3V norot dead 402
# Lens 3 Flange 2, z = L3z - 208 mm
/musr/command construct tubs L3F2 103 126.5 12 0 360 Steel 0 0 208 log_L3V norot dead 403
# GPn - Ground Potential Electrodes
# n = 1-4 (further from TD) and 5-8 (closer to TD) - components of the Ground Electrodes
# Ground Electrode (inner dia: 130 mm, outer dia: 134 mm, length: 133 mm)
/musr/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 421
# Outer electrode surface (LN2 cooling vessel)
/musr/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 422
# First ring cap
/musr/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3V norot dead 423
# Second ring cap
/musr/command construct tubs L3GP4 67 81 4 0 360 Steel 0 0 71.0 log_L3V norot dead 424
/musr/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 431
/musr/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 432
/musr/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3V norot dead 433
/musr/command construct tubs L3GP8 67 81 4 0 360 Steel 0 0 -71.0 log_L3V norot dead 434
# HP - High Potential Electrode (Central Anode - usually at +8.7 kV, for a 15 keV muon beam)
/musr/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3V norot dead 451
# Lens 3 visual attributes (optional)
/musr/command visattributes log_L3V invisible
/musr/command visattributes log_L3ST oxsteel
/musr/command visattributes log_L3F1 oxsteel
/musr/command visattributes log_L3F2 oxsteel
/musr/command visattributes log_L3HP darkred
################################################################################################################
# -- SPIN ROTATOR GEOMETRY --
################################################################################################################
# Spin Rotator volume
/musr/command construct tubs SRENV 50 320 201.5 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 100
/musr/command visattributes log_SRENV invisible
# Electromagnet with iron yoke
# U - up, D - down, L - left, R - right (with respect to muon's view - momentum direction)
/musr/command construct box NPole 200 10 150 G4_Fe 0 85 0 log_SRENV norot dead 201
/musr/command construct box NYoke 150 22.5 50 G4_Fe 0 117.5 0 log_SRENV norot dead 202
/musr/command construct box NConn 225 17.5 190.0 G4_Fe 0 157.5 0 log_SRENV norot dead 203
/musr/command construct box SPole 200 10 150 G4_Fe 0 -85 0 log_SRENV norot dead 205
/musr/command construct box SYoke 150 22.5 50 G4_Fe 0 -117.5 0 log_SRENV norot dead 206
/musr/command construct box SConn 225 17.5 190.0 G4_Fe 0 -157.5 0 log_SRENV norot dead 207
# Front mirror plate
/musr/command construct box FShU 225 50 5 G4_Fe 0 125 -195.0 log_SRENV norot dead 301
/musr/command construct box FShD 225 50 5 G4_Fe 0 -125 -195.0 log_SRENV norot dead 302
/musr/command construct box FShL 75 75 5 G4_Fe 150 0 -195.0 log_SRENV norot dead 303
/musr/command construct box FShR 75 75 5 G4_Fe -150 0 -195.0 log_SRENV norot dead 304
# Back mirror plate
/musr/command construct box BShU 225 50 5 G4_Fe 0 125 195.0 log_SRENV norot dead 321
/musr/command construct box BShD 225 50 5 G4_Fe 0 -125 195.0 log_SRENV norot dead 322
/musr/command construct box BShL 75 75 5 G4_Fe 150 0 195.0 log_SRENV norot dead 323
/musr/command construct box BShR 75 75 5 G4_Fe -150 0 195.0 log_SRENV norot dead 324
# Top coils
/musr/command construct box TCoil1 170 22.5 10 G4_Cu 0 117.5 -60 log_SRENV norot dead 401
/musr/command construct box TCoil2 170 22.5 10 G4_Cu 0 117.5 60 log_SRENV norot dead 402
/musr/command construct box TCoil3 10 22.5 50 G4_Cu 160 117.5 0 log_SRENV norot dead 403
/musr/command construct box TCoil4 10 22.5 50 G4_Cu -160 117.5 0 log_SRENV norot dead 404
# Bottom coils
/musr/command construct box BCoil1 170 22.5 10 G4_Cu 0 -117.5 -60 log_SRENV norot dead 421
/musr/command construct box BCoil2 170 22.5 10 G4_Cu 0 -117.5 60 log_SRENV norot dead 422
/musr/command construct box BCoil3 10 22.5 50 G4_Cu 160 -117.5 0 log_SRENV norot dead 423
/musr/command construct box BCoil4 10 22.5 50 G4_Cu -160 -117.5 0 log_SRENV norot dead 424
# Capacitor
/musr/command construct box Cap_p 0.5 50 150 Brass 55 0 0 log_SRENV norot dead 501
/musr/command construct box Cap_n 0.5 50 150 Brass -55 0 0 log_SRENV norot dead 502
#*/musr/command construct box Uniform 49 49 150 G4_Galactic 0 0 0 log_SRENV norot dead 503
/musr/command construct tubs RodCapUp 0 5 150 90 180 Brass 55 55 0 log_SRENV norot dead 504
/musr/command construct tubs RodCapUn 0 5 150 -90 180 Brass -55 55 0 log_SRENV norot dead 505
/musr/command construct tubs RodCapDp 0 5 150 90 180 Brass 55 -55 0 log_SRENV norot dead 506
/musr/command construct tubs RodCapDn 0 5 150 -90 180 Brass -55 -55 0 log_SRENV norot dead 507
# Rods
/musr/command construct tubs RodPosU 0 5 150 0 360 Brass 27.5 55 0 log_SRENV norot dead 511
/musr/command construct tubs Rod0U 0 5 150 0 360 Brass 0 55 0 log_SRENV norot dead 512
/musr/command construct tubs RodNegU 0 5 150 0 360 Brass -27.5 55 0 log_SRENV norot dead 513
/musr/command construct tubs RodPosD 0 5 150 0 360 Brass 27.5 -55 0 log_SRENV norot dead 514
/musr/command construct tubs Rod0D 0 5 150 0 360 Brass 0 -55 0 log_SRENV norot dead 515
/musr/command construct tubs RodNegD 0 5 150 0 360 Brass -27.5 -55 0 log_SRENV norot dead 516
# Vacuum vessel
/musr/command construct box TVac1 72.5 2.5 191.5 Steel 0 72.5 0 log_SRENV norot dead 601
/musr/command construct box TVac2 2.5 70.0 191.5 Steel 72.5 0 0 log_SRENV norot dead 602
/musr/command construct box TVac3 72.5 2.5 191.5 Steel 0 -72.5 0 log_SRENV norot dead 603
/musr/command construct box TVac4 2.5 70.0 191.5 Steel -72.5 0 0 log_SRENV norot dead 604
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For Spin Rotator
/musr/command construct tubs SREField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 630 nofield
/musr/command construct tubs SRBField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.51 log_World norot dead 631 nofield
/musr/command visattributes G4_Cu red
/musr/command visattributes G4_Fe blue
/musr/command visattributes Brass yellow
################################################################################################################
# Lens 1 - 1st Einzel Lens
################################################################################################################
# L1ENV - Lens 1 envelope - for easy positioning of lens parts (outer dia: 100 mm, length: 300 mm)
#/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 0 0 -1929.5 log_World norot dead 600
/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend 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
# n = 2 - Ground Electrode 2 (closer to SR).
/musr/command construct tubs L1GP2 40 44 50 0 360 Steel 0 0 100 log_L1ENV norot dead 653
# HP - High Potential Electrode (Central Anode - usually at +8.5 kV, for a 15 keV muon beam)
/musr/command construct tubs L1HP 40 44 40 0 360 Steel 0 0 0 log_L1ENV norot dead 652
# Lens 1 visual attributes (optional)
/musr/command visattributes log_L1HP darkred
################################################################################################################
# Electrostatic field at accelerator after moderator
################################################################################################################
#
/musr/command construct box Grid1 9.1 25 25 G4_Galactic 489.9 0.0 -1678.0 log_World norot dead 212
/musr/command globalfield Grid1_field 9.1 25 25 uniform 489.9 0.0 -1678.0 log_Grid1 0 0 0 -0.2527 0 0
/musr/command construct box Grid2 5 24 24 G4_Galactic 475.8 0.0 -1678.0 log_World norot dead 214
/musr/command globalfield Grid2_field 5 24 24 uniform 475.8 0.0 -1678.0 log_Grid2 0 0 0 -1.04 0 0
/musr/command globalfield printFieldValueAtPoint 489.9 0.0 -1678.0
/musr/command globalfield printFieldValueAtPoint 475.8 0.0 -1678.0
################################################################################################################
# Electrostatic mirror at bend
################################################################################################################
# MRENV
/musr/command construct box MirrE 65 65 10 G4_Galactic 14.14213562 0.0 -1678.0 log_World rotMirr dead 200
/musr/command globalfield Mirr_field 65 65 10 uniform 14.14213562 0.0 -1678.0 log_MirrE 0 0 0 0 0 0.75
###################################################################################
################### E L E C T R O M G N E T I C F I E L D S ##################
###################################################################################
# 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!
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For L1
/musr/command construct tubs L1EField 0 0.01 0.005 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend dead 706 nofield
# For L2 (L3 before 2012)
/musr/command construct tubs L3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -863.0 log_World norot dead 708 nofield
# LENS 1. Best L1 settings: 7.2 kV for 12 keV muons
/musr/command globalfield Lens1EField 251.5 0.0 -1678.0 fromfile 2DE L1_Erz.map log_L1EField 9.0
# LENS 2. Best L3 settings: 8.4 kV for 12 keV muons
/musr/command globalfield Lens3EField 0. 0. -863.0 fromfile 2DE L3_Erz.map log_L3EField 10.5
# Spin rotator
# Electric field should be 370mm plates
# Magnetic field should be 260mm poles as measured srlem_ext.map
/musr/command globalfield Ele_field 0. 0. -1284.5 fromfile 3DE E_Sep_P37.5cm.map log_SREField 2.717
/musr/command globalfield Mag_field 0. 0. -1284.51 fromfile 3DB srlem_ext.map log_SRBField -0.00692
# 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
# 57.15mm upstream center
/musr/command construct box TriggE0 45 45 5 G4_Galactic 0 0 -555.1 log_World norot dead 630 nofield
# 48mm upstream center
/musr/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -543. log_World norot dead 631 nofield
# 2.25mm downstream center
/musr/command construct box TriggE2 45 45 4.9479 G4_Galactic 0 0 -492.75 log_World rotTrig dead 632 nofield
# 54mm downstream center
/musr/command construct box TriggE3 45 45 4 G4_Galactic 0 0 -441.0 log_World norot dead 633
### Electric field at TRIGGER Detector TD: Three different uniform fields, 2012 settings
/musr/command globalfield Trigg0_field 45 45 5 uniform 0. 0. -555.1 log_TriggE0 0 0 0 0 0 0.338
/musr/command globalfield Trigg1_field 45 45 4 uniform 0. 0. -543. log_TriggE1 0 0 0 0 0 -0.02375
/musr/command globalfield Trigg2_field 45 45 4.9497 uniform 0. 0. -492.75 log_TriggE2 0 0 0 0 0 0.041416
/musr/command globalfield Trigg3_field 45 45 4 uniform 0. 0. -441.0 log_TriggE3 0 0 0 0 0 -0.45
# Trigger Lens, L3, (available space from -437 to -347, we use 70mm of that)
/musr/command construct tubs TL3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -382.0 log_World norot dead 706 nofield
/musr/command globalfield ColRingEField 0. 0. -382.0 fromfile 2DE CR7cm_Grid.map log_TL3EField 12.0
### Electric field at RING ANODE - from 3DE field map
# To create an arbitrary configuration, switch on all fields and set different potentials.
/musr/command globalfield RngAnT_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_T 11.9
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 11.9
/musr/command globalfield RngAnB_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_B 11.9
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 11.9
### 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_convMap.map log_SBField 0.
### Electric field at the sample
/musr/command construct tubs SEField 0 0.01 0.005 0 360 G4_Galactic 0.0 0.0 15.9 log_World norot dead 710 nofield
/musr/command globalfield SampleEField 0. 0. 15.9 fromfile 2DE SamplePlate_2DE.map log_SEField 0.0
# Set parameters for particle tracking in an EM field
/musr/command globalfield setparameter SetLargestAcceptableStep 5
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
# TESTING EM FIELD
/musr/command globalfield printFieldValueAtPoint 0. 0. 0.
/musr/command globalfield printFieldValueAtPoint 0. 35. -670.
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.10
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
#/musr/command process addModel mu+ G4MuMultipleScattering G4WentzelVIModel 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ musrMuEnergyLossLandau -1 -1 1
# parameters for Landau energy loss distribution, LandauSigma corresponds to the width of the distibution
/musr/command SetLandauMPV 0.01
/musr/command SetLandauSigma 0.3
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#/musr/command process addDiscreteProcess mu+ G4CoulombScattering
#/musr/command process addProcess mu+ G4UserSpecialCuts -1 -1 3
#/musr/command process addProcess mu+ G4StepLimiter -1 -1 4
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
#/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
#/musr/command signalSeparationTime 0.1
#
/musr/run/randomOption 1
################################################################################################################
# -- Setting simulation PARAMETERS --
################################################################################################################
# Set the overall range cut (default 0.1 mm)
#*/run/setCut 1 mm
# Set the range cut on particular volumes (in mm)
#/musr/command SetUserLimits log_CFoil 1e-8 -1 -1 -1 -1
#*/musr/command SetUserLimits log_target 0.01
#*/musr/command SetUserLimits log_targetscint 0.01
#*/musr/command SetUserLimits log_cryostatscint 0.01
# Set particle energy cuts on particular volumes (in eV)
#/musr/command SetUserLimits log_World ustepMax(mm) utrakMax(mm) utimeMax(ns) uekinMin(MeV) urangMin(mm)
#/musr/command SetUserLimits log_World -1 -1 -1 1e-7 -1
# Geant4 10.2
#------------
/process/em/lowestMuHadEnergy 1e-6 MeV
# Store ALL the events in a ROOT tree or just the interesting ones? (default is true)
#*/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
# Override runID number
#*/musr/run/runID 21
# Set the frequency of event printing
/musr/run/howOftenToPrintEvent 100
# 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
/musr/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
#*/control/execute visdawn.mac
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
#/musr/command rootOutput weight off
#/musr/command rootOutput BFieldAtDecay off
#/musr/command rootOutput muIniPosX off
#/musr/command rootOutput muIniPosY off
#/musr/command rootOutput muIniPosZ off
#/musr/command rootOutput muIniMomX off
#/musr/command rootOutput muIniMomY off
#/musr/command rootOutput muIniMomZ off
#/musr/command rootOutput muIniPolX off
#/musr/command rootOutput muIniPolY off
#/musr/command rootOutput muIniPolZ off
#/musr/command rootOutput muDecayDetID off
#/musr/command rootOutput muDecayPosX off
#/musr/command rootOutput muDecayPosY off
#/musr/command rootOutput muDecayPosZ off
#/musr/command rootOutput muDecayTime off
#/musr/command rootOutput muDecayPolX off
#/musr/command rootOutput muDecayPolY off
#/musr/command rootOutput muDecayPolZ off
#/musr/command rootOutput muTargetTime off
#/musr/command rootOutput muTargetPolX off
#/musr/command rootOutput muTargetPolY off
#/musr/command rootOutput muTargetPolZ off
#/musr/command rootOutput muM0Time off
#/musr/command rootOutput muM0PolX off
#/musr/command rootOutput muM0PolY off
#/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
#/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
/musr/command storeOnlyEventsWithHits false
################################################################################################################
# -- Setting PARTICLE GUN parameters --
################################################################################################################
# Default momentum direction: 001, i.e. 0z.
# Default muon soin 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 -1144 mm, acceleration starts at -1154.15 mm
#/gun/vertex 0. 0. -2119.5 mm
/gun/vertex 499 0. -1678.0 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 6.83 6.83 0 mm
/gun/vertexsigma -15 -15 0 mm
#/gun/boxboundarycentre 499 0 -1678 mm
#/gun/boxboundary 15 15 1 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
# Set muon energy before hitting TD; a constant field in front of the C-foil accelerates the muons
# to add 3.38 keV
/gun/kenergy 15.0 eV
# Set beam momentum direction
/gun/direction -1.0 0.0 0.0
# Set muon spin direction: +10deg or 0
/gun/muonPolarizVector 0.9848 0 0.17365
#/gun/muonPolarizVector 1 0 0
# Other useful test parameters:
#------------------Oct.20 2015------------------------------------
# kenergy= 15 eV Pmu= 0.xxxMeV/c ==> sigma = /2.354 = MeV/c
#/gun/momentumsmearing 0.07508 MeV
/gun/momentumsmearing 0.016 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#*/gun/momentumboundary 20 40 0 MeV
#---/gun/tilt: xangle, yangle, dummy
#*/gun/tilt 0 0.0 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.0 deg
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#*/gun/decaytimelimits 10400 10420 2197.03 ns
#/gun/tiltsigma 1.4 1.4 0 deg
/gun/tiltsigma 0 0 -1.0 deg
# Selectively inactivate or activate sensitive detectors
#*/hits/inactivate /musr/ScintSD
# Only for code debugging!
/tracking/verbose 0
# BEAM ON
#/run/beamOn 1000000
#/run/beamOn 10
/run/beamOn 10000

View File

@@ -0,0 +1,950 @@
# Template suitable for beam profile detectioon with the spin rotator in place
# Zaher Salman 7/10/2010
#
# Thomas Prokscha 22/Nov/2012
# Moved sample stack on cryostat 3mm downstream to fit to positions in apparatus
# Changed positions of positron counters according to corrected drawing LEM 37.01.024 (19/Sep/2012)
#
# Position downstream detectors: z=+62.5mm original value: z=+66.5mm
# Position upstream detectors: z=-64.0mm original value: z=-60.0mm
#
# 2013 setup: 1mm Ti sample tube
#
# 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
#
# Ran Xiao 25/Sep/2014
# Start muons at moderator at x=499, assume cosA angular distribution, assume energy distribution
#
################################################################################################################
# -- ROTATION MATRICES --
################################################################################################################
# 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
/musr/command rotation rotRAnL 0 0 1 90
/musr/command rotation rotRAnD 0 0 1 180
# More Rotations
/musr/command rotation rotD1 0 0 1 11.250
/musr/command rotation rotD2 0 0 1 33.750
/musr/command rotation rotD3 0 0 1 56.250
/musr/command rotation rotD4 0 0 1 78.750
/musr/command rotation rotD5 0 0 1 101.250
/musr/command rotation rotD6 0 0 1 123.750
/musr/command rotation rotD7 0 0 1 146.250
/musr/command rotation rotD8 0 0 1 168.750
/musr/command rotation rotD9 0 0 1 191.250
/musr/command rotation rotD10 0 0 1 213.750
/musr/command rotation rotD11 0 0 1 236.250
/musr/command rotation rotD12 0 0 1 258.750
/musr/command rotation rotD13 0 0 1 281.250
/musr/command rotation rotD14 0 0 1 303.750
/musr/command rotation rotD15 0 0 1 326.250
/musr/command rotation rotD16 0 0 1 348.750
/musr/command rotation rotD17 0 0 1 11.250
/musr/command rotation rotD18 0 0 1 33.750
/musr/command rotation rotD19 0 0 1 56.250
/musr/command rotation rotD20 0 0 1 78.750
/musr/command rotation rotD21 0 0 1 101.250
/musr/command rotation rotD22 0 0 1 123.750
/musr/command rotation rotD23 0 0 1 146.250
/musr/command rotation rotD24 0 0 1 168.750
/musr/command rotation rotD25 0 0 1 191.250
/musr/command rotation rotD26 0 0 1 213.750
/musr/command rotation rotD27 0 0 1 236.250
/musr/command rotation rotD28 0 0 1 258.750
/musr/command rotation rotD29 0 0 1 281.250
/musr/command rotation rotD30 0 0 1 303.750
/musr/command rotation rotD31 0 0 1 326.250
/musr/command rotation rotD32 0 0 1 348.750
# Beam line bend at mirror
/musr/command rotation rotBend 0 1 0 -90
/musr/command rotation rotMirr 0 1 0 -45
/musr/command rotation rotMod 0 1 0 5
################################################################################################################
# -- LEM GEOMETRY --
################################################################################################################
# WORLD = Laboratory reference frame, the origin is in the centre of the LEM sample tube
/musr/command construct box World 900 350 2600 G4_Galactic 0 0 0 no_logical_volume norot dead -1
/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 60 0.05 0 360 G4_Galactic 850 0 -1678 log_World rotBend dead 851
/musr/command construct tubs save1 0 60 0.05 0 360 G4_Galactic 800 0 -1678 log_World rotBend dead 852
/musr/command construct tubs save2 0 60 0.05 0 360 G4_Galactic 750 0 -1678 log_World rotBend dead 853
/musr/command construct tubs save3 0 60 0.05 0 360 G4_Galactic 700 0 -1678 log_World rotBend dead 854
/musr/command construct tubs save4 0 60 0.05 0 360 G4_Galactic 650 0 -1678 log_World rotBend dead 855
/musr/command construct tubs save5 0 60 0.05 0 360 G4_Galactic 600 0 -1678 log_World rotBend dead 856
/musr/command construct tubs save6 0 60 0.05 0 360 G4_Galactic 550 0 -1678 log_World rotBend dead 857
/musr/command construct tubs save7 0 60 0.05 0 360 G4_Galactic 500 0 -1678 log_World rotBend dead 858
/musr/command construct tubs save8 0 60 0.05 0 360 G4_Galactic 450 0 -1678 log_World rotBend dead 859
/musr/command construct tubs save9 0 60 0.05 0 360 G4_Galactic 400 0 -1678 log_World rotBend dead 860
/musr/command construct tubs save10 0 60 0.05 0 360 G4_Galactic 350 0 -1678 log_World rotBend dead 861
/musr/command construct tubs save11 0 60 0.05 0 360 G4_Galactic 300 0 -1678 log_World rotBend dead 862
/musr/command construct tubs save12 0 60 0.05 0 360 G4_Galactic 240 0 -1678 log_World rotBend dead 863
/musr/command construct tubs save13 0 60 0.05 0 360 G4_Galactic 200 0 -1678 log_World rotBend dead 864
/musr/command construct tubs save14 0 60 0.05 0 360 G4_Galactic 150 0 -1678 log_World rotBend dead 865
/musr/command construct tubs save15 0 60 0.05 0 360 G4_Galactic 100 0 -1678 log_World rotBend dead 866
/musr/command construct tubs save16 0 60 0.05 0 360 G4_Galactic 70 0 -1678 log_World rotBend dead 867
/musr/command construct tubs save17 0 60 0.05 0 360 G4_Galactic 0 0 -1620 log_World norot dead 868
/musr/command construct tubs save18 0 60 0.05 0 360 G4_Galactic 0 0 -1600 log_World norot dead 869
/musr/command construct tubs save19 0 60 0.05 0 360 G4_Galactic 0 0 -1550 log_World norot dead 870
/musr/command construct tubs save20 0 60 0.05 0 360 G4_Galactic 0 0 -1500 log_World norot dead 871
/musr/command construct tubs save21 0 60 0.05 0 360 G4_Galactic 0 0 -1450 log_World norot dead 872
/musr/command construct tubs save22 0 60 0.05 0 360 G4_Galactic 0 0 -1400 log_World norot dead 873
/musr/command construct tubs save23 0 60 0.05 0 360 G4_Galactic 0 0 -1350 log_World norot dead 874
/musr/command construct tubs save24 0 60 0.05 0 360 G4_Galactic 0 0 -1300 log_World norot dead 875
/musr/command construct tubs save25 0 60 0.05 0 360 G4_Galactic 0 0 -1250 log_World norot dead 876
/musr/command construct tubs save26 0 60 0.05 0 360 G4_Galactic 0 0 -1200 log_World norot dead 877
/musr/command construct tubs save27 0 60 0.05 0 360 G4_Galactic 0 0 -1150 log_World norot dead 878
/musr/command construct tubs save28 0 60 0.05 0 360 G4_Galactic 0 0 -1100 log_World norot dead 879
/musr/command construct tubs save29 0 60 0.05 0 360 G4_Galactic 0 0 -1050 log_World norot dead 880
/musr/command construct tubs save30 0 60 0.05 0 360 G4_Galactic 0 0 -1000 log_World norot dead 881
/musr/command construct tubs save31 0 60 0.05 0 360 G4_Galactic 0 0 -950 log_World norot dead 882
/musr/command construct tubs save32 0 60 0.05 0 360 G4_Galactic 0 0 -900 log_World norot dead 883
/musr/command construct tubs save33 0 60 0.05 0 360 G4_Galactic 0 0 -850 log_World norot dead 884
/musr/command construct tubs save34 0 60 0.05 0 360 G4_Galactic 0 0 -800 log_World norot dead 885
/musr/command construct tubs save35 0 60 0.05 0 360 G4_Galactic 0 0 -750 log_World norot dead 886
/musr/command construct tubs save36 0 60 0.05 0 360 G4_Galactic 0 0 -700 log_World norot dead 887
/musr/command construct tubs save37 0 60 0.05 0 360 G4_Galactic 0 0 -650 log_World norot dead 888
/musr/command construct tubs save38 0 60 0.05 0 360 G4_Galactic 0 0 -600 log_World norot dead 889
/musr/command construct tubs save39 0 60 0.05 0 360 G4_Galactic 0 0 -525 log_World norot dead 890
/musr/command construct tubs save40 0 60 0.05 0 360 G4_Galactic 0 0 -450 log_World norot dead 891
/musr/command construct tubs save41 0 60 0.05 0 360 G4_Galactic 0 0 -420 log_World norot dead 892
/musr/command construct tubs save42 0 60 0.05 0 360 G4_Galactic 0 0 -400 log_World norot dead 893
/musr/command construct tubs save43 0 60 0.05 0 360 G4_Galactic 0 0 -350 log_World norot dead 894
/musr/command construct tubs save44 0 60 0.05 0 360 G4_Galactic 0 0 -300 log_World norot dead 895
/musr/command construct tubs save45 0 60 0.05 0 360 G4_Galactic 0 0 -250 log_World norot dead 896
/musr/command construct tubs save46 0 60 0.05 0 360 G4_Galactic 0 0 -200 log_World norot dead 897
/musr/command construct tubs save47 0 60 0.05 0 360 G4_Galactic 0 0 -150 log_World norot dead 898
/musr/command construct tubs save48 0 60 0.05 0 360 G4_Galactic 0 0 -100 log_World norot dead 899
/musr/command construct tubs save49 0 60 0.05 0 360 G4_Galactic 0 0 -50 log_World norot dead 900
/musr/command construct tubs save50 0 60 0.05 0 360 G4_Galactic 0 0 0 log_World norot dead 901
/musr/command construct tubs save51 0 60 0.05 0 360 G4_Galactic 0 0 16 log_World norot dead 902
/musr/command construct tubs save52 0 60 0.05 0 360 G4_Galactic 0 0 100 log_World norot dead 903
/musr/command construct tubs save53 0 60 0.05 0 360 G4_Galactic 0 0 150 log_World norot dead 904
/musr/command visattributes G4_Galactic invisible
################################################################################################################
# -- APD Scintillators --
################################################################################################################
# Detectors volume (0,0,0) coninsides with World (0,0,0)
/musr/command construct tubs DetV 80 105 133 0 360 G4_Galactic 0 0 0 log_World norot dead 100
/musr/command visattributes log_DetV invisible
# For final design set
# BackHW=60
# BackCR=-64.0, 19/Sep/2012
# ForwHW=65.5
# ForwCR=62.5, 19/Sep/2012
# Back inner sections (Upstream) (v.i.)
# Final design (30 Jun 09, 19 Sep 12) BackHW=60.0mm (Half width or length), BackCR=-4-BackHW=-64.0mm (Center z coordinate)
/musr/command construct trd90y ScD1 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 -17.265493 -64.0 log_DetV rotD1 musr/ScintSD 1
/musr/command construct trd90y ScD2 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 -49.167966 -64.0 log_DetV rotD2 musr/ScintSD 2
/musr/command construct trd90y ScD3 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 -73.585061 -64.0 log_DetV rotD3 musr/ScintSD 3
/musr/command construct trd90y ScD4 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 -86.799497 -64.0 log_DetV rotD4 musr/ScintSD 4
/musr/command construct trd90y ScD5 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 -86.799497 -64.0 log_DetV rotD5 musr/ScintSD 5
/musr/command construct trd90y ScD6 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 -73.585061 -64.0 log_DetV rotD6 musr/ScintSD 6
/musr/command construct trd90y ScD7 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 -49.167966 -64.0 log_DetV rotD7 musr/ScintSD 7
/musr/command construct trd90y ScD8 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 -17.265493 -64.0 log_DetV rotD8 musr/ScintSD 8
/musr/command construct trd90y ScD9 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 17.265493 -64.0 log_DetV rotD9 musr/ScintSD 9
/musr/command construct trd90y ScD10 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 49.167966 -64.0 log_DetV rotD10 musr/ScintSD 10
/musr/command construct trd90y ScD11 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 73.585061 -64.0 log_DetV rotD11 musr/ScintSD 11
/musr/command construct trd90y ScD12 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 86.799497 -64.0 log_DetV rotD12 musr/ScintSD 12
/musr/command construct trd90y ScD13 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 86.799497 -64.0 log_DetV rotD13 musr/ScintSD 13
/musr/command construct trd90y ScD14 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 73.585061 -64.0 log_DetV rotD14 musr/ScintSD 14
/musr/command construct trd90y ScD15 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 49.167966 -64.0 log_DetV rotD15 musr/ScintSD 15
/musr/command construct trd90y ScD16 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 17.265493 -64.0 log_DetV rotD16 musr/ScintSD 16
# Forward inner sections (Downstream) (h.i.)
# Final design (30 June 09, 19 Sep 12) ForwHW=65.5mm (Half width or length), ForwCR=-3+ForwHW=62.5mm (Center z coordinate)
/musr/command construct trd90y ScD17 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 -17.070403 62.5 log_DetV rotD17 musr/ScintSD 17
/musr/command construct trd90y ScD18 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 -48.612395 62.5 log_DetV rotD18 musr/ScintSD 18
/musr/command construct trd90y ScD19 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 -72.753591 62.5 log_DetV rotD19 musr/ScintSD 19
/musr/command construct trd90y ScD20 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 -85.818712 62.5 log_DetV rotD20 musr/ScintSD 20
/musr/command construct trd90y ScD21 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 -85.818712 62.5 log_DetV rotD21 musr/ScintSD 21
/musr/command construct trd90y ScD22 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 -72.753591 62.5 log_DetV rotD22 musr/ScintSD 22
/musr/command construct trd90y ScD23 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 -48.612395 62.5 log_DetV rotD23 musr/ScintSD 23
/musr/command construct trd90y ScD24 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 -17.070403 62.5 log_DetV rotD24 musr/ScintSD 24
/musr/command construct trd90y ScD25 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 17.070403 62.5 log_DetV rotD25 musr/ScintSD 25
/musr/command construct trd90y ScD26 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 48.612395 62.5 log_DetV rotD26 musr/ScintSD 26
/musr/command construct trd90y ScD27 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 72.753591 62.5 log_DetV rotD27 musr/ScintSD 27
/musr/command construct trd90y ScD28 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 85.818712 62.5 log_DetV rotD28 musr/ScintSD 28
/musr/command construct trd90y ScD29 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 85.818712 62.5 log_DetV rotD29 musr/ScintSD 29
/musr/command construct trd90y ScD30 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 72.753591 62.5 log_DetV rotD30 musr/ScintSD 30
/musr/command construct trd90y ScD31 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 48.612395 62.5 log_DetV rotD31 musr/ScintSD 31
/musr/command construct trd90y ScD32 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 17.070403 62.5 log_DetV rotD32 musr/ScintSD 32
# Back outer sections (v.a.)
/musr/command construct trd ScD33 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 -18.631126 -64.0 log_DetV rotD1 musr/ScintSD 33
/musr/command construct trd ScD34 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 -53.056957 -64.0 log_DetV rotD2 musr/ScintSD 34
/musr/command construct trd ScD35 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 -79.405348 -64.0 log_DetV rotD3 musr/ScintSD 35
/musr/command construct trd ScD36 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 -93.664994 -64.0 log_DetV rotD4 musr/ScintSD 36
/musr/command construct trd ScD37 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 -93.664994 -64.0 log_DetV rotD5 musr/ScintSD 37
/musr/command construct trd ScD38 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 -79.405348 -64.0 log_DetV rotD6 musr/ScintSD 38
/musr/command construct trd ScD39 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 -53.056957 -64.0 log_DetV rotD7 musr/ScintSD 39
/musr/command construct trd ScD40 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 -18.631126 -64.0 log_DetV rotD8 musr/ScintSD 40
/musr/command construct trd ScD41 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 18.631126 -64.0 log_DetV rotD9 musr/ScintSD 41
/musr/command construct trd ScD42 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 53.056957 -64.0 log_DetV rotD10 musr/ScintSD 42
/musr/command construct trd ScD43 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 79.405348 -64.0 log_DetV rotD11 musr/ScintSD 43
/musr/command construct trd ScD44 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 93.664994 -64.0 log_DetV rotD12 musr/ScintSD 44
/musr/command construct trd ScD45 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 93.664994 -64.0 log_DetV rotD13 musr/ScintSD 45
/musr/command construct trd ScD46 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 79.405348 -64.0 log_DetV rotD14 musr/ScintSD 46
/musr/command construct trd ScD47 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 53.056957 -64.0 log_DetV rotD15 musr/ScintSD 47
/musr/command construct trd ScD48 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 18.631126 -64.0 log_DetV rotD16 musr/ScintSD 48
# Forward outer sections (h.a.)
/musr/command construct trd ScD49 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 -18.436035 62.5 log_DetV rotD1 musr/ScintSD 49
/musr/command construct trd ScD50 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 -52.501387 62.5 log_DetV rotD2 musr/ScintSD 50
/musr/command construct trd ScD51 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 -78.573878 62.5 log_DetV rotD3 musr/ScintSD 51
/musr/command construct trd ScD52 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 -92.684209 62.5 log_DetV rotD4 musr/ScintSD 52
/musr/command construct trd ScD53 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 -92.684209 62.5 log_DetV rotD5 musr/ScintSD 53
/musr/command construct trd ScD54 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 -78.573878 62.5 log_DetV rotD6 musr/ScintSD 54
/musr/command construct trd ScD55 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 -52.501387 62.5 log_DetV rotD7 musr/ScintSD 55
/musr/command construct trd ScD56 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 -18.436035 62.5 log_DetV rotD8 musr/ScintSD 56
/musr/command construct trd ScD57 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 18.436035 62.5 log_DetV rotD9 musr/ScintSD 57
/musr/command construct trd ScD58 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 52.501387 62.5 log_DetV rotD10 musr/ScintSD 58
/musr/command construct trd ScD59 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 78.573878 62.5 log_DetV rotD11 musr/ScintSD 59
/musr/command construct trd ScD60 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 92.684209 62.5 log_DetV rotD12 musr/ScintSD 60
/musr/command construct trd ScD61 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 92.684209 62.5 log_DetV rotD13 musr/ScintSD 61
/musr/command construct trd ScD62 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 78.573878 62.5 log_DetV rotD14 musr/ScintSD 62
/musr/command construct trd ScD63 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 52.501387 62.5 log_DetV rotD15 musr/ScintSD 63
/musr/command construct trd ScD64 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 18.436035 62.5 log_DetV rotD16 musr/ScintSD 64
# Structural support inside the detectors vessel
# Carbon fibre, inner radius 80, thickness 2 mm.
# Additional Al plate removed, 2 mm thick for h.i and h.a and 3 mm thick for v.i. and v.a
/musr/command construct tubs hInShell 80.0 82.0 65.5 0 360 G4_C 0 0 62 log_DetV norot dead 70
/musr/command construct tubs vInShell 80.0 82.0 60.0 0 360 G4_C 0 0 -64.5 log_DetV norot dead 70
# Visual attributes (optional)
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE green
#/musr/command visattributes log_ScD49 green
#/musr/command visattributes log_ScD50 green
#/musr/command visattributes log_test red
################################################################################################################
# Sample vacuum/tube up to gate valve - Can host either the Cryostat or the MCP2
################################################################################################################
# Vacuum space
# /musr/command construct tubs SamV 0 75.0 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100
# Sample tube
#/musr/command construct tubs SamS 75.0 77.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# 2012: 2mm Ti tube, 2013: 1mm
/musr/command construct tubs SamS 75.0 76.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# F160 - 160 CF flange upstream of MCP2 tube
/musr/command construct tubs F160 78.0 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 102
# F100 (Blank end flange)
/musr/command construct tubs F100 0 75.0 10 0 360 Steel 0 0 172.0 log_World norot dead 103
# 200 CF flange upstream of MCP2 tube covering the whole length of the gate valve chamber.
/musr/command construct tubs GATS 103.25 126.5 92.5 0 360 Steel 0 0 -254.5 log_World norot dead 371
# F200 - 200 CF flange upstream of MCP2 tube to connect to gate valve chamber
/musr/command construct tubs F200 76.5 103.25 12 0 360 Steel 0 0 -174.0 log_World norot dead 372
# Visual attributes (optional)
#/musr/command visattributes log_SamV invisible
/musr/command visattributes log_SamS oxsteel
/musr/command visattributes log_F160 oxsteel
#/musr/command visattributes log_F100 oxsteel
/musr/command visattributes log_GATS oxsteel
/musr/command visattributes log_F200 oxsteel
################################################################################################################
# MCP - Micro Channel Plate Detector MCP2
# mcpv_z = -92.5 mm!
#
# We have a 324 mm long sample tube;
# the MCP2 front side is at 142 mm from the end of the sample tube.
# the front face of the sample plate of the cryostat is 145 mm from the end of the sample tube.
#
################################################################################################################
#
# MCPM1 - MCP Macor ring 1
# MCPD - electron multiplying glass disk (also known as target)
# Sensitive surface at z = 20 mm wrt. World
# MCPM2 - MCP Macor ring 2
# /musr/command construct tubs MCPM1 24 32.5 0.75 0 360 Macor 0 0 19.25 log_World norot dead 251
# Use it either as (DMCP-musr/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz.
# /musr/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 21.5 log_World norot dead 252
# /musr/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 23.75 log_World norot dead 253
# NOTE: To intercept ALL the incoming muons, comment the DMCP and MCPM1 lines above and uncomment this one:
#*aa/musr/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs target 0 21.0 1.5 0 360 MCPglass 0 0 114 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs saveTarget 0 75.0 0.2 0 360 G4_Galactic 0 0 110.79 log_SamV norot dead 222
#
# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole)
# MCVR - "Vacuum Ring" (circular hole)
# /musr/command construct box MCSR 36.5 36.5 1 Steel 0 0 25.5 log_World norot dead 254
# /musr/command construct tubs MCVR 0 27.5 1 0 360 G4_Galactic 0 0 0 log_MCSR norot dead 255
# 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
# /musr/command construct box MCPA 36.5 36.5 4 Steel 0 0 37 log_World norot dead 256
# /musr/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 257
# /musr/command construct tubs ANVA2 0 27.5 1.5 0 360 G4_Galactic 0 0 2.5 log_MCPA norot dead 258
# MCSS - MCP Stainless Steel Support Ring
# /musr/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 69.8 log_World norot dead 259
# MCP2 visual attributes (optional)
#/musr/command visattributes log_DMCP MCP_style
#*/musr/command visattributes log_target MCP_style
#*/musr/command visattributes log_MCPM1 MACOR_style
#*------ /musr/command visattributes log_MCPM2 MACOR_style
################################################################################################################
# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm)
#
# sample plate front face is at z = 17mm:
# cold finger distance to CF100: 130mm
# 5mm base plate + 6mm sapphire + 4mm sample plate = 15mm
# sample plate front face from CF100: 145mm
# z-position of sample plate front face: 324/2-145mm = 17mm
# --> sample plate center is at 17+2=19mm
#
################################################################################################################
# Dimensions for large/small sample plates SamPL=35/21 and SaphPL=SamPL35-5
/musr/command construct tubs target 0 35 2 0 360 G4_Al 0 0 19.0 log_World norot dead 251
/musr/command construct tubs SAPH 0 30 3 0 360 G4_ALUMINUM_OXIDE 0 0 24.0 log_World norot dead 252
/musr/command construct tubs SAH1 0 35 2.5 0 360 G4_Al 0 0 29.5 log_World norot dead 253
# Special save target volume
/musr/command construct tubs saveTarget 0 40 0.05 0 360 G4_Galactic 0 0 16.9 log_World norot dead 253
# Other components of the cryostat (dimensions and position of CRY4 are only approx. because unknown)
# COld Finger
/musr/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 37.0 log_World norot dead 261
# End plate of cryostat (7 mm thick, 30 mm diameter)
/musr/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 45.5 log_World norot dead 262
# Heat exchanger (assuming a 10 mm opening - Original dimensions not known.) # OLD pos. 160.0
/musr/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 74.0 log_World norot dead 263
# Mounting ring for He-shield
/musr/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 54.0 log_World norot dead 264
# 2 mm thick plate for mounting ring. This is just to close the downstream side.
/musr/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 54.0 log_World norot dead 265
# Radiation shield
/musr/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 19.0 log_World norot dead 266
# Front part of the radiation shield
/musr/command construct tubs CRSH2 30 48 0.5 0 360 G4_Cu 0 0 -26.5 log_World norot dead 267
# Electrical Field Guard Rings (distance between the guard rings: 16 mm)
# /musr/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 -13.5 log_World norot dead 271
# /musr/command construct tubs Guard2 29 38 1.5 0 360 G4_Cu 0 0 2.5 log_World norot dead 272
# Cryostat visual attributes (optional)
/musr/command visattributes log_SAH1 oxsteel
#/musr/command visattributes log_SAH2 oxsteel
/musr/command visattributes log_target oxsteel
/musr/command visattributes log_SAPH MACOR_style
#/musr/command visattributes log_SAH3 oxsteel
/musr/command visattributes log_CRSH yellow
/musr/command visattributes log_CRSH2 yellow
#/musr/command visattributes log_test red
################################################################################################################
# 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
/musr/command construct cons RA_EU 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World norot dead 801
/musr/command construct cons RA_MU 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World norot dead 802
/musr/command construct cons RA_ER 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnR dead 803
/musr/command construct cons RA_MR 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnR dead 804
/musr/command construct cons RA_ED 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnD dead 805
/musr/command construct cons RA_MD 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnD dead 806
/musr/command construct cons RA_EL 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnL dead 807
/musr/command construct cons RA_ML 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnL dead 808
# 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_T 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 822
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.02 log_World rotRAnR dead 824
/musr/command construct tubs RA_B 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 826
/musr/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.06 log_World rotRAnL dead 828
# 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 831
# Ring Anodes visual attributes (optional)
/musr/command visattributes log_RA_G invisible
#/musr/command visattributes log_RA_G Grid_style
################################################################################################################
# Trigger - Trigger Detector # Triggerz = -1092 mm; total length of TD is 110 mm; carbon foil at -1144 mm.
################################################################################################################
# Trigger volume
/musr/command construct tubs TrigV 90 127 148 0 360 G4_Galactic 0 0 -495 log_World norot dead 600
# Trigger tube
/musr/command construct tubs TrigS 100 103 148 0 360 Steel 0 0 0 log_TrigV norot dead 601
# TF - Trigger tube flanges
/musr/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 136 log_TrigV norot dead 611
/musr/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -136 log_TrigV norot dead 612
# trigger foil is 52-55mm upstream of TrigV center
# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm).
# USE THE NAME CFoil or coulombCFoil, otherwise musrMuFormation won't work!
#/musr/command construct box CFoil 60 60 0.0000025 G4_GRAPHITE 0 0 -550 log_World norot dead 621
/musr/command construct box CFoil 60 60 0.000002 G4_GRAPHITE 0 0 -550 log_World norot dead 621
# 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 musrDetectorConstruction.cc and set any density.
# Trigger visual attributes (optional)
/musr/command visattributes log_TrigV oxsteel
/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_saveAfterTD darkred
# Trigger Lens, L3, center -382 length 70mm radius 65mm.
/musr/command construct tubs TL3S 65.0 70.0 35.0 0 360 G4_Galactic 0 0 -382 log_World norot dead 706 nofield
/musr/command visattributes log_TL3S red
# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL.
# E.g. /musr/command visattributes Steel red
################################################################################################################
# L2 - 2nd Einzel Lens # L3z = -56.7 cm. (it was "L3" in 2011 and before)
# Lens Gap = 12.0 mm => G/D = 12/130 ~ 0.1 (Lens Gap = gap between Ground and Anode, D - Diameter)
################################################################################################################
# L3 volume
/musr/command construct tubs L3V 65 127 220 0 360 G4_Galactic 0 0 -863 log_World norot dead 400
# Lens 3 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 720 mm)
/musr/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 0 log_L3V norot dead 401
# Lens 3 Flange 1, z = L3z + 208 mm
/musr/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -208 log_L3V norot dead 402
# Lens 3 Flange 2, z = L3z - 208 mm
/musr/command construct tubs L3F2 103 126.5 12 0 360 Steel 0 0 208 log_L3V norot dead 403
# GPn - Ground Potential Electrodes
# n = 1-4 (further from TD) and 5-8 (closer to TD) - components of the Ground Electrodes
# Ground Electrode (inner dia: 130 mm, outer dia: 134 mm, length: 133 mm)
/musr/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 421
# Outer electrode surface (LN2 cooling vessel)
/musr/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 422
# First ring cap
/musr/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3V norot dead 423
# Second ring cap
/musr/command construct tubs L3GP4 67 81 4 0 360 Steel 0 0 71.0 log_L3V norot dead 424
/musr/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 431
/musr/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 432
/musr/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3V norot dead 433
/musr/command construct tubs L3GP8 67 81 4 0 360 Steel 0 0 -71.0 log_L3V norot dead 434
# HP - High Potential Electrode (Central Anode - usually at +8.7 kV, for a 15 keV muon beam)
/musr/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3V norot dead 451
# Lens 3 visual attributes (optional)
/musr/command visattributes log_L3V invisible
/musr/command visattributes log_L3ST oxsteel
/musr/command visattributes log_L3F1 oxsteel
/musr/command visattributes log_L3F2 oxsteel
/musr/command visattributes log_L3HP darkred
################################################################################################################
# -- SPIN ROTATOR GEOMETRY --
################################################################################################################
# Spin Rotator volume
/musr/command construct tubs SRENV 50 320 201.5 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 100
/musr/command visattributes log_SRENV invisible
# Electromagnet with iron yoke
# U - up, D - down, L - left, R - right (with respect to muon's view - momentum direction)
/musr/command construct box NPole 200 10 150 G4_Fe 0 85 0 log_SRENV norot dead 201
/musr/command construct box NYoke 150 22.5 50 G4_Fe 0 117.5 0 log_SRENV norot dead 202
/musr/command construct box NConn 225 17.5 190.0 G4_Fe 0 157.5 0 log_SRENV norot dead 203
/musr/command construct box SPole 200 10 150 G4_Fe 0 -85 0 log_SRENV norot dead 205
/musr/command construct box SYoke 150 22.5 50 G4_Fe 0 -117.5 0 log_SRENV norot dead 206
/musr/command construct box SConn 225 17.5 190.0 G4_Fe 0 -157.5 0 log_SRENV norot dead 207
# Front mirror plate
/musr/command construct box FShU 225 50 5 G4_Fe 0 125 -195.0 log_SRENV norot dead 301
/musr/command construct box FShD 225 50 5 G4_Fe 0 -125 -195.0 log_SRENV norot dead 302
/musr/command construct box FShL 75 75 5 G4_Fe 150 0 -195.0 log_SRENV norot dead 303
/musr/command construct box FShR 75 75 5 G4_Fe -150 0 -195.0 log_SRENV norot dead 304
# Back mirror plate
/musr/command construct box BShU 225 50 5 G4_Fe 0 125 195.0 log_SRENV norot dead 321
/musr/command construct box BShD 225 50 5 G4_Fe 0 -125 195.0 log_SRENV norot dead 322
/musr/command construct box BShL 75 75 5 G4_Fe 150 0 195.0 log_SRENV norot dead 323
/musr/command construct box BShR 75 75 5 G4_Fe -150 0 195.0 log_SRENV norot dead 324
# Top coils
/musr/command construct box TCoil1 170 22.5 10 G4_Cu 0 117.5 -60 log_SRENV norot dead 401
/musr/command construct box TCoil2 170 22.5 10 G4_Cu 0 117.5 60 log_SRENV norot dead 402
/musr/command construct box TCoil3 10 22.5 50 G4_Cu 160 117.5 0 log_SRENV norot dead 403
/musr/command construct box TCoil4 10 22.5 50 G4_Cu -160 117.5 0 log_SRENV norot dead 404
# Bottom coils
/musr/command construct box BCoil1 170 22.5 10 G4_Cu 0 -117.5 -60 log_SRENV norot dead 421
/musr/command construct box BCoil2 170 22.5 10 G4_Cu 0 -117.5 60 log_SRENV norot dead 422
/musr/command construct box BCoil3 10 22.5 50 G4_Cu 160 -117.5 0 log_SRENV norot dead 423
/musr/command construct box BCoil4 10 22.5 50 G4_Cu -160 -117.5 0 log_SRENV norot dead 424
# Capacitor
/musr/command construct box Cap_p 0.5 50 150 Brass 55 0 0 log_SRENV norot dead 501
/musr/command construct box Cap_n 0.5 50 150 Brass -55 0 0 log_SRENV norot dead 502
#*/musr/command construct box Uniform 49 49 150 G4_Galactic 0 0 0 log_SRENV norot dead 503
/musr/command construct tubs RodCapUp 0 5 150 90 180 Brass 55 55 0 log_SRENV norot dead 504
/musr/command construct tubs RodCapUn 0 5 150 -90 180 Brass -55 55 0 log_SRENV norot dead 505
/musr/command construct tubs RodCapDp 0 5 150 90 180 Brass 55 -55 0 log_SRENV norot dead 506
/musr/command construct tubs RodCapDn 0 5 150 -90 180 Brass -55 -55 0 log_SRENV norot dead 507
# Rods
/musr/command construct tubs RodPosU 0 5 150 0 360 Brass 27.5 55 0 log_SRENV norot dead 511
/musr/command construct tubs Rod0U 0 5 150 0 360 Brass 0 55 0 log_SRENV norot dead 512
/musr/command construct tubs RodNegU 0 5 150 0 360 Brass -27.5 55 0 log_SRENV norot dead 513
/musr/command construct tubs RodPosD 0 5 150 0 360 Brass 27.5 -55 0 log_SRENV norot dead 514
/musr/command construct tubs Rod0D 0 5 150 0 360 Brass 0 -55 0 log_SRENV norot dead 515
/musr/command construct tubs RodNegD 0 5 150 0 360 Brass -27.5 -55 0 log_SRENV norot dead 516
# Vacuum vessel
/musr/command construct box TVac1 72.5 2.5 191.5 Steel 0 72.5 0 log_SRENV norot dead 601
/musr/command construct box TVac2 2.5 70.0 191.5 Steel 72.5 0 0 log_SRENV norot dead 602
/musr/command construct box TVac3 72.5 2.5 191.5 Steel 0 -72.5 0 log_SRENV norot dead 603
/musr/command construct box TVac4 2.5 70.0 191.5 Steel -72.5 0 0 log_SRENV norot dead 604
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For Spin Rotator
/musr/command construct tubs SREField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 630 nofield
/musr/command construct tubs SRBField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.51 log_World norot dead 631 nofield
/musr/command visattributes G4_Cu red
/musr/command visattributes G4_Fe blue
/musr/command visattributes Brass yellow
################################################################################################################
# Lens 1 - 1st Einzel Lens
################################################################################################################
# L1ENV - Lens 1 envelope - for easy positioning of lens parts (outer dia: 100 mm, length: 300 mm)
#/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 0 0 -1929.5 log_World norot dead 600
/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend 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
# n = 2 - Ground Electrode 2 (closer to SR).
/musr/command construct tubs L1GP2 40 44 50 0 360 Steel 0 0 100 log_L1ENV norot dead 653
# HP - High Potential Electrode (Central Anode - usually at +8.5 kV, for a 15 keV muon beam)
/musr/command construct tubs L1HP 40 44 40 0 360 Steel 0 0 0 log_L1ENV norot dead 652
# Lens 1 visual attributes (optional)
/musr/command visattributes log_L1HP darkred
################################################################################################################
# Electrostatic field at accelerator after moderator
################################################################################################################
#
/musr/command construct box Grid1 9.1 25 25 G4_Galactic 489.9 0.0 -1678.0 log_World rotMod dead 212
/musr/command globalfield Grid1_field 9.1 25 25 uniform 489.9 0.0 -1678.0 log_Grid1 0 0 0 -0.2527 0 0
/musr/command construct box Grid2 5 24 24 G4_Galactic 475.8 0.0 -1678.0 log_World rotMod dead 214
/musr/command globalfield Grid2_field 5 24 24 uniform 475.8 0.0 -1678.0 log_Grid2 0 0 0 -1.04 0 0
/musr/command globalfield printFieldValueAtPoint 489.9 0.0 -1678.0
/musr/command globalfield printFieldValueAtPoint 475.8 0.0 -1678.0
################################################################################################################
# Electrostatic mirror at bend
################################################################################################################
# MRENV
/musr/command construct box MirrE 65 65 10 G4_Galactic 14.14213562 0.0 -1678.0 log_World rotMirr dead 200
/musr/command globalfield Mirr_field 65 65 10 uniform 14.14213562 0.0 -1678.0 log_MirrE 0 0 0 0 0 0.75
###################################################################################
################### E L E C T R O M G N E T I C F I E L D S ##################
###################################################################################
# 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!
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For L1
/musr/command construct tubs L1EField 0 0.01 0.005 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend dead 706 nofield
# For L2 (L3 before 2012)
/musr/command construct tubs L3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -863.0 log_World norot dead 708 nofield
# LENS 1. Best L1 settings: 7.2 kV for 12 keV muons
/musr/command globalfield Lens1EField 251.5 0.0 -1678.0 fromfile 2DE L1_Erz.map log_L1EField 9.0
# LENS 2. Best L3 settings: 8.4 kV for 12 keV muons
/musr/command globalfield Lens3EField 0. 0. -863.0 fromfile 2DE L3_Erz.map log_L3EField 10.5
# Spin rotator
# Electric field should be 370mm plates
# Magnetic field should be 260mm poles as measured srlem_ext.map
/musr/command globalfield Ele_field 0. 0. -1284.5 fromfile 3DE E_Sep_P37.5cm.map log_SREField 2.717
/musr/command globalfield Mag_field 0. 0. -1284.51 fromfile 3DB srlem_ext.map log_SRBField -0.00692
# 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
# 57.15mm upstream center
/musr/command construct box TriggE0 45 45 5 G4_Galactic 0 0 -555.1 log_World norot dead 630 nofield
# 48mm upstream center
/musr/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -543. log_World norot dead 631 nofield
# 2.25mm downstream center
/musr/command construct box TriggE2 45 45 4.9479 G4_Galactic 0 0 -492.75 log_World rotTrig dead 632 nofield
# 54mm downstream center
/musr/command construct box TriggE3 45 45 4 G4_Galactic 0 0 -441.0 log_World norot dead 633
### Electric field at TRIGGER Detector TD: Three different uniform fields, 2012 settings
/musr/command globalfield Trigg0_field 45 45 5 uniform 0. 0. -555.1 log_TriggE0 0 0 0 0 0 0.338
/musr/command globalfield Trigg1_field 45 45 4 uniform 0. 0. -543. log_TriggE1 0 0 0 0 0 -0.02375
/musr/command globalfield Trigg2_field 45 45 4.9497 uniform 0. 0. -492.75 log_TriggE2 0 0 0 0 0 0.041416
/musr/command globalfield Trigg3_field 45 45 4 uniform 0. 0. -441.0 log_TriggE3 0 0 0 0 0 -0.45
# Trigger Lens, L3, (available space from -437 to -347, we use 70mm of that)
/musr/command construct tubs TL3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -382.0 log_World norot dead 706 nofield
/musr/command globalfield ColRingEField 0. 0. -382.0 fromfile 2DE CR7cm_Grid.map log_TL3EField 12.0
### Electric field at RING ANODE - from 3DE field map
# To create an arbitrary configuration, switch on all fields and set different potentials.
/musr/command globalfield RngAnT_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_T 11.9
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 11.9
/musr/command globalfield RngAnB_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_B 11.9
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 11.9
### 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_convMap.map log_SBField 0.
### Electric field at the sample
/musr/command construct tubs SEField 0 0.01 0.005 0 360 G4_Galactic 0.0 0.0 15.9 log_World norot dead 710 nofield
/musr/command globalfield SampleEField 0. 0. 15.9 fromfile 2DE SamplePlate_2DE.map log_SEField 0.0
# Set parameters for particle tracking in an EM field
/musr/command globalfield setparameter SetLargestAcceptableStep 5
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
# TESTING EM FIELD
/musr/command globalfield printFieldValueAtPoint 0. 0. 0.
/musr/command globalfield printFieldValueAtPoint 0. 35. -670.
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.10
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
#/musr/command process addModel mu+ G4MuMultipleScattering G4WentzelVIModel 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ musrMuEnergyLossLandau -1 -1 1
# parameters for Landau energy loss distribution, LandauSigma corresponds to the width of the distibution
/musr/command SetLandauMPV 0.01
/musr/command SetLandauSigma 0.3
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#/musr/command process addDiscreteProcess mu+ G4CoulombScattering
#/musr/command process addProcess mu+ G4UserSpecialCuts -1 -1 3
#/musr/command process addProcess mu+ G4StepLimiter -1 -1 4
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
#/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
#/musr/command signalSeparationTime 0.1
#
/musr/run/randomOption 1
################################################################################################################
# -- Setting simulation PARAMETERS --
################################################################################################################
# Set the overall range cut (default 0.1 mm)
#*/run/setCut 1 mm
# Set the range cut on particular volumes (in mm)
#/musr/command SetUserLimits log_CFoil 1e-8 -1 -1 -1 -1
#*/musr/command SetUserLimits log_target 0.01
#*/musr/command SetUserLimits log_targetscint 0.01
#*/musr/command SetUserLimits log_cryostatscint 0.01
# Set particle energy cuts on particular volumes (in eV)
#/musr/command SetUserLimits log_World ustepMax(mm) utrakMax(mm) utimeMax(ns) uekinMin(MeV) urangMin(mm)
#/musr/command SetUserLimits log_World -1 -1 -1 1e-7 -1
# Geant4 10.2
#------------
/process/em/lowestMuHadEnergy 1e-6 MeV
# Store ALL the events in a ROOT tree or just the interesting ones? (default is true)
#*/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
# Override runID number
#*/musr/run/runID 21
# Set the frequency of event printing
/musr/run/howOftenToPrintEvent 100
# 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
/musr/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
#*/control/execute visdawn.mac
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
#/musr/command rootOutput weight off
#/musr/command rootOutput BFieldAtDecay off
#/musr/command rootOutput muIniPosX off
#/musr/command rootOutput muIniPosY off
#/musr/command rootOutput muIniPosZ off
#/musr/command rootOutput muIniMomX off
#/musr/command rootOutput muIniMomY off
#/musr/command rootOutput muIniMomZ off
#/musr/command rootOutput muIniPolX off
#/musr/command rootOutput muIniPolY off
#/musr/command rootOutput muIniPolZ off
#/musr/command rootOutput muDecayDetID off
#/musr/command rootOutput muDecayPosX off
#/musr/command rootOutput muDecayPosY off
#/musr/command rootOutput muDecayPosZ off
#/musr/command rootOutput muDecayTime off
#/musr/command rootOutput muDecayPolX off
#/musr/command rootOutput muDecayPolY off
#/musr/command rootOutput muDecayPolZ off
#/musr/command rootOutput muTargetTime off
#/musr/command rootOutput muTargetPolX off
#/musr/command rootOutput muTargetPolY off
#/musr/command rootOutput muTargetPolZ off
#/musr/command rootOutput muM0Time off
#/musr/command rootOutput muM0PolX off
#/musr/command rootOutput muM0PolY off
#/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
#/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
/musr/command storeOnlyEventsWithHits false
################################################################################################################
# -- Setting PARTICLE GUN parameters --
################################################################################################################
# Default momentum direction: 001, i.e. 0z.
# Default muon soin 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 -1144 mm, acceleration starts at -1154.15 mm
#/gun/vertex 0. 0. -2119.5 mm
/gun/vertex 499 0. -1678.0 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 6.83 6.83 0 mm
/gun/vertexsigma -15 -15 0 mm
#/gun/boxboundarycentre 499 0 -1678 mm
#/gun/boxboundary 15 15 1 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
# Set muon energy before hitting TD; a constant field in front of the C-foil accelerates the muons
# to add 3.38 keV
/gun/kenergy 15.0 eV
# Set beam momentum direction
/gun/direction -1.0 0.0 0.0
# Set muon spin direction: +10deg or 0
/gun/muonPolarizVector 0.9848 0 0.17365
#/gun/muonPolarizVector 1 0 0
# Other useful test parameters:
#------------------Oct.20 2015------------------------------------
# kenergy= 15 eV Pmu= 0.xxxMeV/c ==> sigma = /2.354 = MeV/c
#/gun/momentumsmearing 0.07508 MeV
/gun/momentumsmearing 0.016 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#*/gun/momentumboundary 20 40 0 MeV
#---/gun/tilt: xangle, yangle, dummy
#*/gun/tilt 0 0.0 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.0 deg
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#*/gun/decaytimelimits 10400 10420 2197.03 ns
#/gun/tiltsigma 1.4 1.4 0 deg
/gun/tiltsigma 0 0 -1.0 deg
# Selectively inactivate or activate sensitive detectors
#*/hits/inactivate /musr/ScintSD
# Only for code debugging!
/tracking/verbose 0
# BEAM ON
#/run/beamOn 1000000
#/run/beamOn 10
/run/beamOn 10000

View File

@@ -0,0 +1,950 @@
# Template suitable for beam profile detectioon with the spin rotator in place
# Zaher Salman 7/10/2010
#
# Thomas Prokscha 22/Nov/2012
# Moved sample stack on cryostat 3mm downstream to fit to positions in apparatus
# Changed positions of positron counters according to corrected drawing LEM 37.01.024 (19/Sep/2012)
#
# Position downstream detectors: z=+62.5mm original value: z=+66.5mm
# Position upstream detectors: z=-64.0mm original value: z=-60.0mm
#
# 2013 setup: 1mm Ti sample tube
#
# 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
#
# Ran Xiao 25/Sep/2014
# Start muons at moderator at x=499, assume cosA angular distribution, assume energy distribution
#
################################################################################################################
# -- ROTATION MATRICES --
################################################################################################################
# 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
/musr/command rotation rotRAnL 0 0 1 90
/musr/command rotation rotRAnD 0 0 1 180
# More Rotations
/musr/command rotation rotD1 0 0 1 11.250
/musr/command rotation rotD2 0 0 1 33.750
/musr/command rotation rotD3 0 0 1 56.250
/musr/command rotation rotD4 0 0 1 78.750
/musr/command rotation rotD5 0 0 1 101.250
/musr/command rotation rotD6 0 0 1 123.750
/musr/command rotation rotD7 0 0 1 146.250
/musr/command rotation rotD8 0 0 1 168.750
/musr/command rotation rotD9 0 0 1 191.250
/musr/command rotation rotD10 0 0 1 213.750
/musr/command rotation rotD11 0 0 1 236.250
/musr/command rotation rotD12 0 0 1 258.750
/musr/command rotation rotD13 0 0 1 281.250
/musr/command rotation rotD14 0 0 1 303.750
/musr/command rotation rotD15 0 0 1 326.250
/musr/command rotation rotD16 0 0 1 348.750
/musr/command rotation rotD17 0 0 1 11.250
/musr/command rotation rotD18 0 0 1 33.750
/musr/command rotation rotD19 0 0 1 56.250
/musr/command rotation rotD20 0 0 1 78.750
/musr/command rotation rotD21 0 0 1 101.250
/musr/command rotation rotD22 0 0 1 123.750
/musr/command rotation rotD23 0 0 1 146.250
/musr/command rotation rotD24 0 0 1 168.750
/musr/command rotation rotD25 0 0 1 191.250
/musr/command rotation rotD26 0 0 1 213.750
/musr/command rotation rotD27 0 0 1 236.250
/musr/command rotation rotD28 0 0 1 258.750
/musr/command rotation rotD29 0 0 1 281.250
/musr/command rotation rotD30 0 0 1 303.750
/musr/command rotation rotD31 0 0 1 326.250
/musr/command rotation rotD32 0 0 1 348.750
# Beam line bend at mirror
/musr/command rotation rotBend 0 1 0 -90
/musr/command rotation rotMirr 0 1 0 -45
/musr/command rotation rotMod 0 1 0 2.5
################################################################################################################
# -- LEM GEOMETRY --
################################################################################################################
# WORLD = Laboratory reference frame, the origin is in the centre of the LEM sample tube
/musr/command construct box World 900 350 2600 G4_Galactic 0 0 0 no_logical_volume norot dead -1
/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 60 0.05 0 360 G4_Galactic 850 0 -1678 log_World rotBend dead 851
/musr/command construct tubs save1 0 60 0.05 0 360 G4_Galactic 800 0 -1678 log_World rotBend dead 852
/musr/command construct tubs save2 0 60 0.05 0 360 G4_Galactic 750 0 -1678 log_World rotBend dead 853
/musr/command construct tubs save3 0 60 0.05 0 360 G4_Galactic 700 0 -1678 log_World rotBend dead 854
/musr/command construct tubs save4 0 60 0.05 0 360 G4_Galactic 650 0 -1678 log_World rotBend dead 855
/musr/command construct tubs save5 0 60 0.05 0 360 G4_Galactic 600 0 -1678 log_World rotBend dead 856
/musr/command construct tubs save6 0 60 0.05 0 360 G4_Galactic 550 0 -1678 log_World rotBend dead 857
/musr/command construct tubs save7 0 60 0.05 0 360 G4_Galactic 500 0 -1678 log_World rotBend dead 858
/musr/command construct tubs save8 0 60 0.05 0 360 G4_Galactic 450 0 -1678 log_World rotBend dead 859
/musr/command construct tubs save9 0 60 0.05 0 360 G4_Galactic 400 0 -1678 log_World rotBend dead 860
/musr/command construct tubs save10 0 60 0.05 0 360 G4_Galactic 350 0 -1678 log_World rotBend dead 861
/musr/command construct tubs save11 0 60 0.05 0 360 G4_Galactic 300 0 -1678 log_World rotBend dead 862
/musr/command construct tubs save12 0 60 0.05 0 360 G4_Galactic 240 0 -1678 log_World rotBend dead 863
/musr/command construct tubs save13 0 60 0.05 0 360 G4_Galactic 200 0 -1678 log_World rotBend dead 864
/musr/command construct tubs save14 0 60 0.05 0 360 G4_Galactic 150 0 -1678 log_World rotBend dead 865
/musr/command construct tubs save15 0 60 0.05 0 360 G4_Galactic 100 0 -1678 log_World rotBend dead 866
/musr/command construct tubs save16 0 60 0.05 0 360 G4_Galactic 70 0 -1678 log_World rotBend dead 867
/musr/command construct tubs save17 0 60 0.05 0 360 G4_Galactic 0 0 -1620 log_World norot dead 868
/musr/command construct tubs save18 0 60 0.05 0 360 G4_Galactic 0 0 -1600 log_World norot dead 869
/musr/command construct tubs save19 0 60 0.05 0 360 G4_Galactic 0 0 -1550 log_World norot dead 870
/musr/command construct tubs save20 0 60 0.05 0 360 G4_Galactic 0 0 -1500 log_World norot dead 871
/musr/command construct tubs save21 0 60 0.05 0 360 G4_Galactic 0 0 -1450 log_World norot dead 872
/musr/command construct tubs save22 0 60 0.05 0 360 G4_Galactic 0 0 -1400 log_World norot dead 873
/musr/command construct tubs save23 0 60 0.05 0 360 G4_Galactic 0 0 -1350 log_World norot dead 874
/musr/command construct tubs save24 0 60 0.05 0 360 G4_Galactic 0 0 -1300 log_World norot dead 875
/musr/command construct tubs save25 0 60 0.05 0 360 G4_Galactic 0 0 -1250 log_World norot dead 876
/musr/command construct tubs save26 0 60 0.05 0 360 G4_Galactic 0 0 -1200 log_World norot dead 877
/musr/command construct tubs save27 0 60 0.05 0 360 G4_Galactic 0 0 -1150 log_World norot dead 878
/musr/command construct tubs save28 0 60 0.05 0 360 G4_Galactic 0 0 -1100 log_World norot dead 879
/musr/command construct tubs save29 0 60 0.05 0 360 G4_Galactic 0 0 -1050 log_World norot dead 880
/musr/command construct tubs save30 0 60 0.05 0 360 G4_Galactic 0 0 -1000 log_World norot dead 881
/musr/command construct tubs save31 0 60 0.05 0 360 G4_Galactic 0 0 -950 log_World norot dead 882
/musr/command construct tubs save32 0 60 0.05 0 360 G4_Galactic 0 0 -900 log_World norot dead 883
/musr/command construct tubs save33 0 60 0.05 0 360 G4_Galactic 0 0 -850 log_World norot dead 884
/musr/command construct tubs save34 0 60 0.05 0 360 G4_Galactic 0 0 -800 log_World norot dead 885
/musr/command construct tubs save35 0 60 0.05 0 360 G4_Galactic 0 0 -750 log_World norot dead 886
/musr/command construct tubs save36 0 60 0.05 0 360 G4_Galactic 0 0 -700 log_World norot dead 887
/musr/command construct tubs save37 0 60 0.05 0 360 G4_Galactic 0 0 -650 log_World norot dead 888
/musr/command construct tubs save38 0 60 0.05 0 360 G4_Galactic 0 0 -600 log_World norot dead 889
/musr/command construct tubs save39 0 60 0.05 0 360 G4_Galactic 0 0 -525 log_World norot dead 890
/musr/command construct tubs save40 0 60 0.05 0 360 G4_Galactic 0 0 -450 log_World norot dead 891
/musr/command construct tubs save41 0 60 0.05 0 360 G4_Galactic 0 0 -420 log_World norot dead 892
/musr/command construct tubs save42 0 60 0.05 0 360 G4_Galactic 0 0 -400 log_World norot dead 893
/musr/command construct tubs save43 0 60 0.05 0 360 G4_Galactic 0 0 -350 log_World norot dead 894
/musr/command construct tubs save44 0 60 0.05 0 360 G4_Galactic 0 0 -300 log_World norot dead 895
/musr/command construct tubs save45 0 60 0.05 0 360 G4_Galactic 0 0 -250 log_World norot dead 896
/musr/command construct tubs save46 0 60 0.05 0 360 G4_Galactic 0 0 -200 log_World norot dead 897
/musr/command construct tubs save47 0 60 0.05 0 360 G4_Galactic 0 0 -150 log_World norot dead 898
/musr/command construct tubs save48 0 60 0.05 0 360 G4_Galactic 0 0 -100 log_World norot dead 899
/musr/command construct tubs save49 0 60 0.05 0 360 G4_Galactic 0 0 -50 log_World norot dead 900
/musr/command construct tubs save50 0 60 0.05 0 360 G4_Galactic 0 0 0 log_World norot dead 901
/musr/command construct tubs save51 0 60 0.05 0 360 G4_Galactic 0 0 16 log_World norot dead 902
/musr/command construct tubs save52 0 60 0.05 0 360 G4_Galactic 0 0 100 log_World norot dead 903
/musr/command construct tubs save53 0 60 0.05 0 360 G4_Galactic 0 0 150 log_World norot dead 904
/musr/command visattributes G4_Galactic invisible
################################################################################################################
# -- APD Scintillators --
################################################################################################################
# Detectors volume (0,0,0) coninsides with World (0,0,0)
/musr/command construct tubs DetV 80 105 133 0 360 G4_Galactic 0 0 0 log_World norot dead 100
/musr/command visattributes log_DetV invisible
# For final design set
# BackHW=60
# BackCR=-64.0, 19/Sep/2012
# ForwHW=65.5
# ForwCR=62.5, 19/Sep/2012
# Back inner sections (Upstream) (v.i.)
# Final design (30 Jun 09, 19 Sep 12) BackHW=60.0mm (Half width or length), BackCR=-4-BackHW=-64.0mm (Center z coordinate)
/musr/command construct trd90y ScD1 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 -17.265493 -64.0 log_DetV rotD1 musr/ScintSD 1
/musr/command construct trd90y ScD2 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 -49.167966 -64.0 log_DetV rotD2 musr/ScintSD 2
/musr/command construct trd90y ScD3 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 -73.585061 -64.0 log_DetV rotD3 musr/ScintSD 3
/musr/command construct trd90y ScD4 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 -86.799497 -64.0 log_DetV rotD4 musr/ScintSD 4
/musr/command construct trd90y ScD5 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 -86.799497 -64.0 log_DetV rotD5 musr/ScintSD 5
/musr/command construct trd90y ScD6 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 -73.585061 -64.0 log_DetV rotD6 musr/ScintSD 6
/musr/command construct trd90y ScD7 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 -49.167966 -64.0 log_DetV rotD7 musr/ScintSD 7
/musr/command construct trd90y ScD8 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 -17.265493 -64.0 log_DetV rotD8 musr/ScintSD 8
/musr/command construct trd90y ScD9 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 17.265493 -64.0 log_DetV rotD9 musr/ScintSD 9
/musr/command construct trd90y ScD10 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 49.167966 -64.0 log_DetV rotD10 musr/ScintSD 10
/musr/command construct trd90y ScD11 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 73.585061 -64.0 log_DetV rotD11 musr/ScintSD 11
/musr/command construct trd90y ScD12 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 86.799497 -64.0 log_DetV rotD12 musr/ScintSD 12
/musr/command construct trd90y ScD13 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 86.799497 -64.0 log_DetV rotD13 musr/ScintSD 13
/musr/command construct trd90y ScD14 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 73.585061 -64.0 log_DetV rotD14 musr/ScintSD 14
/musr/command construct trd90y ScD15 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 49.167966 -64.0 log_DetV rotD15 musr/ScintSD 15
/musr/command construct trd90y ScD16 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 17.265493 -64.0 log_DetV rotD16 musr/ScintSD 16
# Forward inner sections (Downstream) (h.i.)
# Final design (30 June 09, 19 Sep 12) ForwHW=65.5mm (Half width or length), ForwCR=-3+ForwHW=62.5mm (Center z coordinate)
/musr/command construct trd90y ScD17 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 -17.070403 62.5 log_DetV rotD17 musr/ScintSD 17
/musr/command construct trd90y ScD18 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 -48.612395 62.5 log_DetV rotD18 musr/ScintSD 18
/musr/command construct trd90y ScD19 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 -72.753591 62.5 log_DetV rotD19 musr/ScintSD 19
/musr/command construct trd90y ScD20 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 -85.818712 62.5 log_DetV rotD20 musr/ScintSD 20
/musr/command construct trd90y ScD21 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 -85.818712 62.5 log_DetV rotD21 musr/ScintSD 21
/musr/command construct trd90y ScD22 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 -72.753591 62.5 log_DetV rotD22 musr/ScintSD 22
/musr/command construct trd90y ScD23 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 -48.612395 62.5 log_DetV rotD23 musr/ScintSD 23
/musr/command construct trd90y ScD24 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 -17.070403 62.5 log_DetV rotD24 musr/ScintSD 24
/musr/command construct trd90y ScD25 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 17.070403 62.5 log_DetV rotD25 musr/ScintSD 25
/musr/command construct trd90y ScD26 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 48.612395 62.5 log_DetV rotD26 musr/ScintSD 26
/musr/command construct trd90y ScD27 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 72.753591 62.5 log_DetV rotD27 musr/ScintSD 27
/musr/command construct trd90y ScD28 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 85.818712 62.5 log_DetV rotD28 musr/ScintSD 28
/musr/command construct trd90y ScD29 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 85.818712 62.5 log_DetV rotD29 musr/ScintSD 29
/musr/command construct trd90y ScD30 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 72.753591 62.5 log_DetV rotD30 musr/ScintSD 30
/musr/command construct trd90y ScD31 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 48.612395 62.5 log_DetV rotD31 musr/ScintSD 31
/musr/command construct trd90y ScD32 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 17.070403 62.5 log_DetV rotD32 musr/ScintSD 32
# Back outer sections (v.a.)
/musr/command construct trd ScD33 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 -18.631126 -64.0 log_DetV rotD1 musr/ScintSD 33
/musr/command construct trd ScD34 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 -53.056957 -64.0 log_DetV rotD2 musr/ScintSD 34
/musr/command construct trd ScD35 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 -79.405348 -64.0 log_DetV rotD3 musr/ScintSD 35
/musr/command construct trd ScD36 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 -93.664994 -64.0 log_DetV rotD4 musr/ScintSD 36
/musr/command construct trd ScD37 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 -93.664994 -64.0 log_DetV rotD5 musr/ScintSD 37
/musr/command construct trd ScD38 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 -79.405348 -64.0 log_DetV rotD6 musr/ScintSD 38
/musr/command construct trd ScD39 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 -53.056957 -64.0 log_DetV rotD7 musr/ScintSD 39
/musr/command construct trd ScD40 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 -18.631126 -64.0 log_DetV rotD8 musr/ScintSD 40
/musr/command construct trd ScD41 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 18.631126 -64.0 log_DetV rotD9 musr/ScintSD 41
/musr/command construct trd ScD42 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 53.056957 -64.0 log_DetV rotD10 musr/ScintSD 42
/musr/command construct trd ScD43 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 79.405348 -64.0 log_DetV rotD11 musr/ScintSD 43
/musr/command construct trd ScD44 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 93.664994 -64.0 log_DetV rotD12 musr/ScintSD 44
/musr/command construct trd ScD45 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 93.664994 -64.0 log_DetV rotD13 musr/ScintSD 45
/musr/command construct trd ScD46 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 79.405348 -64.0 log_DetV rotD14 musr/ScintSD 46
/musr/command construct trd ScD47 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 53.056957 -64.0 log_DetV rotD15 musr/ScintSD 47
/musr/command construct trd ScD48 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 18.631126 -64.0 log_DetV rotD16 musr/ScintSD 48
# Forward outer sections (h.a.)
/musr/command construct trd ScD49 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 -18.436035 62.5 log_DetV rotD1 musr/ScintSD 49
/musr/command construct trd ScD50 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 -52.501387 62.5 log_DetV rotD2 musr/ScintSD 50
/musr/command construct trd ScD51 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 -78.573878 62.5 log_DetV rotD3 musr/ScintSD 51
/musr/command construct trd ScD52 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 -92.684209 62.5 log_DetV rotD4 musr/ScintSD 52
/musr/command construct trd ScD53 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 -92.684209 62.5 log_DetV rotD5 musr/ScintSD 53
/musr/command construct trd ScD54 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 -78.573878 62.5 log_DetV rotD6 musr/ScintSD 54
/musr/command construct trd ScD55 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 -52.501387 62.5 log_DetV rotD7 musr/ScintSD 55
/musr/command construct trd ScD56 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 -18.436035 62.5 log_DetV rotD8 musr/ScintSD 56
/musr/command construct trd ScD57 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 18.436035 62.5 log_DetV rotD9 musr/ScintSD 57
/musr/command construct trd ScD58 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 52.501387 62.5 log_DetV rotD10 musr/ScintSD 58
/musr/command construct trd ScD59 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 78.573878 62.5 log_DetV rotD11 musr/ScintSD 59
/musr/command construct trd ScD60 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 92.684209 62.5 log_DetV rotD12 musr/ScintSD 60
/musr/command construct trd ScD61 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 92.684209 62.5 log_DetV rotD13 musr/ScintSD 61
/musr/command construct trd ScD62 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 78.573878 62.5 log_DetV rotD14 musr/ScintSD 62
/musr/command construct trd ScD63 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 52.501387 62.5 log_DetV rotD15 musr/ScintSD 63
/musr/command construct trd ScD64 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 18.436035 62.5 log_DetV rotD16 musr/ScintSD 64
# Structural support inside the detectors vessel
# Carbon fibre, inner radius 80, thickness 2 mm.
# Additional Al plate removed, 2 mm thick for h.i and h.a and 3 mm thick for v.i. and v.a
/musr/command construct tubs hInShell 80.0 82.0 65.5 0 360 G4_C 0 0 62 log_DetV norot dead 70
/musr/command construct tubs vInShell 80.0 82.0 60.0 0 360 G4_C 0 0 -64.5 log_DetV norot dead 70
# Visual attributes (optional)
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE green
#/musr/command visattributes log_ScD49 green
#/musr/command visattributes log_ScD50 green
#/musr/command visattributes log_test red
################################################################################################################
# Sample vacuum/tube up to gate valve - Can host either the Cryostat or the MCP2
################################################################################################################
# Vacuum space
# /musr/command construct tubs SamV 0 75.0 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100
# Sample tube
#/musr/command construct tubs SamS 75.0 77.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# 2012: 2mm Ti tube, 2013: 1mm
/musr/command construct tubs SamS 75.0 76.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# F160 - 160 CF flange upstream of MCP2 tube
/musr/command construct tubs F160 78.0 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 102
# F100 (Blank end flange)
/musr/command construct tubs F100 0 75.0 10 0 360 Steel 0 0 172.0 log_World norot dead 103
# 200 CF flange upstream of MCP2 tube covering the whole length of the gate valve chamber.
/musr/command construct tubs GATS 103.25 126.5 92.5 0 360 Steel 0 0 -254.5 log_World norot dead 371
# F200 - 200 CF flange upstream of MCP2 tube to connect to gate valve chamber
/musr/command construct tubs F200 76.5 103.25 12 0 360 Steel 0 0 -174.0 log_World norot dead 372
# Visual attributes (optional)
#/musr/command visattributes log_SamV invisible
/musr/command visattributes log_SamS oxsteel
/musr/command visattributes log_F160 oxsteel
#/musr/command visattributes log_F100 oxsteel
/musr/command visattributes log_GATS oxsteel
/musr/command visattributes log_F200 oxsteel
################################################################################################################
# MCP - Micro Channel Plate Detector MCP2
# mcpv_z = -92.5 mm!
#
# We have a 324 mm long sample tube;
# the MCP2 front side is at 142 mm from the end of the sample tube.
# the front face of the sample plate of the cryostat is 145 mm from the end of the sample tube.
#
################################################################################################################
#
# MCPM1 - MCP Macor ring 1
# MCPD - electron multiplying glass disk (also known as target)
# Sensitive surface at z = 20 mm wrt. World
# MCPM2 - MCP Macor ring 2
# /musr/command construct tubs MCPM1 24 32.5 0.75 0 360 Macor 0 0 19.25 log_World norot dead 251
# Use it either as (DMCP-musr/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz.
# /musr/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 21.5 log_World norot dead 252
# /musr/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 23.75 log_World norot dead 253
# NOTE: To intercept ALL the incoming muons, comment the DMCP and MCPM1 lines above and uncomment this one:
#*aa/musr/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs target 0 21.0 1.5 0 360 MCPglass 0 0 114 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs saveTarget 0 75.0 0.2 0 360 G4_Galactic 0 0 110.79 log_SamV norot dead 222
#
# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole)
# MCVR - "Vacuum Ring" (circular hole)
# /musr/command construct box MCSR 36.5 36.5 1 Steel 0 0 25.5 log_World norot dead 254
# /musr/command construct tubs MCVR 0 27.5 1 0 360 G4_Galactic 0 0 0 log_MCSR norot dead 255
# 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
# /musr/command construct box MCPA 36.5 36.5 4 Steel 0 0 37 log_World norot dead 256
# /musr/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 257
# /musr/command construct tubs ANVA2 0 27.5 1.5 0 360 G4_Galactic 0 0 2.5 log_MCPA norot dead 258
# MCSS - MCP Stainless Steel Support Ring
# /musr/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 69.8 log_World norot dead 259
# MCP2 visual attributes (optional)
#/musr/command visattributes log_DMCP MCP_style
#*/musr/command visattributes log_target MCP_style
#*/musr/command visattributes log_MCPM1 MACOR_style
#*------ /musr/command visattributes log_MCPM2 MACOR_style
################################################################################################################
# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm)
#
# sample plate front face is at z = 17mm:
# cold finger distance to CF100: 130mm
# 5mm base plate + 6mm sapphire + 4mm sample plate = 15mm
# sample plate front face from CF100: 145mm
# z-position of sample plate front face: 324/2-145mm = 17mm
# --> sample plate center is at 17+2=19mm
#
################################################################################################################
# Dimensions for large/small sample plates SamPL=35/21 and SaphPL=SamPL35-5
/musr/command construct tubs target 0 35 2 0 360 G4_Al 0 0 19.0 log_World norot dead 251
/musr/command construct tubs SAPH 0 30 3 0 360 G4_ALUMINUM_OXIDE 0 0 24.0 log_World norot dead 252
/musr/command construct tubs SAH1 0 35 2.5 0 360 G4_Al 0 0 29.5 log_World norot dead 253
# Special save target volume
/musr/command construct tubs saveTarget 0 40 0.05 0 360 G4_Galactic 0 0 16.9 log_World norot dead 253
# Other components of the cryostat (dimensions and position of CRY4 are only approx. because unknown)
# COld Finger
/musr/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 37.0 log_World norot dead 261
# End plate of cryostat (7 mm thick, 30 mm diameter)
/musr/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 45.5 log_World norot dead 262
# Heat exchanger (assuming a 10 mm opening - Original dimensions not known.) # OLD pos. 160.0
/musr/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 74.0 log_World norot dead 263
# Mounting ring for He-shield
/musr/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 54.0 log_World norot dead 264
# 2 mm thick plate for mounting ring. This is just to close the downstream side.
/musr/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 54.0 log_World norot dead 265
# Radiation shield
/musr/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 19.0 log_World norot dead 266
# Front part of the radiation shield
/musr/command construct tubs CRSH2 30 48 0.5 0 360 G4_Cu 0 0 -26.5 log_World norot dead 267
# Electrical Field Guard Rings (distance between the guard rings: 16 mm)
# /musr/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 -13.5 log_World norot dead 271
# /musr/command construct tubs Guard2 29 38 1.5 0 360 G4_Cu 0 0 2.5 log_World norot dead 272
# Cryostat visual attributes (optional)
/musr/command visattributes log_SAH1 oxsteel
#/musr/command visattributes log_SAH2 oxsteel
/musr/command visattributes log_target oxsteel
/musr/command visattributes log_SAPH MACOR_style
#/musr/command visattributes log_SAH3 oxsteel
/musr/command visattributes log_CRSH yellow
/musr/command visattributes log_CRSH2 yellow
#/musr/command visattributes log_test red
################################################################################################################
# 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
/musr/command construct cons RA_EU 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World norot dead 801
/musr/command construct cons RA_MU 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World norot dead 802
/musr/command construct cons RA_ER 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnR dead 803
/musr/command construct cons RA_MR 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnR dead 804
/musr/command construct cons RA_ED 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnD dead 805
/musr/command construct cons RA_MD 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnD dead 806
/musr/command construct cons RA_EL 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnL dead 807
/musr/command construct cons RA_ML 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnL dead 808
# 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_T 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 822
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.02 log_World rotRAnR dead 824
/musr/command construct tubs RA_B 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 826
/musr/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.06 log_World rotRAnL dead 828
# 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 831
# Ring Anodes visual attributes (optional)
/musr/command visattributes log_RA_G invisible
#/musr/command visattributes log_RA_G Grid_style
################################################################################################################
# Trigger - Trigger Detector # Triggerz = -1092 mm; total length of TD is 110 mm; carbon foil at -1144 mm.
################################################################################################################
# Trigger volume
/musr/command construct tubs TrigV 90 127 148 0 360 G4_Galactic 0 0 -495 log_World norot dead 600
# Trigger tube
/musr/command construct tubs TrigS 100 103 148 0 360 Steel 0 0 0 log_TrigV norot dead 601
# TF - Trigger tube flanges
/musr/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 136 log_TrigV norot dead 611
/musr/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -136 log_TrigV norot dead 612
# trigger foil is 52-55mm upstream of TrigV center
# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm).
# USE THE NAME CFoil or coulombCFoil, otherwise musrMuFormation won't work!
#/musr/command construct box CFoil 60 60 0.0000025 G4_GRAPHITE 0 0 -550 log_World norot dead 621
/musr/command construct box CFoil 60 60 0.000002 G4_GRAPHITE 0 0 -550 log_World norot dead 621
# 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 musrDetectorConstruction.cc and set any density.
# Trigger visual attributes (optional)
/musr/command visattributes log_TrigV oxsteel
/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_saveAfterTD darkred
# Trigger Lens, L3, center -382 length 70mm radius 65mm.
/musr/command construct tubs TL3S 65.0 70.0 35.0 0 360 G4_Galactic 0 0 -382 log_World norot dead 706 nofield
/musr/command visattributes log_TL3S red
# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL.
# E.g. /musr/command visattributes Steel red
################################################################################################################
# L2 - 2nd Einzel Lens # L3z = -56.7 cm. (it was "L3" in 2011 and before)
# Lens Gap = 12.0 mm => G/D = 12/130 ~ 0.1 (Lens Gap = gap between Ground and Anode, D - Diameter)
################################################################################################################
# L3 volume
/musr/command construct tubs L3V 65 127 220 0 360 G4_Galactic 0 0 -863 log_World norot dead 400
# Lens 3 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 720 mm)
/musr/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 0 log_L3V norot dead 401
# Lens 3 Flange 1, z = L3z + 208 mm
/musr/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -208 log_L3V norot dead 402
# Lens 3 Flange 2, z = L3z - 208 mm
/musr/command construct tubs L3F2 103 126.5 12 0 360 Steel 0 0 208 log_L3V norot dead 403
# GPn - Ground Potential Electrodes
# n = 1-4 (further from TD) and 5-8 (closer to TD) - components of the Ground Electrodes
# Ground Electrode (inner dia: 130 mm, outer dia: 134 mm, length: 133 mm)
/musr/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 421
# Outer electrode surface (LN2 cooling vessel)
/musr/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 422
# First ring cap
/musr/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3V norot dead 423
# Second ring cap
/musr/command construct tubs L3GP4 67 81 4 0 360 Steel 0 0 71.0 log_L3V norot dead 424
/musr/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 431
/musr/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 432
/musr/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3V norot dead 433
/musr/command construct tubs L3GP8 67 81 4 0 360 Steel 0 0 -71.0 log_L3V norot dead 434
# HP - High Potential Electrode (Central Anode - usually at +8.7 kV, for a 15 keV muon beam)
/musr/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3V norot dead 451
# Lens 3 visual attributes (optional)
/musr/command visattributes log_L3V invisible
/musr/command visattributes log_L3ST oxsteel
/musr/command visattributes log_L3F1 oxsteel
/musr/command visattributes log_L3F2 oxsteel
/musr/command visattributes log_L3HP darkred
################################################################################################################
# -- SPIN ROTATOR GEOMETRY --
################################################################################################################
# Spin Rotator volume
/musr/command construct tubs SRENV 50 320 201.5 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 100
/musr/command visattributes log_SRENV invisible
# Electromagnet with iron yoke
# U - up, D - down, L - left, R - right (with respect to muon's view - momentum direction)
/musr/command construct box NPole 200 10 150 G4_Fe 0 85 0 log_SRENV norot dead 201
/musr/command construct box NYoke 150 22.5 50 G4_Fe 0 117.5 0 log_SRENV norot dead 202
/musr/command construct box NConn 225 17.5 190.0 G4_Fe 0 157.5 0 log_SRENV norot dead 203
/musr/command construct box SPole 200 10 150 G4_Fe 0 -85 0 log_SRENV norot dead 205
/musr/command construct box SYoke 150 22.5 50 G4_Fe 0 -117.5 0 log_SRENV norot dead 206
/musr/command construct box SConn 225 17.5 190.0 G4_Fe 0 -157.5 0 log_SRENV norot dead 207
# Front mirror plate
/musr/command construct box FShU 225 50 5 G4_Fe 0 125 -195.0 log_SRENV norot dead 301
/musr/command construct box FShD 225 50 5 G4_Fe 0 -125 -195.0 log_SRENV norot dead 302
/musr/command construct box FShL 75 75 5 G4_Fe 150 0 -195.0 log_SRENV norot dead 303
/musr/command construct box FShR 75 75 5 G4_Fe -150 0 -195.0 log_SRENV norot dead 304
# Back mirror plate
/musr/command construct box BShU 225 50 5 G4_Fe 0 125 195.0 log_SRENV norot dead 321
/musr/command construct box BShD 225 50 5 G4_Fe 0 -125 195.0 log_SRENV norot dead 322
/musr/command construct box BShL 75 75 5 G4_Fe 150 0 195.0 log_SRENV norot dead 323
/musr/command construct box BShR 75 75 5 G4_Fe -150 0 195.0 log_SRENV norot dead 324
# Top coils
/musr/command construct box TCoil1 170 22.5 10 G4_Cu 0 117.5 -60 log_SRENV norot dead 401
/musr/command construct box TCoil2 170 22.5 10 G4_Cu 0 117.5 60 log_SRENV norot dead 402
/musr/command construct box TCoil3 10 22.5 50 G4_Cu 160 117.5 0 log_SRENV norot dead 403
/musr/command construct box TCoil4 10 22.5 50 G4_Cu -160 117.5 0 log_SRENV norot dead 404
# Bottom coils
/musr/command construct box BCoil1 170 22.5 10 G4_Cu 0 -117.5 -60 log_SRENV norot dead 421
/musr/command construct box BCoil2 170 22.5 10 G4_Cu 0 -117.5 60 log_SRENV norot dead 422
/musr/command construct box BCoil3 10 22.5 50 G4_Cu 160 -117.5 0 log_SRENV norot dead 423
/musr/command construct box BCoil4 10 22.5 50 G4_Cu -160 -117.5 0 log_SRENV norot dead 424
# Capacitor
/musr/command construct box Cap_p 0.5 50 150 Brass 55 0 0 log_SRENV norot dead 501
/musr/command construct box Cap_n 0.5 50 150 Brass -55 0 0 log_SRENV norot dead 502
#*/musr/command construct box Uniform 49 49 150 G4_Galactic 0 0 0 log_SRENV norot dead 503
/musr/command construct tubs RodCapUp 0 5 150 90 180 Brass 55 55 0 log_SRENV norot dead 504
/musr/command construct tubs RodCapUn 0 5 150 -90 180 Brass -55 55 0 log_SRENV norot dead 505
/musr/command construct tubs RodCapDp 0 5 150 90 180 Brass 55 -55 0 log_SRENV norot dead 506
/musr/command construct tubs RodCapDn 0 5 150 -90 180 Brass -55 -55 0 log_SRENV norot dead 507
# Rods
/musr/command construct tubs RodPosU 0 5 150 0 360 Brass 27.5 55 0 log_SRENV norot dead 511
/musr/command construct tubs Rod0U 0 5 150 0 360 Brass 0 55 0 log_SRENV norot dead 512
/musr/command construct tubs RodNegU 0 5 150 0 360 Brass -27.5 55 0 log_SRENV norot dead 513
/musr/command construct tubs RodPosD 0 5 150 0 360 Brass 27.5 -55 0 log_SRENV norot dead 514
/musr/command construct tubs Rod0D 0 5 150 0 360 Brass 0 -55 0 log_SRENV norot dead 515
/musr/command construct tubs RodNegD 0 5 150 0 360 Brass -27.5 -55 0 log_SRENV norot dead 516
# Vacuum vessel
/musr/command construct box TVac1 72.5 2.5 191.5 Steel 0 72.5 0 log_SRENV norot dead 601
/musr/command construct box TVac2 2.5 70.0 191.5 Steel 72.5 0 0 log_SRENV norot dead 602
/musr/command construct box TVac3 72.5 2.5 191.5 Steel 0 -72.5 0 log_SRENV norot dead 603
/musr/command construct box TVac4 2.5 70.0 191.5 Steel -72.5 0 0 log_SRENV norot dead 604
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For Spin Rotator
/musr/command construct tubs SREField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 630 nofield
/musr/command construct tubs SRBField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.51 log_World norot dead 631 nofield
/musr/command visattributes G4_Cu red
/musr/command visattributes G4_Fe blue
/musr/command visattributes Brass yellow
################################################################################################################
# Lens 1 - 1st Einzel Lens
################################################################################################################
# L1ENV - Lens 1 envelope - for easy positioning of lens parts (outer dia: 100 mm, length: 300 mm)
#/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 0 0 -1929.5 log_World norot dead 600
/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend 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
# n = 2 - Ground Electrode 2 (closer to SR).
/musr/command construct tubs L1GP2 40 44 50 0 360 Steel 0 0 100 log_L1ENV norot dead 653
# HP - High Potential Electrode (Central Anode - usually at +8.5 kV, for a 15 keV muon beam)
/musr/command construct tubs L1HP 40 44 40 0 360 Steel 0 0 0 log_L1ENV norot dead 652
# Lens 1 visual attributes (optional)
/musr/command visattributes log_L1HP darkred
################################################################################################################
# Electrostatic field at accelerator after moderator
################################################################################################################
#
/musr/command construct box Grid1 9.1 25 25 G4_Galactic 489.9 0.0 -1678.0 log_World rotMod dead 212
/musr/command globalfield Grid1_field 9.1 25 25 uniform 489.9 0.0 -1678.0 log_Grid1 0 0 0 -0.2527 0 0
/musr/command construct box Grid2 5 24 24 G4_Galactic 475.8 0.0 -1678.0 log_World rotMod dead 214
/musr/command globalfield Grid2_field 5 24 24 uniform 475.8 0.0 -1678.0 log_Grid2 0 0 0 -1.04 0 0
/musr/command globalfield printFieldValueAtPoint 489.9 0.0 -1678.0
/musr/command globalfield printFieldValueAtPoint 475.8 0.0 -1678.0
################################################################################################################
# Electrostatic mirror at bend
################################################################################################################
# MRENV
/musr/command construct box MirrE 65 65 10 G4_Galactic 14.14213562 0.0 -1678.0 log_World rotMirr dead 200
/musr/command globalfield Mirr_field 65 65 10 uniform 14.14213562 0.0 -1678.0 log_MirrE 0 0 0 0 0 0.75
###################################################################################
################### E L E C T R O M G N E T I C F I E L D S ##################
###################################################################################
# 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!
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For L1
/musr/command construct tubs L1EField 0 0.01 0.005 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend dead 706 nofield
# For L2 (L3 before 2012)
/musr/command construct tubs L3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -863.0 log_World norot dead 708 nofield
# LENS 1. Best L1 settings: 7.2 kV for 12 keV muons
/musr/command globalfield Lens1EField 251.5 0.0 -1678.0 fromfile 2DE L1_Erz.map log_L1EField 9.0
# LENS 2. Best L3 settings: 8.4 kV for 12 keV muons
/musr/command globalfield Lens3EField 0. 0. -863.0 fromfile 2DE L3_Erz.map log_L3EField 10.5
# Spin rotator
# Electric field should be 370mm plates
# Magnetic field should be 260mm poles as measured srlem_ext.map
/musr/command globalfield Ele_field 0. 0. -1284.5 fromfile 3DE E_Sep_P37.5cm.map log_SREField 2.717
/musr/command globalfield Mag_field 0. 0. -1284.51 fromfile 3DB srlem_ext.map log_SRBField -0.00692
# 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
# 57.15mm upstream center
/musr/command construct box TriggE0 45 45 5 G4_Galactic 0 0 -555.1 log_World norot dead 630 nofield
# 48mm upstream center
/musr/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -543. log_World norot dead 631 nofield
# 2.25mm downstream center
/musr/command construct box TriggE2 45 45 4.9479 G4_Galactic 0 0 -492.75 log_World rotTrig dead 632 nofield
# 54mm downstream center
/musr/command construct box TriggE3 45 45 4 G4_Galactic 0 0 -441.0 log_World norot dead 633
### Electric field at TRIGGER Detector TD: Three different uniform fields, 2012 settings
/musr/command globalfield Trigg0_field 45 45 5 uniform 0. 0. -555.1 log_TriggE0 0 0 0 0 0 0.338
/musr/command globalfield Trigg1_field 45 45 4 uniform 0. 0. -543. log_TriggE1 0 0 0 0 0 -0.02375
/musr/command globalfield Trigg2_field 45 45 4.9497 uniform 0. 0. -492.75 log_TriggE2 0 0 0 0 0 0.041416
/musr/command globalfield Trigg3_field 45 45 4 uniform 0. 0. -441.0 log_TriggE3 0 0 0 0 0 -0.45
# Trigger Lens, L3, (available space from -437 to -347, we use 70mm of that)
/musr/command construct tubs TL3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -382.0 log_World norot dead 706 nofield
/musr/command globalfield ColRingEField 0. 0. -382.0 fromfile 2DE CR7cm_Grid.map log_TL3EField 12.0
### Electric field at RING ANODE - from 3DE field map
# To create an arbitrary configuration, switch on all fields and set different potentials.
/musr/command globalfield RngAnT_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_T 11.9
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 11.9
/musr/command globalfield RngAnB_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_B 11.9
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 11.9
### 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_convMap.map log_SBField 0.
### Electric field at the sample
/musr/command construct tubs SEField 0 0.01 0.005 0 360 G4_Galactic 0.0 0.0 15.9 log_World norot dead 710 nofield
/musr/command globalfield SampleEField 0. 0. 15.9 fromfile 2DE SamplePlate_2DE.map log_SEField 0.0
# Set parameters for particle tracking in an EM field
/musr/command globalfield setparameter SetLargestAcceptableStep 5
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
# TESTING EM FIELD
/musr/command globalfield printFieldValueAtPoint 0. 0. 0.
/musr/command globalfield printFieldValueAtPoint 0. 35. -670.
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.10
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
#/musr/command process addModel mu+ G4MuMultipleScattering G4WentzelVIModel 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ musrMuEnergyLossLandau -1 -1 1
# parameters for Landau energy loss distribution, LandauSigma corresponds to the width of the distibution
/musr/command SetLandauMPV 0.01
/musr/command SetLandauSigma 0.3
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#/musr/command process addDiscreteProcess mu+ G4CoulombScattering
#/musr/command process addProcess mu+ G4UserSpecialCuts -1 -1 3
#/musr/command process addProcess mu+ G4StepLimiter -1 -1 4
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
#/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
#/musr/command signalSeparationTime 0.1
#
/musr/run/randomOption 1
################################################################################################################
# -- Setting simulation PARAMETERS --
################################################################################################################
# Set the overall range cut (default 0.1 mm)
#*/run/setCut 1 mm
# Set the range cut on particular volumes (in mm)
#/musr/command SetUserLimits log_CFoil 1e-8 -1 -1 -1 -1
#*/musr/command SetUserLimits log_target 0.01
#*/musr/command SetUserLimits log_targetscint 0.01
#*/musr/command SetUserLimits log_cryostatscint 0.01
# Set particle energy cuts on particular volumes (in eV)
#/musr/command SetUserLimits log_World ustepMax(mm) utrakMax(mm) utimeMax(ns) uekinMin(MeV) urangMin(mm)
#/musr/command SetUserLimits log_World -1 -1 -1 1e-7 -1
# Geant4 10.2
#------------
/process/em/lowestMuHadEnergy 1e-6 MeV
# Store ALL the events in a ROOT tree or just the interesting ones? (default is true)
#*/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
# Override runID number
#*/musr/run/runID 21
# Set the frequency of event printing
/musr/run/howOftenToPrintEvent 100
# 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
/musr/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
#*/control/execute visdawn.mac
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
#/musr/command rootOutput weight off
#/musr/command rootOutput BFieldAtDecay off
#/musr/command rootOutput muIniPosX off
#/musr/command rootOutput muIniPosY off
#/musr/command rootOutput muIniPosZ off
#/musr/command rootOutput muIniMomX off
#/musr/command rootOutput muIniMomY off
#/musr/command rootOutput muIniMomZ off
#/musr/command rootOutput muIniPolX off
#/musr/command rootOutput muIniPolY off
#/musr/command rootOutput muIniPolZ off
#/musr/command rootOutput muDecayDetID off
#/musr/command rootOutput muDecayPosX off
#/musr/command rootOutput muDecayPosY off
#/musr/command rootOutput muDecayPosZ off
#/musr/command rootOutput muDecayTime off
#/musr/command rootOutput muDecayPolX off
#/musr/command rootOutput muDecayPolY off
#/musr/command rootOutput muDecayPolZ off
#/musr/command rootOutput muTargetTime off
#/musr/command rootOutput muTargetPolX off
#/musr/command rootOutput muTargetPolY off
#/musr/command rootOutput muTargetPolZ off
#/musr/command rootOutput muM0Time off
#/musr/command rootOutput muM0PolX off
#/musr/command rootOutput muM0PolY off
#/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
#/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
/musr/command storeOnlyEventsWithHits false
################################################################################################################
# -- Setting PARTICLE GUN parameters --
################################################################################################################
# Default momentum direction: 001, i.e. 0z.
# Default muon soin 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 -1144 mm, acceleration starts at -1154.15 mm
#/gun/vertex 0. 0. -2119.5 mm
/gun/vertex 499 0. -1678.0 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 6.83 6.83 0 mm
/gun/vertexsigma -15 -15 0 mm
#/gun/boxboundarycentre 499 0 -1678 mm
#/gun/boxboundary 15 15 1 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
# Set muon energy before hitting TD; a constant field in front of the C-foil accelerates the muons
# to add 3.38 keV
/gun/kenergy 15.0 eV
# Set beam momentum direction
/gun/direction -1.0 0.0 0.0
# Set muon spin direction: +10deg or 0
/gun/muonPolarizVector 0.9848 0 0.17365
#/gun/muonPolarizVector 1 0 0
# Other useful test parameters:
#------------------Oct.20 2015------------------------------------
# kenergy= 15 eV Pmu= 0.xxxMeV/c ==> sigma = /2.354 = MeV/c
#/gun/momentumsmearing 0.07508 MeV
/gun/momentumsmearing 0.016 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#*/gun/momentumboundary 20 40 0 MeV
#---/gun/tilt: xangle, yangle, dummy
#*/gun/tilt 0 0.0 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.0 deg
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#*/gun/decaytimelimits 10400 10420 2197.03 ns
#/gun/tiltsigma 1.4 1.4 0 deg
/gun/tiltsigma 0 0 -1.0 deg
# Selectively inactivate or activate sensitive detectors
#*/hits/inactivate /musr/ScintSD
# Only for code debugging!
/tracking/verbose 0
# BEAM ON
#/run/beamOn 1000000
#/run/beamOn 10
/run/beamOn 10000

View File

@@ -0,0 +1,950 @@
# Template suitable for beam profile detectioon with the spin rotator in place
# Zaher Salman 7/10/2010
#
# Thomas Prokscha 22/Nov/2012
# Moved sample stack on cryostat 3mm downstream to fit to positions in apparatus
# Changed positions of positron counters according to corrected drawing LEM 37.01.024 (19/Sep/2012)
#
# Position downstream detectors: z=+62.5mm original value: z=+66.5mm
# Position upstream detectors: z=-64.0mm original value: z=-60.0mm
#
# 2013 setup: 1mm Ti sample tube
#
# 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
#
# Ran Xiao 25/Sep/2014
# Start muons at moderator at x=499, assume cosA angular distribution, assume energy distribution
#
################################################################################################################
# -- ROTATION MATRICES --
################################################################################################################
# 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
/musr/command rotation rotRAnL 0 0 1 90
/musr/command rotation rotRAnD 0 0 1 180
# More Rotations
/musr/command rotation rotD1 0 0 1 11.250
/musr/command rotation rotD2 0 0 1 33.750
/musr/command rotation rotD3 0 0 1 56.250
/musr/command rotation rotD4 0 0 1 78.750
/musr/command rotation rotD5 0 0 1 101.250
/musr/command rotation rotD6 0 0 1 123.750
/musr/command rotation rotD7 0 0 1 146.250
/musr/command rotation rotD8 0 0 1 168.750
/musr/command rotation rotD9 0 0 1 191.250
/musr/command rotation rotD10 0 0 1 213.750
/musr/command rotation rotD11 0 0 1 236.250
/musr/command rotation rotD12 0 0 1 258.750
/musr/command rotation rotD13 0 0 1 281.250
/musr/command rotation rotD14 0 0 1 303.750
/musr/command rotation rotD15 0 0 1 326.250
/musr/command rotation rotD16 0 0 1 348.750
/musr/command rotation rotD17 0 0 1 11.250
/musr/command rotation rotD18 0 0 1 33.750
/musr/command rotation rotD19 0 0 1 56.250
/musr/command rotation rotD20 0 0 1 78.750
/musr/command rotation rotD21 0 0 1 101.250
/musr/command rotation rotD22 0 0 1 123.750
/musr/command rotation rotD23 0 0 1 146.250
/musr/command rotation rotD24 0 0 1 168.750
/musr/command rotation rotD25 0 0 1 191.250
/musr/command rotation rotD26 0 0 1 213.750
/musr/command rotation rotD27 0 0 1 236.250
/musr/command rotation rotD28 0 0 1 258.750
/musr/command rotation rotD29 0 0 1 281.250
/musr/command rotation rotD30 0 0 1 303.750
/musr/command rotation rotD31 0 0 1 326.250
/musr/command rotation rotD32 0 0 1 348.750
# Beam line bend at mirror
/musr/command rotation rotBend 0 1 0 -90
/musr/command rotation rotMirr 0 1 0 -45
/musr/command rotation rotMod 0 1 0 -2.5
################################################################################################################
# -- LEM GEOMETRY --
################################################################################################################
# WORLD = Laboratory reference frame, the origin is in the centre of the LEM sample tube
/musr/command construct box World 900 350 2600 G4_Galactic 0 0 0 no_logical_volume norot dead -1
/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 60 0.05 0 360 G4_Galactic 850 0 -1678 log_World rotBend dead 851
/musr/command construct tubs save1 0 60 0.05 0 360 G4_Galactic 800 0 -1678 log_World rotBend dead 852
/musr/command construct tubs save2 0 60 0.05 0 360 G4_Galactic 750 0 -1678 log_World rotBend dead 853
/musr/command construct tubs save3 0 60 0.05 0 360 G4_Galactic 700 0 -1678 log_World rotBend dead 854
/musr/command construct tubs save4 0 60 0.05 0 360 G4_Galactic 650 0 -1678 log_World rotBend dead 855
/musr/command construct tubs save5 0 60 0.05 0 360 G4_Galactic 600 0 -1678 log_World rotBend dead 856
/musr/command construct tubs save6 0 60 0.05 0 360 G4_Galactic 550 0 -1678 log_World rotBend dead 857
/musr/command construct tubs save7 0 60 0.05 0 360 G4_Galactic 500 0 -1678 log_World rotBend dead 858
/musr/command construct tubs save8 0 60 0.05 0 360 G4_Galactic 450 0 -1678 log_World rotBend dead 859
/musr/command construct tubs save9 0 60 0.05 0 360 G4_Galactic 400 0 -1678 log_World rotBend dead 860
/musr/command construct tubs save10 0 60 0.05 0 360 G4_Galactic 350 0 -1678 log_World rotBend dead 861
/musr/command construct tubs save11 0 60 0.05 0 360 G4_Galactic 300 0 -1678 log_World rotBend dead 862
/musr/command construct tubs save12 0 60 0.05 0 360 G4_Galactic 240 0 -1678 log_World rotBend dead 863
/musr/command construct tubs save13 0 60 0.05 0 360 G4_Galactic 200 0 -1678 log_World rotBend dead 864
/musr/command construct tubs save14 0 60 0.05 0 360 G4_Galactic 150 0 -1678 log_World rotBend dead 865
/musr/command construct tubs save15 0 60 0.05 0 360 G4_Galactic 100 0 -1678 log_World rotBend dead 866
/musr/command construct tubs save16 0 60 0.05 0 360 G4_Galactic 70 0 -1678 log_World rotBend dead 867
/musr/command construct tubs save17 0 60 0.05 0 360 G4_Galactic 0 0 -1620 log_World norot dead 868
/musr/command construct tubs save18 0 60 0.05 0 360 G4_Galactic 0 0 -1600 log_World norot dead 869
/musr/command construct tubs save19 0 60 0.05 0 360 G4_Galactic 0 0 -1550 log_World norot dead 870
/musr/command construct tubs save20 0 60 0.05 0 360 G4_Galactic 0 0 -1500 log_World norot dead 871
/musr/command construct tubs save21 0 60 0.05 0 360 G4_Galactic 0 0 -1450 log_World norot dead 872
/musr/command construct tubs save22 0 60 0.05 0 360 G4_Galactic 0 0 -1400 log_World norot dead 873
/musr/command construct tubs save23 0 60 0.05 0 360 G4_Galactic 0 0 -1350 log_World norot dead 874
/musr/command construct tubs save24 0 60 0.05 0 360 G4_Galactic 0 0 -1300 log_World norot dead 875
/musr/command construct tubs save25 0 60 0.05 0 360 G4_Galactic 0 0 -1250 log_World norot dead 876
/musr/command construct tubs save26 0 60 0.05 0 360 G4_Galactic 0 0 -1200 log_World norot dead 877
/musr/command construct tubs save27 0 60 0.05 0 360 G4_Galactic 0 0 -1150 log_World norot dead 878
/musr/command construct tubs save28 0 60 0.05 0 360 G4_Galactic 0 0 -1100 log_World norot dead 879
/musr/command construct tubs save29 0 60 0.05 0 360 G4_Galactic 0 0 -1050 log_World norot dead 880
/musr/command construct tubs save30 0 60 0.05 0 360 G4_Galactic 0 0 -1000 log_World norot dead 881
/musr/command construct tubs save31 0 60 0.05 0 360 G4_Galactic 0 0 -950 log_World norot dead 882
/musr/command construct tubs save32 0 60 0.05 0 360 G4_Galactic 0 0 -900 log_World norot dead 883
/musr/command construct tubs save33 0 60 0.05 0 360 G4_Galactic 0 0 -850 log_World norot dead 884
/musr/command construct tubs save34 0 60 0.05 0 360 G4_Galactic 0 0 -800 log_World norot dead 885
/musr/command construct tubs save35 0 60 0.05 0 360 G4_Galactic 0 0 -750 log_World norot dead 886
/musr/command construct tubs save36 0 60 0.05 0 360 G4_Galactic 0 0 -700 log_World norot dead 887
/musr/command construct tubs save37 0 60 0.05 0 360 G4_Galactic 0 0 -650 log_World norot dead 888
/musr/command construct tubs save38 0 60 0.05 0 360 G4_Galactic 0 0 -600 log_World norot dead 889
/musr/command construct tubs save39 0 60 0.05 0 360 G4_Galactic 0 0 -525 log_World norot dead 890
/musr/command construct tubs save40 0 60 0.05 0 360 G4_Galactic 0 0 -450 log_World norot dead 891
/musr/command construct tubs save41 0 60 0.05 0 360 G4_Galactic 0 0 -420 log_World norot dead 892
/musr/command construct tubs save42 0 60 0.05 0 360 G4_Galactic 0 0 -400 log_World norot dead 893
/musr/command construct tubs save43 0 60 0.05 0 360 G4_Galactic 0 0 -350 log_World norot dead 894
/musr/command construct tubs save44 0 60 0.05 0 360 G4_Galactic 0 0 -300 log_World norot dead 895
/musr/command construct tubs save45 0 60 0.05 0 360 G4_Galactic 0 0 -250 log_World norot dead 896
/musr/command construct tubs save46 0 60 0.05 0 360 G4_Galactic 0 0 -200 log_World norot dead 897
/musr/command construct tubs save47 0 60 0.05 0 360 G4_Galactic 0 0 -150 log_World norot dead 898
/musr/command construct tubs save48 0 60 0.05 0 360 G4_Galactic 0 0 -100 log_World norot dead 899
/musr/command construct tubs save49 0 60 0.05 0 360 G4_Galactic 0 0 -50 log_World norot dead 900
/musr/command construct tubs save50 0 60 0.05 0 360 G4_Galactic 0 0 0 log_World norot dead 901
/musr/command construct tubs save51 0 60 0.05 0 360 G4_Galactic 0 0 16 log_World norot dead 902
/musr/command construct tubs save52 0 60 0.05 0 360 G4_Galactic 0 0 100 log_World norot dead 903
/musr/command construct tubs save53 0 60 0.05 0 360 G4_Galactic 0 0 150 log_World norot dead 904
/musr/command visattributes G4_Galactic invisible
################################################################################################################
# -- APD Scintillators --
################################################################################################################
# Detectors volume (0,0,0) coninsides with World (0,0,0)
/musr/command construct tubs DetV 80 105 133 0 360 G4_Galactic 0 0 0 log_World norot dead 100
/musr/command visattributes log_DetV invisible
# For final design set
# BackHW=60
# BackCR=-64.0, 19/Sep/2012
# ForwHW=65.5
# ForwCR=62.5, 19/Sep/2012
# Back inner sections (Upstream) (v.i.)
# Final design (30 Jun 09, 19 Sep 12) BackHW=60.0mm (Half width or length), BackCR=-4-BackHW=-64.0mm (Center z coordinate)
/musr/command construct trd90y ScD1 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 -17.265493 -64.0 log_DetV rotD1 musr/ScintSD 1
/musr/command construct trd90y ScD2 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 -49.167966 -64.0 log_DetV rotD2 musr/ScintSD 2
/musr/command construct trd90y ScD3 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 -73.585061 -64.0 log_DetV rotD3 musr/ScintSD 3
/musr/command construct trd90y ScD4 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 -86.799497 -64.0 log_DetV rotD4 musr/ScintSD 4
/musr/command construct trd90y ScD5 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 -86.799497 -64.0 log_DetV rotD5 musr/ScintSD 5
/musr/command construct trd90y ScD6 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 -73.585061 -64.0 log_DetV rotD6 musr/ScintSD 6
/musr/command construct trd90y ScD7 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 -49.167966 -64.0 log_DetV rotD7 musr/ScintSD 7
/musr/command construct trd90y ScD8 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 -17.265493 -64.0 log_DetV rotD8 musr/ScintSD 8
/musr/command construct trd90y ScD9 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 17.265493 -64.0 log_DetV rotD9 musr/ScintSD 9
/musr/command construct trd90y ScD10 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 49.167966 -64.0 log_DetV rotD10 musr/ScintSD 10
/musr/command construct trd90y ScD11 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 73.585061 -64.0 log_DetV rotD11 musr/ScintSD 11
/musr/command construct trd90y ScD12 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 86.799497 -64.0 log_DetV rotD12 musr/ScintSD 12
/musr/command construct trd90y ScD13 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 86.799497 -64.0 log_DetV rotD13 musr/ScintSD 13
/musr/command construct trd90y ScD14 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 73.585061 -64.0 log_DetV rotD14 musr/ScintSD 14
/musr/command construct trd90y ScD15 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 49.167966 -64.0 log_DetV rotD15 musr/ScintSD 15
/musr/command construct trd90y ScD16 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 17.265493 -64.0 log_DetV rotD16 musr/ScintSD 16
# Forward inner sections (Downstream) (h.i.)
# Final design (30 June 09, 19 Sep 12) ForwHW=65.5mm (Half width or length), ForwCR=-3+ForwHW=62.5mm (Center z coordinate)
/musr/command construct trd90y ScD17 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 -17.070403 62.5 log_DetV rotD17 musr/ScintSD 17
/musr/command construct trd90y ScD18 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 -48.612395 62.5 log_DetV rotD18 musr/ScintSD 18
/musr/command construct trd90y ScD19 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 -72.753591 62.5 log_DetV rotD19 musr/ScintSD 19
/musr/command construct trd90y ScD20 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 -85.818712 62.5 log_DetV rotD20 musr/ScintSD 20
/musr/command construct trd90y ScD21 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 -85.818712 62.5 log_DetV rotD21 musr/ScintSD 21
/musr/command construct trd90y ScD22 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 -72.753591 62.5 log_DetV rotD22 musr/ScintSD 22
/musr/command construct trd90y ScD23 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 -48.612395 62.5 log_DetV rotD23 musr/ScintSD 23
/musr/command construct trd90y ScD24 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 -17.070403 62.5 log_DetV rotD24 musr/ScintSD 24
/musr/command construct trd90y ScD25 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 17.070403 62.5 log_DetV rotD25 musr/ScintSD 25
/musr/command construct trd90y ScD26 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 48.612395 62.5 log_DetV rotD26 musr/ScintSD 26
/musr/command construct trd90y ScD27 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 72.753591 62.5 log_DetV rotD27 musr/ScintSD 27
/musr/command construct trd90y ScD28 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 85.818712 62.5 log_DetV rotD28 musr/ScintSD 28
/musr/command construct trd90y ScD29 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 85.818712 62.5 log_DetV rotD29 musr/ScintSD 29
/musr/command construct trd90y ScD30 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 72.753591 62.5 log_DetV rotD30 musr/ScintSD 30
/musr/command construct trd90y ScD31 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 48.612395 62.5 log_DetV rotD31 musr/ScintSD 31
/musr/command construct trd90y ScD32 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 17.070403 62.5 log_DetV rotD32 musr/ScintSD 32
# Back outer sections (v.a.)
/musr/command construct trd ScD33 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 -18.631126 -64.0 log_DetV rotD1 musr/ScintSD 33
/musr/command construct trd ScD34 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 -53.056957 -64.0 log_DetV rotD2 musr/ScintSD 34
/musr/command construct trd ScD35 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 -79.405348 -64.0 log_DetV rotD3 musr/ScintSD 35
/musr/command construct trd ScD36 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 -93.664994 -64.0 log_DetV rotD4 musr/ScintSD 36
/musr/command construct trd ScD37 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 -93.664994 -64.0 log_DetV rotD5 musr/ScintSD 37
/musr/command construct trd ScD38 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 -79.405348 -64.0 log_DetV rotD6 musr/ScintSD 38
/musr/command construct trd ScD39 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 -53.056957 -64.0 log_DetV rotD7 musr/ScintSD 39
/musr/command construct trd ScD40 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 -18.631126 -64.0 log_DetV rotD8 musr/ScintSD 40
/musr/command construct trd ScD41 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 18.631126 -64.0 log_DetV rotD9 musr/ScintSD 41
/musr/command construct trd ScD42 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 53.056957 -64.0 log_DetV rotD10 musr/ScintSD 42
/musr/command construct trd ScD43 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 79.405348 -64.0 log_DetV rotD11 musr/ScintSD 43
/musr/command construct trd ScD44 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 93.664994 -64.0 log_DetV rotD12 musr/ScintSD 44
/musr/command construct trd ScD45 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 93.664994 -64.0 log_DetV rotD13 musr/ScintSD 45
/musr/command construct trd ScD46 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 79.405348 -64.0 log_DetV rotD14 musr/ScintSD 46
/musr/command construct trd ScD47 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 53.056957 -64.0 log_DetV rotD15 musr/ScintSD 47
/musr/command construct trd ScD48 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 18.631126 -64.0 log_DetV rotD16 musr/ScintSD 48
# Forward outer sections (h.a.)
/musr/command construct trd ScD49 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 -18.436035 62.5 log_DetV rotD1 musr/ScintSD 49
/musr/command construct trd ScD50 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 -52.501387 62.5 log_DetV rotD2 musr/ScintSD 50
/musr/command construct trd ScD51 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 -78.573878 62.5 log_DetV rotD3 musr/ScintSD 51
/musr/command construct trd ScD52 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 -92.684209 62.5 log_DetV rotD4 musr/ScintSD 52
/musr/command construct trd ScD53 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 -92.684209 62.5 log_DetV rotD5 musr/ScintSD 53
/musr/command construct trd ScD54 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 -78.573878 62.5 log_DetV rotD6 musr/ScintSD 54
/musr/command construct trd ScD55 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 -52.501387 62.5 log_DetV rotD7 musr/ScintSD 55
/musr/command construct trd ScD56 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 -18.436035 62.5 log_DetV rotD8 musr/ScintSD 56
/musr/command construct trd ScD57 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 18.436035 62.5 log_DetV rotD9 musr/ScintSD 57
/musr/command construct trd ScD58 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 52.501387 62.5 log_DetV rotD10 musr/ScintSD 58
/musr/command construct trd ScD59 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 78.573878 62.5 log_DetV rotD11 musr/ScintSD 59
/musr/command construct trd ScD60 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 92.684209 62.5 log_DetV rotD12 musr/ScintSD 60
/musr/command construct trd ScD61 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 92.684209 62.5 log_DetV rotD13 musr/ScintSD 61
/musr/command construct trd ScD62 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 78.573878 62.5 log_DetV rotD14 musr/ScintSD 62
/musr/command construct trd ScD63 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 52.501387 62.5 log_DetV rotD15 musr/ScintSD 63
/musr/command construct trd ScD64 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 18.436035 62.5 log_DetV rotD16 musr/ScintSD 64
# Structural support inside the detectors vessel
# Carbon fibre, inner radius 80, thickness 2 mm.
# Additional Al plate removed, 2 mm thick for h.i and h.a and 3 mm thick for v.i. and v.a
/musr/command construct tubs hInShell 80.0 82.0 65.5 0 360 G4_C 0 0 62 log_DetV norot dead 70
/musr/command construct tubs vInShell 80.0 82.0 60.0 0 360 G4_C 0 0 -64.5 log_DetV norot dead 70
# Visual attributes (optional)
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE green
#/musr/command visattributes log_ScD49 green
#/musr/command visattributes log_ScD50 green
#/musr/command visattributes log_test red
################################################################################################################
# Sample vacuum/tube up to gate valve - Can host either the Cryostat or the MCP2
################################################################################################################
# Vacuum space
# /musr/command construct tubs SamV 0 75.0 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100
# Sample tube
#/musr/command construct tubs SamS 75.0 77.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# 2012: 2mm Ti tube, 2013: 1mm
/musr/command construct tubs SamS 75.0 76.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# F160 - 160 CF flange upstream of MCP2 tube
/musr/command construct tubs F160 78.0 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 102
# F100 (Blank end flange)
/musr/command construct tubs F100 0 75.0 10 0 360 Steel 0 0 172.0 log_World norot dead 103
# 200 CF flange upstream of MCP2 tube covering the whole length of the gate valve chamber.
/musr/command construct tubs GATS 103.25 126.5 92.5 0 360 Steel 0 0 -254.5 log_World norot dead 371
# F200 - 200 CF flange upstream of MCP2 tube to connect to gate valve chamber
/musr/command construct tubs F200 76.5 103.25 12 0 360 Steel 0 0 -174.0 log_World norot dead 372
# Visual attributes (optional)
#/musr/command visattributes log_SamV invisible
/musr/command visattributes log_SamS oxsteel
/musr/command visattributes log_F160 oxsteel
#/musr/command visattributes log_F100 oxsteel
/musr/command visattributes log_GATS oxsteel
/musr/command visattributes log_F200 oxsteel
################################################################################################################
# MCP - Micro Channel Plate Detector MCP2
# mcpv_z = -92.5 mm!
#
# We have a 324 mm long sample tube;
# the MCP2 front side is at 142 mm from the end of the sample tube.
# the front face of the sample plate of the cryostat is 145 mm from the end of the sample tube.
#
################################################################################################################
#
# MCPM1 - MCP Macor ring 1
# MCPD - electron multiplying glass disk (also known as target)
# Sensitive surface at z = 20 mm wrt. World
# MCPM2 - MCP Macor ring 2
# /musr/command construct tubs MCPM1 24 32.5 0.75 0 360 Macor 0 0 19.25 log_World norot dead 251
# Use it either as (DMCP-musr/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz.
# /musr/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 21.5 log_World norot dead 252
# /musr/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 23.75 log_World norot dead 253
# NOTE: To intercept ALL the incoming muons, comment the DMCP and MCPM1 lines above and uncomment this one:
#*aa/musr/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs target 0 21.0 1.5 0 360 MCPglass 0 0 114 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs saveTarget 0 75.0 0.2 0 360 G4_Galactic 0 0 110.79 log_SamV norot dead 222
#
# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole)
# MCVR - "Vacuum Ring" (circular hole)
# /musr/command construct box MCSR 36.5 36.5 1 Steel 0 0 25.5 log_World norot dead 254
# /musr/command construct tubs MCVR 0 27.5 1 0 360 G4_Galactic 0 0 0 log_MCSR norot dead 255
# 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
# /musr/command construct box MCPA 36.5 36.5 4 Steel 0 0 37 log_World norot dead 256
# /musr/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 257
# /musr/command construct tubs ANVA2 0 27.5 1.5 0 360 G4_Galactic 0 0 2.5 log_MCPA norot dead 258
# MCSS - MCP Stainless Steel Support Ring
# /musr/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 69.8 log_World norot dead 259
# MCP2 visual attributes (optional)
#/musr/command visattributes log_DMCP MCP_style
#*/musr/command visattributes log_target MCP_style
#*/musr/command visattributes log_MCPM1 MACOR_style
#*------ /musr/command visattributes log_MCPM2 MACOR_style
################################################################################################################
# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm)
#
# sample plate front face is at z = 17mm:
# cold finger distance to CF100: 130mm
# 5mm base plate + 6mm sapphire + 4mm sample plate = 15mm
# sample plate front face from CF100: 145mm
# z-position of sample plate front face: 324/2-145mm = 17mm
# --> sample plate center is at 17+2=19mm
#
################################################################################################################
# Dimensions for large/small sample plates SamPL=35/21 and SaphPL=SamPL35-5
/musr/command construct tubs target 0 35 2 0 360 G4_Al 0 0 19.0 log_World norot dead 251
/musr/command construct tubs SAPH 0 30 3 0 360 G4_ALUMINUM_OXIDE 0 0 24.0 log_World norot dead 252
/musr/command construct tubs SAH1 0 35 2.5 0 360 G4_Al 0 0 29.5 log_World norot dead 253
# Special save target volume
/musr/command construct tubs saveTarget 0 40 0.05 0 360 G4_Galactic 0 0 16.9 log_World norot dead 253
# Other components of the cryostat (dimensions and position of CRY4 are only approx. because unknown)
# COld Finger
/musr/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 37.0 log_World norot dead 261
# End plate of cryostat (7 mm thick, 30 mm diameter)
/musr/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 45.5 log_World norot dead 262
# Heat exchanger (assuming a 10 mm opening - Original dimensions not known.) # OLD pos. 160.0
/musr/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 74.0 log_World norot dead 263
# Mounting ring for He-shield
/musr/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 54.0 log_World norot dead 264
# 2 mm thick plate for mounting ring. This is just to close the downstream side.
/musr/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 54.0 log_World norot dead 265
# Radiation shield
/musr/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 19.0 log_World norot dead 266
# Front part of the radiation shield
/musr/command construct tubs CRSH2 30 48 0.5 0 360 G4_Cu 0 0 -26.5 log_World norot dead 267
# Electrical Field Guard Rings (distance between the guard rings: 16 mm)
# /musr/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 -13.5 log_World norot dead 271
# /musr/command construct tubs Guard2 29 38 1.5 0 360 G4_Cu 0 0 2.5 log_World norot dead 272
# Cryostat visual attributes (optional)
/musr/command visattributes log_SAH1 oxsteel
#/musr/command visattributes log_SAH2 oxsteel
/musr/command visattributes log_target oxsteel
/musr/command visattributes log_SAPH MACOR_style
#/musr/command visattributes log_SAH3 oxsteel
/musr/command visattributes log_CRSH yellow
/musr/command visattributes log_CRSH2 yellow
#/musr/command visattributes log_test red
################################################################################################################
# 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
/musr/command construct cons RA_EU 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World norot dead 801
/musr/command construct cons RA_MU 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World norot dead 802
/musr/command construct cons RA_ER 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnR dead 803
/musr/command construct cons RA_MR 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnR dead 804
/musr/command construct cons RA_ED 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnD dead 805
/musr/command construct cons RA_MD 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnD dead 806
/musr/command construct cons RA_EL 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnL dead 807
/musr/command construct cons RA_ML 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnL dead 808
# 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_T 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 822
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.02 log_World rotRAnR dead 824
/musr/command construct tubs RA_B 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 826
/musr/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.06 log_World rotRAnL dead 828
# 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 831
# Ring Anodes visual attributes (optional)
/musr/command visattributes log_RA_G invisible
#/musr/command visattributes log_RA_G Grid_style
################################################################################################################
# Trigger - Trigger Detector # Triggerz = -1092 mm; total length of TD is 110 mm; carbon foil at -1144 mm.
################################################################################################################
# Trigger volume
/musr/command construct tubs TrigV 90 127 148 0 360 G4_Galactic 0 0 -495 log_World norot dead 600
# Trigger tube
/musr/command construct tubs TrigS 100 103 148 0 360 Steel 0 0 0 log_TrigV norot dead 601
# TF - Trigger tube flanges
/musr/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 136 log_TrigV norot dead 611
/musr/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -136 log_TrigV norot dead 612
# trigger foil is 52-55mm upstream of TrigV center
# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm).
# USE THE NAME CFoil or coulombCFoil, otherwise musrMuFormation won't work!
#/musr/command construct box CFoil 60 60 0.0000025 G4_GRAPHITE 0 0 -550 log_World norot dead 621
/musr/command construct box CFoil 60 60 0.000002 G4_GRAPHITE 0 0 -550 log_World norot dead 621
# 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 musrDetectorConstruction.cc and set any density.
# Trigger visual attributes (optional)
/musr/command visattributes log_TrigV oxsteel
/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_saveAfterTD darkred
# Trigger Lens, L3, center -382 length 70mm radius 65mm.
/musr/command construct tubs TL3S 65.0 70.0 35.0 0 360 G4_Galactic 0 0 -382 log_World norot dead 706 nofield
/musr/command visattributes log_TL3S red
# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL.
# E.g. /musr/command visattributes Steel red
################################################################################################################
# L2 - 2nd Einzel Lens # L3z = -56.7 cm. (it was "L3" in 2011 and before)
# Lens Gap = 12.0 mm => G/D = 12/130 ~ 0.1 (Lens Gap = gap between Ground and Anode, D - Diameter)
################################################################################################################
# L3 volume
/musr/command construct tubs L3V 65 127 220 0 360 G4_Galactic 0 0 -863 log_World norot dead 400
# Lens 3 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 720 mm)
/musr/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 0 log_L3V norot dead 401
# Lens 3 Flange 1, z = L3z + 208 mm
/musr/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -208 log_L3V norot dead 402
# Lens 3 Flange 2, z = L3z - 208 mm
/musr/command construct tubs L3F2 103 126.5 12 0 360 Steel 0 0 208 log_L3V norot dead 403
# GPn - Ground Potential Electrodes
# n = 1-4 (further from TD) and 5-8 (closer to TD) - components of the Ground Electrodes
# Ground Electrode (inner dia: 130 mm, outer dia: 134 mm, length: 133 mm)
/musr/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 421
# Outer electrode surface (LN2 cooling vessel)
/musr/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 422
# First ring cap
/musr/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3V norot dead 423
# Second ring cap
/musr/command construct tubs L3GP4 67 81 4 0 360 Steel 0 0 71.0 log_L3V norot dead 424
/musr/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 431
/musr/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 432
/musr/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3V norot dead 433
/musr/command construct tubs L3GP8 67 81 4 0 360 Steel 0 0 -71.0 log_L3V norot dead 434
# HP - High Potential Electrode (Central Anode - usually at +8.7 kV, for a 15 keV muon beam)
/musr/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3V norot dead 451
# Lens 3 visual attributes (optional)
/musr/command visattributes log_L3V invisible
/musr/command visattributes log_L3ST oxsteel
/musr/command visattributes log_L3F1 oxsteel
/musr/command visattributes log_L3F2 oxsteel
/musr/command visattributes log_L3HP darkred
################################################################################################################
# -- SPIN ROTATOR GEOMETRY --
################################################################################################################
# Spin Rotator volume
/musr/command construct tubs SRENV 50 320 201.5 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 100
/musr/command visattributes log_SRENV invisible
# Electromagnet with iron yoke
# U - up, D - down, L - left, R - right (with respect to muon's view - momentum direction)
/musr/command construct box NPole 200 10 150 G4_Fe 0 85 0 log_SRENV norot dead 201
/musr/command construct box NYoke 150 22.5 50 G4_Fe 0 117.5 0 log_SRENV norot dead 202
/musr/command construct box NConn 225 17.5 190.0 G4_Fe 0 157.5 0 log_SRENV norot dead 203
/musr/command construct box SPole 200 10 150 G4_Fe 0 -85 0 log_SRENV norot dead 205
/musr/command construct box SYoke 150 22.5 50 G4_Fe 0 -117.5 0 log_SRENV norot dead 206
/musr/command construct box SConn 225 17.5 190.0 G4_Fe 0 -157.5 0 log_SRENV norot dead 207
# Front mirror plate
/musr/command construct box FShU 225 50 5 G4_Fe 0 125 -195.0 log_SRENV norot dead 301
/musr/command construct box FShD 225 50 5 G4_Fe 0 -125 -195.0 log_SRENV norot dead 302
/musr/command construct box FShL 75 75 5 G4_Fe 150 0 -195.0 log_SRENV norot dead 303
/musr/command construct box FShR 75 75 5 G4_Fe -150 0 -195.0 log_SRENV norot dead 304
# Back mirror plate
/musr/command construct box BShU 225 50 5 G4_Fe 0 125 195.0 log_SRENV norot dead 321
/musr/command construct box BShD 225 50 5 G4_Fe 0 -125 195.0 log_SRENV norot dead 322
/musr/command construct box BShL 75 75 5 G4_Fe 150 0 195.0 log_SRENV norot dead 323
/musr/command construct box BShR 75 75 5 G4_Fe -150 0 195.0 log_SRENV norot dead 324
# Top coils
/musr/command construct box TCoil1 170 22.5 10 G4_Cu 0 117.5 -60 log_SRENV norot dead 401
/musr/command construct box TCoil2 170 22.5 10 G4_Cu 0 117.5 60 log_SRENV norot dead 402
/musr/command construct box TCoil3 10 22.5 50 G4_Cu 160 117.5 0 log_SRENV norot dead 403
/musr/command construct box TCoil4 10 22.5 50 G4_Cu -160 117.5 0 log_SRENV norot dead 404
# Bottom coils
/musr/command construct box BCoil1 170 22.5 10 G4_Cu 0 -117.5 -60 log_SRENV norot dead 421
/musr/command construct box BCoil2 170 22.5 10 G4_Cu 0 -117.5 60 log_SRENV norot dead 422
/musr/command construct box BCoil3 10 22.5 50 G4_Cu 160 -117.5 0 log_SRENV norot dead 423
/musr/command construct box BCoil4 10 22.5 50 G4_Cu -160 -117.5 0 log_SRENV norot dead 424
# Capacitor
/musr/command construct box Cap_p 0.5 50 150 Brass 55 0 0 log_SRENV norot dead 501
/musr/command construct box Cap_n 0.5 50 150 Brass -55 0 0 log_SRENV norot dead 502
#*/musr/command construct box Uniform 49 49 150 G4_Galactic 0 0 0 log_SRENV norot dead 503
/musr/command construct tubs RodCapUp 0 5 150 90 180 Brass 55 55 0 log_SRENV norot dead 504
/musr/command construct tubs RodCapUn 0 5 150 -90 180 Brass -55 55 0 log_SRENV norot dead 505
/musr/command construct tubs RodCapDp 0 5 150 90 180 Brass 55 -55 0 log_SRENV norot dead 506
/musr/command construct tubs RodCapDn 0 5 150 -90 180 Brass -55 -55 0 log_SRENV norot dead 507
# Rods
/musr/command construct tubs RodPosU 0 5 150 0 360 Brass 27.5 55 0 log_SRENV norot dead 511
/musr/command construct tubs Rod0U 0 5 150 0 360 Brass 0 55 0 log_SRENV norot dead 512
/musr/command construct tubs RodNegU 0 5 150 0 360 Brass -27.5 55 0 log_SRENV norot dead 513
/musr/command construct tubs RodPosD 0 5 150 0 360 Brass 27.5 -55 0 log_SRENV norot dead 514
/musr/command construct tubs Rod0D 0 5 150 0 360 Brass 0 -55 0 log_SRENV norot dead 515
/musr/command construct tubs RodNegD 0 5 150 0 360 Brass -27.5 -55 0 log_SRENV norot dead 516
# Vacuum vessel
/musr/command construct box TVac1 72.5 2.5 191.5 Steel 0 72.5 0 log_SRENV norot dead 601
/musr/command construct box TVac2 2.5 70.0 191.5 Steel 72.5 0 0 log_SRENV norot dead 602
/musr/command construct box TVac3 72.5 2.5 191.5 Steel 0 -72.5 0 log_SRENV norot dead 603
/musr/command construct box TVac4 2.5 70.0 191.5 Steel -72.5 0 0 log_SRENV norot dead 604
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For Spin Rotator
/musr/command construct tubs SREField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 630 nofield
/musr/command construct tubs SRBField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.51 log_World norot dead 631 nofield
/musr/command visattributes G4_Cu red
/musr/command visattributes G4_Fe blue
/musr/command visattributes Brass yellow
################################################################################################################
# Lens 1 - 1st Einzel Lens
################################################################################################################
# L1ENV - Lens 1 envelope - for easy positioning of lens parts (outer dia: 100 mm, length: 300 mm)
#/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 0 0 -1929.5 log_World norot dead 600
/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend 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
# n = 2 - Ground Electrode 2 (closer to SR).
/musr/command construct tubs L1GP2 40 44 50 0 360 Steel 0 0 100 log_L1ENV norot dead 653
# HP - High Potential Electrode (Central Anode - usually at +8.5 kV, for a 15 keV muon beam)
/musr/command construct tubs L1HP 40 44 40 0 360 Steel 0 0 0 log_L1ENV norot dead 652
# Lens 1 visual attributes (optional)
/musr/command visattributes log_L1HP darkred
################################################################################################################
# Electrostatic field at accelerator after moderator
################################################################################################################
#
/musr/command construct box Grid1 9.1 25 25 G4_Galactic 489.9 0.0 -1678.0 log_World rotMod dead 212
/musr/command globalfield Grid1_field 9.1 25 25 uniform 489.9 0.0 -1678.0 log_Grid1 0 0 0 -0.2527 0 0
/musr/command construct box Grid2 5 24 24 G4_Galactic 475.8 0.0 -1678.0 log_World rotMod dead 214
/musr/command globalfield Grid2_field 5 24 24 uniform 475.8 0.0 -1678.0 log_Grid2 0 0 0 -1.04 0 0
/musr/command globalfield printFieldValueAtPoint 489.9 0.0 -1678.0
/musr/command globalfield printFieldValueAtPoint 475.8 0.0 -1678.0
################################################################################################################
# Electrostatic mirror at bend
################################################################################################################
# MRENV
/musr/command construct box MirrE 65 65 10 G4_Galactic 14.14213562 0.0 -1678.0 log_World rotMirr dead 200
/musr/command globalfield Mirr_field 65 65 10 uniform 14.14213562 0.0 -1678.0 log_MirrE 0 0 0 0 0 0.75
###################################################################################
################### E L E C T R O M G N E T I C F I E L D S ##################
###################################################################################
# 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!
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For L1
/musr/command construct tubs L1EField 0 0.01 0.005 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend dead 706 nofield
# For L2 (L3 before 2012)
/musr/command construct tubs L3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -863.0 log_World norot dead 708 nofield
# LENS 1. Best L1 settings: 7.2 kV for 12 keV muons
/musr/command globalfield Lens1EField 251.5 0.0 -1678.0 fromfile 2DE L1_Erz.map log_L1EField 9.0
# LENS 2. Best L3 settings: 8.4 kV for 12 keV muons
/musr/command globalfield Lens3EField 0. 0. -863.0 fromfile 2DE L3_Erz.map log_L3EField 10.5
# Spin rotator
# Electric field should be 370mm plates
# Magnetic field should be 260mm poles as measured srlem_ext.map
/musr/command globalfield Ele_field 0. 0. -1284.5 fromfile 3DE E_Sep_P37.5cm.map log_SREField 2.717
/musr/command globalfield Mag_field 0. 0. -1284.51 fromfile 3DB srlem_ext.map log_SRBField -0.00692
# 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
# 57.15mm upstream center
/musr/command construct box TriggE0 45 45 5 G4_Galactic 0 0 -555.1 log_World norot dead 630 nofield
# 48mm upstream center
/musr/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -543. log_World norot dead 631 nofield
# 2.25mm downstream center
/musr/command construct box TriggE2 45 45 4.9479 G4_Galactic 0 0 -492.75 log_World rotTrig dead 632 nofield
# 54mm downstream center
/musr/command construct box TriggE3 45 45 4 G4_Galactic 0 0 -441.0 log_World norot dead 633
### Electric field at TRIGGER Detector TD: Three different uniform fields, 2012 settings
/musr/command globalfield Trigg0_field 45 45 5 uniform 0. 0. -555.1 log_TriggE0 0 0 0 0 0 0.338
/musr/command globalfield Trigg1_field 45 45 4 uniform 0. 0. -543. log_TriggE1 0 0 0 0 0 -0.02375
/musr/command globalfield Trigg2_field 45 45 4.9497 uniform 0. 0. -492.75 log_TriggE2 0 0 0 0 0 0.041416
/musr/command globalfield Trigg3_field 45 45 4 uniform 0. 0. -441.0 log_TriggE3 0 0 0 0 0 -0.45
# Trigger Lens, L3, (available space from -437 to -347, we use 70mm of that)
/musr/command construct tubs TL3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -382.0 log_World norot dead 706 nofield
/musr/command globalfield ColRingEField 0. 0. -382.0 fromfile 2DE CR7cm_Grid.map log_TL3EField 12.0
### Electric field at RING ANODE - from 3DE field map
# To create an arbitrary configuration, switch on all fields and set different potentials.
/musr/command globalfield RngAnT_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_T 11.9
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 11.9
/musr/command globalfield RngAnB_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_B 11.9
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 11.9
### 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_convMap.map log_SBField 0.
### Electric field at the sample
/musr/command construct tubs SEField 0 0.01 0.005 0 360 G4_Galactic 0.0 0.0 15.9 log_World norot dead 710 nofield
/musr/command globalfield SampleEField 0. 0. 15.9 fromfile 2DE SamplePlate_2DE.map log_SEField 0.0
# Set parameters for particle tracking in an EM field
/musr/command globalfield setparameter SetLargestAcceptableStep 5
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
# TESTING EM FIELD
/musr/command globalfield printFieldValueAtPoint 0. 0. 0.
/musr/command globalfield printFieldValueAtPoint 0. 35. -670.
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.10
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
#/musr/command process addModel mu+ G4MuMultipleScattering G4WentzelVIModel 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ musrMuEnergyLossLandau -1 -1 1
# parameters for Landau energy loss distribution, LandauSigma corresponds to the width of the distibution
/musr/command SetLandauMPV 0.01
/musr/command SetLandauSigma 0.3
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#/musr/command process addDiscreteProcess mu+ G4CoulombScattering
#/musr/command process addProcess mu+ G4UserSpecialCuts -1 -1 3
#/musr/command process addProcess mu+ G4StepLimiter -1 -1 4
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
#/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
#/musr/command signalSeparationTime 0.1
#
/musr/run/randomOption 1
################################################################################################################
# -- Setting simulation PARAMETERS --
################################################################################################################
# Set the overall range cut (default 0.1 mm)
#*/run/setCut 1 mm
# Set the range cut on particular volumes (in mm)
#/musr/command SetUserLimits log_CFoil 1e-8 -1 -1 -1 -1
#*/musr/command SetUserLimits log_target 0.01
#*/musr/command SetUserLimits log_targetscint 0.01
#*/musr/command SetUserLimits log_cryostatscint 0.01
# Set particle energy cuts on particular volumes (in eV)
#/musr/command SetUserLimits log_World ustepMax(mm) utrakMax(mm) utimeMax(ns) uekinMin(MeV) urangMin(mm)
#/musr/command SetUserLimits log_World -1 -1 -1 1e-7 -1
# Geant4 10.2
#------------
/process/em/lowestMuHadEnergy 1e-6 MeV
# Store ALL the events in a ROOT tree or just the interesting ones? (default is true)
#*/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
# Override runID number
#*/musr/run/runID 21
# Set the frequency of event printing
/musr/run/howOftenToPrintEvent 100
# 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
/musr/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
#*/control/execute visdawn.mac
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
#/musr/command rootOutput weight off
#/musr/command rootOutput BFieldAtDecay off
#/musr/command rootOutput muIniPosX off
#/musr/command rootOutput muIniPosY off
#/musr/command rootOutput muIniPosZ off
#/musr/command rootOutput muIniMomX off
#/musr/command rootOutput muIniMomY off
#/musr/command rootOutput muIniMomZ off
#/musr/command rootOutput muIniPolX off
#/musr/command rootOutput muIniPolY off
#/musr/command rootOutput muIniPolZ off
#/musr/command rootOutput muDecayDetID off
#/musr/command rootOutput muDecayPosX off
#/musr/command rootOutput muDecayPosY off
#/musr/command rootOutput muDecayPosZ off
#/musr/command rootOutput muDecayTime off
#/musr/command rootOutput muDecayPolX off
#/musr/command rootOutput muDecayPolY off
#/musr/command rootOutput muDecayPolZ off
#/musr/command rootOutput muTargetTime off
#/musr/command rootOutput muTargetPolX off
#/musr/command rootOutput muTargetPolY off
#/musr/command rootOutput muTargetPolZ off
#/musr/command rootOutput muM0Time off
#/musr/command rootOutput muM0PolX off
#/musr/command rootOutput muM0PolY off
#/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
#/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
/musr/command storeOnlyEventsWithHits false
################################################################################################################
# -- Setting PARTICLE GUN parameters --
################################################################################################################
# Default momentum direction: 001, i.e. 0z.
# Default muon soin 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 -1144 mm, acceleration starts at -1154.15 mm
#/gun/vertex 0. 0. -2119.5 mm
/gun/vertex 499 0. -1678.0 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 6.83 6.83 0 mm
/gun/vertexsigma -15 -15 0 mm
#/gun/boxboundarycentre 499 0 -1678 mm
#/gun/boxboundary 15 15 1 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
# Set muon energy before hitting TD; a constant field in front of the C-foil accelerates the muons
# to add 3.38 keV
/gun/kenergy 15.0 eV
# Set beam momentum direction
/gun/direction -1.0 0.0 0.0
# Set muon spin direction: +10deg or 0
/gun/muonPolarizVector 0.9848 0 0.17365
#/gun/muonPolarizVector 1 0 0
# Other useful test parameters:
#------------------Oct.20 2015------------------------------------
# kenergy= 15 eV Pmu= 0.xxxMeV/c ==> sigma = /2.354 = MeV/c
#/gun/momentumsmearing 0.07508 MeV
/gun/momentumsmearing 0.016 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#*/gun/momentumboundary 20 40 0 MeV
#---/gun/tilt: xangle, yangle, dummy
#*/gun/tilt 0 0.0 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.0 deg
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#*/gun/decaytimelimits 10400 10420 2197.03 ns
#/gun/tiltsigma 1.4 1.4 0 deg
/gun/tiltsigma 0 0 -1.0 deg
# Selectively inactivate or activate sensitive detectors
#*/hits/inactivate /musr/ScintSD
# Only for code debugging!
/tracking/verbose 0
# BEAM ON
#/run/beamOn 1000000
#/run/beamOn 10
/run/beamOn 10000

View File

@@ -0,0 +1,950 @@
# Template suitable for beam profile detectioon with the spin rotator in place
# Zaher Salman 7/10/2010
#
# Thomas Prokscha 22/Nov/2012
# Moved sample stack on cryostat 3mm downstream to fit to positions in apparatus
# Changed positions of positron counters according to corrected drawing LEM 37.01.024 (19/Sep/2012)
#
# Position downstream detectors: z=+62.5mm original value: z=+66.5mm
# Position upstream detectors: z=-64.0mm original value: z=-60.0mm
#
# 2013 setup: 1mm Ti sample tube
#
# 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
#
# Ran Xiao 25/Sep/2014
# Start muons at moderator at x=499, assume cosA angular distribution, assume energy distribution
#
################################################################################################################
# -- ROTATION MATRICES --
################################################################################################################
# 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
/musr/command rotation rotRAnL 0 0 1 90
/musr/command rotation rotRAnD 0 0 1 180
# More Rotations
/musr/command rotation rotD1 0 0 1 11.250
/musr/command rotation rotD2 0 0 1 33.750
/musr/command rotation rotD3 0 0 1 56.250
/musr/command rotation rotD4 0 0 1 78.750
/musr/command rotation rotD5 0 0 1 101.250
/musr/command rotation rotD6 0 0 1 123.750
/musr/command rotation rotD7 0 0 1 146.250
/musr/command rotation rotD8 0 0 1 168.750
/musr/command rotation rotD9 0 0 1 191.250
/musr/command rotation rotD10 0 0 1 213.750
/musr/command rotation rotD11 0 0 1 236.250
/musr/command rotation rotD12 0 0 1 258.750
/musr/command rotation rotD13 0 0 1 281.250
/musr/command rotation rotD14 0 0 1 303.750
/musr/command rotation rotD15 0 0 1 326.250
/musr/command rotation rotD16 0 0 1 348.750
/musr/command rotation rotD17 0 0 1 11.250
/musr/command rotation rotD18 0 0 1 33.750
/musr/command rotation rotD19 0 0 1 56.250
/musr/command rotation rotD20 0 0 1 78.750
/musr/command rotation rotD21 0 0 1 101.250
/musr/command rotation rotD22 0 0 1 123.750
/musr/command rotation rotD23 0 0 1 146.250
/musr/command rotation rotD24 0 0 1 168.750
/musr/command rotation rotD25 0 0 1 191.250
/musr/command rotation rotD26 0 0 1 213.750
/musr/command rotation rotD27 0 0 1 236.250
/musr/command rotation rotD28 0 0 1 258.750
/musr/command rotation rotD29 0 0 1 281.250
/musr/command rotation rotD30 0 0 1 303.750
/musr/command rotation rotD31 0 0 1 326.250
/musr/command rotation rotD32 0 0 1 348.750
# Beam line bend at mirror
/musr/command rotation rotBend 0 1 0 -90
/musr/command rotation rotMirr 0 1 0 -45
/musr/command rotation rotMod 0 1 0 -5
################################################################################################################
# -- LEM GEOMETRY --
################################################################################################################
# WORLD = Laboratory reference frame, the origin is in the centre of the LEM sample tube
/musr/command construct box World 900 350 2600 G4_Galactic 0 0 0 no_logical_volume norot dead -1
/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 60 0.05 0 360 G4_Galactic 850 0 -1678 log_World rotBend dead 851
/musr/command construct tubs save1 0 60 0.05 0 360 G4_Galactic 800 0 -1678 log_World rotBend dead 852
/musr/command construct tubs save2 0 60 0.05 0 360 G4_Galactic 750 0 -1678 log_World rotBend dead 853
/musr/command construct tubs save3 0 60 0.05 0 360 G4_Galactic 700 0 -1678 log_World rotBend dead 854
/musr/command construct tubs save4 0 60 0.05 0 360 G4_Galactic 650 0 -1678 log_World rotBend dead 855
/musr/command construct tubs save5 0 60 0.05 0 360 G4_Galactic 600 0 -1678 log_World rotBend dead 856
/musr/command construct tubs save6 0 60 0.05 0 360 G4_Galactic 550 0 -1678 log_World rotBend dead 857
/musr/command construct tubs save7 0 60 0.05 0 360 G4_Galactic 500 0 -1678 log_World rotBend dead 858
/musr/command construct tubs save8 0 60 0.05 0 360 G4_Galactic 450 0 -1678 log_World rotBend dead 859
/musr/command construct tubs save9 0 60 0.05 0 360 G4_Galactic 400 0 -1678 log_World rotBend dead 860
/musr/command construct tubs save10 0 60 0.05 0 360 G4_Galactic 350 0 -1678 log_World rotBend dead 861
/musr/command construct tubs save11 0 60 0.05 0 360 G4_Galactic 300 0 -1678 log_World rotBend dead 862
/musr/command construct tubs save12 0 60 0.05 0 360 G4_Galactic 240 0 -1678 log_World rotBend dead 863
/musr/command construct tubs save13 0 60 0.05 0 360 G4_Galactic 200 0 -1678 log_World rotBend dead 864
/musr/command construct tubs save14 0 60 0.05 0 360 G4_Galactic 150 0 -1678 log_World rotBend dead 865
/musr/command construct tubs save15 0 60 0.05 0 360 G4_Galactic 100 0 -1678 log_World rotBend dead 866
/musr/command construct tubs save16 0 60 0.05 0 360 G4_Galactic 70 0 -1678 log_World rotBend dead 867
/musr/command construct tubs save17 0 60 0.05 0 360 G4_Galactic 0 0 -1620 log_World norot dead 868
/musr/command construct tubs save18 0 60 0.05 0 360 G4_Galactic 0 0 -1600 log_World norot dead 869
/musr/command construct tubs save19 0 60 0.05 0 360 G4_Galactic 0 0 -1550 log_World norot dead 870
/musr/command construct tubs save20 0 60 0.05 0 360 G4_Galactic 0 0 -1500 log_World norot dead 871
/musr/command construct tubs save21 0 60 0.05 0 360 G4_Galactic 0 0 -1450 log_World norot dead 872
/musr/command construct tubs save22 0 60 0.05 0 360 G4_Galactic 0 0 -1400 log_World norot dead 873
/musr/command construct tubs save23 0 60 0.05 0 360 G4_Galactic 0 0 -1350 log_World norot dead 874
/musr/command construct tubs save24 0 60 0.05 0 360 G4_Galactic 0 0 -1300 log_World norot dead 875
/musr/command construct tubs save25 0 60 0.05 0 360 G4_Galactic 0 0 -1250 log_World norot dead 876
/musr/command construct tubs save26 0 60 0.05 0 360 G4_Galactic 0 0 -1200 log_World norot dead 877
/musr/command construct tubs save27 0 60 0.05 0 360 G4_Galactic 0 0 -1150 log_World norot dead 878
/musr/command construct tubs save28 0 60 0.05 0 360 G4_Galactic 0 0 -1100 log_World norot dead 879
/musr/command construct tubs save29 0 60 0.05 0 360 G4_Galactic 0 0 -1050 log_World norot dead 880
/musr/command construct tubs save30 0 60 0.05 0 360 G4_Galactic 0 0 -1000 log_World norot dead 881
/musr/command construct tubs save31 0 60 0.05 0 360 G4_Galactic 0 0 -950 log_World norot dead 882
/musr/command construct tubs save32 0 60 0.05 0 360 G4_Galactic 0 0 -900 log_World norot dead 883
/musr/command construct tubs save33 0 60 0.05 0 360 G4_Galactic 0 0 -850 log_World norot dead 884
/musr/command construct tubs save34 0 60 0.05 0 360 G4_Galactic 0 0 -800 log_World norot dead 885
/musr/command construct tubs save35 0 60 0.05 0 360 G4_Galactic 0 0 -750 log_World norot dead 886
/musr/command construct tubs save36 0 60 0.05 0 360 G4_Galactic 0 0 -700 log_World norot dead 887
/musr/command construct tubs save37 0 60 0.05 0 360 G4_Galactic 0 0 -650 log_World norot dead 888
/musr/command construct tubs save38 0 60 0.05 0 360 G4_Galactic 0 0 -600 log_World norot dead 889
/musr/command construct tubs save39 0 60 0.05 0 360 G4_Galactic 0 0 -525 log_World norot dead 890
/musr/command construct tubs save40 0 60 0.05 0 360 G4_Galactic 0 0 -450 log_World norot dead 891
/musr/command construct tubs save41 0 60 0.05 0 360 G4_Galactic 0 0 -420 log_World norot dead 892
/musr/command construct tubs save42 0 60 0.05 0 360 G4_Galactic 0 0 -400 log_World norot dead 893
/musr/command construct tubs save43 0 60 0.05 0 360 G4_Galactic 0 0 -350 log_World norot dead 894
/musr/command construct tubs save44 0 60 0.05 0 360 G4_Galactic 0 0 -300 log_World norot dead 895
/musr/command construct tubs save45 0 60 0.05 0 360 G4_Galactic 0 0 -250 log_World norot dead 896
/musr/command construct tubs save46 0 60 0.05 0 360 G4_Galactic 0 0 -200 log_World norot dead 897
/musr/command construct tubs save47 0 60 0.05 0 360 G4_Galactic 0 0 -150 log_World norot dead 898
/musr/command construct tubs save48 0 60 0.05 0 360 G4_Galactic 0 0 -100 log_World norot dead 899
/musr/command construct tubs save49 0 60 0.05 0 360 G4_Galactic 0 0 -50 log_World norot dead 900
/musr/command construct tubs save50 0 60 0.05 0 360 G4_Galactic 0 0 0 log_World norot dead 901
/musr/command construct tubs save51 0 60 0.05 0 360 G4_Galactic 0 0 16 log_World norot dead 902
/musr/command construct tubs save52 0 60 0.05 0 360 G4_Galactic 0 0 100 log_World norot dead 903
/musr/command construct tubs save53 0 60 0.05 0 360 G4_Galactic 0 0 150 log_World norot dead 904
/musr/command visattributes G4_Galactic invisible
################################################################################################################
# -- APD Scintillators --
################################################################################################################
# Detectors volume (0,0,0) coninsides with World (0,0,0)
/musr/command construct tubs DetV 80 105 133 0 360 G4_Galactic 0 0 0 log_World norot dead 100
/musr/command visattributes log_DetV invisible
# For final design set
# BackHW=60
# BackCR=-64.0, 19/Sep/2012
# ForwHW=65.5
# ForwCR=62.5, 19/Sep/2012
# Back inner sections (Upstream) (v.i.)
# Final design (30 Jun 09, 19 Sep 12) BackHW=60.0mm (Half width or length), BackCR=-4-BackHW=-64.0mm (Center z coordinate)
/musr/command construct trd90y ScD1 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 -17.265493 -64.0 log_DetV rotD1 musr/ScintSD 1
/musr/command construct trd90y ScD2 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 -49.167966 -64.0 log_DetV rotD2 musr/ScintSD 2
/musr/command construct trd90y ScD3 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 -73.585061 -64.0 log_DetV rotD3 musr/ScintSD 3
/musr/command construct trd90y ScD4 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 -86.799497 -64.0 log_DetV rotD4 musr/ScintSD 4
/musr/command construct trd90y ScD5 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 -86.799497 -64.0 log_DetV rotD5 musr/ScintSD 5
/musr/command construct trd90y ScD6 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 -73.585061 -64.0 log_DetV rotD6 musr/ScintSD 6
/musr/command construct trd90y ScD7 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 -49.167966 -64.0 log_DetV rotD7 musr/ScintSD 7
/musr/command construct trd90y ScD8 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 -17.265493 -64.0 log_DetV rotD8 musr/ScintSD 8
/musr/command construct trd90y ScD9 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 17.265493 -64.0 log_DetV rotD9 musr/ScintSD 9
/musr/command construct trd90y ScD10 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 49.167966 -64.0 log_DetV rotD10 musr/ScintSD 10
/musr/command construct trd90y ScD11 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 73.585061 -64.0 log_DetV rotD11 musr/ScintSD 11
/musr/command construct trd90y ScD12 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 86.799497 -64.0 log_DetV rotD12 musr/ScintSD 12
/musr/command construct trd90y ScD13 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 86.799497 -64.0 log_DetV rotD13 musr/ScintSD 13
/musr/command construct trd90y ScD14 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 73.585061 -64.0 log_DetV rotD14 musr/ScintSD 14
/musr/command construct trd90y ScD15 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 49.167966 -64.0 log_DetV rotD15 musr/ScintSD 15
/musr/command construct trd90y ScD16 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 17.265493 -64.0 log_DetV rotD16 musr/ScintSD 16
# Forward inner sections (Downstream) (h.i.)
# Final design (30 June 09, 19 Sep 12) ForwHW=65.5mm (Half width or length), ForwCR=-3+ForwHW=62.5mm (Center z coordinate)
/musr/command construct trd90y ScD17 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 -17.070403 62.5 log_DetV rotD17 musr/ScintSD 17
/musr/command construct trd90y ScD18 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 -48.612395 62.5 log_DetV rotD18 musr/ScintSD 18
/musr/command construct trd90y ScD19 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 -72.753591 62.5 log_DetV rotD19 musr/ScintSD 19
/musr/command construct trd90y ScD20 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 -85.818712 62.5 log_DetV rotD20 musr/ScintSD 20
/musr/command construct trd90y ScD21 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 -85.818712 62.5 log_DetV rotD21 musr/ScintSD 21
/musr/command construct trd90y ScD22 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 -72.753591 62.5 log_DetV rotD22 musr/ScintSD 22
/musr/command construct trd90y ScD23 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 -48.612395 62.5 log_DetV rotD23 musr/ScintSD 23
/musr/command construct trd90y ScD24 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 -17.070403 62.5 log_DetV rotD24 musr/ScintSD 24
/musr/command construct trd90y ScD25 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 17.070403 62.5 log_DetV rotD25 musr/ScintSD 25
/musr/command construct trd90y ScD26 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 48.612395 62.5 log_DetV rotD26 musr/ScintSD 26
/musr/command construct trd90y ScD27 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 72.753591 62.5 log_DetV rotD27 musr/ScintSD 27
/musr/command construct trd90y ScD28 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 85.818712 62.5 log_DetV rotD28 musr/ScintSD 28
/musr/command construct trd90y ScD29 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 85.818712 62.5 log_DetV rotD29 musr/ScintSD 29
/musr/command construct trd90y ScD30 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 72.753591 62.5 log_DetV rotD30 musr/ScintSD 30
/musr/command construct trd90y ScD31 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 48.612395 62.5 log_DetV rotD31 musr/ScintSD 31
/musr/command construct trd90y ScD32 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 17.070403 62.5 log_DetV rotD32 musr/ScintSD 32
# Back outer sections (v.a.)
/musr/command construct trd ScD33 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 -18.631126 -64.0 log_DetV rotD1 musr/ScintSD 33
/musr/command construct trd ScD34 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 -53.056957 -64.0 log_DetV rotD2 musr/ScintSD 34
/musr/command construct trd ScD35 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 -79.405348 -64.0 log_DetV rotD3 musr/ScintSD 35
/musr/command construct trd ScD36 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 -93.664994 -64.0 log_DetV rotD4 musr/ScintSD 36
/musr/command construct trd ScD37 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 -93.664994 -64.0 log_DetV rotD5 musr/ScintSD 37
/musr/command construct trd ScD38 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 -79.405348 -64.0 log_DetV rotD6 musr/ScintSD 38
/musr/command construct trd ScD39 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 -53.056957 -64.0 log_DetV rotD7 musr/ScintSD 39
/musr/command construct trd ScD40 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 -18.631126 -64.0 log_DetV rotD8 musr/ScintSD 40
/musr/command construct trd ScD41 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 18.631126 -64.0 log_DetV rotD9 musr/ScintSD 41
/musr/command construct trd ScD42 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 53.056957 -64.0 log_DetV rotD10 musr/ScintSD 42
/musr/command construct trd ScD43 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 79.405348 -64.0 log_DetV rotD11 musr/ScintSD 43
/musr/command construct trd ScD44 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 93.664994 -64.0 log_DetV rotD12 musr/ScintSD 44
/musr/command construct trd ScD45 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 93.664994 -64.0 log_DetV rotD13 musr/ScintSD 45
/musr/command construct trd ScD46 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 79.405348 -64.0 log_DetV rotD14 musr/ScintSD 46
/musr/command construct trd ScD47 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 53.056957 -64.0 log_DetV rotD15 musr/ScintSD 47
/musr/command construct trd ScD48 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 18.631126 -64.0 log_DetV rotD16 musr/ScintSD 48
# Forward outer sections (h.a.)
/musr/command construct trd ScD49 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 -18.436035 62.5 log_DetV rotD1 musr/ScintSD 49
/musr/command construct trd ScD50 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 -52.501387 62.5 log_DetV rotD2 musr/ScintSD 50
/musr/command construct trd ScD51 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 -78.573878 62.5 log_DetV rotD3 musr/ScintSD 51
/musr/command construct trd ScD52 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 -92.684209 62.5 log_DetV rotD4 musr/ScintSD 52
/musr/command construct trd ScD53 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 -92.684209 62.5 log_DetV rotD5 musr/ScintSD 53
/musr/command construct trd ScD54 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 -78.573878 62.5 log_DetV rotD6 musr/ScintSD 54
/musr/command construct trd ScD55 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 -52.501387 62.5 log_DetV rotD7 musr/ScintSD 55
/musr/command construct trd ScD56 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 -18.436035 62.5 log_DetV rotD8 musr/ScintSD 56
/musr/command construct trd ScD57 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 18.436035 62.5 log_DetV rotD9 musr/ScintSD 57
/musr/command construct trd ScD58 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 52.501387 62.5 log_DetV rotD10 musr/ScintSD 58
/musr/command construct trd ScD59 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 78.573878 62.5 log_DetV rotD11 musr/ScintSD 59
/musr/command construct trd ScD60 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 92.684209 62.5 log_DetV rotD12 musr/ScintSD 60
/musr/command construct trd ScD61 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 92.684209 62.5 log_DetV rotD13 musr/ScintSD 61
/musr/command construct trd ScD62 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 78.573878 62.5 log_DetV rotD14 musr/ScintSD 62
/musr/command construct trd ScD63 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 52.501387 62.5 log_DetV rotD15 musr/ScintSD 63
/musr/command construct trd ScD64 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 18.436035 62.5 log_DetV rotD16 musr/ScintSD 64
# Structural support inside the detectors vessel
# Carbon fibre, inner radius 80, thickness 2 mm.
# Additional Al plate removed, 2 mm thick for h.i and h.a and 3 mm thick for v.i. and v.a
/musr/command construct tubs hInShell 80.0 82.0 65.5 0 360 G4_C 0 0 62 log_DetV norot dead 70
/musr/command construct tubs vInShell 80.0 82.0 60.0 0 360 G4_C 0 0 -64.5 log_DetV norot dead 70
# Visual attributes (optional)
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE green
#/musr/command visattributes log_ScD49 green
#/musr/command visattributes log_ScD50 green
#/musr/command visattributes log_test red
################################################################################################################
# Sample vacuum/tube up to gate valve - Can host either the Cryostat or the MCP2
################################################################################################################
# Vacuum space
# /musr/command construct tubs SamV 0 75.0 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100
# Sample tube
#/musr/command construct tubs SamS 75.0 77.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# 2012: 2mm Ti tube, 2013: 1mm
/musr/command construct tubs SamS 75.0 76.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# F160 - 160 CF flange upstream of MCP2 tube
/musr/command construct tubs F160 78.0 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 102
# F100 (Blank end flange)
/musr/command construct tubs F100 0 75.0 10 0 360 Steel 0 0 172.0 log_World norot dead 103
# 200 CF flange upstream of MCP2 tube covering the whole length of the gate valve chamber.
/musr/command construct tubs GATS 103.25 126.5 92.5 0 360 Steel 0 0 -254.5 log_World norot dead 371
# F200 - 200 CF flange upstream of MCP2 tube to connect to gate valve chamber
/musr/command construct tubs F200 76.5 103.25 12 0 360 Steel 0 0 -174.0 log_World norot dead 372
# Visual attributes (optional)
#/musr/command visattributes log_SamV invisible
/musr/command visattributes log_SamS oxsteel
/musr/command visattributes log_F160 oxsteel
#/musr/command visattributes log_F100 oxsteel
/musr/command visattributes log_GATS oxsteel
/musr/command visattributes log_F200 oxsteel
################################################################################################################
# MCP - Micro Channel Plate Detector MCP2
# mcpv_z = -92.5 mm!
#
# We have a 324 mm long sample tube;
# the MCP2 front side is at 142 mm from the end of the sample tube.
# the front face of the sample plate of the cryostat is 145 mm from the end of the sample tube.
#
################################################################################################################
#
# MCPM1 - MCP Macor ring 1
# MCPD - electron multiplying glass disk (also known as target)
# Sensitive surface at z = 20 mm wrt. World
# MCPM2 - MCP Macor ring 2
# /musr/command construct tubs MCPM1 24 32.5 0.75 0 360 Macor 0 0 19.25 log_World norot dead 251
# Use it either as (DMCP-musr/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz.
# /musr/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 21.5 log_World norot dead 252
# /musr/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 23.75 log_World norot dead 253
# NOTE: To intercept ALL the incoming muons, comment the DMCP and MCPM1 lines above and uncomment this one:
#*aa/musr/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs target 0 21.0 1.5 0 360 MCPglass 0 0 114 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs saveTarget 0 75.0 0.2 0 360 G4_Galactic 0 0 110.79 log_SamV norot dead 222
#
# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole)
# MCVR - "Vacuum Ring" (circular hole)
# /musr/command construct box MCSR 36.5 36.5 1 Steel 0 0 25.5 log_World norot dead 254
# /musr/command construct tubs MCVR 0 27.5 1 0 360 G4_Galactic 0 0 0 log_MCSR norot dead 255
# 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
# /musr/command construct box MCPA 36.5 36.5 4 Steel 0 0 37 log_World norot dead 256
# /musr/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 257
# /musr/command construct tubs ANVA2 0 27.5 1.5 0 360 G4_Galactic 0 0 2.5 log_MCPA norot dead 258
# MCSS - MCP Stainless Steel Support Ring
# /musr/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 69.8 log_World norot dead 259
# MCP2 visual attributes (optional)
#/musr/command visattributes log_DMCP MCP_style
#*/musr/command visattributes log_target MCP_style
#*/musr/command visattributes log_MCPM1 MACOR_style
#*------ /musr/command visattributes log_MCPM2 MACOR_style
################################################################################################################
# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm)
#
# sample plate front face is at z = 17mm:
# cold finger distance to CF100: 130mm
# 5mm base plate + 6mm sapphire + 4mm sample plate = 15mm
# sample plate front face from CF100: 145mm
# z-position of sample plate front face: 324/2-145mm = 17mm
# --> sample plate center is at 17+2=19mm
#
################################################################################################################
# Dimensions for large/small sample plates SamPL=35/21 and SaphPL=SamPL35-5
/musr/command construct tubs target 0 35 2 0 360 G4_Al 0 0 19.0 log_World norot dead 251
/musr/command construct tubs SAPH 0 30 3 0 360 G4_ALUMINUM_OXIDE 0 0 24.0 log_World norot dead 252
/musr/command construct tubs SAH1 0 35 2.5 0 360 G4_Al 0 0 29.5 log_World norot dead 253
# Special save target volume
/musr/command construct tubs saveTarget 0 40 0.05 0 360 G4_Galactic 0 0 16.9 log_World norot dead 253
# Other components of the cryostat (dimensions and position of CRY4 are only approx. because unknown)
# COld Finger
/musr/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 37.0 log_World norot dead 261
# End plate of cryostat (7 mm thick, 30 mm diameter)
/musr/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 45.5 log_World norot dead 262
# Heat exchanger (assuming a 10 mm opening - Original dimensions not known.) # OLD pos. 160.0
/musr/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 74.0 log_World norot dead 263
# Mounting ring for He-shield
/musr/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 54.0 log_World norot dead 264
# 2 mm thick plate for mounting ring. This is just to close the downstream side.
/musr/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 54.0 log_World norot dead 265
# Radiation shield
/musr/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 19.0 log_World norot dead 266
# Front part of the radiation shield
/musr/command construct tubs CRSH2 30 48 0.5 0 360 G4_Cu 0 0 -26.5 log_World norot dead 267
# Electrical Field Guard Rings (distance between the guard rings: 16 mm)
# /musr/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 -13.5 log_World norot dead 271
# /musr/command construct tubs Guard2 29 38 1.5 0 360 G4_Cu 0 0 2.5 log_World norot dead 272
# Cryostat visual attributes (optional)
/musr/command visattributes log_SAH1 oxsteel
#/musr/command visattributes log_SAH2 oxsteel
/musr/command visattributes log_target oxsteel
/musr/command visattributes log_SAPH MACOR_style
#/musr/command visattributes log_SAH3 oxsteel
/musr/command visattributes log_CRSH yellow
/musr/command visattributes log_CRSH2 yellow
#/musr/command visattributes log_test red
################################################################################################################
# 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
/musr/command construct cons RA_EU 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World norot dead 801
/musr/command construct cons RA_MU 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World norot dead 802
/musr/command construct cons RA_ER 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnR dead 803
/musr/command construct cons RA_MR 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnR dead 804
/musr/command construct cons RA_ED 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnD dead 805
/musr/command construct cons RA_MD 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnD dead 806
/musr/command construct cons RA_EL 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnL dead 807
/musr/command construct cons RA_ML 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnL dead 808
# 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_T 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 822
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.02 log_World rotRAnR dead 824
/musr/command construct tubs RA_B 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 826
/musr/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.06 log_World rotRAnL dead 828
# 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 831
# Ring Anodes visual attributes (optional)
/musr/command visattributes log_RA_G invisible
#/musr/command visattributes log_RA_G Grid_style
################################################################################################################
# Trigger - Trigger Detector # Triggerz = -1092 mm; total length of TD is 110 mm; carbon foil at -1144 mm.
################################################################################################################
# Trigger volume
/musr/command construct tubs TrigV 90 127 148 0 360 G4_Galactic 0 0 -495 log_World norot dead 600
# Trigger tube
/musr/command construct tubs TrigS 100 103 148 0 360 Steel 0 0 0 log_TrigV norot dead 601
# TF - Trigger tube flanges
/musr/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 136 log_TrigV norot dead 611
/musr/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -136 log_TrigV norot dead 612
# trigger foil is 52-55mm upstream of TrigV center
# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm).
# USE THE NAME CFoil or coulombCFoil, otherwise musrMuFormation won't work!
#/musr/command construct box CFoil 60 60 0.0000025 G4_GRAPHITE 0 0 -550 log_World norot dead 621
/musr/command construct box CFoil 60 60 0.000002 G4_GRAPHITE 0 0 -550 log_World norot dead 621
# 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 musrDetectorConstruction.cc and set any density.
# Trigger visual attributes (optional)
/musr/command visattributes log_TrigV oxsteel
/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_saveAfterTD darkred
# Trigger Lens, L3, center -382 length 70mm radius 65mm.
/musr/command construct tubs TL3S 65.0 70.0 35.0 0 360 G4_Galactic 0 0 -382 log_World norot dead 706 nofield
/musr/command visattributes log_TL3S red
# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL.
# E.g. /musr/command visattributes Steel red
################################################################################################################
# L2 - 2nd Einzel Lens # L3z = -56.7 cm. (it was "L3" in 2011 and before)
# Lens Gap = 12.0 mm => G/D = 12/130 ~ 0.1 (Lens Gap = gap between Ground and Anode, D - Diameter)
################################################################################################################
# L3 volume
/musr/command construct tubs L3V 65 127 220 0 360 G4_Galactic 0 0 -863 log_World norot dead 400
# Lens 3 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 720 mm)
/musr/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 0 log_L3V norot dead 401
# Lens 3 Flange 1, z = L3z + 208 mm
/musr/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -208 log_L3V norot dead 402
# Lens 3 Flange 2, z = L3z - 208 mm
/musr/command construct tubs L3F2 103 126.5 12 0 360 Steel 0 0 208 log_L3V norot dead 403
# GPn - Ground Potential Electrodes
# n = 1-4 (further from TD) and 5-8 (closer to TD) - components of the Ground Electrodes
# Ground Electrode (inner dia: 130 mm, outer dia: 134 mm, length: 133 mm)
/musr/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 421
# Outer electrode surface (LN2 cooling vessel)
/musr/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 422
# First ring cap
/musr/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3V norot dead 423
# Second ring cap
/musr/command construct tubs L3GP4 67 81 4 0 360 Steel 0 0 71.0 log_L3V norot dead 424
/musr/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 431
/musr/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 432
/musr/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3V norot dead 433
/musr/command construct tubs L3GP8 67 81 4 0 360 Steel 0 0 -71.0 log_L3V norot dead 434
# HP - High Potential Electrode (Central Anode - usually at +8.7 kV, for a 15 keV muon beam)
/musr/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3V norot dead 451
# Lens 3 visual attributes (optional)
/musr/command visattributes log_L3V invisible
/musr/command visattributes log_L3ST oxsteel
/musr/command visattributes log_L3F1 oxsteel
/musr/command visattributes log_L3F2 oxsteel
/musr/command visattributes log_L3HP darkred
################################################################################################################
# -- SPIN ROTATOR GEOMETRY --
################################################################################################################
# Spin Rotator volume
/musr/command construct tubs SRENV 50 320 201.5 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 100
/musr/command visattributes log_SRENV invisible
# Electromagnet with iron yoke
# U - up, D - down, L - left, R - right (with respect to muon's view - momentum direction)
/musr/command construct box NPole 200 10 150 G4_Fe 0 85 0 log_SRENV norot dead 201
/musr/command construct box NYoke 150 22.5 50 G4_Fe 0 117.5 0 log_SRENV norot dead 202
/musr/command construct box NConn 225 17.5 190.0 G4_Fe 0 157.5 0 log_SRENV norot dead 203
/musr/command construct box SPole 200 10 150 G4_Fe 0 -85 0 log_SRENV norot dead 205
/musr/command construct box SYoke 150 22.5 50 G4_Fe 0 -117.5 0 log_SRENV norot dead 206
/musr/command construct box SConn 225 17.5 190.0 G4_Fe 0 -157.5 0 log_SRENV norot dead 207
# Front mirror plate
/musr/command construct box FShU 225 50 5 G4_Fe 0 125 -195.0 log_SRENV norot dead 301
/musr/command construct box FShD 225 50 5 G4_Fe 0 -125 -195.0 log_SRENV norot dead 302
/musr/command construct box FShL 75 75 5 G4_Fe 150 0 -195.0 log_SRENV norot dead 303
/musr/command construct box FShR 75 75 5 G4_Fe -150 0 -195.0 log_SRENV norot dead 304
# Back mirror plate
/musr/command construct box BShU 225 50 5 G4_Fe 0 125 195.0 log_SRENV norot dead 321
/musr/command construct box BShD 225 50 5 G4_Fe 0 -125 195.0 log_SRENV norot dead 322
/musr/command construct box BShL 75 75 5 G4_Fe 150 0 195.0 log_SRENV norot dead 323
/musr/command construct box BShR 75 75 5 G4_Fe -150 0 195.0 log_SRENV norot dead 324
# Top coils
/musr/command construct box TCoil1 170 22.5 10 G4_Cu 0 117.5 -60 log_SRENV norot dead 401
/musr/command construct box TCoil2 170 22.5 10 G4_Cu 0 117.5 60 log_SRENV norot dead 402
/musr/command construct box TCoil3 10 22.5 50 G4_Cu 160 117.5 0 log_SRENV norot dead 403
/musr/command construct box TCoil4 10 22.5 50 G4_Cu -160 117.5 0 log_SRENV norot dead 404
# Bottom coils
/musr/command construct box BCoil1 170 22.5 10 G4_Cu 0 -117.5 -60 log_SRENV norot dead 421
/musr/command construct box BCoil2 170 22.5 10 G4_Cu 0 -117.5 60 log_SRENV norot dead 422
/musr/command construct box BCoil3 10 22.5 50 G4_Cu 160 -117.5 0 log_SRENV norot dead 423
/musr/command construct box BCoil4 10 22.5 50 G4_Cu -160 -117.5 0 log_SRENV norot dead 424
# Capacitor
/musr/command construct box Cap_p 0.5 50 150 Brass 55 0 0 log_SRENV norot dead 501
/musr/command construct box Cap_n 0.5 50 150 Brass -55 0 0 log_SRENV norot dead 502
#*/musr/command construct box Uniform 49 49 150 G4_Galactic 0 0 0 log_SRENV norot dead 503
/musr/command construct tubs RodCapUp 0 5 150 90 180 Brass 55 55 0 log_SRENV norot dead 504
/musr/command construct tubs RodCapUn 0 5 150 -90 180 Brass -55 55 0 log_SRENV norot dead 505
/musr/command construct tubs RodCapDp 0 5 150 90 180 Brass 55 -55 0 log_SRENV norot dead 506
/musr/command construct tubs RodCapDn 0 5 150 -90 180 Brass -55 -55 0 log_SRENV norot dead 507
# Rods
/musr/command construct tubs RodPosU 0 5 150 0 360 Brass 27.5 55 0 log_SRENV norot dead 511
/musr/command construct tubs Rod0U 0 5 150 0 360 Brass 0 55 0 log_SRENV norot dead 512
/musr/command construct tubs RodNegU 0 5 150 0 360 Brass -27.5 55 0 log_SRENV norot dead 513
/musr/command construct tubs RodPosD 0 5 150 0 360 Brass 27.5 -55 0 log_SRENV norot dead 514
/musr/command construct tubs Rod0D 0 5 150 0 360 Brass 0 -55 0 log_SRENV norot dead 515
/musr/command construct tubs RodNegD 0 5 150 0 360 Brass -27.5 -55 0 log_SRENV norot dead 516
# Vacuum vessel
/musr/command construct box TVac1 72.5 2.5 191.5 Steel 0 72.5 0 log_SRENV norot dead 601
/musr/command construct box TVac2 2.5 70.0 191.5 Steel 72.5 0 0 log_SRENV norot dead 602
/musr/command construct box TVac3 72.5 2.5 191.5 Steel 0 -72.5 0 log_SRENV norot dead 603
/musr/command construct box TVac4 2.5 70.0 191.5 Steel -72.5 0 0 log_SRENV norot dead 604
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For Spin Rotator
/musr/command construct tubs SREField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 630 nofield
/musr/command construct tubs SRBField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.51 log_World norot dead 631 nofield
/musr/command visattributes G4_Cu red
/musr/command visattributes G4_Fe blue
/musr/command visattributes Brass yellow
################################################################################################################
# Lens 1 - 1st Einzel Lens
################################################################################################################
# L1ENV - Lens 1 envelope - for easy positioning of lens parts (outer dia: 100 mm, length: 300 mm)
#/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 0 0 -1929.5 log_World norot dead 600
/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend 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
# n = 2 - Ground Electrode 2 (closer to SR).
/musr/command construct tubs L1GP2 40 44 50 0 360 Steel 0 0 100 log_L1ENV norot dead 653
# HP - High Potential Electrode (Central Anode - usually at +8.5 kV, for a 15 keV muon beam)
/musr/command construct tubs L1HP 40 44 40 0 360 Steel 0 0 0 log_L1ENV norot dead 652
# Lens 1 visual attributes (optional)
/musr/command visattributes log_L1HP darkred
################################################################################################################
# Electrostatic field at accelerator after moderator
################################################################################################################
#
/musr/command construct box Grid1 9.1 25 25 G4_Galactic 489.9 0.0 -1678.0 log_World rotMod dead 212
/musr/command globalfield Grid1_field 9.1 25 25 uniform 489.9 0.0 -1678.0 log_Grid1 0 0 0 -0.2527 0 0
/musr/command construct box Grid2 5 24 24 G4_Galactic 475.8 0.0 -1678.0 log_World rotMod dead 214
/musr/command globalfield Grid2_field 5 24 24 uniform 475.8 0.0 -1678.0 log_Grid2 0 0 0 -1.04 0 0
/musr/command globalfield printFieldValueAtPoint 489.9 0.0 -1678.0
/musr/command globalfield printFieldValueAtPoint 475.8 0.0 -1678.0
################################################################################################################
# Electrostatic mirror at bend
################################################################################################################
# MRENV
/musr/command construct box MirrE 65 65 10 G4_Galactic 14.14213562 0.0 -1678.0 log_World rotMirr dead 200
/musr/command globalfield Mirr_field 65 65 10 uniform 14.14213562 0.0 -1678.0 log_MirrE 0 0 0 0 0 0.75
###################################################################################
################### E L E C T R O M G N E T I C F I E L D S ##################
###################################################################################
# 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!
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For L1
/musr/command construct tubs L1EField 0 0.01 0.005 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend dead 706 nofield
# For L2 (L3 before 2012)
/musr/command construct tubs L3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -863.0 log_World norot dead 708 nofield
# LENS 1. Best L1 settings: 7.2 kV for 12 keV muons
/musr/command globalfield Lens1EField 251.5 0.0 -1678.0 fromfile 2DE L1_Erz.map log_L1EField 9.0
# LENS 2. Best L3 settings: 8.4 kV for 12 keV muons
/musr/command globalfield Lens3EField 0. 0. -863.0 fromfile 2DE L3_Erz.map log_L3EField 10.5
# Spin rotator
# Electric field should be 370mm plates
# Magnetic field should be 260mm poles as measured srlem_ext.map
/musr/command globalfield Ele_field 0. 0. -1284.5 fromfile 3DE E_Sep_P37.5cm.map log_SREField 2.717
/musr/command globalfield Mag_field 0. 0. -1284.51 fromfile 3DB srlem_ext.map log_SRBField -0.00692
# 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
# 57.15mm upstream center
/musr/command construct box TriggE0 45 45 5 G4_Galactic 0 0 -555.1 log_World norot dead 630 nofield
# 48mm upstream center
/musr/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -543. log_World norot dead 631 nofield
# 2.25mm downstream center
/musr/command construct box TriggE2 45 45 4.9479 G4_Galactic 0 0 -492.75 log_World rotTrig dead 632 nofield
# 54mm downstream center
/musr/command construct box TriggE3 45 45 4 G4_Galactic 0 0 -441.0 log_World norot dead 633
### Electric field at TRIGGER Detector TD: Three different uniform fields, 2012 settings
/musr/command globalfield Trigg0_field 45 45 5 uniform 0. 0. -555.1 log_TriggE0 0 0 0 0 0 0.338
/musr/command globalfield Trigg1_field 45 45 4 uniform 0. 0. -543. log_TriggE1 0 0 0 0 0 -0.02375
/musr/command globalfield Trigg2_field 45 45 4.9497 uniform 0. 0. -492.75 log_TriggE2 0 0 0 0 0 0.041416
/musr/command globalfield Trigg3_field 45 45 4 uniform 0. 0. -441.0 log_TriggE3 0 0 0 0 0 -0.45
# Trigger Lens, L3, (available space from -437 to -347, we use 70mm of that)
/musr/command construct tubs TL3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -382.0 log_World norot dead 706 nofield
/musr/command globalfield ColRingEField 0. 0. -382.0 fromfile 2DE CR7cm_Grid.map log_TL3EField 12.0
### Electric field at RING ANODE - from 3DE field map
# To create an arbitrary configuration, switch on all fields and set different potentials.
/musr/command globalfield RngAnT_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_T 11.9
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 11.9
/musr/command globalfield RngAnB_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_B 11.9
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 11.9
### 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_convMap.map log_SBField 0.
### Electric field at the sample
/musr/command construct tubs SEField 0 0.01 0.005 0 360 G4_Galactic 0.0 0.0 15.9 log_World norot dead 710 nofield
/musr/command globalfield SampleEField 0. 0. 15.9 fromfile 2DE SamplePlate_2DE.map log_SEField 0.0
# Set parameters for particle tracking in an EM field
/musr/command globalfield setparameter SetLargestAcceptableStep 5
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
# TESTING EM FIELD
/musr/command globalfield printFieldValueAtPoint 0. 0. 0.
/musr/command globalfield printFieldValueAtPoint 0. 35. -670.
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.10
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
#/musr/command process addModel mu+ G4MuMultipleScattering G4WentzelVIModel 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ musrMuEnergyLossLandau -1 -1 1
# parameters for Landau energy loss distribution, LandauSigma corresponds to the width of the distibution
/musr/command SetLandauMPV 0.01
/musr/command SetLandauSigma 0.3
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#/musr/command process addDiscreteProcess mu+ G4CoulombScattering
#/musr/command process addProcess mu+ G4UserSpecialCuts -1 -1 3
#/musr/command process addProcess mu+ G4StepLimiter -1 -1 4
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
#/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
#/musr/command signalSeparationTime 0.1
#
/musr/run/randomOption 1
################################################################################################################
# -- Setting simulation PARAMETERS --
################################################################################################################
# Set the overall range cut (default 0.1 mm)
#*/run/setCut 1 mm
# Set the range cut on particular volumes (in mm)
#/musr/command SetUserLimits log_CFoil 1e-8 -1 -1 -1 -1
#*/musr/command SetUserLimits log_target 0.01
#*/musr/command SetUserLimits log_targetscint 0.01
#*/musr/command SetUserLimits log_cryostatscint 0.01
# Set particle energy cuts on particular volumes (in eV)
#/musr/command SetUserLimits log_World ustepMax(mm) utrakMax(mm) utimeMax(ns) uekinMin(MeV) urangMin(mm)
#/musr/command SetUserLimits log_World -1 -1 -1 1e-7 -1
# Geant4 10.2
#------------
/process/em/lowestMuHadEnergy 1e-6 MeV
# Store ALL the events in a ROOT tree or just the interesting ones? (default is true)
#*/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
# Override runID number
#*/musr/run/runID 21
# Set the frequency of event printing
/musr/run/howOftenToPrintEvent 100
# 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
/musr/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
#*/control/execute visdawn.mac
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
#/musr/command rootOutput weight off
#/musr/command rootOutput BFieldAtDecay off
#/musr/command rootOutput muIniPosX off
#/musr/command rootOutput muIniPosY off
#/musr/command rootOutput muIniPosZ off
#/musr/command rootOutput muIniMomX off
#/musr/command rootOutput muIniMomY off
#/musr/command rootOutput muIniMomZ off
#/musr/command rootOutput muIniPolX off
#/musr/command rootOutput muIniPolY off
#/musr/command rootOutput muIniPolZ off
#/musr/command rootOutput muDecayDetID off
#/musr/command rootOutput muDecayPosX off
#/musr/command rootOutput muDecayPosY off
#/musr/command rootOutput muDecayPosZ off
#/musr/command rootOutput muDecayTime off
#/musr/command rootOutput muDecayPolX off
#/musr/command rootOutput muDecayPolY off
#/musr/command rootOutput muDecayPolZ off
#/musr/command rootOutput muTargetTime off
#/musr/command rootOutput muTargetPolX off
#/musr/command rootOutput muTargetPolY off
#/musr/command rootOutput muTargetPolZ off
#/musr/command rootOutput muM0Time off
#/musr/command rootOutput muM0PolX off
#/musr/command rootOutput muM0PolY off
#/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
#/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
/musr/command storeOnlyEventsWithHits false
################################################################################################################
# -- Setting PARTICLE GUN parameters --
################################################################################################################
# Default momentum direction: 001, i.e. 0z.
# Default muon soin 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 -1144 mm, acceleration starts at -1154.15 mm
#/gun/vertex 0. 0. -2119.5 mm
/gun/vertex 499 0. -1678.0 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 6.83 6.83 0 mm
/gun/vertexsigma -15 -15 0 mm
#/gun/boxboundarycentre 499 0 -1678 mm
#/gun/boxboundary 15 15 1 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
# Set muon energy before hitting TD; a constant field in front of the C-foil accelerates the muons
# to add 3.38 keV
/gun/kenergy 15.0 eV
# Set beam momentum direction
/gun/direction -1.0 0.0 0.0
# Set muon spin direction: +10deg or 0
/gun/muonPolarizVector 0.9848 0 0.17365
#/gun/muonPolarizVector 1 0 0
# Other useful test parameters:
#------------------Oct.20 2015------------------------------------
# kenergy= 15 eV Pmu= 0.xxxMeV/c ==> sigma = /2.354 = MeV/c
#/gun/momentumsmearing 0.07508 MeV
/gun/momentumsmearing 0.016 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#*/gun/momentumboundary 20 40 0 MeV
#---/gun/tilt: xangle, yangle, dummy
#*/gun/tilt 0 0.0 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.0 deg
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#*/gun/decaytimelimits 10400 10420 2197.03 ns
#/gun/tiltsigma 1.4 1.4 0 deg
/gun/tiltsigma 0 0 -1.0 deg
# Selectively inactivate or activate sensitive detectors
#*/hits/inactivate /musr/ScintSD
# Only for code debugging!
/tracking/verbose 0
# BEAM ON
#/run/beamOn 1000000
#/run/beamOn 10
/run/beamOn 10000

View File

@@ -0,0 +1,950 @@
# Template suitable for beam profile detectioon with the spin rotator in place
# Zaher Salman 7/10/2010
#
# Thomas Prokscha 22/Nov/2012
# Moved sample stack on cryostat 3mm downstream to fit to positions in apparatus
# Changed positions of positron counters according to corrected drawing LEM 37.01.024 (19/Sep/2012)
#
# Position downstream detectors: z=+62.5mm original value: z=+66.5mm
# Position upstream detectors: z=-64.0mm original value: z=-60.0mm
#
# 2013 setup: 1mm Ti sample tube
#
# 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
#
# Ran Xiao 25/Sep/2014
# Start muons at moderator at x=499, assume cosA angular distribution, assume energy distribution
#
################################################################################################################
# -- ROTATION MATRICES --
################################################################################################################
# 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
/musr/command rotation rotRAnL 0 0 1 90
/musr/command rotation rotRAnD 0 0 1 180
# More Rotations
/musr/command rotation rotD1 0 0 1 11.250
/musr/command rotation rotD2 0 0 1 33.750
/musr/command rotation rotD3 0 0 1 56.250
/musr/command rotation rotD4 0 0 1 78.750
/musr/command rotation rotD5 0 0 1 101.250
/musr/command rotation rotD6 0 0 1 123.750
/musr/command rotation rotD7 0 0 1 146.250
/musr/command rotation rotD8 0 0 1 168.750
/musr/command rotation rotD9 0 0 1 191.250
/musr/command rotation rotD10 0 0 1 213.750
/musr/command rotation rotD11 0 0 1 236.250
/musr/command rotation rotD12 0 0 1 258.750
/musr/command rotation rotD13 0 0 1 281.250
/musr/command rotation rotD14 0 0 1 303.750
/musr/command rotation rotD15 0 0 1 326.250
/musr/command rotation rotD16 0 0 1 348.750
/musr/command rotation rotD17 0 0 1 11.250
/musr/command rotation rotD18 0 0 1 33.750
/musr/command rotation rotD19 0 0 1 56.250
/musr/command rotation rotD20 0 0 1 78.750
/musr/command rotation rotD21 0 0 1 101.250
/musr/command rotation rotD22 0 0 1 123.750
/musr/command rotation rotD23 0 0 1 146.250
/musr/command rotation rotD24 0 0 1 168.750
/musr/command rotation rotD25 0 0 1 191.250
/musr/command rotation rotD26 0 0 1 213.750
/musr/command rotation rotD27 0 0 1 236.250
/musr/command rotation rotD28 0 0 1 258.750
/musr/command rotation rotD29 0 0 1 281.250
/musr/command rotation rotD30 0 0 1 303.750
/musr/command rotation rotD31 0 0 1 326.250
/musr/command rotation rotD32 0 0 1 348.750
# Beam line bend at mirror
/musr/command rotation rotBend 0 1 0 -90
/musr/command rotation rotMirr 0 1 0 -45
/musr/command rotation rotMod 0 1 0 -5
################################################################################################################
# -- LEM GEOMETRY --
################################################################################################################
# WORLD = Laboratory reference frame, the origin is in the centre of the LEM sample tube
/musr/command construct box World 900 350 2600 G4_Galactic 0 0 0 no_logical_volume norot dead -1
/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 60 0.05 0 360 G4_Galactic 850 0 -1678 log_World rotBend dead 851
/musr/command construct tubs save1 0 60 0.05 0 360 G4_Galactic 800 0 -1678 log_World rotBend dead 852
/musr/command construct tubs save2 0 60 0.05 0 360 G4_Galactic 750 0 -1678 log_World rotBend dead 853
/musr/command construct tubs save3 0 60 0.05 0 360 G4_Galactic 700 0 -1678 log_World rotBend dead 854
/musr/command construct tubs save4 0 60 0.05 0 360 G4_Galactic 650 0 -1678 log_World rotBend dead 855
/musr/command construct tubs save5 0 60 0.05 0 360 G4_Galactic 600 0 -1678 log_World rotBend dead 856
/musr/command construct tubs save6 0 60 0.05 0 360 G4_Galactic 550 0 -1678 log_World rotBend dead 857
/musr/command construct tubs save7 0 60 0.05 0 360 G4_Galactic 500 0 -1678 log_World rotBend dead 858
/musr/command construct tubs save8 0 60 0.05 0 360 G4_Galactic 450 0 -1678 log_World rotBend dead 859
/musr/command construct tubs save9 0 60 0.05 0 360 G4_Galactic 400 0 -1678 log_World rotBend dead 860
/musr/command construct tubs save10 0 60 0.05 0 360 G4_Galactic 350 0 -1678 log_World rotBend dead 861
/musr/command construct tubs save11 0 60 0.05 0 360 G4_Galactic 300 0 -1678 log_World rotBend dead 862
/musr/command construct tubs save12 0 60 0.05 0 360 G4_Galactic 240 0 -1678 log_World rotBend dead 863
/musr/command construct tubs save13 0 60 0.05 0 360 G4_Galactic 200 0 -1678 log_World rotBend dead 864
/musr/command construct tubs save14 0 60 0.05 0 360 G4_Galactic 150 0 -1678 log_World rotBend dead 865
/musr/command construct tubs save15 0 60 0.05 0 360 G4_Galactic 100 0 -1678 log_World rotBend dead 866
/musr/command construct tubs save16 0 60 0.05 0 360 G4_Galactic 70 0 -1678 log_World rotBend dead 867
/musr/command construct tubs save17 0 60 0.05 0 360 G4_Galactic 0 0 -1620 log_World norot dead 868
/musr/command construct tubs save18 0 60 0.05 0 360 G4_Galactic 0 0 -1600 log_World norot dead 869
/musr/command construct tubs save19 0 60 0.05 0 360 G4_Galactic 0 0 -1550 log_World norot dead 870
/musr/command construct tubs save20 0 60 0.05 0 360 G4_Galactic 0 0 -1500 log_World norot dead 871
/musr/command construct tubs save21 0 60 0.05 0 360 G4_Galactic 0 0 -1450 log_World norot dead 872
/musr/command construct tubs save22 0 60 0.05 0 360 G4_Galactic 0 0 -1400 log_World norot dead 873
/musr/command construct tubs save23 0 60 0.05 0 360 G4_Galactic 0 0 -1350 log_World norot dead 874
/musr/command construct tubs save24 0 60 0.05 0 360 G4_Galactic 0 0 -1300 log_World norot dead 875
/musr/command construct tubs save25 0 60 0.05 0 360 G4_Galactic 0 0 -1250 log_World norot dead 876
/musr/command construct tubs save26 0 60 0.05 0 360 G4_Galactic 0 0 -1200 log_World norot dead 877
/musr/command construct tubs save27 0 60 0.05 0 360 G4_Galactic 0 0 -1150 log_World norot dead 878
/musr/command construct tubs save28 0 60 0.05 0 360 G4_Galactic 0 0 -1100 log_World norot dead 879
/musr/command construct tubs save29 0 60 0.05 0 360 G4_Galactic 0 0 -1050 log_World norot dead 880
/musr/command construct tubs save30 0 60 0.05 0 360 G4_Galactic 0 0 -1000 log_World norot dead 881
/musr/command construct tubs save31 0 60 0.05 0 360 G4_Galactic 0 0 -950 log_World norot dead 882
/musr/command construct tubs save32 0 60 0.05 0 360 G4_Galactic 0 0 -900 log_World norot dead 883
/musr/command construct tubs save33 0 60 0.05 0 360 G4_Galactic 0 0 -850 log_World norot dead 884
/musr/command construct tubs save34 0 60 0.05 0 360 G4_Galactic 0 0 -800 log_World norot dead 885
/musr/command construct tubs save35 0 60 0.05 0 360 G4_Galactic 0 0 -750 log_World norot dead 886
/musr/command construct tubs save36 0 60 0.05 0 360 G4_Galactic 0 0 -700 log_World norot dead 887
/musr/command construct tubs save37 0 60 0.05 0 360 G4_Galactic 0 0 -650 log_World norot dead 888
/musr/command construct tubs save38 0 60 0.05 0 360 G4_Galactic 0 0 -600 log_World norot dead 889
/musr/command construct tubs save39 0 60 0.05 0 360 G4_Galactic 0 0 -525 log_World norot dead 890
/musr/command construct tubs save40 0 60 0.05 0 360 G4_Galactic 0 0 -450 log_World norot dead 891
/musr/command construct tubs save41 0 60 0.05 0 360 G4_Galactic 0 0 -420 log_World norot dead 892
/musr/command construct tubs save42 0 60 0.05 0 360 G4_Galactic 0 0 -400 log_World norot dead 893
/musr/command construct tubs save43 0 60 0.05 0 360 G4_Galactic 0 0 -350 log_World norot dead 894
/musr/command construct tubs save44 0 60 0.05 0 360 G4_Galactic 0 0 -300 log_World norot dead 895
/musr/command construct tubs save45 0 60 0.05 0 360 G4_Galactic 0 0 -250 log_World norot dead 896
/musr/command construct tubs save46 0 60 0.05 0 360 G4_Galactic 0 0 -200 log_World norot dead 897
/musr/command construct tubs save47 0 60 0.05 0 360 G4_Galactic 0 0 -150 log_World norot dead 898
/musr/command construct tubs save48 0 60 0.05 0 360 G4_Galactic 0 0 -100 log_World norot dead 899
/musr/command construct tubs save49 0 60 0.05 0 360 G4_Galactic 0 0 -50 log_World norot dead 900
/musr/command construct tubs save50 0 60 0.05 0 360 G4_Galactic 0 0 0 log_World norot dead 901
/musr/command construct tubs save51 0 60 0.05 0 360 G4_Galactic 0 0 16 log_World norot dead 902
/musr/command construct tubs save52 0 60 0.05 0 360 G4_Galactic 0 0 100 log_World norot dead 903
/musr/command construct tubs save53 0 60 0.05 0 360 G4_Galactic 0 0 150 log_World norot dead 904
/musr/command visattributes G4_Galactic invisible
################################################################################################################
# -- APD Scintillators --
################################################################################################################
# Detectors volume (0,0,0) coninsides with World (0,0,0)
/musr/command construct tubs DetV 80 105 133 0 360 G4_Galactic 0 0 0 log_World norot dead 100
/musr/command visattributes log_DetV invisible
# For final design set
# BackHW=60
# BackCR=-64.0, 19/Sep/2012
# ForwHW=65.5
# ForwCR=62.5, 19/Sep/2012
# Back inner sections (Upstream) (v.i.)
# Final design (30 Jun 09, 19 Sep 12) BackHW=60.0mm (Half width or length), BackCR=-4-BackHW=-64.0mm (Center z coordinate)
/musr/command construct trd90y ScD1 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 -17.265493 -64.0 log_DetV rotD1 musr/ScintSD 1
/musr/command construct trd90y ScD2 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 -49.167966 -64.0 log_DetV rotD2 musr/ScintSD 2
/musr/command construct trd90y ScD3 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 -73.585061 -64.0 log_DetV rotD3 musr/ScintSD 3
/musr/command construct trd90y ScD4 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 -86.799497 -64.0 log_DetV rotD4 musr/ScintSD 4
/musr/command construct trd90y ScD5 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 -86.799497 -64.0 log_DetV rotD5 musr/ScintSD 5
/musr/command construct trd90y ScD6 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 -73.585061 -64.0 log_DetV rotD6 musr/ScintSD 6
/musr/command construct trd90y ScD7 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 -49.167966 -64.0 log_DetV rotD7 musr/ScintSD 7
/musr/command construct trd90y ScD8 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 -17.265493 -64.0 log_DetV rotD8 musr/ScintSD 8
/musr/command construct trd90y ScD9 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 17.265493 -64.0 log_DetV rotD9 musr/ScintSD 9
/musr/command construct trd90y ScD10 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 49.167966 -64.0 log_DetV rotD10 musr/ScintSD 10
/musr/command construct trd90y ScD11 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 73.585061 -64.0 log_DetV rotD11 musr/ScintSD 11
/musr/command construct trd90y ScD12 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 86.799497 -64.0 log_DetV rotD12 musr/ScintSD 12
/musr/command construct trd90y ScD13 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 86.799497 -64.0 log_DetV rotD13 musr/ScintSD 13
/musr/command construct trd90y ScD14 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 73.585061 -64.0 log_DetV rotD14 musr/ScintSD 14
/musr/command construct trd90y ScD15 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 49.167966 -64.0 log_DetV rotD15 musr/ScintSD 15
/musr/command construct trd90y ScD16 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 17.265493 -64.0 log_DetV rotD16 musr/ScintSD 16
# Forward inner sections (Downstream) (h.i.)
# Final design (30 June 09, 19 Sep 12) ForwHW=65.5mm (Half width or length), ForwCR=-3+ForwHW=62.5mm (Center z coordinate)
/musr/command construct trd90y ScD17 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 -17.070403 62.5 log_DetV rotD17 musr/ScintSD 17
/musr/command construct trd90y ScD18 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 -48.612395 62.5 log_DetV rotD18 musr/ScintSD 18
/musr/command construct trd90y ScD19 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 -72.753591 62.5 log_DetV rotD19 musr/ScintSD 19
/musr/command construct trd90y ScD20 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 -85.818712 62.5 log_DetV rotD20 musr/ScintSD 20
/musr/command construct trd90y ScD21 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 -85.818712 62.5 log_DetV rotD21 musr/ScintSD 21
/musr/command construct trd90y ScD22 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 -72.753591 62.5 log_DetV rotD22 musr/ScintSD 22
/musr/command construct trd90y ScD23 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 -48.612395 62.5 log_DetV rotD23 musr/ScintSD 23
/musr/command construct trd90y ScD24 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 -17.070403 62.5 log_DetV rotD24 musr/ScintSD 24
/musr/command construct trd90y ScD25 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 17.070403 62.5 log_DetV rotD25 musr/ScintSD 25
/musr/command construct trd90y ScD26 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 48.612395 62.5 log_DetV rotD26 musr/ScintSD 26
/musr/command construct trd90y ScD27 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 72.753591 62.5 log_DetV rotD27 musr/ScintSD 27
/musr/command construct trd90y ScD28 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 85.818712 62.5 log_DetV rotD28 musr/ScintSD 28
/musr/command construct trd90y ScD29 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 85.818712 62.5 log_DetV rotD29 musr/ScintSD 29
/musr/command construct trd90y ScD30 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 72.753591 62.5 log_DetV rotD30 musr/ScintSD 30
/musr/command construct trd90y ScD31 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 48.612395 62.5 log_DetV rotD31 musr/ScintSD 31
/musr/command construct trd90y ScD32 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 17.070403 62.5 log_DetV rotD32 musr/ScintSD 32
# Back outer sections (v.a.)
/musr/command construct trd ScD33 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 -18.631126 -64.0 log_DetV rotD1 musr/ScintSD 33
/musr/command construct trd ScD34 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 -53.056957 -64.0 log_DetV rotD2 musr/ScintSD 34
/musr/command construct trd ScD35 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 -79.405348 -64.0 log_DetV rotD3 musr/ScintSD 35
/musr/command construct trd ScD36 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 -93.664994 -64.0 log_DetV rotD4 musr/ScintSD 36
/musr/command construct trd ScD37 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 -93.664994 -64.0 log_DetV rotD5 musr/ScintSD 37
/musr/command construct trd ScD38 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 -79.405348 -64.0 log_DetV rotD6 musr/ScintSD 38
/musr/command construct trd ScD39 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 -53.056957 -64.0 log_DetV rotD7 musr/ScintSD 39
/musr/command construct trd ScD40 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 -18.631126 -64.0 log_DetV rotD8 musr/ScintSD 40
/musr/command construct trd ScD41 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 18.631126 -64.0 log_DetV rotD9 musr/ScintSD 41
/musr/command construct trd ScD42 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 53.056957 -64.0 log_DetV rotD10 musr/ScintSD 42
/musr/command construct trd ScD43 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 79.405348 -64.0 log_DetV rotD11 musr/ScintSD 43
/musr/command construct trd ScD44 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 93.664994 -64.0 log_DetV rotD12 musr/ScintSD 44
/musr/command construct trd ScD45 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 93.664994 -64.0 log_DetV rotD13 musr/ScintSD 45
/musr/command construct trd ScD46 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 79.405348 -64.0 log_DetV rotD14 musr/ScintSD 46
/musr/command construct trd ScD47 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 53.056957 -64.0 log_DetV rotD15 musr/ScintSD 47
/musr/command construct trd ScD48 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 18.631126 -64.0 log_DetV rotD16 musr/ScintSD 48
# Forward outer sections (h.a.)
/musr/command construct trd ScD49 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 -18.436035 62.5 log_DetV rotD1 musr/ScintSD 49
/musr/command construct trd ScD50 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 -52.501387 62.5 log_DetV rotD2 musr/ScintSD 50
/musr/command construct trd ScD51 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 -78.573878 62.5 log_DetV rotD3 musr/ScintSD 51
/musr/command construct trd ScD52 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 -92.684209 62.5 log_DetV rotD4 musr/ScintSD 52
/musr/command construct trd ScD53 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 -92.684209 62.5 log_DetV rotD5 musr/ScintSD 53
/musr/command construct trd ScD54 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 -78.573878 62.5 log_DetV rotD6 musr/ScintSD 54
/musr/command construct trd ScD55 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 -52.501387 62.5 log_DetV rotD7 musr/ScintSD 55
/musr/command construct trd ScD56 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 -18.436035 62.5 log_DetV rotD8 musr/ScintSD 56
/musr/command construct trd ScD57 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 18.436035 62.5 log_DetV rotD9 musr/ScintSD 57
/musr/command construct trd ScD58 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 52.501387 62.5 log_DetV rotD10 musr/ScintSD 58
/musr/command construct trd ScD59 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 78.573878 62.5 log_DetV rotD11 musr/ScintSD 59
/musr/command construct trd ScD60 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 92.684209 62.5 log_DetV rotD12 musr/ScintSD 60
/musr/command construct trd ScD61 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 92.684209 62.5 log_DetV rotD13 musr/ScintSD 61
/musr/command construct trd ScD62 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 78.573878 62.5 log_DetV rotD14 musr/ScintSD 62
/musr/command construct trd ScD63 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 52.501387 62.5 log_DetV rotD15 musr/ScintSD 63
/musr/command construct trd ScD64 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 18.436035 62.5 log_DetV rotD16 musr/ScintSD 64
# Structural support inside the detectors vessel
# Carbon fibre, inner radius 80, thickness 2 mm.
# Additional Al plate removed, 2 mm thick for h.i and h.a and 3 mm thick for v.i. and v.a
/musr/command construct tubs hInShell 80.0 82.0 65.5 0 360 G4_C 0 0 62 log_DetV norot dead 70
/musr/command construct tubs vInShell 80.0 82.0 60.0 0 360 G4_C 0 0 -64.5 log_DetV norot dead 70
# Visual attributes (optional)
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE green
#/musr/command visattributes log_ScD49 green
#/musr/command visattributes log_ScD50 green
#/musr/command visattributes log_test red
################################################################################################################
# Sample vacuum/tube up to gate valve - Can host either the Cryostat or the MCP2
################################################################################################################
# Vacuum space
# /musr/command construct tubs SamV 0 75.0 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100
# Sample tube
#/musr/command construct tubs SamS 75.0 77.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# 2012: 2mm Ti tube, 2013: 1mm
/musr/command construct tubs SamS 75.0 76.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# F160 - 160 CF flange upstream of MCP2 tube
/musr/command construct tubs F160 78.0 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 102
# F100 (Blank end flange)
/musr/command construct tubs F100 0 75.0 10 0 360 Steel 0 0 172.0 log_World norot dead 103
# 200 CF flange upstream of MCP2 tube covering the whole length of the gate valve chamber.
/musr/command construct tubs GATS 103.25 126.5 92.5 0 360 Steel 0 0 -254.5 log_World norot dead 371
# F200 - 200 CF flange upstream of MCP2 tube to connect to gate valve chamber
/musr/command construct tubs F200 76.5 103.25 12 0 360 Steel 0 0 -174.0 log_World norot dead 372
# Visual attributes (optional)
#/musr/command visattributes log_SamV invisible
/musr/command visattributes log_SamS oxsteel
/musr/command visattributes log_F160 oxsteel
#/musr/command visattributes log_F100 oxsteel
/musr/command visattributes log_GATS oxsteel
/musr/command visattributes log_F200 oxsteel
################################################################################################################
# MCP - Micro Channel Plate Detector MCP2
# mcpv_z = -92.5 mm!
#
# We have a 324 mm long sample tube;
# the MCP2 front side is at 142 mm from the end of the sample tube.
# the front face of the sample plate of the cryostat is 145 mm from the end of the sample tube.
#
################################################################################################################
#
# MCPM1 - MCP Macor ring 1
# MCPD - electron multiplying glass disk (also known as target)
# Sensitive surface at z = 20 mm wrt. World
# MCPM2 - MCP Macor ring 2
# /musr/command construct tubs MCPM1 24 32.5 0.75 0 360 Macor 0 0 19.25 log_World norot dead 251
# Use it either as (DMCP-musr/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz.
# /musr/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 21.5 log_World norot dead 252
# /musr/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 23.75 log_World norot dead 253
# NOTE: To intercept ALL the incoming muons, comment the DMCP and MCPM1 lines above and uncomment this one:
#*aa/musr/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs target 0 21.0 1.5 0 360 MCPglass 0 0 114 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs saveTarget 0 75.0 0.2 0 360 G4_Galactic 0 0 110.79 log_SamV norot dead 222
#
# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole)
# MCVR - "Vacuum Ring" (circular hole)
# /musr/command construct box MCSR 36.5 36.5 1 Steel 0 0 25.5 log_World norot dead 254
# /musr/command construct tubs MCVR 0 27.5 1 0 360 G4_Galactic 0 0 0 log_MCSR norot dead 255
# 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
# /musr/command construct box MCPA 36.5 36.5 4 Steel 0 0 37 log_World norot dead 256
# /musr/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 257
# /musr/command construct tubs ANVA2 0 27.5 1.5 0 360 G4_Galactic 0 0 2.5 log_MCPA norot dead 258
# MCSS - MCP Stainless Steel Support Ring
# /musr/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 69.8 log_World norot dead 259
# MCP2 visual attributes (optional)
#/musr/command visattributes log_DMCP MCP_style
#*/musr/command visattributes log_target MCP_style
#*/musr/command visattributes log_MCPM1 MACOR_style
#*------ /musr/command visattributes log_MCPM2 MACOR_style
################################################################################################################
# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm)
#
# sample plate front face is at z = 17mm:
# cold finger distance to CF100: 130mm
# 5mm base plate + 6mm sapphire + 4mm sample plate = 15mm
# sample plate front face from CF100: 145mm
# z-position of sample plate front face: 324/2-145mm = 17mm
# --> sample plate center is at 17+2=19mm
#
################################################################################################################
# Dimensions for large/small sample plates SamPL=35/21 and SaphPL=SamPL35-5
/musr/command construct tubs target 0 35 2 0 360 G4_Al 0 0 19.0 log_World norot dead 251
/musr/command construct tubs SAPH 0 30 3 0 360 G4_ALUMINUM_OXIDE 0 0 24.0 log_World norot dead 252
/musr/command construct tubs SAH1 0 35 2.5 0 360 G4_Al 0 0 29.5 log_World norot dead 253
# Special save target volume
/musr/command construct tubs saveTarget 0 40 0.05 0 360 G4_Galactic 0 0 16.9 log_World norot dead 253
# Other components of the cryostat (dimensions and position of CRY4 are only approx. because unknown)
# COld Finger
/musr/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 37.0 log_World norot dead 261
# End plate of cryostat (7 mm thick, 30 mm diameter)
/musr/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 45.5 log_World norot dead 262
# Heat exchanger (assuming a 10 mm opening - Original dimensions not known.) # OLD pos. 160.0
/musr/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 74.0 log_World norot dead 263
# Mounting ring for He-shield
/musr/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 54.0 log_World norot dead 264
# 2 mm thick plate for mounting ring. This is just to close the downstream side.
/musr/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 54.0 log_World norot dead 265
# Radiation shield
/musr/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 19.0 log_World norot dead 266
# Front part of the radiation shield
/musr/command construct tubs CRSH2 30 48 0.5 0 360 G4_Cu 0 0 -26.5 log_World norot dead 267
# Electrical Field Guard Rings (distance between the guard rings: 16 mm)
# /musr/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 -13.5 log_World norot dead 271
# /musr/command construct tubs Guard2 29 38 1.5 0 360 G4_Cu 0 0 2.5 log_World norot dead 272
# Cryostat visual attributes (optional)
/musr/command visattributes log_SAH1 oxsteel
#/musr/command visattributes log_SAH2 oxsteel
/musr/command visattributes log_target oxsteel
/musr/command visattributes log_SAPH MACOR_style
#/musr/command visattributes log_SAH3 oxsteel
/musr/command visattributes log_CRSH yellow
/musr/command visattributes log_CRSH2 yellow
#/musr/command visattributes log_test red
################################################################################################################
# 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
/musr/command construct cons RA_EU 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World norot dead 801
/musr/command construct cons RA_MU 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World norot dead 802
/musr/command construct cons RA_ER 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnR dead 803
/musr/command construct cons RA_MR 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnR dead 804
/musr/command construct cons RA_ED 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnD dead 805
/musr/command construct cons RA_MD 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnD dead 806
/musr/command construct cons RA_EL 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnL dead 807
/musr/command construct cons RA_ML 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnL dead 808
# 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_T 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 822
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.02 log_World rotRAnR dead 824
/musr/command construct tubs RA_B 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 826
/musr/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.06 log_World rotRAnL dead 828
# 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 831
# Ring Anodes visual attributes (optional)
/musr/command visattributes log_RA_G invisible
#/musr/command visattributes log_RA_G Grid_style
################################################################################################################
# Trigger - Trigger Detector # Triggerz = -1092 mm; total length of TD is 110 mm; carbon foil at -1144 mm.
################################################################################################################
# Trigger volume
/musr/command construct tubs TrigV 90 127 148 0 360 G4_Galactic 0 0 -495 log_World norot dead 600
# Trigger tube
/musr/command construct tubs TrigS 100 103 148 0 360 Steel 0 0 0 log_TrigV norot dead 601
# TF - Trigger tube flanges
/musr/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 136 log_TrigV norot dead 611
/musr/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -136 log_TrigV norot dead 612
# trigger foil is 52-55mm upstream of TrigV center
# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm).
# USE THE NAME CFoil or coulombCFoil, otherwise musrMuFormation won't work!
#/musr/command construct box CFoil 60 60 0.0000025 G4_GRAPHITE 0 0 -550 log_World norot dead 621
/musr/command construct box CFoil 60 60 0.000002 G4_GRAPHITE 0 0 -550 log_World norot dead 621
# 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 musrDetectorConstruction.cc and set any density.
# Trigger visual attributes (optional)
/musr/command visattributes log_TrigV oxsteel
/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_saveAfterTD darkred
# Trigger Lens, L3, center -382 length 70mm radius 65mm.
/musr/command construct tubs TL3S 65.0 70.0 35.0 0 360 G4_Galactic 0 0 -382 log_World norot dead 706 nofield
/musr/command visattributes log_TL3S red
# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL.
# E.g. /musr/command visattributes Steel red
################################################################################################################
# L2 - 2nd Einzel Lens # L3z = -56.7 cm. (it was "L3" in 2011 and before)
# Lens Gap = 12.0 mm => G/D = 12/130 ~ 0.1 (Lens Gap = gap between Ground and Anode, D - Diameter)
################################################################################################################
# L3 volume
/musr/command construct tubs L3V 65 127 220 0 360 G4_Galactic 0 0 -863 log_World norot dead 400
# Lens 3 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 720 mm)
/musr/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 0 log_L3V norot dead 401
# Lens 3 Flange 1, z = L3z + 208 mm
/musr/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -208 log_L3V norot dead 402
# Lens 3 Flange 2, z = L3z - 208 mm
/musr/command construct tubs L3F2 103 126.5 12 0 360 Steel 0 0 208 log_L3V norot dead 403
# GPn - Ground Potential Electrodes
# n = 1-4 (further from TD) and 5-8 (closer to TD) - components of the Ground Electrodes
# Ground Electrode (inner dia: 130 mm, outer dia: 134 mm, length: 133 mm)
/musr/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 421
# Outer electrode surface (LN2 cooling vessel)
/musr/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 422
# First ring cap
/musr/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3V norot dead 423
# Second ring cap
/musr/command construct tubs L3GP4 67 81 4 0 360 Steel 0 0 71.0 log_L3V norot dead 424
/musr/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 431
/musr/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 432
/musr/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3V norot dead 433
/musr/command construct tubs L3GP8 67 81 4 0 360 Steel 0 0 -71.0 log_L3V norot dead 434
# HP - High Potential Electrode (Central Anode - usually at +8.7 kV, for a 15 keV muon beam)
/musr/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3V norot dead 451
# Lens 3 visual attributes (optional)
/musr/command visattributes log_L3V invisible
/musr/command visattributes log_L3ST oxsteel
/musr/command visattributes log_L3F1 oxsteel
/musr/command visattributes log_L3F2 oxsteel
/musr/command visattributes log_L3HP darkred
################################################################################################################
# -- SPIN ROTATOR GEOMETRY --
################################################################################################################
# Spin Rotator volume
/musr/command construct tubs SRENV 50 320 201.5 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 100
/musr/command visattributes log_SRENV invisible
# Electromagnet with iron yoke
# U - up, D - down, L - left, R - right (with respect to muon's view - momentum direction)
/musr/command construct box NPole 200 10 150 G4_Fe 0 85 0 log_SRENV norot dead 201
/musr/command construct box NYoke 150 22.5 50 G4_Fe 0 117.5 0 log_SRENV norot dead 202
/musr/command construct box NConn 225 17.5 190.0 G4_Fe 0 157.5 0 log_SRENV norot dead 203
/musr/command construct box SPole 200 10 150 G4_Fe 0 -85 0 log_SRENV norot dead 205
/musr/command construct box SYoke 150 22.5 50 G4_Fe 0 -117.5 0 log_SRENV norot dead 206
/musr/command construct box SConn 225 17.5 190.0 G4_Fe 0 -157.5 0 log_SRENV norot dead 207
# Front mirror plate
/musr/command construct box FShU 225 50 5 G4_Fe 0 125 -195.0 log_SRENV norot dead 301
/musr/command construct box FShD 225 50 5 G4_Fe 0 -125 -195.0 log_SRENV norot dead 302
/musr/command construct box FShL 75 75 5 G4_Fe 150 0 -195.0 log_SRENV norot dead 303
/musr/command construct box FShR 75 75 5 G4_Fe -150 0 -195.0 log_SRENV norot dead 304
# Back mirror plate
/musr/command construct box BShU 225 50 5 G4_Fe 0 125 195.0 log_SRENV norot dead 321
/musr/command construct box BShD 225 50 5 G4_Fe 0 -125 195.0 log_SRENV norot dead 322
/musr/command construct box BShL 75 75 5 G4_Fe 150 0 195.0 log_SRENV norot dead 323
/musr/command construct box BShR 75 75 5 G4_Fe -150 0 195.0 log_SRENV norot dead 324
# Top coils
/musr/command construct box TCoil1 170 22.5 10 G4_Cu 0 117.5 -60 log_SRENV norot dead 401
/musr/command construct box TCoil2 170 22.5 10 G4_Cu 0 117.5 60 log_SRENV norot dead 402
/musr/command construct box TCoil3 10 22.5 50 G4_Cu 160 117.5 0 log_SRENV norot dead 403
/musr/command construct box TCoil4 10 22.5 50 G4_Cu -160 117.5 0 log_SRENV norot dead 404
# Bottom coils
/musr/command construct box BCoil1 170 22.5 10 G4_Cu 0 -117.5 -60 log_SRENV norot dead 421
/musr/command construct box BCoil2 170 22.5 10 G4_Cu 0 -117.5 60 log_SRENV norot dead 422
/musr/command construct box BCoil3 10 22.5 50 G4_Cu 160 -117.5 0 log_SRENV norot dead 423
/musr/command construct box BCoil4 10 22.5 50 G4_Cu -160 -117.5 0 log_SRENV norot dead 424
# Capacitor
/musr/command construct box Cap_p 0.5 50 150 Brass 55 0 0 log_SRENV norot dead 501
/musr/command construct box Cap_n 0.5 50 150 Brass -55 0 0 log_SRENV norot dead 502
#*/musr/command construct box Uniform 49 49 150 G4_Galactic 0 0 0 log_SRENV norot dead 503
/musr/command construct tubs RodCapUp 0 5 150 90 180 Brass 55 55 0 log_SRENV norot dead 504
/musr/command construct tubs RodCapUn 0 5 150 -90 180 Brass -55 55 0 log_SRENV norot dead 505
/musr/command construct tubs RodCapDp 0 5 150 90 180 Brass 55 -55 0 log_SRENV norot dead 506
/musr/command construct tubs RodCapDn 0 5 150 -90 180 Brass -55 -55 0 log_SRENV norot dead 507
# Rods
/musr/command construct tubs RodPosU 0 5 150 0 360 Brass 27.5 55 0 log_SRENV norot dead 511
/musr/command construct tubs Rod0U 0 5 150 0 360 Brass 0 55 0 log_SRENV norot dead 512
/musr/command construct tubs RodNegU 0 5 150 0 360 Brass -27.5 55 0 log_SRENV norot dead 513
/musr/command construct tubs RodPosD 0 5 150 0 360 Brass 27.5 -55 0 log_SRENV norot dead 514
/musr/command construct tubs Rod0D 0 5 150 0 360 Brass 0 -55 0 log_SRENV norot dead 515
/musr/command construct tubs RodNegD 0 5 150 0 360 Brass -27.5 -55 0 log_SRENV norot dead 516
# Vacuum vessel
/musr/command construct box TVac1 72.5 2.5 191.5 Steel 0 72.5 0 log_SRENV norot dead 601
/musr/command construct box TVac2 2.5 70.0 191.5 Steel 72.5 0 0 log_SRENV norot dead 602
/musr/command construct box TVac3 72.5 2.5 191.5 Steel 0 -72.5 0 log_SRENV norot dead 603
/musr/command construct box TVac4 2.5 70.0 191.5 Steel -72.5 0 0 log_SRENV norot dead 604
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For Spin Rotator
/musr/command construct tubs SREField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 630 nofield
/musr/command construct tubs SRBField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.51 log_World norot dead 631 nofield
/musr/command visattributes G4_Cu red
/musr/command visattributes G4_Fe blue
/musr/command visattributes Brass yellow
################################################################################################################
# Lens 1 - 1st Einzel Lens
################################################################################################################
# L1ENV - Lens 1 envelope - for easy positioning of lens parts (outer dia: 100 mm, length: 300 mm)
#/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 0 0 -1929.5 log_World norot dead 600
/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend 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
# n = 2 - Ground Electrode 2 (closer to SR).
/musr/command construct tubs L1GP2 40 44 50 0 360 Steel 0 0 100 log_L1ENV norot dead 653
# HP - High Potential Electrode (Central Anode - usually at +8.5 kV, for a 15 keV muon beam)
/musr/command construct tubs L1HP 40 44 40 0 360 Steel 0 0 0 log_L1ENV norot dead 652
# Lens 1 visual attributes (optional)
/musr/command visattributes log_L1HP darkred
################################################################################################################
# Electrostatic field at accelerator after moderator
################################################################################################################
#
/musr/command construct box Grid1 9.1 25 25 G4_Galactic 489.9 0.0 -1678.0 log_World rotMod dead 212
/musr/command globalfield Grid1_field 9.1 25 25 uniform 489.9 0.0 -1678.0 log_Grid1 0 0 0 -0.2527 0 0
/musr/command construct box Grid2 5 24 24 G4_Galactic 475.8 0.0 -1678.0 log_World rotMod dead 214
/musr/command globalfield Grid2_field 5 24 24 uniform 475.8 0.0 -1678.0 log_Grid2 0 0 0 -1.04 0 0
/musr/command globalfield printFieldValueAtPoint 489.9 0.0 -1678.0
/musr/command globalfield printFieldValueAtPoint 475.8 0.0 -1678.0
################################################################################################################
# Electrostatic mirror at bend
################################################################################################################
# MRENV
/musr/command construct box MirrE 65 65 10 G4_Galactic 14.14213562 0.0 -1678.0 log_World rotMirr dead 200
/musr/command globalfield Mirr_field 65 65 10 uniform 14.14213562 0.0 -1678.0 log_MirrE 0 0 0 0 0 0.75
###################################################################################
################### E L E C T R O M G N E T I C F I E L D S ##################
###################################################################################
# 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!
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For L1
/musr/command construct tubs L1EField 0 0.01 0.005 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend dead 706 nofield
# For L2 (L3 before 2012)
/musr/command construct tubs L3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -863.0 log_World norot dead 708 nofield
# LENS 1. Best L1 settings: 7.2 kV for 12 keV muons
/musr/command globalfield Lens1EField 251.5 0.0 -1678.0 fromfile 2DE L1_Erz.map log_L1EField 9.0
# LENS 2. Best L3 settings: 8.4 kV for 12 keV muons
/musr/command globalfield Lens3EField 0. 0. -863.0 fromfile 2DE L3_Erz.map log_L3EField 10.5
# Spin rotator
# Electric field should be 370mm plates
# Magnetic field should be 260mm poles as measured srlem_ext.map
/musr/command globalfield Ele_field 0. 0. -1284.5 fromfile 3DE E_Sep_P37.5cm.map log_SREField 2.717
/musr/command globalfield Mag_field 0. 0. -1284.51 fromfile 3DB srlem_ext.map log_SRBField -0.00692
# 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
# 57.15mm upstream center
/musr/command construct box TriggE0 45 45 5 G4_Galactic 0 0 -555.1 log_World norot dead 630 nofield
# 48mm upstream center
/musr/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -543. log_World norot dead 631 nofield
# 2.25mm downstream center
/musr/command construct box TriggE2 45 45 4.9479 G4_Galactic 0 0 -492.75 log_World rotTrig dead 632 nofield
# 54mm downstream center
/musr/command construct box TriggE3 45 45 4 G4_Galactic 0 0 -441.0 log_World norot dead 633
### Electric field at TRIGGER Detector TD: Three different uniform fields, 2012 settings
/musr/command globalfield Trigg0_field 45 45 5 uniform 0. 0. -555.1 log_TriggE0 0 0 0 0 0 0.338
/musr/command globalfield Trigg1_field 45 45 4 uniform 0. 0. -543. log_TriggE1 0 0 0 0 0 -0.02375
/musr/command globalfield Trigg2_field 45 45 4.9497 uniform 0. 0. -492.75 log_TriggE2 0 0 0 0 0 0.041416
/musr/command globalfield Trigg3_field 45 45 4 uniform 0. 0. -441.0 log_TriggE3 0 0 0 0 0 -0.45
# Trigger Lens, L3, (available space from -437 to -347, we use 70mm of that)
/musr/command construct tubs TL3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -382.0 log_World norot dead 706 nofield
/musr/command globalfield ColRingEField 0. 0. -382.0 fromfile 2DE CR7cm_Grid.map log_TL3EField 12.0
### Electric field at RING ANODE - from 3DE field map
# To create an arbitrary configuration, switch on all fields and set different potentials.
/musr/command globalfield RngAnT_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_T 11.9
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 11.9
/musr/command globalfield RngAnB_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_B 11.9
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 11.9
### 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_convMap.map log_SBField 0.
### Electric field at the sample
/musr/command construct tubs SEField 0 0.01 0.005 0 360 G4_Galactic 0.0 0.0 15.9 log_World norot dead 710 nofield
/musr/command globalfield SampleEField 0. 0. 15.9 fromfile 2DE SamplePlate_2DE.map log_SEField 0.0
# Set parameters for particle tracking in an EM field
/musr/command globalfield setparameter SetLargestAcceptableStep 5
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
# TESTING EM FIELD
/musr/command globalfield printFieldValueAtPoint 0. 0. 0.
/musr/command globalfield printFieldValueAtPoint 0. 35. -670.
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.10
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
#/musr/command process addModel mu+ G4MuMultipleScattering G4WentzelVIModel 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ musrMuEnergyLossLandau -1 -1 1
# parameters for Landau energy loss distribution, LandauSigma corresponds to the width of the distibution
/musr/command SetLandauMPV 0.01
/musr/command SetLandauSigma 0.3
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#/musr/command process addDiscreteProcess mu+ G4CoulombScattering
#/musr/command process addProcess mu+ G4UserSpecialCuts -1 -1 3
#/musr/command process addProcess mu+ G4StepLimiter -1 -1 4
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
#/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
#/musr/command signalSeparationTime 0.1
#
/musr/run/randomOption 1
################################################################################################################
# -- Setting simulation PARAMETERS --
################################################################################################################
# Set the overall range cut (default 0.1 mm)
#*/run/setCut 1 mm
# Set the range cut on particular volumes (in mm)
#/musr/command SetUserLimits log_CFoil 1e-8 -1 -1 -1 -1
#*/musr/command SetUserLimits log_target 0.01
#*/musr/command SetUserLimits log_targetscint 0.01
#*/musr/command SetUserLimits log_cryostatscint 0.01
# Set particle energy cuts on particular volumes (in eV)
#/musr/command SetUserLimits log_World ustepMax(mm) utrakMax(mm) utimeMax(ns) uekinMin(MeV) urangMin(mm)
#/musr/command SetUserLimits log_World -1 -1 -1 1e-7 -1
# Geant4 10.2
#------------
/process/em/lowestMuHadEnergy 1e-6 MeV
# Store ALL the events in a ROOT tree or just the interesting ones? (default is true)
#*/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
# Override runID number
#*/musr/run/runID 21
# Set the frequency of event printing
/musr/run/howOftenToPrintEvent 100
# 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
/musr/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
#*/control/execute visdawn.mac
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
#/musr/command rootOutput weight off
#/musr/command rootOutput BFieldAtDecay off
#/musr/command rootOutput muIniPosX off
#/musr/command rootOutput muIniPosY off
#/musr/command rootOutput muIniPosZ off
#/musr/command rootOutput muIniMomX off
#/musr/command rootOutput muIniMomY off
#/musr/command rootOutput muIniMomZ off
#/musr/command rootOutput muIniPolX off
#/musr/command rootOutput muIniPolY off
#/musr/command rootOutput muIniPolZ off
#/musr/command rootOutput muDecayDetID off
#/musr/command rootOutput muDecayPosX off
#/musr/command rootOutput muDecayPosY off
#/musr/command rootOutput muDecayPosZ off
#/musr/command rootOutput muDecayTime off
#/musr/command rootOutput muDecayPolX off
#/musr/command rootOutput muDecayPolY off
#/musr/command rootOutput muDecayPolZ off
#/musr/command rootOutput muTargetTime off
#/musr/command rootOutput muTargetPolX off
#/musr/command rootOutput muTargetPolY off
#/musr/command rootOutput muTargetPolZ off
#/musr/command rootOutput muM0Time off
#/musr/command rootOutput muM0PolX off
#/musr/command rootOutput muM0PolY off
#/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
#/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
/musr/command storeOnlyEventsWithHits false
################################################################################################################
# -- Setting PARTICLE GUN parameters --
################################################################################################################
# Default momentum direction: 001, i.e. 0z.
# Default muon soin 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 -1144 mm, acceleration starts at -1154.15 mm
#/gun/vertex 0. 0. -2119.5 mm
/gun/vertex 499 0. -1678.0 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 6.83 6.83 0 mm
/gun/vertexsigma -15 -15 0 mm
#/gun/boxboundarycentre 499 0 -1678 mm
#/gun/boxboundary 15 15 1 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
# Set muon energy before hitting TD; a constant field in front of the C-foil accelerates the muons
# to add 3.38 keV
/gun/kenergy 15.0 eV
# Set beam momentum direction
/gun/direction -1.0 0.0 0.0
# Set muon spin direction: +10deg or 0
/gun/muonPolarizVector 0.9848 0 0.17365
#/gun/muonPolarizVector 1 0 0
# Other useful test parameters:
#------------------Oct.20 2015------------------------------------
# kenergy= 15 eV Pmu= 0.xxxMeV/c ==> sigma = /2.354 = MeV/c
#/gun/momentumsmearing 0.07508 MeV
/gun/momentumsmearing 0.016 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#*/gun/momentumboundary 20 40 0 MeV
#---/gun/tilt: xangle, yangle, dummy
#*/gun/tilt 0 0.0 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.0 deg
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#*/gun/decaytimelimits 10400 10420 2197.03 ns
#/gun/tiltsigma 1.4 1.4 0 deg
/gun/tiltsigma 0 0 -1.0 deg
# Selectively inactivate or activate sensitive detectors
#*/hits/inactivate /musr/ScintSD
# Only for code debugging!
/tracking/verbose 0
# BEAM ON
#/run/beamOn 1000000
#/run/beamOn 10
/run/beamOn 10000

View File

@@ -0,0 +1,950 @@
# Template suitable for beam profile detectioon with the spin rotator in place
# Zaher Salman 7/10/2010
#
# Thomas Prokscha 22/Nov/2012
# Moved sample stack on cryostat 3mm downstream to fit to positions in apparatus
# Changed positions of positron counters according to corrected drawing LEM 37.01.024 (19/Sep/2012)
#
# Position downstream detectors: z=+62.5mm original value: z=+66.5mm
# Position upstream detectors: z=-64.0mm original value: z=-60.0mm
#
# 2013 setup: 1mm Ti sample tube
#
# 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
#
# Ran Xiao 25/Sep/2014
# Start muons at moderator at x=499, assume cosA angular distribution, assume energy distribution
#
################################################################################################################
# -- ROTATION MATRICES --
################################################################################################################
# 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
/musr/command rotation rotRAnL 0 0 1 90
/musr/command rotation rotRAnD 0 0 1 180
# More Rotations
/musr/command rotation rotD1 0 0 1 11.250
/musr/command rotation rotD2 0 0 1 33.750
/musr/command rotation rotD3 0 0 1 56.250
/musr/command rotation rotD4 0 0 1 78.750
/musr/command rotation rotD5 0 0 1 101.250
/musr/command rotation rotD6 0 0 1 123.750
/musr/command rotation rotD7 0 0 1 146.250
/musr/command rotation rotD8 0 0 1 168.750
/musr/command rotation rotD9 0 0 1 191.250
/musr/command rotation rotD10 0 0 1 213.750
/musr/command rotation rotD11 0 0 1 236.250
/musr/command rotation rotD12 0 0 1 258.750
/musr/command rotation rotD13 0 0 1 281.250
/musr/command rotation rotD14 0 0 1 303.750
/musr/command rotation rotD15 0 0 1 326.250
/musr/command rotation rotD16 0 0 1 348.750
/musr/command rotation rotD17 0 0 1 11.250
/musr/command rotation rotD18 0 0 1 33.750
/musr/command rotation rotD19 0 0 1 56.250
/musr/command rotation rotD20 0 0 1 78.750
/musr/command rotation rotD21 0 0 1 101.250
/musr/command rotation rotD22 0 0 1 123.750
/musr/command rotation rotD23 0 0 1 146.250
/musr/command rotation rotD24 0 0 1 168.750
/musr/command rotation rotD25 0 0 1 191.250
/musr/command rotation rotD26 0 0 1 213.750
/musr/command rotation rotD27 0 0 1 236.250
/musr/command rotation rotD28 0 0 1 258.750
/musr/command rotation rotD29 0 0 1 281.250
/musr/command rotation rotD30 0 0 1 303.750
/musr/command rotation rotD31 0 0 1 326.250
/musr/command rotation rotD32 0 0 1 348.750
# Beam line bend at mirror
/musr/command rotation rotBend 0 1 0 -90
/musr/command rotation rotMirr 0 1 0 -45
/musr/command rotation rotMod 0 1 0 0
################################################################################################################
# -- LEM GEOMETRY --
################################################################################################################
# WORLD = Laboratory reference frame, the origin is in the centre of the LEM sample tube
/musr/command construct box World 900 350 2600 G4_Galactic 0 0 0 no_logical_volume norot dead -1
/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 60 0.05 0 360 G4_Galactic 850 0 -1678 log_World rotBend dead 851
/musr/command construct tubs save1 0 60 0.05 0 360 G4_Galactic 800 0 -1678 log_World rotBend dead 852
/musr/command construct tubs save2 0 60 0.05 0 360 G4_Galactic 750 0 -1678 log_World rotBend dead 853
/musr/command construct tubs save3 0 60 0.05 0 360 G4_Galactic 700 0 -1678 log_World rotBend dead 854
/musr/command construct tubs save4 0 60 0.05 0 360 G4_Galactic 650 0 -1678 log_World rotBend dead 855
/musr/command construct tubs save5 0 60 0.05 0 360 G4_Galactic 600 0 -1678 log_World rotBend dead 856
/musr/command construct tubs save6 0 60 0.05 0 360 G4_Galactic 550 0 -1678 log_World rotBend dead 857
/musr/command construct tubs save7 0 60 0.05 0 360 G4_Galactic 500 0 -1678 log_World rotBend dead 858
/musr/command construct tubs save8 0 60 0.05 0 360 G4_Galactic 450 0 -1678 log_World rotBend dead 859
/musr/command construct tubs save9 0 60 0.05 0 360 G4_Galactic 400 0 -1678 log_World rotBend dead 860
/musr/command construct tubs save10 0 60 0.05 0 360 G4_Galactic 350 0 -1678 log_World rotBend dead 861
/musr/command construct tubs save11 0 60 0.05 0 360 G4_Galactic 300 0 -1678 log_World rotBend dead 862
/musr/command construct tubs save12 0 60 0.05 0 360 G4_Galactic 240 0 -1678 log_World rotBend dead 863
/musr/command construct tubs save13 0 60 0.05 0 360 G4_Galactic 200 0 -1678 log_World rotBend dead 864
/musr/command construct tubs save14 0 60 0.05 0 360 G4_Galactic 150 0 -1678 log_World rotBend dead 865
/musr/command construct tubs save15 0 60 0.05 0 360 G4_Galactic 100 0 -1678 log_World rotBend dead 866
/musr/command construct tubs save16 0 60 0.05 0 360 G4_Galactic 70 0 -1678 log_World rotBend dead 867
/musr/command construct tubs save17 0 60 0.05 0 360 G4_Galactic 0 0 -1620 log_World norot dead 868
/musr/command construct tubs save18 0 60 0.05 0 360 G4_Galactic 0 0 -1600 log_World norot dead 869
/musr/command construct tubs save19 0 60 0.05 0 360 G4_Galactic 0 0 -1550 log_World norot dead 870
/musr/command construct tubs save20 0 60 0.05 0 360 G4_Galactic 0 0 -1500 log_World norot dead 871
/musr/command construct tubs save21 0 60 0.05 0 360 G4_Galactic 0 0 -1450 log_World norot dead 872
/musr/command construct tubs save22 0 60 0.05 0 360 G4_Galactic 0 0 -1400 log_World norot dead 873
/musr/command construct tubs save23 0 60 0.05 0 360 G4_Galactic 0 0 -1350 log_World norot dead 874
/musr/command construct tubs save24 0 60 0.05 0 360 G4_Galactic 0 0 -1300 log_World norot dead 875
/musr/command construct tubs save25 0 60 0.05 0 360 G4_Galactic 0 0 -1250 log_World norot dead 876
/musr/command construct tubs save26 0 60 0.05 0 360 G4_Galactic 0 0 -1200 log_World norot dead 877
/musr/command construct tubs save27 0 60 0.05 0 360 G4_Galactic 0 0 -1150 log_World norot dead 878
/musr/command construct tubs save28 0 60 0.05 0 360 G4_Galactic 0 0 -1100 log_World norot dead 879
/musr/command construct tubs save29 0 60 0.05 0 360 G4_Galactic 0 0 -1050 log_World norot dead 880
/musr/command construct tubs save30 0 60 0.05 0 360 G4_Galactic 0 0 -1000 log_World norot dead 881
/musr/command construct tubs save31 0 60 0.05 0 360 G4_Galactic 0 0 -950 log_World norot dead 882
/musr/command construct tubs save32 0 60 0.05 0 360 G4_Galactic 0 0 -900 log_World norot dead 883
/musr/command construct tubs save33 0 60 0.05 0 360 G4_Galactic 0 0 -850 log_World norot dead 884
/musr/command construct tubs save34 0 60 0.05 0 360 G4_Galactic 0 0 -800 log_World norot dead 885
/musr/command construct tubs save35 0 60 0.05 0 360 G4_Galactic 0 0 -750 log_World norot dead 886
/musr/command construct tubs save36 0 60 0.05 0 360 G4_Galactic 0 0 -700 log_World norot dead 887
/musr/command construct tubs save37 0 60 0.05 0 360 G4_Galactic 0 0 -650 log_World norot dead 888
/musr/command construct tubs save38 0 60 0.05 0 360 G4_Galactic 0 0 -600 log_World norot dead 889
/musr/command construct tubs save39 0 60 0.05 0 360 G4_Galactic 0 0 -525 log_World norot dead 890
/musr/command construct tubs save40 0 60 0.05 0 360 G4_Galactic 0 0 -450 log_World norot dead 891
/musr/command construct tubs save41 0 60 0.05 0 360 G4_Galactic 0 0 -420 log_World norot dead 892
/musr/command construct tubs save42 0 60 0.05 0 360 G4_Galactic 0 0 -400 log_World norot dead 893
/musr/command construct tubs save43 0 60 0.05 0 360 G4_Galactic 0 0 -350 log_World norot dead 894
/musr/command construct tubs save44 0 60 0.05 0 360 G4_Galactic 0 0 -300 log_World norot dead 895
/musr/command construct tubs save45 0 60 0.05 0 360 G4_Galactic 0 0 -250 log_World norot dead 896
/musr/command construct tubs save46 0 60 0.05 0 360 G4_Galactic 0 0 -200 log_World norot dead 897
/musr/command construct tubs save47 0 60 0.05 0 360 G4_Galactic 0 0 -150 log_World norot dead 898
/musr/command construct tubs save48 0 60 0.05 0 360 G4_Galactic 0 0 -100 log_World norot dead 899
/musr/command construct tubs save49 0 60 0.05 0 360 G4_Galactic 0 0 -50 log_World norot dead 900
/musr/command construct tubs save50 0 60 0.05 0 360 G4_Galactic 0 0 0 log_World norot dead 901
/musr/command construct tubs save51 0 60 0.05 0 360 G4_Galactic 0 0 16 log_World norot dead 902
/musr/command construct tubs save52 0 60 0.05 0 360 G4_Galactic 0 0 100 log_World norot dead 903
/musr/command construct tubs save53 0 60 0.05 0 360 G4_Galactic 0 0 150 log_World norot dead 904
/musr/command visattributes G4_Galactic invisible
################################################################################################################
# -- APD Scintillators --
################################################################################################################
# Detectors volume (0,0,0) coninsides with World (0,0,0)
/musr/command construct tubs DetV 80 105 133 0 360 G4_Galactic 0 0 0 log_World norot dead 100
/musr/command visattributes log_DetV invisible
# For final design set
# BackHW=60
# BackCR=-64.0, 19/Sep/2012
# ForwHW=65.5
# ForwCR=62.5, 19/Sep/2012
# Back inner sections (Upstream) (v.i.)
# Final design (30 Jun 09, 19 Sep 12) BackHW=60.0mm (Half width or length), BackCR=-4-BackHW=-64.0mm (Center z coordinate)
/musr/command construct trd90y ScD1 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 -17.265493 -64.0 log_DetV rotD1 musr/ScintSD 1
/musr/command construct trd90y ScD2 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 -49.167966 -64.0 log_DetV rotD2 musr/ScintSD 2
/musr/command construct trd90y ScD3 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 -73.585061 -64.0 log_DetV rotD3 musr/ScintSD 3
/musr/command construct trd90y ScD4 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 -86.799497 -64.0 log_DetV rotD4 musr/ScintSD 4
/musr/command construct trd90y ScD5 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 -86.799497 -64.0 log_DetV rotD5 musr/ScintSD 5
/musr/command construct trd90y ScD6 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 -73.585061 -64.0 log_DetV rotD6 musr/ScintSD 6
/musr/command construct trd90y ScD7 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 -49.167966 -64.0 log_DetV rotD7 musr/ScintSD 7
/musr/command construct trd90y ScD8 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 -17.265493 -64.0 log_DetV rotD8 musr/ScintSD 8
/musr/command construct trd90y ScD9 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 17.265493 -64.0 log_DetV rotD9 musr/ScintSD 9
/musr/command construct trd90y ScD10 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 49.167966 -64.0 log_DetV rotD10 musr/ScintSD 10
/musr/command construct trd90y ScD11 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 73.585061 -64.0 log_DetV rotD11 musr/ScintSD 11
/musr/command construct trd90y ScD12 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 86.799497 -64.0 log_DetV rotD12 musr/ScintSD 12
/musr/command construct trd90y ScD13 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 86.799497 -64.0 log_DetV rotD13 musr/ScintSD 13
/musr/command construct trd90y ScD14 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 73.585061 -64.0 log_DetV rotD14 musr/ScintSD 14
/musr/command construct trd90y ScD15 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 49.167966 -64.0 log_DetV rotD15 musr/ScintSD 15
/musr/command construct trd90y ScD16 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 17.265493 -64.0 log_DetV rotD16 musr/ScintSD 16
# Forward inner sections (Downstream) (h.i.)
# Final design (30 June 09, 19 Sep 12) ForwHW=65.5mm (Half width or length), ForwCR=-3+ForwHW=62.5mm (Center z coordinate)
/musr/command construct trd90y ScD17 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 -17.070403 62.5 log_DetV rotD17 musr/ScintSD 17
/musr/command construct trd90y ScD18 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 -48.612395 62.5 log_DetV rotD18 musr/ScintSD 18
/musr/command construct trd90y ScD19 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 -72.753591 62.5 log_DetV rotD19 musr/ScintSD 19
/musr/command construct trd90y ScD20 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 -85.818712 62.5 log_DetV rotD20 musr/ScintSD 20
/musr/command construct trd90y ScD21 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 -85.818712 62.5 log_DetV rotD21 musr/ScintSD 21
/musr/command construct trd90y ScD22 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 -72.753591 62.5 log_DetV rotD22 musr/ScintSD 22
/musr/command construct trd90y ScD23 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 -48.612395 62.5 log_DetV rotD23 musr/ScintSD 23
/musr/command construct trd90y ScD24 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 -17.070403 62.5 log_DetV rotD24 musr/ScintSD 24
/musr/command construct trd90y ScD25 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 17.070403 62.5 log_DetV rotD25 musr/ScintSD 25
/musr/command construct trd90y ScD26 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 48.612395 62.5 log_DetV rotD26 musr/ScintSD 26
/musr/command construct trd90y ScD27 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 72.753591 62.5 log_DetV rotD27 musr/ScintSD 27
/musr/command construct trd90y ScD28 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 85.818712 62.5 log_DetV rotD28 musr/ScintSD 28
/musr/command construct trd90y ScD29 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 85.818712 62.5 log_DetV rotD29 musr/ScintSD 29
/musr/command construct trd90y ScD30 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 72.753591 62.5 log_DetV rotD30 musr/ScintSD 30
/musr/command construct trd90y ScD31 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 48.612395 62.5 log_DetV rotD31 musr/ScintSD 31
/musr/command construct trd90y ScD32 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 17.070403 62.5 log_DetV rotD32 musr/ScintSD 32
# Back outer sections (v.a.)
/musr/command construct trd ScD33 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 -18.631126 -64.0 log_DetV rotD1 musr/ScintSD 33
/musr/command construct trd ScD34 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 -53.056957 -64.0 log_DetV rotD2 musr/ScintSD 34
/musr/command construct trd ScD35 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 -79.405348 -64.0 log_DetV rotD3 musr/ScintSD 35
/musr/command construct trd ScD36 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 -93.664994 -64.0 log_DetV rotD4 musr/ScintSD 36
/musr/command construct trd ScD37 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 -93.664994 -64.0 log_DetV rotD5 musr/ScintSD 37
/musr/command construct trd ScD38 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 -79.405348 -64.0 log_DetV rotD6 musr/ScintSD 38
/musr/command construct trd ScD39 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 -53.056957 -64.0 log_DetV rotD7 musr/ScintSD 39
/musr/command construct trd ScD40 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 -18.631126 -64.0 log_DetV rotD8 musr/ScintSD 40
/musr/command construct trd ScD41 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 18.631126 -64.0 log_DetV rotD9 musr/ScintSD 41
/musr/command construct trd ScD42 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 53.056957 -64.0 log_DetV rotD10 musr/ScintSD 42
/musr/command construct trd ScD43 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 79.405348 -64.0 log_DetV rotD11 musr/ScintSD 43
/musr/command construct trd ScD44 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 93.664994 -64.0 log_DetV rotD12 musr/ScintSD 44
/musr/command construct trd ScD45 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 93.664994 -64.0 log_DetV rotD13 musr/ScintSD 45
/musr/command construct trd ScD46 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 79.405348 -64.0 log_DetV rotD14 musr/ScintSD 46
/musr/command construct trd ScD47 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 53.056957 -64.0 log_DetV rotD15 musr/ScintSD 47
/musr/command construct trd ScD48 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 18.631126 -64.0 log_DetV rotD16 musr/ScintSD 48
# Forward outer sections (h.a.)
/musr/command construct trd ScD49 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 -18.436035 62.5 log_DetV rotD1 musr/ScintSD 49
/musr/command construct trd ScD50 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 -52.501387 62.5 log_DetV rotD2 musr/ScintSD 50
/musr/command construct trd ScD51 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 -78.573878 62.5 log_DetV rotD3 musr/ScintSD 51
/musr/command construct trd ScD52 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 -92.684209 62.5 log_DetV rotD4 musr/ScintSD 52
/musr/command construct trd ScD53 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 -92.684209 62.5 log_DetV rotD5 musr/ScintSD 53
/musr/command construct trd ScD54 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 -78.573878 62.5 log_DetV rotD6 musr/ScintSD 54
/musr/command construct trd ScD55 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 -52.501387 62.5 log_DetV rotD7 musr/ScintSD 55
/musr/command construct trd ScD56 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 -18.436035 62.5 log_DetV rotD8 musr/ScintSD 56
/musr/command construct trd ScD57 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 18.436035 62.5 log_DetV rotD9 musr/ScintSD 57
/musr/command construct trd ScD58 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 52.501387 62.5 log_DetV rotD10 musr/ScintSD 58
/musr/command construct trd ScD59 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 78.573878 62.5 log_DetV rotD11 musr/ScintSD 59
/musr/command construct trd ScD60 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 92.684209 62.5 log_DetV rotD12 musr/ScintSD 60
/musr/command construct trd ScD61 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 92.684209 62.5 log_DetV rotD13 musr/ScintSD 61
/musr/command construct trd ScD62 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 78.573878 62.5 log_DetV rotD14 musr/ScintSD 62
/musr/command construct trd ScD63 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 52.501387 62.5 log_DetV rotD15 musr/ScintSD 63
/musr/command construct trd ScD64 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 18.436035 62.5 log_DetV rotD16 musr/ScintSD 64
# Structural support inside the detectors vessel
# Carbon fibre, inner radius 80, thickness 2 mm.
# Additional Al plate removed, 2 mm thick for h.i and h.a and 3 mm thick for v.i. and v.a
/musr/command construct tubs hInShell 80.0 82.0 65.5 0 360 G4_C 0 0 62 log_DetV norot dead 70
/musr/command construct tubs vInShell 80.0 82.0 60.0 0 360 G4_C 0 0 -64.5 log_DetV norot dead 70
# Visual attributes (optional)
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE green
#/musr/command visattributes log_ScD49 green
#/musr/command visattributes log_ScD50 green
#/musr/command visattributes log_test red
################################################################################################################
# Sample vacuum/tube up to gate valve - Can host either the Cryostat or the MCP2
################################################################################################################
# Vacuum space
# /musr/command construct tubs SamV 0 75.0 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100
# Sample tube
#/musr/command construct tubs SamS 75.0 77.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# 2012: 2mm Ti tube, 2013: 1mm
/musr/command construct tubs SamS 75.0 76.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# F160 - 160 CF flange upstream of MCP2 tube
/musr/command construct tubs F160 78.0 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 102
# F100 (Blank end flange)
/musr/command construct tubs F100 0 75.0 10 0 360 Steel 0 0 172.0 log_World norot dead 103
# 200 CF flange upstream of MCP2 tube covering the whole length of the gate valve chamber.
/musr/command construct tubs GATS 103.25 126.5 92.5 0 360 Steel 0 0 -254.5 log_World norot dead 371
# F200 - 200 CF flange upstream of MCP2 tube to connect to gate valve chamber
/musr/command construct tubs F200 76.5 103.25 12 0 360 Steel 0 0 -174.0 log_World norot dead 372
# Visual attributes (optional)
#/musr/command visattributes log_SamV invisible
/musr/command visattributes log_SamS oxsteel
/musr/command visattributes log_F160 oxsteel
#/musr/command visattributes log_F100 oxsteel
/musr/command visattributes log_GATS oxsteel
/musr/command visattributes log_F200 oxsteel
################################################################################################################
# MCP - Micro Channel Plate Detector MCP2
# mcpv_z = -92.5 mm!
#
# We have a 324 mm long sample tube;
# the MCP2 front side is at 142 mm from the end of the sample tube.
# the front face of the sample plate of the cryostat is 145 mm from the end of the sample tube.
#
################################################################################################################
#
# MCPM1 - MCP Macor ring 1
# MCPD - electron multiplying glass disk (also known as target)
# Sensitive surface at z = 20 mm wrt. World
# MCPM2 - MCP Macor ring 2
# /musr/command construct tubs MCPM1 24 32.5 0.75 0 360 Macor 0 0 19.25 log_World norot dead 251
# Use it either as (DMCP-musr/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz.
# /musr/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 21.5 log_World norot dead 252
# /musr/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 23.75 log_World norot dead 253
# NOTE: To intercept ALL the incoming muons, comment the DMCP and MCPM1 lines above and uncomment this one:
#*aa/musr/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs target 0 21.0 1.5 0 360 MCPglass 0 0 114 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs saveTarget 0 75.0 0.2 0 360 G4_Galactic 0 0 110.79 log_SamV norot dead 222
#
# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole)
# MCVR - "Vacuum Ring" (circular hole)
# /musr/command construct box MCSR 36.5 36.5 1 Steel 0 0 25.5 log_World norot dead 254
# /musr/command construct tubs MCVR 0 27.5 1 0 360 G4_Galactic 0 0 0 log_MCSR norot dead 255
# 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
# /musr/command construct box MCPA 36.5 36.5 4 Steel 0 0 37 log_World norot dead 256
# /musr/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 257
# /musr/command construct tubs ANVA2 0 27.5 1.5 0 360 G4_Galactic 0 0 2.5 log_MCPA norot dead 258
# MCSS - MCP Stainless Steel Support Ring
# /musr/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 69.8 log_World norot dead 259
# MCP2 visual attributes (optional)
#/musr/command visattributes log_DMCP MCP_style
#*/musr/command visattributes log_target MCP_style
#*/musr/command visattributes log_MCPM1 MACOR_style
#*------ /musr/command visattributes log_MCPM2 MACOR_style
################################################################################################################
# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm)
#
# sample plate front face is at z = 17mm:
# cold finger distance to CF100: 130mm
# 5mm base plate + 6mm sapphire + 4mm sample plate = 15mm
# sample plate front face from CF100: 145mm
# z-position of sample plate front face: 324/2-145mm = 17mm
# --> sample plate center is at 17+2=19mm
#
################################################################################################################
# Dimensions for large/small sample plates SamPL=35/21 and SaphPL=SamPL35-5
/musr/command construct tubs target 0 35 2 0 360 G4_Al 0 0 19.0 log_World norot dead 251
/musr/command construct tubs SAPH 0 30 3 0 360 G4_ALUMINUM_OXIDE 0 0 24.0 log_World norot dead 252
/musr/command construct tubs SAH1 0 35 2.5 0 360 G4_Al 0 0 29.5 log_World norot dead 253
# Special save target volume
/musr/command construct tubs saveTarget 0 40 0.05 0 360 G4_Galactic 0 0 16.9 log_World norot dead 253
# Other components of the cryostat (dimensions and position of CRY4 are only approx. because unknown)
# COld Finger
/musr/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 37.0 log_World norot dead 261
# End plate of cryostat (7 mm thick, 30 mm diameter)
/musr/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 45.5 log_World norot dead 262
# Heat exchanger (assuming a 10 mm opening - Original dimensions not known.) # OLD pos. 160.0
/musr/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 74.0 log_World norot dead 263
# Mounting ring for He-shield
/musr/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 54.0 log_World norot dead 264
# 2 mm thick plate for mounting ring. This is just to close the downstream side.
/musr/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 54.0 log_World norot dead 265
# Radiation shield
/musr/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 19.0 log_World norot dead 266
# Front part of the radiation shield
/musr/command construct tubs CRSH2 30 48 0.5 0 360 G4_Cu 0 0 -26.5 log_World norot dead 267
# Electrical Field Guard Rings (distance between the guard rings: 16 mm)
# /musr/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 -13.5 log_World norot dead 271
# /musr/command construct tubs Guard2 29 38 1.5 0 360 G4_Cu 0 0 2.5 log_World norot dead 272
# Cryostat visual attributes (optional)
/musr/command visattributes log_SAH1 oxsteel
#/musr/command visattributes log_SAH2 oxsteel
/musr/command visattributes log_target oxsteel
/musr/command visattributes log_SAPH MACOR_style
#/musr/command visattributes log_SAH3 oxsteel
/musr/command visattributes log_CRSH yellow
/musr/command visattributes log_CRSH2 yellow
#/musr/command visattributes log_test red
################################################################################################################
# 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
/musr/command construct cons RA_EU 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World norot dead 801
/musr/command construct cons RA_MU 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World norot dead 802
/musr/command construct cons RA_ER 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnR dead 803
/musr/command construct cons RA_MR 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnR dead 804
/musr/command construct cons RA_ED 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnD dead 805
/musr/command construct cons RA_MD 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnD dead 806
/musr/command construct cons RA_EL 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnL dead 807
/musr/command construct cons RA_ML 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnL dead 808
# 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_T 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 822
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.02 log_World rotRAnR dead 824
/musr/command construct tubs RA_B 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 826
/musr/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.06 log_World rotRAnL dead 828
# 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 831
# Ring Anodes visual attributes (optional)
/musr/command visattributes log_RA_G invisible
#/musr/command visattributes log_RA_G Grid_style
################################################################################################################
# Trigger - Trigger Detector # Triggerz = -1092 mm; total length of TD is 110 mm; carbon foil at -1144 mm.
################################################################################################################
# Trigger volume
/musr/command construct tubs TrigV 90 127 148 0 360 G4_Galactic 0 0 -495 log_World norot dead 600
# Trigger tube
/musr/command construct tubs TrigS 100 103 148 0 360 Steel 0 0 0 log_TrigV norot dead 601
# TF - Trigger tube flanges
/musr/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 136 log_TrigV norot dead 611
/musr/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -136 log_TrigV norot dead 612
# trigger foil is 52-55mm upstream of TrigV center
# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm).
# USE THE NAME CFoil or coulombCFoil, otherwise musrMuFormation won't work!
#/musr/command construct box CFoil 60 60 0.0000025 G4_GRAPHITE 0 0 -550 log_World norot dead 621
/musr/command construct box CFoil 60 60 0.000002 G4_GRAPHITE 0 0 -550 log_World norot dead 621
# 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 musrDetectorConstruction.cc and set any density.
# Trigger visual attributes (optional)
/musr/command visattributes log_TrigV oxsteel
/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_saveAfterTD darkred
# Trigger Lens, L3, center -382 length 70mm radius 65mm.
/musr/command construct tubs TL3S 65.0 70.0 35.0 0 360 G4_Galactic 0 0 -382 log_World norot dead 706 nofield
/musr/command visattributes log_TL3S red
# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL.
# E.g. /musr/command visattributes Steel red
################################################################################################################
# L2 - 2nd Einzel Lens # L3z = -56.7 cm. (it was "L3" in 2011 and before)
# Lens Gap = 12.0 mm => G/D = 12/130 ~ 0.1 (Lens Gap = gap between Ground and Anode, D - Diameter)
################################################################################################################
# L3 volume
/musr/command construct tubs L3V 65 127 220 0 360 G4_Galactic 0 0 -863 log_World norot dead 400
# Lens 3 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 720 mm)
/musr/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 0 log_L3V norot dead 401
# Lens 3 Flange 1, z = L3z + 208 mm
/musr/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -208 log_L3V norot dead 402
# Lens 3 Flange 2, z = L3z - 208 mm
/musr/command construct tubs L3F2 103 126.5 12 0 360 Steel 0 0 208 log_L3V norot dead 403
# GPn - Ground Potential Electrodes
# n = 1-4 (further from TD) and 5-8 (closer to TD) - components of the Ground Electrodes
# Ground Electrode (inner dia: 130 mm, outer dia: 134 mm, length: 133 mm)
/musr/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 421
# Outer electrode surface (LN2 cooling vessel)
/musr/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 422
# First ring cap
/musr/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3V norot dead 423
# Second ring cap
/musr/command construct tubs L3GP4 67 81 4 0 360 Steel 0 0 71.0 log_L3V norot dead 424
/musr/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 431
/musr/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 432
/musr/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3V norot dead 433
/musr/command construct tubs L3GP8 67 81 4 0 360 Steel 0 0 -71.0 log_L3V norot dead 434
# HP - High Potential Electrode (Central Anode - usually at +8.7 kV, for a 15 keV muon beam)
/musr/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3V norot dead 451
# Lens 3 visual attributes (optional)
/musr/command visattributes log_L3V invisible
/musr/command visattributes log_L3ST oxsteel
/musr/command visattributes log_L3F1 oxsteel
/musr/command visattributes log_L3F2 oxsteel
/musr/command visattributes log_L3HP darkred
################################################################################################################
# -- SPIN ROTATOR GEOMETRY --
################################################################################################################
# Spin Rotator volume
/musr/command construct tubs SRENV 50 320 201.5 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 100
/musr/command visattributes log_SRENV invisible
# Electromagnet with iron yoke
# U - up, D - down, L - left, R - right (with respect to muon's view - momentum direction)
/musr/command construct box NPole 200 10 150 G4_Fe 0 85 0 log_SRENV norot dead 201
/musr/command construct box NYoke 150 22.5 50 G4_Fe 0 117.5 0 log_SRENV norot dead 202
/musr/command construct box NConn 225 17.5 190.0 G4_Fe 0 157.5 0 log_SRENV norot dead 203
/musr/command construct box SPole 200 10 150 G4_Fe 0 -85 0 log_SRENV norot dead 205
/musr/command construct box SYoke 150 22.5 50 G4_Fe 0 -117.5 0 log_SRENV norot dead 206
/musr/command construct box SConn 225 17.5 190.0 G4_Fe 0 -157.5 0 log_SRENV norot dead 207
# Front mirror plate
/musr/command construct box FShU 225 50 5 G4_Fe 0 125 -195.0 log_SRENV norot dead 301
/musr/command construct box FShD 225 50 5 G4_Fe 0 -125 -195.0 log_SRENV norot dead 302
/musr/command construct box FShL 75 75 5 G4_Fe 150 0 -195.0 log_SRENV norot dead 303
/musr/command construct box FShR 75 75 5 G4_Fe -150 0 -195.0 log_SRENV norot dead 304
# Back mirror plate
/musr/command construct box BShU 225 50 5 G4_Fe 0 125 195.0 log_SRENV norot dead 321
/musr/command construct box BShD 225 50 5 G4_Fe 0 -125 195.0 log_SRENV norot dead 322
/musr/command construct box BShL 75 75 5 G4_Fe 150 0 195.0 log_SRENV norot dead 323
/musr/command construct box BShR 75 75 5 G4_Fe -150 0 195.0 log_SRENV norot dead 324
# Top coils
/musr/command construct box TCoil1 170 22.5 10 G4_Cu 0 117.5 -60 log_SRENV norot dead 401
/musr/command construct box TCoil2 170 22.5 10 G4_Cu 0 117.5 60 log_SRENV norot dead 402
/musr/command construct box TCoil3 10 22.5 50 G4_Cu 160 117.5 0 log_SRENV norot dead 403
/musr/command construct box TCoil4 10 22.5 50 G4_Cu -160 117.5 0 log_SRENV norot dead 404
# Bottom coils
/musr/command construct box BCoil1 170 22.5 10 G4_Cu 0 -117.5 -60 log_SRENV norot dead 421
/musr/command construct box BCoil2 170 22.5 10 G4_Cu 0 -117.5 60 log_SRENV norot dead 422
/musr/command construct box BCoil3 10 22.5 50 G4_Cu 160 -117.5 0 log_SRENV norot dead 423
/musr/command construct box BCoil4 10 22.5 50 G4_Cu -160 -117.5 0 log_SRENV norot dead 424
# Capacitor
/musr/command construct box Cap_p 0.5 50 150 Brass 55 0 0 log_SRENV norot dead 501
/musr/command construct box Cap_n 0.5 50 150 Brass -55 0 0 log_SRENV norot dead 502
#*/musr/command construct box Uniform 49 49 150 G4_Galactic 0 0 0 log_SRENV norot dead 503
/musr/command construct tubs RodCapUp 0 5 150 90 180 Brass 55 55 0 log_SRENV norot dead 504
/musr/command construct tubs RodCapUn 0 5 150 -90 180 Brass -55 55 0 log_SRENV norot dead 505
/musr/command construct tubs RodCapDp 0 5 150 90 180 Brass 55 -55 0 log_SRENV norot dead 506
/musr/command construct tubs RodCapDn 0 5 150 -90 180 Brass -55 -55 0 log_SRENV norot dead 507
# Rods
/musr/command construct tubs RodPosU 0 5 150 0 360 Brass 27.5 55 0 log_SRENV norot dead 511
/musr/command construct tubs Rod0U 0 5 150 0 360 Brass 0 55 0 log_SRENV norot dead 512
/musr/command construct tubs RodNegU 0 5 150 0 360 Brass -27.5 55 0 log_SRENV norot dead 513
/musr/command construct tubs RodPosD 0 5 150 0 360 Brass 27.5 -55 0 log_SRENV norot dead 514
/musr/command construct tubs Rod0D 0 5 150 0 360 Brass 0 -55 0 log_SRENV norot dead 515
/musr/command construct tubs RodNegD 0 5 150 0 360 Brass -27.5 -55 0 log_SRENV norot dead 516
# Vacuum vessel
/musr/command construct box TVac1 72.5 2.5 191.5 Steel 0 72.5 0 log_SRENV norot dead 601
/musr/command construct box TVac2 2.5 70.0 191.5 Steel 72.5 0 0 log_SRENV norot dead 602
/musr/command construct box TVac3 72.5 2.5 191.5 Steel 0 -72.5 0 log_SRENV norot dead 603
/musr/command construct box TVac4 2.5 70.0 191.5 Steel -72.5 0 0 log_SRENV norot dead 604
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For Spin Rotator
/musr/command construct tubs SREField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 630 nofield
/musr/command construct tubs SRBField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.51 log_World norot dead 631 nofield
/musr/command visattributes G4_Cu red
/musr/command visattributes G4_Fe blue
/musr/command visattributes Brass yellow
################################################################################################################
# Lens 1 - 1st Einzel Lens
################################################################################################################
# L1ENV - Lens 1 envelope - for easy positioning of lens parts (outer dia: 100 mm, length: 300 mm)
#/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 0 0 -1929.5 log_World norot dead 600
/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend 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
# n = 2 - Ground Electrode 2 (closer to SR).
/musr/command construct tubs L1GP2 40 44 50 0 360 Steel 0 0 100 log_L1ENV norot dead 653
# HP - High Potential Electrode (Central Anode - usually at +8.5 kV, for a 15 keV muon beam)
/musr/command construct tubs L1HP 40 44 40 0 360 Steel 0 0 0 log_L1ENV norot dead 652
# Lens 1 visual attributes (optional)
/musr/command visattributes log_L1HP darkred
################################################################################################################
# Electrostatic field at accelerator after moderator
################################################################################################################
#
/musr/command construct box Grid1 9.1 25 25 G4_Galactic 489.9 0.0 -1678.0 log_World rotMod dead 212
/musr/command globalfield Grid1_field 9.1 25 25 uniform 489.9 0.0 -1678.0 log_Grid1 0 0 0 -0.2527 0 0
/musr/command construct box Grid2 5 24 24 G4_Galactic 475.8 0.0 -1678.0 log_World rotMod dead 214
/musr/command globalfield Grid2_field 5 24 24 uniform 475.8 0.0 -1678.0 log_Grid2 0 0 0 -1.04 0 0
/musr/command globalfield printFieldValueAtPoint 489.9 0.0 -1678.0
/musr/command globalfield printFieldValueAtPoint 475.8 0.0 -1678.0
################################################################################################################
# Electrostatic mirror at bend
################################################################################################################
# MRENV
/musr/command construct box MirrE 65 65 10 G4_Galactic 14.14213562 0.0 -1678.0 log_World rotMirr dead 200
/musr/command globalfield Mirr_field 65 65 10 uniform 14.14213562 0.0 -1678.0 log_MirrE 0 0 0 0 0 0.75
###################################################################################
################### E L E C T R O M G N E T I C F I E L D S ##################
###################################################################################
# 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!
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For L1
/musr/command construct tubs L1EField 0 0.01 0.005 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend dead 706 nofield
# For L2 (L3 before 2012)
/musr/command construct tubs L3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -863.0 log_World norot dead 708 nofield
# LENS 1. Best L1 settings: 7.2 kV for 12 keV muons
/musr/command globalfield Lens1EField 251.5 0.0 -1678.0 fromfile 2DE L1_Erz.map log_L1EField 9.0
# LENS 2. Best L3 settings: 8.4 kV for 12 keV muons
/musr/command globalfield Lens3EField 0. 0. -863.0 fromfile 2DE L3_Erz.map log_L3EField 10.5
# Spin rotator
# Electric field should be 370mm plates
# Magnetic field should be 260mm poles as measured srlem_ext.map
/musr/command globalfield Ele_field 0. 0. -1284.5 fromfile 3DE E_Sep_P37.5cm.map log_SREField 2.717
/musr/command globalfield Mag_field 0. 0. -1284.51 fromfile 3DB srlem_ext.map log_SRBField -0.00692
# 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
# 57.15mm upstream center
/musr/command construct box TriggE0 45 45 5 G4_Galactic 0 0 -555.1 log_World norot dead 630 nofield
# 48mm upstream center
/musr/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -543. log_World norot dead 631 nofield
# 2.25mm downstream center
/musr/command construct box TriggE2 45 45 4.9479 G4_Galactic 0 0 -492.75 log_World rotTrig dead 632 nofield
# 54mm downstream center
/musr/command construct box TriggE3 45 45 4 G4_Galactic 0 0 -441.0 log_World norot dead 633
### Electric field at TRIGGER Detector TD: Three different uniform fields, 2012 settings
/musr/command globalfield Trigg0_field 45 45 5 uniform 0. 0. -555.1 log_TriggE0 0 0 0 0 0 0.338
/musr/command globalfield Trigg1_field 45 45 4 uniform 0. 0. -543. log_TriggE1 0 0 0 0 0 -0.02375
/musr/command globalfield Trigg2_field 45 45 4.9497 uniform 0. 0. -492.75 log_TriggE2 0 0 0 0 0 0.041416
/musr/command globalfield Trigg3_field 45 45 4 uniform 0. 0. -441.0 log_TriggE3 0 0 0 0 0 -0.45
# Trigger Lens, L3, (available space from -437 to -347, we use 70mm of that)
/musr/command construct tubs TL3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -382.0 log_World norot dead 706 nofield
/musr/command globalfield ColRingEField 0. 0. -382.0 fromfile 2DE CR7cm_Grid.map log_TL3EField 12.0
### Electric field at RING ANODE - from 3DE field map
# To create an arbitrary configuration, switch on all fields and set different potentials.
/musr/command globalfield RngAnT_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_T 11.9
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 11.9
/musr/command globalfield RngAnB_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_B 11.9
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 11.9
### 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_convMap.map log_SBField 0.
### Electric field at the sample
/musr/command construct tubs SEField 0 0.01 0.005 0 360 G4_Galactic 0.0 0.0 15.9 log_World norot dead 710 nofield
/musr/command globalfield SampleEField 0. 0. 15.9 fromfile 2DE SamplePlate_2DE.map log_SEField 0.0
# Set parameters for particle tracking in an EM field
/musr/command globalfield setparameter SetLargestAcceptableStep 5
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
# TESTING EM FIELD
/musr/command globalfield printFieldValueAtPoint 0. 0. 0.
/musr/command globalfield printFieldValueAtPoint 0. 35. -670.
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.10
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
#/musr/command process addModel mu+ G4MuMultipleScattering G4WentzelVIModel 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ musrMuEnergyLossLandau -1 -1 1
# parameters for Landau energy loss distribution, LandauSigma corresponds to the width of the distibution
/musr/command SetLandauMPV 0.01
/musr/command SetLandauSigma 0.3
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#/musr/command process addDiscreteProcess mu+ G4CoulombScattering
#/musr/command process addProcess mu+ G4UserSpecialCuts -1 -1 3
#/musr/command process addProcess mu+ G4StepLimiter -1 -1 4
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
#/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
#/musr/command signalSeparationTime 0.1
#
/musr/run/randomOption 1
################################################################################################################
# -- Setting simulation PARAMETERS --
################################################################################################################
# Set the overall range cut (default 0.1 mm)
#*/run/setCut 1 mm
# Set the range cut on particular volumes (in mm)
#/musr/command SetUserLimits log_CFoil 1e-8 -1 -1 -1 -1
#*/musr/command SetUserLimits log_target 0.01
#*/musr/command SetUserLimits log_targetscint 0.01
#*/musr/command SetUserLimits log_cryostatscint 0.01
# Set particle energy cuts on particular volumes (in eV)
#/musr/command SetUserLimits log_World ustepMax(mm) utrakMax(mm) utimeMax(ns) uekinMin(MeV) urangMin(mm)
#/musr/command SetUserLimits log_World -1 -1 -1 1e-7 -1
# Geant4 10.2
#------------
/process/em/lowestMuHadEnergy 1e-6 MeV
# Store ALL the events in a ROOT tree or just the interesting ones? (default is true)
#*/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
# Override runID number
#*/musr/run/runID 21
# Set the frequency of event printing
/musr/run/howOftenToPrintEvent 100
# 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
/musr/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
#*/control/execute visdawn.mac
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
#/musr/command rootOutput weight off
#/musr/command rootOutput BFieldAtDecay off
#/musr/command rootOutput muIniPosX off
#/musr/command rootOutput muIniPosY off
#/musr/command rootOutput muIniPosZ off
#/musr/command rootOutput muIniMomX off
#/musr/command rootOutput muIniMomY off
#/musr/command rootOutput muIniMomZ off
#/musr/command rootOutput muIniPolX off
#/musr/command rootOutput muIniPolY off
#/musr/command rootOutput muIniPolZ off
#/musr/command rootOutput muDecayDetID off
#/musr/command rootOutput muDecayPosX off
#/musr/command rootOutput muDecayPosY off
#/musr/command rootOutput muDecayPosZ off
#/musr/command rootOutput muDecayTime off
#/musr/command rootOutput muDecayPolX off
#/musr/command rootOutput muDecayPolY off
#/musr/command rootOutput muDecayPolZ off
#/musr/command rootOutput muTargetTime off
#/musr/command rootOutput muTargetPolX off
#/musr/command rootOutput muTargetPolY off
#/musr/command rootOutput muTargetPolZ off
#/musr/command rootOutput muM0Time off
#/musr/command rootOutput muM0PolX off
#/musr/command rootOutput muM0PolY off
#/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
#/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
/musr/command storeOnlyEventsWithHits false
################################################################################################################
# -- Setting PARTICLE GUN parameters --
################################################################################################################
# Default momentum direction: 001, i.e. 0z.
# Default muon soin 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 -1144 mm, acceleration starts at -1154.15 mm
#/gun/vertex 0. 0. -2119.5 mm
/gun/vertex 499 0. -1678.0 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 6.83 6.83 0 mm
/gun/vertexsigma -15 -15 0 mm
#/gun/boxboundarycentre 499 0 -1678 mm
#/gun/boxboundary 15 15 1 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
# Set muon energy before hitting TD; a constant field in front of the C-foil accelerates the muons
# to add 3.38 keV
/gun/kenergy 15.0 eV
# Set beam momentum direction
/gun/direction -1.0 0.0 0.0
# Set muon spin direction: +10deg or 0
/gun/muonPolarizVector 0.9848 0 0.17365
#/gun/muonPolarizVector 1 0 0
# Other useful test parameters:
#------------------Oct.20 2015------------------------------------
# kenergy= 15 eV Pmu= 0.xxxMeV/c ==> sigma = /2.354 = MeV/c
#/gun/momentumsmearing 0.07508 MeV
/gun/momentumsmearing 0.016 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#*/gun/momentumboundary 20 40 0 MeV
#---/gun/tilt: xangle, yangle, dummy
#*/gun/tilt 0 0.0 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.0 deg
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#*/gun/decaytimelimits 10400 10420 2197.03 ns
#/gun/tiltsigma 1.4 1.4 0 deg
/gun/tiltsigma 0 0 -1.0 deg
# Selectively inactivate or activate sensitive detectors
#*/hits/inactivate /musr/ScintSD
# Only for code debugging!
/tracking/verbose 0
# BEAM ON
#/run/beamOn 1000000
#/run/beamOn 10
/run/beamOn 10000

View File

@@ -0,0 +1,950 @@
# Template suitable for beam profile detectioon with the spin rotator in place
# Zaher Salman 7/10/2010
#
# Thomas Prokscha 22/Nov/2012
# Moved sample stack on cryostat 3mm downstream to fit to positions in apparatus
# Changed positions of positron counters according to corrected drawing LEM 37.01.024 (19/Sep/2012)
#
# Position downstream detectors: z=+62.5mm original value: z=+66.5mm
# Position upstream detectors: z=-64.0mm original value: z=-60.0mm
#
# 2013 setup: 1mm Ti sample tube
#
# 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
#
# Ran Xiao 25/Sep/2014
# Start muons at moderator at x=499, assume cosA angular distribution, assume energy distribution
#
################################################################################################################
# -- ROTATION MATRICES --
################################################################################################################
# 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
/musr/command rotation rotRAnL 0 0 1 90
/musr/command rotation rotRAnD 0 0 1 180
# More Rotations
/musr/command rotation rotD1 0 0 1 11.250
/musr/command rotation rotD2 0 0 1 33.750
/musr/command rotation rotD3 0 0 1 56.250
/musr/command rotation rotD4 0 0 1 78.750
/musr/command rotation rotD5 0 0 1 101.250
/musr/command rotation rotD6 0 0 1 123.750
/musr/command rotation rotD7 0 0 1 146.250
/musr/command rotation rotD8 0 0 1 168.750
/musr/command rotation rotD9 0 0 1 191.250
/musr/command rotation rotD10 0 0 1 213.750
/musr/command rotation rotD11 0 0 1 236.250
/musr/command rotation rotD12 0 0 1 258.750
/musr/command rotation rotD13 0 0 1 281.250
/musr/command rotation rotD14 0 0 1 303.750
/musr/command rotation rotD15 0 0 1 326.250
/musr/command rotation rotD16 0 0 1 348.750
/musr/command rotation rotD17 0 0 1 11.250
/musr/command rotation rotD18 0 0 1 33.750
/musr/command rotation rotD19 0 0 1 56.250
/musr/command rotation rotD20 0 0 1 78.750
/musr/command rotation rotD21 0 0 1 101.250
/musr/command rotation rotD22 0 0 1 123.750
/musr/command rotation rotD23 0 0 1 146.250
/musr/command rotation rotD24 0 0 1 168.750
/musr/command rotation rotD25 0 0 1 191.250
/musr/command rotation rotD26 0 0 1 213.750
/musr/command rotation rotD27 0 0 1 236.250
/musr/command rotation rotD28 0 0 1 258.750
/musr/command rotation rotD29 0 0 1 281.250
/musr/command rotation rotD30 0 0 1 303.750
/musr/command rotation rotD31 0 0 1 326.250
/musr/command rotation rotD32 0 0 1 348.750
# Beam line bend at mirror
/musr/command rotation rotBend 0 1 0 -90
/musr/command rotation rotMirr 0 1 0 -45
/musr/command rotation rotMod 0 1 0 1
################################################################################################################
# -- LEM GEOMETRY --
################################################################################################################
# WORLD = Laboratory reference frame, the origin is in the centre of the LEM sample tube
/musr/command construct box World 900 350 2600 G4_Galactic 0 0 0 no_logical_volume norot dead -1
/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 60 0.05 0 360 G4_Galactic 850 0 -1678 log_World rotBend dead 851
/musr/command construct tubs save1 0 60 0.05 0 360 G4_Galactic 800 0 -1678 log_World rotBend dead 852
/musr/command construct tubs save2 0 60 0.05 0 360 G4_Galactic 750 0 -1678 log_World rotBend dead 853
/musr/command construct tubs save3 0 60 0.05 0 360 G4_Galactic 700 0 -1678 log_World rotBend dead 854
/musr/command construct tubs save4 0 60 0.05 0 360 G4_Galactic 650 0 -1678 log_World rotBend dead 855
/musr/command construct tubs save5 0 60 0.05 0 360 G4_Galactic 600 0 -1678 log_World rotBend dead 856
/musr/command construct tubs save6 0 60 0.05 0 360 G4_Galactic 550 0 -1678 log_World rotBend dead 857
/musr/command construct tubs save7 0 60 0.05 0 360 G4_Galactic 500 0 -1678 log_World rotBend dead 858
/musr/command construct tubs save8 0 60 0.05 0 360 G4_Galactic 450 0 -1678 log_World rotBend dead 859
/musr/command construct tubs save9 0 60 0.05 0 360 G4_Galactic 400 0 -1678 log_World rotBend dead 860
/musr/command construct tubs save10 0 60 0.05 0 360 G4_Galactic 350 0 -1678 log_World rotBend dead 861
/musr/command construct tubs save11 0 60 0.05 0 360 G4_Galactic 300 0 -1678 log_World rotBend dead 862
/musr/command construct tubs save12 0 60 0.05 0 360 G4_Galactic 240 0 -1678 log_World rotBend dead 863
/musr/command construct tubs save13 0 60 0.05 0 360 G4_Galactic 200 0 -1678 log_World rotBend dead 864
/musr/command construct tubs save14 0 60 0.05 0 360 G4_Galactic 150 0 -1678 log_World rotBend dead 865
/musr/command construct tubs save15 0 60 0.05 0 360 G4_Galactic 100 0 -1678 log_World rotBend dead 866
/musr/command construct tubs save16 0 60 0.05 0 360 G4_Galactic 70 0 -1678 log_World rotBend dead 867
/musr/command construct tubs save17 0 60 0.05 0 360 G4_Galactic 0 0 -1620 log_World norot dead 868
/musr/command construct tubs save18 0 60 0.05 0 360 G4_Galactic 0 0 -1600 log_World norot dead 869
/musr/command construct tubs save19 0 60 0.05 0 360 G4_Galactic 0 0 -1550 log_World norot dead 870
/musr/command construct tubs save20 0 60 0.05 0 360 G4_Galactic 0 0 -1500 log_World norot dead 871
/musr/command construct tubs save21 0 60 0.05 0 360 G4_Galactic 0 0 -1450 log_World norot dead 872
/musr/command construct tubs save22 0 60 0.05 0 360 G4_Galactic 0 0 -1400 log_World norot dead 873
/musr/command construct tubs save23 0 60 0.05 0 360 G4_Galactic 0 0 -1350 log_World norot dead 874
/musr/command construct tubs save24 0 60 0.05 0 360 G4_Galactic 0 0 -1300 log_World norot dead 875
/musr/command construct tubs save25 0 60 0.05 0 360 G4_Galactic 0 0 -1250 log_World norot dead 876
/musr/command construct tubs save26 0 60 0.05 0 360 G4_Galactic 0 0 -1200 log_World norot dead 877
/musr/command construct tubs save27 0 60 0.05 0 360 G4_Galactic 0 0 -1150 log_World norot dead 878
/musr/command construct tubs save28 0 60 0.05 0 360 G4_Galactic 0 0 -1100 log_World norot dead 879
/musr/command construct tubs save29 0 60 0.05 0 360 G4_Galactic 0 0 -1050 log_World norot dead 880
/musr/command construct tubs save30 0 60 0.05 0 360 G4_Galactic 0 0 -1000 log_World norot dead 881
/musr/command construct tubs save31 0 60 0.05 0 360 G4_Galactic 0 0 -950 log_World norot dead 882
/musr/command construct tubs save32 0 60 0.05 0 360 G4_Galactic 0 0 -900 log_World norot dead 883
/musr/command construct tubs save33 0 60 0.05 0 360 G4_Galactic 0 0 -850 log_World norot dead 884
/musr/command construct tubs save34 0 60 0.05 0 360 G4_Galactic 0 0 -800 log_World norot dead 885
/musr/command construct tubs save35 0 60 0.05 0 360 G4_Galactic 0 0 -750 log_World norot dead 886
/musr/command construct tubs save36 0 60 0.05 0 360 G4_Galactic 0 0 -700 log_World norot dead 887
/musr/command construct tubs save37 0 60 0.05 0 360 G4_Galactic 0 0 -650 log_World norot dead 888
/musr/command construct tubs save38 0 60 0.05 0 360 G4_Galactic 0 0 -600 log_World norot dead 889
/musr/command construct tubs save39 0 60 0.05 0 360 G4_Galactic 0 0 -525 log_World norot dead 890
/musr/command construct tubs save40 0 60 0.05 0 360 G4_Galactic 0 0 -450 log_World norot dead 891
/musr/command construct tubs save41 0 60 0.05 0 360 G4_Galactic 0 0 -420 log_World norot dead 892
/musr/command construct tubs save42 0 60 0.05 0 360 G4_Galactic 0 0 -400 log_World norot dead 893
/musr/command construct tubs save43 0 60 0.05 0 360 G4_Galactic 0 0 -350 log_World norot dead 894
/musr/command construct tubs save44 0 60 0.05 0 360 G4_Galactic 0 0 -300 log_World norot dead 895
/musr/command construct tubs save45 0 60 0.05 0 360 G4_Galactic 0 0 -250 log_World norot dead 896
/musr/command construct tubs save46 0 60 0.05 0 360 G4_Galactic 0 0 -200 log_World norot dead 897
/musr/command construct tubs save47 0 60 0.05 0 360 G4_Galactic 0 0 -150 log_World norot dead 898
/musr/command construct tubs save48 0 60 0.05 0 360 G4_Galactic 0 0 -100 log_World norot dead 899
/musr/command construct tubs save49 0 60 0.05 0 360 G4_Galactic 0 0 -50 log_World norot dead 900
/musr/command construct tubs save50 0 60 0.05 0 360 G4_Galactic 0 0 0 log_World norot dead 901
/musr/command construct tubs save51 0 60 0.05 0 360 G4_Galactic 0 0 16 log_World norot dead 902
/musr/command construct tubs save52 0 60 0.05 0 360 G4_Galactic 0 0 100 log_World norot dead 903
/musr/command construct tubs save53 0 60 0.05 0 360 G4_Galactic 0 0 150 log_World norot dead 904
/musr/command visattributes G4_Galactic invisible
################################################################################################################
# -- APD Scintillators --
################################################################################################################
# Detectors volume (0,0,0) coninsides with World (0,0,0)
/musr/command construct tubs DetV 80 105 133 0 360 G4_Galactic 0 0 0 log_World norot dead 100
/musr/command visattributes log_DetV invisible
# For final design set
# BackHW=60
# BackCR=-64.0, 19/Sep/2012
# ForwHW=65.5
# ForwCR=62.5, 19/Sep/2012
# Back inner sections (Upstream) (v.i.)
# Final design (30 Jun 09, 19 Sep 12) BackHW=60.0mm (Half width or length), BackCR=-4-BackHW=-64.0mm (Center z coordinate)
/musr/command construct trd90y ScD1 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 -17.265493 -64.0 log_DetV rotD1 musr/ScintSD 1
/musr/command construct trd90y ScD2 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 -49.167966 -64.0 log_DetV rotD2 musr/ScintSD 2
/musr/command construct trd90y ScD3 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 -73.585061 -64.0 log_DetV rotD3 musr/ScintSD 3
/musr/command construct trd90y ScD4 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 -86.799497 -64.0 log_DetV rotD4 musr/ScintSD 4
/musr/command construct trd90y ScD5 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 -86.799497 -64.0 log_DetV rotD5 musr/ScintSD 5
/musr/command construct trd90y ScD6 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 -73.585061 -64.0 log_DetV rotD6 musr/ScintSD 6
/musr/command construct trd90y ScD7 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 -49.167966 -64.0 log_DetV rotD7 musr/ScintSD 7
/musr/command construct trd90y ScD8 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 -17.265493 -64.0 log_DetV rotD8 musr/ScintSD 8
/musr/command construct trd90y ScD9 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 17.265493 -64.0 log_DetV rotD9 musr/ScintSD 9
/musr/command construct trd90y ScD10 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 49.167966 -64.0 log_DetV rotD10 musr/ScintSD 10
/musr/command construct trd90y ScD11 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 73.585061 -64.0 log_DetV rotD11 musr/ScintSD 11
/musr/command construct trd90y ScD12 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 86.799497 -64.0 log_DetV rotD12 musr/ScintSD 12
/musr/command construct trd90y ScD13 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 86.799497 -64.0 log_DetV rotD13 musr/ScintSD 13
/musr/command construct trd90y ScD14 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 73.585061 -64.0 log_DetV rotD14 musr/ScintSD 14
/musr/command construct trd90y ScD15 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 49.167966 -64.0 log_DetV rotD15 musr/ScintSD 15
/musr/command construct trd90y ScD16 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 17.265493 -64.0 log_DetV rotD16 musr/ScintSD 16
# Forward inner sections (Downstream) (h.i.)
# Final design (30 June 09, 19 Sep 12) ForwHW=65.5mm (Half width or length), ForwCR=-3+ForwHW=62.5mm (Center z coordinate)
/musr/command construct trd90y ScD17 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 -17.070403 62.5 log_DetV rotD17 musr/ScintSD 17
/musr/command construct trd90y ScD18 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 -48.612395 62.5 log_DetV rotD18 musr/ScintSD 18
/musr/command construct trd90y ScD19 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 -72.753591 62.5 log_DetV rotD19 musr/ScintSD 19
/musr/command construct trd90y ScD20 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 -85.818712 62.5 log_DetV rotD20 musr/ScintSD 20
/musr/command construct trd90y ScD21 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 -85.818712 62.5 log_DetV rotD21 musr/ScintSD 21
/musr/command construct trd90y ScD22 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 -72.753591 62.5 log_DetV rotD22 musr/ScintSD 22
/musr/command construct trd90y ScD23 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 -48.612395 62.5 log_DetV rotD23 musr/ScintSD 23
/musr/command construct trd90y ScD24 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 -17.070403 62.5 log_DetV rotD24 musr/ScintSD 24
/musr/command construct trd90y ScD25 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 17.070403 62.5 log_DetV rotD25 musr/ScintSD 25
/musr/command construct trd90y ScD26 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 48.612395 62.5 log_DetV rotD26 musr/ScintSD 26
/musr/command construct trd90y ScD27 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 72.753591 62.5 log_DetV rotD27 musr/ScintSD 27
/musr/command construct trd90y ScD28 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 85.818712 62.5 log_DetV rotD28 musr/ScintSD 28
/musr/command construct trd90y ScD29 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 85.818712 62.5 log_DetV rotD29 musr/ScintSD 29
/musr/command construct trd90y ScD30 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 72.753591 62.5 log_DetV rotD30 musr/ScintSD 30
/musr/command construct trd90y ScD31 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 48.612395 62.5 log_DetV rotD31 musr/ScintSD 31
/musr/command construct trd90y ScD32 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 17.070403 62.5 log_DetV rotD32 musr/ScintSD 32
# Back outer sections (v.a.)
/musr/command construct trd ScD33 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 -18.631126 -64.0 log_DetV rotD1 musr/ScintSD 33
/musr/command construct trd ScD34 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 -53.056957 -64.0 log_DetV rotD2 musr/ScintSD 34
/musr/command construct trd ScD35 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 -79.405348 -64.0 log_DetV rotD3 musr/ScintSD 35
/musr/command construct trd ScD36 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 -93.664994 -64.0 log_DetV rotD4 musr/ScintSD 36
/musr/command construct trd ScD37 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 -93.664994 -64.0 log_DetV rotD5 musr/ScintSD 37
/musr/command construct trd ScD38 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 -79.405348 -64.0 log_DetV rotD6 musr/ScintSD 38
/musr/command construct trd ScD39 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 -53.056957 -64.0 log_DetV rotD7 musr/ScintSD 39
/musr/command construct trd ScD40 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 -18.631126 -64.0 log_DetV rotD8 musr/ScintSD 40
/musr/command construct trd ScD41 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 18.631126 -64.0 log_DetV rotD9 musr/ScintSD 41
/musr/command construct trd ScD42 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 53.056957 -64.0 log_DetV rotD10 musr/ScintSD 42
/musr/command construct trd ScD43 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 79.405348 -64.0 log_DetV rotD11 musr/ScintSD 43
/musr/command construct trd ScD44 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 93.664994 -64.0 log_DetV rotD12 musr/ScintSD 44
/musr/command construct trd ScD45 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 93.664994 -64.0 log_DetV rotD13 musr/ScintSD 45
/musr/command construct trd ScD46 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 79.405348 -64.0 log_DetV rotD14 musr/ScintSD 46
/musr/command construct trd ScD47 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 53.056957 -64.0 log_DetV rotD15 musr/ScintSD 47
/musr/command construct trd ScD48 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 18.631126 -64.0 log_DetV rotD16 musr/ScintSD 48
# Forward outer sections (h.a.)
/musr/command construct trd ScD49 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 -18.436035 62.5 log_DetV rotD1 musr/ScintSD 49
/musr/command construct trd ScD50 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 -52.501387 62.5 log_DetV rotD2 musr/ScintSD 50
/musr/command construct trd ScD51 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 -78.573878 62.5 log_DetV rotD3 musr/ScintSD 51
/musr/command construct trd ScD52 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 -92.684209 62.5 log_DetV rotD4 musr/ScintSD 52
/musr/command construct trd ScD53 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 -92.684209 62.5 log_DetV rotD5 musr/ScintSD 53
/musr/command construct trd ScD54 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 -78.573878 62.5 log_DetV rotD6 musr/ScintSD 54
/musr/command construct trd ScD55 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 -52.501387 62.5 log_DetV rotD7 musr/ScintSD 55
/musr/command construct trd ScD56 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 -18.436035 62.5 log_DetV rotD8 musr/ScintSD 56
/musr/command construct trd ScD57 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 18.436035 62.5 log_DetV rotD9 musr/ScintSD 57
/musr/command construct trd ScD58 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 52.501387 62.5 log_DetV rotD10 musr/ScintSD 58
/musr/command construct trd ScD59 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 78.573878 62.5 log_DetV rotD11 musr/ScintSD 59
/musr/command construct trd ScD60 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 92.684209 62.5 log_DetV rotD12 musr/ScintSD 60
/musr/command construct trd ScD61 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 92.684209 62.5 log_DetV rotD13 musr/ScintSD 61
/musr/command construct trd ScD62 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 78.573878 62.5 log_DetV rotD14 musr/ScintSD 62
/musr/command construct trd ScD63 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 52.501387 62.5 log_DetV rotD15 musr/ScintSD 63
/musr/command construct trd ScD64 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 18.436035 62.5 log_DetV rotD16 musr/ScintSD 64
# Structural support inside the detectors vessel
# Carbon fibre, inner radius 80, thickness 2 mm.
# Additional Al plate removed, 2 mm thick for h.i and h.a and 3 mm thick for v.i. and v.a
/musr/command construct tubs hInShell 80.0 82.0 65.5 0 360 G4_C 0 0 62 log_DetV norot dead 70
/musr/command construct tubs vInShell 80.0 82.0 60.0 0 360 G4_C 0 0 -64.5 log_DetV norot dead 70
# Visual attributes (optional)
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE green
#/musr/command visattributes log_ScD49 green
#/musr/command visattributes log_ScD50 green
#/musr/command visattributes log_test red
################################################################################################################
# Sample vacuum/tube up to gate valve - Can host either the Cryostat or the MCP2
################################################################################################################
# Vacuum space
# /musr/command construct tubs SamV 0 75.0 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100
# Sample tube
#/musr/command construct tubs SamS 75.0 77.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# 2012: 2mm Ti tube, 2013: 1mm
/musr/command construct tubs SamS 75.0 76.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# F160 - 160 CF flange upstream of MCP2 tube
/musr/command construct tubs F160 78.0 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 102
# F100 (Blank end flange)
/musr/command construct tubs F100 0 75.0 10 0 360 Steel 0 0 172.0 log_World norot dead 103
# 200 CF flange upstream of MCP2 tube covering the whole length of the gate valve chamber.
/musr/command construct tubs GATS 103.25 126.5 92.5 0 360 Steel 0 0 -254.5 log_World norot dead 371
# F200 - 200 CF flange upstream of MCP2 tube to connect to gate valve chamber
/musr/command construct tubs F200 76.5 103.25 12 0 360 Steel 0 0 -174.0 log_World norot dead 372
# Visual attributes (optional)
#/musr/command visattributes log_SamV invisible
/musr/command visattributes log_SamS oxsteel
/musr/command visattributes log_F160 oxsteel
#/musr/command visattributes log_F100 oxsteel
/musr/command visattributes log_GATS oxsteel
/musr/command visattributes log_F200 oxsteel
################################################################################################################
# MCP - Micro Channel Plate Detector MCP2
# mcpv_z = -92.5 mm!
#
# We have a 324 mm long sample tube;
# the MCP2 front side is at 142 mm from the end of the sample tube.
# the front face of the sample plate of the cryostat is 145 mm from the end of the sample tube.
#
################################################################################################################
#
# MCPM1 - MCP Macor ring 1
# MCPD - electron multiplying glass disk (also known as target)
# Sensitive surface at z = 20 mm wrt. World
# MCPM2 - MCP Macor ring 2
# /musr/command construct tubs MCPM1 24 32.5 0.75 0 360 Macor 0 0 19.25 log_World norot dead 251
# Use it either as (DMCP-musr/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz.
# /musr/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 21.5 log_World norot dead 252
# /musr/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 23.75 log_World norot dead 253
# NOTE: To intercept ALL the incoming muons, comment the DMCP and MCPM1 lines above and uncomment this one:
#*aa/musr/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs target 0 21.0 1.5 0 360 MCPglass 0 0 114 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs saveTarget 0 75.0 0.2 0 360 G4_Galactic 0 0 110.79 log_SamV norot dead 222
#
# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole)
# MCVR - "Vacuum Ring" (circular hole)
# /musr/command construct box MCSR 36.5 36.5 1 Steel 0 0 25.5 log_World norot dead 254
# /musr/command construct tubs MCVR 0 27.5 1 0 360 G4_Galactic 0 0 0 log_MCSR norot dead 255
# 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
# /musr/command construct box MCPA 36.5 36.5 4 Steel 0 0 37 log_World norot dead 256
# /musr/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 257
# /musr/command construct tubs ANVA2 0 27.5 1.5 0 360 G4_Galactic 0 0 2.5 log_MCPA norot dead 258
# MCSS - MCP Stainless Steel Support Ring
# /musr/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 69.8 log_World norot dead 259
# MCP2 visual attributes (optional)
#/musr/command visattributes log_DMCP MCP_style
#*/musr/command visattributes log_target MCP_style
#*/musr/command visattributes log_MCPM1 MACOR_style
#*------ /musr/command visattributes log_MCPM2 MACOR_style
################################################################################################################
# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm)
#
# sample plate front face is at z = 17mm:
# cold finger distance to CF100: 130mm
# 5mm base plate + 6mm sapphire + 4mm sample plate = 15mm
# sample plate front face from CF100: 145mm
# z-position of sample plate front face: 324/2-145mm = 17mm
# --> sample plate center is at 17+2=19mm
#
################################################################################################################
# Dimensions for large/small sample plates SamPL=35/21 and SaphPL=SamPL35-5
/musr/command construct tubs target 0 35 2 0 360 G4_Al 0 0 19.0 log_World norot dead 251
/musr/command construct tubs SAPH 0 30 3 0 360 G4_ALUMINUM_OXIDE 0 0 24.0 log_World norot dead 252
/musr/command construct tubs SAH1 0 35 2.5 0 360 G4_Al 0 0 29.5 log_World norot dead 253
# Special save target volume
/musr/command construct tubs saveTarget 0 40 0.05 0 360 G4_Galactic 0 0 16.9 log_World norot dead 253
# Other components of the cryostat (dimensions and position of CRY4 are only approx. because unknown)
# COld Finger
/musr/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 37.0 log_World norot dead 261
# End plate of cryostat (7 mm thick, 30 mm diameter)
/musr/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 45.5 log_World norot dead 262
# Heat exchanger (assuming a 10 mm opening - Original dimensions not known.) # OLD pos. 160.0
/musr/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 74.0 log_World norot dead 263
# Mounting ring for He-shield
/musr/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 54.0 log_World norot dead 264
# 2 mm thick plate for mounting ring. This is just to close the downstream side.
/musr/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 54.0 log_World norot dead 265
# Radiation shield
/musr/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 19.0 log_World norot dead 266
# Front part of the radiation shield
/musr/command construct tubs CRSH2 30 48 0.5 0 360 G4_Cu 0 0 -26.5 log_World norot dead 267
# Electrical Field Guard Rings (distance between the guard rings: 16 mm)
# /musr/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 -13.5 log_World norot dead 271
# /musr/command construct tubs Guard2 29 38 1.5 0 360 G4_Cu 0 0 2.5 log_World norot dead 272
# Cryostat visual attributes (optional)
/musr/command visattributes log_SAH1 oxsteel
#/musr/command visattributes log_SAH2 oxsteel
/musr/command visattributes log_target oxsteel
/musr/command visattributes log_SAPH MACOR_style
#/musr/command visattributes log_SAH3 oxsteel
/musr/command visattributes log_CRSH yellow
/musr/command visattributes log_CRSH2 yellow
#/musr/command visattributes log_test red
################################################################################################################
# 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
/musr/command construct cons RA_EU 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World norot dead 801
/musr/command construct cons RA_MU 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World norot dead 802
/musr/command construct cons RA_ER 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnR dead 803
/musr/command construct cons RA_MR 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnR dead 804
/musr/command construct cons RA_ED 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnD dead 805
/musr/command construct cons RA_MD 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnD dead 806
/musr/command construct cons RA_EL 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnL dead 807
/musr/command construct cons RA_ML 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnL dead 808
# 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_T 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 822
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.02 log_World rotRAnR dead 824
/musr/command construct tubs RA_B 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 826
/musr/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.06 log_World rotRAnL dead 828
# 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 831
# Ring Anodes visual attributes (optional)
/musr/command visattributes log_RA_G invisible
#/musr/command visattributes log_RA_G Grid_style
################################################################################################################
# Trigger - Trigger Detector # Triggerz = -1092 mm; total length of TD is 110 mm; carbon foil at -1144 mm.
################################################################################################################
# Trigger volume
/musr/command construct tubs TrigV 90 127 148 0 360 G4_Galactic 0 0 -495 log_World norot dead 600
# Trigger tube
/musr/command construct tubs TrigS 100 103 148 0 360 Steel 0 0 0 log_TrigV norot dead 601
# TF - Trigger tube flanges
/musr/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 136 log_TrigV norot dead 611
/musr/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -136 log_TrigV norot dead 612
# trigger foil is 52-55mm upstream of TrigV center
# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm).
# USE THE NAME CFoil or coulombCFoil, otherwise musrMuFormation won't work!
#/musr/command construct box CFoil 60 60 0.0000025 G4_GRAPHITE 0 0 -550 log_World norot dead 621
/musr/command construct box CFoil 60 60 0.000002 G4_GRAPHITE 0 0 -550 log_World norot dead 621
# 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 musrDetectorConstruction.cc and set any density.
# Trigger visual attributes (optional)
/musr/command visattributes log_TrigV oxsteel
/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_saveAfterTD darkred
# Trigger Lens, L3, center -382 length 70mm radius 65mm.
/musr/command construct tubs TL3S 65.0 70.0 35.0 0 360 G4_Galactic 0 0 -382 log_World norot dead 706 nofield
/musr/command visattributes log_TL3S red
# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL.
# E.g. /musr/command visattributes Steel red
################################################################################################################
# L2 - 2nd Einzel Lens # L3z = -56.7 cm. (it was "L3" in 2011 and before)
# Lens Gap = 12.0 mm => G/D = 12/130 ~ 0.1 (Lens Gap = gap between Ground and Anode, D - Diameter)
################################################################################################################
# L3 volume
/musr/command construct tubs L3V 65 127 220 0 360 G4_Galactic 0 0 -863 log_World norot dead 400
# Lens 3 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 720 mm)
/musr/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 0 log_L3V norot dead 401
# Lens 3 Flange 1, z = L3z + 208 mm
/musr/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -208 log_L3V norot dead 402
# Lens 3 Flange 2, z = L3z - 208 mm
/musr/command construct tubs L3F2 103 126.5 12 0 360 Steel 0 0 208 log_L3V norot dead 403
# GPn - Ground Potential Electrodes
# n = 1-4 (further from TD) and 5-8 (closer to TD) - components of the Ground Electrodes
# Ground Electrode (inner dia: 130 mm, outer dia: 134 mm, length: 133 mm)
/musr/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 421
# Outer electrode surface (LN2 cooling vessel)
/musr/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 422
# First ring cap
/musr/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3V norot dead 423
# Second ring cap
/musr/command construct tubs L3GP4 67 81 4 0 360 Steel 0 0 71.0 log_L3V norot dead 424
/musr/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 431
/musr/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 432
/musr/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3V norot dead 433
/musr/command construct tubs L3GP8 67 81 4 0 360 Steel 0 0 -71.0 log_L3V norot dead 434
# HP - High Potential Electrode (Central Anode - usually at +8.7 kV, for a 15 keV muon beam)
/musr/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3V norot dead 451
# Lens 3 visual attributes (optional)
/musr/command visattributes log_L3V invisible
/musr/command visattributes log_L3ST oxsteel
/musr/command visattributes log_L3F1 oxsteel
/musr/command visattributes log_L3F2 oxsteel
/musr/command visattributes log_L3HP darkred
################################################################################################################
# -- SPIN ROTATOR GEOMETRY --
################################################################################################################
# Spin Rotator volume
/musr/command construct tubs SRENV 50 320 201.5 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 100
/musr/command visattributes log_SRENV invisible
# Electromagnet with iron yoke
# U - up, D - down, L - left, R - right (with respect to muon's view - momentum direction)
/musr/command construct box NPole 200 10 150 G4_Fe 0 85 0 log_SRENV norot dead 201
/musr/command construct box NYoke 150 22.5 50 G4_Fe 0 117.5 0 log_SRENV norot dead 202
/musr/command construct box NConn 225 17.5 190.0 G4_Fe 0 157.5 0 log_SRENV norot dead 203
/musr/command construct box SPole 200 10 150 G4_Fe 0 -85 0 log_SRENV norot dead 205
/musr/command construct box SYoke 150 22.5 50 G4_Fe 0 -117.5 0 log_SRENV norot dead 206
/musr/command construct box SConn 225 17.5 190.0 G4_Fe 0 -157.5 0 log_SRENV norot dead 207
# Front mirror plate
/musr/command construct box FShU 225 50 5 G4_Fe 0 125 -195.0 log_SRENV norot dead 301
/musr/command construct box FShD 225 50 5 G4_Fe 0 -125 -195.0 log_SRENV norot dead 302
/musr/command construct box FShL 75 75 5 G4_Fe 150 0 -195.0 log_SRENV norot dead 303
/musr/command construct box FShR 75 75 5 G4_Fe -150 0 -195.0 log_SRENV norot dead 304
# Back mirror plate
/musr/command construct box BShU 225 50 5 G4_Fe 0 125 195.0 log_SRENV norot dead 321
/musr/command construct box BShD 225 50 5 G4_Fe 0 -125 195.0 log_SRENV norot dead 322
/musr/command construct box BShL 75 75 5 G4_Fe 150 0 195.0 log_SRENV norot dead 323
/musr/command construct box BShR 75 75 5 G4_Fe -150 0 195.0 log_SRENV norot dead 324
# Top coils
/musr/command construct box TCoil1 170 22.5 10 G4_Cu 0 117.5 -60 log_SRENV norot dead 401
/musr/command construct box TCoil2 170 22.5 10 G4_Cu 0 117.5 60 log_SRENV norot dead 402
/musr/command construct box TCoil3 10 22.5 50 G4_Cu 160 117.5 0 log_SRENV norot dead 403
/musr/command construct box TCoil4 10 22.5 50 G4_Cu -160 117.5 0 log_SRENV norot dead 404
# Bottom coils
/musr/command construct box BCoil1 170 22.5 10 G4_Cu 0 -117.5 -60 log_SRENV norot dead 421
/musr/command construct box BCoil2 170 22.5 10 G4_Cu 0 -117.5 60 log_SRENV norot dead 422
/musr/command construct box BCoil3 10 22.5 50 G4_Cu 160 -117.5 0 log_SRENV norot dead 423
/musr/command construct box BCoil4 10 22.5 50 G4_Cu -160 -117.5 0 log_SRENV norot dead 424
# Capacitor
/musr/command construct box Cap_p 0.5 50 150 Brass 55 0 0 log_SRENV norot dead 501
/musr/command construct box Cap_n 0.5 50 150 Brass -55 0 0 log_SRENV norot dead 502
#*/musr/command construct box Uniform 49 49 150 G4_Galactic 0 0 0 log_SRENV norot dead 503
/musr/command construct tubs RodCapUp 0 5 150 90 180 Brass 55 55 0 log_SRENV norot dead 504
/musr/command construct tubs RodCapUn 0 5 150 -90 180 Brass -55 55 0 log_SRENV norot dead 505
/musr/command construct tubs RodCapDp 0 5 150 90 180 Brass 55 -55 0 log_SRENV norot dead 506
/musr/command construct tubs RodCapDn 0 5 150 -90 180 Brass -55 -55 0 log_SRENV norot dead 507
# Rods
/musr/command construct tubs RodPosU 0 5 150 0 360 Brass 27.5 55 0 log_SRENV norot dead 511
/musr/command construct tubs Rod0U 0 5 150 0 360 Brass 0 55 0 log_SRENV norot dead 512
/musr/command construct tubs RodNegU 0 5 150 0 360 Brass -27.5 55 0 log_SRENV norot dead 513
/musr/command construct tubs RodPosD 0 5 150 0 360 Brass 27.5 -55 0 log_SRENV norot dead 514
/musr/command construct tubs Rod0D 0 5 150 0 360 Brass 0 -55 0 log_SRENV norot dead 515
/musr/command construct tubs RodNegD 0 5 150 0 360 Brass -27.5 -55 0 log_SRENV norot dead 516
# Vacuum vessel
/musr/command construct box TVac1 72.5 2.5 191.5 Steel 0 72.5 0 log_SRENV norot dead 601
/musr/command construct box TVac2 2.5 70.0 191.5 Steel 72.5 0 0 log_SRENV norot dead 602
/musr/command construct box TVac3 72.5 2.5 191.5 Steel 0 -72.5 0 log_SRENV norot dead 603
/musr/command construct box TVac4 2.5 70.0 191.5 Steel -72.5 0 0 log_SRENV norot dead 604
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For Spin Rotator
/musr/command construct tubs SREField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 630 nofield
/musr/command construct tubs SRBField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.51 log_World norot dead 631 nofield
/musr/command visattributes G4_Cu red
/musr/command visattributes G4_Fe blue
/musr/command visattributes Brass yellow
################################################################################################################
# Lens 1 - 1st Einzel Lens
################################################################################################################
# L1ENV - Lens 1 envelope - for easy positioning of lens parts (outer dia: 100 mm, length: 300 mm)
#/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 0 0 -1929.5 log_World norot dead 600
/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend 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
# n = 2 - Ground Electrode 2 (closer to SR).
/musr/command construct tubs L1GP2 40 44 50 0 360 Steel 0 0 100 log_L1ENV norot dead 653
# HP - High Potential Electrode (Central Anode - usually at +8.5 kV, for a 15 keV muon beam)
/musr/command construct tubs L1HP 40 44 40 0 360 Steel 0 0 0 log_L1ENV norot dead 652
# Lens 1 visual attributes (optional)
/musr/command visattributes log_L1HP darkred
################################################################################################################
# Electrostatic field at accelerator after moderator
################################################################################################################
#
/musr/command construct box Grid1 9.1 25 25 G4_Galactic 489.9 0.0 -1678.0 log_World rotMod dead 212
/musr/command globalfield Grid1_field 9.1 25 25 uniform 489.9 0.0 -1678.0 log_Grid1 0 0 0 -0.2527 0 0
/musr/command construct box Grid2 5 24 24 G4_Galactic 475.8 0.0 -1678.0 log_World rotMod dead 214
/musr/command globalfield Grid2_field 5 24 24 uniform 475.8 0.0 -1678.0 log_Grid2 0 0 0 -1.04 0 0
/musr/command globalfield printFieldValueAtPoint 489.9 0.0 -1678.0
/musr/command globalfield printFieldValueAtPoint 475.8 0.0 -1678.0
################################################################################################################
# Electrostatic mirror at bend
################################################################################################################
# MRENV
/musr/command construct box MirrE 65 65 10 G4_Galactic 14.14213562 0.0 -1678.0 log_World rotMirr dead 200
/musr/command globalfield Mirr_field 65 65 10 uniform 14.14213562 0.0 -1678.0 log_MirrE 0 0 0 0 0 0.75
###################################################################################
################### E L E C T R O M G N E T I C F I E L D S ##################
###################################################################################
# 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!
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For L1
/musr/command construct tubs L1EField 0 0.01 0.005 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend dead 706 nofield
# For L2 (L3 before 2012)
/musr/command construct tubs L3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -863.0 log_World norot dead 708 nofield
# LENS 1. Best L1 settings: 7.2 kV for 12 keV muons
/musr/command globalfield Lens1EField 251.5 0.0 -1678.0 fromfile 2DE L1_Erz.map log_L1EField 9.0
# LENS 2. Best L3 settings: 8.4 kV for 12 keV muons
/musr/command globalfield Lens3EField 0. 0. -863.0 fromfile 2DE L3_Erz.map log_L3EField 10.5
# Spin rotator
# Electric field should be 370mm plates
# Magnetic field should be 260mm poles as measured srlem_ext.map
/musr/command globalfield Ele_field 0. 0. -1284.5 fromfile 3DE E_Sep_P37.5cm.map log_SREField 2.717
/musr/command globalfield Mag_field 0. 0. -1284.51 fromfile 3DB srlem_ext.map log_SRBField -0.00692
# 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
# 57.15mm upstream center
/musr/command construct box TriggE0 45 45 5 G4_Galactic 0 0 -555.1 log_World norot dead 630 nofield
# 48mm upstream center
/musr/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -543. log_World norot dead 631 nofield
# 2.25mm downstream center
/musr/command construct box TriggE2 45 45 4.9479 G4_Galactic 0 0 -492.75 log_World rotTrig dead 632 nofield
# 54mm downstream center
/musr/command construct box TriggE3 45 45 4 G4_Galactic 0 0 -441.0 log_World norot dead 633
### Electric field at TRIGGER Detector TD: Three different uniform fields, 2012 settings
/musr/command globalfield Trigg0_field 45 45 5 uniform 0. 0. -555.1 log_TriggE0 0 0 0 0 0 0.338
/musr/command globalfield Trigg1_field 45 45 4 uniform 0. 0. -543. log_TriggE1 0 0 0 0 0 -0.02375
/musr/command globalfield Trigg2_field 45 45 4.9497 uniform 0. 0. -492.75 log_TriggE2 0 0 0 0 0 0.041416
/musr/command globalfield Trigg3_field 45 45 4 uniform 0. 0. -441.0 log_TriggE3 0 0 0 0 0 -0.45
# Trigger Lens, L3, (available space from -437 to -347, we use 70mm of that)
/musr/command construct tubs TL3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -382.0 log_World norot dead 706 nofield
/musr/command globalfield ColRingEField 0. 0. -382.0 fromfile 2DE CR7cm_Grid.map log_TL3EField 12.0
### Electric field at RING ANODE - from 3DE field map
# To create an arbitrary configuration, switch on all fields and set different potentials.
/musr/command globalfield RngAnT_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_T 11.9
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 11.9
/musr/command globalfield RngAnB_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_B 11.9
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 11.9
### 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_convMap.map log_SBField 0.
### Electric field at the sample
/musr/command construct tubs SEField 0 0.01 0.005 0 360 G4_Galactic 0.0 0.0 15.9 log_World norot dead 710 nofield
/musr/command globalfield SampleEField 0. 0. 15.9 fromfile 2DE SamplePlate_2DE.map log_SEField 0.0
# Set parameters for particle tracking in an EM field
/musr/command globalfield setparameter SetLargestAcceptableStep 5
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
# TESTING EM FIELD
/musr/command globalfield printFieldValueAtPoint 0. 0. 0.
/musr/command globalfield printFieldValueAtPoint 0. 35. -670.
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.10
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
#/musr/command process addModel mu+ G4MuMultipleScattering G4WentzelVIModel 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ musrMuEnergyLossLandau -1 -1 1
# parameters for Landau energy loss distribution, LandauSigma corresponds to the width of the distibution
/musr/command SetLandauMPV 0.01
/musr/command SetLandauSigma 0.3
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#/musr/command process addDiscreteProcess mu+ G4CoulombScattering
#/musr/command process addProcess mu+ G4UserSpecialCuts -1 -1 3
#/musr/command process addProcess mu+ G4StepLimiter -1 -1 4
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
#/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
#/musr/command signalSeparationTime 0.1
#
/musr/run/randomOption 1
################################################################################################################
# -- Setting simulation PARAMETERS --
################################################################################################################
# Set the overall range cut (default 0.1 mm)
#*/run/setCut 1 mm
# Set the range cut on particular volumes (in mm)
#/musr/command SetUserLimits log_CFoil 1e-8 -1 -1 -1 -1
#*/musr/command SetUserLimits log_target 0.01
#*/musr/command SetUserLimits log_targetscint 0.01
#*/musr/command SetUserLimits log_cryostatscint 0.01
# Set particle energy cuts on particular volumes (in eV)
#/musr/command SetUserLimits log_World ustepMax(mm) utrakMax(mm) utimeMax(ns) uekinMin(MeV) urangMin(mm)
#/musr/command SetUserLimits log_World -1 -1 -1 1e-7 -1
# Geant4 10.2
#------------
/process/em/lowestMuHadEnergy 1e-6 MeV
# Store ALL the events in a ROOT tree or just the interesting ones? (default is true)
#*/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
# Override runID number
#*/musr/run/runID 21
# Set the frequency of event printing
/musr/run/howOftenToPrintEvent 100
# 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
/musr/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
#*/control/execute visdawn.mac
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
#/musr/command rootOutput weight off
#/musr/command rootOutput BFieldAtDecay off
#/musr/command rootOutput muIniPosX off
#/musr/command rootOutput muIniPosY off
#/musr/command rootOutput muIniPosZ off
#/musr/command rootOutput muIniMomX off
#/musr/command rootOutput muIniMomY off
#/musr/command rootOutput muIniMomZ off
#/musr/command rootOutput muIniPolX off
#/musr/command rootOutput muIniPolY off
#/musr/command rootOutput muIniPolZ off
#/musr/command rootOutput muDecayDetID off
#/musr/command rootOutput muDecayPosX off
#/musr/command rootOutput muDecayPosY off
#/musr/command rootOutput muDecayPosZ off
#/musr/command rootOutput muDecayTime off
#/musr/command rootOutput muDecayPolX off
#/musr/command rootOutput muDecayPolY off
#/musr/command rootOutput muDecayPolZ off
#/musr/command rootOutput muTargetTime off
#/musr/command rootOutput muTargetPolX off
#/musr/command rootOutput muTargetPolY off
#/musr/command rootOutput muTargetPolZ off
#/musr/command rootOutput muM0Time off
#/musr/command rootOutput muM0PolX off
#/musr/command rootOutput muM0PolY off
#/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
#/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
/musr/command storeOnlyEventsWithHits false
################################################################################################################
# -- Setting PARTICLE GUN parameters --
################################################################################################################
# Default momentum direction: 001, i.e. 0z.
# Default muon soin 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 -1144 mm, acceleration starts at -1154.15 mm
#/gun/vertex 0. 0. -2119.5 mm
/gun/vertex 499 0. -1678.0 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 6.83 6.83 0 mm
/gun/vertexsigma -15 -15 0 mm
#/gun/boxboundarycentre 499 0 -1678 mm
#/gun/boxboundary 15 15 1 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
# Set muon energy before hitting TD; a constant field in front of the C-foil accelerates the muons
# to add 3.38 keV
/gun/kenergy 15.0 eV
# Set beam momentum direction
/gun/direction -1.0 0.0 0.0
# Set muon spin direction: +10deg or 0
/gun/muonPolarizVector 0.9848 0 0.17365
#/gun/muonPolarizVector 1 0 0
# Other useful test parameters:
#------------------Oct.20 2015------------------------------------
# kenergy= 15 eV Pmu= 0.xxxMeV/c ==> sigma = /2.354 = MeV/c
#/gun/momentumsmearing 0.07508 MeV
/gun/momentumsmearing 0.016 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#*/gun/momentumboundary 20 40 0 MeV
#---/gun/tilt: xangle, yangle, dummy
#*/gun/tilt 0 0.0 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.0 deg
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#*/gun/decaytimelimits 10400 10420 2197.03 ns
#/gun/tiltsigma 1.4 1.4 0 deg
/gun/tiltsigma 0 0 -1.0 deg
# Selectively inactivate or activate sensitive detectors
#*/hits/inactivate /musr/ScintSD
# Only for code debugging!
/tracking/verbose 0
# BEAM ON
#/run/beamOn 1000000
#/run/beamOn 10
/run/beamOn 10000

View File

@@ -0,0 +1,950 @@
# Template suitable for beam profile detectioon with the spin rotator in place
# Zaher Salman 7/10/2010
#
# Thomas Prokscha 22/Nov/2012
# Moved sample stack on cryostat 3mm downstream to fit to positions in apparatus
# Changed positions of positron counters according to corrected drawing LEM 37.01.024 (19/Sep/2012)
#
# Position downstream detectors: z=+62.5mm original value: z=+66.5mm
# Position upstream detectors: z=-64.0mm original value: z=-60.0mm
#
# 2013 setup: 1mm Ti sample tube
#
# 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
#
# Ran Xiao 25/Sep/2014
# Start muons at moderator at x=499, assume cosA angular distribution, assume energy distribution
#
################################################################################################################
# -- ROTATION MATRICES --
################################################################################################################
# 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
/musr/command rotation rotRAnL 0 0 1 90
/musr/command rotation rotRAnD 0 0 1 180
# More Rotations
/musr/command rotation rotD1 0 0 1 11.250
/musr/command rotation rotD2 0 0 1 33.750
/musr/command rotation rotD3 0 0 1 56.250
/musr/command rotation rotD4 0 0 1 78.750
/musr/command rotation rotD5 0 0 1 101.250
/musr/command rotation rotD6 0 0 1 123.750
/musr/command rotation rotD7 0 0 1 146.250
/musr/command rotation rotD8 0 0 1 168.750
/musr/command rotation rotD9 0 0 1 191.250
/musr/command rotation rotD10 0 0 1 213.750
/musr/command rotation rotD11 0 0 1 236.250
/musr/command rotation rotD12 0 0 1 258.750
/musr/command rotation rotD13 0 0 1 281.250
/musr/command rotation rotD14 0 0 1 303.750
/musr/command rotation rotD15 0 0 1 326.250
/musr/command rotation rotD16 0 0 1 348.750
/musr/command rotation rotD17 0 0 1 11.250
/musr/command rotation rotD18 0 0 1 33.750
/musr/command rotation rotD19 0 0 1 56.250
/musr/command rotation rotD20 0 0 1 78.750
/musr/command rotation rotD21 0 0 1 101.250
/musr/command rotation rotD22 0 0 1 123.750
/musr/command rotation rotD23 0 0 1 146.250
/musr/command rotation rotD24 0 0 1 168.750
/musr/command rotation rotD25 0 0 1 191.250
/musr/command rotation rotD26 0 0 1 213.750
/musr/command rotation rotD27 0 0 1 236.250
/musr/command rotation rotD28 0 0 1 258.750
/musr/command rotation rotD29 0 0 1 281.250
/musr/command rotation rotD30 0 0 1 303.750
/musr/command rotation rotD31 0 0 1 326.250
/musr/command rotation rotD32 0 0 1 348.750
# Beam line bend at mirror
/musr/command rotation rotBend 0 1 0 -90
/musr/command rotation rotMirr 0 1 0 -45
/musr/command rotation rotMod 0 1 0 -1
################################################################################################################
# -- LEM GEOMETRY --
################################################################################################################
# WORLD = Laboratory reference frame, the origin is in the centre of the LEM sample tube
/musr/command construct box World 900 350 2600 G4_Galactic 0 0 0 no_logical_volume norot dead -1
/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 60 0.05 0 360 G4_Galactic 850 0 -1678 log_World rotBend dead 851
/musr/command construct tubs save1 0 60 0.05 0 360 G4_Galactic 800 0 -1678 log_World rotBend dead 852
/musr/command construct tubs save2 0 60 0.05 0 360 G4_Galactic 750 0 -1678 log_World rotBend dead 853
/musr/command construct tubs save3 0 60 0.05 0 360 G4_Galactic 700 0 -1678 log_World rotBend dead 854
/musr/command construct tubs save4 0 60 0.05 0 360 G4_Galactic 650 0 -1678 log_World rotBend dead 855
/musr/command construct tubs save5 0 60 0.05 0 360 G4_Galactic 600 0 -1678 log_World rotBend dead 856
/musr/command construct tubs save6 0 60 0.05 0 360 G4_Galactic 550 0 -1678 log_World rotBend dead 857
/musr/command construct tubs save7 0 60 0.05 0 360 G4_Galactic 500 0 -1678 log_World rotBend dead 858
/musr/command construct tubs save8 0 60 0.05 0 360 G4_Galactic 450 0 -1678 log_World rotBend dead 859
/musr/command construct tubs save9 0 60 0.05 0 360 G4_Galactic 400 0 -1678 log_World rotBend dead 860
/musr/command construct tubs save10 0 60 0.05 0 360 G4_Galactic 350 0 -1678 log_World rotBend dead 861
/musr/command construct tubs save11 0 60 0.05 0 360 G4_Galactic 300 0 -1678 log_World rotBend dead 862
/musr/command construct tubs save12 0 60 0.05 0 360 G4_Galactic 240 0 -1678 log_World rotBend dead 863
/musr/command construct tubs save13 0 60 0.05 0 360 G4_Galactic 200 0 -1678 log_World rotBend dead 864
/musr/command construct tubs save14 0 60 0.05 0 360 G4_Galactic 150 0 -1678 log_World rotBend dead 865
/musr/command construct tubs save15 0 60 0.05 0 360 G4_Galactic 100 0 -1678 log_World rotBend dead 866
/musr/command construct tubs save16 0 60 0.05 0 360 G4_Galactic 70 0 -1678 log_World rotBend dead 867
/musr/command construct tubs save17 0 60 0.05 0 360 G4_Galactic 0 0 -1620 log_World norot dead 868
/musr/command construct tubs save18 0 60 0.05 0 360 G4_Galactic 0 0 -1600 log_World norot dead 869
/musr/command construct tubs save19 0 60 0.05 0 360 G4_Galactic 0 0 -1550 log_World norot dead 870
/musr/command construct tubs save20 0 60 0.05 0 360 G4_Galactic 0 0 -1500 log_World norot dead 871
/musr/command construct tubs save21 0 60 0.05 0 360 G4_Galactic 0 0 -1450 log_World norot dead 872
/musr/command construct tubs save22 0 60 0.05 0 360 G4_Galactic 0 0 -1400 log_World norot dead 873
/musr/command construct tubs save23 0 60 0.05 0 360 G4_Galactic 0 0 -1350 log_World norot dead 874
/musr/command construct tubs save24 0 60 0.05 0 360 G4_Galactic 0 0 -1300 log_World norot dead 875
/musr/command construct tubs save25 0 60 0.05 0 360 G4_Galactic 0 0 -1250 log_World norot dead 876
/musr/command construct tubs save26 0 60 0.05 0 360 G4_Galactic 0 0 -1200 log_World norot dead 877
/musr/command construct tubs save27 0 60 0.05 0 360 G4_Galactic 0 0 -1150 log_World norot dead 878
/musr/command construct tubs save28 0 60 0.05 0 360 G4_Galactic 0 0 -1100 log_World norot dead 879
/musr/command construct tubs save29 0 60 0.05 0 360 G4_Galactic 0 0 -1050 log_World norot dead 880
/musr/command construct tubs save30 0 60 0.05 0 360 G4_Galactic 0 0 -1000 log_World norot dead 881
/musr/command construct tubs save31 0 60 0.05 0 360 G4_Galactic 0 0 -950 log_World norot dead 882
/musr/command construct tubs save32 0 60 0.05 0 360 G4_Galactic 0 0 -900 log_World norot dead 883
/musr/command construct tubs save33 0 60 0.05 0 360 G4_Galactic 0 0 -850 log_World norot dead 884
/musr/command construct tubs save34 0 60 0.05 0 360 G4_Galactic 0 0 -800 log_World norot dead 885
/musr/command construct tubs save35 0 60 0.05 0 360 G4_Galactic 0 0 -750 log_World norot dead 886
/musr/command construct tubs save36 0 60 0.05 0 360 G4_Galactic 0 0 -700 log_World norot dead 887
/musr/command construct tubs save37 0 60 0.05 0 360 G4_Galactic 0 0 -650 log_World norot dead 888
/musr/command construct tubs save38 0 60 0.05 0 360 G4_Galactic 0 0 -600 log_World norot dead 889
/musr/command construct tubs save39 0 60 0.05 0 360 G4_Galactic 0 0 -525 log_World norot dead 890
/musr/command construct tubs save40 0 60 0.05 0 360 G4_Galactic 0 0 -450 log_World norot dead 891
/musr/command construct tubs save41 0 60 0.05 0 360 G4_Galactic 0 0 -420 log_World norot dead 892
/musr/command construct tubs save42 0 60 0.05 0 360 G4_Galactic 0 0 -400 log_World norot dead 893
/musr/command construct tubs save43 0 60 0.05 0 360 G4_Galactic 0 0 -350 log_World norot dead 894
/musr/command construct tubs save44 0 60 0.05 0 360 G4_Galactic 0 0 -300 log_World norot dead 895
/musr/command construct tubs save45 0 60 0.05 0 360 G4_Galactic 0 0 -250 log_World norot dead 896
/musr/command construct tubs save46 0 60 0.05 0 360 G4_Galactic 0 0 -200 log_World norot dead 897
/musr/command construct tubs save47 0 60 0.05 0 360 G4_Galactic 0 0 -150 log_World norot dead 898
/musr/command construct tubs save48 0 60 0.05 0 360 G4_Galactic 0 0 -100 log_World norot dead 899
/musr/command construct tubs save49 0 60 0.05 0 360 G4_Galactic 0 0 -50 log_World norot dead 900
/musr/command construct tubs save50 0 60 0.05 0 360 G4_Galactic 0 0 0 log_World norot dead 901
/musr/command construct tubs save51 0 60 0.05 0 360 G4_Galactic 0 0 16 log_World norot dead 902
/musr/command construct tubs save52 0 60 0.05 0 360 G4_Galactic 0 0 100 log_World norot dead 903
/musr/command construct tubs save53 0 60 0.05 0 360 G4_Galactic 0 0 150 log_World norot dead 904
/musr/command visattributes G4_Galactic invisible
################################################################################################################
# -- APD Scintillators --
################################################################################################################
# Detectors volume (0,0,0) coninsides with World (0,0,0)
/musr/command construct tubs DetV 80 105 133 0 360 G4_Galactic 0 0 0 log_World norot dead 100
/musr/command visattributes log_DetV invisible
# For final design set
# BackHW=60
# BackCR=-64.0, 19/Sep/2012
# ForwHW=65.5
# ForwCR=62.5, 19/Sep/2012
# Back inner sections (Upstream) (v.i.)
# Final design (30 Jun 09, 19 Sep 12) BackHW=60.0mm (Half width or length), BackCR=-4-BackHW=-64.0mm (Center z coordinate)
/musr/command construct trd90y ScD1 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 -17.265493 -64.0 log_DetV rotD1 musr/ScintSD 1
/musr/command construct trd90y ScD2 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 -49.167966 -64.0 log_DetV rotD2 musr/ScintSD 2
/musr/command construct trd90y ScD3 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 -73.585061 -64.0 log_DetV rotD3 musr/ScintSD 3
/musr/command construct trd90y ScD4 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 -86.799497 -64.0 log_DetV rotD4 musr/ScintSD 4
/musr/command construct trd90y ScD5 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 -86.799497 -64.0 log_DetV rotD5 musr/ScintSD 5
/musr/command construct trd90y ScD6 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 -73.585061 -64.0 log_DetV rotD6 musr/ScintSD 6
/musr/command construct trd90y ScD7 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 -49.167966 -64.0 log_DetV rotD7 musr/ScintSD 7
/musr/command construct trd90y ScD8 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 -17.265493 -64.0 log_DetV rotD8 musr/ScintSD 8
/musr/command construct trd90y ScD9 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 17.265493 -64.0 log_DetV rotD9 musr/ScintSD 9
/musr/command construct trd90y ScD10 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 49.167966 -64.0 log_DetV rotD10 musr/ScintSD 10
/musr/command construct trd90y ScD11 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 73.585061 -64.0 log_DetV rotD11 musr/ScintSD 11
/musr/command construct trd90y ScD12 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 86.799497 -64.0 log_DetV rotD12 musr/ScintSD 12
/musr/command construct trd90y ScD13 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 86.799497 -64.0 log_DetV rotD13 musr/ScintSD 13
/musr/command construct trd90y ScD14 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 73.585061 -64.0 log_DetV rotD14 musr/ScintSD 14
/musr/command construct trd90y ScD15 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 49.167966 -64.0 log_DetV rotD15 musr/ScintSD 15
/musr/command construct trd90y ScD16 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 17.265493 -64.0 log_DetV rotD16 musr/ScintSD 16
# Forward inner sections (Downstream) (h.i.)
# Final design (30 June 09, 19 Sep 12) ForwHW=65.5mm (Half width or length), ForwCR=-3+ForwHW=62.5mm (Center z coordinate)
/musr/command construct trd90y ScD17 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 -17.070403 62.5 log_DetV rotD17 musr/ScintSD 17
/musr/command construct trd90y ScD18 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 -48.612395 62.5 log_DetV rotD18 musr/ScintSD 18
/musr/command construct trd90y ScD19 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 -72.753591 62.5 log_DetV rotD19 musr/ScintSD 19
/musr/command construct trd90y ScD20 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 -85.818712 62.5 log_DetV rotD20 musr/ScintSD 20
/musr/command construct trd90y ScD21 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 -85.818712 62.5 log_DetV rotD21 musr/ScintSD 21
/musr/command construct trd90y ScD22 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 -72.753591 62.5 log_DetV rotD22 musr/ScintSD 22
/musr/command construct trd90y ScD23 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 -48.612395 62.5 log_DetV rotD23 musr/ScintSD 23
/musr/command construct trd90y ScD24 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 -17.070403 62.5 log_DetV rotD24 musr/ScintSD 24
/musr/command construct trd90y ScD25 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 17.070403 62.5 log_DetV rotD25 musr/ScintSD 25
/musr/command construct trd90y ScD26 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 48.612395 62.5 log_DetV rotD26 musr/ScintSD 26
/musr/command construct trd90y ScD27 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 72.753591 62.5 log_DetV rotD27 musr/ScintSD 27
/musr/command construct trd90y ScD28 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 85.818712 62.5 log_DetV rotD28 musr/ScintSD 28
/musr/command construct trd90y ScD29 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 85.818712 62.5 log_DetV rotD29 musr/ScintSD 29
/musr/command construct trd90y ScD30 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 72.753591 62.5 log_DetV rotD30 musr/ScintSD 30
/musr/command construct trd90y ScD31 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 48.612395 62.5 log_DetV rotD31 musr/ScintSD 31
/musr/command construct trd90y ScD32 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 17.070403 62.5 log_DetV rotD32 musr/ScintSD 32
# Back outer sections (v.a.)
/musr/command construct trd ScD33 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 -18.631126 -64.0 log_DetV rotD1 musr/ScintSD 33
/musr/command construct trd ScD34 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 -53.056957 -64.0 log_DetV rotD2 musr/ScintSD 34
/musr/command construct trd ScD35 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 -79.405348 -64.0 log_DetV rotD3 musr/ScintSD 35
/musr/command construct trd ScD36 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 -93.664994 -64.0 log_DetV rotD4 musr/ScintSD 36
/musr/command construct trd ScD37 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 -93.664994 -64.0 log_DetV rotD5 musr/ScintSD 37
/musr/command construct trd ScD38 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 -79.405348 -64.0 log_DetV rotD6 musr/ScintSD 38
/musr/command construct trd ScD39 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 -53.056957 -64.0 log_DetV rotD7 musr/ScintSD 39
/musr/command construct trd ScD40 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 -18.631126 -64.0 log_DetV rotD8 musr/ScintSD 40
/musr/command construct trd ScD41 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 18.631126 -64.0 log_DetV rotD9 musr/ScintSD 41
/musr/command construct trd ScD42 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 53.056957 -64.0 log_DetV rotD10 musr/ScintSD 42
/musr/command construct trd ScD43 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 79.405348 -64.0 log_DetV rotD11 musr/ScintSD 43
/musr/command construct trd ScD44 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 93.664994 -64.0 log_DetV rotD12 musr/ScintSD 44
/musr/command construct trd ScD45 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 93.664994 -64.0 log_DetV rotD13 musr/ScintSD 45
/musr/command construct trd ScD46 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 79.405348 -64.0 log_DetV rotD14 musr/ScintSD 46
/musr/command construct trd ScD47 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 53.056957 -64.0 log_DetV rotD15 musr/ScintSD 47
/musr/command construct trd ScD48 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 18.631126 -64.0 log_DetV rotD16 musr/ScintSD 48
# Forward outer sections (h.a.)
/musr/command construct trd ScD49 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 -18.436035 62.5 log_DetV rotD1 musr/ScintSD 49
/musr/command construct trd ScD50 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 -52.501387 62.5 log_DetV rotD2 musr/ScintSD 50
/musr/command construct trd ScD51 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 -78.573878 62.5 log_DetV rotD3 musr/ScintSD 51
/musr/command construct trd ScD52 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 -92.684209 62.5 log_DetV rotD4 musr/ScintSD 52
/musr/command construct trd ScD53 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 -92.684209 62.5 log_DetV rotD5 musr/ScintSD 53
/musr/command construct trd ScD54 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 -78.573878 62.5 log_DetV rotD6 musr/ScintSD 54
/musr/command construct trd ScD55 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 -52.501387 62.5 log_DetV rotD7 musr/ScintSD 55
/musr/command construct trd ScD56 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 -18.436035 62.5 log_DetV rotD8 musr/ScintSD 56
/musr/command construct trd ScD57 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 18.436035 62.5 log_DetV rotD9 musr/ScintSD 57
/musr/command construct trd ScD58 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 52.501387 62.5 log_DetV rotD10 musr/ScintSD 58
/musr/command construct trd ScD59 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 78.573878 62.5 log_DetV rotD11 musr/ScintSD 59
/musr/command construct trd ScD60 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 92.684209 62.5 log_DetV rotD12 musr/ScintSD 60
/musr/command construct trd ScD61 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 92.684209 62.5 log_DetV rotD13 musr/ScintSD 61
/musr/command construct trd ScD62 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 78.573878 62.5 log_DetV rotD14 musr/ScintSD 62
/musr/command construct trd ScD63 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 52.501387 62.5 log_DetV rotD15 musr/ScintSD 63
/musr/command construct trd ScD64 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 18.436035 62.5 log_DetV rotD16 musr/ScintSD 64
# Structural support inside the detectors vessel
# Carbon fibre, inner radius 80, thickness 2 mm.
# Additional Al plate removed, 2 mm thick for h.i and h.a and 3 mm thick for v.i. and v.a
/musr/command construct tubs hInShell 80.0 82.0 65.5 0 360 G4_C 0 0 62 log_DetV norot dead 70
/musr/command construct tubs vInShell 80.0 82.0 60.0 0 360 G4_C 0 0 -64.5 log_DetV norot dead 70
# Visual attributes (optional)
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE green
#/musr/command visattributes log_ScD49 green
#/musr/command visattributes log_ScD50 green
#/musr/command visattributes log_test red
################################################################################################################
# Sample vacuum/tube up to gate valve - Can host either the Cryostat or the MCP2
################################################################################################################
# Vacuum space
# /musr/command construct tubs SamV 0 75.0 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100
# Sample tube
#/musr/command construct tubs SamS 75.0 77.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# 2012: 2mm Ti tube, 2013: 1mm
/musr/command construct tubs SamS 75.0 76.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# F160 - 160 CF flange upstream of MCP2 tube
/musr/command construct tubs F160 78.0 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 102
# F100 (Blank end flange)
/musr/command construct tubs F100 0 75.0 10 0 360 Steel 0 0 172.0 log_World norot dead 103
# 200 CF flange upstream of MCP2 tube covering the whole length of the gate valve chamber.
/musr/command construct tubs GATS 103.25 126.5 92.5 0 360 Steel 0 0 -254.5 log_World norot dead 371
# F200 - 200 CF flange upstream of MCP2 tube to connect to gate valve chamber
/musr/command construct tubs F200 76.5 103.25 12 0 360 Steel 0 0 -174.0 log_World norot dead 372
# Visual attributes (optional)
#/musr/command visattributes log_SamV invisible
/musr/command visattributes log_SamS oxsteel
/musr/command visattributes log_F160 oxsteel
#/musr/command visattributes log_F100 oxsteel
/musr/command visattributes log_GATS oxsteel
/musr/command visattributes log_F200 oxsteel
################################################################################################################
# MCP - Micro Channel Plate Detector MCP2
# mcpv_z = -92.5 mm!
#
# We have a 324 mm long sample tube;
# the MCP2 front side is at 142 mm from the end of the sample tube.
# the front face of the sample plate of the cryostat is 145 mm from the end of the sample tube.
#
################################################################################################################
#
# MCPM1 - MCP Macor ring 1
# MCPD - electron multiplying glass disk (also known as target)
# Sensitive surface at z = 20 mm wrt. World
# MCPM2 - MCP Macor ring 2
# /musr/command construct tubs MCPM1 24 32.5 0.75 0 360 Macor 0 0 19.25 log_World norot dead 251
# Use it either as (DMCP-musr/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz.
# /musr/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 21.5 log_World norot dead 252
# /musr/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 23.75 log_World norot dead 253
# NOTE: To intercept ALL the incoming muons, comment the DMCP and MCPM1 lines above and uncomment this one:
#*aa/musr/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs target 0 21.0 1.5 0 360 MCPglass 0 0 114 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs saveTarget 0 75.0 0.2 0 360 G4_Galactic 0 0 110.79 log_SamV norot dead 222
#
# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole)
# MCVR - "Vacuum Ring" (circular hole)
# /musr/command construct box MCSR 36.5 36.5 1 Steel 0 0 25.5 log_World norot dead 254
# /musr/command construct tubs MCVR 0 27.5 1 0 360 G4_Galactic 0 0 0 log_MCSR norot dead 255
# 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
# /musr/command construct box MCPA 36.5 36.5 4 Steel 0 0 37 log_World norot dead 256
# /musr/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 257
# /musr/command construct tubs ANVA2 0 27.5 1.5 0 360 G4_Galactic 0 0 2.5 log_MCPA norot dead 258
# MCSS - MCP Stainless Steel Support Ring
# /musr/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 69.8 log_World norot dead 259
# MCP2 visual attributes (optional)
#/musr/command visattributes log_DMCP MCP_style
#*/musr/command visattributes log_target MCP_style
#*/musr/command visattributes log_MCPM1 MACOR_style
#*------ /musr/command visattributes log_MCPM2 MACOR_style
################################################################################################################
# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm)
#
# sample plate front face is at z = 17mm:
# cold finger distance to CF100: 130mm
# 5mm base plate + 6mm sapphire + 4mm sample plate = 15mm
# sample plate front face from CF100: 145mm
# z-position of sample plate front face: 324/2-145mm = 17mm
# --> sample plate center is at 17+2=19mm
#
################################################################################################################
# Dimensions for large/small sample plates SamPL=35/21 and SaphPL=SamPL35-5
/musr/command construct tubs target 0 35 2 0 360 G4_Al 0 0 19.0 log_World norot dead 251
/musr/command construct tubs SAPH 0 30 3 0 360 G4_ALUMINUM_OXIDE 0 0 24.0 log_World norot dead 252
/musr/command construct tubs SAH1 0 35 2.5 0 360 G4_Al 0 0 29.5 log_World norot dead 253
# Special save target volume
/musr/command construct tubs saveTarget 0 40 0.05 0 360 G4_Galactic 0 0 16.9 log_World norot dead 253
# Other components of the cryostat (dimensions and position of CRY4 are only approx. because unknown)
# COld Finger
/musr/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 37.0 log_World norot dead 261
# End plate of cryostat (7 mm thick, 30 mm diameter)
/musr/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 45.5 log_World norot dead 262
# Heat exchanger (assuming a 10 mm opening - Original dimensions not known.) # OLD pos. 160.0
/musr/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 74.0 log_World norot dead 263
# Mounting ring for He-shield
/musr/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 54.0 log_World norot dead 264
# 2 mm thick plate for mounting ring. This is just to close the downstream side.
/musr/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 54.0 log_World norot dead 265
# Radiation shield
/musr/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 19.0 log_World norot dead 266
# Front part of the radiation shield
/musr/command construct tubs CRSH2 30 48 0.5 0 360 G4_Cu 0 0 -26.5 log_World norot dead 267
# Electrical Field Guard Rings (distance between the guard rings: 16 mm)
# /musr/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 -13.5 log_World norot dead 271
# /musr/command construct tubs Guard2 29 38 1.5 0 360 G4_Cu 0 0 2.5 log_World norot dead 272
# Cryostat visual attributes (optional)
/musr/command visattributes log_SAH1 oxsteel
#/musr/command visattributes log_SAH2 oxsteel
/musr/command visattributes log_target oxsteel
/musr/command visattributes log_SAPH MACOR_style
#/musr/command visattributes log_SAH3 oxsteel
/musr/command visattributes log_CRSH yellow
/musr/command visattributes log_CRSH2 yellow
#/musr/command visattributes log_test red
################################################################################################################
# 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
/musr/command construct cons RA_EU 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World norot dead 801
/musr/command construct cons RA_MU 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World norot dead 802
/musr/command construct cons RA_ER 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnR dead 803
/musr/command construct cons RA_MR 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnR dead 804
/musr/command construct cons RA_ED 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnD dead 805
/musr/command construct cons RA_MD 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnD dead 806
/musr/command construct cons RA_EL 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnL dead 807
/musr/command construct cons RA_ML 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnL dead 808
# 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_T 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 822
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.02 log_World rotRAnR dead 824
/musr/command construct tubs RA_B 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 826
/musr/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.06 log_World rotRAnL dead 828
# 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 831
# Ring Anodes visual attributes (optional)
/musr/command visattributes log_RA_G invisible
#/musr/command visattributes log_RA_G Grid_style
################################################################################################################
# Trigger - Trigger Detector # Triggerz = -1092 mm; total length of TD is 110 mm; carbon foil at -1144 mm.
################################################################################################################
# Trigger volume
/musr/command construct tubs TrigV 90 127 148 0 360 G4_Galactic 0 0 -495 log_World norot dead 600
# Trigger tube
/musr/command construct tubs TrigS 100 103 148 0 360 Steel 0 0 0 log_TrigV norot dead 601
# TF - Trigger tube flanges
/musr/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 136 log_TrigV norot dead 611
/musr/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -136 log_TrigV norot dead 612
# trigger foil is 52-55mm upstream of TrigV center
# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm).
# USE THE NAME CFoil or coulombCFoil, otherwise musrMuFormation won't work!
#/musr/command construct box CFoil 60 60 0.0000025 G4_GRAPHITE 0 0 -550 log_World norot dead 621
/musr/command construct box CFoil 60 60 0.000002 G4_GRAPHITE 0 0 -550 log_World norot dead 621
# 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 musrDetectorConstruction.cc and set any density.
# Trigger visual attributes (optional)
/musr/command visattributes log_TrigV oxsteel
/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_saveAfterTD darkred
# Trigger Lens, L3, center -382 length 70mm radius 65mm.
/musr/command construct tubs TL3S 65.0 70.0 35.0 0 360 G4_Galactic 0 0 -382 log_World norot dead 706 nofield
/musr/command visattributes log_TL3S red
# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL.
# E.g. /musr/command visattributes Steel red
################################################################################################################
# L2 - 2nd Einzel Lens # L3z = -56.7 cm. (it was "L3" in 2011 and before)
# Lens Gap = 12.0 mm => G/D = 12/130 ~ 0.1 (Lens Gap = gap between Ground and Anode, D - Diameter)
################################################################################################################
# L3 volume
/musr/command construct tubs L3V 65 127 220 0 360 G4_Galactic 0 0 -863 log_World norot dead 400
# Lens 3 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 720 mm)
/musr/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 0 log_L3V norot dead 401
# Lens 3 Flange 1, z = L3z + 208 mm
/musr/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -208 log_L3V norot dead 402
# Lens 3 Flange 2, z = L3z - 208 mm
/musr/command construct tubs L3F2 103 126.5 12 0 360 Steel 0 0 208 log_L3V norot dead 403
# GPn - Ground Potential Electrodes
# n = 1-4 (further from TD) and 5-8 (closer to TD) - components of the Ground Electrodes
# Ground Electrode (inner dia: 130 mm, outer dia: 134 mm, length: 133 mm)
/musr/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 421
# Outer electrode surface (LN2 cooling vessel)
/musr/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 422
# First ring cap
/musr/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3V norot dead 423
# Second ring cap
/musr/command construct tubs L3GP4 67 81 4 0 360 Steel 0 0 71.0 log_L3V norot dead 424
/musr/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 431
/musr/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 432
/musr/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3V norot dead 433
/musr/command construct tubs L3GP8 67 81 4 0 360 Steel 0 0 -71.0 log_L3V norot dead 434
# HP - High Potential Electrode (Central Anode - usually at +8.7 kV, for a 15 keV muon beam)
/musr/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3V norot dead 451
# Lens 3 visual attributes (optional)
/musr/command visattributes log_L3V invisible
/musr/command visattributes log_L3ST oxsteel
/musr/command visattributes log_L3F1 oxsteel
/musr/command visattributes log_L3F2 oxsteel
/musr/command visattributes log_L3HP darkred
################################################################################################################
# -- SPIN ROTATOR GEOMETRY --
################################################################################################################
# Spin Rotator volume
/musr/command construct tubs SRENV 50 320 201.5 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 100
/musr/command visattributes log_SRENV invisible
# Electromagnet with iron yoke
# U - up, D - down, L - left, R - right (with respect to muon's view - momentum direction)
/musr/command construct box NPole 200 10 150 G4_Fe 0 85 0 log_SRENV norot dead 201
/musr/command construct box NYoke 150 22.5 50 G4_Fe 0 117.5 0 log_SRENV norot dead 202
/musr/command construct box NConn 225 17.5 190.0 G4_Fe 0 157.5 0 log_SRENV norot dead 203
/musr/command construct box SPole 200 10 150 G4_Fe 0 -85 0 log_SRENV norot dead 205
/musr/command construct box SYoke 150 22.5 50 G4_Fe 0 -117.5 0 log_SRENV norot dead 206
/musr/command construct box SConn 225 17.5 190.0 G4_Fe 0 -157.5 0 log_SRENV norot dead 207
# Front mirror plate
/musr/command construct box FShU 225 50 5 G4_Fe 0 125 -195.0 log_SRENV norot dead 301
/musr/command construct box FShD 225 50 5 G4_Fe 0 -125 -195.0 log_SRENV norot dead 302
/musr/command construct box FShL 75 75 5 G4_Fe 150 0 -195.0 log_SRENV norot dead 303
/musr/command construct box FShR 75 75 5 G4_Fe -150 0 -195.0 log_SRENV norot dead 304
# Back mirror plate
/musr/command construct box BShU 225 50 5 G4_Fe 0 125 195.0 log_SRENV norot dead 321
/musr/command construct box BShD 225 50 5 G4_Fe 0 -125 195.0 log_SRENV norot dead 322
/musr/command construct box BShL 75 75 5 G4_Fe 150 0 195.0 log_SRENV norot dead 323
/musr/command construct box BShR 75 75 5 G4_Fe -150 0 195.0 log_SRENV norot dead 324
# Top coils
/musr/command construct box TCoil1 170 22.5 10 G4_Cu 0 117.5 -60 log_SRENV norot dead 401
/musr/command construct box TCoil2 170 22.5 10 G4_Cu 0 117.5 60 log_SRENV norot dead 402
/musr/command construct box TCoil3 10 22.5 50 G4_Cu 160 117.5 0 log_SRENV norot dead 403
/musr/command construct box TCoil4 10 22.5 50 G4_Cu -160 117.5 0 log_SRENV norot dead 404
# Bottom coils
/musr/command construct box BCoil1 170 22.5 10 G4_Cu 0 -117.5 -60 log_SRENV norot dead 421
/musr/command construct box BCoil2 170 22.5 10 G4_Cu 0 -117.5 60 log_SRENV norot dead 422
/musr/command construct box BCoil3 10 22.5 50 G4_Cu 160 -117.5 0 log_SRENV norot dead 423
/musr/command construct box BCoil4 10 22.5 50 G4_Cu -160 -117.5 0 log_SRENV norot dead 424
# Capacitor
/musr/command construct box Cap_p 0.5 50 150 Brass 55 0 0 log_SRENV norot dead 501
/musr/command construct box Cap_n 0.5 50 150 Brass -55 0 0 log_SRENV norot dead 502
#*/musr/command construct box Uniform 49 49 150 G4_Galactic 0 0 0 log_SRENV norot dead 503
/musr/command construct tubs RodCapUp 0 5 150 90 180 Brass 55 55 0 log_SRENV norot dead 504
/musr/command construct tubs RodCapUn 0 5 150 -90 180 Brass -55 55 0 log_SRENV norot dead 505
/musr/command construct tubs RodCapDp 0 5 150 90 180 Brass 55 -55 0 log_SRENV norot dead 506
/musr/command construct tubs RodCapDn 0 5 150 -90 180 Brass -55 -55 0 log_SRENV norot dead 507
# Rods
/musr/command construct tubs RodPosU 0 5 150 0 360 Brass 27.5 55 0 log_SRENV norot dead 511
/musr/command construct tubs Rod0U 0 5 150 0 360 Brass 0 55 0 log_SRENV norot dead 512
/musr/command construct tubs RodNegU 0 5 150 0 360 Brass -27.5 55 0 log_SRENV norot dead 513
/musr/command construct tubs RodPosD 0 5 150 0 360 Brass 27.5 -55 0 log_SRENV norot dead 514
/musr/command construct tubs Rod0D 0 5 150 0 360 Brass 0 -55 0 log_SRENV norot dead 515
/musr/command construct tubs RodNegD 0 5 150 0 360 Brass -27.5 -55 0 log_SRENV norot dead 516
# Vacuum vessel
/musr/command construct box TVac1 72.5 2.5 191.5 Steel 0 72.5 0 log_SRENV norot dead 601
/musr/command construct box TVac2 2.5 70.0 191.5 Steel 72.5 0 0 log_SRENV norot dead 602
/musr/command construct box TVac3 72.5 2.5 191.5 Steel 0 -72.5 0 log_SRENV norot dead 603
/musr/command construct box TVac4 2.5 70.0 191.5 Steel -72.5 0 0 log_SRENV norot dead 604
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For Spin Rotator
/musr/command construct tubs SREField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 630 nofield
/musr/command construct tubs SRBField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.51 log_World norot dead 631 nofield
/musr/command visattributes G4_Cu red
/musr/command visattributes G4_Fe blue
/musr/command visattributes Brass yellow
################################################################################################################
# Lens 1 - 1st Einzel Lens
################################################################################################################
# L1ENV - Lens 1 envelope - for easy positioning of lens parts (outer dia: 100 mm, length: 300 mm)
#/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 0 0 -1929.5 log_World norot dead 600
/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend 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
# n = 2 - Ground Electrode 2 (closer to SR).
/musr/command construct tubs L1GP2 40 44 50 0 360 Steel 0 0 100 log_L1ENV norot dead 653
# HP - High Potential Electrode (Central Anode - usually at +8.5 kV, for a 15 keV muon beam)
/musr/command construct tubs L1HP 40 44 40 0 360 Steel 0 0 0 log_L1ENV norot dead 652
# Lens 1 visual attributes (optional)
/musr/command visattributes log_L1HP darkred
################################################################################################################
# Electrostatic field at accelerator after moderator
################################################################################################################
#
/musr/command construct box Grid1 9.1 25 25 G4_Galactic 489.9 0.0 -1678.0 log_World rotMod dead 212
/musr/command globalfield Grid1_field 9.1 25 25 uniform 489.9 0.0 -1678.0 log_Grid1 0 0 0 -0.2527 0 0
/musr/command construct box Grid2 5 24 24 G4_Galactic 475.8 0.0 -1678.0 log_World rotMod dead 214
/musr/command globalfield Grid2_field 5 24 24 uniform 475.8 0.0 -1678.0 log_Grid2 0 0 0 -1.04 0 0
/musr/command globalfield printFieldValueAtPoint 489.9 0.0 -1678.0
/musr/command globalfield printFieldValueAtPoint 475.8 0.0 -1678.0
################################################################################################################
# Electrostatic mirror at bend
################################################################################################################
# MRENV
/musr/command construct box MirrE 65 65 10 G4_Galactic 14.14213562 0.0 -1678.0 log_World rotMirr dead 200
/musr/command globalfield Mirr_field 65 65 10 uniform 14.14213562 0.0 -1678.0 log_MirrE 0 0 0 0 0 0.75
###################################################################################
################### E L E C T R O M G N E T I C F I E L D S ##################
###################################################################################
# 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!
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For L1
/musr/command construct tubs L1EField 0 0.01 0.005 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend dead 706 nofield
# For L2 (L3 before 2012)
/musr/command construct tubs L3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -863.0 log_World norot dead 708 nofield
# LENS 1. Best L1 settings: 7.2 kV for 12 keV muons
/musr/command globalfield Lens1EField 251.5 0.0 -1678.0 fromfile 2DE L1_Erz.map log_L1EField 9.0
# LENS 2. Best L3 settings: 8.4 kV for 12 keV muons
/musr/command globalfield Lens3EField 0. 0. -863.0 fromfile 2DE L3_Erz.map log_L3EField 10.5
# Spin rotator
# Electric field should be 370mm plates
# Magnetic field should be 260mm poles as measured srlem_ext.map
/musr/command globalfield Ele_field 0. 0. -1284.5 fromfile 3DE E_Sep_P37.5cm.map log_SREField 2.717
/musr/command globalfield Mag_field 0. 0. -1284.51 fromfile 3DB srlem_ext.map log_SRBField -0.00692
# 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
# 57.15mm upstream center
/musr/command construct box TriggE0 45 45 5 G4_Galactic 0 0 -555.1 log_World norot dead 630 nofield
# 48mm upstream center
/musr/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -543. log_World norot dead 631 nofield
# 2.25mm downstream center
/musr/command construct box TriggE2 45 45 4.9479 G4_Galactic 0 0 -492.75 log_World rotTrig dead 632 nofield
# 54mm downstream center
/musr/command construct box TriggE3 45 45 4 G4_Galactic 0 0 -441.0 log_World norot dead 633
### Electric field at TRIGGER Detector TD: Three different uniform fields, 2012 settings
/musr/command globalfield Trigg0_field 45 45 5 uniform 0. 0. -555.1 log_TriggE0 0 0 0 0 0 0.338
/musr/command globalfield Trigg1_field 45 45 4 uniform 0. 0. -543. log_TriggE1 0 0 0 0 0 -0.02375
/musr/command globalfield Trigg2_field 45 45 4.9497 uniform 0. 0. -492.75 log_TriggE2 0 0 0 0 0 0.041416
/musr/command globalfield Trigg3_field 45 45 4 uniform 0. 0. -441.0 log_TriggE3 0 0 0 0 0 -0.45
# Trigger Lens, L3, (available space from -437 to -347, we use 70mm of that)
/musr/command construct tubs TL3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -382.0 log_World norot dead 706 nofield
/musr/command globalfield ColRingEField 0. 0. -382.0 fromfile 2DE CR7cm_Grid.map log_TL3EField 12.0
### Electric field at RING ANODE - from 3DE field map
# To create an arbitrary configuration, switch on all fields and set different potentials.
/musr/command globalfield RngAnT_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_T 11.9
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 11.9
/musr/command globalfield RngAnB_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_B 11.9
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 11.9
### 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_convMap.map log_SBField 0.
### Electric field at the sample
/musr/command construct tubs SEField 0 0.01 0.005 0 360 G4_Galactic 0.0 0.0 15.9 log_World norot dead 710 nofield
/musr/command globalfield SampleEField 0. 0. 15.9 fromfile 2DE SamplePlate_2DE.map log_SEField 0.0
# Set parameters for particle tracking in an EM field
/musr/command globalfield setparameter SetLargestAcceptableStep 5
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
# TESTING EM FIELD
/musr/command globalfield printFieldValueAtPoint 0. 0. 0.
/musr/command globalfield printFieldValueAtPoint 0. 35. -670.
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.10
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
#/musr/command process addModel mu+ G4MuMultipleScattering G4WentzelVIModel 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ musrMuEnergyLossLandau -1 -1 1
# parameters for Landau energy loss distribution, LandauSigma corresponds to the width of the distibution
/musr/command SetLandauMPV 0.01
/musr/command SetLandauSigma 0.3
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#/musr/command process addDiscreteProcess mu+ G4CoulombScattering
#/musr/command process addProcess mu+ G4UserSpecialCuts -1 -1 3
#/musr/command process addProcess mu+ G4StepLimiter -1 -1 4
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
#/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
#/musr/command signalSeparationTime 0.1
#
/musr/run/randomOption 1
################################################################################################################
# -- Setting simulation PARAMETERS --
################################################################################################################
# Set the overall range cut (default 0.1 mm)
#*/run/setCut 1 mm
# Set the range cut on particular volumes (in mm)
#/musr/command SetUserLimits log_CFoil 1e-8 -1 -1 -1 -1
#*/musr/command SetUserLimits log_target 0.01
#*/musr/command SetUserLimits log_targetscint 0.01
#*/musr/command SetUserLimits log_cryostatscint 0.01
# Set particle energy cuts on particular volumes (in eV)
#/musr/command SetUserLimits log_World ustepMax(mm) utrakMax(mm) utimeMax(ns) uekinMin(MeV) urangMin(mm)
#/musr/command SetUserLimits log_World -1 -1 -1 1e-7 -1
# Geant4 10.2
#------------
/process/em/lowestMuHadEnergy 1e-6 MeV
# Store ALL the events in a ROOT tree or just the interesting ones? (default is true)
#*/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
# Override runID number
#*/musr/run/runID 21
# Set the frequency of event printing
/musr/run/howOftenToPrintEvent 100
# 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
/musr/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
#*/control/execute visdawn.mac
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
#/musr/command rootOutput weight off
#/musr/command rootOutput BFieldAtDecay off
#/musr/command rootOutput muIniPosX off
#/musr/command rootOutput muIniPosY off
#/musr/command rootOutput muIniPosZ off
#/musr/command rootOutput muIniMomX off
#/musr/command rootOutput muIniMomY off
#/musr/command rootOutput muIniMomZ off
#/musr/command rootOutput muIniPolX off
#/musr/command rootOutput muIniPolY off
#/musr/command rootOutput muIniPolZ off
#/musr/command rootOutput muDecayDetID off
#/musr/command rootOutput muDecayPosX off
#/musr/command rootOutput muDecayPosY off
#/musr/command rootOutput muDecayPosZ off
#/musr/command rootOutput muDecayTime off
#/musr/command rootOutput muDecayPolX off
#/musr/command rootOutput muDecayPolY off
#/musr/command rootOutput muDecayPolZ off
#/musr/command rootOutput muTargetTime off
#/musr/command rootOutput muTargetPolX off
#/musr/command rootOutput muTargetPolY off
#/musr/command rootOutput muTargetPolZ off
#/musr/command rootOutput muM0Time off
#/musr/command rootOutput muM0PolX off
#/musr/command rootOutput muM0PolY off
#/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
#/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
/musr/command storeOnlyEventsWithHits false
################################################################################################################
# -- Setting PARTICLE GUN parameters --
################################################################################################################
# Default momentum direction: 001, i.e. 0z.
# Default muon soin 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 -1144 mm, acceleration starts at -1154.15 mm
#/gun/vertex 0. 0. -2119.5 mm
/gun/vertex 499 0. -1678.0 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 6.83 6.83 0 mm
/gun/vertexsigma -15 -15 0 mm
#/gun/boxboundarycentre 499 0 -1678 mm
#/gun/boxboundary 15 15 1 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
# Set muon energy before hitting TD; a constant field in front of the C-foil accelerates the muons
# to add 3.38 keV
/gun/kenergy 15.0 eV
# Set beam momentum direction
/gun/direction -1.0 0.0 0.0
# Set muon spin direction: +10deg or 0
/gun/muonPolarizVector 0.9848 0 0.17365
#/gun/muonPolarizVector 1 0 0
# Other useful test parameters:
#------------------Oct.20 2015------------------------------------
# kenergy= 15 eV Pmu= 0.xxxMeV/c ==> sigma = /2.354 = MeV/c
#/gun/momentumsmearing 0.07508 MeV
/gun/momentumsmearing 0.016 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#*/gun/momentumboundary 20 40 0 MeV
#---/gun/tilt: xangle, yangle, dummy
#*/gun/tilt 0 0.0 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.0 deg
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#*/gun/decaytimelimits 10400 10420 2197.03 ns
#/gun/tiltsigma 1.4 1.4 0 deg
/gun/tiltsigma 0 0 -1.0 deg
# Selectively inactivate or activate sensitive detectors
#*/hits/inactivate /musr/ScintSD
# Only for code debugging!
/tracking/verbose 0
# BEAM ON
#/run/beamOn 1000000
#/run/beamOn 10
/run/beamOn 10000

View File

@@ -0,0 +1,950 @@
# Template suitable for beam profile detectioon with the spin rotator in place
# Zaher Salman 7/10/2010
#
# Thomas Prokscha 22/Nov/2012
# Moved sample stack on cryostat 3mm downstream to fit to positions in apparatus
# Changed positions of positron counters according to corrected drawing LEM 37.01.024 (19/Sep/2012)
#
# Position downstream detectors: z=+62.5mm original value: z=+66.5mm
# Position upstream detectors: z=-64.0mm original value: z=-60.0mm
#
# 2013 setup: 1mm Ti sample tube
#
# 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
#
# Ran Xiao 25/Sep/2014
# Start muons at moderator at x=499, assume cosA angular distribution, assume energy distribution
#
################################################################################################################
# -- ROTATION MATRICES --
################################################################################################################
# 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
/musr/command rotation rotRAnL 0 0 1 90
/musr/command rotation rotRAnD 0 0 1 180
# More Rotations
/musr/command rotation rotD1 0 0 1 11.250
/musr/command rotation rotD2 0 0 1 33.750
/musr/command rotation rotD3 0 0 1 56.250
/musr/command rotation rotD4 0 0 1 78.750
/musr/command rotation rotD5 0 0 1 101.250
/musr/command rotation rotD6 0 0 1 123.750
/musr/command rotation rotD7 0 0 1 146.250
/musr/command rotation rotD8 0 0 1 168.750
/musr/command rotation rotD9 0 0 1 191.250
/musr/command rotation rotD10 0 0 1 213.750
/musr/command rotation rotD11 0 0 1 236.250
/musr/command rotation rotD12 0 0 1 258.750
/musr/command rotation rotD13 0 0 1 281.250
/musr/command rotation rotD14 0 0 1 303.750
/musr/command rotation rotD15 0 0 1 326.250
/musr/command rotation rotD16 0 0 1 348.750
/musr/command rotation rotD17 0 0 1 11.250
/musr/command rotation rotD18 0 0 1 33.750
/musr/command rotation rotD19 0 0 1 56.250
/musr/command rotation rotD20 0 0 1 78.750
/musr/command rotation rotD21 0 0 1 101.250
/musr/command rotation rotD22 0 0 1 123.750
/musr/command rotation rotD23 0 0 1 146.250
/musr/command rotation rotD24 0 0 1 168.750
/musr/command rotation rotD25 0 0 1 191.250
/musr/command rotation rotD26 0 0 1 213.750
/musr/command rotation rotD27 0 0 1 236.250
/musr/command rotation rotD28 0 0 1 258.750
/musr/command rotation rotD29 0 0 1 281.250
/musr/command rotation rotD30 0 0 1 303.750
/musr/command rotation rotD31 0 0 1 326.250
/musr/command rotation rotD32 0 0 1 348.750
# Beam line bend at mirror
/musr/command rotation rotBend 0 1 0 -90
/musr/command rotation rotMirr 0 1 0 -45
/musr/command rotation rotMod 0 1 0 -1
################################################################################################################
# -- LEM GEOMETRY --
################################################################################################################
# WORLD = Laboratory reference frame, the origin is in the centre of the LEM sample tube
/musr/command construct box World 900 350 2600 G4_Galactic 0 0 0 no_logical_volume norot dead -1
/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 60 0.05 0 360 G4_Galactic 850 0 -1678 log_World rotBend dead 851
/musr/command construct tubs save1 0 60 0.05 0 360 G4_Galactic 800 0 -1678 log_World rotBend dead 852
/musr/command construct tubs save2 0 60 0.05 0 360 G4_Galactic 750 0 -1678 log_World rotBend dead 853
/musr/command construct tubs save3 0 60 0.05 0 360 G4_Galactic 700 0 -1678 log_World rotBend dead 854
/musr/command construct tubs save4 0 60 0.05 0 360 G4_Galactic 650 0 -1678 log_World rotBend dead 855
/musr/command construct tubs save5 0 60 0.05 0 360 G4_Galactic 600 0 -1678 log_World rotBend dead 856
/musr/command construct tubs save6 0 60 0.05 0 360 G4_Galactic 550 0 -1678 log_World rotBend dead 857
/musr/command construct tubs save7 0 60 0.05 0 360 G4_Galactic 500 0 -1678 log_World rotBend dead 858
/musr/command construct tubs save8 0 60 0.05 0 360 G4_Galactic 450 0 -1678 log_World rotBend dead 859
/musr/command construct tubs save9 0 60 0.05 0 360 G4_Galactic 400 0 -1678 log_World rotBend dead 860
/musr/command construct tubs save10 0 60 0.05 0 360 G4_Galactic 350 0 -1678 log_World rotBend dead 861
/musr/command construct tubs save11 0 60 0.05 0 360 G4_Galactic 300 0 -1678 log_World rotBend dead 862
/musr/command construct tubs save12 0 60 0.05 0 360 G4_Galactic 240 0 -1678 log_World rotBend dead 863
/musr/command construct tubs save13 0 60 0.05 0 360 G4_Galactic 200 0 -1678 log_World rotBend dead 864
/musr/command construct tubs save14 0 60 0.05 0 360 G4_Galactic 150 0 -1678 log_World rotBend dead 865
/musr/command construct tubs save15 0 60 0.05 0 360 G4_Galactic 100 0 -1678 log_World rotBend dead 866
/musr/command construct tubs save16 0 60 0.05 0 360 G4_Galactic 70 0 -1678 log_World rotBend dead 867
/musr/command construct tubs save17 0 60 0.05 0 360 G4_Galactic 0 0 -1620 log_World norot dead 868
/musr/command construct tubs save18 0 60 0.05 0 360 G4_Galactic 0 0 -1600 log_World norot dead 869
/musr/command construct tubs save19 0 60 0.05 0 360 G4_Galactic 0 0 -1550 log_World norot dead 870
/musr/command construct tubs save20 0 60 0.05 0 360 G4_Galactic 0 0 -1500 log_World norot dead 871
/musr/command construct tubs save21 0 60 0.05 0 360 G4_Galactic 0 0 -1450 log_World norot dead 872
/musr/command construct tubs save22 0 60 0.05 0 360 G4_Galactic 0 0 -1400 log_World norot dead 873
/musr/command construct tubs save23 0 60 0.05 0 360 G4_Galactic 0 0 -1350 log_World norot dead 874
/musr/command construct tubs save24 0 60 0.05 0 360 G4_Galactic 0 0 -1300 log_World norot dead 875
/musr/command construct tubs save25 0 60 0.05 0 360 G4_Galactic 0 0 -1250 log_World norot dead 876
/musr/command construct tubs save26 0 60 0.05 0 360 G4_Galactic 0 0 -1200 log_World norot dead 877
/musr/command construct tubs save27 0 60 0.05 0 360 G4_Galactic 0 0 -1150 log_World norot dead 878
/musr/command construct tubs save28 0 60 0.05 0 360 G4_Galactic 0 0 -1100 log_World norot dead 879
/musr/command construct tubs save29 0 60 0.05 0 360 G4_Galactic 0 0 -1050 log_World norot dead 880
/musr/command construct tubs save30 0 60 0.05 0 360 G4_Galactic 0 0 -1000 log_World norot dead 881
/musr/command construct tubs save31 0 60 0.05 0 360 G4_Galactic 0 0 -950 log_World norot dead 882
/musr/command construct tubs save32 0 60 0.05 0 360 G4_Galactic 0 0 -900 log_World norot dead 883
/musr/command construct tubs save33 0 60 0.05 0 360 G4_Galactic 0 0 -850 log_World norot dead 884
/musr/command construct tubs save34 0 60 0.05 0 360 G4_Galactic 0 0 -800 log_World norot dead 885
/musr/command construct tubs save35 0 60 0.05 0 360 G4_Galactic 0 0 -750 log_World norot dead 886
/musr/command construct tubs save36 0 60 0.05 0 360 G4_Galactic 0 0 -700 log_World norot dead 887
/musr/command construct tubs save37 0 60 0.05 0 360 G4_Galactic 0 0 -650 log_World norot dead 888
/musr/command construct tubs save38 0 60 0.05 0 360 G4_Galactic 0 0 -600 log_World norot dead 889
/musr/command construct tubs save39 0 60 0.05 0 360 G4_Galactic 0 0 -525 log_World norot dead 890
/musr/command construct tubs save40 0 60 0.05 0 360 G4_Galactic 0 0 -450 log_World norot dead 891
/musr/command construct tubs save41 0 60 0.05 0 360 G4_Galactic 0 0 -420 log_World norot dead 892
/musr/command construct tubs save42 0 60 0.05 0 360 G4_Galactic 0 0 -400 log_World norot dead 893
/musr/command construct tubs save43 0 60 0.05 0 360 G4_Galactic 0 0 -350 log_World norot dead 894
/musr/command construct tubs save44 0 60 0.05 0 360 G4_Galactic 0 0 -300 log_World norot dead 895
/musr/command construct tubs save45 0 60 0.05 0 360 G4_Galactic 0 0 -250 log_World norot dead 896
/musr/command construct tubs save46 0 60 0.05 0 360 G4_Galactic 0 0 -200 log_World norot dead 897
/musr/command construct tubs save47 0 60 0.05 0 360 G4_Galactic 0 0 -150 log_World norot dead 898
/musr/command construct tubs save48 0 60 0.05 0 360 G4_Galactic 0 0 -100 log_World norot dead 899
/musr/command construct tubs save49 0 60 0.05 0 360 G4_Galactic 0 0 -50 log_World norot dead 900
/musr/command construct tubs save50 0 60 0.05 0 360 G4_Galactic 0 0 0 log_World norot dead 901
/musr/command construct tubs save51 0 60 0.05 0 360 G4_Galactic 0 0 16 log_World norot dead 902
/musr/command construct tubs save52 0 60 0.05 0 360 G4_Galactic 0 0 100 log_World norot dead 903
/musr/command construct tubs save53 0 60 0.05 0 360 G4_Galactic 0 0 150 log_World norot dead 904
/musr/command visattributes G4_Galactic invisible
################################################################################################################
# -- APD Scintillators --
################################################################################################################
# Detectors volume (0,0,0) coninsides with World (0,0,0)
/musr/command construct tubs DetV 80 105 133 0 360 G4_Galactic 0 0 0 log_World norot dead 100
/musr/command visattributes log_DetV invisible
# For final design set
# BackHW=60
# BackCR=-64.0, 19/Sep/2012
# ForwHW=65.5
# ForwCR=62.5, 19/Sep/2012
# Back inner sections (Upstream) (v.i.)
# Final design (30 Jun 09, 19 Sep 12) BackHW=60.0mm (Half width or length), BackCR=-4-BackHW=-64.0mm (Center z coordinate)
/musr/command construct trd90y ScD1 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 -17.265493 -64.0 log_DetV rotD1 musr/ScintSD 1
/musr/command construct trd90y ScD2 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 -49.167966 -64.0 log_DetV rotD2 musr/ScintSD 2
/musr/command construct trd90y ScD3 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 -73.585061 -64.0 log_DetV rotD3 musr/ScintSD 3
/musr/command construct trd90y ScD4 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 -86.799497 -64.0 log_DetV rotD4 musr/ScintSD 4
/musr/command construct trd90y ScD5 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 -86.799497 -64.0 log_DetV rotD5 musr/ScintSD 5
/musr/command construct trd90y ScD6 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 -73.585061 -64.0 log_DetV rotD6 musr/ScintSD 6
/musr/command construct trd90y ScD7 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 -49.167966 -64.0 log_DetV rotD7 musr/ScintSD 7
/musr/command construct trd90y ScD8 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 -17.265493 -64.0 log_DetV rotD8 musr/ScintSD 8
/musr/command construct trd90y ScD9 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 17.265493 -64.0 log_DetV rotD9 musr/ScintSD 9
/musr/command construct trd90y ScD10 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 49.167966 -64.0 log_DetV rotD10 musr/ScintSD 10
/musr/command construct trd90y ScD11 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 73.585061 -64.0 log_DetV rotD11 musr/ScintSD 11
/musr/command construct trd90y ScD12 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 86.799497 -64.0 log_DetV rotD12 musr/ScintSD 12
/musr/command construct trd90y ScD13 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 86.799497 -64.0 log_DetV rotD13 musr/ScintSD 13
/musr/command construct trd90y ScD14 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 73.585061 -64.0 log_DetV rotD14 musr/ScintSD 14
/musr/command construct trd90y ScD15 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 49.167966 -64.0 log_DetV rotD15 musr/ScintSD 15
/musr/command construct trd90y ScD16 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 17.265493 -64.0 log_DetV rotD16 musr/ScintSD 16
# Forward inner sections (Downstream) (h.i.)
# Final design (30 June 09, 19 Sep 12) ForwHW=65.5mm (Half width or length), ForwCR=-3+ForwHW=62.5mm (Center z coordinate)
/musr/command construct trd90y ScD17 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 -17.070403 62.5 log_DetV rotD17 musr/ScintSD 17
/musr/command construct trd90y ScD18 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 -48.612395 62.5 log_DetV rotD18 musr/ScintSD 18
/musr/command construct trd90y ScD19 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 -72.753591 62.5 log_DetV rotD19 musr/ScintSD 19
/musr/command construct trd90y ScD20 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 -85.818712 62.5 log_DetV rotD20 musr/ScintSD 20
/musr/command construct trd90y ScD21 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 -85.818712 62.5 log_DetV rotD21 musr/ScintSD 21
/musr/command construct trd90y ScD22 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 -72.753591 62.5 log_DetV rotD22 musr/ScintSD 22
/musr/command construct trd90y ScD23 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 -48.612395 62.5 log_DetV rotD23 musr/ScintSD 23
/musr/command construct trd90y ScD24 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 -17.070403 62.5 log_DetV rotD24 musr/ScintSD 24
/musr/command construct trd90y ScD25 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 17.070403 62.5 log_DetV rotD25 musr/ScintSD 25
/musr/command construct trd90y ScD26 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 48.612395 62.5 log_DetV rotD26 musr/ScintSD 26
/musr/command construct trd90y ScD27 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 72.753591 62.5 log_DetV rotD27 musr/ScintSD 27
/musr/command construct trd90y ScD28 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 85.818712 62.5 log_DetV rotD28 musr/ScintSD 28
/musr/command construct trd90y ScD29 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 85.818712 62.5 log_DetV rotD29 musr/ScintSD 29
/musr/command construct trd90y ScD30 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 72.753591 62.5 log_DetV rotD30 musr/ScintSD 30
/musr/command construct trd90y ScD31 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 48.612395 62.5 log_DetV rotD31 musr/ScintSD 31
/musr/command construct trd90y ScD32 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 17.070403 62.5 log_DetV rotD32 musr/ScintSD 32
# Back outer sections (v.a.)
/musr/command construct trd ScD33 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 -18.631126 -64.0 log_DetV rotD1 musr/ScintSD 33
/musr/command construct trd ScD34 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 -53.056957 -64.0 log_DetV rotD2 musr/ScintSD 34
/musr/command construct trd ScD35 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 -79.405348 -64.0 log_DetV rotD3 musr/ScintSD 35
/musr/command construct trd ScD36 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 -93.664994 -64.0 log_DetV rotD4 musr/ScintSD 36
/musr/command construct trd ScD37 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 -93.664994 -64.0 log_DetV rotD5 musr/ScintSD 37
/musr/command construct trd ScD38 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 -79.405348 -64.0 log_DetV rotD6 musr/ScintSD 38
/musr/command construct trd ScD39 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 -53.056957 -64.0 log_DetV rotD7 musr/ScintSD 39
/musr/command construct trd ScD40 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 -18.631126 -64.0 log_DetV rotD8 musr/ScintSD 40
/musr/command construct trd ScD41 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 18.631126 -64.0 log_DetV rotD9 musr/ScintSD 41
/musr/command construct trd ScD42 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 53.056957 -64.0 log_DetV rotD10 musr/ScintSD 42
/musr/command construct trd ScD43 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 79.405348 -64.0 log_DetV rotD11 musr/ScintSD 43
/musr/command construct trd ScD44 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 93.664994 -64.0 log_DetV rotD12 musr/ScintSD 44
/musr/command construct trd ScD45 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 93.664994 -64.0 log_DetV rotD13 musr/ScintSD 45
/musr/command construct trd ScD46 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 79.405348 -64.0 log_DetV rotD14 musr/ScintSD 46
/musr/command construct trd ScD47 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 53.056957 -64.0 log_DetV rotD15 musr/ScintSD 47
/musr/command construct trd ScD48 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 18.631126 -64.0 log_DetV rotD16 musr/ScintSD 48
# Forward outer sections (h.a.)
/musr/command construct trd ScD49 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 -18.436035 62.5 log_DetV rotD1 musr/ScintSD 49
/musr/command construct trd ScD50 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 -52.501387 62.5 log_DetV rotD2 musr/ScintSD 50
/musr/command construct trd ScD51 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 -78.573878 62.5 log_DetV rotD3 musr/ScintSD 51
/musr/command construct trd ScD52 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 -92.684209 62.5 log_DetV rotD4 musr/ScintSD 52
/musr/command construct trd ScD53 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 -92.684209 62.5 log_DetV rotD5 musr/ScintSD 53
/musr/command construct trd ScD54 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 -78.573878 62.5 log_DetV rotD6 musr/ScintSD 54
/musr/command construct trd ScD55 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 -52.501387 62.5 log_DetV rotD7 musr/ScintSD 55
/musr/command construct trd ScD56 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 -18.436035 62.5 log_DetV rotD8 musr/ScintSD 56
/musr/command construct trd ScD57 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 18.436035 62.5 log_DetV rotD9 musr/ScintSD 57
/musr/command construct trd ScD58 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 52.501387 62.5 log_DetV rotD10 musr/ScintSD 58
/musr/command construct trd ScD59 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 78.573878 62.5 log_DetV rotD11 musr/ScintSD 59
/musr/command construct trd ScD60 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 92.684209 62.5 log_DetV rotD12 musr/ScintSD 60
/musr/command construct trd ScD61 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 92.684209 62.5 log_DetV rotD13 musr/ScintSD 61
/musr/command construct trd ScD62 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 78.573878 62.5 log_DetV rotD14 musr/ScintSD 62
/musr/command construct trd ScD63 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 52.501387 62.5 log_DetV rotD15 musr/ScintSD 63
/musr/command construct trd ScD64 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 18.436035 62.5 log_DetV rotD16 musr/ScintSD 64
# Structural support inside the detectors vessel
# Carbon fibre, inner radius 80, thickness 2 mm.
# Additional Al plate removed, 2 mm thick for h.i and h.a and 3 mm thick for v.i. and v.a
/musr/command construct tubs hInShell 80.0 82.0 65.5 0 360 G4_C 0 0 62 log_DetV norot dead 70
/musr/command construct tubs vInShell 80.0 82.0 60.0 0 360 G4_C 0 0 -64.5 log_DetV norot dead 70
# Visual attributes (optional)
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE green
#/musr/command visattributes log_ScD49 green
#/musr/command visattributes log_ScD50 green
#/musr/command visattributes log_test red
################################################################################################################
# Sample vacuum/tube up to gate valve - Can host either the Cryostat or the MCP2
################################################################################################################
# Vacuum space
# /musr/command construct tubs SamV 0 75.0 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100
# Sample tube
#/musr/command construct tubs SamS 75.0 77.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# 2012: 2mm Ti tube, 2013: 1mm
/musr/command construct tubs SamS 75.0 76.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# F160 - 160 CF flange upstream of MCP2 tube
/musr/command construct tubs F160 78.0 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 102
# F100 (Blank end flange)
/musr/command construct tubs F100 0 75.0 10 0 360 Steel 0 0 172.0 log_World norot dead 103
# 200 CF flange upstream of MCP2 tube covering the whole length of the gate valve chamber.
/musr/command construct tubs GATS 103.25 126.5 92.5 0 360 Steel 0 0 -254.5 log_World norot dead 371
# F200 - 200 CF flange upstream of MCP2 tube to connect to gate valve chamber
/musr/command construct tubs F200 76.5 103.25 12 0 360 Steel 0 0 -174.0 log_World norot dead 372
# Visual attributes (optional)
#/musr/command visattributes log_SamV invisible
/musr/command visattributes log_SamS oxsteel
/musr/command visattributes log_F160 oxsteel
#/musr/command visattributes log_F100 oxsteel
/musr/command visattributes log_GATS oxsteel
/musr/command visattributes log_F200 oxsteel
################################################################################################################
# MCP - Micro Channel Plate Detector MCP2
# mcpv_z = -92.5 mm!
#
# We have a 324 mm long sample tube;
# the MCP2 front side is at 142 mm from the end of the sample tube.
# the front face of the sample plate of the cryostat is 145 mm from the end of the sample tube.
#
################################################################################################################
#
# MCPM1 - MCP Macor ring 1
# MCPD - electron multiplying glass disk (also known as target)
# Sensitive surface at z = 20 mm wrt. World
# MCPM2 - MCP Macor ring 2
# /musr/command construct tubs MCPM1 24 32.5 0.75 0 360 Macor 0 0 19.25 log_World norot dead 251
# Use it either as (DMCP-musr/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz.
# /musr/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 21.5 log_World norot dead 252
# /musr/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 23.75 log_World norot dead 253
# NOTE: To intercept ALL the incoming muons, comment the DMCP and MCPM1 lines above and uncomment this one:
#*aa/musr/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs target 0 21.0 1.5 0 360 MCPglass 0 0 114 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs saveTarget 0 75.0 0.2 0 360 G4_Galactic 0 0 110.79 log_SamV norot dead 222
#
# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole)
# MCVR - "Vacuum Ring" (circular hole)
# /musr/command construct box MCSR 36.5 36.5 1 Steel 0 0 25.5 log_World norot dead 254
# /musr/command construct tubs MCVR 0 27.5 1 0 360 G4_Galactic 0 0 0 log_MCSR norot dead 255
# 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
# /musr/command construct box MCPA 36.5 36.5 4 Steel 0 0 37 log_World norot dead 256
# /musr/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 257
# /musr/command construct tubs ANVA2 0 27.5 1.5 0 360 G4_Galactic 0 0 2.5 log_MCPA norot dead 258
# MCSS - MCP Stainless Steel Support Ring
# /musr/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 69.8 log_World norot dead 259
# MCP2 visual attributes (optional)
#/musr/command visattributes log_DMCP MCP_style
#*/musr/command visattributes log_target MCP_style
#*/musr/command visattributes log_MCPM1 MACOR_style
#*------ /musr/command visattributes log_MCPM2 MACOR_style
################################################################################################################
# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm)
#
# sample plate front face is at z = 17mm:
# cold finger distance to CF100: 130mm
# 5mm base plate + 6mm sapphire + 4mm sample plate = 15mm
# sample plate front face from CF100: 145mm
# z-position of sample plate front face: 324/2-145mm = 17mm
# --> sample plate center is at 17+2=19mm
#
################################################################################################################
# Dimensions for large/small sample plates SamPL=35/21 and SaphPL=SamPL35-5
/musr/command construct tubs target 0 35 2 0 360 G4_Al 0 0 19.0 log_World norot dead 251
/musr/command construct tubs SAPH 0 30 3 0 360 G4_ALUMINUM_OXIDE 0 0 24.0 log_World norot dead 252
/musr/command construct tubs SAH1 0 35 2.5 0 360 G4_Al 0 0 29.5 log_World norot dead 253
# Special save target volume
/musr/command construct tubs saveTarget 0 40 0.05 0 360 G4_Galactic 0 0 16.9 log_World norot dead 253
# Other components of the cryostat (dimensions and position of CRY4 are only approx. because unknown)
# COld Finger
/musr/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 37.0 log_World norot dead 261
# End plate of cryostat (7 mm thick, 30 mm diameter)
/musr/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 45.5 log_World norot dead 262
# Heat exchanger (assuming a 10 mm opening - Original dimensions not known.) # OLD pos. 160.0
/musr/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 74.0 log_World norot dead 263
# Mounting ring for He-shield
/musr/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 54.0 log_World norot dead 264
# 2 mm thick plate for mounting ring. This is just to close the downstream side.
/musr/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 54.0 log_World norot dead 265
# Radiation shield
/musr/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 19.0 log_World norot dead 266
# Front part of the radiation shield
/musr/command construct tubs CRSH2 30 48 0.5 0 360 G4_Cu 0 0 -26.5 log_World norot dead 267
# Electrical Field Guard Rings (distance between the guard rings: 16 mm)
# /musr/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 -13.5 log_World norot dead 271
# /musr/command construct tubs Guard2 29 38 1.5 0 360 G4_Cu 0 0 2.5 log_World norot dead 272
# Cryostat visual attributes (optional)
/musr/command visattributes log_SAH1 oxsteel
#/musr/command visattributes log_SAH2 oxsteel
/musr/command visattributes log_target oxsteel
/musr/command visattributes log_SAPH MACOR_style
#/musr/command visattributes log_SAH3 oxsteel
/musr/command visattributes log_CRSH yellow
/musr/command visattributes log_CRSH2 yellow
#/musr/command visattributes log_test red
################################################################################################################
# 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
/musr/command construct cons RA_EU 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World norot dead 801
/musr/command construct cons RA_MU 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World norot dead 802
/musr/command construct cons RA_ER 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnR dead 803
/musr/command construct cons RA_MR 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnR dead 804
/musr/command construct cons RA_ED 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnD dead 805
/musr/command construct cons RA_MD 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnD dead 806
/musr/command construct cons RA_EL 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnL dead 807
/musr/command construct cons RA_ML 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnL dead 808
# 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_T 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 822
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.02 log_World rotRAnR dead 824
/musr/command construct tubs RA_B 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 826
/musr/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.06 log_World rotRAnL dead 828
# 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 831
# Ring Anodes visual attributes (optional)
/musr/command visattributes log_RA_G invisible
#/musr/command visattributes log_RA_G Grid_style
################################################################################################################
# Trigger - Trigger Detector # Triggerz = -1092 mm; total length of TD is 110 mm; carbon foil at -1144 mm.
################################################################################################################
# Trigger volume
/musr/command construct tubs TrigV 90 127 148 0 360 G4_Galactic 0 0 -495 log_World norot dead 600
# Trigger tube
/musr/command construct tubs TrigS 100 103 148 0 360 Steel 0 0 0 log_TrigV norot dead 601
# TF - Trigger tube flanges
/musr/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 136 log_TrigV norot dead 611
/musr/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -136 log_TrigV norot dead 612
# trigger foil is 52-55mm upstream of TrigV center
# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm).
# USE THE NAME CFoil or coulombCFoil, otherwise musrMuFormation won't work!
#/musr/command construct box CFoil 60 60 0.0000025 G4_GRAPHITE 0 0 -550 log_World norot dead 621
/musr/command construct box CFoil 60 60 0.000002 G4_GRAPHITE 0 0 -550 log_World norot dead 621
# 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 musrDetectorConstruction.cc and set any density.
# Trigger visual attributes (optional)
/musr/command visattributes log_TrigV oxsteel
/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_saveAfterTD darkred
# Trigger Lens, L3, center -382 length 70mm radius 65mm.
/musr/command construct tubs TL3S 65.0 70.0 35.0 0 360 G4_Galactic 0 0 -382 log_World norot dead 706 nofield
/musr/command visattributes log_TL3S red
# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL.
# E.g. /musr/command visattributes Steel red
################################################################################################################
# L2 - 2nd Einzel Lens # L3z = -56.7 cm. (it was "L3" in 2011 and before)
# Lens Gap = 12.0 mm => G/D = 12/130 ~ 0.1 (Lens Gap = gap between Ground and Anode, D - Diameter)
################################################################################################################
# L3 volume
/musr/command construct tubs L3V 65 127 220 0 360 G4_Galactic 0 0 -863 log_World norot dead 400
# Lens 3 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 720 mm)
/musr/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 0 log_L3V norot dead 401
# Lens 3 Flange 1, z = L3z + 208 mm
/musr/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -208 log_L3V norot dead 402
# Lens 3 Flange 2, z = L3z - 208 mm
/musr/command construct tubs L3F2 103 126.5 12 0 360 Steel 0 0 208 log_L3V norot dead 403
# GPn - Ground Potential Electrodes
# n = 1-4 (further from TD) and 5-8 (closer to TD) - components of the Ground Electrodes
# Ground Electrode (inner dia: 130 mm, outer dia: 134 mm, length: 133 mm)
/musr/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 421
# Outer electrode surface (LN2 cooling vessel)
/musr/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 422
# First ring cap
/musr/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3V norot dead 423
# Second ring cap
/musr/command construct tubs L3GP4 67 81 4 0 360 Steel 0 0 71.0 log_L3V norot dead 424
/musr/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 431
/musr/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 432
/musr/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3V norot dead 433
/musr/command construct tubs L3GP8 67 81 4 0 360 Steel 0 0 -71.0 log_L3V norot dead 434
# HP - High Potential Electrode (Central Anode - usually at +8.7 kV, for a 15 keV muon beam)
/musr/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3V norot dead 451
# Lens 3 visual attributes (optional)
/musr/command visattributes log_L3V invisible
/musr/command visattributes log_L3ST oxsteel
/musr/command visattributes log_L3F1 oxsteel
/musr/command visattributes log_L3F2 oxsteel
/musr/command visattributes log_L3HP darkred
################################################################################################################
# -- SPIN ROTATOR GEOMETRY --
################################################################################################################
# Spin Rotator volume
/musr/command construct tubs SRENV 50 320 201.5 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 100
/musr/command visattributes log_SRENV invisible
# Electromagnet with iron yoke
# U - up, D - down, L - left, R - right (with respect to muon's view - momentum direction)
/musr/command construct box NPole 200 10 150 G4_Fe 0 85 0 log_SRENV norot dead 201
/musr/command construct box NYoke 150 22.5 50 G4_Fe 0 117.5 0 log_SRENV norot dead 202
/musr/command construct box NConn 225 17.5 190.0 G4_Fe 0 157.5 0 log_SRENV norot dead 203
/musr/command construct box SPole 200 10 150 G4_Fe 0 -85 0 log_SRENV norot dead 205
/musr/command construct box SYoke 150 22.5 50 G4_Fe 0 -117.5 0 log_SRENV norot dead 206
/musr/command construct box SConn 225 17.5 190.0 G4_Fe 0 -157.5 0 log_SRENV norot dead 207
# Front mirror plate
/musr/command construct box FShU 225 50 5 G4_Fe 0 125 -195.0 log_SRENV norot dead 301
/musr/command construct box FShD 225 50 5 G4_Fe 0 -125 -195.0 log_SRENV norot dead 302
/musr/command construct box FShL 75 75 5 G4_Fe 150 0 -195.0 log_SRENV norot dead 303
/musr/command construct box FShR 75 75 5 G4_Fe -150 0 -195.0 log_SRENV norot dead 304
# Back mirror plate
/musr/command construct box BShU 225 50 5 G4_Fe 0 125 195.0 log_SRENV norot dead 321
/musr/command construct box BShD 225 50 5 G4_Fe 0 -125 195.0 log_SRENV norot dead 322
/musr/command construct box BShL 75 75 5 G4_Fe 150 0 195.0 log_SRENV norot dead 323
/musr/command construct box BShR 75 75 5 G4_Fe -150 0 195.0 log_SRENV norot dead 324
# Top coils
/musr/command construct box TCoil1 170 22.5 10 G4_Cu 0 117.5 -60 log_SRENV norot dead 401
/musr/command construct box TCoil2 170 22.5 10 G4_Cu 0 117.5 60 log_SRENV norot dead 402
/musr/command construct box TCoil3 10 22.5 50 G4_Cu 160 117.5 0 log_SRENV norot dead 403
/musr/command construct box TCoil4 10 22.5 50 G4_Cu -160 117.5 0 log_SRENV norot dead 404
# Bottom coils
/musr/command construct box BCoil1 170 22.5 10 G4_Cu 0 -117.5 -60 log_SRENV norot dead 421
/musr/command construct box BCoil2 170 22.5 10 G4_Cu 0 -117.5 60 log_SRENV norot dead 422
/musr/command construct box BCoil3 10 22.5 50 G4_Cu 160 -117.5 0 log_SRENV norot dead 423
/musr/command construct box BCoil4 10 22.5 50 G4_Cu -160 -117.5 0 log_SRENV norot dead 424
# Capacitor
/musr/command construct box Cap_p 0.5 50 150 Brass 55 0 0 log_SRENV norot dead 501
/musr/command construct box Cap_n 0.5 50 150 Brass -55 0 0 log_SRENV norot dead 502
#*/musr/command construct box Uniform 49 49 150 G4_Galactic 0 0 0 log_SRENV norot dead 503
/musr/command construct tubs RodCapUp 0 5 150 90 180 Brass 55 55 0 log_SRENV norot dead 504
/musr/command construct tubs RodCapUn 0 5 150 -90 180 Brass -55 55 0 log_SRENV norot dead 505
/musr/command construct tubs RodCapDp 0 5 150 90 180 Brass 55 -55 0 log_SRENV norot dead 506
/musr/command construct tubs RodCapDn 0 5 150 -90 180 Brass -55 -55 0 log_SRENV norot dead 507
# Rods
/musr/command construct tubs RodPosU 0 5 150 0 360 Brass 27.5 55 0 log_SRENV norot dead 511
/musr/command construct tubs Rod0U 0 5 150 0 360 Brass 0 55 0 log_SRENV norot dead 512
/musr/command construct tubs RodNegU 0 5 150 0 360 Brass -27.5 55 0 log_SRENV norot dead 513
/musr/command construct tubs RodPosD 0 5 150 0 360 Brass 27.5 -55 0 log_SRENV norot dead 514
/musr/command construct tubs Rod0D 0 5 150 0 360 Brass 0 -55 0 log_SRENV norot dead 515
/musr/command construct tubs RodNegD 0 5 150 0 360 Brass -27.5 -55 0 log_SRENV norot dead 516
# Vacuum vessel
/musr/command construct box TVac1 72.5 2.5 191.5 Steel 0 72.5 0 log_SRENV norot dead 601
/musr/command construct box TVac2 2.5 70.0 191.5 Steel 72.5 0 0 log_SRENV norot dead 602
/musr/command construct box TVac3 72.5 2.5 191.5 Steel 0 -72.5 0 log_SRENV norot dead 603
/musr/command construct box TVac4 2.5 70.0 191.5 Steel -72.5 0 0 log_SRENV norot dead 604
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For Spin Rotator
/musr/command construct tubs SREField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 630 nofield
/musr/command construct tubs SRBField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.51 log_World norot dead 631 nofield
/musr/command visattributes G4_Cu red
/musr/command visattributes G4_Fe blue
/musr/command visattributes Brass yellow
################################################################################################################
# Lens 1 - 1st Einzel Lens
################################################################################################################
# L1ENV - Lens 1 envelope - for easy positioning of lens parts (outer dia: 100 mm, length: 300 mm)
#/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 0 0 -1929.5 log_World norot dead 600
/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend 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
# n = 2 - Ground Electrode 2 (closer to SR).
/musr/command construct tubs L1GP2 40 44 50 0 360 Steel 0 0 100 log_L1ENV norot dead 653
# HP - High Potential Electrode (Central Anode - usually at +8.5 kV, for a 15 keV muon beam)
/musr/command construct tubs L1HP 40 44 40 0 360 Steel 0 0 0 log_L1ENV norot dead 652
# Lens 1 visual attributes (optional)
/musr/command visattributes log_L1HP darkred
################################################################################################################
# Electrostatic field at accelerator after moderator
################################################################################################################
#
/musr/command construct box Grid1 9.1 25 25 G4_Galactic 489.9 0.0 -1678.0 log_World rotMod dead 212
/musr/command globalfield Grid1_field 9.1 25 25 uniform 489.9 0.0 -1678.0 log_Grid1 0 0 0 -0.2527 0 0
/musr/command construct box Grid2 5 24 24 G4_Galactic 475.8 0.0 -1678.0 log_World rotMod dead 214
/musr/command globalfield Grid2_field 5 24 24 uniform 475.8 0.0 -1678.0 log_Grid2 0 0 0 -1.04 0 0
/musr/command globalfield printFieldValueAtPoint 489.9 0.0 -1678.0
/musr/command globalfield printFieldValueAtPoint 475.8 0.0 -1678.0
################################################################################################################
# Electrostatic mirror at bend
################################################################################################################
# MRENV
/musr/command construct box MirrE 65 65 10 G4_Galactic 14.14213562 0.0 -1678.0 log_World rotMirr dead 200
/musr/command globalfield Mirr_field 65 65 10 uniform 14.14213562 0.0 -1678.0 log_MirrE 0 0 0 0 0 0.75
###################################################################################
################### E L E C T R O M G N E T I C F I E L D S ##################
###################################################################################
# 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!
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For L1
/musr/command construct tubs L1EField 0 0.01 0.005 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend dead 706 nofield
# For L2 (L3 before 2012)
/musr/command construct tubs L3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -863.0 log_World norot dead 708 nofield
# LENS 1. Best L1 settings: 7.2 kV for 12 keV muons
/musr/command globalfield Lens1EField 251.5 0.0 -1678.0 fromfile 2DE L1_Erz.map log_L1EField 9.0
# LENS 2. Best L3 settings: 8.4 kV for 12 keV muons
/musr/command globalfield Lens3EField 0. 0. -863.0 fromfile 2DE L3_Erz.map log_L3EField 10.5
# Spin rotator
# Electric field should be 370mm plates
# Magnetic field should be 260mm poles as measured srlem_ext.map
/musr/command globalfield Ele_field 0. 0. -1284.5 fromfile 3DE E_Sep_P37.5cm.map log_SREField 2.717
/musr/command globalfield Mag_field 0. 0. -1284.51 fromfile 3DB srlem_ext.map log_SRBField -0.00692
# 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
# 57.15mm upstream center
/musr/command construct box TriggE0 45 45 5 G4_Galactic 0 0 -555.1 log_World norot dead 630 nofield
# 48mm upstream center
/musr/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -543. log_World norot dead 631 nofield
# 2.25mm downstream center
/musr/command construct box TriggE2 45 45 4.9479 G4_Galactic 0 0 -492.75 log_World rotTrig dead 632 nofield
# 54mm downstream center
/musr/command construct box TriggE3 45 45 4 G4_Galactic 0 0 -441.0 log_World norot dead 633
### Electric field at TRIGGER Detector TD: Three different uniform fields, 2012 settings
/musr/command globalfield Trigg0_field 45 45 5 uniform 0. 0. -555.1 log_TriggE0 0 0 0 0 0 0.338
/musr/command globalfield Trigg1_field 45 45 4 uniform 0. 0. -543. log_TriggE1 0 0 0 0 0 -0.02375
/musr/command globalfield Trigg2_field 45 45 4.9497 uniform 0. 0. -492.75 log_TriggE2 0 0 0 0 0 0.041416
/musr/command globalfield Trigg3_field 45 45 4 uniform 0. 0. -441.0 log_TriggE3 0 0 0 0 0 -0.45
# Trigger Lens, L3, (available space from -437 to -347, we use 70mm of that)
/musr/command construct tubs TL3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -382.0 log_World norot dead 706 nofield
/musr/command globalfield ColRingEField 0. 0. -382.0 fromfile 2DE CR7cm_Grid.map log_TL3EField 12.0
### Electric field at RING ANODE - from 3DE field map
# To create an arbitrary configuration, switch on all fields and set different potentials.
/musr/command globalfield RngAnT_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_T 11.9
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 11.9
/musr/command globalfield RngAnB_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_B 11.9
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 11.9
### 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_convMap.map log_SBField 0.
### Electric field at the sample
/musr/command construct tubs SEField 0 0.01 0.005 0 360 G4_Galactic 0.0 0.0 15.9 log_World norot dead 710 nofield
/musr/command globalfield SampleEField 0. 0. 15.9 fromfile 2DE SamplePlate_2DE.map log_SEField 0.0
# Set parameters for particle tracking in an EM field
/musr/command globalfield setparameter SetLargestAcceptableStep 5
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
# TESTING EM FIELD
/musr/command globalfield printFieldValueAtPoint 0. 0. 0.
/musr/command globalfield printFieldValueAtPoint 0. 35. -670.
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.10
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
#/musr/command process addModel mu+ G4MuMultipleScattering G4WentzelVIModel 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ musrMuEnergyLossLandau -1 -1 1
# parameters for Landau energy loss distribution, LandauSigma corresponds to the width of the distibution
/musr/command SetLandauMPV 0.01
/musr/command SetLandauSigma 0.3
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#/musr/command process addDiscreteProcess mu+ G4CoulombScattering
#/musr/command process addProcess mu+ G4UserSpecialCuts -1 -1 3
#/musr/command process addProcess mu+ G4StepLimiter -1 -1 4
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
#/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
#/musr/command signalSeparationTime 0.1
#
/musr/run/randomOption 1
################################################################################################################
# -- Setting simulation PARAMETERS --
################################################################################################################
# Set the overall range cut (default 0.1 mm)
#*/run/setCut 1 mm
# Set the range cut on particular volumes (in mm)
#/musr/command SetUserLimits log_CFoil 1e-8 -1 -1 -1 -1
#*/musr/command SetUserLimits log_target 0.01
#*/musr/command SetUserLimits log_targetscint 0.01
#*/musr/command SetUserLimits log_cryostatscint 0.01
# Set particle energy cuts on particular volumes (in eV)
#/musr/command SetUserLimits log_World ustepMax(mm) utrakMax(mm) utimeMax(ns) uekinMin(MeV) urangMin(mm)
#/musr/command SetUserLimits log_World -1 -1 -1 1e-7 -1
# Geant4 10.2
#------------
/process/em/lowestMuHadEnergy 1e-6 MeV
# Store ALL the events in a ROOT tree or just the interesting ones? (default is true)
#*/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
# Override runID number
#*/musr/run/runID 21
# Set the frequency of event printing
/musr/run/howOftenToPrintEvent 100
# 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
/musr/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
#*/control/execute visdawn.mac
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
#/musr/command rootOutput weight off
#/musr/command rootOutput BFieldAtDecay off
#/musr/command rootOutput muIniPosX off
#/musr/command rootOutput muIniPosY off
#/musr/command rootOutput muIniPosZ off
#/musr/command rootOutput muIniMomX off
#/musr/command rootOutput muIniMomY off
#/musr/command rootOutput muIniMomZ off
#/musr/command rootOutput muIniPolX off
#/musr/command rootOutput muIniPolY off
#/musr/command rootOutput muIniPolZ off
#/musr/command rootOutput muDecayDetID off
#/musr/command rootOutput muDecayPosX off
#/musr/command rootOutput muDecayPosY off
#/musr/command rootOutput muDecayPosZ off
#/musr/command rootOutput muDecayTime off
#/musr/command rootOutput muDecayPolX off
#/musr/command rootOutput muDecayPolY off
#/musr/command rootOutput muDecayPolZ off
#/musr/command rootOutput muTargetTime off
#/musr/command rootOutput muTargetPolX off
#/musr/command rootOutput muTargetPolY off
#/musr/command rootOutput muTargetPolZ off
#/musr/command rootOutput muM0Time off
#/musr/command rootOutput muM0PolX off
#/musr/command rootOutput muM0PolY off
#/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
#/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
/musr/command storeOnlyEventsWithHits false
################################################################################################################
# -- Setting PARTICLE GUN parameters --
################################################################################################################
# Default momentum direction: 001, i.e. 0z.
# Default muon soin 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 -1144 mm, acceleration starts at -1154.15 mm
#/gun/vertex 0. 0. -2119.5 mm
/gun/vertex 499 0. -1678.0 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 6.83 6.83 0 mm
/gun/vertexsigma -15 -15 0 mm
#/gun/boxboundarycentre 499 0 -1678 mm
#/gun/boxboundary 15 15 1 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
# Set muon energy before hitting TD; a constant field in front of the C-foil accelerates the muons
# to add 3.38 keV
/gun/kenergy 15.0 eV
# Set beam momentum direction
/gun/direction -1.0 0.0 0.0
# Set muon spin direction: +10deg or 0
/gun/muonPolarizVector 0.9848 0 0.17365
#/gun/muonPolarizVector 1 0 0
# Other useful test parameters:
#------------------Oct.20 2015------------------------------------
# kenergy= 15 eV Pmu= 0.xxxMeV/c ==> sigma = /2.354 = MeV/c
#/gun/momentumsmearing 0.07508 MeV
/gun/momentumsmearing 0.016 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#*/gun/momentumboundary 20 40 0 MeV
#---/gun/tilt: xangle, yangle, dummy
#*/gun/tilt 0 0.0 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.0 deg
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#*/gun/decaytimelimits 10400 10420 2197.03 ns
#/gun/tiltsigma 1.4 1.4 0 deg
/gun/tiltsigma 0 0 -1.0 deg
# Selectively inactivate or activate sensitive detectors
#*/hits/inactivate /musr/ScintSD
# Only for code debugging!
/tracking/verbose 0
# BEAM ON
#/run/beamOn 1000000
#/run/beamOn 10
/run/beamOn 10000

View File

@@ -0,0 +1,950 @@
# Template suitable for beam profile detectioon with the spin rotator in place
# Zaher Salman 7/10/2010
#
# Thomas Prokscha 22/Nov/2012
# Moved sample stack on cryostat 3mm downstream to fit to positions in apparatus
# Changed positions of positron counters according to corrected drawing LEM 37.01.024 (19/Sep/2012)
#
# Position downstream detectors: z=+62.5mm original value: z=+66.5mm
# Position upstream detectors: z=-64.0mm original value: z=-60.0mm
#
# 2013 setup: 1mm Ti sample tube
#
# 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
#
# Ran Xiao 25/Sep/2014
# Start muons at moderator at x=499, assume cosA angular distribution, assume energy distribution
#
################################################################################################################
# -- ROTATION MATRICES --
################################################################################################################
# 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
/musr/command rotation rotRAnL 0 0 1 90
/musr/command rotation rotRAnD 0 0 1 180
# More Rotations
/musr/command rotation rotD1 0 0 1 11.250
/musr/command rotation rotD2 0 0 1 33.750
/musr/command rotation rotD3 0 0 1 56.250
/musr/command rotation rotD4 0 0 1 78.750
/musr/command rotation rotD5 0 0 1 101.250
/musr/command rotation rotD6 0 0 1 123.750
/musr/command rotation rotD7 0 0 1 146.250
/musr/command rotation rotD8 0 0 1 168.750
/musr/command rotation rotD9 0 0 1 191.250
/musr/command rotation rotD10 0 0 1 213.750
/musr/command rotation rotD11 0 0 1 236.250
/musr/command rotation rotD12 0 0 1 258.750
/musr/command rotation rotD13 0 0 1 281.250
/musr/command rotation rotD14 0 0 1 303.750
/musr/command rotation rotD15 0 0 1 326.250
/musr/command rotation rotD16 0 0 1 348.750
/musr/command rotation rotD17 0 0 1 11.250
/musr/command rotation rotD18 0 0 1 33.750
/musr/command rotation rotD19 0 0 1 56.250
/musr/command rotation rotD20 0 0 1 78.750
/musr/command rotation rotD21 0 0 1 101.250
/musr/command rotation rotD22 0 0 1 123.750
/musr/command rotation rotD23 0 0 1 146.250
/musr/command rotation rotD24 0 0 1 168.750
/musr/command rotation rotD25 0 0 1 191.250
/musr/command rotation rotD26 0 0 1 213.750
/musr/command rotation rotD27 0 0 1 236.250
/musr/command rotation rotD28 0 0 1 258.750
/musr/command rotation rotD29 0 0 1 281.250
/musr/command rotation rotD30 0 0 1 303.750
/musr/command rotation rotD31 0 0 1 326.250
/musr/command rotation rotD32 0 0 1 348.750
# Beam line bend at mirror
/musr/command rotation rotBend 0 1 0 -90
/musr/command rotation rotMirr 0 1 0 -45
/musr/command rotation rotMod 0 1 0 2
################################################################################################################
# -- LEM GEOMETRY --
################################################################################################################
# WORLD = Laboratory reference frame, the origin is in the centre of the LEM sample tube
/musr/command construct box World 900 350 2600 G4_Galactic 0 0 0 no_logical_volume norot dead -1
/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 60 0.05 0 360 G4_Galactic 850 0 -1678 log_World rotBend dead 851
/musr/command construct tubs save1 0 60 0.05 0 360 G4_Galactic 800 0 -1678 log_World rotBend dead 852
/musr/command construct tubs save2 0 60 0.05 0 360 G4_Galactic 750 0 -1678 log_World rotBend dead 853
/musr/command construct tubs save3 0 60 0.05 0 360 G4_Galactic 700 0 -1678 log_World rotBend dead 854
/musr/command construct tubs save4 0 60 0.05 0 360 G4_Galactic 650 0 -1678 log_World rotBend dead 855
/musr/command construct tubs save5 0 60 0.05 0 360 G4_Galactic 600 0 -1678 log_World rotBend dead 856
/musr/command construct tubs save6 0 60 0.05 0 360 G4_Galactic 550 0 -1678 log_World rotBend dead 857
/musr/command construct tubs save7 0 60 0.05 0 360 G4_Galactic 500 0 -1678 log_World rotBend dead 858
/musr/command construct tubs save8 0 60 0.05 0 360 G4_Galactic 450 0 -1678 log_World rotBend dead 859
/musr/command construct tubs save9 0 60 0.05 0 360 G4_Galactic 400 0 -1678 log_World rotBend dead 860
/musr/command construct tubs save10 0 60 0.05 0 360 G4_Galactic 350 0 -1678 log_World rotBend dead 861
/musr/command construct tubs save11 0 60 0.05 0 360 G4_Galactic 300 0 -1678 log_World rotBend dead 862
/musr/command construct tubs save12 0 60 0.05 0 360 G4_Galactic 240 0 -1678 log_World rotBend dead 863
/musr/command construct tubs save13 0 60 0.05 0 360 G4_Galactic 200 0 -1678 log_World rotBend dead 864
/musr/command construct tubs save14 0 60 0.05 0 360 G4_Galactic 150 0 -1678 log_World rotBend dead 865
/musr/command construct tubs save15 0 60 0.05 0 360 G4_Galactic 100 0 -1678 log_World rotBend dead 866
/musr/command construct tubs save16 0 60 0.05 0 360 G4_Galactic 70 0 -1678 log_World rotBend dead 867
/musr/command construct tubs save17 0 60 0.05 0 360 G4_Galactic 0 0 -1620 log_World norot dead 868
/musr/command construct tubs save18 0 60 0.05 0 360 G4_Galactic 0 0 -1600 log_World norot dead 869
/musr/command construct tubs save19 0 60 0.05 0 360 G4_Galactic 0 0 -1550 log_World norot dead 870
/musr/command construct tubs save20 0 60 0.05 0 360 G4_Galactic 0 0 -1500 log_World norot dead 871
/musr/command construct tubs save21 0 60 0.05 0 360 G4_Galactic 0 0 -1450 log_World norot dead 872
/musr/command construct tubs save22 0 60 0.05 0 360 G4_Galactic 0 0 -1400 log_World norot dead 873
/musr/command construct tubs save23 0 60 0.05 0 360 G4_Galactic 0 0 -1350 log_World norot dead 874
/musr/command construct tubs save24 0 60 0.05 0 360 G4_Galactic 0 0 -1300 log_World norot dead 875
/musr/command construct tubs save25 0 60 0.05 0 360 G4_Galactic 0 0 -1250 log_World norot dead 876
/musr/command construct tubs save26 0 60 0.05 0 360 G4_Galactic 0 0 -1200 log_World norot dead 877
/musr/command construct tubs save27 0 60 0.05 0 360 G4_Galactic 0 0 -1150 log_World norot dead 878
/musr/command construct tubs save28 0 60 0.05 0 360 G4_Galactic 0 0 -1100 log_World norot dead 879
/musr/command construct tubs save29 0 60 0.05 0 360 G4_Galactic 0 0 -1050 log_World norot dead 880
/musr/command construct tubs save30 0 60 0.05 0 360 G4_Galactic 0 0 -1000 log_World norot dead 881
/musr/command construct tubs save31 0 60 0.05 0 360 G4_Galactic 0 0 -950 log_World norot dead 882
/musr/command construct tubs save32 0 60 0.05 0 360 G4_Galactic 0 0 -900 log_World norot dead 883
/musr/command construct tubs save33 0 60 0.05 0 360 G4_Galactic 0 0 -850 log_World norot dead 884
/musr/command construct tubs save34 0 60 0.05 0 360 G4_Galactic 0 0 -800 log_World norot dead 885
/musr/command construct tubs save35 0 60 0.05 0 360 G4_Galactic 0 0 -750 log_World norot dead 886
/musr/command construct tubs save36 0 60 0.05 0 360 G4_Galactic 0 0 -700 log_World norot dead 887
/musr/command construct tubs save37 0 60 0.05 0 360 G4_Galactic 0 0 -650 log_World norot dead 888
/musr/command construct tubs save38 0 60 0.05 0 360 G4_Galactic 0 0 -600 log_World norot dead 889
/musr/command construct tubs save39 0 60 0.05 0 360 G4_Galactic 0 0 -525 log_World norot dead 890
/musr/command construct tubs save40 0 60 0.05 0 360 G4_Galactic 0 0 -450 log_World norot dead 891
/musr/command construct tubs save41 0 60 0.05 0 360 G4_Galactic 0 0 -420 log_World norot dead 892
/musr/command construct tubs save42 0 60 0.05 0 360 G4_Galactic 0 0 -400 log_World norot dead 893
/musr/command construct tubs save43 0 60 0.05 0 360 G4_Galactic 0 0 -350 log_World norot dead 894
/musr/command construct tubs save44 0 60 0.05 0 360 G4_Galactic 0 0 -300 log_World norot dead 895
/musr/command construct tubs save45 0 60 0.05 0 360 G4_Galactic 0 0 -250 log_World norot dead 896
/musr/command construct tubs save46 0 60 0.05 0 360 G4_Galactic 0 0 -200 log_World norot dead 897
/musr/command construct tubs save47 0 60 0.05 0 360 G4_Galactic 0 0 -150 log_World norot dead 898
/musr/command construct tubs save48 0 60 0.05 0 360 G4_Galactic 0 0 -100 log_World norot dead 899
/musr/command construct tubs save49 0 60 0.05 0 360 G4_Galactic 0 0 -50 log_World norot dead 900
/musr/command construct tubs save50 0 60 0.05 0 360 G4_Galactic 0 0 0 log_World norot dead 901
/musr/command construct tubs save51 0 60 0.05 0 360 G4_Galactic 0 0 16 log_World norot dead 902
/musr/command construct tubs save52 0 60 0.05 0 360 G4_Galactic 0 0 100 log_World norot dead 903
/musr/command construct tubs save53 0 60 0.05 0 360 G4_Galactic 0 0 150 log_World norot dead 904
/musr/command visattributes G4_Galactic invisible
################################################################################################################
# -- APD Scintillators --
################################################################################################################
# Detectors volume (0,0,0) coninsides with World (0,0,0)
/musr/command construct tubs DetV 80 105 133 0 360 G4_Galactic 0 0 0 log_World norot dead 100
/musr/command visattributes log_DetV invisible
# For final design set
# BackHW=60
# BackCR=-64.0, 19/Sep/2012
# ForwHW=65.5
# ForwCR=62.5, 19/Sep/2012
# Back inner sections (Upstream) (v.i.)
# Final design (30 Jun 09, 19 Sep 12) BackHW=60.0mm (Half width or length), BackCR=-4-BackHW=-64.0mm (Center z coordinate)
/musr/command construct trd90y ScD1 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 -17.265493 -64.0 log_DetV rotD1 musr/ScintSD 1
/musr/command construct trd90y ScD2 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 -49.167966 -64.0 log_DetV rotD2 musr/ScintSD 2
/musr/command construct trd90y ScD3 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 -73.585061 -64.0 log_DetV rotD3 musr/ScintSD 3
/musr/command construct trd90y ScD4 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 -86.799497 -64.0 log_DetV rotD4 musr/ScintSD 4
/musr/command construct trd90y ScD5 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 -86.799497 -64.0 log_DetV rotD5 musr/ScintSD 5
/musr/command construct trd90y ScD6 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 -73.585061 -64.0 log_DetV rotD6 musr/ScintSD 6
/musr/command construct trd90y ScD7 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 -49.167966 -64.0 log_DetV rotD7 musr/ScintSD 7
/musr/command construct trd90y ScD8 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 -17.265493 -64.0 log_DetV rotD8 musr/ScintSD 8
/musr/command construct trd90y ScD9 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 17.265493 -64.0 log_DetV rotD9 musr/ScintSD 9
/musr/command construct trd90y ScD10 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 49.167966 -64.0 log_DetV rotD10 musr/ScintSD 10
/musr/command construct trd90y ScD11 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 73.585061 -64.0 log_DetV rotD11 musr/ScintSD 11
/musr/command construct trd90y ScD12 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 86.799497 -64.0 log_DetV rotD12 musr/ScintSD 12
/musr/command construct trd90y ScD13 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 86.799497 -64.0 log_DetV rotD13 musr/ScintSD 13
/musr/command construct trd90y ScD14 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 73.585061 -64.0 log_DetV rotD14 musr/ScintSD 14
/musr/command construct trd90y ScD15 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 49.167966 -64.0 log_DetV rotD15 musr/ScintSD 15
/musr/command construct trd90y ScD16 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 17.265493 -64.0 log_DetV rotD16 musr/ScintSD 16
# Forward inner sections (Downstream) (h.i.)
# Final design (30 June 09, 19 Sep 12) ForwHW=65.5mm (Half width or length), ForwCR=-3+ForwHW=62.5mm (Center z coordinate)
/musr/command construct trd90y ScD17 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 -17.070403 62.5 log_DetV rotD17 musr/ScintSD 17
/musr/command construct trd90y ScD18 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 -48.612395 62.5 log_DetV rotD18 musr/ScintSD 18
/musr/command construct trd90y ScD19 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 -72.753591 62.5 log_DetV rotD19 musr/ScintSD 19
/musr/command construct trd90y ScD20 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 -85.818712 62.5 log_DetV rotD20 musr/ScintSD 20
/musr/command construct trd90y ScD21 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 -85.818712 62.5 log_DetV rotD21 musr/ScintSD 21
/musr/command construct trd90y ScD22 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 -72.753591 62.5 log_DetV rotD22 musr/ScintSD 22
/musr/command construct trd90y ScD23 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 -48.612395 62.5 log_DetV rotD23 musr/ScintSD 23
/musr/command construct trd90y ScD24 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 -17.070403 62.5 log_DetV rotD24 musr/ScintSD 24
/musr/command construct trd90y ScD25 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 17.070403 62.5 log_DetV rotD25 musr/ScintSD 25
/musr/command construct trd90y ScD26 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 48.612395 62.5 log_DetV rotD26 musr/ScintSD 26
/musr/command construct trd90y ScD27 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 72.753591 62.5 log_DetV rotD27 musr/ScintSD 27
/musr/command construct trd90y ScD28 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 85.818712 62.5 log_DetV rotD28 musr/ScintSD 28
/musr/command construct trd90y ScD29 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 85.818712 62.5 log_DetV rotD29 musr/ScintSD 29
/musr/command construct trd90y ScD30 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 72.753591 62.5 log_DetV rotD30 musr/ScintSD 30
/musr/command construct trd90y ScD31 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 48.612395 62.5 log_DetV rotD31 musr/ScintSD 31
/musr/command construct trd90y ScD32 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 17.070403 62.5 log_DetV rotD32 musr/ScintSD 32
# Back outer sections (v.a.)
/musr/command construct trd ScD33 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 -18.631126 -64.0 log_DetV rotD1 musr/ScintSD 33
/musr/command construct trd ScD34 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 -53.056957 -64.0 log_DetV rotD2 musr/ScintSD 34
/musr/command construct trd ScD35 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 -79.405348 -64.0 log_DetV rotD3 musr/ScintSD 35
/musr/command construct trd ScD36 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 -93.664994 -64.0 log_DetV rotD4 musr/ScintSD 36
/musr/command construct trd ScD37 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 -93.664994 -64.0 log_DetV rotD5 musr/ScintSD 37
/musr/command construct trd ScD38 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 -79.405348 -64.0 log_DetV rotD6 musr/ScintSD 38
/musr/command construct trd ScD39 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 -53.056957 -64.0 log_DetV rotD7 musr/ScintSD 39
/musr/command construct trd ScD40 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 -18.631126 -64.0 log_DetV rotD8 musr/ScintSD 40
/musr/command construct trd ScD41 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 18.631126 -64.0 log_DetV rotD9 musr/ScintSD 41
/musr/command construct trd ScD42 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 53.056957 -64.0 log_DetV rotD10 musr/ScintSD 42
/musr/command construct trd ScD43 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 79.405348 -64.0 log_DetV rotD11 musr/ScintSD 43
/musr/command construct trd ScD44 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 93.664994 -64.0 log_DetV rotD12 musr/ScintSD 44
/musr/command construct trd ScD45 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 93.664994 -64.0 log_DetV rotD13 musr/ScintSD 45
/musr/command construct trd ScD46 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 79.405348 -64.0 log_DetV rotD14 musr/ScintSD 46
/musr/command construct trd ScD47 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 53.056957 -64.0 log_DetV rotD15 musr/ScintSD 47
/musr/command construct trd ScD48 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 18.631126 -64.0 log_DetV rotD16 musr/ScintSD 48
# Forward outer sections (h.a.)
/musr/command construct trd ScD49 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 -18.436035 62.5 log_DetV rotD1 musr/ScintSD 49
/musr/command construct trd ScD50 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 -52.501387 62.5 log_DetV rotD2 musr/ScintSD 50
/musr/command construct trd ScD51 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 -78.573878 62.5 log_DetV rotD3 musr/ScintSD 51
/musr/command construct trd ScD52 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 -92.684209 62.5 log_DetV rotD4 musr/ScintSD 52
/musr/command construct trd ScD53 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 -92.684209 62.5 log_DetV rotD5 musr/ScintSD 53
/musr/command construct trd ScD54 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 -78.573878 62.5 log_DetV rotD6 musr/ScintSD 54
/musr/command construct trd ScD55 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 -52.501387 62.5 log_DetV rotD7 musr/ScintSD 55
/musr/command construct trd ScD56 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 -18.436035 62.5 log_DetV rotD8 musr/ScintSD 56
/musr/command construct trd ScD57 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 18.436035 62.5 log_DetV rotD9 musr/ScintSD 57
/musr/command construct trd ScD58 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 52.501387 62.5 log_DetV rotD10 musr/ScintSD 58
/musr/command construct trd ScD59 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 78.573878 62.5 log_DetV rotD11 musr/ScintSD 59
/musr/command construct trd ScD60 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 92.684209 62.5 log_DetV rotD12 musr/ScintSD 60
/musr/command construct trd ScD61 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 92.684209 62.5 log_DetV rotD13 musr/ScintSD 61
/musr/command construct trd ScD62 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 78.573878 62.5 log_DetV rotD14 musr/ScintSD 62
/musr/command construct trd ScD63 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 52.501387 62.5 log_DetV rotD15 musr/ScintSD 63
/musr/command construct trd ScD64 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 18.436035 62.5 log_DetV rotD16 musr/ScintSD 64
# Structural support inside the detectors vessel
# Carbon fibre, inner radius 80, thickness 2 mm.
# Additional Al plate removed, 2 mm thick for h.i and h.a and 3 mm thick for v.i. and v.a
/musr/command construct tubs hInShell 80.0 82.0 65.5 0 360 G4_C 0 0 62 log_DetV norot dead 70
/musr/command construct tubs vInShell 80.0 82.0 60.0 0 360 G4_C 0 0 -64.5 log_DetV norot dead 70
# Visual attributes (optional)
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE green
#/musr/command visattributes log_ScD49 green
#/musr/command visattributes log_ScD50 green
#/musr/command visattributes log_test red
################################################################################################################
# Sample vacuum/tube up to gate valve - Can host either the Cryostat or the MCP2
################################################################################################################
# Vacuum space
# /musr/command construct tubs SamV 0 75.0 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100
# Sample tube
#/musr/command construct tubs SamS 75.0 77.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# 2012: 2mm Ti tube, 2013: 1mm
/musr/command construct tubs SamS 75.0 76.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# F160 - 160 CF flange upstream of MCP2 tube
/musr/command construct tubs F160 78.0 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 102
# F100 (Blank end flange)
/musr/command construct tubs F100 0 75.0 10 0 360 Steel 0 0 172.0 log_World norot dead 103
# 200 CF flange upstream of MCP2 tube covering the whole length of the gate valve chamber.
/musr/command construct tubs GATS 103.25 126.5 92.5 0 360 Steel 0 0 -254.5 log_World norot dead 371
# F200 - 200 CF flange upstream of MCP2 tube to connect to gate valve chamber
/musr/command construct tubs F200 76.5 103.25 12 0 360 Steel 0 0 -174.0 log_World norot dead 372
# Visual attributes (optional)
#/musr/command visattributes log_SamV invisible
/musr/command visattributes log_SamS oxsteel
/musr/command visattributes log_F160 oxsteel
#/musr/command visattributes log_F100 oxsteel
/musr/command visattributes log_GATS oxsteel
/musr/command visattributes log_F200 oxsteel
################################################################################################################
# MCP - Micro Channel Plate Detector MCP2
# mcpv_z = -92.5 mm!
#
# We have a 324 mm long sample tube;
# the MCP2 front side is at 142 mm from the end of the sample tube.
# the front face of the sample plate of the cryostat is 145 mm from the end of the sample tube.
#
################################################################################################################
#
# MCPM1 - MCP Macor ring 1
# MCPD - electron multiplying glass disk (also known as target)
# Sensitive surface at z = 20 mm wrt. World
# MCPM2 - MCP Macor ring 2
# /musr/command construct tubs MCPM1 24 32.5 0.75 0 360 Macor 0 0 19.25 log_World norot dead 251
# Use it either as (DMCP-musr/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz.
# /musr/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 21.5 log_World norot dead 252
# /musr/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 23.75 log_World norot dead 253
# NOTE: To intercept ALL the incoming muons, comment the DMCP and MCPM1 lines above and uncomment this one:
#*aa/musr/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs target 0 21.0 1.5 0 360 MCPglass 0 0 114 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs saveTarget 0 75.0 0.2 0 360 G4_Galactic 0 0 110.79 log_SamV norot dead 222
#
# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole)
# MCVR - "Vacuum Ring" (circular hole)
# /musr/command construct box MCSR 36.5 36.5 1 Steel 0 0 25.5 log_World norot dead 254
# /musr/command construct tubs MCVR 0 27.5 1 0 360 G4_Galactic 0 0 0 log_MCSR norot dead 255
# 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
# /musr/command construct box MCPA 36.5 36.5 4 Steel 0 0 37 log_World norot dead 256
# /musr/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 257
# /musr/command construct tubs ANVA2 0 27.5 1.5 0 360 G4_Galactic 0 0 2.5 log_MCPA norot dead 258
# MCSS - MCP Stainless Steel Support Ring
# /musr/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 69.8 log_World norot dead 259
# MCP2 visual attributes (optional)
#/musr/command visattributes log_DMCP MCP_style
#*/musr/command visattributes log_target MCP_style
#*/musr/command visattributes log_MCPM1 MACOR_style
#*------ /musr/command visattributes log_MCPM2 MACOR_style
################################################################################################################
# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm)
#
# sample plate front face is at z = 17mm:
# cold finger distance to CF100: 130mm
# 5mm base plate + 6mm sapphire + 4mm sample plate = 15mm
# sample plate front face from CF100: 145mm
# z-position of sample plate front face: 324/2-145mm = 17mm
# --> sample plate center is at 17+2=19mm
#
################################################################################################################
# Dimensions for large/small sample plates SamPL=35/21 and SaphPL=SamPL35-5
/musr/command construct tubs target 0 35 2 0 360 G4_Al 0 0 19.0 log_World norot dead 251
/musr/command construct tubs SAPH 0 30 3 0 360 G4_ALUMINUM_OXIDE 0 0 24.0 log_World norot dead 252
/musr/command construct tubs SAH1 0 35 2.5 0 360 G4_Al 0 0 29.5 log_World norot dead 253
# Special save target volume
/musr/command construct tubs saveTarget 0 40 0.05 0 360 G4_Galactic 0 0 16.9 log_World norot dead 253
# Other components of the cryostat (dimensions and position of CRY4 are only approx. because unknown)
# COld Finger
/musr/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 37.0 log_World norot dead 261
# End plate of cryostat (7 mm thick, 30 mm diameter)
/musr/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 45.5 log_World norot dead 262
# Heat exchanger (assuming a 10 mm opening - Original dimensions not known.) # OLD pos. 160.0
/musr/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 74.0 log_World norot dead 263
# Mounting ring for He-shield
/musr/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 54.0 log_World norot dead 264
# 2 mm thick plate for mounting ring. This is just to close the downstream side.
/musr/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 54.0 log_World norot dead 265
# Radiation shield
/musr/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 19.0 log_World norot dead 266
# Front part of the radiation shield
/musr/command construct tubs CRSH2 30 48 0.5 0 360 G4_Cu 0 0 -26.5 log_World norot dead 267
# Electrical Field Guard Rings (distance between the guard rings: 16 mm)
# /musr/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 -13.5 log_World norot dead 271
# /musr/command construct tubs Guard2 29 38 1.5 0 360 G4_Cu 0 0 2.5 log_World norot dead 272
# Cryostat visual attributes (optional)
/musr/command visattributes log_SAH1 oxsteel
#/musr/command visattributes log_SAH2 oxsteel
/musr/command visattributes log_target oxsteel
/musr/command visattributes log_SAPH MACOR_style
#/musr/command visattributes log_SAH3 oxsteel
/musr/command visattributes log_CRSH yellow
/musr/command visattributes log_CRSH2 yellow
#/musr/command visattributes log_test red
################################################################################################################
# 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
/musr/command construct cons RA_EU 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World norot dead 801
/musr/command construct cons RA_MU 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World norot dead 802
/musr/command construct cons RA_ER 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnR dead 803
/musr/command construct cons RA_MR 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnR dead 804
/musr/command construct cons RA_ED 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnD dead 805
/musr/command construct cons RA_MD 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnD dead 806
/musr/command construct cons RA_EL 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnL dead 807
/musr/command construct cons RA_ML 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnL dead 808
# 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_T 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 822
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.02 log_World rotRAnR dead 824
/musr/command construct tubs RA_B 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 826
/musr/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.06 log_World rotRAnL dead 828
# 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 831
# Ring Anodes visual attributes (optional)
/musr/command visattributes log_RA_G invisible
#/musr/command visattributes log_RA_G Grid_style
################################################################################################################
# Trigger - Trigger Detector # Triggerz = -1092 mm; total length of TD is 110 mm; carbon foil at -1144 mm.
################################################################################################################
# Trigger volume
/musr/command construct tubs TrigV 90 127 148 0 360 G4_Galactic 0 0 -495 log_World norot dead 600
# Trigger tube
/musr/command construct tubs TrigS 100 103 148 0 360 Steel 0 0 0 log_TrigV norot dead 601
# TF - Trigger tube flanges
/musr/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 136 log_TrigV norot dead 611
/musr/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -136 log_TrigV norot dead 612
# trigger foil is 52-55mm upstream of TrigV center
# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm).
# USE THE NAME CFoil or coulombCFoil, otherwise musrMuFormation won't work!
#/musr/command construct box CFoil 60 60 0.0000025 G4_GRAPHITE 0 0 -550 log_World norot dead 621
/musr/command construct box CFoil 60 60 0.000002 G4_GRAPHITE 0 0 -550 log_World norot dead 621
# 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 musrDetectorConstruction.cc and set any density.
# Trigger visual attributes (optional)
/musr/command visattributes log_TrigV oxsteel
/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_saveAfterTD darkred
# Trigger Lens, L3, center -382 length 70mm radius 65mm.
/musr/command construct tubs TL3S 65.0 70.0 35.0 0 360 G4_Galactic 0 0 -382 log_World norot dead 706 nofield
/musr/command visattributes log_TL3S red
# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL.
# E.g. /musr/command visattributes Steel red
################################################################################################################
# L2 - 2nd Einzel Lens # L3z = -56.7 cm. (it was "L3" in 2011 and before)
# Lens Gap = 12.0 mm => G/D = 12/130 ~ 0.1 (Lens Gap = gap between Ground and Anode, D - Diameter)
################################################################################################################
# L3 volume
/musr/command construct tubs L3V 65 127 220 0 360 G4_Galactic 0 0 -863 log_World norot dead 400
# Lens 3 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 720 mm)
/musr/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 0 log_L3V norot dead 401
# Lens 3 Flange 1, z = L3z + 208 mm
/musr/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -208 log_L3V norot dead 402
# Lens 3 Flange 2, z = L3z - 208 mm
/musr/command construct tubs L3F2 103 126.5 12 0 360 Steel 0 0 208 log_L3V norot dead 403
# GPn - Ground Potential Electrodes
# n = 1-4 (further from TD) and 5-8 (closer to TD) - components of the Ground Electrodes
# Ground Electrode (inner dia: 130 mm, outer dia: 134 mm, length: 133 mm)
/musr/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 421
# Outer electrode surface (LN2 cooling vessel)
/musr/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 422
# First ring cap
/musr/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3V norot dead 423
# Second ring cap
/musr/command construct tubs L3GP4 67 81 4 0 360 Steel 0 0 71.0 log_L3V norot dead 424
/musr/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 431
/musr/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 432
/musr/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3V norot dead 433
/musr/command construct tubs L3GP8 67 81 4 0 360 Steel 0 0 -71.0 log_L3V norot dead 434
# HP - High Potential Electrode (Central Anode - usually at +8.7 kV, for a 15 keV muon beam)
/musr/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3V norot dead 451
# Lens 3 visual attributes (optional)
/musr/command visattributes log_L3V invisible
/musr/command visattributes log_L3ST oxsteel
/musr/command visattributes log_L3F1 oxsteel
/musr/command visattributes log_L3F2 oxsteel
/musr/command visattributes log_L3HP darkred
################################################################################################################
# -- SPIN ROTATOR GEOMETRY --
################################################################################################################
# Spin Rotator volume
/musr/command construct tubs SRENV 50 320 201.5 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 100
/musr/command visattributes log_SRENV invisible
# Electromagnet with iron yoke
# U - up, D - down, L - left, R - right (with respect to muon's view - momentum direction)
/musr/command construct box NPole 200 10 150 G4_Fe 0 85 0 log_SRENV norot dead 201
/musr/command construct box NYoke 150 22.5 50 G4_Fe 0 117.5 0 log_SRENV norot dead 202
/musr/command construct box NConn 225 17.5 190.0 G4_Fe 0 157.5 0 log_SRENV norot dead 203
/musr/command construct box SPole 200 10 150 G4_Fe 0 -85 0 log_SRENV norot dead 205
/musr/command construct box SYoke 150 22.5 50 G4_Fe 0 -117.5 0 log_SRENV norot dead 206
/musr/command construct box SConn 225 17.5 190.0 G4_Fe 0 -157.5 0 log_SRENV norot dead 207
# Front mirror plate
/musr/command construct box FShU 225 50 5 G4_Fe 0 125 -195.0 log_SRENV norot dead 301
/musr/command construct box FShD 225 50 5 G4_Fe 0 -125 -195.0 log_SRENV norot dead 302
/musr/command construct box FShL 75 75 5 G4_Fe 150 0 -195.0 log_SRENV norot dead 303
/musr/command construct box FShR 75 75 5 G4_Fe -150 0 -195.0 log_SRENV norot dead 304
# Back mirror plate
/musr/command construct box BShU 225 50 5 G4_Fe 0 125 195.0 log_SRENV norot dead 321
/musr/command construct box BShD 225 50 5 G4_Fe 0 -125 195.0 log_SRENV norot dead 322
/musr/command construct box BShL 75 75 5 G4_Fe 150 0 195.0 log_SRENV norot dead 323
/musr/command construct box BShR 75 75 5 G4_Fe -150 0 195.0 log_SRENV norot dead 324
# Top coils
/musr/command construct box TCoil1 170 22.5 10 G4_Cu 0 117.5 -60 log_SRENV norot dead 401
/musr/command construct box TCoil2 170 22.5 10 G4_Cu 0 117.5 60 log_SRENV norot dead 402
/musr/command construct box TCoil3 10 22.5 50 G4_Cu 160 117.5 0 log_SRENV norot dead 403
/musr/command construct box TCoil4 10 22.5 50 G4_Cu -160 117.5 0 log_SRENV norot dead 404
# Bottom coils
/musr/command construct box BCoil1 170 22.5 10 G4_Cu 0 -117.5 -60 log_SRENV norot dead 421
/musr/command construct box BCoil2 170 22.5 10 G4_Cu 0 -117.5 60 log_SRENV norot dead 422
/musr/command construct box BCoil3 10 22.5 50 G4_Cu 160 -117.5 0 log_SRENV norot dead 423
/musr/command construct box BCoil4 10 22.5 50 G4_Cu -160 -117.5 0 log_SRENV norot dead 424
# Capacitor
/musr/command construct box Cap_p 0.5 50 150 Brass 55 0 0 log_SRENV norot dead 501
/musr/command construct box Cap_n 0.5 50 150 Brass -55 0 0 log_SRENV norot dead 502
#*/musr/command construct box Uniform 49 49 150 G4_Galactic 0 0 0 log_SRENV norot dead 503
/musr/command construct tubs RodCapUp 0 5 150 90 180 Brass 55 55 0 log_SRENV norot dead 504
/musr/command construct tubs RodCapUn 0 5 150 -90 180 Brass -55 55 0 log_SRENV norot dead 505
/musr/command construct tubs RodCapDp 0 5 150 90 180 Brass 55 -55 0 log_SRENV norot dead 506
/musr/command construct tubs RodCapDn 0 5 150 -90 180 Brass -55 -55 0 log_SRENV norot dead 507
# Rods
/musr/command construct tubs RodPosU 0 5 150 0 360 Brass 27.5 55 0 log_SRENV norot dead 511
/musr/command construct tubs Rod0U 0 5 150 0 360 Brass 0 55 0 log_SRENV norot dead 512
/musr/command construct tubs RodNegU 0 5 150 0 360 Brass -27.5 55 0 log_SRENV norot dead 513
/musr/command construct tubs RodPosD 0 5 150 0 360 Brass 27.5 -55 0 log_SRENV norot dead 514
/musr/command construct tubs Rod0D 0 5 150 0 360 Brass 0 -55 0 log_SRENV norot dead 515
/musr/command construct tubs RodNegD 0 5 150 0 360 Brass -27.5 -55 0 log_SRENV norot dead 516
# Vacuum vessel
/musr/command construct box TVac1 72.5 2.5 191.5 Steel 0 72.5 0 log_SRENV norot dead 601
/musr/command construct box TVac2 2.5 70.0 191.5 Steel 72.5 0 0 log_SRENV norot dead 602
/musr/command construct box TVac3 72.5 2.5 191.5 Steel 0 -72.5 0 log_SRENV norot dead 603
/musr/command construct box TVac4 2.5 70.0 191.5 Steel -72.5 0 0 log_SRENV norot dead 604
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For Spin Rotator
/musr/command construct tubs SREField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 630 nofield
/musr/command construct tubs SRBField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.51 log_World norot dead 631 nofield
/musr/command visattributes G4_Cu red
/musr/command visattributes G4_Fe blue
/musr/command visattributes Brass yellow
################################################################################################################
# Lens 1 - 1st Einzel Lens
################################################################################################################
# L1ENV - Lens 1 envelope - for easy positioning of lens parts (outer dia: 100 mm, length: 300 mm)
#/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 0 0 -1929.5 log_World norot dead 600
/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend 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
# n = 2 - Ground Electrode 2 (closer to SR).
/musr/command construct tubs L1GP2 40 44 50 0 360 Steel 0 0 100 log_L1ENV norot dead 653
# HP - High Potential Electrode (Central Anode - usually at +8.5 kV, for a 15 keV muon beam)
/musr/command construct tubs L1HP 40 44 40 0 360 Steel 0 0 0 log_L1ENV norot dead 652
# Lens 1 visual attributes (optional)
/musr/command visattributes log_L1HP darkred
################################################################################################################
# Electrostatic field at accelerator after moderator
################################################################################################################
#
/musr/command construct box Grid1 9.1 25 25 G4_Galactic 489.9 0.0 -1678.0 log_World rotMod dead 212
/musr/command globalfield Grid1_field 9.1 25 25 uniform 489.9 0.0 -1678.0 log_Grid1 0 0 0 -0.2527 0 0
/musr/command construct box Grid2 5 24 24 G4_Galactic 475.8 0.0 -1678.0 log_World rotMod dead 214
/musr/command globalfield Grid2_field 5 24 24 uniform 475.8 0.0 -1678.0 log_Grid2 0 0 0 -1.04 0 0
/musr/command globalfield printFieldValueAtPoint 489.9 0.0 -1678.0
/musr/command globalfield printFieldValueAtPoint 475.8 0.0 -1678.0
################################################################################################################
# Electrostatic mirror at bend
################################################################################################################
# MRENV
/musr/command construct box MirrE 65 65 10 G4_Galactic 14.14213562 0.0 -1678.0 log_World rotMirr dead 200
/musr/command globalfield Mirr_field 65 65 10 uniform 14.14213562 0.0 -1678.0 log_MirrE 0 0 0 0 0 0.75
###################################################################################
################### E L E C T R O M G N E T I C F I E L D S ##################
###################################################################################
# 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!
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For L1
/musr/command construct tubs L1EField 0 0.01 0.005 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend dead 706 nofield
# For L2 (L3 before 2012)
/musr/command construct tubs L3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -863.0 log_World norot dead 708 nofield
# LENS 1. Best L1 settings: 7.2 kV for 12 keV muons
/musr/command globalfield Lens1EField 251.5 0.0 -1678.0 fromfile 2DE L1_Erz.map log_L1EField 9.0
# LENS 2. Best L3 settings: 8.4 kV for 12 keV muons
/musr/command globalfield Lens3EField 0. 0. -863.0 fromfile 2DE L3_Erz.map log_L3EField 10.5
# Spin rotator
# Electric field should be 370mm plates
# Magnetic field should be 260mm poles as measured srlem_ext.map
/musr/command globalfield Ele_field 0. 0. -1284.5 fromfile 3DE E_Sep_P37.5cm.map log_SREField 2.717
/musr/command globalfield Mag_field 0. 0. -1284.51 fromfile 3DB srlem_ext.map log_SRBField -0.00692
# 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
# 57.15mm upstream center
/musr/command construct box TriggE0 45 45 5 G4_Galactic 0 0 -555.1 log_World norot dead 630 nofield
# 48mm upstream center
/musr/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -543. log_World norot dead 631 nofield
# 2.25mm downstream center
/musr/command construct box TriggE2 45 45 4.9479 G4_Galactic 0 0 -492.75 log_World rotTrig dead 632 nofield
# 54mm downstream center
/musr/command construct box TriggE3 45 45 4 G4_Galactic 0 0 -441.0 log_World norot dead 633
### Electric field at TRIGGER Detector TD: Three different uniform fields, 2012 settings
/musr/command globalfield Trigg0_field 45 45 5 uniform 0. 0. -555.1 log_TriggE0 0 0 0 0 0 0.338
/musr/command globalfield Trigg1_field 45 45 4 uniform 0. 0. -543. log_TriggE1 0 0 0 0 0 -0.02375
/musr/command globalfield Trigg2_field 45 45 4.9497 uniform 0. 0. -492.75 log_TriggE2 0 0 0 0 0 0.041416
/musr/command globalfield Trigg3_field 45 45 4 uniform 0. 0. -441.0 log_TriggE3 0 0 0 0 0 -0.45
# Trigger Lens, L3, (available space from -437 to -347, we use 70mm of that)
/musr/command construct tubs TL3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -382.0 log_World norot dead 706 nofield
/musr/command globalfield ColRingEField 0. 0. -382.0 fromfile 2DE CR7cm_Grid.map log_TL3EField 12.0
### Electric field at RING ANODE - from 3DE field map
# To create an arbitrary configuration, switch on all fields and set different potentials.
/musr/command globalfield RngAnT_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_T 11.9
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 11.9
/musr/command globalfield RngAnB_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_B 11.9
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 11.9
### 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_convMap.map log_SBField 0.
### Electric field at the sample
/musr/command construct tubs SEField 0 0.01 0.005 0 360 G4_Galactic 0.0 0.0 15.9 log_World norot dead 710 nofield
/musr/command globalfield SampleEField 0. 0. 15.9 fromfile 2DE SamplePlate_2DE.map log_SEField 0.0
# Set parameters for particle tracking in an EM field
/musr/command globalfield setparameter SetLargestAcceptableStep 5
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
# TESTING EM FIELD
/musr/command globalfield printFieldValueAtPoint 0. 0. 0.
/musr/command globalfield printFieldValueAtPoint 0. 35. -670.
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.10
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
#/musr/command process addModel mu+ G4MuMultipleScattering G4WentzelVIModel 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ musrMuEnergyLossLandau -1 -1 1
# parameters for Landau energy loss distribution, LandauSigma corresponds to the width of the distibution
/musr/command SetLandauMPV 0.01
/musr/command SetLandauSigma 0.3
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#/musr/command process addDiscreteProcess mu+ G4CoulombScattering
#/musr/command process addProcess mu+ G4UserSpecialCuts -1 -1 3
#/musr/command process addProcess mu+ G4StepLimiter -1 -1 4
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
#/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
#/musr/command signalSeparationTime 0.1
#
/musr/run/randomOption 1
################################################################################################################
# -- Setting simulation PARAMETERS --
################################################################################################################
# Set the overall range cut (default 0.1 mm)
#*/run/setCut 1 mm
# Set the range cut on particular volumes (in mm)
#/musr/command SetUserLimits log_CFoil 1e-8 -1 -1 -1 -1
#*/musr/command SetUserLimits log_target 0.01
#*/musr/command SetUserLimits log_targetscint 0.01
#*/musr/command SetUserLimits log_cryostatscint 0.01
# Set particle energy cuts on particular volumes (in eV)
#/musr/command SetUserLimits log_World ustepMax(mm) utrakMax(mm) utimeMax(ns) uekinMin(MeV) urangMin(mm)
#/musr/command SetUserLimits log_World -1 -1 -1 1e-7 -1
# Geant4 10.2
#------------
/process/em/lowestMuHadEnergy 1e-6 MeV
# Store ALL the events in a ROOT tree or just the interesting ones? (default is true)
#*/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
# Override runID number
#*/musr/run/runID 21
# Set the frequency of event printing
/musr/run/howOftenToPrintEvent 100
# 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
/musr/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
#*/control/execute visdawn.mac
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
#/musr/command rootOutput weight off
#/musr/command rootOutput BFieldAtDecay off
#/musr/command rootOutput muIniPosX off
#/musr/command rootOutput muIniPosY off
#/musr/command rootOutput muIniPosZ off
#/musr/command rootOutput muIniMomX off
#/musr/command rootOutput muIniMomY off
#/musr/command rootOutput muIniMomZ off
#/musr/command rootOutput muIniPolX off
#/musr/command rootOutput muIniPolY off
#/musr/command rootOutput muIniPolZ off
#/musr/command rootOutput muDecayDetID off
#/musr/command rootOutput muDecayPosX off
#/musr/command rootOutput muDecayPosY off
#/musr/command rootOutput muDecayPosZ off
#/musr/command rootOutput muDecayTime off
#/musr/command rootOutput muDecayPolX off
#/musr/command rootOutput muDecayPolY off
#/musr/command rootOutput muDecayPolZ off
#/musr/command rootOutput muTargetTime off
#/musr/command rootOutput muTargetPolX off
#/musr/command rootOutput muTargetPolY off
#/musr/command rootOutput muTargetPolZ off
#/musr/command rootOutput muM0Time off
#/musr/command rootOutput muM0PolX off
#/musr/command rootOutput muM0PolY off
#/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
#/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
/musr/command storeOnlyEventsWithHits false
################################################################################################################
# -- Setting PARTICLE GUN parameters --
################################################################################################################
# Default momentum direction: 001, i.e. 0z.
# Default muon soin 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 -1144 mm, acceleration starts at -1154.15 mm
#/gun/vertex 0. 0. -2119.5 mm
/gun/vertex 499 0. -1678.0 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 6.83 6.83 0 mm
/gun/vertexsigma -15 -15 0 mm
#/gun/boxboundarycentre 499 0 -1678 mm
#/gun/boxboundary 15 15 1 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
# Set muon energy before hitting TD; a constant field in front of the C-foil accelerates the muons
# to add 3.38 keV
/gun/kenergy 15.0 eV
# Set beam momentum direction
/gun/direction -1.0 0.0 0.0
# Set muon spin direction: +10deg or 0
/gun/muonPolarizVector 0.9848 0 0.17365
#/gun/muonPolarizVector 1 0 0
# Other useful test parameters:
#------------------Oct.20 2015------------------------------------
# kenergy= 15 eV Pmu= 0.xxxMeV/c ==> sigma = /2.354 = MeV/c
#/gun/momentumsmearing 0.07508 MeV
/gun/momentumsmearing 0.016 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#*/gun/momentumboundary 20 40 0 MeV
#---/gun/tilt: xangle, yangle, dummy
#*/gun/tilt 0 0.0 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.0 deg
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#*/gun/decaytimelimits 10400 10420 2197.03 ns
#/gun/tiltsigma 1.4 1.4 0 deg
/gun/tiltsigma 0 0 -1.0 deg
# Selectively inactivate or activate sensitive detectors
#*/hits/inactivate /musr/ScintSD
# Only for code debugging!
/tracking/verbose 0
# BEAM ON
#/run/beamOn 1000000
#/run/beamOn 10
/run/beamOn 10000

View File

@@ -0,0 +1,950 @@
# Template suitable for beam profile detectioon with the spin rotator in place
# Zaher Salman 7/10/2010
#
# Thomas Prokscha 22/Nov/2012
# Moved sample stack on cryostat 3mm downstream to fit to positions in apparatus
# Changed positions of positron counters according to corrected drawing LEM 37.01.024 (19/Sep/2012)
#
# Position downstream detectors: z=+62.5mm original value: z=+66.5mm
# Position upstream detectors: z=-64.0mm original value: z=-60.0mm
#
# 2013 setup: 1mm Ti sample tube
#
# 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
#
# Ran Xiao 25/Sep/2014
# Start muons at moderator at x=499, assume cosA angular distribution, assume energy distribution
#
################################################################################################################
# -- ROTATION MATRICES --
################################################################################################################
# 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
/musr/command rotation rotRAnL 0 0 1 90
/musr/command rotation rotRAnD 0 0 1 180
# More Rotations
/musr/command rotation rotD1 0 0 1 11.250
/musr/command rotation rotD2 0 0 1 33.750
/musr/command rotation rotD3 0 0 1 56.250
/musr/command rotation rotD4 0 0 1 78.750
/musr/command rotation rotD5 0 0 1 101.250
/musr/command rotation rotD6 0 0 1 123.750
/musr/command rotation rotD7 0 0 1 146.250
/musr/command rotation rotD8 0 0 1 168.750
/musr/command rotation rotD9 0 0 1 191.250
/musr/command rotation rotD10 0 0 1 213.750
/musr/command rotation rotD11 0 0 1 236.250
/musr/command rotation rotD12 0 0 1 258.750
/musr/command rotation rotD13 0 0 1 281.250
/musr/command rotation rotD14 0 0 1 303.750
/musr/command rotation rotD15 0 0 1 326.250
/musr/command rotation rotD16 0 0 1 348.750
/musr/command rotation rotD17 0 0 1 11.250
/musr/command rotation rotD18 0 0 1 33.750
/musr/command rotation rotD19 0 0 1 56.250
/musr/command rotation rotD20 0 0 1 78.750
/musr/command rotation rotD21 0 0 1 101.250
/musr/command rotation rotD22 0 0 1 123.750
/musr/command rotation rotD23 0 0 1 146.250
/musr/command rotation rotD24 0 0 1 168.750
/musr/command rotation rotD25 0 0 1 191.250
/musr/command rotation rotD26 0 0 1 213.750
/musr/command rotation rotD27 0 0 1 236.250
/musr/command rotation rotD28 0 0 1 258.750
/musr/command rotation rotD29 0 0 1 281.250
/musr/command rotation rotD30 0 0 1 303.750
/musr/command rotation rotD31 0 0 1 326.250
/musr/command rotation rotD32 0 0 1 348.750
# Beam line bend at mirror
/musr/command rotation rotBend 0 1 0 -90
/musr/command rotation rotMirr 0 1 0 -45
/musr/command rotation rotMod 0 1 0 -2
################################################################################################################
# -- LEM GEOMETRY --
################################################################################################################
# WORLD = Laboratory reference frame, the origin is in the centre of the LEM sample tube
/musr/command construct box World 900 350 2600 G4_Galactic 0 0 0 no_logical_volume norot dead -1
/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 60 0.05 0 360 G4_Galactic 850 0 -1678 log_World rotBend dead 851
/musr/command construct tubs save1 0 60 0.05 0 360 G4_Galactic 800 0 -1678 log_World rotBend dead 852
/musr/command construct tubs save2 0 60 0.05 0 360 G4_Galactic 750 0 -1678 log_World rotBend dead 853
/musr/command construct tubs save3 0 60 0.05 0 360 G4_Galactic 700 0 -1678 log_World rotBend dead 854
/musr/command construct tubs save4 0 60 0.05 0 360 G4_Galactic 650 0 -1678 log_World rotBend dead 855
/musr/command construct tubs save5 0 60 0.05 0 360 G4_Galactic 600 0 -1678 log_World rotBend dead 856
/musr/command construct tubs save6 0 60 0.05 0 360 G4_Galactic 550 0 -1678 log_World rotBend dead 857
/musr/command construct tubs save7 0 60 0.05 0 360 G4_Galactic 500 0 -1678 log_World rotBend dead 858
/musr/command construct tubs save8 0 60 0.05 0 360 G4_Galactic 450 0 -1678 log_World rotBend dead 859
/musr/command construct tubs save9 0 60 0.05 0 360 G4_Galactic 400 0 -1678 log_World rotBend dead 860
/musr/command construct tubs save10 0 60 0.05 0 360 G4_Galactic 350 0 -1678 log_World rotBend dead 861
/musr/command construct tubs save11 0 60 0.05 0 360 G4_Galactic 300 0 -1678 log_World rotBend dead 862
/musr/command construct tubs save12 0 60 0.05 0 360 G4_Galactic 240 0 -1678 log_World rotBend dead 863
/musr/command construct tubs save13 0 60 0.05 0 360 G4_Galactic 200 0 -1678 log_World rotBend dead 864
/musr/command construct tubs save14 0 60 0.05 0 360 G4_Galactic 150 0 -1678 log_World rotBend dead 865
/musr/command construct tubs save15 0 60 0.05 0 360 G4_Galactic 100 0 -1678 log_World rotBend dead 866
/musr/command construct tubs save16 0 60 0.05 0 360 G4_Galactic 70 0 -1678 log_World rotBend dead 867
/musr/command construct tubs save17 0 60 0.05 0 360 G4_Galactic 0 0 -1620 log_World norot dead 868
/musr/command construct tubs save18 0 60 0.05 0 360 G4_Galactic 0 0 -1600 log_World norot dead 869
/musr/command construct tubs save19 0 60 0.05 0 360 G4_Galactic 0 0 -1550 log_World norot dead 870
/musr/command construct tubs save20 0 60 0.05 0 360 G4_Galactic 0 0 -1500 log_World norot dead 871
/musr/command construct tubs save21 0 60 0.05 0 360 G4_Galactic 0 0 -1450 log_World norot dead 872
/musr/command construct tubs save22 0 60 0.05 0 360 G4_Galactic 0 0 -1400 log_World norot dead 873
/musr/command construct tubs save23 0 60 0.05 0 360 G4_Galactic 0 0 -1350 log_World norot dead 874
/musr/command construct tubs save24 0 60 0.05 0 360 G4_Galactic 0 0 -1300 log_World norot dead 875
/musr/command construct tubs save25 0 60 0.05 0 360 G4_Galactic 0 0 -1250 log_World norot dead 876
/musr/command construct tubs save26 0 60 0.05 0 360 G4_Galactic 0 0 -1200 log_World norot dead 877
/musr/command construct tubs save27 0 60 0.05 0 360 G4_Galactic 0 0 -1150 log_World norot dead 878
/musr/command construct tubs save28 0 60 0.05 0 360 G4_Galactic 0 0 -1100 log_World norot dead 879
/musr/command construct tubs save29 0 60 0.05 0 360 G4_Galactic 0 0 -1050 log_World norot dead 880
/musr/command construct tubs save30 0 60 0.05 0 360 G4_Galactic 0 0 -1000 log_World norot dead 881
/musr/command construct tubs save31 0 60 0.05 0 360 G4_Galactic 0 0 -950 log_World norot dead 882
/musr/command construct tubs save32 0 60 0.05 0 360 G4_Galactic 0 0 -900 log_World norot dead 883
/musr/command construct tubs save33 0 60 0.05 0 360 G4_Galactic 0 0 -850 log_World norot dead 884
/musr/command construct tubs save34 0 60 0.05 0 360 G4_Galactic 0 0 -800 log_World norot dead 885
/musr/command construct tubs save35 0 60 0.05 0 360 G4_Galactic 0 0 -750 log_World norot dead 886
/musr/command construct tubs save36 0 60 0.05 0 360 G4_Galactic 0 0 -700 log_World norot dead 887
/musr/command construct tubs save37 0 60 0.05 0 360 G4_Galactic 0 0 -650 log_World norot dead 888
/musr/command construct tubs save38 0 60 0.05 0 360 G4_Galactic 0 0 -600 log_World norot dead 889
/musr/command construct tubs save39 0 60 0.05 0 360 G4_Galactic 0 0 -525 log_World norot dead 890
/musr/command construct tubs save40 0 60 0.05 0 360 G4_Galactic 0 0 -450 log_World norot dead 891
/musr/command construct tubs save41 0 60 0.05 0 360 G4_Galactic 0 0 -420 log_World norot dead 892
/musr/command construct tubs save42 0 60 0.05 0 360 G4_Galactic 0 0 -400 log_World norot dead 893
/musr/command construct tubs save43 0 60 0.05 0 360 G4_Galactic 0 0 -350 log_World norot dead 894
/musr/command construct tubs save44 0 60 0.05 0 360 G4_Galactic 0 0 -300 log_World norot dead 895
/musr/command construct tubs save45 0 60 0.05 0 360 G4_Galactic 0 0 -250 log_World norot dead 896
/musr/command construct tubs save46 0 60 0.05 0 360 G4_Galactic 0 0 -200 log_World norot dead 897
/musr/command construct tubs save47 0 60 0.05 0 360 G4_Galactic 0 0 -150 log_World norot dead 898
/musr/command construct tubs save48 0 60 0.05 0 360 G4_Galactic 0 0 -100 log_World norot dead 899
/musr/command construct tubs save49 0 60 0.05 0 360 G4_Galactic 0 0 -50 log_World norot dead 900
/musr/command construct tubs save50 0 60 0.05 0 360 G4_Galactic 0 0 0 log_World norot dead 901
/musr/command construct tubs save51 0 60 0.05 0 360 G4_Galactic 0 0 16 log_World norot dead 902
/musr/command construct tubs save52 0 60 0.05 0 360 G4_Galactic 0 0 100 log_World norot dead 903
/musr/command construct tubs save53 0 60 0.05 0 360 G4_Galactic 0 0 150 log_World norot dead 904
/musr/command visattributes G4_Galactic invisible
################################################################################################################
# -- APD Scintillators --
################################################################################################################
# Detectors volume (0,0,0) coninsides with World (0,0,0)
/musr/command construct tubs DetV 80 105 133 0 360 G4_Galactic 0 0 0 log_World norot dead 100
/musr/command visattributes log_DetV invisible
# For final design set
# BackHW=60
# BackCR=-64.0, 19/Sep/2012
# ForwHW=65.5
# ForwCR=62.5, 19/Sep/2012
# Back inner sections (Upstream) (v.i.)
# Final design (30 Jun 09, 19 Sep 12) BackHW=60.0mm (Half width or length), BackCR=-4-BackHW=-64.0mm (Center z coordinate)
/musr/command construct trd90y ScD1 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 -17.265493 -64.0 log_DetV rotD1 musr/ScintSD 1
/musr/command construct trd90y ScD2 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 -49.167966 -64.0 log_DetV rotD2 musr/ScintSD 2
/musr/command construct trd90y ScD3 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 -73.585061 -64.0 log_DetV rotD3 musr/ScintSD 3
/musr/command construct trd90y ScD4 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 -86.799497 -64.0 log_DetV rotD4 musr/ScintSD 4
/musr/command construct trd90y ScD5 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 -86.799497 -64.0 log_DetV rotD5 musr/ScintSD 5
/musr/command construct trd90y ScD6 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 -73.585061 -64.0 log_DetV rotD6 musr/ScintSD 6
/musr/command construct trd90y ScD7 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 -49.167966 -64.0 log_DetV rotD7 musr/ScintSD 7
/musr/command construct trd90y ScD8 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 -17.265493 -64.0 log_DetV rotD8 musr/ScintSD 8
/musr/command construct trd90y ScD9 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 17.265493 -64.0 log_DetV rotD9 musr/ScintSD 9
/musr/command construct trd90y ScD10 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 49.167966 -64.0 log_DetV rotD10 musr/ScintSD 10
/musr/command construct trd90y ScD11 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 73.585061 -64.0 log_DetV rotD11 musr/ScintSD 11
/musr/command construct trd90y ScD12 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 86.799497 -64.0 log_DetV rotD12 musr/ScintSD 12
/musr/command construct trd90y ScD13 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 86.799497 -64.0 log_DetV rotD13 musr/ScintSD 13
/musr/command construct trd90y ScD14 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 73.585061 -64.0 log_DetV rotD14 musr/ScintSD 14
/musr/command construct trd90y ScD15 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 49.167966 -64.0 log_DetV rotD15 musr/ScintSD 15
/musr/command construct trd90y ScD16 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 17.265493 -64.0 log_DetV rotD16 musr/ScintSD 16
# Forward inner sections (Downstream) (h.i.)
# Final design (30 June 09, 19 Sep 12) ForwHW=65.5mm (Half width or length), ForwCR=-3+ForwHW=62.5mm (Center z coordinate)
/musr/command construct trd90y ScD17 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 -17.070403 62.5 log_DetV rotD17 musr/ScintSD 17
/musr/command construct trd90y ScD18 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 -48.612395 62.5 log_DetV rotD18 musr/ScintSD 18
/musr/command construct trd90y ScD19 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 -72.753591 62.5 log_DetV rotD19 musr/ScintSD 19
/musr/command construct trd90y ScD20 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 -85.818712 62.5 log_DetV rotD20 musr/ScintSD 20
/musr/command construct trd90y ScD21 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 -85.818712 62.5 log_DetV rotD21 musr/ScintSD 21
/musr/command construct trd90y ScD22 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 -72.753591 62.5 log_DetV rotD22 musr/ScintSD 22
/musr/command construct trd90y ScD23 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 -48.612395 62.5 log_DetV rotD23 musr/ScintSD 23
/musr/command construct trd90y ScD24 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 -17.070403 62.5 log_DetV rotD24 musr/ScintSD 24
/musr/command construct trd90y ScD25 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 17.070403 62.5 log_DetV rotD25 musr/ScintSD 25
/musr/command construct trd90y ScD26 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 48.612395 62.5 log_DetV rotD26 musr/ScintSD 26
/musr/command construct trd90y ScD27 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 72.753591 62.5 log_DetV rotD27 musr/ScintSD 27
/musr/command construct trd90y ScD28 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 85.818712 62.5 log_DetV rotD28 musr/ScintSD 28
/musr/command construct trd90y ScD29 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 85.818712 62.5 log_DetV rotD29 musr/ScintSD 29
/musr/command construct trd90y ScD30 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 72.753591 62.5 log_DetV rotD30 musr/ScintSD 30
/musr/command construct trd90y ScD31 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 48.612395 62.5 log_DetV rotD31 musr/ScintSD 31
/musr/command construct trd90y ScD32 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 17.070403 62.5 log_DetV rotD32 musr/ScintSD 32
# Back outer sections (v.a.)
/musr/command construct trd ScD33 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 -18.631126 -64.0 log_DetV rotD1 musr/ScintSD 33
/musr/command construct trd ScD34 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 -53.056957 -64.0 log_DetV rotD2 musr/ScintSD 34
/musr/command construct trd ScD35 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 -79.405348 -64.0 log_DetV rotD3 musr/ScintSD 35
/musr/command construct trd ScD36 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 -93.664994 -64.0 log_DetV rotD4 musr/ScintSD 36
/musr/command construct trd ScD37 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 -93.664994 -64.0 log_DetV rotD5 musr/ScintSD 37
/musr/command construct trd ScD38 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 -79.405348 -64.0 log_DetV rotD6 musr/ScintSD 38
/musr/command construct trd ScD39 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 -53.056957 -64.0 log_DetV rotD7 musr/ScintSD 39
/musr/command construct trd ScD40 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 -18.631126 -64.0 log_DetV rotD8 musr/ScintSD 40
/musr/command construct trd ScD41 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 18.631126 -64.0 log_DetV rotD9 musr/ScintSD 41
/musr/command construct trd ScD42 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 53.056957 -64.0 log_DetV rotD10 musr/ScintSD 42
/musr/command construct trd ScD43 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 79.405348 -64.0 log_DetV rotD11 musr/ScintSD 43
/musr/command construct trd ScD44 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 93.664994 -64.0 log_DetV rotD12 musr/ScintSD 44
/musr/command construct trd ScD45 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 93.664994 -64.0 log_DetV rotD13 musr/ScintSD 45
/musr/command construct trd ScD46 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 79.405348 -64.0 log_DetV rotD14 musr/ScintSD 46
/musr/command construct trd ScD47 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 53.056957 -64.0 log_DetV rotD15 musr/ScintSD 47
/musr/command construct trd ScD48 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 18.631126 -64.0 log_DetV rotD16 musr/ScintSD 48
# Forward outer sections (h.a.)
/musr/command construct trd ScD49 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 -18.436035 62.5 log_DetV rotD1 musr/ScintSD 49
/musr/command construct trd ScD50 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 -52.501387 62.5 log_DetV rotD2 musr/ScintSD 50
/musr/command construct trd ScD51 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 -78.573878 62.5 log_DetV rotD3 musr/ScintSD 51
/musr/command construct trd ScD52 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 -92.684209 62.5 log_DetV rotD4 musr/ScintSD 52
/musr/command construct trd ScD53 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 -92.684209 62.5 log_DetV rotD5 musr/ScintSD 53
/musr/command construct trd ScD54 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 -78.573878 62.5 log_DetV rotD6 musr/ScintSD 54
/musr/command construct trd ScD55 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 -52.501387 62.5 log_DetV rotD7 musr/ScintSD 55
/musr/command construct trd ScD56 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 -18.436035 62.5 log_DetV rotD8 musr/ScintSD 56
/musr/command construct trd ScD57 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 18.436035 62.5 log_DetV rotD9 musr/ScintSD 57
/musr/command construct trd ScD58 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 52.501387 62.5 log_DetV rotD10 musr/ScintSD 58
/musr/command construct trd ScD59 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 78.573878 62.5 log_DetV rotD11 musr/ScintSD 59
/musr/command construct trd ScD60 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 92.684209 62.5 log_DetV rotD12 musr/ScintSD 60
/musr/command construct trd ScD61 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 92.684209 62.5 log_DetV rotD13 musr/ScintSD 61
/musr/command construct trd ScD62 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 78.573878 62.5 log_DetV rotD14 musr/ScintSD 62
/musr/command construct trd ScD63 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 52.501387 62.5 log_DetV rotD15 musr/ScintSD 63
/musr/command construct trd ScD64 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 18.436035 62.5 log_DetV rotD16 musr/ScintSD 64
# Structural support inside the detectors vessel
# Carbon fibre, inner radius 80, thickness 2 mm.
# Additional Al plate removed, 2 mm thick for h.i and h.a and 3 mm thick for v.i. and v.a
/musr/command construct tubs hInShell 80.0 82.0 65.5 0 360 G4_C 0 0 62 log_DetV norot dead 70
/musr/command construct tubs vInShell 80.0 82.0 60.0 0 360 G4_C 0 0 -64.5 log_DetV norot dead 70
# Visual attributes (optional)
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE green
#/musr/command visattributes log_ScD49 green
#/musr/command visattributes log_ScD50 green
#/musr/command visattributes log_test red
################################################################################################################
# Sample vacuum/tube up to gate valve - Can host either the Cryostat or the MCP2
################################################################################################################
# Vacuum space
# /musr/command construct tubs SamV 0 75.0 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100
# Sample tube
#/musr/command construct tubs SamS 75.0 77.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# 2012: 2mm Ti tube, 2013: 1mm
/musr/command construct tubs SamS 75.0 76.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# F160 - 160 CF flange upstream of MCP2 tube
/musr/command construct tubs F160 78.0 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 102
# F100 (Blank end flange)
/musr/command construct tubs F100 0 75.0 10 0 360 Steel 0 0 172.0 log_World norot dead 103
# 200 CF flange upstream of MCP2 tube covering the whole length of the gate valve chamber.
/musr/command construct tubs GATS 103.25 126.5 92.5 0 360 Steel 0 0 -254.5 log_World norot dead 371
# F200 - 200 CF flange upstream of MCP2 tube to connect to gate valve chamber
/musr/command construct tubs F200 76.5 103.25 12 0 360 Steel 0 0 -174.0 log_World norot dead 372
# Visual attributes (optional)
#/musr/command visattributes log_SamV invisible
/musr/command visattributes log_SamS oxsteel
/musr/command visattributes log_F160 oxsteel
#/musr/command visattributes log_F100 oxsteel
/musr/command visattributes log_GATS oxsteel
/musr/command visattributes log_F200 oxsteel
################################################################################################################
# MCP - Micro Channel Plate Detector MCP2
# mcpv_z = -92.5 mm!
#
# We have a 324 mm long sample tube;
# the MCP2 front side is at 142 mm from the end of the sample tube.
# the front face of the sample plate of the cryostat is 145 mm from the end of the sample tube.
#
################################################################################################################
#
# MCPM1 - MCP Macor ring 1
# MCPD - electron multiplying glass disk (also known as target)
# Sensitive surface at z = 20 mm wrt. World
# MCPM2 - MCP Macor ring 2
# /musr/command construct tubs MCPM1 24 32.5 0.75 0 360 Macor 0 0 19.25 log_World norot dead 251
# Use it either as (DMCP-musr/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz.
# /musr/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 21.5 log_World norot dead 252
# /musr/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 23.75 log_World norot dead 253
# NOTE: To intercept ALL the incoming muons, comment the DMCP and MCPM1 lines above and uncomment this one:
#*aa/musr/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs target 0 21.0 1.5 0 360 MCPglass 0 0 114 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs saveTarget 0 75.0 0.2 0 360 G4_Galactic 0 0 110.79 log_SamV norot dead 222
#
# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole)
# MCVR - "Vacuum Ring" (circular hole)
# /musr/command construct box MCSR 36.5 36.5 1 Steel 0 0 25.5 log_World norot dead 254
# /musr/command construct tubs MCVR 0 27.5 1 0 360 G4_Galactic 0 0 0 log_MCSR norot dead 255
# 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
# /musr/command construct box MCPA 36.5 36.5 4 Steel 0 0 37 log_World norot dead 256
# /musr/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 257
# /musr/command construct tubs ANVA2 0 27.5 1.5 0 360 G4_Galactic 0 0 2.5 log_MCPA norot dead 258
# MCSS - MCP Stainless Steel Support Ring
# /musr/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 69.8 log_World norot dead 259
# MCP2 visual attributes (optional)
#/musr/command visattributes log_DMCP MCP_style
#*/musr/command visattributes log_target MCP_style
#*/musr/command visattributes log_MCPM1 MACOR_style
#*------ /musr/command visattributes log_MCPM2 MACOR_style
################################################################################################################
# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm)
#
# sample plate front face is at z = 17mm:
# cold finger distance to CF100: 130mm
# 5mm base plate + 6mm sapphire + 4mm sample plate = 15mm
# sample plate front face from CF100: 145mm
# z-position of sample plate front face: 324/2-145mm = 17mm
# --> sample plate center is at 17+2=19mm
#
################################################################################################################
# Dimensions for large/small sample plates SamPL=35/21 and SaphPL=SamPL35-5
/musr/command construct tubs target 0 35 2 0 360 G4_Al 0 0 19.0 log_World norot dead 251
/musr/command construct tubs SAPH 0 30 3 0 360 G4_ALUMINUM_OXIDE 0 0 24.0 log_World norot dead 252
/musr/command construct tubs SAH1 0 35 2.5 0 360 G4_Al 0 0 29.5 log_World norot dead 253
# Special save target volume
/musr/command construct tubs saveTarget 0 40 0.05 0 360 G4_Galactic 0 0 16.9 log_World norot dead 253
# Other components of the cryostat (dimensions and position of CRY4 are only approx. because unknown)
# COld Finger
/musr/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 37.0 log_World norot dead 261
# End plate of cryostat (7 mm thick, 30 mm diameter)
/musr/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 45.5 log_World norot dead 262
# Heat exchanger (assuming a 10 mm opening - Original dimensions not known.) # OLD pos. 160.0
/musr/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 74.0 log_World norot dead 263
# Mounting ring for He-shield
/musr/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 54.0 log_World norot dead 264
# 2 mm thick plate for mounting ring. This is just to close the downstream side.
/musr/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 54.0 log_World norot dead 265
# Radiation shield
/musr/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 19.0 log_World norot dead 266
# Front part of the radiation shield
/musr/command construct tubs CRSH2 30 48 0.5 0 360 G4_Cu 0 0 -26.5 log_World norot dead 267
# Electrical Field Guard Rings (distance between the guard rings: 16 mm)
# /musr/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 -13.5 log_World norot dead 271
# /musr/command construct tubs Guard2 29 38 1.5 0 360 G4_Cu 0 0 2.5 log_World norot dead 272
# Cryostat visual attributes (optional)
/musr/command visattributes log_SAH1 oxsteel
#/musr/command visattributes log_SAH2 oxsteel
/musr/command visattributes log_target oxsteel
/musr/command visattributes log_SAPH MACOR_style
#/musr/command visattributes log_SAH3 oxsteel
/musr/command visattributes log_CRSH yellow
/musr/command visattributes log_CRSH2 yellow
#/musr/command visattributes log_test red
################################################################################################################
# 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
/musr/command construct cons RA_EU 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World norot dead 801
/musr/command construct cons RA_MU 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World norot dead 802
/musr/command construct cons RA_ER 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnR dead 803
/musr/command construct cons RA_MR 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnR dead 804
/musr/command construct cons RA_ED 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnD dead 805
/musr/command construct cons RA_MD 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnD dead 806
/musr/command construct cons RA_EL 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnL dead 807
/musr/command construct cons RA_ML 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnL dead 808
# 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_T 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 822
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.02 log_World rotRAnR dead 824
/musr/command construct tubs RA_B 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 826
/musr/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.06 log_World rotRAnL dead 828
# 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 831
# Ring Anodes visual attributes (optional)
/musr/command visattributes log_RA_G invisible
#/musr/command visattributes log_RA_G Grid_style
################################################################################################################
# Trigger - Trigger Detector # Triggerz = -1092 mm; total length of TD is 110 mm; carbon foil at -1144 mm.
################################################################################################################
# Trigger volume
/musr/command construct tubs TrigV 90 127 148 0 360 G4_Galactic 0 0 -495 log_World norot dead 600
# Trigger tube
/musr/command construct tubs TrigS 100 103 148 0 360 Steel 0 0 0 log_TrigV norot dead 601
# TF - Trigger tube flanges
/musr/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 136 log_TrigV norot dead 611
/musr/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -136 log_TrigV norot dead 612
# trigger foil is 52-55mm upstream of TrigV center
# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm).
# USE THE NAME CFoil or coulombCFoil, otherwise musrMuFormation won't work!
#/musr/command construct box CFoil 60 60 0.0000025 G4_GRAPHITE 0 0 -550 log_World norot dead 621
/musr/command construct box CFoil 60 60 0.000002 G4_GRAPHITE 0 0 -550 log_World norot dead 621
# 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 musrDetectorConstruction.cc and set any density.
# Trigger visual attributes (optional)
/musr/command visattributes log_TrigV oxsteel
/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_saveAfterTD darkred
# Trigger Lens, L3, center -382 length 70mm radius 65mm.
/musr/command construct tubs TL3S 65.0 70.0 35.0 0 360 G4_Galactic 0 0 -382 log_World norot dead 706 nofield
/musr/command visattributes log_TL3S red
# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL.
# E.g. /musr/command visattributes Steel red
################################################################################################################
# L2 - 2nd Einzel Lens # L3z = -56.7 cm. (it was "L3" in 2011 and before)
# Lens Gap = 12.0 mm => G/D = 12/130 ~ 0.1 (Lens Gap = gap between Ground and Anode, D - Diameter)
################################################################################################################
# L3 volume
/musr/command construct tubs L3V 65 127 220 0 360 G4_Galactic 0 0 -863 log_World norot dead 400
# Lens 3 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 720 mm)
/musr/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 0 log_L3V norot dead 401
# Lens 3 Flange 1, z = L3z + 208 mm
/musr/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -208 log_L3V norot dead 402
# Lens 3 Flange 2, z = L3z - 208 mm
/musr/command construct tubs L3F2 103 126.5 12 0 360 Steel 0 0 208 log_L3V norot dead 403
# GPn - Ground Potential Electrodes
# n = 1-4 (further from TD) and 5-8 (closer to TD) - components of the Ground Electrodes
# Ground Electrode (inner dia: 130 mm, outer dia: 134 mm, length: 133 mm)
/musr/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 421
# Outer electrode surface (LN2 cooling vessel)
/musr/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 422
# First ring cap
/musr/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3V norot dead 423
# Second ring cap
/musr/command construct tubs L3GP4 67 81 4 0 360 Steel 0 0 71.0 log_L3V norot dead 424
/musr/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 431
/musr/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 432
/musr/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3V norot dead 433
/musr/command construct tubs L3GP8 67 81 4 0 360 Steel 0 0 -71.0 log_L3V norot dead 434
# HP - High Potential Electrode (Central Anode - usually at +8.7 kV, for a 15 keV muon beam)
/musr/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3V norot dead 451
# Lens 3 visual attributes (optional)
/musr/command visattributes log_L3V invisible
/musr/command visattributes log_L3ST oxsteel
/musr/command visattributes log_L3F1 oxsteel
/musr/command visattributes log_L3F2 oxsteel
/musr/command visattributes log_L3HP darkred
################################################################################################################
# -- SPIN ROTATOR GEOMETRY --
################################################################################################################
# Spin Rotator volume
/musr/command construct tubs SRENV 50 320 201.5 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 100
/musr/command visattributes log_SRENV invisible
# Electromagnet with iron yoke
# U - up, D - down, L - left, R - right (with respect to muon's view - momentum direction)
/musr/command construct box NPole 200 10 150 G4_Fe 0 85 0 log_SRENV norot dead 201
/musr/command construct box NYoke 150 22.5 50 G4_Fe 0 117.5 0 log_SRENV norot dead 202
/musr/command construct box NConn 225 17.5 190.0 G4_Fe 0 157.5 0 log_SRENV norot dead 203
/musr/command construct box SPole 200 10 150 G4_Fe 0 -85 0 log_SRENV norot dead 205
/musr/command construct box SYoke 150 22.5 50 G4_Fe 0 -117.5 0 log_SRENV norot dead 206
/musr/command construct box SConn 225 17.5 190.0 G4_Fe 0 -157.5 0 log_SRENV norot dead 207
# Front mirror plate
/musr/command construct box FShU 225 50 5 G4_Fe 0 125 -195.0 log_SRENV norot dead 301
/musr/command construct box FShD 225 50 5 G4_Fe 0 -125 -195.0 log_SRENV norot dead 302
/musr/command construct box FShL 75 75 5 G4_Fe 150 0 -195.0 log_SRENV norot dead 303
/musr/command construct box FShR 75 75 5 G4_Fe -150 0 -195.0 log_SRENV norot dead 304
# Back mirror plate
/musr/command construct box BShU 225 50 5 G4_Fe 0 125 195.0 log_SRENV norot dead 321
/musr/command construct box BShD 225 50 5 G4_Fe 0 -125 195.0 log_SRENV norot dead 322
/musr/command construct box BShL 75 75 5 G4_Fe 150 0 195.0 log_SRENV norot dead 323
/musr/command construct box BShR 75 75 5 G4_Fe -150 0 195.0 log_SRENV norot dead 324
# Top coils
/musr/command construct box TCoil1 170 22.5 10 G4_Cu 0 117.5 -60 log_SRENV norot dead 401
/musr/command construct box TCoil2 170 22.5 10 G4_Cu 0 117.5 60 log_SRENV norot dead 402
/musr/command construct box TCoil3 10 22.5 50 G4_Cu 160 117.5 0 log_SRENV norot dead 403
/musr/command construct box TCoil4 10 22.5 50 G4_Cu -160 117.5 0 log_SRENV norot dead 404
# Bottom coils
/musr/command construct box BCoil1 170 22.5 10 G4_Cu 0 -117.5 -60 log_SRENV norot dead 421
/musr/command construct box BCoil2 170 22.5 10 G4_Cu 0 -117.5 60 log_SRENV norot dead 422
/musr/command construct box BCoil3 10 22.5 50 G4_Cu 160 -117.5 0 log_SRENV norot dead 423
/musr/command construct box BCoil4 10 22.5 50 G4_Cu -160 -117.5 0 log_SRENV norot dead 424
# Capacitor
/musr/command construct box Cap_p 0.5 50 150 Brass 55 0 0 log_SRENV norot dead 501
/musr/command construct box Cap_n 0.5 50 150 Brass -55 0 0 log_SRENV norot dead 502
#*/musr/command construct box Uniform 49 49 150 G4_Galactic 0 0 0 log_SRENV norot dead 503
/musr/command construct tubs RodCapUp 0 5 150 90 180 Brass 55 55 0 log_SRENV norot dead 504
/musr/command construct tubs RodCapUn 0 5 150 -90 180 Brass -55 55 0 log_SRENV norot dead 505
/musr/command construct tubs RodCapDp 0 5 150 90 180 Brass 55 -55 0 log_SRENV norot dead 506
/musr/command construct tubs RodCapDn 0 5 150 -90 180 Brass -55 -55 0 log_SRENV norot dead 507
# Rods
/musr/command construct tubs RodPosU 0 5 150 0 360 Brass 27.5 55 0 log_SRENV norot dead 511
/musr/command construct tubs Rod0U 0 5 150 0 360 Brass 0 55 0 log_SRENV norot dead 512
/musr/command construct tubs RodNegU 0 5 150 0 360 Brass -27.5 55 0 log_SRENV norot dead 513
/musr/command construct tubs RodPosD 0 5 150 0 360 Brass 27.5 -55 0 log_SRENV norot dead 514
/musr/command construct tubs Rod0D 0 5 150 0 360 Brass 0 -55 0 log_SRENV norot dead 515
/musr/command construct tubs RodNegD 0 5 150 0 360 Brass -27.5 -55 0 log_SRENV norot dead 516
# Vacuum vessel
/musr/command construct box TVac1 72.5 2.5 191.5 Steel 0 72.5 0 log_SRENV norot dead 601
/musr/command construct box TVac2 2.5 70.0 191.5 Steel 72.5 0 0 log_SRENV norot dead 602
/musr/command construct box TVac3 72.5 2.5 191.5 Steel 0 -72.5 0 log_SRENV norot dead 603
/musr/command construct box TVac4 2.5 70.0 191.5 Steel -72.5 0 0 log_SRENV norot dead 604
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For Spin Rotator
/musr/command construct tubs SREField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 630 nofield
/musr/command construct tubs SRBField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.51 log_World norot dead 631 nofield
/musr/command visattributes G4_Cu red
/musr/command visattributes G4_Fe blue
/musr/command visattributes Brass yellow
################################################################################################################
# Lens 1 - 1st Einzel Lens
################################################################################################################
# L1ENV - Lens 1 envelope - for easy positioning of lens parts (outer dia: 100 mm, length: 300 mm)
#/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 0 0 -1929.5 log_World norot dead 600
/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend 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
# n = 2 - Ground Electrode 2 (closer to SR).
/musr/command construct tubs L1GP2 40 44 50 0 360 Steel 0 0 100 log_L1ENV norot dead 653
# HP - High Potential Electrode (Central Anode - usually at +8.5 kV, for a 15 keV muon beam)
/musr/command construct tubs L1HP 40 44 40 0 360 Steel 0 0 0 log_L1ENV norot dead 652
# Lens 1 visual attributes (optional)
/musr/command visattributes log_L1HP darkred
################################################################################################################
# Electrostatic field at accelerator after moderator
################################################################################################################
#
/musr/command construct box Grid1 9.1 25 25 G4_Galactic 489.9 0.0 -1678.0 log_World rotMod dead 212
/musr/command globalfield Grid1_field 9.1 25 25 uniform 489.9 0.0 -1678.0 log_Grid1 0 0 0 -0.2527 0 0
/musr/command construct box Grid2 5 24 24 G4_Galactic 475.8 0.0 -1678.0 log_World rotMod dead 214
/musr/command globalfield Grid2_field 5 24 24 uniform 475.8 0.0 -1678.0 log_Grid2 0 0 0 -1.04 0 0
/musr/command globalfield printFieldValueAtPoint 489.9 0.0 -1678.0
/musr/command globalfield printFieldValueAtPoint 475.8 0.0 -1678.0
################################################################################################################
# Electrostatic mirror at bend
################################################################################################################
# MRENV
/musr/command construct box MirrE 65 65 10 G4_Galactic 14.14213562 0.0 -1678.0 log_World rotMirr dead 200
/musr/command globalfield Mirr_field 65 65 10 uniform 14.14213562 0.0 -1678.0 log_MirrE 0 0 0 0 0 0.75
###################################################################################
################### E L E C T R O M G N E T I C F I E L D S ##################
###################################################################################
# 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!
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For L1
/musr/command construct tubs L1EField 0 0.01 0.005 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend dead 706 nofield
# For L2 (L3 before 2012)
/musr/command construct tubs L3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -863.0 log_World norot dead 708 nofield
# LENS 1. Best L1 settings: 7.2 kV for 12 keV muons
/musr/command globalfield Lens1EField 251.5 0.0 -1678.0 fromfile 2DE L1_Erz.map log_L1EField 9.0
# LENS 2. Best L3 settings: 8.4 kV for 12 keV muons
/musr/command globalfield Lens3EField 0. 0. -863.0 fromfile 2DE L3_Erz.map log_L3EField 10.5
# Spin rotator
# Electric field should be 370mm plates
# Magnetic field should be 260mm poles as measured srlem_ext.map
/musr/command globalfield Ele_field 0. 0. -1284.5 fromfile 3DE E_Sep_P37.5cm.map log_SREField 2.717
/musr/command globalfield Mag_field 0. 0. -1284.51 fromfile 3DB srlem_ext.map log_SRBField -0.00692
# 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
# 57.15mm upstream center
/musr/command construct box TriggE0 45 45 5 G4_Galactic 0 0 -555.1 log_World norot dead 630 nofield
# 48mm upstream center
/musr/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -543. log_World norot dead 631 nofield
# 2.25mm downstream center
/musr/command construct box TriggE2 45 45 4.9479 G4_Galactic 0 0 -492.75 log_World rotTrig dead 632 nofield
# 54mm downstream center
/musr/command construct box TriggE3 45 45 4 G4_Galactic 0 0 -441.0 log_World norot dead 633
### Electric field at TRIGGER Detector TD: Three different uniform fields, 2012 settings
/musr/command globalfield Trigg0_field 45 45 5 uniform 0. 0. -555.1 log_TriggE0 0 0 0 0 0 0.338
/musr/command globalfield Trigg1_field 45 45 4 uniform 0. 0. -543. log_TriggE1 0 0 0 0 0 -0.02375
/musr/command globalfield Trigg2_field 45 45 4.9497 uniform 0. 0. -492.75 log_TriggE2 0 0 0 0 0 0.041416
/musr/command globalfield Trigg3_field 45 45 4 uniform 0. 0. -441.0 log_TriggE3 0 0 0 0 0 -0.45
# Trigger Lens, L3, (available space from -437 to -347, we use 70mm of that)
/musr/command construct tubs TL3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -382.0 log_World norot dead 706 nofield
/musr/command globalfield ColRingEField 0. 0. -382.0 fromfile 2DE CR7cm_Grid.map log_TL3EField 12.0
### Electric field at RING ANODE - from 3DE field map
# To create an arbitrary configuration, switch on all fields and set different potentials.
/musr/command globalfield RngAnT_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_T 11.9
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 11.9
/musr/command globalfield RngAnB_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_B 11.9
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 11.9
### 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_convMap.map log_SBField 0.
### Electric field at the sample
/musr/command construct tubs SEField 0 0.01 0.005 0 360 G4_Galactic 0.0 0.0 15.9 log_World norot dead 710 nofield
/musr/command globalfield SampleEField 0. 0. 15.9 fromfile 2DE SamplePlate_2DE.map log_SEField 0.0
# Set parameters for particle tracking in an EM field
/musr/command globalfield setparameter SetLargestAcceptableStep 5
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
# TESTING EM FIELD
/musr/command globalfield printFieldValueAtPoint 0. 0. 0.
/musr/command globalfield printFieldValueAtPoint 0. 35. -670.
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.10
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
#/musr/command process addModel mu+ G4MuMultipleScattering G4WentzelVIModel 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ musrMuEnergyLossLandau -1 -1 1
# parameters for Landau energy loss distribution, LandauSigma corresponds to the width of the distibution
/musr/command SetLandauMPV 0.01
/musr/command SetLandauSigma 0.3
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#/musr/command process addDiscreteProcess mu+ G4CoulombScattering
#/musr/command process addProcess mu+ G4UserSpecialCuts -1 -1 3
#/musr/command process addProcess mu+ G4StepLimiter -1 -1 4
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
#/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
#/musr/command signalSeparationTime 0.1
#
/musr/run/randomOption 1
################################################################################################################
# -- Setting simulation PARAMETERS --
################################################################################################################
# Set the overall range cut (default 0.1 mm)
#*/run/setCut 1 mm
# Set the range cut on particular volumes (in mm)
#/musr/command SetUserLimits log_CFoil 1e-8 -1 -1 -1 -1
#*/musr/command SetUserLimits log_target 0.01
#*/musr/command SetUserLimits log_targetscint 0.01
#*/musr/command SetUserLimits log_cryostatscint 0.01
# Set particle energy cuts on particular volumes (in eV)
#/musr/command SetUserLimits log_World ustepMax(mm) utrakMax(mm) utimeMax(ns) uekinMin(MeV) urangMin(mm)
#/musr/command SetUserLimits log_World -1 -1 -1 1e-7 -1
# Geant4 10.2
#------------
/process/em/lowestMuHadEnergy 1e-6 MeV
# Store ALL the events in a ROOT tree or just the interesting ones? (default is true)
#*/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
# Override runID number
#*/musr/run/runID 21
# Set the frequency of event printing
/musr/run/howOftenToPrintEvent 100
# 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
/musr/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
#*/control/execute visdawn.mac
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
#/musr/command rootOutput weight off
#/musr/command rootOutput BFieldAtDecay off
#/musr/command rootOutput muIniPosX off
#/musr/command rootOutput muIniPosY off
#/musr/command rootOutput muIniPosZ off
#/musr/command rootOutput muIniMomX off
#/musr/command rootOutput muIniMomY off
#/musr/command rootOutput muIniMomZ off
#/musr/command rootOutput muIniPolX off
#/musr/command rootOutput muIniPolY off
#/musr/command rootOutput muIniPolZ off
#/musr/command rootOutput muDecayDetID off
#/musr/command rootOutput muDecayPosX off
#/musr/command rootOutput muDecayPosY off
#/musr/command rootOutput muDecayPosZ off
#/musr/command rootOutput muDecayTime off
#/musr/command rootOutput muDecayPolX off
#/musr/command rootOutput muDecayPolY off
#/musr/command rootOutput muDecayPolZ off
#/musr/command rootOutput muTargetTime off
#/musr/command rootOutput muTargetPolX off
#/musr/command rootOutput muTargetPolY off
#/musr/command rootOutput muTargetPolZ off
#/musr/command rootOutput muM0Time off
#/musr/command rootOutput muM0PolX off
#/musr/command rootOutput muM0PolY off
#/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
#/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
/musr/command storeOnlyEventsWithHits false
################################################################################################################
# -- Setting PARTICLE GUN parameters --
################################################################################################################
# Default momentum direction: 001, i.e. 0z.
# Default muon soin 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 -1144 mm, acceleration starts at -1154.15 mm
#/gun/vertex 0. 0. -2119.5 mm
/gun/vertex 499 0. -1678.0 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 6.83 6.83 0 mm
/gun/vertexsigma -15 -15 0 mm
#/gun/boxboundarycentre 499 0 -1678 mm
#/gun/boxboundary 15 15 1 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
# Set muon energy before hitting TD; a constant field in front of the C-foil accelerates the muons
# to add 3.38 keV
/gun/kenergy 15.0 eV
# Set beam momentum direction
/gun/direction -1.0 0.0 0.0
# Set muon spin direction: +10deg or 0
/gun/muonPolarizVector 0.9848 0 0.17365
#/gun/muonPolarizVector 1 0 0
# Other useful test parameters:
#------------------Oct.20 2015------------------------------------
# kenergy= 15 eV Pmu= 0.xxxMeV/c ==> sigma = /2.354 = MeV/c
#/gun/momentumsmearing 0.07508 MeV
/gun/momentumsmearing 0.016 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#*/gun/momentumboundary 20 40 0 MeV
#---/gun/tilt: xangle, yangle, dummy
#*/gun/tilt 0 0.0 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.0 deg
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#*/gun/decaytimelimits 10400 10420 2197.03 ns
#/gun/tiltsigma 1.4 1.4 0 deg
/gun/tiltsigma 0 0 -1.0 deg
# Selectively inactivate or activate sensitive detectors
#*/hits/inactivate /musr/ScintSD
# Only for code debugging!
/tracking/verbose 0
# BEAM ON
#/run/beamOn 1000000
#/run/beamOn 10
/run/beamOn 10000

View File

@@ -0,0 +1,950 @@
# Template suitable for beam profile detectioon with the spin rotator in place
# Zaher Salman 7/10/2010
#
# Thomas Prokscha 22/Nov/2012
# Moved sample stack on cryostat 3mm downstream to fit to positions in apparatus
# Changed positions of positron counters according to corrected drawing LEM 37.01.024 (19/Sep/2012)
#
# Position downstream detectors: z=+62.5mm original value: z=+66.5mm
# Position upstream detectors: z=-64.0mm original value: z=-60.0mm
#
# 2013 setup: 1mm Ti sample tube
#
# 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
#
# Ran Xiao 25/Sep/2014
# Start muons at moderator at x=499, assume cosA angular distribution, assume energy distribution
#
################################################################################################################
# -- ROTATION MATRICES --
################################################################################################################
# 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
/musr/command rotation rotRAnL 0 0 1 90
/musr/command rotation rotRAnD 0 0 1 180
# More Rotations
/musr/command rotation rotD1 0 0 1 11.250
/musr/command rotation rotD2 0 0 1 33.750
/musr/command rotation rotD3 0 0 1 56.250
/musr/command rotation rotD4 0 0 1 78.750
/musr/command rotation rotD5 0 0 1 101.250
/musr/command rotation rotD6 0 0 1 123.750
/musr/command rotation rotD7 0 0 1 146.250
/musr/command rotation rotD8 0 0 1 168.750
/musr/command rotation rotD9 0 0 1 191.250
/musr/command rotation rotD10 0 0 1 213.750
/musr/command rotation rotD11 0 0 1 236.250
/musr/command rotation rotD12 0 0 1 258.750
/musr/command rotation rotD13 0 0 1 281.250
/musr/command rotation rotD14 0 0 1 303.750
/musr/command rotation rotD15 0 0 1 326.250
/musr/command rotation rotD16 0 0 1 348.750
/musr/command rotation rotD17 0 0 1 11.250
/musr/command rotation rotD18 0 0 1 33.750
/musr/command rotation rotD19 0 0 1 56.250
/musr/command rotation rotD20 0 0 1 78.750
/musr/command rotation rotD21 0 0 1 101.250
/musr/command rotation rotD22 0 0 1 123.750
/musr/command rotation rotD23 0 0 1 146.250
/musr/command rotation rotD24 0 0 1 168.750
/musr/command rotation rotD25 0 0 1 191.250
/musr/command rotation rotD26 0 0 1 213.750
/musr/command rotation rotD27 0 0 1 236.250
/musr/command rotation rotD28 0 0 1 258.750
/musr/command rotation rotD29 0 0 1 281.250
/musr/command rotation rotD30 0 0 1 303.750
/musr/command rotation rotD31 0 0 1 326.250
/musr/command rotation rotD32 0 0 1 348.750
# Beam line bend at mirror
/musr/command rotation rotBend 0 1 0 -90
/musr/command rotation rotMirr 0 1 0 -45
/musr/command rotation rotMod 0 1 0 3
################################################################################################################
# -- LEM GEOMETRY --
################################################################################################################
# WORLD = Laboratory reference frame, the origin is in the centre of the LEM sample tube
/musr/command construct box World 900 350 2600 G4_Galactic 0 0 0 no_logical_volume norot dead -1
/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 60 0.05 0 360 G4_Galactic 850 0 -1678 log_World rotBend dead 851
/musr/command construct tubs save1 0 60 0.05 0 360 G4_Galactic 800 0 -1678 log_World rotBend dead 852
/musr/command construct tubs save2 0 60 0.05 0 360 G4_Galactic 750 0 -1678 log_World rotBend dead 853
/musr/command construct tubs save3 0 60 0.05 0 360 G4_Galactic 700 0 -1678 log_World rotBend dead 854
/musr/command construct tubs save4 0 60 0.05 0 360 G4_Galactic 650 0 -1678 log_World rotBend dead 855
/musr/command construct tubs save5 0 60 0.05 0 360 G4_Galactic 600 0 -1678 log_World rotBend dead 856
/musr/command construct tubs save6 0 60 0.05 0 360 G4_Galactic 550 0 -1678 log_World rotBend dead 857
/musr/command construct tubs save7 0 60 0.05 0 360 G4_Galactic 500 0 -1678 log_World rotBend dead 858
/musr/command construct tubs save8 0 60 0.05 0 360 G4_Galactic 450 0 -1678 log_World rotBend dead 859
/musr/command construct tubs save9 0 60 0.05 0 360 G4_Galactic 400 0 -1678 log_World rotBend dead 860
/musr/command construct tubs save10 0 60 0.05 0 360 G4_Galactic 350 0 -1678 log_World rotBend dead 861
/musr/command construct tubs save11 0 60 0.05 0 360 G4_Galactic 300 0 -1678 log_World rotBend dead 862
/musr/command construct tubs save12 0 60 0.05 0 360 G4_Galactic 240 0 -1678 log_World rotBend dead 863
/musr/command construct tubs save13 0 60 0.05 0 360 G4_Galactic 200 0 -1678 log_World rotBend dead 864
/musr/command construct tubs save14 0 60 0.05 0 360 G4_Galactic 150 0 -1678 log_World rotBend dead 865
/musr/command construct tubs save15 0 60 0.05 0 360 G4_Galactic 100 0 -1678 log_World rotBend dead 866
/musr/command construct tubs save16 0 60 0.05 0 360 G4_Galactic 70 0 -1678 log_World rotBend dead 867
/musr/command construct tubs save17 0 60 0.05 0 360 G4_Galactic 0 0 -1620 log_World norot dead 868
/musr/command construct tubs save18 0 60 0.05 0 360 G4_Galactic 0 0 -1600 log_World norot dead 869
/musr/command construct tubs save19 0 60 0.05 0 360 G4_Galactic 0 0 -1550 log_World norot dead 870
/musr/command construct tubs save20 0 60 0.05 0 360 G4_Galactic 0 0 -1500 log_World norot dead 871
/musr/command construct tubs save21 0 60 0.05 0 360 G4_Galactic 0 0 -1450 log_World norot dead 872
/musr/command construct tubs save22 0 60 0.05 0 360 G4_Galactic 0 0 -1400 log_World norot dead 873
/musr/command construct tubs save23 0 60 0.05 0 360 G4_Galactic 0 0 -1350 log_World norot dead 874
/musr/command construct tubs save24 0 60 0.05 0 360 G4_Galactic 0 0 -1300 log_World norot dead 875
/musr/command construct tubs save25 0 60 0.05 0 360 G4_Galactic 0 0 -1250 log_World norot dead 876
/musr/command construct tubs save26 0 60 0.05 0 360 G4_Galactic 0 0 -1200 log_World norot dead 877
/musr/command construct tubs save27 0 60 0.05 0 360 G4_Galactic 0 0 -1150 log_World norot dead 878
/musr/command construct tubs save28 0 60 0.05 0 360 G4_Galactic 0 0 -1100 log_World norot dead 879
/musr/command construct tubs save29 0 60 0.05 0 360 G4_Galactic 0 0 -1050 log_World norot dead 880
/musr/command construct tubs save30 0 60 0.05 0 360 G4_Galactic 0 0 -1000 log_World norot dead 881
/musr/command construct tubs save31 0 60 0.05 0 360 G4_Galactic 0 0 -950 log_World norot dead 882
/musr/command construct tubs save32 0 60 0.05 0 360 G4_Galactic 0 0 -900 log_World norot dead 883
/musr/command construct tubs save33 0 60 0.05 0 360 G4_Galactic 0 0 -850 log_World norot dead 884
/musr/command construct tubs save34 0 60 0.05 0 360 G4_Galactic 0 0 -800 log_World norot dead 885
/musr/command construct tubs save35 0 60 0.05 0 360 G4_Galactic 0 0 -750 log_World norot dead 886
/musr/command construct tubs save36 0 60 0.05 0 360 G4_Galactic 0 0 -700 log_World norot dead 887
/musr/command construct tubs save37 0 60 0.05 0 360 G4_Galactic 0 0 -650 log_World norot dead 888
/musr/command construct tubs save38 0 60 0.05 0 360 G4_Galactic 0 0 -600 log_World norot dead 889
/musr/command construct tubs save39 0 60 0.05 0 360 G4_Galactic 0 0 -525 log_World norot dead 890
/musr/command construct tubs save40 0 60 0.05 0 360 G4_Galactic 0 0 -450 log_World norot dead 891
/musr/command construct tubs save41 0 60 0.05 0 360 G4_Galactic 0 0 -420 log_World norot dead 892
/musr/command construct tubs save42 0 60 0.05 0 360 G4_Galactic 0 0 -400 log_World norot dead 893
/musr/command construct tubs save43 0 60 0.05 0 360 G4_Galactic 0 0 -350 log_World norot dead 894
/musr/command construct tubs save44 0 60 0.05 0 360 G4_Galactic 0 0 -300 log_World norot dead 895
/musr/command construct tubs save45 0 60 0.05 0 360 G4_Galactic 0 0 -250 log_World norot dead 896
/musr/command construct tubs save46 0 60 0.05 0 360 G4_Galactic 0 0 -200 log_World norot dead 897
/musr/command construct tubs save47 0 60 0.05 0 360 G4_Galactic 0 0 -150 log_World norot dead 898
/musr/command construct tubs save48 0 60 0.05 0 360 G4_Galactic 0 0 -100 log_World norot dead 899
/musr/command construct tubs save49 0 60 0.05 0 360 G4_Galactic 0 0 -50 log_World norot dead 900
/musr/command construct tubs save50 0 60 0.05 0 360 G4_Galactic 0 0 0 log_World norot dead 901
/musr/command construct tubs save51 0 60 0.05 0 360 G4_Galactic 0 0 16 log_World norot dead 902
/musr/command construct tubs save52 0 60 0.05 0 360 G4_Galactic 0 0 100 log_World norot dead 903
/musr/command construct tubs save53 0 60 0.05 0 360 G4_Galactic 0 0 150 log_World norot dead 904
/musr/command visattributes G4_Galactic invisible
################################################################################################################
# -- APD Scintillators --
################################################################################################################
# Detectors volume (0,0,0) coninsides with World (0,0,0)
/musr/command construct tubs DetV 80 105 133 0 360 G4_Galactic 0 0 0 log_World norot dead 100
/musr/command visattributes log_DetV invisible
# For final design set
# BackHW=60
# BackCR=-64.0, 19/Sep/2012
# ForwHW=65.5
# ForwCR=62.5, 19/Sep/2012
# Back inner sections (Upstream) (v.i.)
# Final design (30 Jun 09, 19 Sep 12) BackHW=60.0mm (Half width or length), BackCR=-4-BackHW=-64.0mm (Center z coordinate)
/musr/command construct trd90y ScD1 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 -17.265493 -64.0 log_DetV rotD1 musr/ScintSD 1
/musr/command construct trd90y ScD2 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 -49.167966 -64.0 log_DetV rotD2 musr/ScintSD 2
/musr/command construct trd90y ScD3 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 -73.585061 -64.0 log_DetV rotD3 musr/ScintSD 3
/musr/command construct trd90y ScD4 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 -86.799497 -64.0 log_DetV rotD4 musr/ScintSD 4
/musr/command construct trd90y ScD5 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 -86.799497 -64.0 log_DetV rotD5 musr/ScintSD 5
/musr/command construct trd90y ScD6 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 -73.585061 -64.0 log_DetV rotD6 musr/ScintSD 6
/musr/command construct trd90y ScD7 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 -49.167966 -64.0 log_DetV rotD7 musr/ScintSD 7
/musr/command construct trd90y ScD8 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 -17.265493 -64.0 log_DetV rotD8 musr/ScintSD 8
/musr/command construct trd90y ScD9 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -86.799497 17.265493 -64.0 log_DetV rotD9 musr/ScintSD 9
/musr/command construct trd90y ScD10 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -73.585061 49.167966 -64.0 log_DetV rotD10 musr/ScintSD 10
/musr/command construct trd90y ScD11 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -49.167966 73.585061 -64.0 log_DetV rotD11 musr/ScintSD 11
/musr/command construct trd90y ScD12 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.265493 86.799497 -64.0 log_DetV rotD12 musr/ScintSD 12
/musr/command construct trd90y ScD13 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.265493 86.799497 -64.0 log_DetV rotD13 musr/ScintSD 13
/musr/command construct trd90y ScD14 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 49.167966 73.585061 -64.0 log_DetV rotD14 musr/ScintSD 14
/musr/command construct trd90y ScD15 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 73.585061 49.167966 -64.0 log_DetV rotD15 musr/ScintSD 15
/musr/command construct trd90y ScD16 60 60 17.7 16.7 2.5 G4_PLASTIC_SC_VINYLTOLUENE 86.799497 17.265493 -64.0 log_DetV rotD16 musr/ScintSD 16
# Forward inner sections (Downstream) (h.i.)
# Final design (30 June 09, 19 Sep 12) ForwHW=65.5mm (Half width or length), ForwCR=-3+ForwHW=62.5mm (Center z coordinate)
/musr/command construct trd90y ScD17 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 -17.070403 62.5 log_DetV rotD17 musr/ScintSD 17
/musr/command construct trd90y ScD18 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 -48.612395 62.5 log_DetV rotD18 musr/ScintSD 18
/musr/command construct trd90y ScD19 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 -72.753591 62.5 log_DetV rotD19 musr/ScintSD 19
/musr/command construct trd90y ScD20 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 -85.818712 62.5 log_DetV rotD20 musr/ScintSD 20
/musr/command construct trd90y ScD21 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 -85.818712 62.5 log_DetV rotD21 musr/ScintSD 21
/musr/command construct trd90y ScD22 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 -72.753591 62.5 log_DetV rotD22 musr/ScintSD 22
/musr/command construct trd90y ScD23 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 -48.612395 62.5 log_DetV rotD23 musr/ScintSD 23
/musr/command construct trd90y ScD24 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 -17.070403 62.5 log_DetV rotD24 musr/ScintSD 24
/musr/command construct trd90y ScD25 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -85.818712 17.070403 62.5 log_DetV rotD25 musr/ScintSD 25
/musr/command construct trd90y ScD26 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -72.753591 48.612395 62.5 log_DetV rotD26 musr/ScintSD 26
/musr/command construct trd90y ScD27 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -48.612395 72.753591 62.5 log_DetV rotD27 musr/ScintSD 27
/musr/command construct trd90y ScD28 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE -17.070403 85.818712 62.5 log_DetV rotD28 musr/ScintSD 28
/musr/command construct trd90y ScD29 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 17.070403 85.818712 62.5 log_DetV rotD29 musr/ScintSD 29
/musr/command construct trd90y ScD30 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 48.612395 72.753591 62.5 log_DetV rotD30 musr/ScintSD 30
/musr/command construct trd90y ScD31 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 72.753591 48.612395 62.5 log_DetV rotD31 musr/ScintSD 31
/musr/command construct trd90y ScD32 65.5 65.5 17.5 16.5 2.5 G4_PLASTIC_SC_VINYLTOLUENE 85.818712 17.070403 62.5 log_DetV rotD32 musr/ScintSD 32
# Back outer sections (v.a.)
/musr/command construct trd ScD33 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 -18.631126 -64.0 log_DetV rotD1 musr/ScintSD 33
/musr/command construct trd ScD34 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 -53.056957 -64.0 log_DetV rotD2 musr/ScintSD 34
/musr/command construct trd ScD35 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 -79.405348 -64.0 log_DetV rotD3 musr/ScintSD 35
/musr/command construct trd ScD36 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 -93.664994 -64.0 log_DetV rotD4 musr/ScintSD 36
/musr/command construct trd ScD37 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 -93.664994 -64.0 log_DetV rotD5 musr/ScintSD 37
/musr/command construct trd ScD38 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 -79.405348 -64.0 log_DetV rotD6 musr/ScintSD 38
/musr/command construct trd ScD39 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 -53.056957 -64.0 log_DetV rotD7 musr/ScintSD 39
/musr/command construct trd ScD40 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 -18.631126 -64.0 log_DetV rotD8 musr/ScintSD 40
/musr/command construct trd ScD41 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -93.664994 18.631126 -64.0 log_DetV rotD9 musr/ScintSD 41
/musr/command construct trd ScD42 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -79.405348 53.056957 -64.0 log_DetV rotD10 musr/ScintSD 42
/musr/command construct trd ScD43 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -53.056957 79.405348 -64.0 log_DetV rotD11 musr/ScintSD 43
/musr/command construct trd ScD44 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.631126 93.664994 -64.0 log_DetV rotD12 musr/ScintSD 44
/musr/command construct trd ScD45 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.631126 93.664994 -64.0 log_DetV rotD13 musr/ScintSD 45
/musr/command construct trd ScD46 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 53.056957 79.405348 -64.0 log_DetV rotD14 musr/ScintSD 46
/musr/command construct trd ScD47 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 79.405348 53.056957 -64.0 log_DetV rotD15 musr/ScintSD 47
/musr/command construct trd ScD48 60 60 19.1 18.1 2.5 G4_PLASTIC_SC_VINYLTOLUENE 93.664994 18.631126 -64.0 log_DetV rotD16 musr/ScintSD 48
# Forward outer sections (h.a.)
/musr/command construct trd ScD49 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 -18.436035 62.5 log_DetV rotD1 musr/ScintSD 49
/musr/command construct trd ScD50 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 -52.501387 62.5 log_DetV rotD2 musr/ScintSD 50
/musr/command construct trd ScD51 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 -78.573878 62.5 log_DetV rotD3 musr/ScintSD 51
/musr/command construct trd ScD52 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 -92.684209 62.5 log_DetV rotD4 musr/ScintSD 52
/musr/command construct trd ScD53 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 -92.684209 62.5 log_DetV rotD5 musr/ScintSD 53
/musr/command construct trd ScD54 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 -78.573878 62.5 log_DetV rotD6 musr/ScintSD 54
/musr/command construct trd ScD55 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 -52.501387 62.5 log_DetV rotD7 musr/ScintSD 55
/musr/command construct trd ScD56 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 -18.436035 62.5 log_DetV rotD8 musr/ScintSD 56
/musr/command construct trd ScD57 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -92.684209 18.436035 62.5 log_DetV rotD9 musr/ScintSD 57
/musr/command construct trd ScD58 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -78.573878 52.501387 62.5 log_DetV rotD10 musr/ScintSD 58
/musr/command construct trd ScD59 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -52.501387 78.573878 62.5 log_DetV rotD11 musr/ScintSD 59
/musr/command construct trd ScD60 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE -18.436035 92.684209 62.5 log_DetV rotD12 musr/ScintSD 60
/musr/command construct trd ScD61 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 18.436035 92.684209 62.5 log_DetV rotD13 musr/ScintSD 61
/musr/command construct trd ScD62 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 52.501387 78.573878 62.5 log_DetV rotD14 musr/ScintSD 62
/musr/command construct trd ScD63 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 78.573878 52.501387 62.5 log_DetV rotD15 musr/ScintSD 63
/musr/command construct trd ScD64 65.5 65.5 18.9 17.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 92.684209 18.436035 62.5 log_DetV rotD16 musr/ScintSD 64
# Structural support inside the detectors vessel
# Carbon fibre, inner radius 80, thickness 2 mm.
# Additional Al plate removed, 2 mm thick for h.i and h.a and 3 mm thick for v.i. and v.a
/musr/command construct tubs hInShell 80.0 82.0 65.5 0 360 G4_C 0 0 62 log_DetV norot dead 70
/musr/command construct tubs vInShell 80.0 82.0 60.0 0 360 G4_C 0 0 -64.5 log_DetV norot dead 70
# Visual attributes (optional)
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE green
#/musr/command visattributes log_ScD49 green
#/musr/command visattributes log_ScD50 green
#/musr/command visattributes log_test red
################################################################################################################
# Sample vacuum/tube up to gate valve - Can host either the Cryostat or the MCP2
################################################################################################################
# Vacuum space
# /musr/command construct tubs SamV 0 75.0 254.5 0 360 G4_Galactic 0 0 -92.5 log_World norot dead 100
# Sample tube
#/musr/command construct tubs SamS 75.0 77.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# 2012: 2mm Ti tube, 2013: 1mm
/musr/command construct tubs SamS 75.0 76.0 162.0 0 360 G4_Ti 0 0 0 log_World norot dead 101
# F160 - 160 CF flange upstream of MCP2 tube
/musr/command construct tubs F160 78.0 101.25 11 0 360 Steel 0 0 -151.0 log_World norot dead 102
# F100 (Blank end flange)
/musr/command construct tubs F100 0 75.0 10 0 360 Steel 0 0 172.0 log_World norot dead 103
# 200 CF flange upstream of MCP2 tube covering the whole length of the gate valve chamber.
/musr/command construct tubs GATS 103.25 126.5 92.5 0 360 Steel 0 0 -254.5 log_World norot dead 371
# F200 - 200 CF flange upstream of MCP2 tube to connect to gate valve chamber
/musr/command construct tubs F200 76.5 103.25 12 0 360 Steel 0 0 -174.0 log_World norot dead 372
# Visual attributes (optional)
#/musr/command visattributes log_SamV invisible
/musr/command visattributes log_SamS oxsteel
/musr/command visattributes log_F160 oxsteel
#/musr/command visattributes log_F100 oxsteel
/musr/command visattributes log_GATS oxsteel
/musr/command visattributes log_F200 oxsteel
################################################################################################################
# MCP - Micro Channel Plate Detector MCP2
# mcpv_z = -92.5 mm!
#
# We have a 324 mm long sample tube;
# the MCP2 front side is at 142 mm from the end of the sample tube.
# the front face of the sample plate of the cryostat is 145 mm from the end of the sample tube.
#
################################################################################################################
#
# MCPM1 - MCP Macor ring 1
# MCPD - electron multiplying glass disk (also known as target)
# Sensitive surface at z = 20 mm wrt. World
# MCPM2 - MCP Macor ring 2
# /musr/command construct tubs MCPM1 24 32.5 0.75 0 360 Macor 0 0 19.25 log_World norot dead 251
# Use it either as (DMCP-musr/ScintSD) - no info on mu+ polariz., or as (target-dead) with info on mu+ polariz.
# /musr/command construct tubs target 0 25.0 1.50 0 360 MCPglass 0 0 21.5 log_World norot dead 252
# /musr/command construct tubs MCPM2 24 32.5 0.75 0 360 Macor 0 0 23.75 log_World norot dead 253
# NOTE: To intercept ALL the incoming muons, comment the DMCP and MCPM1 lines above and uncomment this one:
#*aa/musr/command construct tubs DMCP 0 76.5 1.5 0 360 MCPglass 0 0 108 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs target 0 21.0 1.5 0 360 MCPglass 0 0 114 log_SamV norot musr/ScintSD 202
#*/musr/command construct tubs saveTarget 0 75.0 0.2 0 360 G4_Galactic 0 0 110.79 log_SamV norot dead 222
#
# MCSR - Stainless Steel Ring for MCP2 mounting (modelled as a box with a circular hole)
# MCVR - "Vacuum Ring" (circular hole)
# /musr/command construct box MCSR 36.5 36.5 1 Steel 0 0 25.5 log_World norot dead 254
# /musr/command construct tubs MCVR 0 27.5 1 0 360 G4_Galactic 0 0 0 log_MCSR norot dead 255
# 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
# /musr/command construct box MCPA 36.5 36.5 4 Steel 0 0 37 log_World norot dead 256
# /musr/command construct tubs ANVA1 0 27.5 1.5 0 360 G4_Galactic 0 0 -2.5 log_MCPA norot dead 257
# /musr/command construct tubs ANVA2 0 27.5 1.5 0 360 G4_Galactic 0 0 2.5 log_MCPA norot dead 258
# MCSS - MCP Stainless Steel Support Ring
# /musr/command construct tubs MCSS 40 48 2.5 0 360 Steel 0 0 69.8 log_World norot dead 259
# MCP2 visual attributes (optional)
#/musr/command visattributes log_DMCP MCP_style
#*/musr/command visattributes log_target MCP_style
#*/musr/command visattributes log_MCPM1 MACOR_style
#*------ /musr/command visattributes log_MCPM2 MACOR_style
################################################################################################################
# CRY - Cryostat - Used as an ALTERNATIVE to MCP2 - Uncomment lines with #*. (Offset = 0.0 cm)
#
# sample plate front face is at z = 17mm:
# cold finger distance to CF100: 130mm
# 5mm base plate + 6mm sapphire + 4mm sample plate = 15mm
# sample plate front face from CF100: 145mm
# z-position of sample plate front face: 324/2-145mm = 17mm
# --> sample plate center is at 17+2=19mm
#
################################################################################################################
# Dimensions for large/small sample plates SamPL=35/21 and SaphPL=SamPL35-5
/musr/command construct tubs target 0 35 2 0 360 G4_Al 0 0 19.0 log_World norot dead 251
/musr/command construct tubs SAPH 0 30 3 0 360 G4_ALUMINUM_OXIDE 0 0 24.0 log_World norot dead 252
/musr/command construct tubs SAH1 0 35 2.5 0 360 G4_Al 0 0 29.5 log_World norot dead 253
# Special save target volume
/musr/command construct tubs saveTarget 0 40 0.05 0 360 G4_Galactic 0 0 16.9 log_World norot dead 253
# Other components of the cryostat (dimensions and position of CRY4 are only approx. because unknown)
# COld Finger
/musr/command construct tubs COFI 0 27.5 5 0 360 G4_Cu 0 0 37.0 log_World norot dead 261
# End plate of cryostat (7 mm thick, 30 mm diameter)
/musr/command construct tubs CRY1 0 15 3.5 0 360 G4_Cu 0 0 45.5 log_World norot dead 262
# Heat exchanger (assuming a 10 mm opening - Original dimensions not known.) # OLD pos. 160.0
/musr/command construct tubs CRY2 5 15 25 0 360 G4_Cu 0 0 74.0 log_World norot dead 263
# Mounting ring for He-shield
/musr/command construct tubs CRY3 38 47 5.5 0 360 G4_Cu 0 0 54.0 log_World norot dead 264
# 2 mm thick plate for mounting ring. This is just to close the downstream side.
/musr/command construct tubs CRY4 15 38 1 0 360 G4_Cu 0 0 54.0 log_World norot dead 265
# Radiation shield
/musr/command construct tubs CRSH 47 48 45 0 360 G4_Cu 0 0 19.0 log_World norot dead 266
# Front part of the radiation shield
/musr/command construct tubs CRSH2 30 48 0.5 0 360 G4_Cu 0 0 -26.5 log_World norot dead 267
# Electrical Field Guard Rings (distance between the guard rings: 16 mm)
# /musr/command construct tubs Guard1 29 38 1.5 0 360 G4_Cu 0 0 -13.5 log_World norot dead 271
# /musr/command construct tubs Guard2 29 38 1.5 0 360 G4_Cu 0 0 2.5 log_World norot dead 272
# Cryostat visual attributes (optional)
/musr/command visattributes log_SAH1 oxsteel
#/musr/command visattributes log_SAH2 oxsteel
/musr/command visattributes log_target oxsteel
/musr/command visattributes log_SAPH MACOR_style
#/musr/command visattributes log_SAH3 oxsteel
/musr/command visattributes log_CRSH yellow
/musr/command visattributes log_CRSH2 yellow
#/musr/command visattributes log_test red
################################################################################################################
# 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
/musr/command construct cons RA_EU 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World norot dead 801
/musr/command construct cons RA_MU 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World norot dead 802
/musr/command construct cons RA_ER 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnR dead 803
/musr/command construct cons RA_MR 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnR dead 804
/musr/command construct cons RA_ED 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnD dead 805
/musr/command construct cons RA_MD 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnD dead 806
/musr/command construct cons RA_EL 45.1469 62.5 33.5 39.0 22.5 48.81 82.38 Steel 0 0 -84.0 log_World rotRAnL dead 807
/musr/command construct cons RA_ML 56.7937 62.5 45.147 62.5 22.5 48.81 82.38 Steel 0 0 -129. log_World rotRAnL dead 808
# 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_T 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.00 log_World norot dead 822
/musr/command construct tubs RA_R 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.02 log_World rotRAnR dead 824
/musr/command construct tubs RA_B 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.04 log_World rotRAnD dead 826
/musr/command construct tubs RA_L 0 0.01 0.005 0 360 G4_Galactic 0 0 -143.06 log_World rotRAnL dead 828
# 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 831
# Ring Anodes visual attributes (optional)
/musr/command visattributes log_RA_G invisible
#/musr/command visattributes log_RA_G Grid_style
################################################################################################################
# Trigger - Trigger Detector # Triggerz = -1092 mm; total length of TD is 110 mm; carbon foil at -1144 mm.
################################################################################################################
# Trigger volume
/musr/command construct tubs TrigV 90 127 148 0 360 G4_Galactic 0 0 -495 log_World norot dead 600
# Trigger tube
/musr/command construct tubs TrigS 100 103 148 0 360 Steel 0 0 0 log_TrigV norot dead 601
# TF - Trigger tube flanges
/musr/command construct tubs TF1 103 126.5 12 0 360 Steel 0 0 136 log_TrigV norot dead 611
/musr/command construct tubs TF2 103 126.5 12 0 360 Steel 0 0 -136 log_TrigV norot dead 612
# trigger foil is 52-55mm upstream of TrigV center
# Carbon Foil (default HALF-thickness 0.000005147 mm, see below => CFoil thick = 10.3 nm).
# USE THE NAME CFoil or coulombCFoil, otherwise musrMuFormation won't work!
#/musr/command construct box CFoil 60 60 0.0000025 G4_GRAPHITE 0 0 -550 log_World norot dead 621
/musr/command construct box CFoil 60 60 0.000002 G4_GRAPHITE 0 0 -550 log_World norot dead 621
# 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 musrDetectorConstruction.cc and set any density.
# Trigger visual attributes (optional)
/musr/command visattributes log_TrigV oxsteel
/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_saveAfterTD darkred
# Trigger Lens, L3, center -382 length 70mm radius 65mm.
/musr/command construct tubs TL3S 65.0 70.0 35.0 0 360 G4_Galactic 0 0 -382 log_World norot dead 706 nofield
/musr/command visattributes log_TL3S red
# One can set visible attrib. also on a MATERIAL basis, rather than on log_VOL.
# E.g. /musr/command visattributes Steel red
################################################################################################################
# L2 - 2nd Einzel Lens # L3z = -56.7 cm. (it was "L3" in 2011 and before)
# Lens Gap = 12.0 mm => G/D = 12/130 ~ 0.1 (Lens Gap = gap between Ground and Anode, D - Diameter)
################################################################################################################
# L3 volume
/musr/command construct tubs L3V 65 127 220 0 360 G4_Galactic 0 0 -863 log_World norot dead 400
# Lens 3 Steel tube (inner dia: 200 mm, outer dia: 206 mm, length: 720 mm)
/musr/command construct tubs L3ST 100 103 220 0 360 Steel 0 0 0 log_L3V norot dead 401
# Lens 3 Flange 1, z = L3z + 208 mm
/musr/command construct tubs L3F1 103 126.5 12 0 360 Steel 0 0 -208 log_L3V norot dead 402
# Lens 3 Flange 2, z = L3z - 208 mm
/musr/command construct tubs L3F2 103 126.5 12 0 360 Steel 0 0 208 log_L3V norot dead 403
# GPn - Ground Potential Electrodes
# n = 1-4 (further from TD) and 5-8 (closer to TD) - components of the Ground Electrodes
# Ground Electrode (inner dia: 130 mm, outer dia: 134 mm, length: 133 mm)
/musr/command construct tubs L3GP1 65 67 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 421
# Outer electrode surface (LN2 cooling vessel)
/musr/command construct tubs L3GP2 81 83 66.5 0 360 Steel 0 0 133.5 log_L3V norot dead 422
# First ring cap
/musr/command construct tubs L3GP3 67 81 4 0 360 Steel 0 0 196.0 log_L3V norot dead 423
# Second ring cap
/musr/command construct tubs L3GP4 67 81 4 0 360 Steel 0 0 71.0 log_L3V norot dead 424
/musr/command construct tubs L3GP5 65 67 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 431
/musr/command construct tubs L3GP6 81 83 66.5 0 360 Steel 0 0 -133.5 log_L3V norot dead 432
/musr/command construct tubs L3GP7 67 81 4 0 360 Steel 0 0 -196.0 log_L3V norot dead 433
/musr/command construct tubs L3GP8 67 81 4 0 360 Steel 0 0 -71.0 log_L3V norot dead 434
# HP - High Potential Electrode (Central Anode - usually at +8.7 kV, for a 15 keV muon beam)
/musr/command construct tubs L3HP 65 83 55 0 360 Steel 0 0 0 log_L3V norot dead 451
# Lens 3 visual attributes (optional)
/musr/command visattributes log_L3V invisible
/musr/command visattributes log_L3ST oxsteel
/musr/command visattributes log_L3F1 oxsteel
/musr/command visattributes log_L3F2 oxsteel
/musr/command visattributes log_L3HP darkred
################################################################################################################
# -- SPIN ROTATOR GEOMETRY --
################################################################################################################
# Spin Rotator volume
/musr/command construct tubs SRENV 50 320 201.5 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 100
/musr/command visattributes log_SRENV invisible
# Electromagnet with iron yoke
# U - up, D - down, L - left, R - right (with respect to muon's view - momentum direction)
/musr/command construct box NPole 200 10 150 G4_Fe 0 85 0 log_SRENV norot dead 201
/musr/command construct box NYoke 150 22.5 50 G4_Fe 0 117.5 0 log_SRENV norot dead 202
/musr/command construct box NConn 225 17.5 190.0 G4_Fe 0 157.5 0 log_SRENV norot dead 203
/musr/command construct box SPole 200 10 150 G4_Fe 0 -85 0 log_SRENV norot dead 205
/musr/command construct box SYoke 150 22.5 50 G4_Fe 0 -117.5 0 log_SRENV norot dead 206
/musr/command construct box SConn 225 17.5 190.0 G4_Fe 0 -157.5 0 log_SRENV norot dead 207
# Front mirror plate
/musr/command construct box FShU 225 50 5 G4_Fe 0 125 -195.0 log_SRENV norot dead 301
/musr/command construct box FShD 225 50 5 G4_Fe 0 -125 -195.0 log_SRENV norot dead 302
/musr/command construct box FShL 75 75 5 G4_Fe 150 0 -195.0 log_SRENV norot dead 303
/musr/command construct box FShR 75 75 5 G4_Fe -150 0 -195.0 log_SRENV norot dead 304
# Back mirror plate
/musr/command construct box BShU 225 50 5 G4_Fe 0 125 195.0 log_SRENV norot dead 321
/musr/command construct box BShD 225 50 5 G4_Fe 0 -125 195.0 log_SRENV norot dead 322
/musr/command construct box BShL 75 75 5 G4_Fe 150 0 195.0 log_SRENV norot dead 323
/musr/command construct box BShR 75 75 5 G4_Fe -150 0 195.0 log_SRENV norot dead 324
# Top coils
/musr/command construct box TCoil1 170 22.5 10 G4_Cu 0 117.5 -60 log_SRENV norot dead 401
/musr/command construct box TCoil2 170 22.5 10 G4_Cu 0 117.5 60 log_SRENV norot dead 402
/musr/command construct box TCoil3 10 22.5 50 G4_Cu 160 117.5 0 log_SRENV norot dead 403
/musr/command construct box TCoil4 10 22.5 50 G4_Cu -160 117.5 0 log_SRENV norot dead 404
# Bottom coils
/musr/command construct box BCoil1 170 22.5 10 G4_Cu 0 -117.5 -60 log_SRENV norot dead 421
/musr/command construct box BCoil2 170 22.5 10 G4_Cu 0 -117.5 60 log_SRENV norot dead 422
/musr/command construct box BCoil3 10 22.5 50 G4_Cu 160 -117.5 0 log_SRENV norot dead 423
/musr/command construct box BCoil4 10 22.5 50 G4_Cu -160 -117.5 0 log_SRENV norot dead 424
# Capacitor
/musr/command construct box Cap_p 0.5 50 150 Brass 55 0 0 log_SRENV norot dead 501
/musr/command construct box Cap_n 0.5 50 150 Brass -55 0 0 log_SRENV norot dead 502
#*/musr/command construct box Uniform 49 49 150 G4_Galactic 0 0 0 log_SRENV norot dead 503
/musr/command construct tubs RodCapUp 0 5 150 90 180 Brass 55 55 0 log_SRENV norot dead 504
/musr/command construct tubs RodCapUn 0 5 150 -90 180 Brass -55 55 0 log_SRENV norot dead 505
/musr/command construct tubs RodCapDp 0 5 150 90 180 Brass 55 -55 0 log_SRENV norot dead 506
/musr/command construct tubs RodCapDn 0 5 150 -90 180 Brass -55 -55 0 log_SRENV norot dead 507
# Rods
/musr/command construct tubs RodPosU 0 5 150 0 360 Brass 27.5 55 0 log_SRENV norot dead 511
/musr/command construct tubs Rod0U 0 5 150 0 360 Brass 0 55 0 log_SRENV norot dead 512
/musr/command construct tubs RodNegU 0 5 150 0 360 Brass -27.5 55 0 log_SRENV norot dead 513
/musr/command construct tubs RodPosD 0 5 150 0 360 Brass 27.5 -55 0 log_SRENV norot dead 514
/musr/command construct tubs Rod0D 0 5 150 0 360 Brass 0 -55 0 log_SRENV norot dead 515
/musr/command construct tubs RodNegD 0 5 150 0 360 Brass -27.5 -55 0 log_SRENV norot dead 516
# Vacuum vessel
/musr/command construct box TVac1 72.5 2.5 191.5 Steel 0 72.5 0 log_SRENV norot dead 601
/musr/command construct box TVac2 2.5 70.0 191.5 Steel 72.5 0 0 log_SRENV norot dead 602
/musr/command construct box TVac3 72.5 2.5 191.5 Steel 0 -72.5 0 log_SRENV norot dead 603
/musr/command construct box TVac4 2.5 70.0 191.5 Steel -72.5 0 0 log_SRENV norot dead 604
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For Spin Rotator
/musr/command construct tubs SREField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.5 log_World norot dead 630 nofield
/musr/command construct tubs SRBField 0 0.01 0.005 0 360 G4_Galactic 0 0 -1284.51 log_World norot dead 631 nofield
/musr/command visattributes G4_Cu red
/musr/command visattributes G4_Fe blue
/musr/command visattributes Brass yellow
################################################################################################################
# Lens 1 - 1st Einzel Lens
################################################################################################################
# L1ENV - Lens 1 envelope - for easy positioning of lens parts (outer dia: 100 mm, length: 300 mm)
#/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 0 0 -1929.5 log_World norot dead 600
/musr/command construct tubs L1ENV 40 100 150 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend 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
# n = 2 - Ground Electrode 2 (closer to SR).
/musr/command construct tubs L1GP2 40 44 50 0 360 Steel 0 0 100 log_L1ENV norot dead 653
# HP - High Potential Electrode (Central Anode - usually at +8.5 kV, for a 15 keV muon beam)
/musr/command construct tubs L1HP 40 44 40 0 360 Steel 0 0 0 log_L1ENV norot dead 652
# Lens 1 visual attributes (optional)
/musr/command visattributes log_L1HP darkred
################################################################################################################
# Electrostatic field at accelerator after moderator
################################################################################################################
#
/musr/command construct box Grid1 9.1 25 25 G4_Galactic 489.9 0.0 -1678.0 log_World rotMod dead 212
/musr/command globalfield Grid1_field 9.1 25 25 uniform 489.9 0.0 -1678.0 log_Grid1 0 0 0 -0.2527 0 0
/musr/command construct box Grid2 5 24 24 G4_Galactic 475.8 0.0 -1678.0 log_World rotMod dead 214
/musr/command globalfield Grid2_field 5 24 24 uniform 475.8 0.0 -1678.0 log_Grid2 0 0 0 -1.04 0 0
/musr/command globalfield printFieldValueAtPoint 489.9 0.0 -1678.0
/musr/command globalfield printFieldValueAtPoint 475.8 0.0 -1678.0
################################################################################################################
# Electrostatic mirror at bend
################################################################################################################
# MRENV
/musr/command construct box MirrE 65 65 10 G4_Galactic 14.14213562 0.0 -1678.0 log_World rotMirr dead 200
/musr/command globalfield Mirr_field 65 65 10 uniform 14.14213562 0.0 -1678.0 log_MirrE 0 0 0 0 0 0.75
###################################################################################
################### E L E C T R O M G N E T I C F I E L D S ##################
###################################################################################
# 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!
# Dummy, thin cylindres used for applying the field maps.
# NOTE: EM field cannot be applied to non simply connected bodies, as e.g. rings, cones, tori, etc.!
# For L1
/musr/command construct tubs L1EField 0 0.01 0.005 0 360 G4_Galactic 251.5 0.0 -1678.0 log_World rotBend dead 706 nofield
# For L2 (L3 before 2012)
/musr/command construct tubs L3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -863.0 log_World norot dead 708 nofield
# LENS 1. Best L1 settings: 7.2 kV for 12 keV muons
/musr/command globalfield Lens1EField 251.5 0.0 -1678.0 fromfile 2DE L1_Erz.map log_L1EField 9.0
# LENS 2. Best L3 settings: 8.4 kV for 12 keV muons
/musr/command globalfield Lens3EField 0. 0. -863.0 fromfile 2DE L3_Erz.map log_L3EField 10.5
# Spin rotator
# Electric field should be 370mm plates
# Magnetic field should be 260mm poles as measured srlem_ext.map
/musr/command globalfield Ele_field 0. 0. -1284.5 fromfile 3DE E_Sep_P37.5cm.map log_SREField 2.717
/musr/command globalfield Mag_field 0. 0. -1284.51 fromfile 3DB srlem_ext.map log_SRBField -0.00692
# 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
# 57.15mm upstream center
/musr/command construct box TriggE0 45 45 5 G4_Galactic 0 0 -555.1 log_World norot dead 630 nofield
# 48mm upstream center
/musr/command construct box TriggE1 45 45 4 G4_Galactic 0 0 -543. log_World norot dead 631 nofield
# 2.25mm downstream center
/musr/command construct box TriggE2 45 45 4.9479 G4_Galactic 0 0 -492.75 log_World rotTrig dead 632 nofield
# 54mm downstream center
/musr/command construct box TriggE3 45 45 4 G4_Galactic 0 0 -441.0 log_World norot dead 633
### Electric field at TRIGGER Detector TD: Three different uniform fields, 2012 settings
/musr/command globalfield Trigg0_field 45 45 5 uniform 0. 0. -555.1 log_TriggE0 0 0 0 0 0 0.338
/musr/command globalfield Trigg1_field 45 45 4 uniform 0. 0. -543. log_TriggE1 0 0 0 0 0 -0.02375
/musr/command globalfield Trigg2_field 45 45 4.9497 uniform 0. 0. -492.75 log_TriggE2 0 0 0 0 0 0.041416
/musr/command globalfield Trigg3_field 45 45 4 uniform 0. 0. -441.0 log_TriggE3 0 0 0 0 0 -0.45
# Trigger Lens, L3, (available space from -437 to -347, we use 70mm of that)
/musr/command construct tubs TL3EField 0 0.01 0.005 0 360 G4_Galactic 0 0 -382.0 log_World norot dead 706 nofield
/musr/command globalfield ColRingEField 0. 0. -382.0 fromfile 2DE CR7cm_Grid.map log_TL3EField 12.0
### Electric field at RING ANODE - from 3DE field map
# To create an arbitrary configuration, switch on all fields and set different potentials.
/musr/command globalfield RngAnT_field 0. 0. -143.00 fromfile 3DE EM_3D_ext_gridf.map log_RA_T 11.9
/musr/command globalfield RngAnR_field 0. 0. -143.02 fromfile 3DE EM_3D_ext_gridf.map log_RA_R 11.9
/musr/command globalfield RngAnB_field 0. 0. -143.04 fromfile 3DE EM_3D_ext_gridf.map log_RA_B 11.9
/musr/command globalfield RngAnL_field 0. 0. -143.06 fromfile 3DE EM_3D_ext_gridf.map log_RA_L 11.9
### 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_convMap.map log_SBField 0.
### Electric field at the sample
/musr/command construct tubs SEField 0 0.01 0.005 0 360 G4_Galactic 0.0 0.0 15.9 log_World norot dead 710 nofield
/musr/command globalfield SampleEField 0. 0. 15.9 fromfile 2DE SamplePlate_2DE.map log_SEField 0.0
# Set parameters for particle tracking in an EM field
/musr/command globalfield setparameter SetLargestAcceptableStep 5
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
# TESTING EM FIELD
/musr/command globalfield printFieldValueAtPoint 0. 0. 0.
/musr/command globalfield printFieldValueAtPoint 0. 35. -670.
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.10
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
#/musr/command process addModel mu+ G4MuMultipleScattering G4WentzelVIModel 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ musrMuEnergyLossLandau -1 -1 1
# parameters for Landau energy loss distribution, LandauSigma corresponds to the width of the distibution
/musr/command SetLandauMPV 0.01
/musr/command SetLandauSigma 0.3
#/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
#/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#/musr/command process addDiscreteProcess mu+ G4CoulombScattering
#/musr/command process addProcess mu+ G4UserSpecialCuts -1 -1 3
#/musr/command process addProcess mu+ G4StepLimiter -1 -1 4
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
#/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
#/musr/command signalSeparationTime 0.1
#
/musr/run/randomOption 1
################################################################################################################
# -- Setting simulation PARAMETERS --
################################################################################################################
# Set the overall range cut (default 0.1 mm)
#*/run/setCut 1 mm
# Set the range cut on particular volumes (in mm)
#/musr/command SetUserLimits log_CFoil 1e-8 -1 -1 -1 -1
#*/musr/command SetUserLimits log_target 0.01
#*/musr/command SetUserLimits log_targetscint 0.01
#*/musr/command SetUserLimits log_cryostatscint 0.01
# Set particle energy cuts on particular volumes (in eV)
#/musr/command SetUserLimits log_World ustepMax(mm) utrakMax(mm) utimeMax(ns) uekinMin(MeV) urangMin(mm)
#/musr/command SetUserLimits log_World -1 -1 -1 1e-7 -1
# Geant4 10.2
#------------
/process/em/lowestMuHadEnergy 1e-6 MeV
# Store ALL the events in a ROOT tree or just the interesting ones? (default is true)
#*/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
# Override runID number
#*/musr/run/runID 21
# Set the frequency of event printing
/musr/run/howOftenToPrintEvent 100
# 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
/musr/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
#*/control/execute visdawn.mac
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#/musr/command rootOutput runID off
#/musr/command rootOutput eventID off
#/musr/command rootOutput weight off
#/musr/command rootOutput BFieldAtDecay off
#/musr/command rootOutput muIniPosX off
#/musr/command rootOutput muIniPosY off
#/musr/command rootOutput muIniPosZ off
#/musr/command rootOutput muIniMomX off
#/musr/command rootOutput muIniMomY off
#/musr/command rootOutput muIniMomZ off
#/musr/command rootOutput muIniPolX off
#/musr/command rootOutput muIniPolY off
#/musr/command rootOutput muIniPolZ off
#/musr/command rootOutput muDecayDetID off
#/musr/command rootOutput muDecayPosX off
#/musr/command rootOutput muDecayPosY off
#/musr/command rootOutput muDecayPosZ off
#/musr/command rootOutput muDecayTime off
#/musr/command rootOutput muDecayPolX off
#/musr/command rootOutput muDecayPolY off
#/musr/command rootOutput muDecayPolZ off
#/musr/command rootOutput muTargetTime off
#/musr/command rootOutput muTargetPolX off
#/musr/command rootOutput muTargetPolY off
#/musr/command rootOutput muTargetPolZ off
#/musr/command rootOutput muM0Time off
#/musr/command rootOutput muM0PolX off
#/musr/command rootOutput muM0PolY off
#/musr/command rootOutput muM0PolZ off
/musr/command rootOutput muM1Time off
/musr/command rootOutput muM1PolX off
/musr/command rootOutput muM1PolY off
/musr/command rootOutput muM1PolZ off
/musr/command rootOutput muM2Time off
/musr/command rootOutput muM2PolX off
/musr/command rootOutput muM2PolY off
/musr/command rootOutput muM2PolZ off
#/musr/command rootOutput posIniMomX off
#/musr/command rootOutput posIniMomY off
#/musr/command rootOutput posIniMomZ off
#/musr/command rootOutput fieldNomVal off
#/musr/command rootOutput det_ID off
#/musr/command rootOutput det_edep off
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_start off
#/musr/command rootOutput det_end off
#/musr/command rootOutput det_x off
#/musr/command rootOutput det_y off
#/musr/command rootOutput det_z off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
### Root variables that are not written out by default, but can be switched on:
#/musr/command rootOutput fieldIntegralBx on
#/musr/command rootOutput fieldIntegralBy on
#/musr/command rootOutput fieldIntegralBz on
#/musr/command rootOutput fieldIntegralBz1 on
#/musr/command rootOutput fieldIntegralBz2 on
#/musr/command rootOutput fieldIntegralBz3 on
/musr/command storeOnlyEventsWithHits false
################################################################################################################
# -- Setting PARTICLE GUN parameters --
################################################################################################################
# Default momentum direction: 001, i.e. 0z.
# Default muon soin 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 -1144 mm, acceleration starts at -1154.15 mm
#/gun/vertex 0. 0. -2119.5 mm
/gun/vertex 499 0. -1678.0 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 6.83 6.83 0 mm
/gun/vertexsigma -15 -15 0 mm
#/gun/boxboundarycentre 499 0 -1678 mm
#/gun/boxboundary 15 15 1 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
# Set muon energy before hitting TD; a constant field in front of the C-foil accelerates the muons
# to add 3.38 keV
/gun/kenergy 15.0 eV
# Set beam momentum direction
/gun/direction -1.0 0.0 0.0
# Set muon spin direction: +10deg or 0
/gun/muonPolarizVector 0.9848 0 0.17365
#/gun/muonPolarizVector 1 0 0
# Other useful test parameters:
#------------------Oct.20 2015------------------------------------
# kenergy= 15 eV Pmu= 0.xxxMeV/c ==> sigma = /2.354 = MeV/c
#/gun/momentumsmearing 0.07508 MeV
/gun/momentumsmearing 0.016 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#*/gun/momentumboundary 20 40 0 MeV
#---/gun/tilt: xangle, yangle, dummy
#*/gun/tilt 0 0.0 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.0 deg
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#*/gun/decaytimelimits 10400 10420 2197.03 ns
#/gun/tiltsigma 1.4 1.4 0 deg
/gun/tiltsigma 0 0 -1.0 deg
# Selectively inactivate or activate sensitive detectors
#*/hits/inactivate /musr/ScintSD
# Only for code debugging!
/tracking/verbose 0
# BEAM ON
#/run/beamOn 1000000
#/run/beamOn 10
/run/beamOn 10000

3134
run/LEM/CR7cm_Grid.map Normal file

File diff suppressed because it is too large Load Diff

560444
run/LEM/EM_3D_ext_gridf.map Normal file

File diff suppressed because it is too large Load Diff

346924
run/LEM/E_Sep_P37.5cm.map Normal file

File diff suppressed because it is too large Load Diff

3627
run/LEM/L1_Erz.map Normal file

File diff suppressed because it is too large Load Diff

6858
run/LEM/L3_Erz.map Normal file

File diff suppressed because it is too large Load Diff

3134
run/LEM/SamplePlate_2DE.map Normal file

File diff suppressed because it is too large Load Diff

BIN
run/LEM/data/musr_4000.root Normal file

Binary file not shown.

BIN
run/LEM/data/musr_4001.root Normal file

Binary file not shown.

BIN
run/LEM/data/musr_4002.root Normal file

Binary file not shown.

BIN
run/LEM/data/musr_4003.root Normal file

Binary file not shown.

BIN
run/LEM/data/musr_4004.root Normal file

Binary file not shown.

331195
run/LEM/srlem_ext.map Normal file

File diff suppressed because it is too large Load Diff

196812
run/LEM/wew_rs_ext_convMap.map Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +0,0 @@
export G4LEVELGAMMADATA=/home/install/geant4.9.5/data/PhotonEvaporation2.2;
export G4RADIOACTIVEDATA=/home/install/geant4.9.5/data/RadioactiveDecay3.4;
export G4LEDATA=/home/install/geant4.9.5/data/G4EMLOW6.23;
export G4NEUTRONHPDATA=/home/install/geant4.9.5/data/G4NDL4.0;
export G4ABLADATA=/home/install/geant4.9.5/data/G4ABLA3.0;
export G4REALSURFACEDATA=/home/install/geant4.9.5/data/RealSurface1.0;
export G4NEUTRONXSDATA=/home/install/geant4.9.5/data/G4NEUTRONXS1.1;
export G4PIIDATA=/home/install/geant4.9.5/data/G4PII1.3;
export G4VRMLFILE_VIEWER="vrmlview";
echo "On this machine the G4VRMLFILE_VIEWER=$G4VRMLFILE_VIEWER"

View File

@@ -1,102 +0,0 @@
-------------------- Download musrSim source code from svn
$> cd /tmp
$> mkdir test
$> cd test
$> svn co file:///afs/psi.ch/project/nemu/svn/lem/trunk/simulation/geant4/musrSim musrSim
$> cd musrSim
$> ll
$> ll doc/
-------------------- Compile musrSim
$> cd ..
$> mkdir mSim
$> cd mSim
$> cmake -DGeant4_DIR=/home/install/geant4.9.5/install/lib/Geant4-9.5.0 /tmp/test/musrSim/
$> gmake
-------------------- Prepare and run
$> g495
$> cd /tmp/test/musrSim
$> ll
$> cd run
$> ll
$> ln -s /afs/psi.ch/project/HighFieldMuSR/Magnet/OI-39370/OI_Archiv/Oxford_Instr/9048_2009/x10cm_z2m.table .
$> ln -s /afs/psi.ch/user/s/sedlak/HighFieldMuSR/Davide/TURTLE/Feb2010/FOR077_reggiani_Feb2010.dat .
$> emacs vis_14510.mac &
- show different blocks / commands
$> /tmp/test/mSim/musrSim vis_14510.mac
- show the Dawn output
$> /tmp/test/mSim/musrSim 14510.mac
- discuss the text output
-------------------- Now open the output file in Root:
$> root
root [0] TFile* f=new TFile("data/musr_14510.root")
root [1] .ls
root [2] t1->Print()
root [3] t1->Draw("muIniMomZ")
root [4] t1->Draw("muDecayPosZ")
root [5] t1->Draw("sqrt(muDecayPosX*muDecayPosX+muDecayPosY*muDecayPosY):muDecayPosZ")
root [6] t1->Draw("sqrt(muDecayPosX*muDecayPosX+muDecayPosY*muDecayPosY):muDecayPosZ","muDecayPosZ>-200")
root [7] t1->Draw("det_edep")
root [8] t1->Draw("det_edep","det_ID==102")
root [9] .q
------------------- musrSimAna
$> cd ../musrSimAna/
$> gmake
$> ln -s /tmp/test/musrSim/run/data .
$> emacs 14510b.v1190&
$> ./musrSimAna 14510 14510b nographic
$> cd data
$> ln -s /home/data_sim/hifi/his_14410_14410b.v1190.root .
$> ln -s /home/data_sim/hifi/his_14460_14460a.v1190.root .
$> cd ..
------------------------------
Now open the output file in Root:
$> root
root [0] TFile* f=new TFile("data/his_14510_14510b.v1190.root")
root [1] .ls
root [2] hMuDecayMap_1->Draw() // condition 1 oncePerEvent
root [3] hMuDecayMap_6->Draw() // condition 6 goodEvent_det
root [4] TFile* f=new TFile("data/his_14410_14410b.v1190.root")
root [5] hMuDecayMap_6->Draw() // condition 6 goodEvent_det
root [6] hdet_time10_6->Draw() // condition 6 goodEvent_det
root [7] hdet_time10_11->Draw() // condition 11 goodEvent_F_det
root [8] hdet_time10_13->Draw() // condition 13 goodEvent_U_det
root [9] hdet_time20_6->Draw() // condition 6 goodEvent_det
--> SetOptFit(1111111)
function "[3]*exp(x/2.19703)*(1+[2]*cos(x*[0]+[1]))" was fitted
Asymmetry = 0.42
To study pileup background --> natural decay of muons is required.
This was done in the file 14460:
root [10] TFile* f=new TFile("data/his_14460_14460a.v1190.root")
root [11] hdet_time20_6->Draw() // condition 6 goodEvent_det
--> SetOptFit(1111111)
function "[0]*exp(-x/2.19703)+[1]" was fitted
--> Remember that par0 = 375.8 (Normalisation)
--> Background from the fit: par1/par0 = 4.4 / 375.8 = 1.2%
root [12] hdet_time20_rotref_6->Draw() // condition 6 goodEvent_det
--> SetOptFit(1111111)
function "[2]*cos(x*[0]+[1]" is fitted
--> Asymmetry = 2* par2/Normalisation = 2 * 78.5 / 375.8 = 0.418
2nd way how to extract pileup background:
root [13] hdet_time10_bgr3_6->Draw() // condition 6 goodEvent_det
--> SetOptFit(1111111)
--> background = par0/Normalisation = 4.9 / 375.8 = 1.3%
3rd way how to extract background:
root [14] hdet_time10_bgr1_9->Draw() // condition 9 pileupEvent
--> SetOptFit(1111111)
--> background = par0/Normalisation = 4.5 / 375.8 = 1.2%
Where to the muons and pileup muons stop? :
root [28] humanDecayHistograms_6->Draw() // <--- accepted events
root [29] humanDecayHistograms_9->Draw() // <--- mu1 for pileup events
root [30] humanDecayPileupHistograms_9->Draw() // <--- mu2 for pileup events

Binary file not shown.

View File

@@ -1,11 +0,0 @@
#!/bin/bash
# i=730044
# ../bin/Linux-g++/musrSim $i.mac
# i=730050
# ../bin/Linux-g++/musrSim $i.mac
i=720004
while [ "$i" -lt 720016 ]; do
../bin/Linux-g++/musrSim $i.mac
i=$(expr $i + 1)
done

View File

@@ -1,65 +0,0 @@
# This is a macro file for visualizing G4 events.
# It can either be included in another macro or called with /control/exec vis.mac
# Create an OpenGL driver (i.e. a scene handler and viewer)
# Some useful choices: VRML2FILE, OGLSX, OGLIX, DAWNFILE, etc.
#/vis/open VRML2FILE
/vis/open OGLIX 600x600-0+0
#*/vis/open DAWNFILE
# To calculate volumes and masses uncomment the next two lines
#*/vis/open ATree
#*/vis/ASCIITree/verbose 4
# Create a new empty scene and attach it to handler
/vis/scene/create
# Add world volume, trajectories and hits to the scene
/vis/scene/add/volume
/vis/scene/add/trajectories
/vis/scene/add/hits
/vis/sceneHandler/attach
# Configure the viewer (optional)
/vis/viewer/set/viewpointThetaPhi 235 -45
/vis/viewer/set/lightsThetaPhi 120 60
#/vis/viewer/set/hiddenEdge true
#/vis/viewer/set/style surface
#/vis/viewer/zoom 0.5
# Style: s - surface, w - wireframe
# Note: "surface style" and "hiddenEdge true" remove transparency!
# Other viewpoints (25 55) (235 -45) (125 35)
# Store trajectory information for visualisation (set to 0 if too many tracks cause core dump)
/tracking/storeTrajectory 1
#At the end of each event (default behaviour)
#/vis/scene/endOfEventAction refresh
#At the end of run of X events - Data from X events will be superimposed
/vis/scene/endOfEventAction accumulate
#At the end of Y runs - Data from Y runs will be superimposed
/vis/scene/endOfRunAction accumulate
# Coloured trajectories for an easier particle identification:
# PDG IDs and colours: e- 11 red, e+ -11 blue, nu_e 12 yellow,
# mu+ -13 magenta, anti_nu_mu -14 green, gamma 22 grey
#
#/vis/modeling/trajectories/create/drawByCharge
#/vis/modeling/trajectories/drawByCharge-0/set 1 cyan
/vis/modeling/trajectories/create/drawByParticleID
#*/vis/modeling/trajectories/drawByParticleID-0/set gamma grey
/vis/modeling/trajectories/drawByParticleID-0/setRGBA mu+ 1 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e+ 0 0 0.8 0.5
#*/vis/modeling/trajectories/drawByParticleID-0/setRGBA nu_e 0.7 0.7 0 1
#*/vis/modeling/trajectories/drawByParticleID-0/setRGBA anti_nu_mu 0.3 1.0 0 0.5
# Verbosity of hits
#/hits/verbose 2
# Output just the detector geometry
/vis/viewer/flush
/vis/reviewKeptEvents

View File

@@ -1,70 +0,0 @@
# This is a macro file for visualizing G4 events.
# It can either be included in another macro or called with /control/exec vis.mac
# Create an OpenGL driver (i.e. a scene handler and viewer)
# Some useful choices: VRML2FILE, OGLSX, OGLIX, DAWNFILE, etc.
#/vis/open VRML2FILE
#*/vis/open OGLIX 600x600-0+0
/vis/open DAWNFILE
# To calculate volumes and masses uncomment the next two lines
#*/vis/open ATree
#*/vis/ASCIITree/verbose 4
# Create a new empty scene and attach it to handler
/vis/scene/create
# Add world volume, trajectories and hits to the scene
/vis/scene/add/volume
/vis/scene/add/trajectories
/vis/scene/add/hits
/vis/sceneHandler/attach
# Configure the viewer (optional)
#/vis/viewer/set/viewpointThetaPhi 235 -45
/vis/viewer/set/viewpointThetaPhi 80 30
#/vis/viewer/set/lightsThetaPhi 120 60
#/vis/viewer/set/hiddenEdge true
/vis/viewer/set/style surface
/vis/viewer/zoom 0.8
# Style: s - surface, w - wireframe
# Note: "surface style" and "hiddenEdge true" remove transparency!
# Other viewpoints (25 55) (235 -45) (125 35)
# Store trajectory information for visualisation (set to 0 if too many tracks cause core dump)
/tracking/storeTrajectory 1
#At the end of each event (default behaviour)
#/vis/scene/endOfEventAction refresh
#At the end of run of X events - Data from X events will be superimposed
#cks
#/vis/scene/endOfEventAction accumulate
#At the end of Y runs - Data from Y runs will be superimposed
#/vis/scene/endOfRunAction accumulate
# Coloured trajectories for an easier particle identification:
# PDG IDs and colours: e- 11 red, e+ -11 blue, nu_e 12 yellow,
# mu+ -13 magenta, anti_nu_mu -14 green, gamma 22 grey
#
#/vis/modeling/trajectories/create/drawByCharge
#/vis/modeling/trajectories/drawByCharge-0/set 1 cyan
/vis/modeling/trajectories/create/drawByParticleID
#*/vis/modeling/trajectories/drawByParticleID-0/set gamma grey
#/vis/modeling/trajectories/drawByParticleID-0/setRGBA gamma 1 1 1 0
/vis/modeling/trajectories/drawByParticleID-0/setRGBA mu+ 1 0 0 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e+ 0 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA gamma 0 1 0 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e- 1 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA nu_e 1 1 1 0 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA anti_nu_mu 1 1 1 0.5
#/vis/modeling/trajectories/drawByParticleID-0/set nu_e white
#/vis/modeling/trajectories/drawByParticleID-0/set anti_nu_mu white
# Verbosity of hits
#/hits/verbose 2
# Output just the detector geometry
/vis/viewer/flush

View File

@@ -1,70 +0,0 @@
# This is a macro file for visualizing G4 events.
# It can either be included in another macro or called with /control/exec vis.mac
# Create an OpenGL driver (i.e. a scene handler and viewer)
# Some useful choices: VRML2FILE, OGLSX, OGLIX, DAWNFILE, etc.
#/vis/open VRML2FILE
#*/vis/open OGLIX 600x600-0+0
/vis/open DAWNFILE
# To calculate volumes and masses uncomment the next two lines
#*/vis/open ATree
#*/vis/ASCIITree/verbose 4
# Create a new empty scene and attach it to handler
/vis/scene/create
# Add world volume, trajectories and hits to the scene
/vis/scene/add/volume
/vis/scene/add/trajectories
/vis/scene/add/hits
/vis/sceneHandler/attach
# Configure the viewer (optional)
#/vis/viewer/set/viewpointThetaPhi 235 -45
/vis/viewer/set/viewpointThetaPhi 80 30
#/vis/viewer/set/lightsThetaPhi 120 60
#/vis/viewer/set/hiddenEdge true
/vis/viewer/set/style surface
/vis/viewer/zoom 0.8
# Style: s - surface, w - wireframe
# Note: "surface style" and "hiddenEdge true" remove transparency!
# Other viewpoints (25 55) (235 -45) (125 35)
# Store trajectory information for visualisation (set to 0 if too many tracks cause core dump)
/tracking/storeTrajectory 1
#At the end of each event (default behaviour)
#/vis/scene/endOfEventAction refresh
#At the end of run of X events - Data from X events will be superimposed
#cks
#/vis/scene/endOfEventAction accumulate
#At the end of Y runs - Data from Y runs will be superimposed
#/vis/scene/endOfRunAction accumulate
# Coloured trajectories for an easier particle identification:
# PDG IDs and colours: e- 11 red, e+ -11 blue, nu_e 12 yellow,
# mu+ -13 magenta, anti_nu_mu -14 green, gamma 22 grey
#
#/vis/modeling/trajectories/create/drawByCharge
#/vis/modeling/trajectories/drawByCharge-0/set 1 cyan
/vis/modeling/trajectories/create/drawByParticleID
#*/vis/modeling/trajectories/drawByParticleID-0/set gamma grey
#/vis/modeling/trajectories/drawByParticleID-0/setRGBA gamma 1 1 1 0
/vis/modeling/trajectories/drawByParticleID-0/setRGBA mu+ 1 0 0 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e+ 0 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA gamma 0 1 0 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e- 1 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA nu_e 1 1 1 0 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA anti_nu_mu 1 1 1 0.5
#/vis/modeling/trajectories/drawByParticleID-0/set nu_e white
#/vis/modeling/trajectories/drawByParticleID-0/set anti_nu_mu white
# Verbosity of hits
#/hits/verbose 2
# Output just the detector geometry
/vis/viewer/flush

View File

@@ -1,70 +0,0 @@
# This is a macro file for visualizing G4 events.
# It can either be included in another macro or called with /control/exec vis.mac
# Create an OpenGL driver (i.e. a scene handler and viewer)
# Some useful choices: VRML2FILE, OGLSX, OGLIX, DAWNFILE, etc.
#/vis/open VRML2FILE
#*/vis/open OGLIX 600x600-0+0
/vis/open DAWNFILE
# To calculate volumes and masses uncomment the next two lines
#*/vis/open ATree
#*/vis/ASCIITree/verbose 4
# Create a new empty scene and attach it to handler
/vis/scene/create
# Add world volume, trajectories and hits to the scene
/vis/scene/add/volume
/vis/scene/add/trajectories
/vis/scene/add/hits
/vis/sceneHandler/attach
# Configure the viewer (optional)
#/vis/viewer/set/viewpointThetaPhi 235 -45
/vis/viewer/set/viewpointThetaPhi 90 180
#/vis/viewer/set/lightsThetaPhi 120 60
#/vis/viewer/set/hiddenEdge true
#/vis/viewer/set/style surface
/vis/viewer/zoom 25
# Style: s - surface, w - wireframe
# Note: "surface style" and "hiddenEdge true" remove transparency!
# Other viewpoints (25 55) (235 -45) (125 35)
# Store trajectory information for visualisation (set to 0 if too many tracks cause core dump)
/tracking/storeTrajectory 1
#At the end of each event (default behaviour)
#/vis/scene/endOfEventAction refresh
#At the end of run of X events - Data from X events will be superimposed
#cks
#/vis/scene/endOfEventAction accumulate
#At the end of Y runs - Data from Y runs will be superimposed
#/vis/scene/endOfRunAction accumulate
# Coloured trajectories for an easier particle identification:
# PDG IDs and colours: e- 11 red, e+ -11 blue, nu_e 12 yellow,
# mu+ -13 magenta, anti_nu_mu -14 green, gamma 22 grey
#
#/vis/modeling/trajectories/create/drawByCharge
#/vis/modeling/trajectories/drawByCharge-0/set 1 cyan
/vis/modeling/trajectories/create/drawByParticleID
#*/vis/modeling/trajectories/drawByParticleID-0/set gamma grey
#/vis/modeling/trajectories/drawByParticleID-0/setRGBA gamma 1 1 1 0
/vis/modeling/trajectories/drawByParticleID-0/setRGBA mu+ 1 0 0 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e+ 0 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA gamma 0 1 0 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e- 1 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA nu_e 1 1 1 0 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA anti_nu_mu 1 1 1 0.5
#/vis/modeling/trajectories/drawByParticleID-0/set nu_e white
#/vis/modeling/trajectories/drawByParticleID-0/set anti_nu_mu white
# Verbosity of hits
#/hits/verbose 2
# Output just the detector geometry
/vis/viewer/flush

View File

@@ -1,72 +0,0 @@
# This is a macro file for visualizing G4 events.
# It can either be included in another macro or called with /control/exec vis.mac
# Create an OpenGL driver (i.e. a scene handler and viewer)
# Some useful choices: VRML2FILE, OGLSX, OGLIX, DAWNFILE, etc.
#/vis/open VRML2FILE
#*/vis/open OGLIX 600x600-0+0
/vis/open DAWNFILE
# To calculate volumes and masses uncomment the next two lines
#*/vis/open ATree
#*/vis/ASCIITree/verbose 4
# Create a new empty scene and attach it to handler
/vis/scene/create
# Add world volume, trajectories and hits to the scene
/vis/scene/add/volume
/vis/scene/add/trajectories
/vis/scene/add/hits
/vis/sceneHandler/attach
# Configure the viewer (optional)
#/vis/viewer/set/viewpointThetaPhi 235 -45
#/vis/viewer/set/viewpointThetaPhi 90 180
#/vis/viewer/set/viewpointThetaPhi 0 0
/vis/viewer/set/viewpointThetaPhi 90 90
#/vis/viewer/set/lightsThetaPhi 120 60
#/vis/viewer/set/hiddenEdge true
#/vis/viewer/set/style surface
/vis/viewer/zoom 2.5
# Style: s - surface, w - wireframe
# Note: "surface style" and "hiddenEdge true" remove transparency!
# Other viewpoints (25 55) (235 -45) (125 35)
# Store trajectory information for visualisation (set to 0 if too many tracks cause core dump)
/tracking/storeTrajectory 1
#At the end of each event (default behaviour)
#/vis/scene/endOfEventAction refresh
#At the end of run of X events - Data from X events will be superimposed
#cks
#/vis/scene/endOfEventAction accumulate
#At the end of Y runs - Data from Y runs will be superimposed
#/vis/scene/endOfRunAction accumulate
# Coloured trajectories for an easier particle identification:
# PDG IDs and colours: e- 11 red, e+ -11 blue, nu_e 12 yellow,
# mu+ -13 magenta, anti_nu_mu -14 green, gamma 22 grey
#
#/vis/modeling/trajectories/create/drawByCharge
#/vis/modeling/trajectories/drawByCharge-0/set 1 cyan
/vis/modeling/trajectories/create/drawByParticleID
#*/vis/modeling/trajectories/drawByParticleID-0/set gamma grey
#/vis/modeling/trajectories/drawByParticleID-0/setRGBA gamma 1 1 1 0
/vis/modeling/trajectories/drawByParticleID-0/setRGBA mu+ 1 0 0 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e+ 0 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA gamma 0 1 0 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e- 1 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA nu_e 1 1 1 0 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA anti_nu_mu 1 1 1 0.5
#/vis/modeling/trajectories/drawByParticleID-0/set nu_e white
#/vis/modeling/trajectories/drawByParticleID-0/set anti_nu_mu white
# Verbosity of hits
#/hits/verbose 2
# Output just the detector geometry
/vis/viewer/flush

View File

@@ -1,63 +0,0 @@
# This is a macro file for visualizing G4 events.
# It can either be included in another macro or called with /control/exec vis.mac
# Create an OpenGL driver (i.e. a scene handler and viewer)
# Some useful choices: VRML2FILE, OGLSX, OGLIX, DAWNFILE, etc.
#/vis/open VRML2FILE
#*/vis/open OGLIX 600x600-0+0
/vis/open DAWNFILE
# To calculate volumes and masses uncomment the next two lines
#*/vis/open ATree
#*/vis/ASCIITree/verbose 4
# Create a new empty scene and attach it to handler
/vis/scene/create
# Add world volume, trajectories and hits to the scene
/vis/scene/add/volume
/vis/scene/add/trajectories
/vis/scene/add/hits
/vis/sceneHandler/attach
# Configure the viewer (optional)
/vis/viewer/set/viewpointThetaPhi 235 -45
/vis/viewer/set/lightsThetaPhi 120 60
#/vis/viewer/set/hiddenEdge true
#/vis/viewer/set/style surface
#/vis/viewer/zoom 0.5
# Style: s - surface, w - wireframe
# Note: "surface style" and "hiddenEdge true" remove transparency!
# Other viewpoints (25 55) (235 -45) (125 35)
# Store trajectory information for visualisation (set to 0 if too many tracks cause core dump)
/tracking/storeTrajectory 1
#At the end of each event (default behaviour)
#/vis/scene/endOfEventAction refresh
#At the end of run of X events - Data from X events will be superimposed
/vis/scene/endOfEventAction accumulate
#At the end of Y runs - Data from Y runs will be superimposed
#/vis/scene/endOfRunAction accumulate
# Coloured trajectories for an easier particle identification:
# PDG IDs and colours: e- 11 red, e+ -11 blue, nu_e 12 yellow,
# mu+ -13 magenta, anti_nu_mu -14 green, gamma 22 grey
#
#/vis/modeling/trajectories/create/drawByCharge
#/vis/modeling/trajectories/drawByCharge-0/set 1 cyan
/vis/modeling/trajectories/create/drawByParticleID
#*/vis/modeling/trajectories/drawByParticleID-0/set gamma grey
/vis/modeling/trajectories/drawByParticleID-0/setRGBA mu+ 1 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e+ 0 0 0.8 0.5
#*/vis/modeling/trajectories/drawByParticleID-0/setRGBA nu_e 0.7 0.7 0 1
#*/vis/modeling/trajectories/drawByParticleID-0/setRGBA anti_nu_mu 0.3 1.0 0 0.5
# Verbosity of hits
#/hits/verbose 2
# Output just the detector geometry
/vis/viewer/flush

View File

@@ -1,63 +0,0 @@
# This is a macro file for visualizing G4 events.
# It can either be included in another macro or called with /control/exec vis.mac
# Create an OpenGL driver (i.e. a scene handler and viewer)
# Some useful choices: VRML2FILE, OGLSX, OGLIX, DAWNFILE, etc.
/vis/open VRML2FILE
#*/vis/open OGLIX 600x600-0+0
#/vis/open DAWNFILE
# To calculate volumes and masses uncomment the next two lines
#*/vis/open ATree
#*/vis/ASCIITree/verbose 4
# Create a new empty scene and attach it to handler
/vis/scene/create
# Add world volume, trajectories and hits to the scene
/vis/scene/add/volume
/vis/scene/add/trajectories
/vis/scene/add/hits
/vis/sceneHandler/attach
# Configure the viewer (optional)
/vis/viewer/set/viewpointThetaPhi 235 -45
/vis/viewer/set/lightsThetaPhi 120 60
#/vis/viewer/set/hiddenEdge true
#/vis/viewer/set/style surface
#/vis/viewer/zoom 0.5
# Style: s - surface, w - wireframe
# Note: "surface style" and "hiddenEdge true" remove transparency!
# Other viewpoints (25 55) (235 -45) (125 35)
# Store trajectory information for visualisation (set to 0 if too many tracks cause core dump)
/tracking/storeTrajectory 1
#At the end of each event (default behaviour)
#/vis/scene/endOfEventAction refresh
#At the end of run of X events - Data from X events will be superimposed
/vis/scene/endOfEventAction accumulate
#At the end of Y runs - Data from Y runs will be superimposed
/vis/scene/endOfRunAction accumulate
# Coloured trajectories for an easier particle identification:
# PDG IDs and colours: e- 11 red, e+ -11 blue, nu_e 12 yellow,
# mu+ -13 magenta, anti_nu_mu -14 green, gamma 22 grey
#
#/vis/modeling/trajectories/create/drawByCharge
#/vis/modeling/trajectories/drawByCharge-0/set 1 cyan
/vis/modeling/trajectories/create/drawByParticleID
#*/vis/modeling/trajectories/drawByParticleID-0/set gamma grey
/vis/modeling/trajectories/drawByParticleID-0/setRGBA mu+ 1 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e+ 0 0 0.8 0.5
#*/vis/modeling/trajectories/drawByParticleID-0/setRGBA nu_e 0.7 0.7 0 1
#*/vis/modeling/trajectories/drawByParticleID-0/setRGBA anti_nu_mu 0.3 1.0 0 0.5
# Verbosity of hits
#/hits/verbose 2
# Output just the detector geometry
/vis/viewer/flush

View File

@@ -1,301 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for muSR instrument simulations
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
###################################################################################
############################# G E O M E T R Y ###################################
###################################################################################
# ROTATION MATRIXES:
/musr/command rotation matrix1 0 0 45
/musr/command rotation matrix2 0 180 0
# WORLD VOLUME
/musr/command construct box World 300 300 2000 G4_Galactic 0 0 0 no_logical_volume norot dead -1
# ---- BEAMPIPE ----
# Between the face of the last quadrupole and the MANTEL, there is 395 mm distance
# = tube with the same diameter as the MANTEL.
# MANTEL
/musr/command construct tubs mantel_A 159 165 210 0 360 G4_Al 0 0 -1152 log_World norot dead 8301
/musr/command construct tubs mantel_B 76.5 159 12.5 0 360 G4_Al 0 0 -954.5 log_World norot dead 8302
/musr/command construct tubs mantel_C 165 185 8.5 0 360 G4_Al 0 0 -1353.5 log_World norot dead 8303
# NEW HIGH FIELD "ZWICHENROHR" (Gezeichnet 7.2.2011)
/musr/command construct tubs zwichenrohr_A 35 41 322 0 360 G4_Al 0 0 -620 log_World norot dead 8201
/musr/command construct tubs zwichenrohr_B 0 35 322 0 360 G4_Galactic 0 0 -620 log_World norot dead 8202
/musr/command construct tubs zwichenrohr_C 41 90 6 0 360 G4_Al 0 0 -936 log_World norot dead 8203
/musr/command construct tubs zwichenrohr_D 25 35 5 0 360 G4_Al 0 0 317 log_zwichenrohr_B norot dead 8204
# SECOND COLLIMATOR
/musr/command construct tubs collimatorA2 7.5 35 25 0 360 G4_Cu 0 0 287 log_zwichenrohr_B norot dead 341
# NOSE EXTENSION
/musr/command construct tubs noseExtensionA 15 25 2.0 0 360 G4_Al 0 0 -47 log_World norot dead 300
/musr/command construct tubs noseExtensionB 25 28 126.5 0 360 G4_Al 0 0 -171.5 log_World norot dead 302
/musr/command construct tubs noseExtensionC 28 41 4.0 0 360 G4_Al 0 0 -294 log_World norot dead 304
/musr/command construct tubs noseKaptonWindow 0 15 0.015 0 360 G4_KAPTON 0 0 -45.1 log_World norot dead 309
# COLLIMATOR
#/musr/command construct tubs collimatorA 2.5 25 15 0 360 G4_Pb 0 0 -49 log_World norot dead 310
#/musr/command construct tubs collimatorB 5.0 25 10 0 360 G4_Pb 0 0 -74 log_World norot dead 312
#/musr/command construct tubs collimatorC 7.5 25 25 0 360 G4_Pb 0 0 -309 log_World norot dead 312
# COLLIMATOR
/musr/command construct tubs collimatorA 2.5 25 15 0 360 G4_Pb 0 0 -64 log_World norot dead 310
/musr/command construct tubs collimatorB 3.5 25 10 0 360 G4_Pb 0 0 -89 log_World norot dead 312
/musr/command construct tubs collimatorC 5.0 25 10 0 360 G4_Pb 0 0 -109 log_World norot dead 314
#
# ---- MAGNET -----
/musr/command construct tubs magnet 44.4 100 150 0 360 G4_Sn 0 0 0 log_World norot dead 221
# MAGNET WALL
/musr/command construct tubs mag_wall 44.4 46.5 150 0 360 G4_Cu 0 0 0 log_magnet norot dead 222
#
# ---- CRYOSTAT ----
/musr/command construct tubs cryo_1_cyl 7 7.5 13.0 0 360 G4_Al 0 0 2.5 log_World norot dead 511
/musr/command construct tubs cryo_1_window 0 7.0 0.005 0 360 G4_MYLAR 0 0 -5.4 log_World norot dead 513
/musr/command construct tubs cryo_1_cyl_b 9.8 10.5 16 0 360 G4_Al 0 0 32.5 log_World norot dead 515
/musr/command construct tubs cryo_1_flange_b 7 10.5 0.5 0 360 G4_Al 0 0 16 log_World norot dead 516
/musr/command construct cons cryo_1_conical 9.8 10.5 13.5 14.2 10 0 360 G4_Al 0 0 58.5 log_World norot dead 517
/musr/command construct tubs cryo_1_cyl_c 13.5 14.2 60 0 360 G4_Al 0 0 128.5 log_World norot dead 518
#
/musr/command construct tubs cryo_2_cyl 15.5 16 33.0 0 360 G4_Al 0 0 13.0 log_World norot dead 521
/musr/command construct tubs cryo_2_flange 10 15.5 0.25 0 360 G4_Al 0 0 -19.75 log_World norot dead 522
/musr/command construct tubs cryo_2_window 0 11 0.005 0 360 G4_MYLAR 0 0 -20.1 log_World norot dead 523
/musr/command construct tubs cryo_2_flange_b 15.5 29.5 0.5 0 360 G4_Al 0 0 46.5 log_World norot dead 525
/musr/command construct tubs cryo_2_cyl_b 28.5 29.5 61.25 0 360 G4_Al 0 0 108.25 log_World norot dead 526
#
/musr/command construct tubs cryo_3_cyl 18.0 18.5 33.0 0 360 G4_Al 0 0 8.5 log_World norot dead 531
/musr/command construct tubs cryo_3_flange 8 18.0 0.25 0 360 G4_Al 0 0 -24.25 log_World norot dead 532
/musr/command construct tubs cryo_3_window 0 9 0.005 0 360 G4_MYLAR 0 0 -24.6 log_World norot dead 533
/musr/command construct tubs cryo_3_flange_b 18.0 34.5 0.5 0 360 G4_Al 0 0 42 log_World norot dead 535
/musr/command construct tubs cryo_3_cyl_b 33.5 34.5 61.25 0 360 G4_Al 0 0 103.75 log_World norot dead 536
#
/musr/command construct tubs cryo_4_cyl 20 21 31.25 0 360 G4_Al 0 0 4.25 log_World norot dead 541
/musr/command construct tubs cryo_4_flange 6 20 0.5 0 360 G4_Al 0 0 -26.5 log_World norot dead 542
/musr/command construct tubs cryo_4_window 0 7 0.005 0 360 G4_Ti 0 0 -27.1 log_World norot dead 543
/musr/command construct tubs cryo_4_flange_b 20 41 1 0 360 G4_Al 0 0 36.5 log_World norot dead 545
/musr/command construct tubs cryo_4_cyl_b 39 41 61.25 0 360 G4_Al 0 0 98.75 log_World norot dead 546
#
# Back Flange 45
/musr/command construct tubs backFlangeA 30 34.5 1.5 0 360 G4_Al 0 0 22.75 log_World norot dead 240
/musr/command construct tubs backFlangeB 22.5 40.5 1.5 0 360 G4_Al 0 0 25.75 log_World norot dead 241
# Main Holder 45
/musr/command construct tubs mainHolder 30.19 34.19 21.2 0 360 G4_Al 0 0 0 log_World norot dead 250
# SPACER 45
/musr/command construct tubs spacer 29.88 34.5 4.9 0 360 G4_Al 0 0 -26.1 log_World norot dead 260
# MPPC Holder 45
/musr/command construct tubs frontLid1A 16.5 34.5 5.5 0 360 G4_Al 0 0 -36.5 log_World norot dead 270
/musr/command construct tubs frontLid1D 6.0 16.5 1.0 0 360 G4_Al 0 0 -32.0 log_World norot dead 277
#
# Front Flange 45
/musr/command construct tubs frontLid2 6.0 34.5 1.5 0 360 G4_Al 0 0 -43.5 log_World norot dead 290
#
# NOSE EXTENSION
#/musr/command construct tubs noseExtensionA 15 25 2.0 0 360 G4_Al 0 0 -47 log_World norot dead 300
#/musr/command construct tubs noseExtensionB 25 28 126.5 0 360 G4_Al 0 0 -171.5 log_World norot dead 302
#/musr/command construct tubs noseExtensionC 28 41 4.0 0 360 G4_Al 0 0 -294 log_World norot dead 304
#
#
# M COUNTERS AND M COUNTER HOLDER
/musr/command construct tubs M0_holder1 5.5 7.5 3.25 0 360 G4_Al 0 0 -36.31 log_World norot dead 330
/musr/command construct tubs M0_holder2 3.5 5.5 0.75 0 360 G4_PLEXIGLASS 0 0 -37.06 log_World norot dead 333
/musr/command construct tubs M0_holder3 4.0 5.5 0.75 0 360 G4_PLEXIGLASS 0 0 -35.56 log_World norot dead 335
/musr/command construct tubs M0 0 4 0.15 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -36.15 log_World norot musr/ScintSD 102
/musr/command construct tubs M0_electronics 4.0 9 0.85 0 360 G4_POLYCARBONATE 0 0 -40.41 log_World norot dead 337
# TARGET SPACE
#/musr/command construct tubs targetspace 0 5 50 0 360 G4_He 0 0 -20 log_cryostat
# SCINTILLATOR BEFORE TARGET
#/musr/command construct tubs coulombM1 0 3.0 0.1 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2 log_World norot musr/ScintSD 101
# TARGET
/musr/command construct tubs target 0 2.5 0.215 0 360 G4_Ag 0 0 0 log_World norot dead 201
/musr/command construct tubs targetFieldVol 0 0.5 0.015 0 360 G4_Ag 0 0 0 log_target norot dead 202
#/musr/command construct tubs vetoTarget 0 5.0 1. 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 1.220 log_World norot musr/ScintSD 160
#/musr/command construct tubs vetoCyl 5 6.0 3.6 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -1.39 log_World norot musr/ScintSD 161
#/musr/command construct TubeWithTubeHole vetoTarget 7 9 5.1 0 360 8.2 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2.89 log_World norot musr/ScintSD 160
#/musr/command construct TubeWithHoleAndTubeHole vetoTarget 1.5 6 5.1 0 360 4 8.2 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -2.89 log_World norot musr/ScintSD 160
/musr/command construct tubs sampleHolder 0 4 31.39 0 360 G4_Ag 0 0 31.61 log_World norot dead 165
/musr/command construct tubs sampleHolder2 0 7.5 108.5 0 360 G4_Ag 0 0 171.5 log_World norot dead 166
#
/musr/command construct box ScintB1 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE 0.00 25.50 -8.75 log_World norot musr/ScintSD 1
/musr/command construct box ScintB2 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE -18.03 18.03 -8.75 log_World matrix1 musr/ScintSD 2
/musr/command construct box ScintB3 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE -25.50 0.00 -8.75 log_World norot musr/ScintSD 3
/musr/command construct box ScintB4 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE -18.03 -18.03 -8.75 log_World matrix1 musr/ScintSD 4
/musr/command construct box ScintB5 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE 0.00 -25.50 -8.75 log_World norot musr/ScintSD 5
/musr/command construct box ScintB6 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE 18.03 -18.03 -8.75 log_World matrix1 musr/ScintSD 6
/musr/command construct box ScintB7 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE 25.50 0.00 -8.75 log_World norot musr/ScintSD 7
/musr/command construct box ScintB8 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE 18.03 18.03 -8.75 log_World matrix1 musr/ScintSD 8
/musr/command construct box ScintF1 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE 0.00 25.50 8.75 log_World norot musr/ScintSD 11
/musr/command construct box ScintF2 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE -18.03 18.03 8.75 log_World matrix1 musr/ScintSD 12
/musr/command construct box ScintF3 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE -25.50 0.00 8.75 log_World norot musr/ScintSD 13
/musr/command construct box ScintF4 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE -18.03 -18.03 8.75 log_World matrix1 musr/ScintSD 14
/musr/command construct box ScintF5 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE 0.00 -25.50 8.75 log_World norot musr/ScintSD 15
/musr/command construct box ScintF6 8.75 2.50 8.75 G4_PLASTIC_SC_VINYLTOLUENE 18.03 -18.03 8.75 log_World matrix1 musr/ScintSD 16
/musr/command construct box ScintF7 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE 25.50 0.00 8.75 log_World norot musr/ScintSD 17
/musr/command construct box ScintF8 2.50 8.75 8.75 G4_PLASTIC_SC_VINYLTOLUENE 18.03 18.03 8.75 log_World matrix1 musr/ScintSD 18
#
/musr/command construct TubeWithHolePlusTubeHole PlexyCyl1 3.5 12.3 4.5 0 360 7 12.5 5 G4_PLEXIGLASS 0 0 -10. log_World matrix2 dead 45
/musr/command construct tubs PlexyCyl2 7.6 12.3 2.5 0 360 G4_PLEXIGLASS 0 0 11.5 log_World norot dead 46
/musr/command construct TubeWithHolePlusTubeHole vetoCyl 2.5 12. 5. 0 360 3.5 12 9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -10.5 log_World matrix2 musr/ScintSD 51
/musr/command construct tubs vetoCylB1 8.25 11.25 4 69.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 61
/musr/command construct tubs vetoCylB2 8.25 11.25 4 114.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 62
/musr/command construct tubs vetoCylB3 8.25 11.25 4 159.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 63
/musr/command construct tubs vetoCylB4 8.25 11.25 4 204.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 64
/musr/command construct tubs vetoCylB5 8.25 11.25 4 249.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 65
/musr/command construct tubs vetoCylB6 8.25 11.25 4 294.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 66
/musr/command construct tubs vetoCylB7 8.25 11.25 4 339.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 67
/musr/command construct tubs vetoCylB8 8.25 11.25 4 24.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -4.5 log_World norot musr/ScintSD 68
/musr/command construct tubs vetoCylF1 8.25 11.25 4 69.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 71
/musr/command construct tubs vetoCylF2 8.25 11.25 4 114.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 72
/musr/command construct tubs vetoCylF3 8.25 11.25 4 159.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 73
/musr/command construct tubs vetoCylF4 8.25 11.25 4 204.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 74
/musr/command construct tubs vetoCylF5 8.25 11.25 4 249.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 75
/musr/command construct tubs vetoCylF6 8.25 11.25 4 294.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 76
/musr/command construct tubs vetoCylF7 8.25 11.25 4 339.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 77
/musr/command construct tubs vetoCylF8 8.25 11.25 4 24.5 41 G4_PLASTIC_SC_VINYLTOLUENE 0 0 4.5 log_World norot musr/ScintSD 78
#
#---------------------------------------------------------
#
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE red
/musr/command visattributes G4_PLEXIGLASS yellow
/musr/command visattributes G4_Pb blue
#/musr/command visattributes log_beampipe invisible
#/musr/command visattributes log_beampipeAshell invisible
#/musr/command visattributes log_beampipeBshell invisible
/musr/command visattributes log_World invisible
/musr/command visattributes log_target yellow
/musr/command visattributes log_magnet invisible
/musr/command visattributes log_mag_wall invisible
#/musr/command visattributes log_magnet yellow
#/musr/command visattributes log_mag_wall yellow
#/musr/command visattributes log_sh0 invisible
#/musr/command visattributes log_sh2 invisible
#/musr/command visattributes log_vetoTarget green
/musr/command visattributes log_vetoCyl green
###################################################################################
######################### M A G N E T I C F I E L D #########################
###################################################################################
# Set magnetic field (set field intensity in T and sigma in mm)
# syntax for magneticfield: fromfile filename fieldValue
# uniform fieldValue
# gaussian fieldValue sigma
#
/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 2D x10cm_z2m.table log_targetFieldVol -10.
/musr/command globalfield setparameter SetLargestAcceptableStep 2
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
/musr/command globalfield printFieldValueAtPoint 0 0 0
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.5
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
#
#/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
/process/msc/StepLimit UseSafety
#/process/msc/LateralDisplacement
/process/msc/RangeFactor 0.04
/process/msc/GeomFactor 2.5
#/process/msc/FactorForAngleLimit
/process/msc/Skin 3.0
#/process/msc/ThetaLimit 0.2 rad
#
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
#
/musr/run/howOftenToPrintEvent 100000
/musr/command maximumRunTimeAllowed 86000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
#/vis/disable
#/control/execute visVRML.mac
#/control/execute visFromToni.mac
/control/execute visDawn14510.mac
#/vis/open VRML2FILE
#/vis/open DAWNFILE
### (if too many tracks cause core dump => storeTrajectory 0)
#/vis/scene/create
#
#/tracking/storeTrajectory 1
#/vis/viewer/set/viewpointThetaPhi 90 0
##/vis/viewer/set/globalLineWidthScale 3
#/vis/viewer/zoom 30
###/vis/scene/add/trajectories
#/vis/drawVolume
#/vis/viewer/flush
####/hits/verbose 2
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
/gun/vertex 0 0 -1000 mm
# FWHM 10mm ==> sigma = 10/2.354 = 4.2481mm
#/gun/vertexsigma 20 20 0 mm
#---/gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed
/gun/vertexboundary 128 -999999 999999 mm
/gun/momentum 27.0 MeV
# sigma = 3% ==> sigma 27*0.03 = 0.81
/gun/momentumsmearing 0.81 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#/gun/momentumboundary 20 40 0 MeV
# TURTLE
#/gun/turtlefilename FOR061_2008_04_22.DAT
#/gun/turtlefilename FOR070_2008_10_17_XXII.DAT
#/gun/turtlefilename FOR077_pie3_HiField_d05_x30.dat
#/gun/turtlefilename FOR077_reggiani_Jan2010_NEW.dat
#/gun/turtlefilename FOR077_reggiani_Feb2010.dat
#/gun/turtleZ0position -900 mm
#---/gun/tilt: xangle, yangle, dummy
#/gun/tilt 0 0.5 0 deg
#---/gun/tiltsigma: xangleSigma, yangleSigma, dummy (1 degree on 1 meter ~ 17mm)
#/gun/tiltsigma 0.2 0.2 0 deg
#/gun/pitch 0.5 deg
/gun/muonPolarizVector 1 0 0
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
/gun/decaytimelimits 400 410 2197.03 ns
#/gun/decaytimelimits -1 -1 2197.03 ns
###################################################################################
######################## B E A M O N #########################################
###################################################################################
#/run/beamOn 3000000
/run/beamOn 100
#/run/beamOn 1000000

View File

@@ -1,219 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for the GPD muSR instrument simulation, as the geometry looked like in 2010.
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
###################################################################################
############################# G E O M E T R Y ###################################
###################################################################################
# ROTATION MATRIXES:
/musr/command rotation matrix1 1 0 0 90
/musr/command rotation matrix2 0 1 0 28.81
/musr/command rotation matrix3 0 1 0 151.19
/musr/command rotation matrix4 0 0 1 45
/musr/command rotation matrix5 0 1 0 90
/musr/command rotation matrix6 180 90 90
/musr/command rotation matrix7 0 90 90
# --- WORLD VOLUME ---
/musr/command construct box World 2100 2100 11000 G4_AIR 0 0 0 no_logical_volume norot dead -1
# --- BEAMPIPE ---
#/musr/command construct tubs beampipeA 0 2005 4500 0 360 G4_Galactic 0 0 -6100 log_World norot dead 230
#/musr/command construct tubs beampipe 0 405 500 0 360 G4_Galactic 0 0 -1100 log_World norot dead 231
#/musr/command construct tubs beampipeshell 100 105 500 0 360 G4_Al 0 0 0 log_beampipe norot dead 232
#/musr/command construct tubs beampipewindow 0 100 0.05 0 360 G4_MYLAR 0 0 499.9 log_beampipe norot dead 233
# PASSIVE COLLIMATOR (for BEAMPIPE vers.1)
# GPDcollimator - thickness in the thinner location is x2+(x9-x4) = 20+59-59
/musr/command construct GPDcollimator GPDcollimator 40 15 60 59 60.01 0 360 0 59 0 2.5 6 G4_Cu 0 0 -59 log_World matrix1 dead 251
/musr/command construct box Firstcollimator 70 70 15 G4_Pb 0 0 -100 log_World norot dead 255
/musr/command construct box Firstcollimatorhole 2 5 15 G4_Galactic 0 0 0 log_Firstcollimator norot dead 256
/musr/command construct box SecondCollimator 45 75 15 G4_Pb 0 0 -250 log_World norot dead 261
/musr/command construct tubs SecondCollHole 0 8 15 0 360 G4_Galactic 0 0 0 log_SecondCollimator norot dead 262
/musr/command construct box AlumPlate 60 90 5 G4_Al 0 0 -80 log_World norot dead 265
/musr/command construct tubs AlumPlateHole 0 25 5 0 360 G4_Galactic 0 0 0 log_AlumPlate norot dead 267
# --- SAMPLE HOLDER ---
/musr/command construct GPDsampleHolderA GPDsampleHolderA 0 0 0 0 0 G4_Al 0 -111.25 0 log_World matrix1 dead 300
/musr/command construct tubs GPDsampleHolderB 37.51 58 7 0 360 G4_Al 0 57 0 log_World matrix1 dead 301
/musr/command construct tubs GPDsampleHolderC 37.51 58 7 0 360 G4_Al 0 -57 0 log_World matrix1 dead 302
/musr/command construct box GPDsampleHolderD 12 0.5 50 G4_Al 38 0 28 log_World matrix1 dead 303
/musr/command construct box GPDsampleHolderE 12 0.5 50 G4_Al 38 0 -28 log_World matrix1 dead 304
/musr/command construct box GPDsampleHolderF 12 0.5 50 G4_Al -38 0 28 log_World matrix1 dead 305
/musr/command construct box GPDsampleHolderG 12 0.5 50 G4_Al -38 0 -28 log_World matrix1 dead 306
/musr/command construct tubs GPDsampleHolderH 0 9 50 180 50 G4_Al 48 0 29 log_World matrix1 dead 307
/musr/command construct tubs GPDsampleHolderI 0 9 50 130 50 G4_Al 48 0 -29 log_World matrix1 dead 308
/musr/command construct tubs GPDsampleHolderJ 0 9 50 310 50 G4_Al -48 0 29 log_World matrix1 dead 309
/musr/command construct tubs GPDsampleHolderK 0 9 50 0 50 G4_Al -48 0 -29 log_World matrix1 dead 310
#
/musr/command construct tubs GPDsampleHolderW 58.01 58.2 64 25 130 G4_POLYETHYLENE 0 0 0 log_World matrix1 dead 313
/musr/command construct tubs GPDsampleHolderX 58.01 58.2 64 205 130 G4_POLYETHYLENE 0 0 0 log_World matrix1 dead 314
/musr/command construct tubs GPDsampleHolderY 36.79 36.99 64 45 90 G4_POLYETHYLENE 0 0 0 log_World matrix1 dead 315
/musr/command construct tubs GPDsampleHolderZ 36.79 36.99 64 225 90 G4_POLYETHYLENE 0 0 0 log_World matrix1 dead 316
# --- SAMPLE CELL ---
/musr/command construct tubs GPDsampleCell 0 12 50 0 360 G4_Cu 0 0 0 log_World matrix1 dead 211
# --- SAMPLE ---
/musr/command construct tubs target 0 3.5 7 0 360 G4_Cu 0 0 0 log_GPDsampleCell norot dead 201
#/musr/command construct tubs targetFieldVol 0 3.5 7 0 360 G4_Cu 0 0 0 log_GPDsampleCell norot dead 201
# --- SCINTILLATOR ---
/musr/command construct box ScintB1 13 45 2.5 G4_PLASTIC_SC_VINYLTOLUENE 22 0 -40 log_World matrix2 musr/ScintSD 1
/musr/command construct box ScintB2 13 45 2.5 G4_PLASTIC_SC_VINYLTOLUENE -22 0 -40 log_World matrix3 musr/ScintSD 2
/musr/command construct box ScintF1 13 45 2.5 G4_PLASTIC_SC_VINYLTOLUENE -22 0 40 log_World matrix2 musr/ScintSD 11
/musr/command construct box ScintF2 13 45 2.5 G4_PLASTIC_SC_VINYLTOLUENE 22 0 40 log_World matrix3 musr/ScintSD 12
/musr/command construct box ScintF3 7 45 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 46 log_World norot musr/ScintSD 13
#/musr/command construct box KoincB1 20 90 2.5 G4_PLASTIC_SC_VINYLTOLUENE 33 0 -60 log_World matrix2 musr/ScintSD 21
#/musr/command construct box KoincB2 20 90 2.5 G4_PLASTIC_SC_VINYLTOLUENE -33 0 -60 log_World matrix3 musr/ScintSD 22
# --- M0 ---
/musr/command construct box M0 5 5 1.0 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -46 log_World matrix4 musr/ScintSD 102
#/musr/command construct GPDmHolder GPDmHolder 5 25 1.0 G4_PLASTIC_SC_VINYLTOLUENE 0 -25 -46 log_World norot dead 103
# --- Magnet ---
#/musr/command construct tubs Magnet1 180 375 78 0 360 G4_Cu 133 0 0 log_World matrix5 dead 291
#/musr/command construct tubs Magnet2 180 375 78 0 360 G4_Cu -133 0 0 log_World matrix5 dead 292
#/musr/command construct uprofile Uprof1 25 10 400 5 G4_Al -45 0 200 log_World matrix6 dead 293
#/musr/command construct uprofile Uprof2 25 10 400 5 G4_Al -45 0 -200 log_World matrix6 dead 293
#/musr/command construct uprofile Uprof3 25 10 400 5 G4_Al 45 0 200 log_World matrix7 dead 293
#/musr/command construct uprofile Uprof4 25 10 400 5 G4_Al 45 0 -200 log_World matrix7 dead 293
#
##---------------------------------------------------------
#/musr/command logicalVolumeToBeReweighted mu log_pbCollimator_1 6
#/musr/command logicalVolumeToBeReweighted mu log_pbCollimator_2 5
#/musr/command logicalVolumeToBeReweighted mu log_activeCollim 4
##---------------------------------------------------------
/musr/command visattributes log_World invisible
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE blue
#/musr/command visattributes log_GPDsampleHolderD red
#/musr/command visattributes log_GPDsampleHolderE red
#/musr/command visattributes log_GPDsampleHolderF red
#/musr/command visattributes log_GPDsampleHolderG red
/musr/command visattributes log_GPDcollimator green
/musr/command visattributes log_Firstcollimator green
/musr/command visattributes log_Firstcollimatorhole green
/musr/command visattributes log_SecondCollimator green
/musr/command visattributes log_SecondCollHole green
#/musr/command visattributes log_GPDmHolder magenta
#/musr/command visattributes log_target blue
/musr/command visattributes log_M0 red
#/musr/command visattributes G4_Pb blue
####################################################################################
######################### M A G N E T I C F I E L D #########################
###################################################################################
# Set magnetic field (set field intensity in T and sigma in mm)
# syntax for magneticfield: fromfile filename fieldValue
# uniform fieldValue
# gaussian fieldValue sigma
#
/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 2D GPD_coil_primitive.table log_target 0.03
/musr/command globalfield setparameter SetLargestAcceptableStep 200
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
/musr/command globalfield printFieldValueAtPoint 0 0 0
/musr/command globalfield printFieldValueAtPoint 0 0 10
/musr/command globalfield printFieldValueAtPoint 0 0 20
/musr/command globalfield printFieldValueAtPoint 0 0 30
/musr/command globalfield printFieldValueAtPoint 0 0 50
/musr/command globalfield printFieldValueAtPoint 0 0 100
/musr/command globalfield printFieldValueAtPoint 0 0 200
/musr/command globalfield printFieldValueAtPoint 0 0 300
/musr/command globalfield printFieldValueAtPoint 0 0 400
/musr/command globalfield printFieldValueAtPoint 0 0 500
/musr/command globalfield printFieldValueAtPoint 10 0 0
/musr/command globalfield printFieldValueAtPoint 100 0 0
/musr/command globalfield printFieldValueAtPoint 300 0 0
/musr/command globalfield printFieldValueAtPoint 0 10 0
/musr/command globalfield printFieldValueAtPoint 0 100 0
/musr/command globalfield printFieldValueAtPoint 0 300 0
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.4
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
#/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
/process/msc/StepLimit UseSafety
#/process/msc/LateralDisplacement
/process/msc/RangeFactor 0.04
/process/msc/GeomFactor 2.5
#/process/msc/FactorForAngleLimit
/process/msc/Skin 3.0
#/process/msc/ThetaLimit 0.2 rad
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 10
#
#/musr/run/howOftenToPrintEvent 10
/musr/command maximumRunTimeAllowed 220000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
/musr/command rootOutput nOptPhot off
/musr/command rootOutput odet_ID off
/musr/command rootOutput odet_nPhot off
/musr/command rootOutput odet_timeFirst off
/musr/command rootOutput odet_timeA off
/musr/command rootOutput odet_timeB off
/musr/command rootOutput odet_timeC off
/musr/command rootOutput odet_timeD off
/musr/command rootOutput odet_timeE off
/musr/command rootOutput odet_timeLast off
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
#/vis/disable
/control/execute visDawn201.mac
#/control/execute visVRML.mac
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
/gun/vertex 0 0 -1000 mm
/gun/vertexsigma 25 25 0 mm
#---/gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed
/gun/vertexboundary 100 -999999 999999 mm
/gun/momentum 100.0 MeV
# sigma = 3% ==> sigma 27*0.03 = 0.81
/gun/momentumsmearing 3.00 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 on 1 meter ~ 17mm)
/gun/tiltsigma 0.15 0.15 0 deg
/gun/pitch 0.08 deg
/gun/muonPolarizVector 0 0 -1
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
/gun/decaytimelimits -1 -1 2197.03 ns
###################################################################################
######################## B E A M O N #########################################
###################################################################################
#/run/beamOn 8000000
/run/beamOn 10

View File

@@ -31,6 +31,7 @@
#include "F04GlobalField.hh"
#include "musrParameters.hh"
#include "musrErrorMessage.hh"
#include "G4TouchableHistoryHandle.hh"
G4Navigator* F04ElementField::aNavigator;

View File

@@ -50,7 +50,7 @@ F04GlobalField* F04GlobalField::object = 0;
F04GlobalField::F04GlobalField() : G4ElectroMagneticField(),
minStep(0.01*CLHEP::mm), deltaChord(3.0*CLHEP::mm),
deltaOneStep(0.01*CLHEP::mm), deltaIntersection(0.1*CLHEP::mm),
epsMin(2.5e-7*CLHEP::mm), epsMax(0.05*CLHEP::mm),
epsMin(2.5e-7*CLHEP::mm), epsMax(0.01*CLHEP::mm),
fEquation(0), fFieldManager(0),
fFieldPropagator(0), fStepper(0), fChordFinder(0)
// F04GlobalField::F04GlobalField() : G4MagneticField(),

View File

@@ -119,6 +119,20 @@ void musrSteppingAction::UserSteppingAction(const G4Step* aStep) {
myRootOutput->htest3->Fill(E);
aTrack->SetTrackStatus(fStopAndKill);
}
// put energy to 0 if muon+ energy is too low in the moderator wires (hack for Geant4 11.1, not sure before it seemed to work without. GJ)
if(aTrack->GetDynamicParticle()->GetDefinition()->GetParticleName() == "mu+" && aTrack->GetVolume()->GetLogicalVolume()->GetName().find("Wire") != std::string::npos){
if(preStepPoint->GetKineticEnergy() < 0.001*CLHEP::electronvolt){
postStepPoint->SetMomentumDirection(G4ThreeVector(0,0,0));
postStepPoint->SetKineticEnergy(0.001*CLHEP::electronvolt); //0 doesn't work. This is the minimum.
//aTrack->SetTrackStatus(fStopAndKill); //not optimal, no decay here
musrErrorMessage::GetInstance()->musrError(WARNING,
"musrSteppingAction: Mu+ has hit Wires in Moderator and wont stop 'wiggling'. Got stopped manually.",true);
}
}
// abort the event if it takes too long to finish (e.g. more than 60 seconds)
if ((time(0) - realTimeWhenThisEventStarted)>musrParameters::maximumTimePerEvent) {