264 lines
18 KiB
Plaintext
264 lines
18 KiB
Plaintext
#-----------------------------------------------------------------------
|
|
# 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 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 COLLIMATORS (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 GPDcollimator2 48 55 15 G4_Pb 0 0 -66 log_World norot dead 255
|
|
/musr/command construct box GPDcollimator2hole 2.5 4 15 G4_Galactic 0 0 0 log_GPDcollimator2 norot dead 256
|
|
/musr/command construct box FirstCollimator 45 75 15 G4_Pb 0 0 -250 log_World norot dead 261
|
|
/musr/command construct tubs FirstCollHole 0 8 15 0 360 G4_Galactic 0 0 0 log_FirstCollimator norot dead 262
|
|
/musr/command construct box SplitCollimator1 19 75 25 G4_Cu 23 0 -158 log_World norot dead 261
|
|
/musr/command construct box SplitCollimator2 19 75 25 G4_Cu -23 0 -158 log_World norot dead 261
|
|
###/musr/command construct box AlumPlate 30 90 5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -80 log_World norot musr/ScintSD 401
|
|
###/musr/command construct box AlumPlateHole 2 5 5 G4_Galactic 0 0 0 log_AlumPlate norot dead 267
|
|
/musr/command construct box Insert 20 20 10 G4_Pb 0 0 -91 log_World norot dead 265
|
|
/musr/command construct box InsertHole 2.5 4 10 G4_Galactic 0 0 0 log_Insert 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 tubs GPDsampleHolderD 37 37.5 50 136 88 G4_Al 0 0 0 log_World matrix1 dead 303
|
|
######/musr/command construct tubs GPDsampleHolderE 53.5 54 50 136 88 G4_Al 0 0 0 log_World matrix1 dead 304
|
|
##/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 0 360 G4_Cu 0 0 0 log_GPDsampleCell norot dead 201
|
|
#/musr/command construct tubs targetFieldVol 0 3 5 0 360 G4_Cu 0 0 0 log_GPDsampleCell norot dead 201
|
|
# --- SCINTILLATOR ---
|
|
/musr/command construct box ScintB1 21.5 50 2 G4_PLASTIC_SC_VINYLTOLUENE 26.5 0 -44 log_World norot musr/ScintSD 1
|
|
/musr/command construct box ScintB2 21.5 50 2 G4_PLASTIC_SC_VINYLTOLUENE -26.5 0 -44 log_World norot musr/ScintSD 2
|
|
/musr/command construct box ScintB4 2 50 11 G4_PLASTIC_SC_VINYLTOLUENE 44 0 -25 log_World norot musr/ScintSD 4
|
|
/musr/command construct box ScintB5 2 50 11 G4_PLASTIC_SC_VINYLTOLUENE -44 0 -25 log_World norot musr/ScintSD 5
|
|
/musr/command construct box ScintB6 2 50 13 G4_PLASTIC_SC_VINYLTOLUENE 44 0 0 log_World norot musr/ScintSD 6
|
|
/musr/command construct box ScintB7 2 50 13 G4_PLASTIC_SC_VINYLTOLUENE -44 0 0 log_World norot musr/ScintSD 7
|
|
/musr/command construct box ScintF1 20 50 2 G4_PLASTIC_SC_VINYLTOLUENE 28 0 44 log_World norot musr/ScintSD 11
|
|
/musr/command construct box ScintF2 20 50 2 G4_PLASTIC_SC_VINYLTOLUENE -28 0 44 log_World norot musr/ScintSD 12
|
|
/musr/command construct box ScintF3 7 50 2 G4_PLASTIC_SC_VINYLTOLUENE 0 0 44 log_World norot musr/ScintSD 13
|
|
/musr/command construct box ScintF4 2 50 11 G4_PLASTIC_SC_VINYLTOLUENE 44 0 25 log_World norot musr/ScintSD 14
|
|
/musr/command construct box ScintF5 2 50 11 G4_PLASTIC_SC_VINYLTOLUENE -44 0 25 log_World norot musr/ScintSD 15
|
|
#/musr/command construct box KoincB1 20 90 2 G4_PLASTIC_SC_VINYLTOLUENE 33 0 -60 log_World matrix2 musr/ScintSD 21
|
|
#/musr/command construct box KoincB2 20 90 2 G4_PLASTIC_SC_VINYLTOLUENE -33 0 -60 log_World matrix3 musr/ScintSD 22
|
|
|
|
|
|
# --- M0 ---
|
|
/musr/command construct box M0holder 3 4 1.0 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -20 log_World norot musr/ScintSD 103
|
|
/musr/command construct box M0 4 30 1.0 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -44 log_World norot musr/ScintSD 102
|
|
#/musr/command construct GPDmHolder GPDmHolder 5 25 1.0 G4_PLASTIC_SC_VINYLTOLUENE 0 -25 -43 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_beampipeA invisible
|
|
/musr/command visattributes log_beampipe invisible
|
|
/musr/command visattributes log_beampipeshell invisible
|
|
/musr/command visattributes log_beampipewindow invisible
|
|
/musr/command visattributes log_Magnet1 invisible
|
|
/musr/command visattributes log_Magnet2 invisible
|
|
/musr/command visattributes log_Uprof1 invisible
|
|
/musr/command visattributes log_Uprof2 invisible
|
|
/musr/command visattributes log_Uprof3 invisible
|
|
/musr/command visattributes log_Uprof4 invisible
|
|
/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.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 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 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 visFromToni.mac
|
|
#/control/execute visDawn101.mac
|
|
#/control/execute visDawn40123.mac
|
|
/control/execute visVRML.mac
|
|
###################################################################################
|
|
######################### 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 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
|
|
# 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/turtleZ0position -900 mm
|
|
#/gun/turtlefilename FOR070_GPD_beam_profile_45mm.dat
|
|
#/gun/turtleZ0position -500 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.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 16000000
|
|
/run/beamOn 1
|