-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathresolutionScaleFiller_submit.sh
More file actions
executable file
·28 lines (25 loc) · 1.16 KB
/
resolutionScaleFiller_submit.sh
File metadata and controls
executable file
·28 lines (25 loc) · 1.16 KB
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
#!/bin/bash
SAMPLEFILE=$1
OUTDIR="/eos/user/c/clange/HGCal/ScaleResolution/_new/"
PREFIX="root://eoscms.cern.ch//eos/cms/store/cmst3/group/hgcal/CMG_studies/Production/"
GUNTYPE="pt"
POSTFIX="NTUP"
REFNAME="genpart"
OBJNAMES="pfcluster megacluster"
QUEUE="8nh"
for SAMPLE in `cat $SAMPLEFILE`; do
SAMPLEDIR="${PREFIX}${SAMPLE}/${POSTFIX}/"
PARTICLE=`echo ${SAMPLE} | gawk 'match($0, /.*Single(.*)Pt.*/, arr) { print arr[1] }'`
PTVAL=`echo ${SAMPLE} | gawk -v part=".*Single${PARTICLE}Pt(.*)Eta.*" 'match($0, part, arr) { print arr[1] }'`
TAG=`echo ${SAMPLE} | gawk 'match($0, /.*Fall17DR-(.*)FEVT.*/, arr) { print arr[1] }'`
PID=0
if [ "$PARTICLE" == "Pi" ]; then
PID=211
elif [ "$PARTICLE" == "Gamma" ]; then
PID=22
fi;
for OBJNAME in $OBJNAMES; do
echo python resolutionScaleFiller_batchWrapper.py --inputdir ${SAMPLEDIR} --outdir ${OUTDIR} --gunType $GUNTYPE --pid $PID --genValue $PTVAL --tag $TAG --ref $REFNAME --obj $OBJNAME --queue $QUEUE
python resolutionScaleFiller_batchWrapper.py --inputdir ${SAMPLEDIR} --outdir ${OUTDIR} --gunType $GUNTYPE --pid $PID --genValue $PTVAL --tag $TAG --ref $REFNAME --obj $OBJNAME --queue $QUEUE
done
done