diff --git a/Phys/B2KShh/job/run_selection.sh b/Phys/B2KShh/job/run_selection.sh new file mode 100644 index 0000000..8db53a6 --- /dev/null +++ b/Phys/B2KShh/job/run_selection.sh @@ -0,0 +1,7 @@ +#!/bin/bash +sel=$1 +for filename in /disk/users/elena/B2KShh/ntuples/jobs/*.root +do + echo "Running selection " ${sel} " on " $(basename "$filename") + python selection.py $(basename "$filename") ${sel} +done diff --git a/Phys/B2KShh/job/selection.py b/Phys/B2KShh/job/selection.py index 0ba90bf..8849665 100644 --- a/Phys/B2KShh/job/selection.py +++ b/Phys/B2KShh/job/selection.py @@ -45,7 +45,7 @@ os.system('cp %s %s' % (source_path + source, target_path + source)) outfilename = source.split('.')[0] + '_' + '_'.join(sel_names) + '.root' -outfile = r.TFile(outfilename, 'recreate') +outfile = r.TFile(target_path + outfilename, 'recreate') clones = [] if truth_tree: print 'Copying MCTruth tree...'