Beam Sim Files » History » Version 73

« Previous - Version 73/91 (diff) - Next » - Current version
Brandon Soubasis, 09/08/2016 05:04 PM

Beam Sim Files

Set up the environment:

source /grid/fermiapp/products/common/etc/                                                                                  
source /grid/fermiapp/products/larsoft/setup
export GROUP=lariat
export JOBSUB_GROUP=lariat
export PRODUCTS=/grid/fermiapp/products/lariat/:${PRODUCTS}
setup jobsub_client
setup G4beamline v2_16 -q e6:prof:nu
setup git
setup jobsub_client

Move to your working directory (probably within your app area) and set up your beamline simulation working area:
git clone -b develop ssh://
cd lariatsoft/BeamlineSim/
sed -i "s/MYUSERNAME/$USER/g" jobdir_SurveyedGeom/*

Example: Generate 1k spills with 2ndary: pi+ 8 GeV, magnets @+50 Amps
Now make a new job directory from your template:
./ jobdir_SurveyedGeom -A 50.0 -E 08 --jobsize 1000 --jobcount 10 --spillsize 1000

You can first run 100 interactive events and check that the output is sensible:
g4bl jobdir_SurveyedGeom_10jobsof1k_64GeV_pos100Amps/ first=0 last=100

Make sure you have a directory in /pnfs/lariat/scratch/ for the grid job output files:
mkdir /pnfs/lariat/scratch/users/$USER
mkdir /pnfs/lariat/scratch/users/$USER/MCdata

Now run a number of grid jobs:
cd jobdir_SurveyedGeom_10jobsof1k_64GeV_pos100Amps
./ input $PWD

Keep an eye on your jobs:
jobsub_q --user=$USER

If they run within a few minutes then they probably failed. In that case use jobsub_fetchlog to get the logfiles and investigate.
jobsub_fetchlog -J YourJobID

Once jobs are complete merge all data files
hadd MergedAtStartLinesim_LAriaT_13degProdxn_10degAna_SurveyedGeom_10jobsof1k_64GeV_pos100AmpsAll.root  /pnfs/lariat/scratch/users/$USER/MCdata/MergedAtStartLinesim_LAriaT_13degProdxn_10degAna_SurveyedGeom_10jobsof1k_64GeV_pos100Amps*.root


jobsub_fetchlog and other commands useful for telling what's going on when something's not right: