UMN CDMS Wiki archive
start › cdms › k100 › run_summary › run_68 › run_68_simulation

Basic Instructions for Simulation

The location of the directory Anthony has been running the simulations from is:

/home/phys/villaa/analysis/cdms_simulation/k100_ncapture_cal/condor

Often using a command like this to submit some jobs to Condor:

./condork100Sim_GenericShielding -n 10 -src PuBe -set ${COUNTER} -ngen 1000000 -template templates/Run66Shield_FluxScan0.mac.template -merge -sourcepos `./getPositionScan_HtoL.py --n 10 ${i}` -shieldsize 40.0 40.0 40.0 -shieldmat Poly -exe

Yikes. I need to explain everything here. One thing is that this is a command stolen from a larger script that iterates on the variable “i.” But really the first thing to talk about is the basic simulation setup that is described in the “template” macro file:

templates/Run66Shield_FluxScan0.mac.template

I'll look at that macro template in detail first, then explain how the script above really just fills out certain parts of that template and then starts a simulation job that runs the resulting macro (and saves the executed macro).

Template Macros

The template macro listed above has the following contents:

  1 #make a generic generator
  2 /gps/particle neutron
  3 #/gps/position 0.0 1197.31 -565.15 mm
  4 #updated position for in-barrel source
  5 #/gps/position 0.0 1197.31 -646.79 mm 
  6 /gps/position SOURCEPOSX SOURCEPOSY SOURCEPOSZ cm
  7 /gps/pos/type Point
  8 /gps/ang/type iso
  9 /gps/ene/type Arb
 10 /gps/hist/type arb
 11 /gps/hist/file sources/pube_skim.dat
 12 /gps/hist/inter Lin
 13 #/gps/ene/mono 8 MeV
 14 
 15 #make a raytrace model
 16 #/vis/rayTracer/eyePosition 1 1 1 m
 17 #/vis/rayTracer/trace
 18 
 19 
 20 /CDMS/detector/activate Floor
 21 /CDMS/detector/activate Frame
 22 /CDMS/detector/activate IceBox
 23 /CDMS/detector/activate PuBeSourceAndShield
 24 /CDMS/PuBe/Barrel True
 25 /CDMS/detector/activate Shields
 26 /CDMS/Shield/SouthNaI True
 27 /CDMS/updateGeometry
 28 
 29 #run naming stuff
 30 #/run/k100/uniqueID 160617_182500_365312119 # not implemented in the geant4 code
 31 /run/k100/OnlyNCapOut true
 32 /run/k100/OFPrefix /data/chocula/villaa/k100Sim_Data/DATADIR/Run66ShieldFluxScan0_RADSOURCE_THESETID_NEVHR_
 33 
 34 /run/beamOn NEVENTS
 

All the lines proceeded with a pound (#) are comments. Generally, everything written in all caps like this: RADSOURCE, is a tag that is meant to be filled in by a script or human with a string or a number.

Line 2 sets the particle source to be a neutron (setting up for Pu/Be). Line 6 defines the source position of the neutron source in global coordinates of the sim (WARNING the source is not constrained to be in the “barrel,” but rather if you desire it to be in the barrel you have to use the coordinates on Line 5; this is a little bit of an undesirable feature of the simulation, but it allows source scanning without moving the barrel all around).

Lines 7-12 define the Geant4 source type. Especially important is Line 11 which selects a file (that must be relative to the directory the simulation is run from) that specifies the energy distribution for the neutrons. This file is in the location:

/home/phys/villaa/analysis/cdms_simulation/k100_ncapture_cal/condor/sources/pube_skim.dat

Note that the simulation will automatically throw residual gammas from the source position. Is there a way to turn that off? I don't remember.

Lines 20-27 update the geometry of the simulation. In this case everything useful for Pu/Be running is turned on: Floor, Frame, Icebox, Pu/Be shielding (lead), Pu/Be shielding (barrel), standard cryostat shielding, and NaI detectors.

Line 31 restricts the output to only neutron captures. This should probably be left out or set to false for generic running where more than neutron captures are desired in the output. Line 32 gives the full path prefix of the output file.

Line 34 specifies how many primaries to throw.