All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OpticalLibraryBuildInfov4.sh
Go to the documentation of this file.
1 #!/bin/bash
2 #
3 # Author: bjpjones@fnal.gov from echurch@fnal.gov from dbox@fnal.gov
4 #
5 # Small subset of a script to run the optical library building job on the grid within larbatch infrastructure, modified by pkryczyn@fnal.gov
6 #
7 #
8 # To run this job:
9 #
10 # jobsub -X509_USER_PROXY /scratch/[user]/grid/[user].uboone.proxy -N [NoOfJobs] -q OpticalLibraryBuild_Grid.sh `whoami` `pwd`
11 #
12 # You will get outputs in the area specified by the "outstage" variable
13 # which is specified below.
14 #
15 # The form of the output is one file for each few voxels. These then need
16 # stitching together, which is done after all jobs are done, with a
17 # dedicated stitching script.
18 #
19 
20 umask 0002
21 verbose=T
22 
23 # Copy arguments into meaningful names.
24 
25 process=${PROCESS}
26 cluster=${CLUSTER}
27 
28 
29 
30 # Library building parameters
31 
32 # In each grid job, do this many voxels:
33 NVoxelsPerJob=512
34 
35 
36 # In each voxel, run this many photons:
37 NPhotonsPerVoxel=100000
38 
39 NTopVoxel=2560001
40 echo $FHICL_FILE_PATH "fhicl file path"
41 # This works out which voxels this job should focus on:
42 FirstVoxel=`echo "($NVoxelsPerJob * $PROCESS ) % $NTopVoxel" | bc`
43 LastVoxel=`echo "(($NVoxelsPerJob * $PROCESS ) + $NVoxelsPerJob - 1 ) % $NTopVoxel" | bc`
44 
45 
46 # And then tell the user about it:
47 echo "This job will run from voxel $FirstVoxel to $LastVoxel, generating $NPhotonsPerVoxel in each"
48 
49 echo "physics.producers.generator.FirstVoxel: $FirstVoxel" >> $FCL
50 echo "physics.producers.generator.LastVoxel: $LastVoxel" >> $FCL
51 echo "physics.producers.generator.N: $NPhotonsPerVoxel">> $FCL
52 echo "services.TFileService.fileName: \"${process}_hist.root\"" >> $FCL
53 
54 
55 
process_name cluster
Definition: cheaterreco.fcl:51
v let verbose