diff --git a/BuildFile.xml b/BuildFile.xml
new file mode 100644
index 0000000..a586fa7
--- /dev/null
+++ b/BuildFile.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/FFcode/BuildFile.xml b/FFcode/BuildFile.xml
new file mode 100644
index 0000000..7ebb3c9
--- /dev/null
+++ b/FFcode/BuildFile.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/FFcode/bin/BuildFile.xml b/FFcode/bin/BuildFile.xml
new file mode 100644
index 0000000..8119b91
--- /dev/null
+++ b/FFcode/bin/BuildFile.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OSSScorrection_et.cc b/FFcode/bin/OSSScorrection_et.cc
similarity index 98%
rename from OSSScorrection_et.cc
rename to FFcode/bin/OSSScorrection_et.cc
index 1837296..1aac79a 100644
--- a/OSSScorrection_et.cc
+++ b/FFcode/bin/OSSScorrection_et.cc
@@ -1,5 +1,5 @@
#include
-#include "ApplyFF.h"
+#include "ComputeFF2018/FFcode/interface/ApplyFF.h"
#include
#include
#include
@@ -16,7 +16,7 @@
#include
#include "TLorentzVector.h"
#include "TString.h"
-#include "ScaleFactor.h"
+#include "ComputeFF2018/FFcode/interface/ScaleFactor.h"
#include "TLegend.h"
#include "TH1F.h"
#include "TKey.h"
@@ -24,14 +24,15 @@
#include "THStack.h"
#include "TPaveLabel.h"
#include "TFile.h"
-#include "myHelper.h"
-#include "et_Tree.h"
-#include "LumiReweightingStandAlone.h"
-#include "../TauAnalysisTools/TauTriggerSFs/interface/TauTriggerSFs2017.h"
+#include "ComputeFF2018/FFcode/interface/myHelper.h"
+#include "ComputeFF2018/FFcode/interface/et_Tree.h"
+#include "ComputeFF2018/FFcode/interface/LumiReweightingStandAlone.h"
+#include "TauAnalysisTools/TauTriggerSFs/interface/TauTriggerSFs2017.h"
#include "RooWorkspace.h"
#include "RooRealVar.h"
#include "RooFunctor.h"
-#include "SFtautrigger.h"
+#include "ComputeFF2018/FFcode/interface/SFtautrigger.h"
+#include "TauPOG/TauIDSFs/interface/TauIDSFTool.h"
using namespace std;
diff --git a/OSSScorrection_mt.cc b/FFcode/bin/OSSScorrection_mt.cc
similarity index 98%
rename from OSSScorrection_mt.cc
rename to FFcode/bin/OSSScorrection_mt.cc
index 2504302..6e1f447 100644
--- a/OSSScorrection_mt.cc
+++ b/FFcode/bin/OSSScorrection_mt.cc
@@ -1,5 +1,5 @@
#include
-#include "ApplyFF.h"
+#include "ComputeFF2018/FFcode/interface/ApplyFF.h"
#include
#include
#include
@@ -16,7 +16,7 @@
#include
#include "TLorentzVector.h"
#include "TString.h"
-#include "ScaleFactor.h"
+#include "ComputeFF2018/FFcode/interface/ScaleFactor.h"
#include "TLegend.h"
#include "TH1F.h"
#include "TKey.h"
@@ -24,14 +24,15 @@
#include "THStack.h"
#include "TPaveLabel.h"
#include "TFile.h"
-#include "myHelper.h"
-#include "mt_Tree.h"
-#include "LumiReweightingStandAlone.h"
-#include "../TauAnalysisTools/TauTriggerSFs/interface/TauTriggerSFs2017.h"
+#include "ComputeFF2018/FFcode/interface/myHelper.h"
+#include "ComputeFF2018/FFcode/interface/mt_Tree.h"
+#include "ComputeFF2018/FFcode/interface/LumiReweightingStandAlone.h"
+#include "TauAnalysisTools/TauTriggerSFs/interface/TauTriggerSFs2017.h"
#include "RooWorkspace.h"
#include "RooRealVar.h"
#include "RooFunctor.h"
-#include "SFtautrigger.h"
+#include "ComputeFF2018/FFcode/interface/SFtautrigger.h"
+#include "TauPOG/TauIDSFs/interface/TauIDSFTool.h"
using namespace std;
diff --git a/RawFF_et.cc b/FFcode/bin/RawFF_et.cc
similarity index 99%
rename from RawFF_et.cc
rename to FFcode/bin/RawFF_et.cc
index ad02a38..729333a 100644
--- a/RawFF_et.cc
+++ b/FFcode/bin/RawFF_et.cc
@@ -1,3 +1,4 @@
+
#include
#include
#include
@@ -15,7 +16,7 @@
#include
#include "TLorentzVector.h"
#include "TString.h"
-#include "ScaleFactor.h"
+#include "ComputeFF2018/FFcode/interface/ScaleFactor.h"
#include "TLegend.h"
#include "TH1F.h"
#include "TKey.h"
@@ -23,14 +24,15 @@
#include "THStack.h"
#include "TPaveLabel.h"
#include "TFile.h"
-#include "myHelper.h"
-#include "et_Tree.h"
-#include "LumiReweightingStandAlone.h"
-#include "../TauAnalysisTools/TauTriggerSFs/interface/TauTriggerSFs2017.h"
+#include "ComputeFF2018/FFcode/interface/myHelper.h"
+#include "ComputeFF2018/FFcode/interface/et_Tree.h"
+#include "ComputeFF2018/FFcode/interface/LumiReweightingStandAlone.h"
+#include "TauAnalysisTools/TauTriggerSFs/interface/TauTriggerSFs2017.h"
#include "RooWorkspace.h"
#include "RooRealVar.h"
#include "RooFunctor.h"
-#include "SFtautrigger.h"
+#include "ComputeFF2018/FFcode/interface/SFtautrigger.h"
+#include "TauPOG/TauIDSFs/interface/TauIDSFTool.h"
using namespace std;
diff --git a/RawFF_mt.cc b/FFcode/bin/RawFF_mt.cc
similarity index 98%
rename from RawFF_mt.cc
rename to FFcode/bin/RawFF_mt.cc
index 0f1847d..3936ae5 100644
--- a/RawFF_mt.cc
+++ b/FFcode/bin/RawFF_mt.cc
@@ -15,7 +15,7 @@
#include
#include "TLorentzVector.h"
#include "TString.h"
-#include "ScaleFactor.h"
+#include "ComputeFF2018/FFcode/interface/ScaleFactor.h"
#include "TLegend.h"
#include "TH1F.h"
#include "TKey.h"
@@ -23,14 +23,15 @@
#include "THStack.h"
#include "TPaveLabel.h"
#include "TFile.h"
-#include "myHelper.h"
-#include "mt_Tree.h"
-#include "LumiReweightingStandAlone.h"
-#include "../TauAnalysisTools/TauTriggerSFs/interface/TauTriggerSFs2017.h"
+#include "ComputeFF2018/FFcode/interface/myHelper.h"
+#include "ComputeFF2018/FFcode/interface/mt_Tree.h"
+#include "ComputeFF2018/FFcode/interface/LumiReweightingStandAlone.h"
+#include "TauAnalysisTools/TauTriggerSFs/interface/TauTriggerSFs2017.h"
#include "RooWorkspace.h"
#include "RooRealVar.h"
#include "RooFunctor.h"
-#include "SFtautrigger.h"
+#include "ComputeFF2018/FFcode/interface/SFtautrigger.h"
+#include "TauPOG/TauIDSFs/interface/TauIDSFTool.h"
using namespace std;
@@ -441,6 +442,11 @@ int main(int argc, char** argv) {
myScaleFactor_trgMu19->init_ScaleFactor("../LeptonEfficiencies/Muon/Run2016BtoH/Muon_Mu19leg_2016BtoH_eff.root");
if(year=="2016") myScaleFactor_IdIso->init_ScaleFactor("../LeptonEfficiencies/Muon/Run2016BtoH/Muon_IdIso_IsoLt0p15_2016BtoH_eff.root");
+ TauIDSFTool * theSFTool;
+ if (year == "2016") theSFTool = new TauIDSFTool("2016Legacy","DeepTau2017v2p1VSjet","Medium");
+ else if (year == "2017") theSFTool = new TauIDSFTool("2017ReReco","DeepTau2017v2p1VSjet","Medium");
+ else theSFTool = new TauIDSFTool("2018ReReco","DeepTau2017v2p1VSjet", "Medium");
+
Int_t nentries_wtn = (Int_t) arbre->GetEntries();
for (Int_t i = 0; i < nentries_wtn; i++) {
arbre->GetEntry(i);
@@ -635,9 +641,12 @@ int main(int argc, char** argv) {
float aweight=genweight*weight*LumiWeights_12->weight(npu);
if (sample=="embedded") aweight=genweight;
+ /*
if (year == "2018" && byMediumDeepVSjet_2 && sample!="embedded" && sample!="data_obs" && gen_match_2==5) aweight=aweight*0.86;
if (year == "2017" && byMediumDeepVSjet_2 && sample!="embedded" && sample!="data_obs" && gen_match_2==5) aweight=aweight*0.81;
if (year == "2016" && byMediumDeepVSjet_2 && sample!="embedded" && sample!="data_obs" && gen_match_2==5) aweight=aweight*0.90;
+ */
+ if(sample!="embedded" && sample != "data_obs" && gen_match_2 ==5) aweight = aweight*theSFTool->getSFvsPT(pt_2);
if (sample=="embedded") aweight=aweight*0.97;
//Muon rescaling tight
if (gen_match_2==2 or gen_match_2==4){
diff --git a/Set1_correction_et.cc b/FFcode/bin/Set1_correction_et.cc
similarity index 99%
rename from Set1_correction_et.cc
rename to FFcode/bin/Set1_correction_et.cc
index ef60aa7..0f9a4bb 100644
--- a/Set1_correction_et.cc
+++ b/FFcode/bin/Set1_correction_et.cc
@@ -1,5 +1,5 @@
#include
-#include "ApplyFF.h"
+#include "ComputeFF2018/FFcode/interface/ApplyFF.h"
#include
#include
#include
@@ -16,7 +16,7 @@
#include
#include "TLorentzVector.h"
#include "TString.h"
-#include "ScaleFactor.h"
+#include "ComputeFF2018/FFcode/interface/ScaleFactor.h"
#include "TLegend.h"
#include "TH1F.h"
#include "TKey.h"
@@ -24,14 +24,15 @@
#include "THStack.h"
#include "TPaveLabel.h"
#include "TFile.h"
-#include "myHelper.h"
-#include "et_Tree.h"
-#include "LumiReweightingStandAlone.h"
-#include "../TauAnalysisTools/TauTriggerSFs/interface/TauTriggerSFs2017.h"
+#include "ComputeFF2018/FFcode/interface/myHelper.h"
+#include "ComputeFF2018/FFcode/interface/et_Tree.h"
+#include "ComputeFF2018/FFcode/interface/LumiReweightingStandAlone.h"
+#include "TauAnalysisTools/TauTriggerSFs/interface/TauTriggerSFs2017.h"
#include "RooWorkspace.h"
#include "RooRealVar.h"
#include "RooFunctor.h"
-#include "SFtautrigger.h"
+#include "ComputeFF2018/FFcode/interface/SFtautrigger.h"
+#include "TauPOG/TauIDSFs/interface/TauIDSFTool.h"
using namespace std;
diff --git a/Set1_correction_mt.cc b/FFcode/bin/Set1_correction_mt.cc
similarity index 99%
rename from Set1_correction_mt.cc
rename to FFcode/bin/Set1_correction_mt.cc
index ce6d0ae..6fdac9d 100644
--- a/Set1_correction_mt.cc
+++ b/FFcode/bin/Set1_correction_mt.cc
@@ -1,5 +1,5 @@
#include
-#include "ApplyFF.h"
+#include "ComputeFF2018/FFcode/interface/ApplyFF.h"
#include
#include
#include
@@ -16,7 +16,7 @@
#include
#include "TLorentzVector.h"
#include "TString.h"
-#include "ScaleFactor.h"
+#include "ComputeFF2018/FFcode/interface/ScaleFactor.h"
#include "TLegend.h"
#include "TH1F.h"
#include "TKey.h"
@@ -24,14 +24,15 @@
#include "THStack.h"
#include "TPaveLabel.h"
#include "TFile.h"
-#include "myHelper.h"
-#include "mt_Tree.h"
-#include "LumiReweightingStandAlone.h"
-#include "../TauAnalysisTools/TauTriggerSFs/interface/TauTriggerSFs2017.h"
+#include "ComputeFF2018/FFcode/interface/myHelper.h"
+#include "ComputeFF2018/FFcode/interface/mt_Tree.h"
+#include "ComputeFF2018/FFcode/interface/LumiReweightingStandAlone.h"
+#include "TauAnalysisTools/TauTriggerSFs/interface/TauTriggerSFs2017.h"
#include "RooWorkspace.h"
#include "RooRealVar.h"
#include "RooFunctor.h"
-#include "SFtautrigger.h"
+#include "ComputeFF2018/FFcode/interface/SFtautrigger.h"
+#include "TauPOG/TauIDSFs/interface/TauIDSFTool.h"
using namespace std;
diff --git a/ApplyFF.h b/FFcode/interface/ApplyFF.h
similarity index 100%
rename from ApplyFF.h
rename to FFcode/interface/ApplyFF.h
diff --git a/LumiReweightingStandAlone.h b/FFcode/interface/LumiReweightingStandAlone.h
similarity index 100%
rename from LumiReweightingStandAlone.h
rename to FFcode/interface/LumiReweightingStandAlone.h
diff --git a/SFtautrigger.h b/FFcode/interface/SFtautrigger.h
similarity index 100%
rename from SFtautrigger.h
rename to FFcode/interface/SFtautrigger.h
diff --git a/ScaleFactor.h b/FFcode/interface/ScaleFactor.h
similarity index 100%
rename from ScaleFactor.h
rename to FFcode/interface/ScaleFactor.h
diff --git a/et_Tree.h b/FFcode/interface/et_Tree.h
similarity index 100%
rename from et_Tree.h
rename to FFcode/interface/et_Tree.h
diff --git a/mt_Tree.h b/FFcode/interface/mt_Tree.h
similarity index 100%
rename from mt_Tree.h
rename to FFcode/interface/mt_Tree.h
diff --git a/myHelper.h b/FFcode/interface/myHelper.h
similarity index 100%
rename from myHelper.h
rename to FFcode/interface/myHelper.h
diff --git a/FFcode/scripts/.#MakeFFs.py b/FFcode/scripts/.#MakeFFs.py
new file mode 120000
index 0000000..880ab36
--- /dev/null
+++ b/FFcode/scripts/.#MakeFFs.py
@@ -0,0 +1 @@
+aloelige@uwlogin.cern.ch.761256:1568553733
\ No newline at end of file
diff --git a/Draw_raw.py b/FFcode/scripts/Draw_raw.py
similarity index 100%
rename from Draw_raw.py
rename to FFcode/scripts/Draw_raw.py
diff --git a/Draw_raw_mt.py b/FFcode/scripts/Draw_raw_mt.py
old mode 100644
new mode 100755
similarity index 100%
rename from Draw_raw_mt.py
rename to FFcode/scripts/Draw_raw_mt.py
diff --git a/FFcode/scripts/MakeFFs.py b/FFcode/scripts/MakeFFs.py
new file mode 100644
index 0000000..e69de29
diff --git a/Subtract_prompt_et.py b/FFcode/scripts/Subtract_prompt_et.py
old mode 100644
new mode 100755
similarity index 99%
rename from Subtract_prompt_et.py
rename to FFcode/scripts/Subtract_prompt_et.py
index c111155..84669b1
--- a/Subtract_prompt_et.py
+++ b/FFcode/scripts/Subtract_prompt_et.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
import ROOT
import re
from array import array
diff --git a/Subtract_prompt_mt.py b/FFcode/scripts/Subtract_prompt_mt.py
old mode 100644
new mode 100755
similarity index 99%
rename from Subtract_prompt_mt.py
rename to FFcode/scripts/Subtract_prompt_mt.py
index f8b2306..b99dca3
--- a/Subtract_prompt_mt.py
+++ b/FFcode/scripts/Subtract_prompt_mt.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
import ROOT
import re
from array import array
diff --git a/do_FFOSSScorrection_mt.sh b/do_FFOSSScorrection_mt.sh
index 538f912..fd347b1 100644
--- a/do_FFOSSScorrection_mt.sh
+++ b/do_FFOSSScorrection_mt.sh
@@ -1,31 +1,31 @@
-./Andrew_Make.sh OSSScorrection_mt.cc
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DataA.root files_corrOSSSFF_mt/DataA.root data_obs data_obs 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DataB.root files_corrOSSSFF_mt/DataB.root data_obs data_obs 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DataC.root files_corrOSSSFF_mt/DataC.root data_obs data_obs 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DataD.root files_corrOSSSFF_mt/DataD.root data_obs data_obs 2018
+#!/usr/bin/env bash
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/DataA.root files_corrOSSSFF_mt/DataA.root data_obs data_obs 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/DataB.root files_corrOSSSFF_mt/DataB.root data_obs data_obs 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/DataC.root files_corrOSSSFF_mt/DataC.root data_obs data_obs 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/DataD.root files_corrOSSSFF_mt/DataD.root data_obs data_obs 2018
hadd -f files_corrOSSSFF_mt/Data.root files_corrOSSSFF_mt/DataA.root files_corrOSSSFF_mt/DataB.root files_corrOSSSFF_mt/DataC.root files_corrOSSSFF_mt/DataD.root
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DY.root files_corrOSSSFF_mt/DYincl.root DY DY 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DY1.root files_corrOSSSFF_mt/DY1.root DY DY 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DY2.root files_corrOSSSFF_mt/DY2.root DY DY 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DY3.root files_corrOSSSFF_mt/DY3.root DY DY 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DY4.root files_corrOSSSFF_mt/DY4.root DY DY 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/DY.root files_corrOSSSFF_mt/DYincl.root DY DY 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/DY1.root files_corrOSSSFF_mt/DY1.root DY DY 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/DY2.root files_corrOSSSFF_mt/DY2.root DY DY 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/DY3.root files_corrOSSSFF_mt/DY3.root DY DY 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/DY4.root files_corrOSSSFF_mt/DY4.root DY DY 2018
hadd -f files_corrOSSSFF_mt/DY.root files_corrOSSSFF_mt/DYincl.root files_corrOSSSFF_mt/DY1.root files_corrOSSSFF_mt/DY2.root files_corrOSSSFF_mt/DY3.root files_corrOSSSFF_mt/DY4.root
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/Wall.root files_corrOSSSFF_mt/W.root W W 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/Wall.root files_corrOSSSFF_mt/WMC.root W WMC 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/TTToHadronic.root files_corrOSSSFF_mt/TTToHadronic.root TTToHadronic TT 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/TTTo2L2Nu.root files_corrOSSSFF_mt/TTTo2L2Nu.root TTTo2L2Nu TT 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/TTToSemiLeptonic.root files_corrOSSSFF_mt/TTToSemiLeptonic.root TTToSemiLeptonic TT 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/Wall.root files_corrOSSSFF_mt/W.root W W 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/Wall.root files_corrOSSSFF_mt/WMC.root W WMC 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/TTToHadronic.root files_corrOSSSFF_mt/TTToHadronic.root TTToHadronic TT 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/TTTo2L2Nu.root files_corrOSSSFF_mt/TTTo2L2Nu.root TTTo2L2Nu TT 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/TTToSemiLeptonic.root files_corrOSSSFF_mt/TTToSemiLeptonic.root TTToSemiLeptonic TT 2018
hadd -f files_corrOSSSFF_mt/TT.root files_corrOSSSFF_mt/TTToHadronic.root files_corrOSSSFF_mt/TTTo2L2Nu.root files_corrOSSSFF_mt/TTToSemiLeptonic.root
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/WW.root files_corrOSSSFF_mt/WW.root WW VV 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/WZ.root files_corrOSSSFF_mt/WZ.root WZ VV 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/ZZ.root files_corrOSSSFF_mt/ZZ.root ZZ VV 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/ST_t_antitop.root files_corrOSSSFF_mt/ST_t_antitop.root ST_t_antitop ST 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/ST_t_top.root files_corrOSSSFF_mt/ST_t_top.root ST_t_top ST 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/ST_tW_antitop.root files_corrOSSSFF_mt/ST_tW_antitop.root ST_tW_antitop ST 2018
-./OSSScorrection_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/ST_tW_top.root files_corrOSSSFF_mt/ST_tW_top.root ST_tW_top ST 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/WW.root files_corrOSSSFF_mt/WW.root WW VV 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/WZ.root files_corrOSSSFF_mt/WZ.root WZ VV 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/ZZ.root files_corrOSSSFF_mt/ZZ.root ZZ VV 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/ST_t_antitop.root files_corrOSSSFF_mt/ST_t_antitop.root ST_t_antitop ST 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/ST_t_top.root files_corrOSSSFF_mt/ST_t_top.root ST_t_top ST 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/ST_tW_antitop.root files_corrOSSSFF_mt/ST_tW_antitop.root ST_tW_antitop ST 2018
+OSSScorrection_mt /data/ccaillol/smhmt2018_svfitted_30sep/ST_tW_top.root files_corrOSSSFF_mt/ST_tW_top.root ST_tW_top ST 2018
hadd -f files_corrOSSSFF_mt/VV.root files_corrOSSSFF_mt/WW.root files_corrOSSSFF_mt/WZ.root files_corrOSSSFF_mt/ZZ.root files_corrOSSSFF_mt/ST_t_antitop.root files_corrOSSSFF_mt/ST_t_top.root files_corrOSSSFF_mt/ST_tW_antitop.root files_corrOSSSFF_mt/ST_tW_top.root
-python Subtract_prompt_mt.py --directory files_corrOSSSFF_mt
+Subtract_prompt_mt.py --directory files_corrOSSSFF_mt
root -l -b -q 'Fit_FFOSSS_mt.cc(2018)'
hadd -f OSSScorr_mt.root files_corrOSSSFF_mt/Data.root files_corrOSSSFF_mt/DY.root files_corrOSSSFF_mt/W.root files_corrOSSSFF_mt/TT.root files_corrOSSSFF_mt/VV.root
diff --git a/do_FFmvisclosure_mt.sh b/do_FFmvisclosure_mt.sh
index f25359b..fbe252e 100644
--- a/do_FFmvisclosure_mt.sh
+++ b/do_FFmvisclosure_mt.sh
@@ -1,38 +1,38 @@
-./Andrew_Make.sh Set1_correction_mt.cc
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DataA.root files_corr1FF_mt/DataA.root data_obs data_obs 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DataB.root files_corr1FF_mt/DataB.root data_obs data_obs 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DataC.root files_corr1FF_mt/DataC.root data_obs data_obs 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DataD.root files_corr1FF_mt/DataD.root data_obs data_obs 2018
+#!/usr/bin/env bash
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/DataA.root files_corr1FF_mt/DataA.root data_obs data_obs 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/DataB.root files_corr1FF_mt/DataB.root data_obs data_obs 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/DataC.root files_corr1FF_mt/DataC.root data_obs data_obs 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/DataD.root files_corr1FF_mt/DataD.root data_obs data_obs 2018
hadd -f files_corr1FF_mt/Data.root files_corr1FF_mt/DataA.root files_corr1FF_mt/DataB.root files_corr1FF_mt/DataC.root files_corr1FF_mt/DataD.root
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DY.root files_corr1FF_mt/DYincl.root DY DY 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DY1.root files_corr1FF_mt/DY1.root DY DY 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DY2.root files_corr1FF_mt/DY2.root DY DY 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DY3.root files_corr1FF_mt/DY3.root DY DY 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DY4.root files_corr1FF_mt/DY4.root DY DY 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/DY.root files_corr1FF_mt/DYincl.root DY DY 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/DY1.root files_corr1FF_mt/DY1.root DY DY 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/DY2.root files_corr1FF_mt/DY2.root DY DY 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/DY3.root files_corr1FF_mt/DY3.root DY DY 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/DY4.root files_corr1FF_mt/DY4.root DY DY 2018
hadd -f files_corr1FF_mt/DY.root files_corr1FF_mt/DYincl.root files_corr1FF_mt/DY1.root files_corr1FF_mt/DY2.root files_corr1FF_mt/DY3.root files_corr1FF_mt/DY4.root
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/Wall.root files_corr1FF_mt/W.root W W 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/Wall.root files_corr1FF_mt/WMC.root W WMC 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/TTToHadronic.root files_corr1FF_mt/TTToHadronic.root TTToHadronic TT 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/TTTo2L2Nu.root files_corr1FF_mt/TTTo2L2Nu.root TTTo2L2Nu TT 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/TTToSemiLeptonic.root files_corr1FF_mt/TTToSemiLeptonic.root TTToSemiLeptonic TT 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/Wall.root files_corr1FF_mt/W.root W W 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/Wall.root files_corr1FF_mt/WMC.root W WMC 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/TTToHadronic.root files_corr1FF_mt/TTToHadronic.root TTToHadronic TT 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/TTTo2L2Nu.root files_corr1FF_mt/TTTo2L2Nu.root TTTo2L2Nu TT 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/TTToSemiLeptonic.root files_corr1FF_mt/TTToSemiLeptonic.root TTToSemiLeptonic TT 2018
hadd -f files_corr1FF_mt/TT.root files_corr1FF_mt/TTToHadronic.root files_corr1FF_mt/TTTo2L2Nu.root files_corr1FF_mt/TTToSemiLeptonic.root
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/TTToHadronic.root files_corr1FF_mt/TTToHadronicMC.root TTToHadronic TTMC 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/TTTo2L2Nu.root files_corr1FF_mt/TTTo2L2NuMC.root TTTo2L2Nu TTMC 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/TTToSemiLeptonic.root files_corr1FF_mt/TTToSemiLeptonicMC.root TTToSemiLeptonic TTMC 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/TTToHadronic.root files_corr1FF_mt/TTToHadronicMC.root TTToHadronic TTMC 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/TTTo2L2Nu.root files_corr1FF_mt/TTTo2L2NuMC.root TTTo2L2Nu TTMC 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/TTToSemiLeptonic.root files_corr1FF_mt/TTToSemiLeptonicMC.root TTToSemiLeptonic TTMC 2018
hadd -f files_corr1FF_mt/TTMC.root files_corr1FF_mt/TTToHadronicMC.root files_corr1FF_mt/TTTo2L2NuMC.root files_corr1FF_mt/TTToSemiLeptonicMC.root
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/WW.root files_corr1FF_mt/WW.root WW VV 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/WZ.root files_corr1FF_mt/WZ.root WZ VV 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/ZZ.root files_corr1FF_mt/ZZ.root ZZ VV 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/ST_t_antitop.root files_corr1FF_mt/ST_t_antitop.root ST_t_antitop ST 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/ST_t_top.root files_corr1FF_mt/ST_t_top.root ST_t_top ST 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/ST_tW_antitop.root files_corr1FF_mt/ST_tW_antitop.root ST_tW_antitop ST 2018
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/ST_tW_top.root files_corr1FF_mt/ST_tW_top.root ST_tW_top ST 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/WW.root files_corr1FF_mt/WW.root WW VV 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/WZ.root files_corr1FF_mt/WZ.root WZ VV 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/ZZ.root files_corr1FF_mt/ZZ.root ZZ VV 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/ST_t_antitop.root files_corr1FF_mt/ST_t_antitop.root ST_t_antitop ST 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/ST_t_top.root files_corr1FF_mt/ST_t_top.root ST_t_top ST 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/ST_tW_antitop.root files_corr1FF_mt/ST_tW_antitop.root ST_tW_antitop ST 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/ST_tW_top.root files_corr1FF_mt/ST_tW_top.root ST_tW_top ST 2018
hadd -f files_corr1FF_mt/VV.root files_corr1FF_mt/WW.root files_corr1FF_mt/WZ.root files_corr1FF_mt/ZZ.root files_corr1FF_mt/ST_t_antitop.root files_corr1FF_mt/ST_t_top.root files_corr1FF_mt/ST_tW_antitop.root files_corr1FF_mt/ST_tW_top.root
-python Subtract_prompt_mt.py --directory files_corr1FF_mt
+Subtract_prompt_mt.py --directory files_corr1FF_mt
root -l -b -q 'Fit_FFclosure_mt.cc(2018)'
# Prepare mT histograms, fit the ratio later with the OS/SS correction
-./Set1_correction_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/Wall.root files_corr1FF_mt/WMC2.root W WMC2 2018
+Set1_correction_mt /data/ccaillol/smhmt2018_svfitted_30sep/Wall.root files_corr1FF_mt/WMC2.root W WMC2 2018
hadd -f mvisclosure_mt.root files_corr1FF_mt/Data.root files_corr1FF_mt/DY.root files_corr1FF_mt/W.root files_corr1FF_mt/TT.root files_corr1FF_mt/VV.root
diff --git a/do_rawFF_mt.sh b/do_rawFF_mt.sh
index 257ce80..c7cb156 100644
--- a/do_rawFF_mt.sh
+++ b/do_rawFF_mt.sh
@@ -1,30 +1,30 @@
-./Andrew_Make.sh RawFF_mt.cc
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DataA.root files_rawFF_mt/DataA.root data_obs data_obs 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DataB.root files_rawFF_mt/DataB.root data_obs data_obs 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DataC.root files_rawFF_mt/DataC.root data_obs data_obs 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DataD.root files_rawFF_mt/DataD.root data_obs data_obs 2018
+#!/usr/bin/env bash
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/DataA.root files_rawFF_mt/DataA.root data_obs data_obs 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/DataB.root files_rawFF_mt/DataB.root data_obs data_obs 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/DataC.root files_rawFF_mt/DataC.root data_obs data_obs 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/DataD.root files_rawFF_mt/DataD.root data_obs data_obs 2018
hadd -f files_rawFF_mt/Data.root files_rawFF_mt/DataA.root files_rawFF_mt/DataB.root files_rawFF_mt/DataC.root files_rawFF_mt/DataD.root
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DY.root files_rawFF_mt/DYincl.root DY DY 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DY1.root files_rawFF_mt/DY1.root DY DY 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DY2.root files_rawFF_mt/DY2.root DY DY 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DY3.root files_rawFF_mt/DY3.root DY DY 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/DY4.root files_rawFF_mt/DY4.root DY DY 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/DY.root files_rawFF_mt/DYincl.root DY DY 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/DY1.root files_rawFF_mt/DY1.root DY DY 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/DY2.root files_rawFF_mt/DY2.root DY DY 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/DY3.root files_rawFF_mt/DY3.root DY DY 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/DY4.root files_rawFF_mt/DY4.root DY DY 2018
hadd -f files_rawFF_mt/DY.root files_rawFF_mt/DYincl.root files_rawFF_mt/DY1.root files_rawFF_mt/DY2.root files_rawFF_mt/DY3.root files_rawFF_mt/DY4.root
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/Wall.root files_rawFF_mt/W.root W W 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/TTToHadronic.root files_rawFF_mt/TTToHadronic.root TTToHadronic TT 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/TTTo2L2Nu.root files_rawFF_mt/TTTo2L2Nu.root TTTo2L2Nu TT 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/TTToSemiLeptonic.root files_rawFF_mt/TTToSemiLeptonic.root TTToSemiLeptonic TT 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/Wall.root files_rawFF_mt/W.root W W 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/TTToHadronic.root files_rawFF_mt/TTToHadronic.root TTToHadronic TT 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/TTTo2L2Nu.root files_rawFF_mt/TTTo2L2Nu.root TTTo2L2Nu TT 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/TTToSemiLeptonic.root files_rawFF_mt/TTToSemiLeptonic.root TTToSemiLeptonic TT 2018
hadd -f files_rawFF_mt/TT.root files_rawFF_mt/TTToHadronic.root files_rawFF_mt/TTTo2L2Nu.root files_rawFF_mt/TTToSemiLeptonic.root
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/WW.root files_rawFF_mt/WW.root WW VV 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/WZ.root files_rawFF_mt/WZ.root WZ VV 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/ZZ.root files_rawFF_mt/ZZ.root ZZ VV 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/ST_t_antitop.root files_rawFF_mt/ST_t_antitop.root ST_t_antitop ST 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/ST_t_top.root files_rawFF_mt/ST_t_top.root ST_t_top ST 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/ST_tW_antitop.root files_rawFF_mt/ST_tW_antitop.root ST_tW_antitop ST 2018
-./RawFF_mt.exe /data/ccaillol/smhmt2018_svfitted_30sep/ST_tW_top.root files_rawFF_mt/ST_tW_top.root ST_tW_top ST 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/WW.root files_rawFF_mt/WW.root WW VV 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/WZ.root files_rawFF_mt/WZ.root WZ VV 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/ZZ.root files_rawFF_mt/ZZ.root ZZ VV 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/ST_t_antitop.root files_rawFF_mt/ST_t_antitop.root ST_t_antitop ST 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/ST_t_top.root files_rawFF_mt/ST_t_top.root ST_t_top ST 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/ST_tW_antitop.root files_rawFF_mt/ST_tW_antitop.root ST_tW_antitop ST 2018
+RawFF_mt /data/ccaillol/smhmt2018_svfitted_30sep/ST_tW_top.root files_rawFF_mt/ST_tW_top.root ST_tW_top ST 2018
hadd -f files_rawFF_mt/VV.root files_rawFF_mt/WW.root files_rawFF_mt/WZ.root files_rawFF_mt/ZZ.root files_rawFF_mt/ST_t_antitop.root files_rawFF_mt/ST_t_top.root files_rawFF_mt/ST_tW_antitop.root files_rawFF_mt/ST_tW_top.root
-python Subtract_prompt_mt.py --directory files_rawFF_mt
+Subtract_prompt_mt.py --directory files_rawFF_mt
root -l -b -q 'Fit_FF_mt.cc(2018)'
hadd -f raw_FF_mt.root files_rawFF_mt/Data.root files_rawFF_mt/DY.root files_rawFF_mt/W.root files_rawFF_mt/TT.root files_rawFF_mt/VV.root
diff --git a/make_FF_mt.sh b/make_FF_mt.sh
index ae8ad0c..90feb3f 100644
--- a/make_FF_mt.sh
+++ b/make_FF_mt.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
mkdir -p plots_mt_2018
rm plots_mt_2018/*.pdf
@@ -15,9 +16,9 @@ sh do_FFmvisclosure_mt.sh
sh do_FFOSSScorrection_mt.sh
-python Draw_raw_mt.py --step raw --year 2018
-python Draw_raw_mt.py --step mvisclosure --year 2018
-python Draw_raw_mt.py --step osss --year 2018
+Draw_raw_mt.py --step raw --year 2018
+Draw_raw_mt.py --step mvisclosure --year 2018
+Draw_raw_mt.py --step osss --year 2018
mv *.pdf plots_mt_2018