From a0b7a4f6bd44cd0f052cc38e3a5399a2b7ed344f Mon Sep 17 00:00:00 2001
From: "lvalery@ifae.es" <lvalery@at307.pic.es>
Date: Tue, 30 Aug 2016 09:55:01 +0200
Subject: [PATCH 1/3] Updating configuration files and script to launch the 2D
 BR plots

---
 macros/macros_stats/DumpSignificancePlot.py   |   2 +-
 .../macros_stats/LaunchTRExFitterOnBatch.py   |   2 +-
 .../PrepareConfigFilesFromTemplate.py         |  47 +-
 .../templates/TEMPLATE_Systematics.txt        |  10 +-
 .../TEMPLATE_configFileBlind__SIGNAL_.txt     |  42 +-
 .../TEMPLATE_configFile__SIGNAL_.txt          |  47 +-
 ...ATE_configFile__SIGNAL_Combination0L1L.txt | 508 ++++++++++++++++++
 ...onfigFile__SIGNAL_Combination0L1L_NoVR.txt | 345 ++++++++++++
 8 files changed, 936 insertions(+), 67 deletions(-)
 create mode 100644 macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_Combination0L1L.txt
 create mode 100644 macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_Combination0L1L_NoVR.txt

diff --git a/macros/macros_stats/DumpSignificancePlot.py b/macros/macros_stats/DumpSignificancePlot.py
index 9082dc6..f969e88 100644
--- a/macros/macros_stats/DumpSignificancePlot.py
+++ b/macros/macros_stats/DumpSignificancePlot.py
@@ -23,7 +23,7 @@ parser.add_option("-o","--outDir",help="output folder",dest="outDir",default="./
 parser.add_option("-s","--signal",help="signal sample",dest="signal",default="TTD")
 parser.add_option("-e","--energy",help="energy",dest="energy",default="13")
 parser.add_option("-a","--addText",help="additional text to plot",dest="addText",default="")
-parser.add_option("-l","--lumi",help="luminosity",dest="lumi",default="3.2")
+parser.add_option("-l","--lumi",help="luminosity",dest="lumi",default="13.2")
 parser.add_option("-d","--data",help="consider data",dest="data",action="store_true",default=False)
 parser.add_option
 
diff --git a/macros/macros_stats/LaunchTRExFitterOnBatch.py b/macros/macros_stats/LaunchTRExFitterOnBatch.py
index 3e2ea63..d57efde 100644
--- a/macros/macros_stats/LaunchTRExFitterOnBatch.py
+++ b/macros/macros_stats/LaunchTRExFitterOnBatch.py
@@ -12,7 +12,7 @@ from BatchTools import *
 def writeScriptsAndLaunchJobs( scriptTempName, configFile, instructions, LaunchJobs = True ):
     pathToCreate = ""
     scriptName = scriptTempName
-    
+
     for level in scriptName.split("/"):
         if(level==scriptName.split("/")[len(scriptName.split("/"))-1]): continue
         pathToCreate += level
diff --git a/macros/macros_stats/PrepareConfigFilesFromTemplate.py b/macros/macros_stats/PrepareConfigFilesFromTemplate.py
index 7573a8e..56a3dfa 100644
--- a/macros/macros_stats/PrepareConfigFilesFromTemplate.py
+++ b/macros/macros_stats/PrepareConfigFilesFromTemplate.py
@@ -42,19 +42,19 @@ here = os.getcwd()
 ##------------------------------------------------------
 ## Options
 ##------------------------------------------------------
-ARGUMENTS = []
+_ARGUMENTS_ = []
 #Job arguments
-ARGUMENTS += [{'arg':"__LUMIVALUE__",'value':"3209."}]
-ARGUMENTS += [{'arg':"__ADDITION__",'value':""}]
-ARGUMENTS += [{'arg':"__STATONLY__",'value':"FALSE"}]
+_ARGUMENTS_ += [{'arg':"__LUMIVALUE__",'value':"3209."}]
+_ARGUMENTS_ += [{'arg':"__ADDITION__",'value':""}]
+_ARGUMENTS_ += [{'arg':"__STATONLY__",'value':"FALSE"}]
 #Fit
-ARGUMENTS += [{'arg':"__FITTYPE__",'value':"BONLY"}]#BONLY, SPLUSB
-ARGUMENTS += [{'arg':"__FITREGION__",'value':"CRSR"}]#CRSR, CRONLY
-ARGUMENTS += [{'arg':"__FITPOIASIMOV__",'value':"0"}]
-ARGUMENTS += [{'arg':"__FITBLIND__",'value':"TRUE"}]
+_ARGUMENTS_ += [{'arg':"__FITTYPE__",'value':"BONLY"}]#BONLY, SPLUSB
+_ARGUMENTS_ += [{'arg':"__FITREGION__",'value':"CRSR"}]#CRSR, CRONLY
+_ARGUMENTS_ += [{'arg':"__FITPOIASIMOV__",'value':"0"}]
+_ARGUMENTS_ += [{'arg':"__FITBLIND__",'value':"TRUE"}]
 #Limit
-ARGUMENTS += [{'arg':"__LIMITBLIND__",'value':"TRUE"}]
-ARGUMENTS += [{'arg':"__LIMITPOIASIMOV__",'value':"0"}]
+_ARGUMENTS_ += [{'arg':"__LIMITBLIND__",'value':"TRUE"}]
+_ARGUMENTS_ += [{'arg':"__LIMITPOIASIMOV__",'value':"0"}]
 
 ##------------------------------------------------------
 ## Selects the arguments
@@ -82,9 +82,10 @@ for iArg in range(1,len(sys.argv)):
         elif  splitted[1].upper()=="FALSE": use4topsAsBack = False
     elif(argument=="DOALLBR"):
         if splitted[1].upper()=="TRUE": doAllBR = True
-        elif  splitted[1].upper()=="FALSE": doAllBR = False
+        elif splitted[1].upper()=="FALSE": doAllBR = False
+        else: printError("Error for DOALLBR")
     else:
-        for arg in ARGUMENTS:
+        for arg in _ARGUMENTS_:
             if arg['arg'] != "__"+argument+"__": continue
             if arg['arg'] == "__ADDITION__":
                 arg['value'] += "_" + splitted[1]
@@ -97,9 +98,9 @@ if(inputTemplateConfigFile==""):
     sys.exit()
 
 ##------------------------------------------------------
-## Options (that can only be filled aftewards ...) FIXME
+## Options (that can only be filled aftewards ...)
 ##------------------------------------------------------
-ARGUMENTS += [{'arg':"__HISTOPATH__",'value':inputDir}]
+_ARGUMENTS_ += [{'arg':"__HISTOPATH__",'value':inputDir}]
 
 ##------------------------------------------------------
 ## Creating the output folder
@@ -112,12 +113,9 @@ os.system( "mkdir -p " + outputFolder )
 Signals = []
 VLQ_masses = ["600","700","750","800","850","900","950","1000","1050","1100","1150","1200","1300","1400"]
 if doAllBR:
-    VLQ_masses = ["600","700","750","800","850","900","950","1000","1100","1200","1300"]
+    VLQ_masses = ["600","700","750","800","850","900","950","1000","1050","1100","1150","1200","1300"]
 
 for mass in VLQ_masses:
-    Signals += [getSampleUncertainties("VLQ_TT_" + mass + "_TDoublet","VLQ_TT_" + mass + "_TDoublet", CommonObjectSystematics , [])]
-    Signals += [getSampleUncertainties("VLQ_TT_" + mass + "_TSinglet","VLQ_TT_" + mass + "_TSinglet", CommonObjectSystematics , [])]
-    Signals += [getSampleUncertainties("VLQ_TT_" + mass + "_HtHt","VLQ_TT_" + mass + "_BR_0.00_0.00_1.00", CommonObjectSystematics , [])]
     if doAllBR:
         step_width = 0.05
         steps_n = int((1 + step_width)/step_width)
@@ -129,6 +127,10 @@ for mass in VLQ_masses:
                     coupling_Wb = iWb * step_width
                     if abs(coupling_Ht+coupling_Wb+coupling_Zt-1.)<0.001:
                         Signals += [getSampleUncertainties("VLQ_TT_" + mass + "_BR_%.2f_%.2f_%.2f" %(coupling_Wb,coupling_Zt,coupling_Ht),"VLQ_TT_" + mass + "_BR_%.2f_%.2f_%.2f" %(coupling_Wb,coupling_Zt,coupling_Ht), CommonObjectSystematics , [])]
+    else:
+        Signals += [getSampleUncertainties("VLQ_TT_" + mass + "_TDoublet","VLQ_TT_" + mass + "_TDoublet", CommonObjectSystematics , [])]
+        Signals += [getSampleUncertainties("VLQ_TT_" + mass + "_TSinglet","VLQ_TT_" + mass + "_TSinglet", CommonObjectSystematics , [])]
+        Signals += [getSampleUncertainties("VLQ_TT_" + mass + "_HtHt","VLQ_TT_" + mass + "_BR_0.00_0.00_1.00", CommonObjectSystematics , [])]
 
 for mass in ["1000","1200","1400","1600","1800"]:
     Signals += [getSampleUncertainties("UEDRPP_" + mass + ")","UEDRPP_" + mass, CommonObjectSystematics , [])]
@@ -140,9 +142,10 @@ Signals += [getSampleUncertainties("4tops","SM4tops", CommonObjectSystematics ,
 ##------------------------------------------------------
 for counter,sample in enumerate(Signals):
 
-    #Open the template file
+    #Sample characteristics
     SName = sample['name']
     SType = sample['sampleType']
+    TypeTemp = SType
 
     printGoodNews("-> Generating config file for " + SType)
 
@@ -164,12 +167,12 @@ for counter,sample in enumerate(Signals):
         f_adapted = open(outputFolder + "/" + template_file_name.replace("_SIGNAL_","AllSignals").replace("TEMPLATE_","").replace(".txt",addition+".txt"),mode)
 
     #Updating the config file with the user's configuration
-    if signalHandling=="ONE" or counter==0:
+    if (signalHandling=="ONE" or counter==0):
         for inputLine in f_template:
             corrected_line = inputLine
             if signalHandling=="ONE":
                 corrected_line = corrected_line.replace("_SIGNAL_",SName)
-            for arg in ARGUMENTS:
+            for arg in _ARGUMENTS_:
                 corrected_line = corrected_line.replace(arg['arg'],arg['value'])
             f_adapted.write(corrected_line)
 
@@ -199,7 +202,7 @@ for counter,sample in enumerate(Signals):
         f_adapted.write(" \n")
 
     f_adapted.write("Sample: \""+SName+"\"\n")
-    f_adapted.write("  Title: \""+SType+"\"\n")
+    f_adapted.write("  Title: \""+TypeTemp+"\"\n")
     f_adapted.write("  Type: \"signal\"\n")
     f_adapted.write("  NormFactor: \"SigXsecOverSM\","+SignalNormFactor+"\n")
     f_adapted.write("  FillColor: 2\n")
diff --git a/macros/macros_stats/templates/TEMPLATE_Systematics.txt b/macros/macros_stats/templates/TEMPLATE_Systematics.txt
index 44bd403..8a87eba 100644
--- a/macros/macros_stats/templates/TEMPLATE_Systematics.txt
+++ b/macros/macros_stats/templates/TEMPLATE_Systematics.txt
@@ -859,6 +859,7 @@ Systematic: "TTBARLIGHT_RAD"
   HistoNameSufUp: _weight_ttbar_RADHI
   HistoNameSufDown: _weight_ttbar_RADLOW
   Symmetrisation: "TwoSided"
+  Smoothing: 40
   Samples: ttbarlight
 
 Systematic: "TTBARBB_RAD"
@@ -868,6 +869,7 @@ Systematic: "TTBARBB_RAD"
   HistoNameSufUp: _weight_ttbar_RADHI
   HistoNameSufDown: _weight_ttbar_RADLOW
   Symmetrisation: "TwoSided"
+  Smoothing: 40
   Samples: ttbarbb
 
 Systematic: "TTBARCC_RAD"
@@ -877,6 +879,7 @@ Systematic: "TTBARCC_RAD"
   HistoNameSufUp: _weight_ttbar_RADHI
   HistoNameSufDown: _weight_ttbar_RADLOW
   Symmetrisation: "TwoSided"
+  Smoothing: 40
   Samples: ttbarcc
 
 Systematic: "TTBARLIGHT_GEN"
@@ -885,6 +888,7 @@ Systematic: "TTBARLIGHT_GEN"
   Category: "t#bar{t} uncertainties"
   HistoNameSufUp: "_weight_ttbar_GEN"
   Symmetrisation: "OneSided"
+  Smoothing: 40
   Samples: ttbarlight
 
 Systematic: "TTBARBB_GEN"
@@ -893,7 +897,7 @@ Systematic: "TTBARBB_GEN"
   Category: "t#bar{t} uncertainties"
   HistoNameSufUp: "_weight_ttbar_GEN"
   Symmetrisation: "OneSided"
-%  Smoothing: 40
+  Smoothing: 40
   Samples: ttbarbb
 
 Systematic: "TTBARCC_GEN"
@@ -902,6 +906,7 @@ Systematic: "TTBARCC_GEN"
   Category: "t#bar{t} uncertainties"
   HistoNameSufUp: "_weight_ttbar_GEN"
   Symmetrisation: "OneSided"
+  Smoothing: 40  
   Samples: ttbarcc
 
 Systematic: "TTBARLIGHT_PS"
@@ -910,6 +915,7 @@ Systematic: "TTBARLIGHT_PS"
   Category: "t#bar{t} uncertainties"
   HistoNameSufUp: "_weight_ttbar_PS"
   Symmetrisation: "OneSided"
+  Smoothing: 40
   Samples: ttbarlight
 
 Systematic: "TTBARBB_PS"
@@ -918,6 +924,7 @@ Systematic: "TTBARBB_PS"
   Category: "t#bar{t} uncertainties"
   HistoNameSufUp: "_weight_ttbar_PS"
   Symmetrisation: "OneSided"
+  Smoothing: 40
   Samples: ttbarbb
 
 Systematic: "TTBARCC_PS"
@@ -926,6 +933,7 @@ Systematic: "TTBARCC_PS"
   Category: "t#bar{t} uncertainties"
   HistoNameSufUp: "_weight_ttbar_PS"
   Symmetrisation: "OneSided"
+  Smoothing: 40
   Samples: ttbarcc
 
 Systematic: "NNLO_REWEIGHTING_OFF_TTLIGHT"
diff --git a/macros/macros_stats/templates/TEMPLATE_configFileBlind__SIGNAL_.txt b/macros/macros_stats/templates/TEMPLATE_configFileBlind__SIGNAL_.txt
index 4dfc0e2..ee884ad 100644
--- a/macros/macros_stats/templates/TEMPLATE_configFileBlind__SIGNAL_.txt
+++ b/macros/macros_stats/templates/TEMPLATE_configFileBlind__SIGNAL_.txt
@@ -43,13 +43,13 @@ POIAsimov: __LIMITPOIASIMOV__
 % --------- REGIONS -------- %
 % -------------------------- %
 
-Region: "c1l0RCTTMass5j2b_meff"
-Type: VALIDATION
-HistoName: "c1l0RCTTMass5j2b_meff"
-VariableTitle: "m_{eff} [GeV]"
-Binning: 400,500,600,700,800,900,1000,1200,1500
-Label: "0J, 5j, 2b"
-ShortLabel: "0J, 5j, 2b"
+%Region: "c1l0RCTTMass5j2b_meff"
+%Type: VALIDATION
+%HistoName: "c1l0RCTTMass5j2b_meff"
+%VariableTitle: "m_{eff} [GeV]"
+%Binning: 400,500,600,700,800,900,1000,1200,1500
+%Label: "0J, 5j, 2b"
+%ShortLabel: "0J, 5j, 2b"
 
 Region: "c1l0RCTTMass5j3b_meff"
 Type: VALIDATION
@@ -67,13 +67,13 @@ Binning: 400,500,600,700,800,900,1000
 Label: "0J, 5j, #geq4b"
 ShortLabel: "0J, 5j, #geq4b"
 
-Region: "c1l1RCTTMass5j2b_meff"
-Type: VALIDATION
-HistoName: "c1l1RCTTMass5j2b_meff"
-VariableTitle: "m_{eff} [GeV]"
-Binning: 700,800,900,1000,1200,1500
-Label: "1J, 5j, 2b"
-ShortLabel: "1J, 5j, 2b"
+%Region: "c1l1RCTTMass5j2b_meff"
+%Type: VALIDATION
+%HistoName: "c1l1RCTTMass5j2b_meff"
+%VariableTitle: "m_{eff} [GeV]"
+%Binning: 700,800,900,1000,1200,1500
+%Label: "1J, 5j, 2b"
+%ShortLabel: "1J, 5j, 2b"
 
 Region: "c1l1RCTTMass5j3b_meff"
 Type: VALIDATION
@@ -91,13 +91,13 @@ Binning: 700,800,900,1000
 Label: "1J, 5j, #geq4b"
 ShortLabel: "1J, 5j, #geq4b"
 
-Region: "c1l2RCTTMass5j2b_meff"
-Type: VALIDATION
-HistoName: "c1l2RCTTMass5j2b_meff"
-VariableTitle: "m_{eff} [GeV]"
-Binning: 0,1000,1500
-Label: "2J, 5j, 2b"
-ShortLabel: "2J, 5j, 2b"
+%Region: "c1l2RCTTMass5j2b_meff"
+%Type: VALIDATION
+%HistoName: "c1l2RCTTMass5j2b_meff"
+%VariableTitle: "m_{eff} [GeV]"
+%Binning: 0,1000,1500
+%Label: "2J, 5j, 2b"
+%ShortLabel: "2J, 5j, 2b"
 
 Region: "c1l2RCTTMass5j3b_meff"
 Type: VALIDATION
diff --git a/macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_.txt b/macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_.txt
index fc78692..0180a3b 100644
--- a/macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_.txt
+++ b/macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_.txt
@@ -43,13 +43,13 @@ Limit: "limit"
 % --------- REGIONS -------- %
 % -------------------------- %
 
-Region: "c1l0RCTTMass5j2b_meff"
-Type: VALIDATION
-HistoName: "c1l0RCTTMass5j2b_meff"
-VariableTitle: "m_{eff} [GeV]"
-Binning: 400,500,600,700,800,900,1000,1200,1400,1600,2000,2500,3000
-Label: "0J, 5j, 2b"
-ShortLabel: "0J, 5j, 2b"
+%Region: "c1l0RCTTMass5j2b_meff"
+%Type: VALIDATION
+%HistoName: "c1l0RCTTMass5j2b_meff"
+%VariableTitle: "m_{eff} [GeV]"
+%Binning: 400,500,600,700,800,900,1000,1200,1400,1600,2000,2500,3000
+%Label: "0J, 5j, 2b"
+%ShortLabel: "0J, 5j, 2b"
 
 Region: "c1l0RCTTMass5j3b_meff"
 Type: VALIDATION
@@ -67,13 +67,13 @@ Binning: 400,500,600,700,800,900,1000,1200,1400,1600,2000,2500,3000
 Label: "0J, 5j, #geq4b"
 ShortLabel: "0J, 5j, #geq4b"
 
-Region: "c1l1RCTTMass5j2b_meff"
-Type: VALIDATION
-HistoName: "c1l1RCTTMass5j2b_meff"
-VariableTitle: "m_{eff} [GeV]"
-Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
-Label: "1J, 5j, 2b"
-ShortLabel: "1J, 5j, 2b"
+%Region: "c1l1RCTTMass5j2b_meff"
+%Type: VALIDATION
+%HistoName: "c1l1RCTTMass5j2b_meff"
+%VariableTitle: "m_{eff} [GeV]"
+%Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+%Label: "1J, 5j, 2b"
+%ShortLabel: "1J, 5j, 2b"
 
 Region: "c1l1RCTTMass5j3b_meff"
 Type: VALIDATION
@@ -91,13 +91,13 @@ Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
 Label: "1J, 5j, #geq4b"
 ShortLabel: "1J, 5j, #geq4b"
 
-Region: "c1l2RCTTMass5j2b_meff"
-Type: VALIDATION
-HistoName: "c1l2RCTTMass5j2b_meff"
-VariableTitle: "m_{eff} [GeV]"
-Binning: 0,1000,1500,2000,3000
-Label: "2J, 5j, 2b"
-ShortLabel: "2J, 5j, 2b"
+%Region: "c1l2RCTTMass5j2b_meff"
+%Type: VALIDATION
+%HistoName: "c1l2RCTTMass5j2b_meff"
+%VariableTitle: "m_{eff} [GeV]"
+%Binning: 0,1000,1500,2000,3000
+%Label: "2J, 5j, 2b"
+%ShortLabel: "2J, 5j, 2b"
 
 Region: "c1l2RCTTMass5j3b_meff"
 Type: VALIDATION
@@ -183,6 +183,11 @@ ShortLabel: "2J, #geq6j, #geq4b"
 % --------  SAMPLES  -------- %
 % --------------------------- %
 
+Sample: "Data"
+Title: "Data"
+Type: data
+HistoFile: "Data"
+
 Sample: "ttbarlight"
 Title: "t#bar{t}+light"
 Type: background
diff --git a/macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_Combination0L1L.txt b/macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_Combination0L1L.txt
new file mode 100644
index 0000000..9d9c093
--- /dev/null
+++ b/macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_Combination0L1L.txt
@@ -0,0 +1,508 @@
+% -------------------------- %
+% -------    JOB     ------- %
+% -------------------------- %
+
+Job: "__FITTYPE_____SIGNAL_____ADDITION__"
+   Label: "Ht+X analysis"
+   CmeLabel: "13 TeV"
+   LumiLabel: "13.2 fb^{-1}"
+   Lumi: __LUMIVALUE__
+   POI: "SigXsecOverSM"
+   ReadFrom: HIST
+   HistoPath: "__HISTOPATH__"
+   DebugLevel: 0
+   SystControlPlots: FALSE
+   SystPruningShape: 0.01
+   SystPruningNorm: 0.01
+   CorrelationThreshold: 0.20
+   HistoChecks: NOCRASH
+   SplitHistoFiles: TRUE
+   MCstatThreshold: 0.05
+   StatOnly: __STATONLY__
+
+% -------------------------- %
+% -------    FIT     ------- %
+% -------------------------- %
+
+Fit: "__FITTYPE__"
+   FitType: __FITTYPE__
+   FitRegion: __FITREGION__
+   FitBlind: __FITBLIND__
+   POIAsimov: __FITPOIASIMOV__
+
+% --------------------------- %
+% ---------- LIMIT ---------- %
+% --------------------------- %
+
+Limit: "limit"
+  LimitType: ASYMPTOTIC
+  LimitBlind: __LIMITBLIND__
+  POIAsimov: __LIMITPOIASIMOV__
+
+% -------------------------- %
+% --------- REGIONS -------- %
+% -------------------------- %
+
+%Region: "c1l0RCTTMass5j2b_meff"
+%Type: VALIDATION
+%HistoName: "c1l0RCTTMass5j2b_meff"
+%VariableTitle: "m_{eff} [GeV]"
+%Binning: 400,500,600,700,800,900,1000,1200,1400,1600,2000,2500,3000
+%Label: "1l, 0J, 5j, 2b"
+%ShortLabel: "1l, 0J, 5j, 2b"
+%HistoPathSuff: 1lep/
+
+Region: "c1l0RCTTMass5j3b_meff"
+Type: VALIDATION
+HistoName: "c1l0RCTTMass5j3b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 400,500,600,700,800,900,1000,1200,1400,1600,2000,2500,3000
+Label: "1l, 0J, 5j, 3b"
+ShortLabel: "1l, 0J, 5j, 3b"
+HistoPathSuff: 1lep/
+
+Region: "c1l0RCTTMass5j4b_meff"
+Type: VALIDATION
+HistoName: "c1l0RCTTMass5j4b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 400,500,600,700,800,900,1000,1200,1400,1600,2000,2500,3000
+Label: "1l, 0J, 5j, #geq4b"
+ShortLabel: "1l, 0J, 5j, #geq4b"
+HistoPathSuff: 1lep/
+
+%Region: "c1l1RCTTMass5j2b_meff"
+%Type: VALIDATION
+%HistoName: "c1l1RCTTMass5j2b_meff"
+%VariableTitle: "m_{eff} [GeV]"
+%Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+%Label: "1l, 1J, 5j, 2b"
+%ShortLabel: "1l, 1J, 5j, 2b"
+%HistoPathSuff: 1lep/
+
+Region: "c1l1RCTTMass5j3b_meff"
+Type: VALIDATION
+HistoName: "c1l1RCTTMass5j3b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+Label: "1l, 1J, 5j, 3b"
+ShortLabel: "1l, 1J, 5j, 3b"
+HistoPathSuff: 1lep/
+
+Region: "c1l1RCTTMass5j4b_meff"
+Type: VALIDATION
+HistoName: "c1l1RCTTMass5j4b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+Label: "1l, 1J, 5j, #geq4b"
+ShortLabel: "1l, 1J, 5j, #geq4b"
+HistoPathSuff: 1lep/
+
+%Region: "c1l2RCTTMass5j2b_meff"
+%Type: VALIDATION
+%HistoName: "c1l2RCTTMass5j2b_meff"
+%VariableTitle: "m_{eff} [GeV]"
+%Binning: 0,1000,1500,2000,3000
+%Label: "1l, 2J, 5j, 2b"
+%ShortLabel: "1l, 2J, 5j, 2b"
+%HistoPathSuff: 1lep/
+
+Region: "c1l2RCTTMass5j3b_meff"
+Type: VALIDATION
+HistoName: "c1l2RCTTMass5j3b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 0,1000,1500,2000,3000
+Label: "1l, 2J, 5j, 3b"
+ShortLabel: "1l, 2J, 5j, 3b"
+HistoPathSuff: 1lep/
+
+Region: "c1l2RCTTMass5j4b_meff"
+Type: VALIDATION
+HistoName: "c1l2RCTTMass5j4b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 0,1000,1500,2000,3000
+Label: "1l, 2J, 5j, #geq4b"
+ShortLabel: "1l, 2J, 5j, #geq4b"
+HistoPathSuff: 1lep/
+
+Region: "c1l0RCTTMass6j3b_meff"
+Type: SIGNAL
+HistoName: "c1l0RCTTMass6j3b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 400,500,600,700,800,900,1000,1200,1400,1600,2000,2500,3000
+Label: "1l, 0J, #geq6j, 3b"
+ShortLabel: "1l, 0J, #geq6j, 3b"
+HistoPathSuff: 1lep/
+
+Region: "c1l0RCTTMass6j4b_meff"
+Type: SIGNAL
+HistoName: "c1l0RCTTMass6j4b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 400,500,600,700,800,900,1000,1200,1400,1600,2000,2500,3000
+Label: "1l, 0J, #geq6j, #geq4b"
+ShortLabel: "1l, 0J, #geq6j, #geq4b"
+HistoPathSuff: 1lep/
+
+Region: "c1l1RCTTMass6j3bLowMbb_meff"
+Type: SIGNAL
+HistoName: "c1l1RCTTMass6j3bLowMbb_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+Label: "1l, 1J, #geq6j, 3b, LM"
+ShortLabel: "1l, 1J, #geq6j, 3b, LM"
+HistoPathSuff: 1lep/
+
+Region: "c1l1RCTTMass6j4bLowMbb_meff"
+Type: SIGNAL
+HistoName: "c1l1RCTTMass6j4bLowMbb_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+Label: "1l, 1J, #geq6j, #geq4b, LM"
+ShortLabel: "1l, 1J, #geq6j, #geq4b, LM"
+HistoPathSuff: 1lep/
+
+Region: "c1l1RCTTMass6j3bHighMbb_meff"
+Type: SIGNAL
+HistoName: "c1l1RCTTMass6j3bHighMbb_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+Label: "1l, 1J, #geq6j, 3b, HM"
+ShortLabel: "1l, 1J, #geq6j, 3b, HM"
+HistoPathSuff: 1lep/
+
+Region: "c1l1RCTTMass6j4bHighMbb_meff"
+Type: SIGNAL
+HistoName: "c1l1RCTTMass6j4bHighMbb_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+Label: "1l, 1J, #geq6j, #geq4b, HM"
+ShortLabel: "1l, 1J, #geq6j, #geq4b, HM"
+HistoPathSuff: 1lep/
+
+Region: "c1l2RCTTMass6j3b_meff"
+Type: SIGNAL
+HistoName: "c1l2RCTTMass6j3b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 0,1000,1500,2000,3000
+Label: "1l, 2J, #geq6j, 3b"
+ShortLabel: "1l, 2J, #geq6j, 3b"
+HistoPathSuff: 1lep/
+
+Region: "c1l2RCTTMass6j4b_meff"
+Type: SIGNAL
+HistoName: "c1l2RCTTMass6j4b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 0,1000,1500,2000,3000
+Label: "1l, 2J, #geq6j, #geq4b"
+ShortLabel: "1l, 2J, #geq6j, #geq4b"
+HistoPathSuff: 1lep/
+
+Region: "c0l0RCTTMass6j2b_meff"
+   Type: VALIDATION
+   HistoName: "c0l0RCTTMass6j2b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,700,800,900,1000,1200,1400,1600,2000,3000
+   Label: "0l, 0H, 6j, 2b"
+   ShortLabel: "0l,0H, 6j, 2b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l0RCTTMass6j3b_meff"
+   Type: VALIDATION
+   HistoName: "c0l0RCTTMass6j3b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,700,800,900,1000,1200,1400,1600,2000,3000
+   Label: "0l,0H, 6j, 3b"
+   ShortLabel: "0l,0H, 6j, 3b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l0RCTTMass6j4b_meff"
+   Type: VALIDATION
+   HistoName: "c0l0RCTTMass6j4b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,700,800,900,1000,1200,1400,1600,3000
+   Label: "0l,0H, 6j, #geq4b"
+   ShortLabel: "0l,0H, 6j, #geq4b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l1RCTTMass6j2b_meff"
+   Type: VALIDATION
+   HistoName: "c0l1RCTTMass6j2b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,800,900,1000,1200,1400,1700,2100,3000
+   Label: "0l,1H, 6j, 2b"
+   ShortLabel: "0l,1H, 6j, 2b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l1RCTTMass6j3b_meff"
+   Type: VALIDATION
+   HistoName: "c0l1RCTTMass6j3b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,800,900,1000,1200,1400,1700,2100,2500,3000
+   Label: "0l,1H, 6j, 3b"
+   ShortLabel: "0l,1H, 6j, 3b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l1RCTTMass6j4b_meff"
+   Type: VALIDATION
+   HistoName: "c0l1RCTTMass6j4b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,800,900,1000,1200,1400,1700,2100,2500,3000
+   Label: "0l,1H, 6j, #geq4b"
+   ShortLabel: "0l,1H, 6j, #geq4b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l2RCTTMass6j2b_meff"
+   Type: VALIDATION
+   HistoName: "c0l2RCTTMass6j2b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1500,1800,2200,3000
+   Label: "0l,2H, 6j, 2b"
+   ShortLabel: "0l,2H, 6j, 2b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l2RCTTMass6j3b_meff"
+   Type: VALIDATION
+   HistoName: "c0l2RCTTMass6j3b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1500,2000,3000
+   Label: "0l,2H, 6j, 3b"
+   ShortLabel: "0l,2H, 6j, 3b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l2RCTTMass6j4b_meff"
+   Type: VALIDATION
+   HistoName: "c0l2RCTTMass6j4b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1500,1800,3000
+   Label: "0l,2H, 6j, #geq4b"
+   ShortLabel: "0l,2H, 6j, #geq4b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l0RCTTMass7j2b_meff"
+   Type: SIGNAL
+   HistoName: "c0l0RCTTMass7j2b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,700,800,900,1000,1200,1400,1600,2000,3000
+   Label: "0l, 0H, #geq7j, 2b"
+   ShortLabel: "0l,0H, #geq7j, 2b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l0RCTTMass7j3b_meff"
+   Type: SIGNAL
+   HistoName: "c0l0RCTTMass7j3b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,700,800,900,1000,1200,1400,1600,2000,3000
+   Label: "0l,0H, #geq7j, 3b"
+   ShortLabel: "0l,0H, #geq7j, 3b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l0RCTTMass7j4b_meff"
+   Type: SIGNAL
+   HistoName: "c0l0RCTTMass7j4b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,700,800,900,1000,1200,1400,1600,3000
+   Label: "0l,0H, #geq7j, #geq4b"
+   ShortLabel: "0l,0H, #geq7j, #geq4b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l1RCTTMass7j2b_meff"
+   Type: SIGNAL
+   HistoName: "c0l1RCTTMass7j2b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,800,900,1000,1200,1400,1700,2100,3000
+   Label: "0l,1H, #geq7j, 2b"
+   ShortLabel: "0l,1H, #geq7j, 2b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l1RCTTMass7j3bLowMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l1RCTTMass7j3bLowMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1000,1200,1400,1700,2100,3000
+   Label: "0l,1H, #geq7j, 3b, LM"
+   ShortLabel: "0l,1H, #geq7j, 3b, LM"
+   HistoPathSuff: 0lep/
+
+Region: "c0l1RCTTMass7j4bLowMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l1RCTTMass7j4bLowMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1000,1200,1400,1700,3000
+   Label: "0l,1H, #geq7j, #geq4b, LM"
+   ShortLabel: "0l,1H, #geq7j, #geq4b, LM"
+   HistoPathSuff: 0lep/
+
+Region: "c0l1RCTTMass7j3bHighMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l1RCTTMass7j3bHighMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1000,1200,1400,1700,3000
+   Label: "0l,1H, #geq7j, 3b, HM"
+   ShortLabel: "0l,1H, #geq7j, 3b, HM"
+   HistoPathSuff: 0lep/
+
+Region: "c0l1RCTTMass7j4bHighMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l1RCTTMass7j4bHighMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1000,1200,1400,3000
+   Label: "0l,1H, #geq7j, #geq4b, HM"
+   ShortLabel: "0l,1H, #geq7j, #geq4b, HM"
+   HistoPathSuff: 0lep/
+
+Region: "c0l2RCTTMass7j2b_meff"
+   Type: SIGNAL
+   HistoName: "c0l2RCTTMass7j2b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1500,1800,2200,3000
+   Label: "0l,2H, #geq7j, 2b"
+   ShortLabel: "0l,2H, #geq7j, 2b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l2RCTTMass7j3bLowMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l2RCTTMass7j3bLowMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1500,2000,3000
+   Label: "0l,2H, #geq7j, 3b, LM"
+   ShortLabel: "0l,2H, #geq7j, 3b, LM"
+   HistoPathSuff: 0lep/
+
+Region: "c0l2RCTTMass7j3bHighMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l2RCTTMass7j3bHighMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1500,3000
+   Label: "0l,2H, #geq7j, 3b, HM"
+   ShortLabel: "0l,2H, #geq7j, 3b, HM"
+   HistoPathSuff: 0lep/
+
+Region: "c0l2RCTTMass7j4b_meff"
+   Type: SIGNAL
+   HistoName: "c0l2RCTTMass7j4b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1500,1800,3000
+   Label: "0l,2H, #geq7j, #geq4b"
+   ShortLabel: "0l,2H, #geq7j, #geq4b"
+   HistoPathSuff: 0lep/
+
+
+% --------------------------- %
+% --------  SAMPLES  -------- %
+% --------------------------- %
+
+Sample: "Data"
+Title: "Data"
+Type: data
+HistoFile: "Data"
+
+Sample: "ttbarlight"
+Title: "t#bar{t}+light"
+Type: background
+FillColor: 0
+LineColor: 1
+HistoFile: "ttbarlight"
+
+Sample: "ttbarcc"
+Title: "t#bar{t}+cc"
+Type: background
+FillColor: 590
+LineColor: 1
+HistoFile: "ttbarcc"
+
+Sample: "ttbarbb"
+Title: "t#bar{t}+bb"
+Type: background
+FillColor: 594
+LineColor: 1
+NormFactor: "ttbbNorm,1,-10,10"
+HistoFile: "ttbarbb"
+
+Sample: "topEW"
+Title: "topEW"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "topEW"
+Group: "Non-t#bar{t}"
+
+Sample: "ttH"
+Title: "ttH"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "ttH"
+Group: "Non-t#bar{t}"
+
+Sample: "Wjetslight"
+Title: "W+jetslight"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Wjets22light"
+Group: "Non-t#bar{t}"
+
+Sample: "Wjetscharm"
+Title: "W+jetscharm"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Wjets22charm"
+Group: "Non-t#bar{t}"
+
+Sample: "Wjetsbeauty"
+Title: "W+jetsbeauty"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Wjets22beauty"
+Group: "Non-t#bar{t}"
+
+Sample: "Zjetslight"
+Title: "Z+jetslight"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Zjets22light"
+Group: "Non-t#bar{t}"
+
+Sample: "Zjetscharm"
+Title: "Z+jetscharm"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Zjets22charm"
+Group: "Non-t#bar{t}"
+
+Sample: "Zjetsbeauty"
+Title: "Z+jetsbeauty"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Zjets22beauty"
+Group: "Non-t#bar{t}"
+
+Sample: "Singletop"
+Title: "Single-top"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Singletop"
+Group: "Non-t#bar{t}"
+
+Sample: "Dibosons"
+Title: "Dibosons"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Dibosons"
+Group: "Non-t#bar{t}"
+
+Sample: "QCD"
+Title: "QCD"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "QCD"
+Group: "Non-t#bar{t}"
+NormalizedByTheory: FALSE
+Regions: c1l*
diff --git a/macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_Combination0L1L_NoVR.txt b/macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_Combination0L1L_NoVR.txt
new file mode 100644
index 0000000..f990c7b
--- /dev/null
+++ b/macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_Combination0L1L_NoVR.txt
@@ -0,0 +1,345 @@
+% -------------------------- %
+% -------    JOB     ------- %
+% -------------------------- %
+
+Job: "__FITTYPE_____SIGNAL_____ADDITION__"
+   Label: "Ht+X analysis"
+   CmeLabel: "13 TeV"
+   LumiLabel: "13.2 fb^{-1}"
+   Lumi: __LUMIVALUE__
+   POI: "SigXsecOverSM"
+   ReadFrom: HIST
+   HistoPath: "__HISTOPATH__"
+   DebugLevel: 0
+   SystControlPlots: FALSE
+   SystPruningShape: 0.01
+   SystPruningNorm: 0.01
+   CorrelationThreshold: 0.20
+   HistoChecks: NOCRASH
+   SplitHistoFiles: TRUE
+   MCstatThreshold: 0.05
+   StatOnly: __STATONLY__
+
+% -------------------------- %
+% -------    FIT     ------- %
+% -------------------------- %
+
+Fit: "__FITTYPE__"
+   FitType: __FITTYPE__
+   FitRegion: __FITREGION__
+   FitBlind: __FITBLIND__
+   POIAsimov: __FITPOIASIMOV__
+
+% --------------------------- %
+% ---------- LIMIT ---------- %
+% --------------------------- %
+
+Limit: "limit"
+  LimitType: ASYMPTOTIC
+  LimitBlind: __LIMITBLIND__
+  POIAsimov: __LIMITPOIASIMOV__
+
+% -------------------------- %
+% --------- REGIONS -------- %
+% -------------------------- %
+
+Region: "c1l0RCTTMass6j3b_meff"
+Type: SIGNAL
+HistoName: "c1l0RCTTMass6j3b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 400,500,600,700,800,900,1000,1200,1400,1600,2000,2500,3000
+Label: "1l, 0J, #geq6j, 3b"
+ShortLabel: "1l, 0J, #geq6j, 3b"
+HistoPathSuff: 1lep/
+
+Region: "c1l0RCTTMass6j4b_meff"
+Type: SIGNAL
+HistoName: "c1l0RCTTMass6j4b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 400,500,600,700,800,900,1000,1200,1400,1600,2000,2500,3000
+Label: "1l, 0J, #geq6j, #geq4b"
+ShortLabel: "1l, 0J, #geq6j, #geq4b"
+HistoPathSuff: 1lep/
+
+Region: "c1l1RCTTMass6j3bLowMbb_meff"
+Type: SIGNAL
+HistoName: "c1l1RCTTMass6j3bLowMbb_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+Label: "1l, 1J, #geq6j, 3b, LM"
+ShortLabel: "1l, 1J, #geq6j, 3b, LM"
+HistoPathSuff: 1lep/
+
+Region: "c1l1RCTTMass6j4bLowMbb_meff"
+Type: SIGNAL
+HistoName: "c1l1RCTTMass6j4bLowMbb_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+Label: "1l, 1J, #geq6j, #geq4b, LM"
+ShortLabel: "1l, 1J, #geq6j, #geq4b, LM"
+HistoPathSuff: 1lep/
+
+Region: "c1l1RCTTMass6j3bHighMbb_meff"
+Type: SIGNAL
+HistoName: "c1l1RCTTMass6j3bHighMbb_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+Label: "1l, 1J, #geq6j, 3b, HM"
+ShortLabel: "1l, 1J, #geq6j, 3b, HM"
+HistoPathSuff: 1lep/
+
+Region: "c1l1RCTTMass6j4bHighMbb_meff"
+Type: SIGNAL
+HistoName: "c1l1RCTTMass6j4bHighMbb_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+Label: "1l, 1J, #geq6j, #geq4b, HM"
+ShortLabel: "1l, 1J, #geq6j, #geq4b, HM"
+HistoPathSuff: 1lep/
+
+Region: "c1l2RCTTMass6j3b_meff"
+Type: SIGNAL
+HistoName: "c1l2RCTTMass6j3b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 0,1000,1500,2000,3000
+Label: "1l, 2J, #geq6j, 3b"
+ShortLabel: "1l, 2J, #geq6j, 3b"
+HistoPathSuff: 1lep/
+
+Region: "c1l2RCTTMass6j4b_meff"
+Type: SIGNAL
+HistoName: "c1l2RCTTMass6j4b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 0,1000,1500,2000,3000
+Label: "1l, 2J, #geq6j, #geq4b"
+ShortLabel: "1l, 2J, #geq6j, #geq4b"
+HistoPathSuff: 1lep/
+
+Region: "c0l0RCTTMass7j2b_meff"
+   Type: SIGNAL
+   HistoName: "c0l0RCTTMass7j2b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,700,800,900,1000,1200,1400,1600,2000,3000
+   Label: "0l, 0H, #geq7j, 2b"
+   ShortLabel: "0l,0H, #geq7j, 2b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l0RCTTMass7j3b_meff"
+   Type: SIGNAL
+   HistoName: "c0l0RCTTMass7j3b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,700,800,900,1000,1200,1400,1600,2000,3000
+   Label: "0l,0H, #geq7j, 3b"
+   ShortLabel: "0l,0H, #geq7j, 3b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l0RCTTMass7j4b_meff"
+   Type: SIGNAL
+   HistoName: "c0l0RCTTMass7j4b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,700,800,900,1000,1200,1400,1600,3000
+   Label: "0l,0H, #geq7j, #geq4b"
+   ShortLabel: "0l,0H, #geq7j, #geq4b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l1RCTTMass7j2b_meff"
+   Type: SIGNAL
+   HistoName: "c0l1RCTTMass7j2b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,800,900,1000,1200,1400,1700,2100,3000
+   Label: "0l,1H, #geq7j, 2b"
+   ShortLabel: "0l,1H, #geq7j, 2b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l1RCTTMass7j3bLowMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l1RCTTMass7j3bLowMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1000,1200,1400,1700,2100,3000
+   Label: "0l,1H, #geq7j, 3b, LM"
+   ShortLabel: "0l,1H, #geq7j, 3b, LM"
+   HistoPathSuff: 0lep/
+
+Region: "c0l1RCTTMass7j4bLowMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l1RCTTMass7j4bLowMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1000,1200,1400,1700,3000
+   Label: "0l,1H, #geq7j, #geq4b, LM"
+   ShortLabel: "0l,1H, #geq7j, #geq4b, LM"
+   HistoPathSuff: 0lep/
+
+Region: "c0l1RCTTMass7j3bHighMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l1RCTTMass7j3bHighMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1000,1200,1400,1700,3000
+   Label: "0l,1H, #geq7j, 3b, HM"
+   ShortLabel: "0l,1H, #geq7j, 3b, HM"
+   HistoPathSuff: 0lep/
+
+Region: "c0l1RCTTMass7j4bHighMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l1RCTTMass7j4bHighMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1000,1200,1400,3000
+   Label: "0l,1H, #geq7j, #geq4b, HM"
+   ShortLabel: "0l,1H, #geq7j, #geq4b, HM"
+   HistoPathSuff: 0lep/
+
+Region: "c0l2RCTTMass7j2b_meff"
+   Type: SIGNAL
+   HistoName: "c0l2RCTTMass7j2b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1500,1800,2200,3000
+   Label: "0l,2H, #geq7j, 2b"
+   ShortLabel: "0l,2H, #geq7j, 2b"
+   HistoPathSuff: 0lep/
+
+Region: "c0l2RCTTMass7j3bLowMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l2RCTTMass7j3bLowMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1500,2000,3000
+   Label: "0l,2H, #geq7j, 3b, LM"
+   ShortLabel: "0l,2H, #geq7j, 3b, LM"
+   HistoPathSuff: 0lep/
+
+Region: "c0l2RCTTMass7j3bHighMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l2RCTTMass7j3bHighMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1500,3000
+   Label: "0l,2H, #geq7j, 3b, HM"
+   ShortLabel: "0l,2H, #geq7j, 3b, HM"
+   HistoPathSuff: 0lep/
+
+Region: "c0l2RCTTMass7j4b_meff"
+   Type: SIGNAL
+   HistoName: "c0l2RCTTMass7j4b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1500,1800,3000
+   Label: "0l,2H, #geq7j, #geq4b"
+   ShortLabel: "0l,2H, #geq7j, #geq4b"
+   HistoPathSuff: 0lep/
+
+% --------------------------- %
+% --------  SAMPLES  -------- %
+% --------------------------- %
+
+Sample: "Data"
+Title: "Data"
+Type: data
+HistoFile: "Data"
+
+Sample: "ttbarlight"
+Title: "t#bar{t}+light"
+Type: background
+FillColor: 0
+LineColor: 1
+HistoFile: "ttbarlight"
+
+Sample: "ttbarcc"
+Title: "t#bar{t}+cc"
+Type: background
+FillColor: 590
+LineColor: 1
+HistoFile: "ttbarcc"
+
+Sample: "ttbarbb"
+Title: "t#bar{t}+bb"
+Type: background
+FillColor: 594
+LineColor: 1
+NormFactor: "ttbbNorm,1,-10,10"
+HistoFile: "ttbarbb"
+
+Sample: "topEW"
+Title: "topEW"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "topEW"
+Group: "Non-t#bar{t}"
+
+Sample: "ttH"
+Title: "ttH"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "ttH"
+Group: "Non-t#bar{t}"
+
+Sample: "Wjetslight"
+Title: "W+jetslight"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Wjets22light"
+Group: "Non-t#bar{t}"
+
+Sample: "Wjetscharm"
+Title: "W+jetscharm"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Wjets22charm"
+Group: "Non-t#bar{t}"
+
+Sample: "Wjetsbeauty"
+Title: "W+jetsbeauty"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Wjets22beauty"
+Group: "Non-t#bar{t}"
+
+Sample: "Zjetslight"
+Title: "Z+jetslight"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Zjets22light"
+Group: "Non-t#bar{t}"
+
+Sample: "Zjetscharm"
+Title: "Z+jetscharm"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Zjets22charm"
+Group: "Non-t#bar{t}"
+
+Sample: "Zjetsbeauty"
+Title: "Z+jetsbeauty"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Zjets22beauty"
+Group: "Non-t#bar{t}"
+
+Sample: "Singletop"
+Title: "Single-top"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Singletop"
+Group: "Non-t#bar{t}"
+
+Sample: "Dibosons"
+Title: "Dibosons"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Dibosons"
+Group: "Non-t#bar{t}"
+
+Sample: "QCD"
+Title: "QCD"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "QCD"
+Group: "Non-t#bar{t}"
+NormalizedByTheory: FALSE
+Regions: c1l*
-- 
GitLab


From aa068b5876e5199dd59e2279a940db571fe9bc27 Mon Sep 17 00:00:00 2001
From: "lvalery@ifae.es" <lvalery@at307.pic.es>
Date: Tue, 30 Aug 2016 09:55:27 +0200
Subject: [PATCH 2/3] Adding script to recover 2D BR results

---
 macros/macros_stats/Dump2DResults.py | 98 ++++++++++++++++++++++++++++
 1 file changed, 98 insertions(+)
 create mode 100644 macros/macros_stats/Dump2DResults.py

diff --git a/macros/macros_stats/Dump2DResults.py b/macros/macros_stats/Dump2DResults.py
new file mode 100644
index 0000000..8250130
--- /dev/null
+++ b/macros/macros_stats/Dump2DResults.py
@@ -0,0 +1,98 @@
+import os
+import string
+import random
+import re
+import time, getpass
+import socket
+import sys
+import datetime
+from array import array
+from optparse import OptionParser
+from ROOT import *
+
+sys.path.append( os.getenv("ROOTCOREBIN") + "/python/IFAETopFramework/")
+from BatchTools import *
+
+gROOT.SetBatch(1)
+
+##________________________________________________________
+## OPTIONS
+parser = OptionParser()
+parser.add_option("-i","--inputDir",help="location of the outputs",dest="inDir",default="/nfs/at3/scratch2/mcasolino/TRexFitter/TtHFitter/")
+parser.add_option("-o","--outDir",help="output folder",dest="outDir",default="./test/")
+parser.add_option("-e","--energy",help="energy",dest="energy",default="13")
+parser.add_option("-a","--addText",help="additional text to plot",dest="addText",default="")
+parser.add_option("-l","--lumi",help="luminosity",dest="lumi",default="3.2")
+parser.add_option("-d","--data",help="consider data",dest="data",action="store_true",default=False)
+parser.add_option("-r","--relaunch",help="relaunch missing jobs",dest="relaunch",action="store_true",default=False)
+parser.add_option("-s","--scripts",help="scripts",dest="scripts",default="")
+parser.add_option
+
+(options, args) = parser.parse_args()
+
+inDir=options.inDir
+outDir=options.outDir
+energy=options.energy
+addText=options.addText.replace("_"," ")
+lumi=options.lumi
+data=options.data
+relaunchMissingJobs=options.relaunch
+scripts=options.scripts
+
+os.system("mkdir -p "+outDir)
+
+###
+# Getting the values of the masses and cross-sections
+###
+masses = []
+masses += [{'name':"VLQ_TT_600_",'mass':600,'xsec':1.16,'err':0.10}]
+masses += [{'name':"VLQ_TT_700_",'mass':700,'xsec':0.455}]
+masses += [{'name':"VLQ_TT_750_",'mass':750,'xsec':0.295}]
+masses += [{'name':"VLQ_TT_800_",'mass':800,'xsec':0.195}]
+masses += [{'name':"VLQ_TT_850_",'mass':850,'xsec':0.132}]
+masses += [{'name':"VLQ_TT_900_",'mass':900,'xsec':0.0900}]
+masses += [{'name':"VLQ_TT_950_",'mass':950,'xsec':0.0624}]
+masses += [{'name':"VLQ_TT_1000_",'mass':1000,'xsec':0.0438}]
+masses += [{'name':"VLQ_TT_1050_",'mass':1050,'xsec':0.0311,'err':0.0035}]
+masses += [{'name':"VLQ_TT_1100_",'mass':1100,'xsec':0.0223,'err':0.0025}]
+masses += [{'name':"VLQ_TT_1150_",'mass':1150,'xsec':0.0161,'err':0.0018}]
+masses += [{'name':"VLQ_TT_1200_",'mass':1200,'xsec':0.0117,'err':0.0013}]
+masses += [{'name':"VLQ_TT_1300_",'mass':1300,'xsec':0.00634,'err':0.00075}]
+
+###
+# Branching ratios
+###
+BRs = []
+step_width = 0.05
+steps_n = int((1 + step_width)/step_width)
+
+out_limit_results = open("test_results_limits_"+inDir.split("/")[len(inDir.split("/"))-1]+".txt","w")
+
+for iHt in range(0,steps_n):
+    for iWb in range(0,steps_n):
+        for iZt in range(0,steps_n):
+            coupling_Ht = iHt * step_width
+            coupling_Zt = iZt * step_width
+            coupling_Wb = iWb * step_width
+            if abs(coupling_Ht+coupling_Wb+coupling_Zt-1.)<0.001:
+                BRs += [{'name':"BR_%.2f_%.2f_%.2f" %(coupling_Wb,coupling_Zt,coupling_Ht),'Wb':coupling_Wb,'Zt':coupling_Zt,'Ht':coupling_Ht,'legend': "Wb: %.0f%%, Zt: %.0f%%, Ht: %.0f%%"%(coupling_Wb*100.,coupling_Zt*100.,coupling_Ht*100.)}]
+
+for br in BRs:
+    for mass in masses:
+        files = glob.glob(inDir + "/*"+mass['name']+"*"+br['name']+"*/Limits/*.root")
+        if len(files)>1 or (len(files)==0 and not relaunchMissingJobs):
+            print "<!> ERROR !! : " + inDir + "/*"+mass['name']+"*"+br['name']+"*/Limits/*.root ("+`len(files)`+")"
+        elif len(files)==0 and relaunchMissingJobs :
+            print "-> Want to relaunch for configuration :" +mass['name']+"*"+br['name']
+            list_scripts = glob.glob(scripts+"/*"+mass['name']+"*"+br['name']+"*.txt")
+            if(len(list_scripts)==1):
+                print "     -> Found script to submit: " + list_scripts[0]
+                os.system("qsub -q at3 "+list_scripts[0])
+        else:
+            rootfile = TFile(files[0],"read")
+            histogram = rootfile.Get("limit")
+            out_limit_results.write(mass['name']+br['name']+"\n")
+            out_limit_results.write("Observed: "+`histogram.GetBinContent(1)`+"\n")
+            out_limit_results.write("Expected: "+`histogram.GetBinContent(2)`+"\n")
+            rootfile.Close()
+out_limit_results.close()
-- 
GitLab


From 8c41f7ba0ab2cec20aedc23bebc8f2827f3df3ad Mon Sep 17 00:00:00 2001
From: "lvalery@ifae.es" <lvalery@at307.pic.es>
Date: Tue, 30 Aug 2016 09:56:13 +0200
Subject: [PATCH 3/3] Adding NoVR configuration files to speed up the limit
 computation

---
 .../TEMPLATE_configFile_0L__SIGNAL_NoVR.txt   | 252 ++++++++++++++++++
 .../TEMPLATE_configFile__SIGNAL_NoVR.txt      | 228 ++++++++++++++++
 2 files changed, 480 insertions(+)
 create mode 100644 macros/macros_stats/templates/TEMPLATE_configFile_0L__SIGNAL_NoVR.txt
 create mode 100644 macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_NoVR.txt

diff --git a/macros/macros_stats/templates/TEMPLATE_configFile_0L__SIGNAL_NoVR.txt b/macros/macros_stats/templates/TEMPLATE_configFile_0L__SIGNAL_NoVR.txt
new file mode 100644
index 0000000..f4d512e
--- /dev/null
+++ b/macros/macros_stats/templates/TEMPLATE_configFile_0L__SIGNAL_NoVR.txt
@@ -0,0 +1,252 @@
+% -------------------------- %
+% -------    JOB     ------- %
+% -------------------------- %
+
+Job: "__FITTYPE_____SIGNAL_____ADDITION__"
+   Label: "Ht+X analysis"
+   CmeLabel: "13 TeV"
+   LumiLabel: "13.2 fb^{-1}"
+   Lumi: __LUMIVALUE__
+   POI: "SigXsecOverSM"
+   ReadFrom: HIST
+   HistoPath: "__HISTOPATH__"
+   DebugLevel: 0
+   SystControlPlots: FALSE
+   SystPruningShape: 0.01
+   SystPruningNorm: 0.01
+   CorrelationThreshold: 0.20
+   HistoChecks: NOCRASH
+   SplitHistoFiles: TRUE
+   MCstatThreshold: 0.05
+   StatOnly: __STATONLY__
+
+% -------------------------- %
+% -------    FIT     ------- %
+% -------------------------- %
+
+Fit: "__FITTYPE__"
+   FitType: __FITTYPE__
+   FitRegion: __FITREGION__
+   FitBlind: __FITBLIND__
+   POIAsimov: __FITPOIASIMOV__
+
+% --------------------------- %
+% ---------- LIMIT ---------- %
+% --------------------------- %
+
+Limit: "limit"
+  LimitType: ASYMPTOTIC
+  LimitBlind: __LIMITBLIND__
+  POIAsimov: __LIMITPOIASIMOV__
+
+% -------------------------- %
+% --------- REGIONS -------- %
+% -------------------------- %
+
+Region: "c0l0RCTTMass7j2b_meff"
+   Type: SIGNAL
+   HistoName: "c0l0RCTTMass7j2b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,700,800,900,1000,1200,1400,1600,2000,3000
+   Label: "0l, 0H, #geq7j, 2b"
+   ShortLabel: "0l,0H, #geq7j, 2b"
+
+Region: "c0l0RCTTMass7j3b_meff"
+   Type: SIGNAL
+   HistoName: "c0l0RCTTMass7j3b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,700,800,900,1000,1200,1400,1600,2000,3000
+   Label: "0l,0H, #geq7j, 3b"
+   ShortLabel: "0l,0H, #geq7j, 3b"
+
+Region: "c0l0RCTTMass7j4b_meff"
+   Type: SIGNAL
+   HistoName: "c0l0RCTTMass7j4b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,700,800,900,1000,1200,1400,1600,3000
+   Label: "0l,0H, #geq7j, #geq4b"
+   ShortLabel: "0l,0H, #geq7j, #geq4b"
+
+Region: "c0l1RCTTMass7j2b_meff"
+   Type: SIGNAL
+   HistoName: "c0l1RCTTMass7j2b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,800,900,1000,1200,1400,1700,2100,3000
+   Label: "0l,1H, #geq7j, 2b"
+   ShortLabel: "0l,1H, #geq7j, 2b"
+
+Region: "c0l1RCTTMass7j3bLowMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l1RCTTMass7j3bLowMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1000,1200,1400,1700,2100,3000
+   Label: "0l,1H, #geq7j, 3b, LM"
+   ShortLabel: "0l,1H, #geq7j, 3b, LM"
+
+Region: "c0l1RCTTMass7j4bLowMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l1RCTTMass7j4bLowMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1000,1200,1400,1700,3000
+   Label: "0l,1H, #geq7j, #geq4b, LM"
+   ShortLabel: "0l,1H, #geq7j, #geq4b, LM"
+
+Region: "c0l1RCTTMass7j3bHighMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l1RCTTMass7j3bHighMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1000,1200,1400,1700,3000
+   Label: "0l,1H, #geq7j, 3b, HM"
+   ShortLabel: "0l,1H, #geq7j, 3b, HM"
+
+Region: "c0l1RCTTMass7j4bHighMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l1RCTTMass7j4bHighMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1000,1200,1400,3000
+   Label: "0l,1H, #geq7j, #geq4b, HM"
+   ShortLabel: "0l,1H, #geq7j, #geq4b, HM"
+
+Region: "c0l2RCTTMass7j2b_meff"
+   Type: SIGNAL
+   HistoName: "c0l2RCTTMass7j2b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1500,1800,2200,3000
+   Label: "0l,2H, #geq7j, 2b"
+   ShortLabel: "0l,2H, #geq7j, 2b"
+
+Region: "c0l2RCTTMass7j3bLowMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l2RCTTMass7j3bLowMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1500,2000,3000
+   Label: "0l,2H, #geq7j, 3b, LM"
+   ShortLabel: "0l,2H, #geq7j, 3b, LM"
+
+Region: "c0l2RCTTMass7j3bHighMtbmin_meff"
+   Type: SIGNAL
+   HistoName: "c0l2RCTTMass7j3bHighMtbmin_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1500,3000
+   Label: "0l,2H, #geq7j, 3b, HM"
+   ShortLabel: "0l,2H, #geq7j, 3b, HM"
+
+Region: "c0l2RCTTMass7j4b_meff"
+   Type: SIGNAL
+   HistoName: "c0l2RCTTMass7j4b_meff"
+   VariableTitle: "m_{eff} [GeV]"
+   Binning: 0,1500,1800,3000
+   Label: "0l,2H, #geq7j, #geq4b"
+   ShortLabel: "0l,2H, #geq7j, #geq4b"
+
+
+% --------------------------- %
+% --------  SAMPLES  -------- %
+% --------------------------- %
+
+Sample: "Data"
+Title: "Data"
+Type: data
+HistoFile: "Data"
+
+Sample: "ttbarlight"
+Title: "t#bar{t}+light"
+Type: background
+FillColor: 0
+LineColor: 1
+HistoFile: "ttbarlight"
+
+Sample: "ttbarcc"
+Title: "t#bar{t}+cc"
+Type: background
+FillColor: 590
+LineColor: 1
+HistoFile: "ttbarcc"
+
+Sample: "ttbarbb"
+Title: "t#bar{t}+bb"
+Type: background
+FillColor: 594
+LineColor: 1
+NormFactor: "ttbbNorm,1,-10,10"
+HistoFile: "ttbarbb"
+
+Sample: "topEW"
+Title: "topEW"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "topEW"
+Group: "Non-t#bar{t}"
+
+Sample: "ttH"
+Title: "ttH"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "ttH"
+Group: "Non-t#bar{t}"
+
+Sample: "Wjetslight"
+Title: "W+jetslight"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Wjets22light"
+Group: "Non-t#bar{t}"
+
+Sample: "Wjetscharm"
+Title: "W+jetscharm"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Wjets22charm"
+Group: "Non-t#bar{t}"
+
+Sample: "Wjetsbeauty"
+Title: "W+jetsbeauty"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Wjets22beauty"
+Group: "Non-t#bar{t}"
+
+Sample: "Zjetslight"
+Title: "Z+jetslight"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Zjets22light"
+Group: "Non-t#bar{t}"
+
+Sample: "Zjetscharm"
+Title: "Z+jetscharm"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Zjets22charm"
+Group: "Non-t#bar{t}"
+
+Sample: "Zjetsbeauty"
+Title: "Z+jetsbeauty"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Zjets22beauty"
+Group: "Non-t#bar{t}"
+
+Sample: "Singletop"
+Title: "Single-top"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Singletop"
+Group: "Non-t#bar{t}"
+
+Sample: "Dibosons"
+Title: "Dibosons"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Dibosons"
+Group: "Non-t#bar{t}"
diff --git a/macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_NoVR.txt b/macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_NoVR.txt
new file mode 100644
index 0000000..5612089
--- /dev/null
+++ b/macros/macros_stats/templates/TEMPLATE_configFile__SIGNAL_NoVR.txt
@@ -0,0 +1,228 @@
+% -------------------------- %
+% -------    JOB     ------- %
+% -------------------------- %
+
+Job: "__FITTYPE_____SIGNAL_____ADDITION__"
+   Label: "Ht+X analysis"
+   CmeLabel: "13 TeV"
+   LumiLabel: "13.2 fb^{-1}"
+   Lumi: __LUMIVALUE__
+   POI: "SigXsecOverSM"
+   ReadFrom: HIST
+   HistoPath: "__HISTOPATH__"
+   DebugLevel: 0
+   SystControlPlots: FALSE
+   SystPruningShape: 0.01
+   SystPruningNorm: 0.01
+   CorrelationThreshold: 0.20
+   HistoChecks: NOCRASH
+   SplitHistoFiles: TRUE
+   MCstatThreshold: 0.05
+   StatOnly: __STATONLY__
+
+% -------------------------- %
+% -------    FIT     ------- %
+% -------------------------- %
+
+Fit: "__FITTYPE__"
+   FitType: __FITTYPE__
+   FitRegion: __FITREGION__
+   FitBlind: __FITBLIND__
+   POIAsimov: __FITPOIASIMOV__
+
+% --------------------------- %
+% ---------- LIMIT ---------- %
+% --------------------------- %
+
+Limit: "limit"
+  LimitType: ASYMPTOTIC
+  LimitBlind: __LIMITBLIND__
+  POIAsimov: __LIMITPOIASIMOV__
+
+% -------------------------- %
+% --------- REGIONS -------- %
+% -------------------------- %
+
+Region: "c1l0RCTTMass6j3b_meff"
+Type: SIGNAL
+HistoName: "c1l0RCTTMass6j3b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 400,500,600,700,800,900,1000,1200,1400,1600,2000,2500,3000
+Label: "0J, #geq6j, 3b"
+ShortLabel: "0J, #geq6j, 3b"
+
+Region: "c1l0RCTTMass6j4b_meff"
+Type: SIGNAL
+HistoName: "c1l0RCTTMass6j4b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 400,500,600,700,800,900,1000,1200,1400,1600,2000,2500,3000
+Label: "0J, #geq6j, #geq4b"
+ShortLabel: "0J, #geq6j, #geq4b"
+
+Region: "c1l1RCTTMass6j3bLowMbb_meff"
+Type: SIGNAL
+HistoName: "c1l1RCTTMass6j3bLowMbb_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+Label: "1J, #geq6j, 3b, LM"
+ShortLabel: "1J, #geq6j, 3b, LM"
+
+Region: "c1l1RCTTMass6j4bLowMbb_meff"
+Type: SIGNAL
+HistoName: "c1l1RCTTMass6j4bLowMbb_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+Label: "1J, #geq6j, #geq4b, LM"
+ShortLabel: "1J, #geq6j, #geq4b, LM"
+
+Region: "c1l1RCTTMass6j3bHighMbb_meff"
+Type: SIGNAL
+HistoName: "c1l1RCTTMass6j3bHighMbb_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+Label: "1J, #geq6j, 3b, HM"
+ShortLabel: "1J, #geq6j, 3b, HM"
+
+Region: "c1l1RCTTMass6j4bHighMbb_meff"
+Type: SIGNAL
+HistoName: "c1l1RCTTMass6j4bHighMbb_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 700,800,900,1000,1200,1400,1700,2100,2500,3000
+Label: "1J, #geq6j, #geq4b, HM"
+ShortLabel: "1J, #geq6j, #geq4b, HM"
+
+Region: "c1l2RCTTMass6j3b_meff"
+Type: SIGNAL
+HistoName: "c1l2RCTTMass6j3b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 0,1000,1500,2000,3000
+Label: "2J, #geq6j, 3b"
+ShortLabel: "2J, #geq6j, 3b"
+
+Region: "c1l2RCTTMass6j4b_meff"
+Type: SIGNAL
+HistoName: "c1l2RCTTMass6j4b_meff"
+VariableTitle: "m_{eff} [GeV]"
+Binning: 0,1000,1500,2000,3000
+Label: "2J, #geq6j, #geq4b"
+ShortLabel: "2J, #geq6j, #geq4b"
+
+% --------------------------- %
+% --------  SAMPLES  -------- %
+% --------------------------- %
+
+Sample: "Data"
+Title: "Data"
+Type: data
+HistoFile: "Data"
+
+Sample: "ttbarlight"
+Title: "t#bar{t}+light"
+Type: background
+FillColor: 0
+LineColor: 1
+HistoFile: "ttbarlight"
+
+Sample: "ttbarcc"
+Title: "t#bar{t}+cc"
+Type: background
+FillColor: 590
+LineColor: 1
+HistoFile: "ttbarcc"
+
+Sample: "ttbarbb"
+Title: "t#bar{t}+bb"
+Type: background
+FillColor: 594
+LineColor: 1
+NormFactor: "ttbbNorm,1,-10,10"
+HistoFile: "ttbarbb"
+
+Sample: "topEW"
+Title: "topEW"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "topEW"
+Group: "Non-t#bar{t}"
+
+Sample: "ttH"
+Title: "ttH"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "ttH"
+Group: "Non-t#bar{t}"
+
+Sample: "Wjetslight"
+Title: "W+jetslight"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Wjets22light"
+Group: "Non-t#bar{t}"
+
+Sample: "Wjetscharm"
+Title: "W+jetscharm"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Wjets22charm"
+Group: "Non-t#bar{t}"
+
+Sample: "Wjetsbeauty"
+Title: "W+jetsbeauty"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Wjets22beauty"
+Group: "Non-t#bar{t}"
+
+Sample: "Zjetslight"
+Title: "Z+jetslight"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Zjets22light"
+Group: "Non-t#bar{t}"
+
+Sample: "Zjetscharm"
+Title: "Z+jetscharm"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Zjets22charm"
+Group: "Non-t#bar{t}"
+
+Sample: "Zjetsbeauty"
+Title: "Z+jetsbeauty"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Zjets22beauty"
+Group: "Non-t#bar{t}"
+
+Sample: "Singletop"
+Title: "Single-top"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Singletop"
+Group: "Non-t#bar{t}"
+
+Sample: "Dibosons"
+Title: "Dibosons"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "Dibosons"
+Group: "Non-t#bar{t}"
+
+Sample: "QCD"
+Title: "QCD"
+Type: background
+FillColor: 410
+LineColor: 1
+HistoFile: "QCD"
+Group: "Non-t#bar{t}"
+NormalizedByTheory: FALSE
-- 
GitLab