Skip to content

Commit

Permalink
Proof of concept scrammable set-up
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Loeliger committed Oct 4, 2019
1 parent 2a83b4a commit f727bbd
Show file tree
Hide file tree
Showing 26 changed files with 155 additions and 115 deletions.
2 changes: 2 additions & 0 deletions BuildFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<use name ="root"/>
<use name = "python"/>
5 changes: 5 additions & 0 deletions FFcode/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<use name ="root"/>
<use name ="python"/>
<export>
<lib name="1"/>
</export>
14 changes: 14 additions & 0 deletions FFcode/bin/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<use name ="root"/>
<use name ="python"/>
<use name ="roofit"/>
<use name ="TauAnalysisTools/TauTriggerSFs"/>
<use name ="TauPOG/TauIDSFs"/>
<flags CXXFLAGS="-Wno-unused-variable -Wno-unused-but-set-variable"/>
<bin file="RawFF_mt.cc" name="RawFF_mt"/>
<bin file="RawFF_et.cc" name="RawFF_et"/>
<bin file="OSSScorrection_mt.cc" name="OSSScorrection_mt"/>
<bin file="OSSScorrection_et.cc" name="OSSScorrection_et"/>
<bin file="Set1_correction_mt.cc" name="Set1_correction_mt"/>
<bin file="Set1_correction_et.cc" name="Set1_correction_et"/>


15 changes: 8 additions & 7 deletions OSSScorrection_et.cc → FFcode/bin/OSSScorrection_et.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <TH2.h>
#include "ApplyFF.h"
#include "ComputeFF2018/FFcode/interface/ApplyFF.h"
#include <TStyle.h>
#include <TCanvas.h>
#include <TGraph.h>
Expand All @@ -16,22 +16,23 @@
#include <TRandom3.h>
#include "TLorentzVector.h"
#include "TString.h"
#include "ScaleFactor.h"
#include "ComputeFF2018/FFcode/interface/ScaleFactor.h"
#include "TLegend.h"
#include "TH1F.h"
#include "TKey.h"
#include "THashList.h"
#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;

Expand Down
15 changes: 8 additions & 7 deletions OSSScorrection_mt.cc → FFcode/bin/OSSScorrection_mt.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <TH2.h>
#include "ApplyFF.h"
#include "ComputeFF2018/FFcode/interface/ApplyFF.h"
#include <TStyle.h>
#include <TCanvas.h>
#include <TGraph.h>
Expand All @@ -16,22 +16,23 @@
#include <TRandom3.h>
#include "TLorentzVector.h"
#include "TString.h"
#include "ScaleFactor.h"
#include "ComputeFF2018/FFcode/interface/ScaleFactor.h"
#include "TLegend.h"
#include "TH1F.h"
#include "TKey.h"
#include "THashList.h"
#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;

Expand Down
14 changes: 8 additions & 6 deletions RawFF_et.cc → FFcode/bin/RawFF_et.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#include <TH2.h>
#include <TStyle.h>
#include <TCanvas.h>
Expand All @@ -15,22 +16,23 @@
#include <TRandom3.h>
#include "TLorentzVector.h"
#include "TString.h"
#include "ScaleFactor.h"
#include "ComputeFF2018/FFcode/interface/ScaleFactor.h"
#include "TLegend.h"
#include "TH1F.h"
#include "TKey.h"
#include "THashList.h"
#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;

Expand Down
21 changes: 15 additions & 6 deletions RawFF_mt.cc → FFcode/bin/RawFF_mt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,23 @@
#include <TRandom3.h>
#include "TLorentzVector.h"
#include "TString.h"
#include "ScaleFactor.h"
#include "ComputeFF2018/FFcode/interface/ScaleFactor.h"
#include "TLegend.h"
#include "TH1F.h"
#include "TKey.h"
#include "THashList.h"
#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;

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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){
Expand Down
15 changes: 8 additions & 7 deletions Set1_correction_et.cc → FFcode/bin/Set1_correction_et.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <TH2.h>
#include "ApplyFF.h"
#include "ComputeFF2018/FFcode/interface/ApplyFF.h"
#include <TStyle.h>
#include <TCanvas.h>
#include <TGraph.h>
Expand All @@ -16,22 +16,23 @@
#include <TRandom3.h>
#include "TLorentzVector.h"
#include "TString.h"
#include "ScaleFactor.h"
#include "ComputeFF2018/FFcode/interface/ScaleFactor.h"
#include "TLegend.h"
#include "TH1F.h"
#include "TKey.h"
#include "THashList.h"
#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;

Expand Down
15 changes: 8 additions & 7 deletions Set1_correction_mt.cc → FFcode/bin/Set1_correction_mt.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <TH2.h>
#include "ApplyFF.h"
#include "ComputeFF2018/FFcode/interface/ApplyFF.h"
#include <TStyle.h>
#include <TCanvas.h>
#include <TGraph.h>
Expand All @@ -16,22 +16,23 @@
#include <TRandom3.h>
#include "TLorentzVector.h"
#include "TString.h"
#include "ScaleFactor.h"
#include "ComputeFF2018/FFcode/interface/ScaleFactor.h"
#include "TLegend.h"
#include "TH1F.h"
#include "TKey.h"
#include "THashList.h"
#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;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions FFcode/scripts/.#MakeFFs.py
File renamed without changes.
File renamed without changes.
Empty file added FFcode/scripts/MakeFFs.py
Empty file.
1 change: 1 addition & 0 deletions Subtract_prompt_et.py → FFcode/scripts/Subtract_prompt_et.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
import ROOT
import re
from array import array
Expand Down
1 change: 1 addition & 0 deletions Subtract_prompt_mt.py → FFcode/scripts/Subtract_prompt_mt.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
import ROOT
import re
from array import array
Expand Down
46 changes: 23 additions & 23 deletions do_FFOSSScorrection_mt.sh
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit f727bbd

Please sign in to comment.