Skip to content

Commit

Permalink
Merge pull request #402 from danielwinterbottom/2022_ditau_UROPs
Browse files Browse the repository at this point in the history
2022 ditau uro ps
  • Loading branch information
danielwinterbottom authored Oct 12, 2023
2 parents 57beb37 + e08c4de commit f1e3451
Show file tree
Hide file tree
Showing 8 changed files with 334 additions and 172 deletions.
4 changes: 2 additions & 2 deletions Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@
top_samples = ['TTTo2L2Nu','TTto4Q','TTtoLNu2Q']
vv_samples = ['WW','WZ','ZZ',
'TBbarQ_t-channel_4FS','TbarBQ_t-channel_4FS',
'TWminusto2L2Nu','WminustoLNu2Q',
'TWminusto2L2Nu','TWminustoLNu2Q',
'TbarWplusto2L2Nu','TbarWplustoLNu2Q']

wjets_samples = ['WJetsToLNu-LO','W3JetsToLNu-LO','WJetsToLNu-4Jets_4J']
Expand All @@ -1603,7 +1603,7 @@
top_samples = ['TTTo2L2Nu','TTto4Q','TTtoLNu2Q']
vv_samples = ['WW','WZ','ZZ',
'TBbarQ_t-channel_4FS','TbarBQ_t-channel_4FS',
'TWminusto2L2Nu','WminustoLNu2Q',
'TWminusto2L2Nu','TWminustoLNu2Q',
'TbarWplusto2L2Nu','TbarWplustoLNu2Q']

wjets_samples = ['WJetsToLNu-LO','W1JetsToLNu-LO','W2JetsToLNu-LO','WtoLNu-4Jets_4J']
Expand Down
91 changes: 91 additions & 0 deletions Analysis/HiggsTauTauRun2/scripts/make_params_json_2022.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
input_xs=$1
input_evt=$2
lumi=$3

# Input xs file should have format: Sample_name xs
# Input evt file should have format: Sample_name evt

# set the inclusive sample names for DY and W - the event numbers and xs for the N jets samples will be set to the values for these samples
DY_inclusive_name_1="DYto2L-4Jets_MLL-50"
W_inclusive_name_1="WJetsToLNu-LO"

while read i; do
sample_name=$(echo $i | cut -d" " -f1)
xs=$(echo $i | cut -d" " -f2)
if [ "$sample_name" == "$DY_inclusive_name_1" ]; then
dy_xs=$xs
elif [ "$sample_name" == "$W_inclusive_name_1" ]; then
w_xs=$xs
fi
done < $input_xs
dy_evt=0
w_evt=0
while read i; do
sample_name=$(echo $i | cut -d" " -f1)
evt=$(echo $i | cut -d" " -f2)
if [ "$sample_name" == "$DY_inclusive_name_1" ]; then
dy_evt=$(bc -l <<<$dy_evt+$evt)
elif [ "$sample_name" == "$W_inclusive_name_1" ]; then
w_evt=$(bc -l <<<$w_evt+$evt)
fi
done < $input_evt

echo "{"

while read i; do
sample_name=$(echo $i | cut -d" " -f1)
xs=$(echo $i | cut -d" " -f2)
loop=1
if [[ "$sample_name" == "DYto2L-4Jets_MLL-50"* ]]; then
xs=$dy_xs
evt=$dy_evt
loop=0
elif [[ "$sample_name" == "W"*"JetsToLNu-LO"* || "$sample_name" == "WJetsToLNu-4Jets_4J"* || "$sample_name" == "WtoLNu-4Jets"* ]]; then
xs=$w_xs
evt=$w_evt
loop=0
fi
if [ $loop == 1 ]; then
while read j; do
sample_name_to_match=$(echo $j | cut -d" " -f1)
if [ "$sample_name" == "$sample_name_to_match" ]; then
evt=$(echo $j | cut -d" " -f2)
break
fi
done < $input_evt
fi
echo " \""$sample_name"\": {"
echo " \"xs\": "$xs","
echo " \"evt\": "$evt
echo " },"
done < $input_xs

while read i; do
sample_name=$(echo $i | cut -d" " -f1)
if [[ "$sample_name" == "SUSY"* ]]; then
evt=$(echo $i | cut -d" " -f2)
echo " \""$sample_name"\": {"
echo " \"xs\": 1.0,"
echo " \"evt\": "$evt
echo " },"
fi
done < $input_evt

echo " \"EGamma\": {"
echo " \"lumi\": "$lumi
echo " },"
echo " \"SingleMuon\": {"
echo " \"lumi\": "$lumi
echo " },"
echo " \"Muon\": {"
echo " \"lumi\": "$lumi
echo " },"
echo " \"Tau\": {"
echo " \"lumi\": "$lumi
echo " },"
echo " \"MuonEG\": {"
echo " \"lumi\": "$lumi
echo " }"

echo "}"

168 changes: 0 additions & 168 deletions Analysis/HiggsTauTauRun2/scripts/params_2022.json

This file was deleted.

106 changes: 106 additions & 0 deletions Analysis/HiggsTauTauRun2/scripts/params_2022_postEE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"DYJetsToLL-LO": {
"xs": 6282.6,
"evt": 96169405
},
"DYto2L-4Jets_MLL-50": {
"xs": 6282.6,
"evt": 146338963
},
"DYto2L-4Jets_MLL-50_1J": {
"xs": 6282.6,
"evt": 146338963
},
"DYto2L-4Jets_MLL-50_2J": {
"xs": 6282.6,
"evt": 146338963
},
"DYto2L-4Jets_MLL-50_3J": {
"xs": 6282.6,
"evt": 146338963
},
"DYto2L-4Jets_MLL-50_4J": {
"xs": 6282.6,
"evt": 146338963
},
"TBbarQ_t-channel_4FS": {
"xs": 123.8,
"evt": 9570294
},
"TTTo2L2Nu": {
"xs": 98.0,
"evt": 83932688
},
"TTto4Q": {
"xs": 419.8,
"evt": 180588634
},
"TTtoLNu2Q": {
"xs": 405.7,
"evt": 267352600
},
"TWminusto2L2Nu": {
"xs": 3.8,
"evt": 8326121
},
"TWminustoLNu2Q": {
"xs": 15.8,
"evt": 17031091
},
"TbarBQ_t-channel_4FS": {
"xs": 75.47,
"evt": 4818397
},
"TbarWplusto2L2Nu": {
"xs": 15.9,
"evt": 8548777
},
"TbarWplustoLNu2Q": {
"xs": 3.8,
"evt": 16722038
},
"W1JetsToLNu-LO": {
"xs": 63425.1,
"evt": 347877593
},
"W2JetsToLNu-LO": {
"xs": 63425.1,
"evt": 347877593
},
"WJetsToLNu-4Jets": {
"xs": 63425.1,
"evt": 347877593
},
"WJetsToLNu-LO": {
"xs": 63425.1,
"evt": 347877593
},
"WW": {
"xs": 122.3,
"evt": 53308983
},
"WZ": {
"xs": 41.1,
"evt": 27013017
},
"WtoLNu-4Jets_4J": {
"xs": 63425.1,
"evt": 347877593
},
"ZZ": {
"xs": 19.4,
"evt": 4096937
},
"EGamma": {
"lumi": 27007.2
},
"Muon": {
"lumi": 27007.2
},
"Tau": {
"lumi": 27007.2
},
"MuonEG": {
"lumi": 27007.2
}
}
Loading

0 comments on commit f1e3451

Please sign in to comment.