23.2.2010 Kamil Sedlak

Several things were added in this version:
  1) varibale save_time() has been added to the root output tree
  2) possibility to read in field maps, in which varibles x,y,z
     increase differently than previously expected
     (see the description of "variableIncreasingOrder" in the
      "3DEOpera" paragraph of the documentation).
  3) Added "3DEOpera" format of the fieldmap
  4) Added file G4EqEMFieldWithSpin.cc_for_Geant4.9.2p02_only  that
     should be used only in the Geant version 4.9.2p02 (there was
     a bug in this file, which is not present for any other version of Geant4) 
  5) Examples 101.mac and 102.mac added, but its description has not
     been completed yet in the musrSim.pdf.
This commit is contained in:
2010-02-23 13:24:53 +00:00
parent 2f8ac8f904
commit 701f17857f
13 changed files with 969 additions and 11 deletions

203
run/101.mac Normal file
View File

@ -0,0 +1,203 @@
#-----------------------------------------------------------------------
# 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 ##################
###################################################################################
# --- 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
###################################################################################
################## 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
### 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 #################################
###################################################################################
/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 10

195
run/102.mac Normal file
View File

@ -0,0 +1,195 @@
#-----------------------------------------------------------------------
# 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 ##################
###################################################################################
# --- 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
###################################################################################
################## 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
### 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 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

70
run/visDawn101.mac Normal file
View File

@ -0,0 +1,70 @@
# 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 190
#/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