-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrun_composeEff_rooKeys.sh
executable file
·61 lines (50 loc) · 1.65 KB
/
run_composeEff_rooKeys.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
bin=${1}
indx=${2}
par=${3}
wid0=${4}
wid1=${5}
wid2=${6}
xbin=${7}
ybin=${8}
zbin=${9}
ndiv=${10}
totdiv=${11}
year=${12}
if [ "${USER}" == "fiorendi" ]; then
export HOME=/afs/cern.ch/work/f/fiorendi/private/effKDE/eff-KDE
export CMSSWDIR=/afs/cern.ch/work/f/fiorendi/private/effKDE/CMSSW_10_4_0/src
export SAMPLEDIR=/eos/cms/store/user/fiorendi/p5prime/effKDE/${year}/lmnr/
elif [ "${USER}" == "aboletti" ]; then
export HOME=/eos/user/a/aboletti/BdToKstarMuMu/eff-KDE-parSub
export CMSSWDIR=/eos/user/a/aboletti/BdToKstarMuMu/CMSSW_10_4_0/src
export SAMPLEDIR=/eos/user/a/aboletti/BdToKstarMuMu/datasets/PUweight
else
echo no user found
exit 1
fi
echo setting HOME to $HOME
echo setting CMSSWDIR to $CMSSWDIR
export WORKDIR=$PWD
cd $CMSSWDIR
source /cvmfs/cms.cern.ch/cmsset_default.sh
eval `scram runtime -sh`
cd $WORKDIR
echo 'now submitting for bin ' ${bin}
if [ ! -r $SAMPLEDIR/effDataset_b${bin}_${year}.root ]; then
echo $SAMPLEDIR/effDataset_b${bin}_${year}.root not found
exit 1
fi
if [ ! -r $HOME/composeEff_rooKeys_parSub.cc ]; then
echo $HOME/composeEff_rooKeys_parSub.cc not found
exit 1
fi
cp $SAMPLEDIR/effDataset_b${bin}_${year}.root .
cp $HOME/composeEff_rooKeys_parSub.cc .
echo 'root -l -q -b composeEff_rooKeys_parSub.cc($bin,$indx,$par,$wid0,$wid1,$wid2,$xbin,$ybin,$zbin,$ndiv,$totdiv,$year)'
root -l -q -b 'composeEff_rooKeys_parSub.cc('${bin}','${indx}','${par}','${wid0}','${wid1}','${wid2}','${xbin}','${ybin}','${zbin}','${ndiv}','${totdiv}','${year}')'
if [ ! -d $HOME/tmp ]; then mkdir $HOME/tmp; fi
cp KDEhist* $HOME/tmp/
rm composeEff_rooKeys_parSub.cc
rm effDataset_b*
rm KDEhist*