#!/bin/bash # Task name #SBATCH -J test # Run time limit #SBATCH --time=4:00:00 # Working directory on shared storage #SBATCH -D /lustre/nyx/hpc/jdow # Standard and error output in different files #SBATCH -o %j_%N.out.log #SBATCH -e %j_%N.err.log # Execute application code hostname ; uptime ; sleep 30 ; uname -a #$ -wd /tmp #$ -j y # Number of subtasks to start #$ -t 1-10 XXXXX=$(printf "%05d" "$SGE_TASK_ID") # Specify input and output directories if [ ${Flag} = "0" ] ; then outdir=/lustre/nyx/cbm/users/jbendar/Sim_Outputs/Ring_Track_VS_Position/Misaligned/ elif [ ${Flag} = "1" ] ; then outdir=/lustre/nyx/cbm/users/jbendar/Sim_Outputs/Ring_Track_VS_Position/Aligned/ fi cbmroot_config_path=/lustre/nyx/cbm/users/jbendar/CBMINSTALL/bin/CbmRootConfig.sh macro_dir=/u/jbendar/CBMSRC/macro/rich/alignment/misalignment_correction/position/ # Needed to run macro via script export SCRIPT=yes # Number of events to run nevents=10 #nevents=1000 # Create needed directories mkdir -p ${outdir}/log # Create directory for output results mkdir -p ${outdir}/results/${XXXXX}/ # Setup the run environment source ${cbmroot_config_path} # This line is needed, otherwise root will crash export DISPLAY=localhost:0.0 # Define urqmd and output files export URQMD_FILE=/lustre/nyx/cbm/prod/gen/urqmd/auau/${coll_energy}/centr/urqmd.auau.${coll_energy}.centr.${XXXXX}.root export MC_FILE=${outdir}/mc.${Numb}.root export PAR_FILE=${outdir}/params.${Numb}.root export RECO_FILE=${outdir}/reco.${Numb}.root export ANALYSIS_FILE=${outdir}/analysis.${Numb}.root export RESULT_DIR=${outdir} #Simulation parameters #-------------------------------------------------- # number of embedded electrons export NOF_ELECTRONS=1 # number of embedded positrons export NOF_POSITRONS=1 # If "yes" then UrQMD will be used as background export URQMD=no # If "yes" PLUTO particles will be embedded export PLUTO=no #Collision energy: 25gev or 8gev -> set proper weight into analysis export ENERGY=${coll_energy} # Geometry setup macro #export GEO_SETUP_FILE=${setupMacro} # If "yes" DELTA electrons will be embedded #export DELTA=no #export DELTA_FILE=/lustre/cbm/user/ebelolap/aug11/sep12/${ENERGY}/${FIELDDIR}/deltasource/mc.delta.root # Create special and enter special workdir for job # username=$(whoami) # workdir=/tmp/$username/$JOB_ID.$SGE_TASK_ID # mkdir -p $workdir # cd $workdir # Run the root simulation root -b -l -q "${macro_dir}/run_sim_position.C(${nevents}, ${Flag})" root -b -l -q "${macro_dir}/run_reco_position.C(${nevents}, ${Flag})" #root -b -l -q "${macro_dir}/Compute_distance.C(${Numb}, ${Flag})" #cp -v ${SGE_STDOUT_PATH} ${outdir}/log/${JOB_ID}.${SGE_TASK_ID}.log export SCRIPT=no