-
Notifications
You must be signed in to change notification settings - Fork 0
/
control_plots_ul_tauID.sh
executable file
·77 lines (64 loc) · 3.69 KB
/
control_plots_ul_tauID.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
source utils/setup_root.sh
export PYTHONPATH=$PYTHONPATH:$PWD/Dumbledraw
CHANNEL=$1
ERA=$2
NTUPLETAG=$3
TAG=$4
MODE=$5
# VARIABLES="pt_1,pt_2,eta_1,eta_2,m_vis,pzetamissvis,deltaR_ditaupair,phi_1,phi_2,mt_1,mt_2,pt_vis,iso_1,iso_2"
VARIABLES="m_vis,pt_2"
ulimit -s unlimited
source utils/setup_root.sh
source utils/setup_ul_samples.sh $NTUPLETAG $ERA
output_shapes="control_shapes-${ERA}-${CHANNEL}-${NTUPLETAG}-${TAG}"
CONDOR_OUTPUT=output/condor_shapes/${ERA}-${CHANNEL}-${NTUPLETAG}-${TAG}
shapes_output=output/${ERA}-${CHANNEL}-${NTUPLETAG}-${TAG}/${output_shapes}
shape_rootfile=${shapes_output}.root
# print the paths to be used
echo "KINGMAKER_BASEDIR: $KINGMAKER_BASEDIR"
echo "BASEDIR: ${BASEDIR}"
echo "output_shapes: ${output_shapes}"
if [[ $MODE == "XSEC" ]]; then
echo "##############################################################################################"
echo "# Checking xsec friends directory #"
echo "##############################################################################################"
echo "running xsec friends script"
echo "XSEC_FRIENDS: ${XSEC_FRIENDS}"
python3 friends/build_friend_tree.py --basepath $KINGMAKER_BASEDIR_XROOTD --outputpath root://cmsxrootd-kit-disk.gridka.de/$XSEC_FRIENDS --nthreads 20
fi
if [[ $MODE == "SHAPES" ]]; then
echo "##############################################################################################"
echo "# Producing shapes for ${CHANNEL}-${ERA}-${NTUPLETAG} #"
echo "##############################################################################################"
# if the output folder does not exist, create it
if [ ! -d "$shapes_output" ]; then
mkdir -p $shapes_output
fi
python shapes/produce_shapes.py --channels $CHANNEL \
--directory $NTUPLES \
--${CHANNEL}-friend-directory $XSEC_FRIENDS \
--era $ERA --num-processes 4 --num-threads 12 \
--optimization-level 1 --control-plots \
--control-plot-set ${VARIABLES} --skip-systematic-variations \
--output-file $shapes_output \
--xrootd --validation-tag $TAG \
--special-analysis "TauID"
echo "##############################################################################################"
echo "# Additional estimations #"
echo "##############################################################################################"
if [[ $CHANNEL == "mm" ]]; then
python shapes/do_estimations.py -e $ERA -i ${shapes_output}.root --do-qcd
else
python shapes/do_estimations.py -e $ERA -i ${shapes_output}.root --do-emb-tt --do-qcd
fi
fi
if [[ $MODE == "PLOT" ]]; then
echo "##############################################################################################"
echo "# plotting #"
echo "##############################################################################################"
# python3 plotting/plot_shapes_control.py -l --era Run${ERA} --input ${shapes_output}.root --variables ${VARIABLES} --channels ${CHANNEL} --embedding --fake-factor
python3 plotting/plot_shapes_control.py -l --era Run${ERA} --input ${shapes_output}.root --variables ${VARIABLES} --channels ${CHANNEL} --embedding
# python3 plotting/plot_shapes_control.py -l --era Run${ERA} --input ${shapes_output}.root --variables ${VARIABLES} --channels ${CHANNEL}
# python3 plotting/plot_shapes_control.py -l --era Run${ERA} --input ${shapes_output}.root --variables ${VARIABLES} --channels ${CHANNEL} --fake-factor
# python2 ~/tools/webgallery/gallery.py Run${ERA}_plots_emb_classic/
fi