From 965056382f7d424303eb539a4602ce35203f3d2e Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Thu, 20 Jun 2019 10:58:51 +0200
Subject: [PATCH 01/33] Deleting obsolete signal and validation regions

---
 Root/VLQ_Selector.cxx | 232 +++++++++++++++++++++---------------------
 1 file changed, 116 insertions(+), 116 deletions(-)

diff --git a/Root/VLQ_Selector.cxx b/Root/VLQ_Selector.cxx
index b482712..8461ed1 100644
--- a/Root/VLQ_Selector.cxx
+++ b/Root/VLQ_Selector.cxx
@@ -120,7 +120,7 @@ bool VLQ_Selector::Init(){
 
   m_sel_fwdjet_prop = new std::vector<SelProp>({
       MakeSelProp("0fjex",c_0fjex), MakeSelProp("0fjin",c_0fjin), MakeSelProp("1fjex", c_1fjex), 
-	MakeSelProp("1fjin", c_1fjin), MakeSelProp("2fjin", c_2fjin) });
+  MakeSelProp("1fjin", c_1fjin), MakeSelProp("2fjin", c_2fjin) });
 
   m_sel_bjet_prop = new std::vector<SelProp>({
     MakeSelProp("0bex", c_0bex, ""), MakeSelProp("0bin", c_0bin, ""), MakeSelProp("1bin", c_1bin, "")
@@ -133,7 +133,7 @@ bool VLQ_Selector::Init(){
 
   m_sel_J_prop = new std::vector<SelProp>({
       MakeSelProp("0Jex",c_0Jex), MakeSelProp("1Jex", c_1Jex), MakeSelProp("1Jin", c_1Jin), 
-	MakeSelProp("2Jex", c_2Jex), MakeSelProp("2Jin", c_2Jin), MakeSelProp("3Jin", c_3Jin) });
+  MakeSelProp("2Jex", c_2Jex), MakeSelProp("2Jin", c_2Jin), MakeSelProp("3Jin", c_3Jin) });
 
   m_sel_M_prop = new std::vector<SelProp>({
       MakeSelProp("0Mex",c_0Mex), MakeSelProp("1Mex", c_1Mex), MakeSelProp("1Min", c_1Min), MakeSelProp("2Min", c_2Min) });
@@ -465,7 +465,7 @@ bool VLQ_Selector::Init(){
 
     if(m_opt->DoNewSuperMergeBoost()){
       std::vector<std::string> boostlist_supermerge = {
-	"0Tex-0Hex", "1THex", "2THin"//, "3THin"
+  "0Tex-0Hex", "1THex", "2THin"//, "3THin"
       };
 
       if(m_opt->DoZeroLeptonAna()){
@@ -482,46 +482,46 @@ bool VLQ_Selector::Init(){
     if(m_opt->DoNewMergeBoost()){
 
       std::vector<std::string> boostlist_highstat = {
-	"2Tin-0_1Hwin",
-	"1Tex-1Hex", "1Tex-0Hex",
-	"0Tex-1Hex", "0Tex-0Hex",
-	"0Tin-2Hin"
+  "2Tin-0_1Hwin",
+  "1Tex-1Hex", "1Tex-0Hex",
+  "0Tex-1Hex", "0Tex-0Hex",
+  "0Tin-2Hin"
       };
 
       std::vector<std::string> boostlist_lowstat = {
-	"2THin", "1Tex-0Hex",
-	"0Tex-1Hex", "0Tex-0Hex"
+  "2THin", "1Tex-0Hex",
+  "0Tex-1Hex", "0Tex-0Hex"
       };
 
       if(m_opt->DoZeroLeptonAna()){
-	/*
+  /*
         std::vector<std::string> boostlist_super_merge = {
           "3THin", "2THex", "1THex", "0THex"
         };
         boostlist_0L_lowb.insert(boostlist_0L_lowb.end(), boostlist_super_merge.begin(), boostlist_super_merge.end());
         boostlist_0L_highb.insert(boostlist_0L_highb.end(), boostlist_super_merge.begin(), boostlist_super_merge.end());
-	*/
+  */
 
         boostlist_0L_lowb.insert(boostlist_0L_lowb.end(), boostlist_highstat.begin(), boostlist_highstat.end());
         boostlist_0L_valid_lowb.insert(boostlist_0L_valid_lowb.end(), boostlist_highstat.begin(), boostlist_highstat.end());
-	boostlist_0L_valid_lowb.push_back("2THin");
+  boostlist_0L_valid_lowb.push_back("2THin");
         boostlist_0L_highb.insert(boostlist_0L_highb.end(), boostlist_lowstat.begin(), boostlist_lowstat.end());
       }
 
       if(m_opt->DoOneLeptonAna()){
-	/*
-	std::vector<std::string> boostlist_1L_merge = {
-	  "2Tin-0_1Hwin",
-	  "1Tex-1Hex", "1Tex-0Hex",
-	  "0Tex-1Hex", "0Tex-0Hex",
-	  "0Tin-2Hin"
-	};
+  /*
+  std::vector<std::string> boostlist_1L_merge = {
+    "2Tin-0_1Hwin",
+    "1Tex-1Hex", "1Tex-0Hex",
+    "0Tex-1Hex", "0Tex-0Hex",
+    "0Tin-2Hin"
+  };
 
         std::vector<std::string> boostlist_1L_merge_valid_4b = {
           "2THin", "1Tex-0Hex",
           "0Tex-1Hex", "0Tex-0Hex"
         };
-	*/
+  */
         boostlist_1L_default.insert(boostlist_1L_default.end(), boostlist_highstat.begin(), boostlist_highstat.end());
         boostlist_1L_valid_4b.insert(boostlist_1L_valid_4b.end(), boostlist_lowstat.begin(), boostlist_lowstat.end());
       }
@@ -560,27 +560,27 @@ bool VLQ_Selector::Init(){
 
         for( const std::string& bjet : bjet_analist ){
           const std::set<std::string>* boostset_0L = NULL;
-	  /*
+    /*
           if( (bjet == "2bex") || (reg_type == FIT && bjet == "3bex") ){ boostset_0L = &boostset_0L_lowb; }
           else if( (reg_type == VALIDATION && bjet == "3bex") || (bjet == "4bin") )  { boostset_0L = &boostset_0L_highb; }
-	  */
-	  if(bjet=="2bex"){ boostset_0L = &boostset_0L_valid_lowb; }
-	  else if( (bjet=="3bex") && (reg_type == FIT) ){ boostset_0L = &boostset_0L_lowb; }
-	  else if( (bjet=="4bin") || ((reg_type == VALIDATION) && (bjet == "3bex")) ){ boostset_0L = &boostset_0L_highb; }
-	  /*
+    */
+    if(bjet=="2bex"){ boostset_0L = &boostset_0L_valid_lowb; }
+    else if( (bjet=="3bex") && (reg_type == FIT) ){ boostset_0L = &boostset_0L_lowb; }
+    else if( (bjet=="4bin") || ((reg_type == VALIDATION) && (bjet == "3bex")) ){ boostset_0L = &boostset_0L_highb; }
+    /*
           if( (reg_type == FIT) && (bjet=="2bex" || bjet == "3bex") ){ boostset_0L = &boostset_0L_lowb; }
           else if( (reg_type == VALIDATION) && (bjet == "2bex") )  { boostset_0L = &boostset_0L_valid_lowb; }
-	  else if( ( (reg_type == VALIDATION) && (bjet == "3bex") ) || (bjet == "4bin") )  { boostset_0L = &boostset_0L_highb; }
+    else if( ( (reg_type == VALIDATION) && (bjet == "3bex") ) || (bjet == "4bin") )  { boostset_0L = &boostset_0L_highb; }
           else{ continue; } //FIXME: No low-b analysis regions right now
-	  */
+    */
           AddVLQSelection("c-0lep-"+jet+"-"+bjet, false/*do_runop*/, false/*do_syst*/, PRESEL);
 
           for( const std::string& boost : *boostset_0L ){
             for(const std::string& mtb : ch_mtb ){
               AddVLQSelection("c-0lep-"+boost+"-"+jet+"-"+bjet+mtb, do_runop, do_syst, reg_type);
-	      if(m_opt->ApplyMetSignificanceCut() && (bjet=="2bex") ){
-		AddVLQSelection("c-0lep-"+boost+"-"+jet+"-"+bjet+mtb+"-HighMetSig", do_runop, do_syst, reg_type);
-	      }//metsig
+        if(m_opt->ApplyMetSignificanceCut() && (bjet=="2bex") ){
+    AddVLQSelection("c-0lep-"+boost+"-"+jet+"-"+bjet+mtb+"-HighMetSig", do_runop, do_syst, reg_type);
+        }//metsig
 
             }//mtb split
           }//boost list
@@ -716,8 +716,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     //=============== Lepton part =====================
     for(SelProp& lepprop : *m_sel_lep_prop){
       if(lepprop.name == _parts_){
-	sprop_lep = &lepprop;
-	found = true; n_nodes++; break;
+  sprop_lep = &lepprop;
+  found = true; n_nodes++; break;
       }
     }
     if(found) continue;
@@ -725,8 +725,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     //=============== Jet part ========================
     for(SelProp& jetprop : *m_sel_jet_prop){
       if(jetprop.name == _parts_){
-	sprop_jet = &jetprop;
-	found = true; n_nodes++; break;
+  sprop_jet = &jetprop;
+  found = true; n_nodes++; break;
       }
     }
     if(found) continue;
@@ -743,8 +743,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     //=============== B-jet part ========================
     for(SelProp& bjetprop : *m_sel_bjet_prop){
       if(bjetprop.name == _parts_){
-	sprop_bjet = &bjetprop;
-	found = true; n_nodes++; break;
+  sprop_bjet = &bjetprop;
+  found = true; n_nodes++; break;
       }
     }
     if(found) continue;
@@ -752,8 +752,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     //=============== J-tag part ========================
     for(SelProp& Jprop : *m_sel_J_prop){
       if(Jprop.name == _parts_){
-	sprop_J = &Jprop;
-	found = true; n_nodes++; break;
+  sprop_J = &Jprop;
+  found = true; n_nodes++; break;
       }
     }
     if(found) continue;
@@ -761,8 +761,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     //=============== M-tag part ========================
     for(SelProp& Mprop : *m_sel_M_prop){
       if(Mprop.name == _parts_){
-	sprop_M = &Mprop;
-	found = true; n_nodes++; break;
+  sprop_M = &Mprop;
+  found = true; n_nodes++; break;
       }
     }
     if(found) continue;
@@ -770,8 +770,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     //=============== T-tag part ========================
     for(SelProp& Tprop : *m_sel_T_prop){
       if(Tprop.name == _parts_){
-	sprop_T = &Tprop;
-	found = true; n_nodes++; break;
+  sprop_T = &Tprop;
+  found = true; n_nodes++; break;
       }
     }
     if(found) continue;
@@ -779,8 +779,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     //=============== Leptonic T-tag part ===============
     for(SelProp& Lprop : *m_sel_L_prop){
       if(Lprop.name == _parts_){
-	sprop_L = &Lprop;
-	found = true; n_nodes++; break;
+  sprop_L = &Lprop;
+  found = true; n_nodes++; break;
       }
     }
     if(found) continue;
@@ -788,8 +788,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     //=============== H-tag part ========================
     for(SelProp& Hprop : *m_sel_H_prop){
       if(Hprop.name == _parts_){
-	sprop_H = &Hprop;
-	found = true; n_nodes++; break;
+  sprop_H = &Hprop;
+  found = true; n_nodes++; break;
       }
     }
     if(found) continue;
@@ -797,8 +797,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     //=============== V-tag part ========================
     for(SelProp& Vprop : *m_sel_V_prop){
       if(Vprop.name == _parts_){
-	sprop_V = &Vprop;
-	found = true; n_nodes++; break;
+  sprop_V = &Vprop;
+  found = true; n_nodes++; break;
       }
     }
     if(found) continue;
@@ -807,8 +807,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
    //=============== TH-tag part ========================
     for(SelProp& THprop : *m_sel_TH_prop){
       if(THprop.name == _parts_){
-	sprop_TH = &THprop;
-	found = true; n_nodes++; break;
+  sprop_TH = &THprop;
+  found = true; n_nodes++; break;
       }
     }
     if(found) continue;
@@ -817,8 +817,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
    //=============== LT-tag part ========================
     for(SelProp& LTprop : *m_sel_LT_prop){
       if(LTprop.name == _parts_){
-	sprop_LT = &LTprop;
-	found = true; n_nodes++; break;
+  sprop_LT = &LTprop;
+  found = true; n_nodes++; break;
       }
     }
     if(found) continue;
@@ -826,8 +826,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     //=============== VT-tag part ========================
     for(SelProp& VTprop : *m_sel_VT_prop){
       if(VTprop.name == _parts_){
-	sprop_VT = &VTprop;
-	found = true; n_nodes++; break;
+  sprop_VT = &VTprop;
+  found = true; n_nodes++; break;
       }
     }
     if(found) continue;
@@ -835,8 +835,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     //=============== VLT-tag part ========================
     for(SelProp& VLTprop : *m_sel_VLT_prop){
       if(VLTprop.name == _parts_){
-	sprop_VLT = &VLTprop;
-	found = true; n_nodes++; break;
+  sprop_VLT = &VLTprop;
+  found = true; n_nodes++; break;
       }
     }
     if(found) continue;
@@ -846,8 +846,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     //=============== Mbb-split part ========================
     for(SelProp& Mbbprop : *m_sel_Mbb_prop){
       if(Mbbprop.name == _parts_){
-	sprop_Mbb = &Mbbprop;
-	found = true; n_nodes++; break;
+  sprop_Mbb = &Mbbprop;
+  found = true; n_nodes++; break;
       }
     }
     if(found) continue;
@@ -855,15 +855,15 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     //=============== Mtb-split part ========================
     for(SelProp& Mtbprop : *m_sel_Mtb_prop){
       if(Mtbprop.name == _parts_){
-	sprop_Mtb = &Mtbprop;
-	found = true; n_nodes++; break;
+  sprop_Mtb = &Mtbprop;
+  found = true; n_nodes++; break;
       }
     }
     //=============== Metsig-split part ========================
     for(SelProp& MetSigprop : *m_sel_MetSig_prop){
       if(MetSigprop.name == _parts_){
-	sprop_MetSig = &MetSigprop;
-	found = true; n_nodes++; break;
+  sprop_MetSig = &MetSigprop;
+  found = true; n_nodes++; break;
       }
     }
     if(found) continue;
@@ -909,8 +909,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
   }//el/mu channel splitting is done last
   else{
     if( !(sprop_fwdjet || sprop_bjet || sprop_J || sprop_M || sprop_T || sprop_L || sprop_H || sprop_V 
-	  || sprop_TH || sprop_LT || sprop_VT || sprop_VLT
-	  ||sprop_Mbb || sprop_Mtb || sprop_MetSig)  ){
+    || sprop_TH || sprop_LT || sprop_VT || sprop_VLT
+    ||sprop_Mbb || sprop_Mtb || sprop_MetSig)  ){
 
       if(sprop_jet->primanc_name.empty()){
         SelectorBase::AddAncestors(*sel, {sprop_lep->index, sprop_jet->index}, sprop_lep->index);
@@ -922,12 +922,12 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
 
     }//Lep + jet
     else if( !(sprop_fwdjet || sprop_J || sprop_M || sprop_T || sprop_L || sprop_H || sprop_V 
-	       || sprop_TH || sprop_LT || sprop_VT || sprop_VLT
-	       || sprop_Mbb || sprop_Mtb || sprop_MetSig) ){
+         || sprop_TH || sprop_LT || sprop_VT || sprop_VLT
+         || sprop_Mbb || sprop_Mtb || sprop_MetSig) ){
       
       if(sprop_bjet->primanc_name.empty()){
         AddAncestor(*sel, "c-"+sprop_lep->name+"-"+sprop_jet->name, true);
-	SelectorBase::AddAncestor(*sel, sprop_bjet->index);
+  SelectorBase::AddAncestor(*sel, sprop_bjet->index);
       }
       else{
         AddPrimary(*sel, "c-"+sprop_lep->name+"-"+sprop_jet->name+"-"+sprop_bjet->primanc_name);
@@ -958,59 +958,59 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
       if(sprop_TH){s_boost = sprop_TH->name; }
       else{
 
-	if(sprop_T){
-	  if(!s_boost.empty()){ s_boost += "-"; }
-	  s_boost += sprop_T->name;
-	}
-
-	if(sprop_L){
-	  if(!s_boost.empty()){ s_boost += "-"; }
-	  s_boost += sprop_T->name;
-	}
-
-	if(sprop_H){
-	  if(!s_boost.empty()){ s_boost += "-"; }
-	  s_boost += sprop_H->name;
-	}
-
-	if(sprop_V){
-	  if(!s_boost.empty()){ s_boost += "-"; }
-	  s_boost += sprop_V->name;
-	}
-
-	if(sprop_LT){
-	  if(!s_boost.empty()){ s_boost += "-"; }
-	  s_boost += sprop_LT->name;
-	}
-
-	if(sprop_VT){
-	  if(!s_boost.empty()){ s_boost += "-"; }
-	  s_boost += sprop_VT->name;
-	}
-
-	if(sprop_VLT){
-	  if(!s_boost.empty()){ s_boost += "-"; }
-	  s_boost += sprop_VLT->name;
-	}
+  if(sprop_T){
+    if(!s_boost.empty()){ s_boost += "-"; }
+    s_boost += sprop_T->name;
+  }
+
+  if(sprop_L){
+    if(!s_boost.empty()){ s_boost += "-"; }
+    s_boost += sprop_T->name;
+  }
+
+  if(sprop_H){
+    if(!s_boost.empty()){ s_boost += "-"; }
+    s_boost += sprop_H->name;
+  }
+
+  if(sprop_V){
+    if(!s_boost.empty()){ s_boost += "-"; }
+    s_boost += sprop_V->name;
+  }
+
+  if(sprop_LT){
+    if(!s_boost.empty()){ s_boost += "-"; }
+    s_boost += sprop_LT->name;
+  }
+
+  if(sprop_VT){
+    if(!s_boost.empty()){ s_boost += "-"; }
+    s_boost += sprop_VT->name;
+  }
+
+  if(sprop_VLT){
+    if(!s_boost.empty()){ s_boost += "-"; }
+    s_boost += sprop_VLT->name;
+  }
 
       }
       if(!sprop_MetSig){
-	if(sprop_Mbb){
-	  AddAncestor(*sel, "c-" + sprop_lep->name + "-" + s_boost + "-" + sprop_jet->name + "-" + sprop_bjet->name, true);
-	  SelectorBase::AddAncestor(*sel, sprop_Mbb->index);
-	}
-	else if(sprop_Mtb){
-	  AddAncestor(*sel, "c-" + sprop_lep->name + "-" + s_boost + "-" + sprop_jet->name + "-" + sprop_bjet->name, true);
-	  SelectorBase::AddAncestor(*sel, sprop_Mtb->index);
-	  //if( m_opt->ApplyMetSignificanceCut() && (sprop_bjet->name == "2bex") && (sprop_Mtb->name == "LowMtbmin") ){ sel->AddCut("met_sig_cut",&(m_outData->o_met_sig), 10.); }
-	}
+  if(sprop_Mbb){
+    AddAncestor(*sel, "c-" + sprop_lep->name + "-" + s_boost + "-" + sprop_jet->name + "-" + sprop_bjet->name, true);
+    SelectorBase::AddAncestor(*sel, sprop_Mbb->index);
+  }
+  else if(sprop_Mtb){
+    AddAncestor(*sel, "c-" + sprop_lep->name + "-" + s_boost + "-" + sprop_jet->name + "-" + sprop_bjet->name, true);
+    SelectorBase::AddAncestor(*sel, sprop_Mtb->index);
+    //if( m_opt->ApplyMetSignificanceCut() && (sprop_bjet->name == "2bex") && (sprop_Mtb->name == "LowMtbmin") ){ sel->AddCut("met_sig_cut",&(m_outData->o_met_sig), 10.); }
+  }
       }//Lep-jet-bjet-boost-mt[b]b
       else{
-	std::string msplit = "";
-	if(sprop_Mbb){ msplit = sprop_Mbb->name; }
-	else if(sprop_Mtb){ msplit = sprop_Mtb->name; }
-	AddAncestor(*sel, "c-" + sprop_lep->name + "-" + s_boost + "-" + sprop_jet->name + "-" + sprop_bjet->name + "-" + msplit, true);
-	SelectorBase::AddAncestor(*sel, sprop_MetSig->index);
+  std::string msplit = "";
+  if(sprop_Mbb){ msplit = sprop_Mbb->name; }
+  else if(sprop_Mtb){ msplit = sprop_Mtb->name; }
+  AddAncestor(*sel, "c-" + sprop_lep->name + "-" + s_boost + "-" + sprop_jet->name + "-" + sprop_bjet->name + "-" + msplit, true);
+  SelectorBase::AddAncestor(*sel, sprop_MetSig->index);
       }//Lep-jet-bjet-boost-mt[b]b-metsig
 
     }//post-boost
-- 
GitLab


From fd28e02f3c4d7bf5f911c51c200cc04efa458d5e Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 23 Jul 2019 14:58:34 +0200
Subject: [PATCH 02/33] Adding map with collections of truth tagged RC jets for
 2D plotting and other studies

---
 Root/VLQ_Analysis_Data2015.cxx      | 103 +++++++++++++++++++++++++---
 Root/VLQ_OutputData.cxx             |  23 +++++++
 VLQAnalysis/VLQ_Analysis_Data2015.h |   1 +
 VLQAnalysis/VLQ_OutputData.h        |   3 +
 python/Submit_VLQAnalysis_new.py    |  28 +++-----
 5 files changed, 131 insertions(+), 27 deletions(-)

diff --git a/Root/VLQ_Analysis_Data2015.cxx b/Root/VLQ_Analysis_Data2015.cxx
index bc94649..a41edcd 100644
--- a/Root/VLQ_Analysis_Data2015.cxx
+++ b/Root/VLQ_Analysis_Data2015.cxx
@@ -58,6 +58,7 @@ m_weightMngr(0)
 {
   m_channels.clear();
   m_topTaggers.clear();
+  m_truthRCTypes.clear();
 }
 
 //____________________________________________________________________________
@@ -431,6 +432,13 @@ bool VLQ_Analysis_Data2015::Begin(){
   m_topTaggers.push_back("RCMV1bin");
   m_topTaggers.push_back("RCMTopHiggs");
   m_topTaggers.push_back("LooseRCTTMass");
+
+  m_truthRCTypes.push_back("truthTop");
+  m_truthRCTypes.push_back("truthW");
+  m_truthRCTypes.push_back("truthZ");
+  m_truthRCTypes.push_back("truthHiggs");
+  m_truthRCTypes.push_back("truthOther");
+
   if(m_opt->DumpHistos()){
 
     if(!m_opt->DoOneLeptonAna() && !m_opt->DoZeroLeptonAna()) {
@@ -748,9 +756,8 @@ bool VLQ_Analysis_Data2015::Begin(){
 	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_pt",         50, 0, 1000, ";RC jet"+str_id+"  p_{T} [GeV]"      ,  false, &(m_outData -> o_rcjets), iRCJet, "Pt");
 	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_eta",        0.2, -3, 3,  ";RC jet"+str_id+"  #eta"             ,  false, &(m_outData -> o_rcjets), iRCJet, "Eta");
 	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_m",          10, 0, 500,  ";RC jet"+str_id+"  mass [GeV]"       ,  false, &(m_outData -> o_rcjets), iRCJet, "M");
-	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_nconsts",    1, -0.5,7.5, ";Number of RC jet"+str_id+"  consts" ,  false,    &(m_outData -> o_rcjets), iRCJet, "nconsts");
-	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_nbconsts",    1, -0.5,7.5, ";Number of RC jet"+str_id+" b-tagged consts" ,  
-					 false,    &(m_outData -> o_rcjets), iRCJet, "nbconsts");
+	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_nconsts",    1, -0.5,5.5, ";Number of RC jet"+str_id+"  consts" ,  false,    &(m_outData -> o_rcjets), iRCJet, "nconsts");
+	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_nbconsts",    1, -0.5,5.5, ";Number of RC jet"+str_id+" b-tagged consts" ,  false,    &(m_outData -> o_rcjets), iRCJet, "nbconsts");
 	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_isRCTTMass", 1, -.5, 1.5, ";Mass Tag"          ,  false,    &(m_outData -> o_rcjets), iRCJet, "isRCTTMass");
 
       }
@@ -764,15 +771,63 @@ bool VLQ_Analysis_Data2015::Begin(){
 					 , false, &(m_outData -> o_rcjets), iRCJet, "pT_truth");
 	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id + "_fpT_truth", 0.1,0.,2., ";RC jet"+str_id+" p_{T}^{reco} / p_{T}^{truth}"
 					 , false, &(m_outData -> o_rcjets), iRCJet, "fpT_reco");
-	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id + "_pdgId_truth", 1.,0.,30., ";RC jet"+str_id+" PDGID^{truth}"
-					 , false, &(m_outData -> o_rcjets), iRCJet, "pdgId_truth");
 	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id + "_dR_truth", 0.1,0.,6., ";RC jet"+str_id+" #DeltaR^{truth}"
 					 , false, &(m_outData -> o_rcjets), iRCJet, "dR_truth");
 	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id + "_nmatch_truth", 1.,0.,3., ";RC jet"+str_id+" N_{match}^{truth}"
 					 , false, &(m_outData -> o_rcjets), iRCJet, "nmatch_truth");
+  m_outMngrHist -> AddStandardTH1( "RCjet"+str_id + "_pdgId_truth", 1.,0.,30., ";RC jet"+str_id+" PDGID^{truth}"
+           , false, &(m_outData -> o_rcjets), iRCJet, "pdgId_truth");
+
+  m_outMngrHist -> AddStandardTH2( "RCjet"+str_id+"_pt", "RCjet"+str_id+"_pdgId_truth", 50, 0, 1000, 1, 0., 26.
+           , "RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" PDGID^{truth}", "RC jet"+str_id+" PDGID^{truth}"
+           , false, &(m_outData -> o_rcjets), &(m_outData -> o_rcjets), iRCJet, iRCJet, false, "Pt", "pdgId_truth" );
+  m_outMngrHist -> AddStandardTH2( "RCjet"+str_id+"_m", "RCjet"+str_id+"_pdgId_truth", 10, 0, 500, 1, 0., 26.
+           , "RC jet"+str_id+" mass [GeV]; RC jet"+str_id+" mass [GeV]; RC jet"+str_id+" PDGID^{truth}", "RC jet"+str_id+" PDGID^{truth}"
+           , false, &(m_outData -> o_rcjets), &(m_outData -> o_rcjets), iRCJet, iRCJet, false, "M", "pdgId_truth" );
+  m_outMngrHist -> AddStandardTH2( "RCjet"+str_id+"_nconsts", "RCjet"+str_id+"_pdgId_truth", 1, -0.5, 5.5, 1, 0., 26.
+           , "Number of RC jet"+str_id+" consts; Number of RC jet"+str_id+" consts; RC jet"+str_id+" PDGID^{truth}", "RC jet"+str_id+" PDGID^{truth}"
+           , false, &(m_outData -> o_rcjets), &(m_outData -> o_rcjets), iRCJet, iRCJet, false, "nconsts", "pdgId_truth" );
+  m_outMngrHist -> AddStandardTH2( "RCjet"+str_id+"_nbconsts", "RCjet"+str_id+"_pdgId_truth", 1, -0.5, 5.5, 1, 0., 26.
+           , "Number of RC jet"+str_id+" b-tagged consts; Number of RC jet"+str_id+" b-tagged consts; RC jet"+str_id+" PDGID^{truth}", "RC jet"+str_id+" PDGID^{truth}"
+           , false, &(m_outData -> o_rcjets), &(m_outData -> o_rcjets), iRCJet, iRCJet, false, "nbconsts", "pdgId_truth" );
       }
     }
 
+    for ( const std::string type : m_truthRCTypes ){
+
+      std::string tagstring = "";
+      if(type=="truthTop"){ tagstring = "top"; }
+      else if(type=="truthZ"){ tagstring = "Z"; }
+      else if(type=="truthW"){ tagstring = "W"; }
+      else if(type=="truthHiggs"){ tagstring = "Higgs"; }
+      else if(type=="truthOther"){ tagstring = "unmatched"; }
+
+      for ( int iRCJet =-1; iRCJet <=0; ++iRCJet ) {
+        std::string str_id = "";
+        str_id += std::to_string(iRCJet);
+        if(iRCJet==-1) str_id = "s";    
+
+        m_outMngrHist -> AddStandardTH2( type+"_RCjet"+str_id+"_pt", type+"_RCjet"+str_id+"_m", 50, 0, 1200, 10, 0, 500
+           , "truth "+tagstring+" RC jet"+str_id+" p_{T} [GeV]; truth "+tagstring+" RC jet"+str_id+" p_{T} [GeV]; truth "+tagstring+" RC jet"+str_id+" mass [GeV]", "truth "+tagstring+" RC jet"+str_id+" mass [GeV]"
+           , false, &(m_outData -> o_rcjets_truthmatched.at(type)), &(m_outData -> o_rcjets_truthmatched.at(type)), iRCJet, iRCJet, false, "Pt", "M" );
+        m_outMngrHist -> AddStandardTH2( type+"_RCjet"+str_id+"_pt", type+"_RCjet"+str_id+"_nconsts", 50, 0, 1200, 1, -0.5, 5.5
+           , "truth "+tagstring+" RC jet"+str_id+" p_{T} [GeV]; truth "+tagstring+" RC jet"+str_id+" p_{T} [GeV]; Number of truth "+tagstring+" RC jet"+str_id+" consts", "Number of truth "+tagstring+" RC jet"+str_id+" consts"
+           , false, &(m_outData -> o_rcjets_truthmatched.at(type)), &(m_outData -> o_rcjets_truthmatched.at(type)), iRCJet, iRCJet, false, "Pt", "nconsts" );
+        m_outMngrHist -> AddStandardTH2( type+"_RCjet"+str_id+"_pt", type+"_RCjet"+str_id+"_nbconsts", 50, 0, 1200, 1, -0.5, 5.5
+           , "truth "+tagstring+" RC jet"+str_id+" p_{T} [GeV]; truth "+tagstring+" RC jet"+str_id+" p_{T} [GeV]; Number of truth "+tagstring+" RC jet"+str_id+" b-tagged consts", "Number of truth "+tagstring+" RC jet"+str_id+" b-tagged consts"
+           , false, &(m_outData -> o_rcjets_truthmatched.at(type)), &(m_outData -> o_rcjets_truthmatched.at(type)), iRCJet, iRCJet, false, "Pt", "nbconsts" );
+
+        m_outMngrHist -> AddStandardTH1( type+"_RCjet"+str_id+"_pt", 50, 0, 1200, ";truth "+tagstring+" RC jet"+str_id+" p_{T} [GeV]", false, &(m_outData -> o_rcjets_truthmatched.at(type)), iRCJet, "Pt");
+        m_outMngrHist -> AddStandardTH1( type+"_RCjet"+str_id+"_m", 10, 0, 500, ";truth "+tagstring+" RC jet"+str_id+" mass [GeV]", false, &(m_outData -> o_rcjets_truthmatched.at(type)), iRCJet, "M");
+        m_outMngrHist -> AddStandardTH1( type+"_RCjet"+str_id+"_nconsts", 1, -0.5, 5.5, ";Number of truth "+tagstring+" RC jet"+str_id+" consts", false, &(m_outData -> o_rcjets_truthmatched.at(type)), iRCJet, "nconsts");
+        m_outMngrHist -> AddStandardTH1( type+"_RCjet"+str_id+"_nbconsts", 1, -0.5, 5.5, ";Number of truth "+tagstring+" RC jet"+str_id+" b-tagged consts", false, &(m_outData -> o_rcjets_truthmatched.at(type)), iRCJet, "nbconsts");
+
+      }
+
+      // m_outMngrHist -> AddStandardTH1( type+"_RCjets_n", 1, -0.5, 4.5, ";Number of truth "+tagstring+" RC jets"
+         // , false, &(m_outData -> o_rcjets_truthmatched_n.at(type)));
+    }
+
     for ( const std::string decayType : {"Ht", "Zt", "Wb"} ){
       m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ_n", 1, -0.5, 5.5, ";Number of "+decayType+" reco VLQ",  otherVariables, &(m_outData -> o_recoVLQ_n.at(decayType)) );
       for ( int iTT =-1; iTT <=1; ++iTT ) {
@@ -910,13 +965,13 @@ bool VLQ_Analysis_Data2015::Begin(){
 					   , false, &(m_outData -> o_taggedjets.at(type)), iTT, "pT_truth");
 	  m_outMngrHist -> AddStandardTH1( type + "_jet"+str_id + "_fpT_truth", 0.1,0.,2., "; "+tagstring+" jet"+str_id+" p_{T}^{reco} / p_{T}^{truth}"
 					   , false, &(m_outData -> o_taggedjets.at(type)), iTT, "fpT_truth");
-	  m_outMngrHist -> AddStandardTH1( type + "_jet"+str_id + "_pdgId_truth", 1.,0.,30., "; "+tagstring+" jet"+str_id+" PDGID^{truth}"
-					   , false, &(m_outData -> o_taggedjets.at(type)), iTT, "pdgId_truth");
 	  m_outMngrHist -> AddStandardTH1( type + "_jet"+str_id + "_dR_truth", 0.1,0.,6., "; "+tagstring+" jet"+str_id+" #DeltaR^{truth}"
 					   , false, &(m_outData -> o_taggedjets.at(type)), iTT, "dR_truth");
 	  m_outMngrHist -> AddStandardTH1( type + "_jet"+str_id + "_nmatch_truth", 1.,0.,3., "; "+tagstring+" jet"+str_id+" N_{match}^{truth}"
 					   , false, &(m_outData -> o_taggedjets.at(type)), iTT, "nmatch_truth");
-	}
+    m_outMngrHist -> AddStandardTH1( type + "_jet"+str_id + "_pdgId_truth", 1.,0.,26., "; "+tagstring+" jet"+str_id+" PDGID^{truth}"
+             , false, &(m_outData -> o_taggedjets.at(type)), iTT, "pdgId_truth");
+    }
 
       }//index loop
     }
@@ -1730,7 +1785,35 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry)
 	  continue;
 	}
 	for( AnalysisObject* parton : *rescol ){
-	  m_truthMngr -> MatchPartonToFatJets(*(m_outData -> o_rcjets), parton, 0.75 /*maxDR*/, true /*rcCollection*/, true /*containment*/, 1.0 /*drcontained*/, true /*checkPt*/); 
+    m_truthMngr -> MatchPartonToFatJets(*(m_outData -> o_rcjets), parton, 0.75 /*maxDR*/, true /*rcCollection*/, false /*tagCollection*/, true /*containment*/, 1.0 /*drcontained*/, true /*checkPt*/); 
+
+    //===== Fill truth matched RC jets map =====
+    for( AnalysisObject* rcjet : *(m_outData -> o_rcjets) ){
+      if( rcjet -> GetMoment("pdgId_truth") == 6 ){
+        m_outData -> o_rcjets_truthmatched.at("truthTop") -> push_back(rcjet);
+      }
+      if( rcjet -> GetMoment("pdgId_truth") == 23 ){
+        // std::cout << "filled Z rcjet" << std::endl;
+        m_outData -> o_rcjets_truthmatched.at("truthZ") -> push_back(rcjet);
+      }
+      if( rcjet -> GetMoment("pdgId_truth") == 24 ){
+        m_outData -> o_rcjets_truthmatched.at("truthW") -> push_back(rcjet);
+      }
+      if( rcjet -> GetMoment("pdgId_truth") == 25 ){
+        // std::cout << "filled H rcjet" << std::endl;
+        m_outData -> o_rcjets_truthmatched.at("truthHiggs") -> push_back(rcjet);
+      }
+      if( rcjet -> GetMoment("pdgId_truth") == 0 ){
+        // std::cout << "filled H rcjet" << std::endl;
+        m_outData -> o_rcjets_truthmatched.at("truthOther") -> push_back(rcjet);
+      }
+    }
+    m_outData -> o_rcjets_truthmatched_n.at("truthTop")   = m_outData -> o_rcjets_truthmatched.at("truthTop")   -> size();
+    m_outData -> o_rcjets_truthmatched_n.at("truthZ")     = m_outData -> o_rcjets_truthmatched.at("truthZ")     -> size();
+    m_outData -> o_rcjets_truthmatched_n.at("truthW")     = m_outData -> o_rcjets_truthmatched.at("truthW")     -> size();
+    m_outData -> o_rcjets_truthmatched_n.at("truthHiggs") = m_outData -> o_rcjets_truthmatched.at("truthHiggs") -> size();
+    m_outData -> o_rcjets_truthmatched_n.at("truthOther") = m_outData -> o_rcjets_truthmatched.at("truthOther") -> size();
+
 	}//each parton in collection
 
       }//each collection of heavy resonance
@@ -1741,7 +1824,7 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry)
 
 	  AOVector& recoVLQCollection = *(m_outData -> o_recoVLQ.at(decayType));
 	  for( AnalysisObject* partonVLQ : *(m_outData -> o_truth_partons.at("VLQ_"+decayType)) ){
-	    m_truthMngr -> MatchPartonToFatJets( recoVLQCollection, partonVLQ, 1. /*maxDR*/, false /*rcCollection*/, false /*containment*/, 1.0 /*drcontained*/, true /*checkPt*/ );
+	    m_truthMngr -> MatchPartonToFatJets( recoVLQCollection, partonVLQ, 1. /*maxDR*/, false /*rcCollection*/, false /*tagCollection*/, false /*containment*/, 1.0 /*drcontained*/, true /*checkPt*/ );
 	  }
 
 	}
diff --git a/Root/VLQ_OutputData.cxx b/Root/VLQ_OutputData.cxx
index a063af1..1eb658f 100644
--- a/Root/VLQ_OutputData.cxx
+++ b/Root/VLQ_OutputData.cxx
@@ -146,6 +146,21 @@ o_is_ttbar(false)
   }
   jetTaggedType.clear();
 
+  o_rcjets_truthmatched_n.clear();
+  o_rcjets_truthmatched.clear();
+
+  std::vector < std::string > rcjetTruthType;
+  rcjetTruthType.push_back("truthTop");
+  rcjetTruthType.push_back("truthZ");
+  rcjetTruthType.push_back("truthW");
+  rcjetTruthType.push_back("truthHiggs");
+  rcjetTruthType.push_back("truthOther");
+  for ( const std::string type : rcjetTruthType ){
+    o_rcjets_truthmatched.insert( std::pair<std::string, AOVector*>( type, new AOVector() ) );
+    o_rcjets_truthmatched_n.insert( std::pair<std::string, int>( type, 0 ) );
+  }
+  rcjetTruthType.clear();
+
   o_el = new AOVector();
   o_mu = new AOVector();
   o_lep = new AOVector();
@@ -248,6 +263,7 @@ VLQ_OutputData::~VLQ_OutputData()
 
   ClearOutputData();
   o_taggedjets_n.clear();
+  o_rcjets_truthmatched_n.clear();
 
   for(TriggerInfo* trig : o_trigger_list){ delete trig; }
   o_trigger_list.clear();
@@ -573,6 +589,13 @@ void VLQ_OutputData::ClearOutputData()
     obj_pair.second->clear();
   }
 
+  for ( std::pair < std::string, int > component : o_rcjets_truthmatched_n ){
+    o_rcjets_truthmatched_n.at(component.first) = 0;
+  }
+
+  for(std::pair<std::string, AOVector*> obj_pair : o_rcjets_truthmatched){
+    obj_pair.second->clear();
+  }
 
   for ( std::pair < std::string, int > component : o_recoVLQ_n ){
     o_recoVLQ_n.at(component.first) = 0;
diff --git a/VLQAnalysis/VLQ_Analysis_Data2015.h b/VLQAnalysis/VLQ_Analysis_Data2015.h
index 1772267..393c76c 100644
--- a/VLQAnalysis/VLQ_Analysis_Data2015.h
+++ b/VLQAnalysis/VLQ_Analysis_Data2015.h
@@ -54,6 +54,7 @@ private:
     VLQ_Selector *m_selector;
     std::map < std::string, std::vector < std::string > > m_channels;
     std::vector < std::string > m_topTaggers;
+    std::vector < std::string > m_truthRCTypes;
     std::map < int, int > m_map_region_enum_index;
 
 };//end of class VLQ_Analysis_Data2015
diff --git a/VLQAnalysis/VLQ_OutputData.h b/VLQAnalysis/VLQ_OutputData.h
index 6dcf157..47d7ac4 100644
--- a/VLQAnalysis/VLQ_OutputData.h
+++ b/VLQAnalysis/VLQ_OutputData.h
@@ -137,6 +137,9 @@ public:
     std::vector< AnalysisObject* >* o_bjets_lowb_3b;
     std::vector< AnalysisObject* >* o_bjets_lowb_4b;
 
+    std::map< std::string, int > o_rcjets_truthmatched_n;
+    std::map< std::string, std::vector< AnalysisObject* >*  > o_rcjets_truthmatched;
+
     //
     // Lepton variables
     //
diff --git a/python/Submit_VLQAnalysis_new.py b/python/Submit_VLQAnalysis_new.py
index bb2d2ac..dd341ad 100644
--- a/python/Submit_VLQAnalysis_new.py
+++ b/python/Submit_VLQAnalysis_new.py
@@ -4,7 +4,7 @@ import time, getpass
 import socket
 import sys
 import datetime
-from VLQ_Samples import *
+from VLQ_Samples_mc import *
 
 sys.path.append( os.getenv("ROOTCOREBIN") + "python/IFAETopFramework/" )
 from BatchTools import *
@@ -24,15 +24,13 @@ nFilesSplit = 20 #number of files to merge in a single run of the code (chaining
 nMerge = 10 #number of merged running of the code in a single job
 channels = ["./.",]
 sleep = 1
-param_runR21 = False
+param_campaign = ""
 param_runQCD = True
 param_runData = True
 param_runTOPQ1Data = True
 param_runTOPQ4Data = True
 param_runSignal = True
 param_runVLQ = True
-param_runHBSM = True
-param_runFCNC = True
 param_run4tops = True
 param_useSlices = True
 param_useObjectSyst = False
@@ -42,7 +40,7 @@ param_produceTarBall = True
 param_tarballPath = ""
 param_dryRun = False
 param_queue = "at3_short"
-param_inputDir="/nfs/at3/scratch2/lvalery/VLQFiles/MBJ-2.4.24-1-0/" #place where to find the input files
+param_inputDir="/nfs/at3/scratch2/farooque/MBJOutputs/tag-21.2.67-htztx-0-MV2/" #place where to find the input files
 param_outputDir = "/nfs/at3/scratch2/"+os.getenv("USER")+"/VLQAnalysisRun2/VLQAnalysisOutputs_" #output repository
 param_outputDirSuffix = "NOW"
 userParams = []
@@ -54,8 +52,8 @@ if(len(sys.argv))>1:
             sys.exit(-1)
         argument = splitted[0].upper().replace("--","")
         value = splitted[1]
-        if(argument=="RUNR21"):
-            param_runR21 = (value.upper()=="TRUE")
+        if(argument=="CAMPAIGN"):
+            param_campaign = value
         elif(argument=="NFILESPLIT"):
             nFilesSplit = int(value)
         elif(argument=="NMERGE"):
@@ -115,7 +113,7 @@ param_outputDir += param_outputDirSuffix
 
 ##______________________________________________________________________________
 ## Printing the options
-print "param_runR21 = ", param_runR21
+print "param_campaign = ", param_campaign
 print "nFilesSplit = ", nFilesSplit
 print "nMerge = ", nMerge
 
@@ -190,16 +188,12 @@ if param_runData :
     if param_runTOPQ4Data:
         Samples += GetDataSamples( data_type = "TOPQ4" )
 
-#Samples += GetBenchmarkVLQSamples(   useWeightSyst = param_useWeightSyst, useObjectSyst = param_useObjectSyst )
-#Samples += GetTtbarSamples ( useWeightSyst = param_useWeightSyst, useObjectSyst = param_useObjectSyst, ttbarSystSamples = False, hfSplitted = True, useHTSlices = param_useSlices )
+# Samples += GetSingleVLQSamples(   useWeightSyst = param_useWeightSyst, useObjectSyst = param_useObjectSyst, campaign = param_campaign )
+# Samples += GetTtbarSamples ( useWeightSyst = param_useWeightSyst, useObjectSyst = param_useObjectSyst, ttbarSystSamples = False, hfSplitted = True, useHTSlices = param_useSlices, campaign = param_campaign )
 
-#ObjectSystematics = [getSystematics(name="nominal",nameUp="",oneSided=True)]
-#Samples += [getSampleUncertainties("VLQ_TT_1000","302476.", ObjectSystematics ,[])]#TT 1000    
-#Samples += [getSampleUncertainties("VLQ_BB_1000","302494.", ObjectSystematics , [])]#BB 1000    
-
-#Samples += GetOtherSamples ( useWeightSyst = param_useWeightSyst, useObjectSyst = param_useObjectSyst,
-#                             includeSignals = param_runSignal, includeVLQ = param_runVLQ,
-#                             includeHBSM = param_runHBSM, include4tops = param_run4tops, includeFCNC = param_runFCNC)
+Samples += GetOtherSamples ( useWeightSyst = param_useWeightSyst, useObjectSyst = param_useObjectSyst,
+                            includeSignals = param_runSignal, includeVLQ = param_runVLQ,
+                            include4tops = param_run4tops, campaign=param_campaign)
 
 #Samples += GetVLQSamples(   useWeightSyst = param_useWeightSyst, useObjectSyst = param_useObjectSyst )
 
-- 
GitLab


From 497c630bfdfe483ae2bfa5850013b6ab8493bd8f Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Thu, 25 Jul 2019 11:46:14 +0200
Subject: [PATCH 03/33] Trivial change in VLQ_Samples

---
 python/VLQ_Samples.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/python/VLQ_Samples.py b/python/VLQ_Samples.py
index a087c02..4b22382 100644
--- a/python/VLQ_Samples.py
+++ b/python/VLQ_Samples.py
@@ -510,8 +510,6 @@ def GetSingleVLQSamples( useWeightSyst=False, useObjectSyst=False):
     Samples     += [getSampleUncertainties("sVLQ_ZTZt11K05","307042.", ObjectSystematics , WeightSystematics)]
     Samples     += [getSampleUncertainties("sVLQ_ZTZt16K05","307047.", ObjectSystematics , WeightSystematics)]
 
-
-
     return Samples
 
 def GetVLQBSamples( useWeight=False, useObjectSys=False):
-- 
GitLab


From b90e95f32b4c571462973de35533c88825d3ed4c Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 30 Jul 2019 20:03:40 +0200
Subject: [PATCH 04/33] Commit stage for boosted object tagging, new point:
 STANDARD

---
 python/Submit_VLQAnalysis_new.py | 8 ++++----
 python/VLQ_Samples.py            | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/python/Submit_VLQAnalysis_new.py b/python/Submit_VLQAnalysis_new.py
index dd341ad..e5bce6a 100644
--- a/python/Submit_VLQAnalysis_new.py
+++ b/python/Submit_VLQAnalysis_new.py
@@ -188,12 +188,12 @@ if param_runData :
     if param_runTOPQ4Data:
         Samples += GetDataSamples( data_type = "TOPQ4" )
 
-# Samples += GetSingleVLQSamples(   useWeightSyst = param_useWeightSyst, useObjectSyst = param_useObjectSyst, campaign = param_campaign )
+Samples += GetSingleVLQSamples(   useWeightSyst = param_useWeightSyst, useObjectSyst = param_useObjectSyst, campaign = param_campaign )
 # Samples += GetTtbarSamples ( useWeightSyst = param_useWeightSyst, useObjectSyst = param_useObjectSyst, ttbarSystSamples = False, hfSplitted = True, useHTSlices = param_useSlices, campaign = param_campaign )
 
-Samples += GetOtherSamples ( useWeightSyst = param_useWeightSyst, useObjectSyst = param_useObjectSyst,
-                            includeSignals = param_runSignal, includeVLQ = param_runVLQ,
-                            include4tops = param_run4tops, campaign=param_campaign)
+# Samples += GetOtherSamples ( useWeightSyst = param_useWeightSyst, useObjectSyst = param_useObjectSyst,
+#                             includeSignals = param_runSignal, includeVLQ = param_runVLQ,
+#                             include4tops = param_run4tops, campaign=param_campaign)
 
 #Samples += GetVLQSamples(   useWeightSyst = param_useWeightSyst, useObjectSyst = param_useObjectSyst )
 
diff --git a/python/VLQ_Samples.py b/python/VLQ_Samples.py
index 4b22382..cc87842 100644
--- a/python/VLQ_Samples.py
+++ b/python/VLQ_Samples.py
@@ -493,17 +493,17 @@ def GetSingleVLQSamples( useWeightSyst=False, useObjectSyst=False):
     Samples     =  []
 
     Samples     += [getSampleUncertainties("sVLQ_WTHt11K03","310778.", ObjectSystematics , WeightSystematics)]
-    Samples     += [getSampleUncertainties("sVLQ_WTHt16K03","311376.", ObjectSystematics , WeightSystematics)]
+    # Samples     += [getSampleUncertainties("sVLQ_WTHt16K03","311376.", ObjectSystematics , WeightSystematics)]
     Samples     += [getSampleUncertainties("sVLQ_WTHt16K05","311377.", ObjectSystematics , WeightSystematics)]
     Samples     += [getSampleUncertainties("sVLQ_WTHt20K05","310777.", ObjectSystematics , WeightSystematics)]
-    Samples     += [getSampleUncertainties("sVLQ_WTHt20K05R20","307018.", ObjectSystematics , WeightSystematics)]
+    # Samples     += [getSampleUncertainties("sVLQ_WTHt20K05R20","307018.", ObjectSystematics , WeightSystematics)]
 
     Samples     += [getSampleUncertainties("sVLQ_WTZt11K03","310776.", ObjectSystematics , WeightSystematics)]
     Samples     += [getSampleUncertainties("sVLQ_WTZt16K05","306997.", ObjectSystematics , WeightSystematics)]
     Samples     += [getSampleUncertainties("sVLQ_WTZt20K05","310779.", ObjectSystematics , WeightSystematics)]
 
     Samples     += [getSampleUncertainties("sVLQ_ZTHt11K05","307054.", ObjectSystematics , WeightSystematics)]
-    Samples     += [getSampleUncertainties("sVLQ_ZTHt16K03","311365.", ObjectSystematics , WeightSystematics)]
+    # Samples     += [getSampleUncertainties("sVLQ_ZTHt16K03","311365.", ObjectSystematics , WeightSystematics)]
     Samples     += [getSampleUncertainties("sVLQ_ZTHt16K05","307059.", ObjectSystematics , WeightSystematics)]
     Samples     += [getSampleUncertainties("sVLQ_ZTHt20K05","307061.", ObjectSystematics , WeightSystematics)]
 
-- 
GitLab


From 0498b0de587a3c00aeca16a6ee96a8eae08f5388 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 30 Jul 2019 20:05:12 +0200
Subject: [PATCH 05/33] Commit stage for boosted object tagging, new point: A1

---
 Root/VLQ_AnalysisTools.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index 62c98e0..84fe476 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -506,7 +506,7 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       const bool isHOT = obj->M() > 100 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= m_opt->RCNsubjetsCut() && obj -> Pt() > 300;
       obj -> SetMoment("isRCTTMass", isHOT);
       // Exclusive top-tagging
-      bool isTop = obj -> Pt() > 400 && obj->M() > 140;// && obj->M() < 210.;
+      bool isTop = obj -> Pt() > 400 && obj->M() > 140 && obj->M() < 210.;
       isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
-- 
GitLab


From 882480fa9ab49b7df50b0cbed1db20aefe0a9788 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 30 Jul 2019 20:06:25 +0200
Subject: [PATCH 06/33] Commit stage for boosted object tagging, new point: A2

---
 Root/VLQ_AnalysisTools.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index 84fe476..429829c 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -506,7 +506,7 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       const bool isHOT = obj->M() > 100 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= m_opt->RCNsubjetsCut() && obj -> Pt() > 300;
       obj -> SetMoment("isRCTTMass", isHOT);
       // Exclusive top-tagging
-      bool isTop = obj -> Pt() > 400 && obj->M() > 140 && obj->M() < 210.;
+      bool isTop = obj -> Pt() > 400 && obj->M() > 140 && obj->M() < 240.;
       isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
-- 
GitLab


From 310c3352fb3a6c6edd1ad724c107ee00f90a687d Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 30 Jul 2019 20:08:17 +0200
Subject: [PATCH 07/33] Commit stage for boosted object tagging, new point: B1

---
 Root/VLQ_AnalysisTools.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index 429829c..fa2fefa 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -506,11 +506,11 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       const bool isHOT = obj->M() > 100 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= m_opt->RCNsubjetsCut() && obj -> Pt() > 300;
       obj -> SetMoment("isRCTTMass", isHOT);
       // Exclusive top-tagging
-      bool isTop = obj -> Pt() > 400 && obj->M() > 140 && obj->M() < 240.;
+      bool isTop = obj -> Pt() > 400 && obj->M() > 135;//&& obj->M() < 240.;
       isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
-      bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 140;
+      bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 135;
       isHiggs = isHiggs && ( obj -> Pt() > 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
       obj -> SetMoment("isRCMHiggs", isHiggs);
       //Exclusive V(W/Z)-tagging
-- 
GitLab


From 009df768e90fbefecb62c957fd78a2ee67ab065e Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 30 Jul 2019 20:10:53 +0200
Subject: [PATCH 08/33] Commit stage for boosted object tagging, new point: B2

---
 Root/VLQ_AnalysisTools.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index fa2fefa..7c4651f 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -506,11 +506,11 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       const bool isHOT = obj->M() > 100 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= m_opt->RCNsubjetsCut() && obj -> Pt() > 300;
       obj -> SetMoment("isRCTTMass", isHOT);
       // Exclusive top-tagging
-      bool isTop = obj -> Pt() > 400 && obj->M() > 135;//&& obj->M() < 240.;
+      bool isTop = obj -> Pt() > 400 && obj->M() > 145;//&& obj->M() < 240.;
       isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
-      bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 135;
+      bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 145;
       isHiggs = isHiggs && ( obj -> Pt() > 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
       obj -> SetMoment("isRCMHiggs", isHiggs);
       //Exclusive V(W/Z)-tagging
-- 
GitLab


From bb0d99eb20251761809e7a8d261b40b4c72acf74 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 30 Jul 2019 20:47:27 +0200
Subject: [PATCH 09/33] Commit stage for boosted object tagging, new point: C1

---
 Root/VLQ_AnalysisTools.cxx | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index 7c4651f..8c1b23a 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -506,16 +506,25 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       const bool isHOT = obj->M() > 100 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= m_opt->RCNsubjetsCut() && obj -> Pt() > 300;
       obj -> SetMoment("isRCTTMass", isHOT);
       // Exclusive top-tagging
-      bool isTop = obj -> Pt() > 400 && obj->M() > 145;//&& obj->M() < 240.;
-      isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
+      bool isTop = obj -> Pt() > 300 && obj->M() > 140;//&& obj->M() < 240.;
+      // isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
+        isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 3 ? obj -> Pt() > 300 : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 650 );
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
-      bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 145;
-      isHiggs = isHiggs && ( obj -> Pt() > 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
+      bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 140;
+      // isHiggs = isHiggs && ( obj -> Pt() > 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
+        isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 300 ) && ( obj -> Pt() < 550 )  : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 350 ) && ( obj -> Pt() < 800 ) :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 600 );
       obj -> SetMoment("isRCMHiggs", isHiggs);
       //Exclusive V(W/Z)-tagging
       bool isV = obj -> Pt() > 200 && obj->M() > 70 && obj->M() < 105;
-      isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
+      // isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
+      isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 200 ) && ( obj -> Pt() < 550 ) : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 350 ) && ( obj -> Pt() < 750 ) :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 550 );
       obj -> SetMoment("isRCMV", isV);
       // Very loose HOT jets
       const bool isLooseHOT = obj->M() > 50 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1 && obj -> Pt() > 300;
-- 
GitLab


From fc5c8e518e24ac8ae61327d9f6428843bb96a0ff Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 30 Jul 2019 20:51:07 +0200
Subject: [PATCH 10/33] Commit stage for boosted object tagging, new point: C2

---
 Root/VLQ_AnalysisTools.cxx | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index 8c1b23a..e34e12d 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -506,25 +506,25 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       const bool isHOT = obj->M() > 100 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= m_opt->RCNsubjetsCut() && obj -> Pt() > 300;
       obj -> SetMoment("isRCTTMass", isHOT);
       // Exclusive top-tagging
-      bool isTop = obj -> Pt() > 300 && obj->M() > 140;//&& obj->M() < 240.;
+      bool isTop = obj -> Pt() > 350 && obj->M() > 140;//&& obj->M() < 240.;
       // isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
-        isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 3 ? obj -> Pt() > 300 : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 :
+        isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 3 ? obj -> Pt() > 350 : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 400 :
         m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 650 );
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
       bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 140;
       // isHiggs = isHiggs && ( obj -> Pt() > 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
-        isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 300 ) && ( obj -> Pt() < 550 )  : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 350 ) && ( obj -> Pt() < 800 ) :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 600 );
+        isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 350 ) && ( obj -> Pt() < 500 )  : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 400 ) && ( obj -> Pt() < 750 ) :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 700 );
       obj -> SetMoment("isRCMHiggs", isHiggs);
       //Exclusive V(W/Z)-tagging
       bool isV = obj -> Pt() > 200 && obj->M() > 70 && obj->M() < 105;
       // isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
-      isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 200 ) && ( obj -> Pt() < 550 ) : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 350 ) && ( obj -> Pt() < 750 ) :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 550 );
+      isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 300 ) && ( obj -> Pt() < 450 ) : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 400 ) && ( obj -> Pt() < 700 ) :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 650 );
       obj -> SetMoment("isRCMV", isV);
       // Very loose HOT jets
       const bool isLooseHOT = obj->M() > 50 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1 && obj -> Pt() > 300;
-- 
GitLab


From 6fe7071ce34960eb7c26e3e2c0f52510de9e9930 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 30 Jul 2019 21:10:27 +0200
Subject: [PATCH 11/33] Commit stage for boosted object tagging, new point: E1

---
 Root/VLQ_AnalysisTools.cxx | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index e34e12d..ca3293d 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -506,25 +506,27 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       const bool isHOT = obj->M() > 100 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= m_opt->RCNsubjetsCut() && obj -> Pt() > 300;
       obj -> SetMoment("isRCTTMass", isHOT);
       // Exclusive top-tagging
-      bool isTop = obj -> Pt() > 350 && obj->M() > 140;//&& obj->M() < 240.;
+      bool isTop = obj -> Pt() > 300 && obj->M() > 140;//&& obj->M() < 240.;
       // isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
-        isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 3 ? obj -> Pt() > 350 : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 400 :
+        isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 3 ? obj -> Pt() > 300 : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 :
         m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 650 );
+        isTop = isTop && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
       bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 140;
       // isHiggs = isHiggs && ( obj -> Pt() > 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
-        isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 350 ) && ( obj -> Pt() < 500 )  : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 400 ) && ( obj -> Pt() < 750 ) :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 700 );
+        isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 300 ) && ( obj -> Pt() < 550 )  : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 350 ) && ( obj -> Pt() < 800 ) :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 600 );
+        isHiggs = isHiggs && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
       obj -> SetMoment("isRCMHiggs", isHiggs);
       //Exclusive V(W/Z)-tagging
       bool isV = obj -> Pt() > 200 && obj->M() > 70 && obj->M() < 105;
       // isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
-      isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 300 ) && ( obj -> Pt() < 450 ) : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 400 ) && ( obj -> Pt() < 700 ) :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 650 );
+      isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 200 ) && ( obj -> Pt() < 550 ) : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 350 ) && ( obj -> Pt() < 750 ) :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 550 );
       obj -> SetMoment("isRCMV", isV);
       // Very loose HOT jets
       const bool isLooseHOT = obj->M() > 50 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1 && obj -> Pt() > 300;
-- 
GitLab


From 20683ce7913bbcd075edb47b6a2f9cad5b9dac0f Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 30 Jul 2019 21:12:32 +0200
Subject: [PATCH 12/33] Commit stage for boosted object tagging, new point: E2

---
 Root/VLQ_AnalysisTools.cxx | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index ca3293d..58213c3 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -506,27 +506,27 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       const bool isHOT = obj->M() > 100 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= m_opt->RCNsubjetsCut() && obj -> Pt() > 300;
       obj -> SetMoment("isRCTTMass", isHOT);
       // Exclusive top-tagging
-      bool isTop = obj -> Pt() > 300 && obj->M() > 140;//&& obj->M() < 240.;
+      bool isTop = obj -> Pt() > 350 && obj->M() > 140;//&& obj->M() < 240.;
       // isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
-        isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 3 ? obj -> Pt() > 300 : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 :
+        isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 3 ? obj -> Pt() > 350 : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 400 :
         m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 650 );
         isTop = isTop && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
       bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 140;
       // isHiggs = isHiggs && ( obj -> Pt() > 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
-        isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 300 ) && ( obj -> Pt() < 550 )  : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 350 ) && ( obj -> Pt() < 800 ) :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 600 );
-        isHiggs = isHiggs && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
+        isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 350 ) && ( obj -> Pt() < 500 )  : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 400 ) && ( obj -> Pt() < 750 ) :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 700 );
       obj -> SetMoment("isRCMHiggs", isHiggs);
       //Exclusive V(W/Z)-tagging
       bool isV = obj -> Pt() > 200 && obj->M() > 70 && obj->M() < 105;
       // isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
-      isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 200 ) && ( obj -> Pt() < 550 ) : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 350 ) && ( obj -> Pt() < 750 ) :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 550 );
+      isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 300 ) && ( obj -> Pt() < 450 ) : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 400 ) && ( obj -> Pt() < 700 ) :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 650 );
+      isHiggs = isHiggs && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
       obj -> SetMoment("isRCMV", isV);
       // Very loose HOT jets
       const bool isLooseHOT = obj->M() > 50 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1 && obj -> Pt() > 300;
-- 
GitLab


From 6a17b5db726176735b585e615193c535ed2f6a86 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 30 Jul 2019 21:14:50 +0200
Subject: [PATCH 13/33] Commit stage for boosted object tagging, new point: D1

---
 Root/VLQ_AnalysisTools.cxx | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index 58213c3..ddf3720 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -507,25 +507,16 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       obj -> SetMoment("isRCTTMass", isHOT);
       // Exclusive top-tagging
       bool isTop = obj -> Pt() > 350 && obj->M() > 140;//&& obj->M() < 240.;
-      // isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
-        isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 3 ? obj -> Pt() > 350 : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 400 :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 650 );
-        isTop = isTop && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
+      isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
+      isTop = isTop && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
       bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 140;
-      // isHiggs = isHiggs && ( obj -> Pt() > 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
-        isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 350 ) && ( obj -> Pt() < 500 )  : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 400 ) && ( obj -> Pt() < 750 ) :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 700 );
+      isHiggs = isHiggs && ( obj -> Pt() > 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
       obj -> SetMoment("isRCMHiggs", isHiggs);
       //Exclusive V(W/Z)-tagging
       bool isV = obj -> Pt() > 200 && obj->M() > 70 && obj->M() < 105;
-      // isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
-      isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 300 ) && ( obj -> Pt() < 450 ) : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 400 ) && ( obj -> Pt() < 700 ) :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 650 );
+      isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
       isHiggs = isHiggs && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
       obj -> SetMoment("isRCMV", isV);
       // Very loose HOT jets
-- 
GitLab


From c238378cba90586740eda7dea011c6e66ebb538d Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 30 Jul 2019 21:20:29 +0200
Subject: [PATCH 14/33] Commit stage for boosted object tagging, new point: D1
 - CORRECTION

---
 Root/VLQ_AnalysisTools.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index ddf3720..144e05a 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -513,11 +513,11 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       // Exclusive Higgs tagging
       bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 140;
       isHiggs = isHiggs && ( obj -> Pt() > 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
+      isHiggs = isHiggs && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
       obj -> SetMoment("isRCMHiggs", isHiggs);
       //Exclusive V(W/Z)-tagging
       bool isV = obj -> Pt() > 200 && obj->M() > 70 && obj->M() < 105;
       isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
-      isHiggs = isHiggs && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
       obj -> SetMoment("isRCMV", isV);
       // Very loose HOT jets
       const bool isLooseHOT = obj->M() > 50 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1 && obj -> Pt() > 300;
-- 
GitLab


From 8d47590b3eb5c7d3ce093f94e4b4caa333b17b2d Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 30 Jul 2019 21:36:23 +0200
Subject: [PATCH 15/33] Commit stage for boosted object tagging, new point: D2

---
 Root/VLQ_AnalysisTools.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index 144e05a..33ef898 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -508,12 +508,12 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       // Exclusive top-tagging
       bool isTop = obj -> Pt() > 350 && obj->M() > 140;//&& obj->M() < 240.;
       isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
-      isTop = isTop && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
+      isTop = isTop && nb_match >= 1 ;
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
       bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 140;
       isHiggs = isHiggs && ( obj -> Pt() > 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
-      isHiggs = isHiggs && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
+      isHiggs = isHiggs && nb_match >= 1 ;
       obj -> SetMoment("isRCMHiggs", isHiggs);
       //Exclusive V(W/Z)-tagging
       bool isV = obj -> Pt() > 200 && obj->M() > 70 && obj->M() < 105;
-- 
GitLab


From d417d5fd53ece66399a7af52346369ebc552ea75 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 30 Jul 2019 21:39:10 +0200
Subject: [PATCH 16/33] Commit stage for boosted object tagging, new point: E2
 - CORRECTION

---
 Root/VLQ_AnalysisTools.cxx | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index 33ef898..0159414 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -507,17 +507,26 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       obj -> SetMoment("isRCTTMass", isHOT);
       // Exclusive top-tagging
       bool isTop = obj -> Pt() > 350 && obj->M() > 140;//&& obj->M() < 240.;
-      isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
-      isTop = isTop && nb_match >= 1 ;
+      // isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
+        isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 3 ? obj -> Pt() > 350 : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 400 :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 650 );
+        isTop = isTop && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
       bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 140;
-      isHiggs = isHiggs && ( obj -> Pt() > 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
-      isHiggs = isHiggs && nb_match >= 1 ;
+      // isHiggs = isHiggs && ( obj -> Pt() > 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
+        isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 350 ) && ( obj -> Pt() < 500 )  : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 400 ) && ( obj -> Pt() < 750 ) :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 700 );
+        isHiggs = isHiggs && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
       obj -> SetMoment("isRCMHiggs", isHiggs);
       //Exclusive V(W/Z)-tagging
       bool isV = obj -> Pt() > 200 && obj->M() > 70 && obj->M() < 105;
-      isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
+      // isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
+      isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 300 ) && ( obj -> Pt() < 450 ) : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 400 ) && ( obj -> Pt() < 700 ) :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 650 );
       obj -> SetMoment("isRCMV", isV);
       // Very loose HOT jets
       const bool isLooseHOT = obj->M() > 50 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1 && obj -> Pt() > 300;
-- 
GitLab


From 2429514de4fd5aa63383f9110f7632ca570d16d2 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Wed, 31 Jul 2019 17:55:59 +0200
Subject: [PATCH 17/33] Addition to select regions with RCMV1bin multiplicity
 requirements

---
 Root/VLQ_Selector.cxx      | 85 +++++++++++++++++++++++++++++++++++---
 VLQAnalysis/VLQ_Selector.h | 17 ++++++--
 2 files changed, 93 insertions(+), 9 deletions(-)

diff --git a/Root/VLQ_Selector.cxx b/Root/VLQ_Selector.cxx
index 8461ed1..8b919eb 100644
--- a/Root/VLQ_Selector.cxx
+++ b/Root/VLQ_Selector.cxx
@@ -148,7 +148,10 @@ bool VLQ_Selector::Init(){
       MakeSelProp("0Hex",c_0Hex), MakeSelProp("1Hex", c_1Hex), MakeSelProp("1Hin", c_1Hin), MakeSelProp("2Hin", c_2Hin), MakeSelProp("0_1Hwin", c_0_1Hwin) });
 
   m_sel_V_prop = new std::vector<SelProp>({
-      MakeSelProp("0Vex",c_0Vex), MakeSelProp("1Vex", c_1Vex), MakeSelProp("1Vin", c_1Vin), MakeSelProp("2Vin", c_2Vin), MakeSelProp("1VTin", c_1VTin), MakeSelProp("2VTin", c_2VTin), MakeSelProp("1VLTin", c_1VLTin) });
+      MakeSelProp("0Vex",c_0Vex), MakeSelProp("1Vex", c_1Vex), MakeSelProp("1Vin", c_1Vin), MakeSelProp("2Vin", c_2Vin) });
+
+  m_sel_Vb_prop = new std::vector<SelProp>({
+      MakeSelProp("0Vbex",c_0Vbex), MakeSelProp("1Vbex", c_1Vbex), MakeSelProp("1Vbin", c_1Vbin), MakeSelProp("2Vbin", c_2Vbin) });
 
   m_sel_TH_prop = new std::vector<SelProp>({
       MakeSelProp("0THex",c_0THex), MakeSelProp("1THex", c_1THex), MakeSelProp("1THin", c_1THin), MakeSelProp("2THex", c_2THex), MakeSelProp("2THin", c_2THin), MakeSelProp("3THin", c_3THin) });
@@ -159,9 +162,15 @@ bool VLQ_Selector::Init(){
   m_sel_VT_prop = new std::vector<SelProp>({
       MakeSelProp("0VTex",c_0VTex), MakeSelProp("1VTex", c_1VTex), MakeSelProp("1VTin", c_1VTin), MakeSelProp("2VTin", c_2VTin) });
 
+  m_sel_VbT_prop = new std::vector<SelProp>({
+      MakeSelProp("0VbTex",c_0VbTex), MakeSelProp("1VbTex", c_1VbTex), MakeSelProp("1VbTin", c_1VbTin), MakeSelProp("2VbTin", c_2VbTin) });
+
   m_sel_VLT_prop = new std::vector<SelProp>({
       MakeSelProp("0VLTex",c_0VLTex), MakeSelProp("1VLTex", c_1VLTex), MakeSelProp("1VLTin", c_1VLTin), MakeSelProp("2VLTin", c_2VLTin) });
 
+  m_sel_VbLT_prop = new std::vector<SelProp>({
+      MakeSelProp("0VbLTex",c_0VbLTex), MakeSelProp("1VbLTex", c_1VbLTex), MakeSelProp("1VbLTin", c_1VLTin), MakeSelProp("2VbLTin", c_2VLTin) });
+
   m_sel_Mbb_prop = new std::vector<SelProp>({
       MakeSelProp("LowMbb",c_LowMbb), MakeSelProp("HighMbb", c_HighMbb) });
 
@@ -183,10 +192,13 @@ bool VLQ_Selector::Init(){
   for(auto selprop : *m_sel_L_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_H_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_V_prop){ AddSelectionIndex(selprop.name, selprop.index); }
+  for(auto selprop : *m_sel_Vb_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_TH_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_LT_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_VT_prop){ AddSelectionIndex(selprop.name, selprop.index); }
+  for(auto selprop : *m_sel_VbT_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_VLT_prop){ AddSelectionIndex(selprop.name, selprop.index); }
+  for(auto selprop : *m_sel_VbLT_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_Mbb_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_Mtb_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_MetSig_prop){ AddSelectionIndex(selprop.name, selprop.index); }
@@ -701,10 +713,13 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
   SelProp* sprop_L = NULL;
   SelProp* sprop_H = NULL;
   SelProp* sprop_V = NULL;
+  SelProp* sprop_Vb = NULL;
   SelProp* sprop_TH = NULL;
   SelProp* sprop_LT = NULL;
   SelProp* sprop_VT = NULL;
+  SelProp* sprop_VbT = NULL;
   SelProp* sprop_VLT = NULL;
+  SelProp* sprop_VbLT = NULL;
   SelProp* sprop_Mbb = NULL;
   SelProp* sprop_Mtb = NULL;
   SelProp* sprop_MetSig = NULL;
@@ -803,6 +818,14 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     }
     if(found) continue;
 
+    //=============== Vb-tag part ========================
+    for(SelProp& Vbprop : *m_sel_Vb_prop){
+      if(Vbprop.name == _parts_){
+  sprop_Vb = &Vbprop;
+  found = true; n_nodes++; break;
+      }
+    }
+    if(found) continue;
 
    //=============== TH-tag part ========================
     for(SelProp& THprop : *m_sel_TH_prop){
@@ -827,6 +850,15 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     for(SelProp& VTprop : *m_sel_VT_prop){
       if(VTprop.name == _parts_){
   sprop_VT = &VTprop;
+  found = true; n_nodes++; break;
+      }
+    }
+    if(found) continue;
+
+    //=============== VbT-tag part ========================
+    for(SelProp& VbTprop : *m_sel_VbT_prop){
+      if(VbTprop.name == _parts_){
+  sprop_VbT = &VbTprop;
   found = true; n_nodes++; break;
       }
     }
@@ -841,6 +873,15 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     }
     if(found) continue;
  
+     //=============== VLT-tag part ========================
+    for(SelProp& VbLTprop : *m_sel_VbLT_prop){
+      if(VbLTprop.name == _parts_){
+  sprop_VbLT = &VbLTprop;
+  found = true; n_nodes++; break;
+      }
+    }
+    if(found) continue;
+ 
  
 
     //=============== Mbb-split part ========================
@@ -908,8 +949,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     }
   }//el/mu channel splitting is done last
   else{
-    if( !(sprop_fwdjet || sprop_bjet || sprop_J || sprop_M || sprop_T || sprop_L || sprop_H || sprop_V 
-    || sprop_TH || sprop_LT || sprop_VT || sprop_VLT
+    if( !(sprop_fwdjet || sprop_bjet || sprop_J || sprop_M || sprop_T || sprop_L || sprop_H || sprop_V || sprop_Vb 
+    || sprop_TH || sprop_LT || sprop_VT || sprop_VbT || sprop_VLT || sprop_VbLT
     ||sprop_Mbb || sprop_Mtb || sprop_MetSig)  ){
 
       if(sprop_jet->primanc_name.empty()){
@@ -921,8 +962,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
       }
 
     }//Lep + jet
-    else if( !(sprop_fwdjet || sprop_J || sprop_M || sprop_T || sprop_L || sprop_H || sprop_V 
-         || sprop_TH || sprop_LT || sprop_VT || sprop_VLT
+    else if( !(sprop_fwdjet || sprop_J || sprop_M || sprop_T || sprop_L || sprop_H || sprop_V || sprop_Vb 
+         || sprop_TH || sprop_LT || sprop_VT || sprop_VbT || sprop_VLT || sprop_VbLT
          || sprop_Mbb || sprop_Mtb || sprop_MetSig) ){
       
       if(sprop_bjet->primanc_name.empty()){
@@ -945,10 +986,13 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
         if(sprop_L )     { SelectorBase::AddAncestor(*sel, sprop_L->index); }
         if(sprop_H )      { SelectorBase::AddAncestor(*sel, sprop_H->index); }
         if(sprop_V )      { SelectorBase::AddAncestor(*sel, sprop_V->index); }
+        if(sprop_Vb )     { SelectorBase::AddAncestor(*sel, sprop_Vb->index); }
         if(sprop_TH )     { SelectorBase::AddAncestor(*sel, sprop_TH->index); }
         if(sprop_LT )     { SelectorBase::AddAncestor(*sel, sprop_LT->index); }
         if(sprop_VT )     { SelectorBase::AddAncestor(*sel, sprop_VT->index); }
+        if(sprop_VbT )     { SelectorBase::AddAncestor(*sel, sprop_VbT->index); }
         if(sprop_VLT )     { SelectorBase::AddAncestor(*sel, sprop_VLT->index); }
+        if(sprop_VbLT )    { SelectorBase::AddAncestor(*sel, sprop_VbLT->index); }
       }
     }//Lep-jet-bjet + boost
     else{
@@ -978,6 +1022,11 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     s_boost += sprop_V->name;
   }
 
+  if(sprop_Vb){
+    if(!s_boost.empty()){ s_boost += "-"; }
+    s_boost += sprop_Vb->name;
+  }
+
   if(sprop_LT){
     if(!s_boost.empty()){ s_boost += "-"; }
     s_boost += sprop_LT->name;
@@ -988,11 +1037,21 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     s_boost += sprop_VT->name;
   }
 
+  if(sprop_VbT){
+    if(!s_boost.empty()){ s_boost += "-"; }
+    s_boost += sprop_VbT->name;
+  }
+
   if(sprop_VLT){
     if(!s_boost.empty()){ s_boost += "-"; }
     s_boost += sprop_VLT->name;
   }
 
+  if(sprop_VbLT){
+    if(!s_boost.empty()){ s_boost += "-"; }
+    s_boost += sprop_VbLT->name;
+  }
+
       }
       if(!sprop_MetSig){
   if(sprop_Mbb){
@@ -1137,6 +1196,12 @@ bool VLQ_Selector::PassSelection(const int index){
   else if(index == c_1Vin){ pass = (m_outData->o_taggedjets_n.at("RCMV") >= 1); }
   else if(index == c_2Vin){ pass = (m_outData->o_taggedjets_n.at("RCMV") >= 2); }
 
+  else if(index == c_0Vbex){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin") == 0); }
+  else if(index == c_0Vbin){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin") >= 0); }
+  else if(index == c_1Vbex){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin") == 1); }
+  else if(index == c_1Vbin){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin") >= 1); }
+  else if(index == c_2Vbin){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin") >= 2); }
+
   else if(index == c_0THex){ pass = (m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_taggedjets_n.at("RCMHiggs") == 0); }
   else if(index == c_1THex){ pass = (m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_taggedjets_n.at("RCMHiggs") == 1); }
   else if(index == c_1THin){ pass = (m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_taggedjets_n.at("RCMHiggs") >= 1); }
@@ -1154,11 +1219,21 @@ bool VLQ_Selector::PassSelection(const int index){
   else if(index == c_1VTin){ pass = (m_outData->o_taggedjets_n.at("RCMV")+m_outData->o_taggedjets_n.at("RCMTop") >= 1); }
   else if(index == c_2VTin){ pass = (m_outData->o_taggedjets_n.at("RCMV")+m_outData->o_taggedjets_n.at("RCMTop") >= 2); }
 
+  else if(index == c_0VbTex){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop") == 0); }
+  else if(index == c_1VbTex){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop") == 1); }
+  else if(index == c_1VbTin){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop") >= 1); }
+  else if(index == c_2VbTin){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop") >= 2); }
+
   else if(index == c_0VLTex){ pass = (m_outData->o_taggedjets_n.at("RCMV")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n == 0); }
   else if(index == c_1VLTex){ pass = (m_outData->o_taggedjets_n.at("RCMV")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n == 1); }
   else if(index == c_1VLTin){ pass = (m_outData->o_taggedjets_n.at("RCMV")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n >= 1); }
   else if(index == c_2VLTin){ pass = (m_outData->o_taggedjets_n.at("RCMV")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n >= 2); }
 
+  else if(index == c_0VbLTex){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n == 0); }
+  else if(index == c_1VbLTex){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n == 1); }
+  else if(index == c_1VbLTin){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n >= 1); }
+  else if(index == c_2VbLTin){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n >= 2); }
+
   //=========== B-tag multiplicities ====================
   else if(index == c_0bex){ pass = m_anaTools->PassBTagRequirement(0, false); }
   else if(index == c_1bex){ pass = m_anaTools->PassBTagRequirement(1, false); }
diff --git a/VLQAnalysis/VLQ_Selector.h b/VLQAnalysis/VLQ_Selector.h
index 4897ad9..d6cc2a7 100644
--- a/VLQAnalysis/VLQ_Selector.h
+++ b/VLQAnalysis/VLQ_Selector.h
@@ -49,16 +49,22 @@ public:
 		   c_0Hex, c_0Hin, c_1Hex, c_1Hin, c_2Hin, c_0_1Hwin,
 		   /*V-tagged jet multiplicities*/
 		   c_0Vex, c_0Vin, c_1Vex, c_1Vin, c_2Vin, 
+           /*V-tagged jet with >=1 b-tag requirement multiplicities*/
+           c_0Vbex, c_0Vbin, c_1Vbex, c_1Vbin, c_2Vbin, 
 		   /*Forward jet multiplicities*/
 		   c_0fjex, c_0fjin, c_1fjex, c_1fjin, c_2fjin,
 		   /*T+H multiplicities*/
 		   c_0THex, c_1THex, c_1THin, c_2THex, c_2THin, c_3THin,
 		   /*L+T multiplicities*/
 		   c_0LTex, c_1LTex, c_1LTin, c_2LTin,
-		   /*V+T multiplicities*/
-		   c_0VTex, c_1VTex, c_1VTin, c_2VTin, 
-		   /*V+L+T multiplicities*/
-		   c_0VLTex, c_1VLTex, c_1VLTin, c_2VLTin,
+           /*V+T multiplicities*/
+           c_0VTex, c_1VTex, c_1VTin, c_2VTin, 
+           /*Vb+T multiplicities*/
+           c_0VbTex, c_1VbTex, c_1VbTin, c_2VbTin, 
+           /*V+L+T multiplicities*/
+           c_0VLTex, c_1VLTex, c_1VLTin, c_2VLTin,
+           /*Vb+L+T multiplicities*/
+           c_0VbLTex, c_1VbLTex, c_1VbLTin, c_2VbLTin,
 		   /*Kinematic cuts*/
 		   c_LowMtbmin, c_HighMtbmin, c_LowMbb, c_HighMbb, c_HighMetSig, c_LowMetSig, TOPSEL_MAX
   };
@@ -114,11 +120,14 @@ public:
     std::vector<SelProp>* m_sel_L_prop;
     std::vector<SelProp>* m_sel_H_prop;
     std::vector<SelProp>* m_sel_V_prop;
+    std::vector<SelProp>* m_sel_Vb_prop;
 
     std::vector<SelProp>* m_sel_TH_prop;
     std::vector<SelProp>* m_sel_LT_prop;
     std::vector<SelProp>* m_sel_VT_prop;
+    std::vector<SelProp>* m_sel_VbT_prop;
     std::vector<SelProp>* m_sel_VLT_prop;
+    std::vector<SelProp>* m_sel_VbLT_prop;
 
     std::vector<SelProp>* m_sel_Mbb_prop;
     std::vector<SelProp>* m_sel_Mtb_prop;
-- 
GitLab


From 8ae698bb9b717a9a3ce172e3596d38c5bd19d032 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Wed, 31 Jul 2019 18:47:05 +0200
Subject: [PATCH 18/33] Implemented b-associated regions to have 1b requirement
 in  V-tagged jets

---
 Root/VLQ_Selector.cxx | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/Root/VLQ_Selector.cxx b/Root/VLQ_Selector.cxx
index 8b919eb..26b80e4 100644
--- a/Root/VLQ_Selector.cxx
+++ b/Root/VLQ_Selector.cxx
@@ -316,6 +316,8 @@ bool VLQ_Selector::Init(){
     */
 
     // Signal regions
+
+    /*
     AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ);       //SR1
     AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-0LTex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ);       //SR1-a
     AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-0Tex-1Lin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1-b ORIG
@@ -339,6 +341,35 @@ bool VLQ_Selector::Init(){
     AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0Tex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ);          //SR2
     AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0LTex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ);    //SR2-a
     AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0Tex-1Lin-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ);    //SR2-b ORIG
+    */
+
+
+    // === 1b requirement in V-tags ===
+    AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-0Tex-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ);       //SR1
+    AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-0LTex-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ);       //SR1-a
+    AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-0Tex-1Lin-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ); //SR1-b ORIG
+
+    //AddVLQSelection("c-1lep-3_5jwin-1bex-1fjin-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ);       //SR1
+    AddVLQSelection("c-1lep-3_5jwin-1bex-1fjin-0LTex-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ);       //SR1-a
+    AddVLQSelection("c-1lep-3_5jwin-1bex-1fjin-0Tex-1Lin-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ); //SR1-b ORIG
+
+    AddVLQSelection("c-1lep-3_5jwin-2bex-1fjin-0Tex-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ);       //SR1
+    AddVLQSelection("c-1lep-3_5jwin-2bex-1fjin-0LTex-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ);       //SR1-a
+    AddVLQSelection("c-1lep-3_5jwin-2bex-1fjin-0Tex-1Lin-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ); //SR1-b ORIG
+
+    AddVLQSelection("c-1lep-3_5jwin-3bin-1fjin-0Tex-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);          //SR2
+    AddVLQSelection("c-1lep-3_5jwin-3bin-1fjin-0LTex-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);    //SR2-a
+    AddVLQSelection("c-1lep-3_5jwin-3bin-1fjin-0Tex-1Lin-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);    //SR2-b ORIG
+
+    AddVLQSelection("c-1lep-3_5jwin-3bex-1fjin-0Tex-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);          //SR2
+    AddVLQSelection("c-1lep-3_5jwin-3bex-1fjin-0LTex-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);    //SR2-a
+    AddVLQSelection("c-1lep-3_5jwin-3bex-1fjin-0Tex-1Lin-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);    //SR2-b ORIG
+
+    AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0Tex-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);          //SR2
+    AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0LTex-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);    //SR2-a
+    AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0Tex-1Lin-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);    //SR2-b ORIG
+    // ========
+
 
     AddVLQSelection("c-1lep-6jin-1bex-1fjin-1LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ);           //SR3 ORIG
     AddVLQSelection("c-1lep-6jin-1bex-1fjin-1Lex-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ);       //SR3-a 
-- 
GitLab


From ab325649a7e02efa5b0e2642dcf9ad2370503800 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Mon, 5 Aug 2019 19:07:19 +0200
Subject: [PATCH 19/33] Adding 2D variables for tagged RC jets

---
 Root/VLQ_AnalysisTools.cxx     |  283 +++--
 Root/VLQ_Analysis_Data2015.cxx | 1992 ++++++++++++++++----------------
 2 files changed, 1142 insertions(+), 1133 deletions(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index 0159414..4bc6164 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -188,70 +188,70 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
     for ( unsigned int iTJet = 0; iTJet < m_ntupData -> d_trkjet_pt -> size(); ++iTJet ) {
 
       if(m_opt -> MsgLevel() == Debug::DEBUG){
-	std::cout << "==> In the Track Jet builder:  pt " << m_ntupData -> d_trkjet_pt -> at(iTJet);
-	std::cout << "    eta " <<  TMath::Abs(m_ntupData -> d_trkjet_eta -> at(iTJet))  << std::endl;
+  std::cout << "==> In the Track Jet builder:  pt " << m_ntupData -> d_trkjet_pt -> at(iTJet);
+  std::cout << "    eta " <<  TMath::Abs(m_ntupData -> d_trkjet_eta -> at(iTJet))  << std::endl;
       }
 
       bool isSignalJet = m_ntupData -> d_trkjet_pt -> at(iTJet)  >= m_opt->TrkJetsPtCut();
       isSignalJet = isSignalJet && TMath::Abs( m_ntupData -> d_trkjet_eta -> at(iTJet) ) < 2.5;
       if( isSignalJet ){
-	AnalysisObject *obj = new AnalysisObject();
-	obj -> SetPtEtaPhiM( m_ntupData -> d_trkjet_pt -> at(iTJet), m_ntupData -> d_trkjet_eta -> at(iTJet), m_ntupData -> d_trkjet_phi -> at(iTJet), 0. );
+  AnalysisObject *obj = new AnalysisObject();
+  obj -> SetPtEtaPhiM( m_ntupData -> d_trkjet_pt -> at(iTJet), m_ntupData -> d_trkjet_eta -> at(iTJet), m_ntupData -> d_trkjet_phi -> at(iTJet), 0. );
      
-	int isB = m_ntupData -> d_trkjet_isb -> at(iTJet);
-	obj -> SetMoment("isb", isB );
-	obj -> SetMoment("btagw", m_ntupData -> d_trkjet_btag_weight -> at(iTJet) );
-
-	if ( !(m_opt -> IsData() || (m_opt -> StrSampleName().find("QCD") != std::string::npos)) ) {
-	  obj -> SetMoment("truthLabel", m_ntupData -> d_trkjet_truthLabel -> at(iTJet) );
-	}
-
-	obj->SetMoment("calomatch",0); //initial default
-	obj -> SetMoment("bjet",isB);
-
-	double reff = max(0.02,min(0.4,30./obj->Pt()));
-	obj->SetMoment("reff",reff);
-
-	if( isB == 1 ){
-	  m_outData -> o_trkbjets -> push_back(obj);
-
-	  if( !m_opt->IsData() ){
-	    if( abs(obj->GetMoment("truthLabel")) == 5 ){
-	      m_outData -> o_trkbjets_truth_b -> push_back(obj);
-	    }
-	    else if( abs(obj->GetMoment("truthLabel")) == 4 ){
-	      m_outData -> o_trkbjets_truth_c -> push_back(obj);
-	    }
-	    else if( abs(obj->GetMoment("truthLabel")) == 15 ){
-	      m_outData -> o_trkbjets_truth_tau -> push_back(obj);
-	    }
-	    else{
-	      m_outData -> o_trkbjets_truth_lqg -> push_back(obj);
-	    }
-
-	  }//MC
-
-	} else {
-	  m_outData -> o_trkljets -> push_back(obj);
-	}
-
-	m_outData -> o_trkjets -> push_back(obj);
-
-	if( !m_opt->IsData() ){
-	  if( abs(obj->GetMoment("truthLabel")) == 5 ){
-	    m_outData -> o_trkjets_truth_b -> push_back(obj);
-	  }
-	  else if( abs(obj->GetMoment("truthLabel")) == 4 ){
-	    m_outData -> o_trkjets_truth_c -> push_back(obj);
-	  }
-	  else if( abs(obj->GetMoment("truthLabel")) == 15 ){
-	    m_outData -> o_trkjets_truth_tau -> push_back(obj);
-	  }
-	  else{
-	    m_outData -> o_trkjets_truth_lqg -> push_back(obj);
-	  }
-
-	}//MC
+  int isB = m_ntupData -> d_trkjet_isb -> at(iTJet);
+  obj -> SetMoment("isb", isB );
+  obj -> SetMoment("btagw", m_ntupData -> d_trkjet_btag_weight -> at(iTJet) );
+
+  if ( !(m_opt -> IsData() || (m_opt -> StrSampleName().find("QCD") != std::string::npos)) ) {
+    obj -> SetMoment("truthLabel", m_ntupData -> d_trkjet_truthLabel -> at(iTJet) );
+  }
+
+  obj->SetMoment("calomatch",0); //initial default
+  obj -> SetMoment("bjet",isB);
+
+  double reff = max(0.02,min(0.4,30./obj->Pt()));
+  obj->SetMoment("reff",reff);
+
+  if( isB == 1 ){
+    m_outData -> o_trkbjets -> push_back(obj);
+
+    if( !m_opt->IsData() ){
+      if( abs(obj->GetMoment("truthLabel")) == 5 ){
+        m_outData -> o_trkbjets_truth_b -> push_back(obj);
+      }
+      else if( abs(obj->GetMoment("truthLabel")) == 4 ){
+        m_outData -> o_trkbjets_truth_c -> push_back(obj);
+      }
+      else if( abs(obj->GetMoment("truthLabel")) == 15 ){
+        m_outData -> o_trkbjets_truth_tau -> push_back(obj);
+      }
+      else{
+        m_outData -> o_trkbjets_truth_lqg -> push_back(obj);
+      }
+
+    }//MC
+
+  } else {
+    m_outData -> o_trkljets -> push_back(obj);
+  }
+
+  m_outData -> o_trkjets -> push_back(obj);
+
+  if( !m_opt->IsData() ){
+    if( abs(obj->GetMoment("truthLabel")) == 5 ){
+      m_outData -> o_trkjets_truth_b -> push_back(obj);
+    }
+    else if( abs(obj->GetMoment("truthLabel")) == 4 ){
+      m_outData -> o_trkjets_truth_c -> push_back(obj);
+    }
+    else if( abs(obj->GetMoment("truthLabel")) == 15 ){
+      m_outData -> o_trkjets_truth_tau -> push_back(obj);
+    }
+    else{
+      m_outData -> o_trkjets_truth_lqg -> push_back(obj);
+    }
+
+  }//MC
 
 
       }
@@ -262,33 +262,33 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
     //=============== Re-run loop to clean concentric track jets ===========
 
     for( std::vector<AnalysisObject*>::iterator tj_i = m_outData->o_trkjets->begin();
-	 tj_i < (m_outData -> o_trkjets)->end(); ){
+   tj_i < (m_outData -> o_trkjets)->end(); ){
 
       double reff_i = (*tj_i)->GetMoment("reff");
       bool is_concentric = false;
 
       for( std::vector<AnalysisObject*>::iterator tj_j = tj_i+1;
-	   tj_j < (m_outData -> o_trkjets)->end(); ){
+     tj_j < (m_outData -> o_trkjets)->end(); ){
 
-	double reff_j = (*tj_j)->GetMoment("reff");
+  double reff_j = (*tj_j)->GetMoment("reff");
 
-	double dr = (*tj_i)->DeltaR(*(*tj_j));
-	if(dr < min(reff_i,reff_j) ){
-	  is_concentric = true;
-	  tj_j = (m_outData -> o_trkjets)->erase(tj_j);
-	  m_outData -> o_trkjets_nconcentric++;
-	}
-	else{
-	  tj_j++;
-	}
+  double dr = (*tj_i)->DeltaR(*(*tj_j));
+  if(dr < min(reff_i,reff_j) ){
+    is_concentric = true;
+    tj_j = (m_outData -> o_trkjets)->erase(tj_j);
+    m_outData -> o_trkjets_nconcentric++;
+  }
+  else{
+    tj_j++;
+  }
 
       }//inner loop
 
       if(is_concentric){
-	tj_i = (m_outData -> o_trkjets)->erase(tj_i);
+  tj_i = (m_outData -> o_trkjets)->erase(tj_i);
       }
       else{
-	tj_i++;
+  tj_i++;
       }
 
     }//
@@ -343,63 +343,63 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       int isB = 0;
 
       if(m_opt->BtagCollection()== VLQ_Options::CALO){
-	if(TMath::Abs(obj->Eta())<2.5){
+  if(TMath::Abs(obj->Eta())<2.5){
           isB = obj -> GetMoment("isb");
-	}
+  }
       }
       else{
-	//Match to track b-jets
-	for(AnalysisObject* trkbjet : *(m_outData->o_trkbjets)){
-	  if(trkbjet->GetMoment("calomatch")>0) continue;
-	  if(trkbjet->DeltaR(*obj) < 0.4){
-	    isB = 1; trkbjet->SetMoment("calomatch",1);
-	    break;
-	  }
-	}
+  //Match to track b-jets
+  for(AnalysisObject* trkbjet : *(m_outData->o_trkbjets)){
+    if(trkbjet->GetMoment("calomatch")>0) continue;
+    if(trkbjet->DeltaR(*obj) < 0.4){
+      isB = 1; trkbjet->SetMoment("calomatch",1);
+      break;
+    }
+  }
 
       }
 
       obj -> SetMoment("bjet",isB);
 
       if( isB == 1 ){
-	m_outData -> o_bjets -> push_back(obj);
-
-	if( !m_opt->IsData() ){
-	  if( abs(obj->GetMoment("truthLabel")) == 5 ){
-	    m_outData -> o_bjets_truth_b -> push_back(obj);
-	  }
-	  else if( abs(obj->GetMoment("truthLabel")) == 4 ){
-	    m_outData -> o_bjets_truth_c -> push_back(obj);
-	  }
-	  else if( abs(obj->GetMoment("truthLabel")) == 15 ){
-	    m_outData -> o_bjets_truth_tau -> push_back(obj);
-	  }
-	  else{
-	    m_outData -> o_bjets_truth_lqg -> push_back(obj);
-	  }
-
-	}//MC
+  m_outData -> o_bjets -> push_back(obj);
+
+  if( !m_opt->IsData() ){
+    if( abs(obj->GetMoment("truthLabel")) == 5 ){
+      m_outData -> o_bjets_truth_b -> push_back(obj);
+    }
+    else if( abs(obj->GetMoment("truthLabel")) == 4 ){
+      m_outData -> o_bjets_truth_c -> push_back(obj);
+    }
+    else if( abs(obj->GetMoment("truthLabel")) == 15 ){
+      m_outData -> o_bjets_truth_tau -> push_back(obj);
+    }
+    else{
+      m_outData -> o_bjets_truth_lqg -> push_back(obj);
+    }
+
+  }//MC
 
       } else {
-	m_outData -> o_ljets -> push_back(obj);
+  m_outData -> o_ljets -> push_back(obj);
       }
 
 
       m_outData -> o_jets -> push_back(obj);
 
       if( !m_opt->IsData() ){
-	if( abs(obj->GetMoment("truthLabel")) == 5 ){
-	  m_outData -> o_jets_truth_b -> push_back(obj);
-	}
-	else if( abs(obj->GetMoment("truthLabel")) == 4 ){
-	  m_outData -> o_jets_truth_c -> push_back(obj);
-	}
-	else if( abs(obj->GetMoment("truthLabel")) == 15 ){
-	  m_outData -> o_jets_truth_tau -> push_back(obj);
-	}
-	else{
-	  m_outData -> o_jets_truth_lqg -> push_back(obj);
-	}
+  if( abs(obj->GetMoment("truthLabel")) == 5 ){
+    m_outData -> o_jets_truth_b -> push_back(obj);
+  }
+  else if( abs(obj->GetMoment("truthLabel")) == 4 ){
+    m_outData -> o_jets_truth_c -> push_back(obj);
+  }
+  else if( abs(obj->GetMoment("truthLabel")) == 15 ){
+    m_outData -> o_jets_truth_tau -> push_back(obj);
+  }
+  else{
+    m_outData -> o_jets_truth_lqg -> push_back(obj);
+  }
 
       }//MC
 
@@ -488,7 +488,7 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       //Find number of b-tagged jets matched to this jet (//do this inside BTagVariables)
       AOVector* source_bjets = (m_opt->BtagCollection() == VLQ_Options::TRACK) ? m_outData -> o_trkbjets : m_outData -> o_bjets ;
       for(AnalysisObject* sbjet : *(source_bjets)){
-	if( obj->DeltaR(*sbjet) < 1.0 ) nb_match++;
+  if( obj->DeltaR(*sbjet) < 1.0 ) nb_match++;
       }
       obj -> SetMoment("nbconsts",   nb_match);
 
@@ -506,27 +506,16 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       const bool isHOT = obj->M() > 100 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= m_opt->RCNsubjetsCut() && obj -> Pt() > 300;
       obj -> SetMoment("isRCTTMass", isHOT);
       // Exclusive top-tagging
-      bool isTop = obj -> Pt() > 350 && obj->M() > 140;//&& obj->M() < 240.;
+      bool isTop = obj->M() > 140;//obj -> Pt() > 400 && obj->M() > 140;// && obj->M() < 210.;
       // isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
-        isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 3 ? obj -> Pt() > 350 : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 400 :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 650 );
-        isTop = isTop && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
-      bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 140;
+      bool isHiggs = obj->M() > 105 && obj->M() < 140;//obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 140;
       // isHiggs = isHiggs && ( obj -> Pt() > 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
-        isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 350 ) && ( obj -> Pt() < 500 )  : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 400 ) && ( obj -> Pt() < 750 ) :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 700 );
-        isHiggs = isHiggs && ( obj -> Pt() > 600 ? nb_match == 0 : nb_match >= 1 );
       obj -> SetMoment("isRCMHiggs", isHiggs);
       //Exclusive V(W/Z)-tagging
-      bool isV = obj -> Pt() > 200 && obj->M() > 70 && obj->M() < 105;
+      bool isV = obj->M() > 70 && obj->M() < 105;//obj -> Pt() > 200 && obj->M() > 70 && obj->M() < 105;
       // isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
-      isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? ( obj -> Pt() > 300 ) && ( obj -> Pt() < 450 ) : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? ( obj -> Pt() > 400 ) && ( obj -> Pt() < 700 ) :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 650 );
       obj -> SetMoment("isRCMV", isV);
       // Very loose HOT jets
       const bool isLooseHOT = obj->M() > 50 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1 && obj -> Pt() > 300;
@@ -542,42 +531,42 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       }
       if( isTop ){
         m_outData -> o_taggedjets.at("RCMTop") -> push_back(obj);
-	if(nb_match == 0) m_outData -> o_taggedjets.at("RCMTop0b") -> push_back(obj);
-	else if(nb_match == 1) m_outData -> o_taggedjets.at("RCMTop1b") -> push_back(obj);
-	else if(nb_match >= 2) m_outData -> o_taggedjets.at("RCMTop2bin") -> push_back(obj);
+  if(nb_match == 0) m_outData -> o_taggedjets.at("RCMTop0b") -> push_back(obj);
+  else if(nb_match == 1) m_outData -> o_taggedjets.at("RCMTop1b") -> push_back(obj);
+  else if(nb_match >= 2) m_outData -> o_taggedjets.at("RCMTop2bin") -> push_back(obj);
 
       }
       if( isHiggs ){
         m_outData -> o_taggedjets.at("RCMHiggs") -> push_back(obj);
-	if(nb_match == 0) m_outData -> o_taggedjets.at("RCMHiggs0b") -> push_back(obj);
-	else if(nb_match == 1) m_outData -> o_taggedjets.at("RCMHiggs1b") -> push_back(obj);
-	else if(nb_match >= 2) m_outData -> o_taggedjets.at("RCMHiggs2bin") -> push_back(obj);
+  if(nb_match == 0) m_outData -> o_taggedjets.at("RCMHiggs0b") -> push_back(obj);
+  else if(nb_match == 1) m_outData -> o_taggedjets.at("RCMHiggs1b") -> push_back(obj);
+  else if(nb_match >= 2) m_outData -> o_taggedjets.at("RCMHiggs2bin") -> push_back(obj);
       }
       if( isV ){
         m_outData -> o_taggedjets.at("RCMV") -> push_back(obj);
-	if(nb_match == 0) m_outData -> o_taggedjets.at("RCMV0b") -> push_back(obj);
-	else if(nb_match >= 1) m_outData -> o_taggedjets.at("RCMV1bin") -> push_back(obj);
+  if(nb_match == 0) m_outData -> o_taggedjets.at("RCMV0b") -> push_back(obj);
+  else if(nb_match >= 1) m_outData -> o_taggedjets.at("RCMV1bin") -> push_back(obj);
       }
       if( isLooseHOT ){
-	m_outData -> o_taggedjets.at("LooseRCTTMass") -> push_back(obj);
+  m_outData -> o_taggedjets.at("LooseRCTTMass") -> push_back(obj);
       }
 
       //===== Loop over small-R jet container and set a flag if it is matched to one of the tagged jets ====
       if( isTop || isHiggs || isV ){
-	for( AnalysisObject* jet : *(m_outData -> o_jets) ){
-	  if(obj -> DeltaR(*jet) < 1.0) jet->UpdateMoment("RCtag_match", 1);
-	}
+  for( AnalysisObject* jet : *(m_outData -> o_jets) ){
+    if(obj -> DeltaR(*jet) < 1.0) jet->UpdateMoment("RCtag_match", 1);
+  }
       }
 
       if(m_outData -> o_selLep){
-	obj -> SetMoment ("dPhi_lep", fabs(obj->DeltaPhi( *(m_outData -> o_selLep) )) );
-	obj -> SetMoment ("dR_lep", fabs(obj->DeltaR( *(m_outData -> o_selLep) )) );
+  obj -> SetMoment ("dPhi_lep", fabs(obj->DeltaPhi( *(m_outData -> o_selLep) )) );
+  obj -> SetMoment ("dR_lep", fabs(obj->DeltaR( *(m_outData -> o_selLep) )) );
       }
       /*
       // TO BE REMOVED
       else{
-	obj -> SetMoment ("dPhi_lep", -100. );
-	obj -> SetMoment ("dR_lep", -100. );
+  obj -> SetMoment ("dPhi_lep", -100. );
+  obj -> SetMoment ("dR_lep", -100. );
       }
       */
       obj -> SetMoment ("dPhi_met", fabs(obj->DeltaPhi( *(m_outData -> o_AO_met) )) );
@@ -1023,11 +1012,11 @@ bool VLQ_AnalysisTools::UpdateBTagMoments(){
 
       for( AnalysisObject* tagjet : *(tagcol.second) ){
 
-	double dr_leptop = (m_outData->o_leptop)->DeltaR(*tagjet);
-	double dr_leptop_b = (m_outData->o_leptop_b)->DeltaR(*tagjet);
+  double dr_leptop = (m_outData->o_leptop)->DeltaR(*tagjet);
+  double dr_leptop_b = (m_outData->o_leptop_b)->DeltaR(*tagjet);
 
-	if(dr_leptop < drmin_leptop) { drmin_leptop = dr_leptop; }
-	if(dr_leptop_b < drmin_leptop_b) { drmin_leptop_b = dr_leptop_b; }
+  if(dr_leptop < drmin_leptop) { drmin_leptop = dr_leptop; }
+  if(dr_leptop_b < drmin_leptop_b) { drmin_leptop_b = dr_leptop_b; }
 
 
 
diff --git a/Root/VLQ_Analysis_Data2015.cxx b/Root/VLQ_Analysis_Data2015.cxx
index a41edcd..29aae4b 100644
--- a/Root/VLQ_Analysis_Data2015.cxx
+++ b/Root/VLQ_Analysis_Data2015.cxx
@@ -140,7 +140,7 @@ bool VLQ_Analysis_Data2015::Begin(){
   for(TriggerInfo* trig : m_outData -> o_trigger_list){
     std::cout << trig->Name() << "  :  " << (trig->Type() == VLQ_Enums::TRIGMET) << "  :  " << (trig->Type() == VLQ_Enums::TRIGELEC) << "  :  " << (trig->Type() == VLQ_Enums::TRIGMUON)
     << "  :  " << (trig->Period() & VLQ_Enums::DATA2015) << "  :  " << (trig->Period() & VLQ_Enums::DATA2016) 
-	      << (trig->Period() & VLQ_Enums::DATA2017) << (trig->Period() & VLQ_Enums::DATA2018) << std::endl;
+        << (trig->Period() & VLQ_Enums::DATA2017) << (trig->Period() & VLQ_Enums::DATA2018) << std::endl;
   }
   std::cout << "==================================================================================" << std::endl;
   //Adds the triggers in the NtupleReader to read the corresponding branches in
@@ -400,10 +400,10 @@ bool VLQ_Analysis_Data2015::Begin(){
 
     if( m_opt->DoTruthAnalysis() ){ //&& (m_opt -> SampleName() == SampleName::VLQ) ){
       for ( const std::string truthType : {"VLQ", "VLQ_Ht", "VLQ_Zt", "VLQ_Wb",
-	    "VLQ_Hbdect", "VLQ_Wlepb", "VLQ_Whadb", "VLQ_Zhadt",
-	    "H", "Hbb", "hadtop", "leptop", 
-	    "hadZ", "lepZ", "invZ", "hadW", "lepW"} ){
-	m_outMngrTree->AddStandardBranch("truth_"+truthType+"_n", "Number of truth " + truthType,  &(m_outData->o_truth_partons_n.at(truthType)));
+      "VLQ_Hbdect", "VLQ_Wlepb", "VLQ_Whadb", "VLQ_Zhadt",
+      "H", "Hbb", "hadtop", "leptop", 
+      "hadZ", "lepZ", "invZ", "hadW", "lepW"} ){
+  m_outMngrTree->AddStandardBranch("truth_"+truthType+"_n", "Number of truth " + truthType,  &(m_outData->o_truth_partons_n.at(truthType)));
       }
     }
 
@@ -475,14 +475,14 @@ bool VLQ_Analysis_Data2015::Begin(){
       m_outMngrHist -> AddStandardTH1( "metsig_obj",    0.5, 0, 50,    "; #sigma(E_{T}^{miss}) [#sqrt{GeV}]", false, &(m_outData -> o_metsig_obj) );
       /*
       m_outMngrHist -> AddStandardTH2( "mu", "fwdjets_n", 10, 0, 80, 1, -0.5, 8.5,"<#mu>", "Number of fwd-jets", false, 
-				       &(m_outData -> o_pileup_mu),&(m_outData -> o_fwdjets_n) );
+               &(m_outData -> o_pileup_mu),&(m_outData -> o_fwdjets_n) );
       m_outMngrHist -> AddStandardTH2( "mu", "fwdjets30_n", 10, 0, 80, 1, -0.5, 8.5,"<#mu>", "Number of fwd-jets (p_{T}>30 GeV)", false, 
-				       &(m_outData -> o_pileup_mu),&(m_outData -> o_fwdjets30_n) );
+               &(m_outData -> o_pileup_mu),&(m_outData -> o_fwdjets30_n) );
       m_outMngrHist -> AddStandardTH2( "mu", "fwdjets40_n", 10, 0, 80, 1, -0.5, 8.5,"<#mu>", "Number of fwd-jets (p_{T}>40 GeV)", false, 
-				       &(m_outData -> o_pileup_mu),&(m_outData -> o_fwdjets40_n) );
+               &(m_outData -> o_pileup_mu),&(m_outData -> o_fwdjets40_n) );
 
       m_outMngrHist -> AddStandardTH2( "meff", "mtbmin", 25, 0, 3000, 25, 0., 500,"m_{eff} [GeV]", "m_{T}^{min}(b,MET)", false, 
-      			       &(m_outData -> o_meff),&(m_outData -> o_mTbmin) );
+                   &(m_outData -> o_meff),&(m_outData -> o_mTbmin) );
       */
       //Leptonic top
       m_outMngrHist -> AddStandardTH1( "leptop_n",         1, -0.5, 1.5, ";Number of leptonic tops"      ,  false, &(m_outData -> o_leptop_n) );
@@ -508,14 +508,14 @@ bool VLQ_Analysis_Data2015::Begin(){
 
       //Semi-boosted hadronic top
       for ( int iJet=-1; iJet<=2; ++iJet ) {
-	std::string str_id = "";
-	str_id += std::to_string(iJet);
-	if(iJet==-1) str_id = "s";
-	const bool DrawSyst = (iJet <= 0) && otherVariables;
-	m_outMngrHist -> AddStandardTH1( "bW_hadtop"+str_id+"_pt",    25, 0, 500,     ";bW Hadtop"+str_id+" p_{T} [GeV]",   DrawSyst,   &(m_outData -> o_bW_hadtop), iJet, "Pt");
-	m_outMngrHist -> AddStandardTH1( "bW_hadtop"+str_id+"_eta",   0.2, -3, 3,     ";bW Hadtop"+str_id+" #eta",          DrawSyst,   &(m_outData -> o_bW_hadtop), iJet, "Eta");
-	m_outMngrHist -> AddStandardTH1( "bW_hadtop"+str_id+"_m",     10, 100, 300,     ";bW Hadtop"+str_id+" mass [GeV]",    false,      &(m_outData -> o_bW_hadtop), iJet, "M");
-	m_outMngrHist -> AddStandardTH1( "bW_hadtop"+str_id+"_dR_bW", 0.1,0,6,   ";bW Hadtop"+str_id+" MV2c10",        false,      &(m_outData -> o_bW_hadtop), iJet, "dR_bW");
+  std::string str_id = "";
+  str_id += std::to_string(iJet);
+  if(iJet==-1) str_id = "s";
+  const bool DrawSyst = (iJet <= 0) && otherVariables;
+  m_outMngrHist -> AddStandardTH1( "bW_hadtop"+str_id+"_pt",    25, 0, 500,     ";bW Hadtop"+str_id+" p_{T} [GeV]",   DrawSyst,   &(m_outData -> o_bW_hadtop), iJet, "Pt");
+  m_outMngrHist -> AddStandardTH1( "bW_hadtop"+str_id+"_eta",   0.2, -3, 3,     ";bW Hadtop"+str_id+" #eta",          DrawSyst,   &(m_outData -> o_bW_hadtop), iJet, "Eta");
+  m_outMngrHist -> AddStandardTH1( "bW_hadtop"+str_id+"_m",     10, 100, 300,     ";bW Hadtop"+str_id+" mass [GeV]",    false,      &(m_outData -> o_bW_hadtop), iJet, "M");
+  m_outMngrHist -> AddStandardTH1( "bW_hadtop"+str_id+"_dR_bW", 0.1,0,6,   ";bW Hadtop"+str_id+" MV2c10",        false,      &(m_outData -> o_bW_hadtop), iJet, "dR_bW");
       }
 
       //Jet variables
@@ -527,74 +527,74 @@ bool VLQ_Analysis_Data2015::Begin(){
       m_outMngrHist -> AddStandardTH1( "trkbjets_n",     1, -0.5, 8.5, ";Number of track b-jets", otherVariables, &(m_outData -> o_trkbjets_n) );
       m_outMngrHist -> AddStandardTH1( "trkljets_n",     1, -0.5, 8.5, ";Number of track light-jets", otherVariables, &(m_outData -> o_trkljets_n) );
       m_outMngrHist -> AddStandardTH1( "trkjets_nconcentric",      1, -2.5, 15.5,";Number of concentric track-jets", 
-				       otherVariables, &(m_outData -> o_trkjets_nconcentric) );
+               otherVariables, &(m_outData -> o_trkjets_nconcentric) );
 
       m_outMngrHist -> AddStandardTH1( "jets_n_truth_b",  1, -2.5, 15.5,";Number of truth b-jets", 
-				       otherVariables, &(m_outData -> o_jets_truth_b_n) );
+               otherVariables, &(m_outData -> o_jets_truth_b_n) );
       m_outMngrHist -> AddStandardTH1( "jets_n_truth_c",  1, -2.5, 15.5,";Number of truth c-jets", 
-				       otherVariables, &(m_outData -> o_jets_truth_c_n) );
+               otherVariables, &(m_outData -> o_jets_truth_c_n) );
       m_outMngrHist -> AddStandardTH1( "jets_n_truth_tau", 1, -2.5, 15.5,";Number of truth #tau-jets", 
-				       otherVariables, &(m_outData -> o_jets_truth_tau_n) );
+               otherVariables, &(m_outData -> o_jets_truth_tau_n) );
       m_outMngrHist -> AddStandardTH1( "jets_n_truth_lqg", 1, -2.5, 15.5,";Number of truth light-jets", 
-				       otherVariables, &(m_outData -> o_jets_truth_lqg_n) );
+               otherVariables, &(m_outData -> o_jets_truth_lqg_n) );
 
       m_outMngrHist -> AddStandardTH1( "bjets_n_truth_b",  1, -2.5, 15.5,";Number of b-tagged truth b-jets", 
-				       otherVariables, &(m_outData -> o_bjets_truth_b_n) );
+               otherVariables, &(m_outData -> o_bjets_truth_b_n) );
       m_outMngrHist -> AddStandardTH1( "bjets_n_truth_c",  1, -2.5, 15.5,";Number of b-tagged truth c-jets", 
-				       otherVariables, &(m_outData -> o_bjets_truth_c_n) );
+               otherVariables, &(m_outData -> o_bjets_truth_c_n) );
       m_outMngrHist -> AddStandardTH1( "bjets_n_truth_tau", 1, -2.5, 15.5,";Number of b-tagged truth #tau-jets", 
-				       otherVariables, &(m_outData -> o_bjets_truth_tau_n) );
+               otherVariables, &(m_outData -> o_bjets_truth_tau_n) );
       m_outMngrHist -> AddStandardTH1( "bjets_n_truth_lqg", 1, -2.5, 15.5,";Number of b-tagged truth light-jets", 
-				       otherVariables, &(m_outData -> o_bjets_truth_lqg_n) );
+               otherVariables, &(m_outData -> o_bjets_truth_lqg_n) );
 
       m_outMngrHist -> AddStandardTH1( "trkjets_n_truth_b",  1, -2.5, 15.5,";Number of truth b-trkjets", 
-				       otherVariables, &(m_outData -> o_trkjets_truth_b_n) );
+               otherVariables, &(m_outData -> o_trkjets_truth_b_n) );
       m_outMngrHist -> AddStandardTH1( "trkjets_n_truth_c",  1, -2.5, 15.5,";Number of truth c-trkjets", 
-				       otherVariables, &(m_outData -> o_trkjets_truth_c_n) );
+               otherVariables, &(m_outData -> o_trkjets_truth_c_n) );
       m_outMngrHist -> AddStandardTH1( "trkjets_n_truth_tau", 1, -2.5, 15.5,";Number of truth #tau-trkjets", 
-				       otherVariables, &(m_outData -> o_trkjets_truth_tau_n) );
+               otherVariables, &(m_outData -> o_trkjets_truth_tau_n) );
       m_outMngrHist -> AddStandardTH1( "trkjets_n_truth_lqg", 1, -2.5, 15.5,";Number of truth light-trkjets", 
-				       otherVariables, &(m_outData -> o_trkjets_truth_lqg_n) );
+               otherVariables, &(m_outData -> o_trkjets_truth_lqg_n) );
 
       m_outMngrHist -> AddStandardTH1( "trkbjets_n_truth_b",  1, -2.5, 15.5,";Number of b-tagged truth b-trkjets", 
-				       otherVariables, &(m_outData -> o_trkbjets_truth_b_n) );
+               otherVariables, &(m_outData -> o_trkbjets_truth_b_n) );
       m_outMngrHist -> AddStandardTH1( "trkbjets_n_truth_c",  1, -2.5, 15.5,";Number of b-tagged truth c-trkjets", 
-				       otherVariables, &(m_outData -> o_trkbjets_truth_c_n) );
+               otherVariables, &(m_outData -> o_trkbjets_truth_c_n) );
       m_outMngrHist -> AddStandardTH1( "trkbjets_n_truth_tau", 1, -2.5, 15.5,";Number of b-tagged truth #tau-trkjets", 
-				       otherVariables, &(m_outData -> o_trkbjets_truth_tau_n) );
+               otherVariables, &(m_outData -> o_trkbjets_truth_tau_n) );
       m_outMngrHist -> AddStandardTH1( "trkbjets_n_truth_lqg", 1, -2.5, 15.5,";Number of b-tagged truth light-trkjets", 
-				       otherVariables, &(m_outData -> o_trkbjets_truth_lqg_n) );
+               otherVariables, &(m_outData -> o_trkbjets_truth_lqg_n) );
 
       //================ CALO JETS ======================================
       for ( int iJet=-1; iJet<=5; ++iJet ) {
-	std::string str_id = "";
-	str_id += std::to_string(iJet);
-	if(iJet==-1) str_id = "s";
-	const bool DrawSyst = (iJet <= 0) && otherVariables;
-	m_outMngrHist -> AddStandardTH1( "jet"+str_id+"_pt",    10, 0, 1000,     ";Jet"+str_id+" p_{T} [GeV]",  DrawSyst,   
-					 &(m_outData -> o_jets), iJet, "Pt");
-	m_outMngrHist -> AddStandardTH1( "jet"+str_id+"_eta",   0.2, -3, 3,     ";Jet"+str_id+" #eta",          DrawSyst,   
-					 &(m_outData -> o_jets), iJet, "Eta");
-	m_outMngrHist -> AddStandardTH1( "jet"+str_id+"_phi",   0.2, -3.5, 3.5, ";Jet"+str_id+" #varphi",       false,      
-					 &(m_outData -> o_jets), iJet, "Phi");
-	m_outMngrHist -> AddStandardTH1( "jet"+str_id+"_m",     10, 0, 200,     ";Jet"+str_id+" mass [GeV]",    false,      
-					 &(m_outData -> o_jets), iJet, "M");
-	m_outMngrHist -> AddStandardTH1( "jet"+str_id+"_btagw", 0.1,-1.1,1.1,   ";Jet"+str_id+" MV2c10",        false,      
-					 &(m_outData -> o_jets), iJet, "btagw");
-	m_outMngrHist -> AddStandardTH1( "jet"+str_id+"_jvt",   0.1,-1.1,1.1,   ";Jet"+str_id+" JVT",           false,      
-					 &(m_outData -> o_jets), iJet, "jvt");
-	//for MC
-	if(!m_opt->IsData() && (iJet <= 0) ){
-	  m_outMngrHist -> AddStandardTH1( "jet_truth_b"+str_id+"_pt",    10, 0, 1000,     ";Truth B-Jet"+str_id+" p_{T} [GeV]",  DrawSyst,   
-					   &(m_outData -> o_jets_truth_b), iJet, "Pt");
-	  m_outMngrHist -> AddStandardTH1( "jet_truth_c"+str_id+"_pt",    10, 0, 1000,     ";Truth C-Jet"+str_id+" p_{T} [GeV]",  DrawSyst,   
-					   &(m_outData -> o_jets_truth_c), iJet, "Pt");
-	  m_outMngrHist -> AddStandardTH1( "jet_truth_tau"+str_id+"_pt",    10, 0, 1000,     ";Truth #tau-Jet"+str_id+" p_{T} [GeV]",  DrawSyst,   
-					   &(m_outData -> o_jets_truth_tau), iJet, "Pt");
-	  m_outMngrHist -> AddStandardTH1( "jet_truth_lqg"+str_id+"_pt",    10, 0, 1000,     ";Truth Light-Jet"+str_id+" p_{T} [GeV]",  DrawSyst,   
-						   &(m_outData -> o_jets_truth_lqg), iJet, "Pt");
-
-	}
+  std::string str_id = "";
+  str_id += std::to_string(iJet);
+  if(iJet==-1) str_id = "s";
+  const bool DrawSyst = (iJet <= 0) && otherVariables;
+  m_outMngrHist -> AddStandardTH1( "jet"+str_id+"_pt",    10, 0, 1000,     ";Jet"+str_id+" p_{T} [GeV]",  DrawSyst,   
+           &(m_outData -> o_jets), iJet, "Pt");
+  m_outMngrHist -> AddStandardTH1( "jet"+str_id+"_eta",   0.2, -3, 3,     ";Jet"+str_id+" #eta",          DrawSyst,   
+           &(m_outData -> o_jets), iJet, "Eta");
+  m_outMngrHist -> AddStandardTH1( "jet"+str_id+"_phi",   0.2, -3.5, 3.5, ";Jet"+str_id+" #varphi",       false,      
+           &(m_outData -> o_jets), iJet, "Phi");
+  m_outMngrHist -> AddStandardTH1( "jet"+str_id+"_m",     10, 0, 200,     ";Jet"+str_id+" mass [GeV]",    false,      
+           &(m_outData -> o_jets), iJet, "M");
+  m_outMngrHist -> AddStandardTH1( "jet"+str_id+"_btagw", 0.1,-1.1,1.1,   ";Jet"+str_id+" MV2c10",        false,      
+           &(m_outData -> o_jets), iJet, "btagw");
+  m_outMngrHist -> AddStandardTH1( "jet"+str_id+"_jvt",   0.1,-1.1,1.1,   ";Jet"+str_id+" JVT",           false,      
+           &(m_outData -> o_jets), iJet, "jvt");
+  //for MC
+  if(!m_opt->IsData() && (iJet <= 0) ){
+    m_outMngrHist -> AddStandardTH1( "jet_truth_b"+str_id+"_pt",    10, 0, 1000,     ";Truth B-Jet"+str_id+" p_{T} [GeV]",  DrawSyst,   
+             &(m_outData -> o_jets_truth_b), iJet, "Pt");
+    m_outMngrHist -> AddStandardTH1( "jet_truth_c"+str_id+"_pt",    10, 0, 1000,     ";Truth C-Jet"+str_id+" p_{T} [GeV]",  DrawSyst,   
+             &(m_outData -> o_jets_truth_c), iJet, "Pt");
+    m_outMngrHist -> AddStandardTH1( "jet_truth_tau"+str_id+"_pt",    10, 0, 1000,     ";Truth #tau-Jet"+str_id+" p_{T} [GeV]",  DrawSyst,   
+             &(m_outData -> o_jets_truth_tau), iJet, "Pt");
+    m_outMngrHist -> AddStandardTH1( "jet_truth_lqg"+str_id+"_pt",    10, 0, 1000,     ";Truth Light-Jet"+str_id+" p_{T} [GeV]",  DrawSyst,   
+               &(m_outData -> o_jets_truth_lqg), iJet, "Pt");
+
+  }
 
       }
     for ( int iFwdJet=-1; iFwdJet<=5; ++iFwdJet ) {
@@ -603,143 +603,143 @@ bool VLQ_Analysis_Data2015::Begin(){
       if(iFwdJet==-1) str_id = "s";
       const bool DrawSyst = (iFwdJet <= 0) && otherVariables;
       m_outMngrHist -> AddStandardTH1( "fwdjet"+str_id+"_pt",    5, 0, 500,      ";Fwd-jet"+str_id+" p_{T} [GeV]",   
-				       DrawSyst,   &(m_outData -> o_fwdjets), iFwdJet, "Pt");
+               DrawSyst,   &(m_outData -> o_fwdjets), iFwdJet, "Pt");
       m_outMngrHist -> AddStandardTH1( "fwdjet"+str_id+"_eta",   0.2, -5, 5,     ";Fwd-jet"+str_id+" #eta",          
-				       DrawSyst,   &(m_outData -> o_fwdjets), iFwdJet, "Eta");
+               DrawSyst,   &(m_outData -> o_fwdjets), iFwdJet, "Eta");
       m_outMngrHist -> AddStandardTH1( "fwdjet"+str_id+"_phi",   0.2, -3.5, 3.5, ";Fwd-jet"+str_id+" #varphi",       
-				       false,      &(m_outData -> o_fwdjets), iFwdJet, "Phi");
+               false,      &(m_outData -> o_fwdjets), iFwdJet, "Phi");
       m_outMngrHist -> AddStandardTH1( "fwdjet"+str_id+"_m",     4, 0, 100,       ";Fwd-jet"+str_id+" mass [GeV]",    
-				       false,      &(m_outData -> o_fwdjets), iFwdJet, "M");
+               false,      &(m_outData -> o_fwdjets), iFwdJet, "M");
     }
 
     for ( int iBJet=-1; iBJet<=3; ++iBJet ) {
-	std::string str_id = "";
-	str_id += std::to_string(iBJet);
-	if(iBJet==-1) str_id = "s";
-	const bool DrawSyst = (iBJet <= 0) && otherVariables;
-	m_outMngrHist -> AddStandardTH1( "bjet"+str_id+"_pt",    10, 0, 1000,    ";b-jet"+str_id+" p_{T} [GeV]",   
-					 false, &(m_outData -> o_bjets),  iBJet, "Pt" );
-	m_outMngrHist -> AddStandardTH1( "bjet"+str_id+"_eta",   0.2, -3, 3,    ";b-jet"+str_id+" #eta",           
-					 false, &(m_outData -> o_bjets),  iBJet, "Eta" );
-	m_outMngrHist -> AddStandardTH1( "bjet"+str_id+"_btagw", 0.1,-1.1,1.1,  ";b-jet"+str_id+" MV2c10",         
-					 false, &(m_outData -> o_bjets),  iBJet, "btagw" );
-	m_outMngrHist -> AddStandardTH1( "bjet"+str_id+"_jvt",   0.1,-1.1,1.1,  ";b-jet"+str_id+" JVT",            
-					 false, &(m_outData -> o_bjets),  iBJet, "jvt" );
-
-	//for MC
-	if(!m_opt->IsData() && (iBJet <= 0) ){
-	  m_outMngrHist -> AddStandardTH1( "bjet_truth_b"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth B-Jet"+str_id+" p_{T} [GeV]",  DrawSyst,   
-					   &(m_outData -> o_bjets_truth_b), iBJet, "Pt");
-	  m_outMngrHist -> AddStandardTH1( "bjet_truth_c"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth C-Jet"+str_id+" p_{T} [GeV]",  DrawSyst,   
-					   &(m_outData -> o_bjets_truth_c), iBJet, "Pt");
-	  m_outMngrHist -> AddStandardTH1( "bjet_truth_tau"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth #tau-Jet"+str_id+" p_{T} [GeV]",  
-					   DrawSyst, &(m_outData -> o_jets_truth_tau), iBJet, "Pt");
-	  m_outMngrHist -> AddStandardTH1( "bjet_truth_lqg"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth Light-Jet"+str_id+" p_{T} [GeV]",  
-					   DrawSyst, &(m_outData -> o_bjets_truth_lqg), iBJet, "Pt");
-	}
+  std::string str_id = "";
+  str_id += std::to_string(iBJet);
+  if(iBJet==-1) str_id = "s";
+  const bool DrawSyst = (iBJet <= 0) && otherVariables;
+  m_outMngrHist -> AddStandardTH1( "bjet"+str_id+"_pt",    10, 0, 1000,    ";b-jet"+str_id+" p_{T} [GeV]",   
+           false, &(m_outData -> o_bjets),  iBJet, "Pt" );
+  m_outMngrHist -> AddStandardTH1( "bjet"+str_id+"_eta",   0.2, -3, 3,    ";b-jet"+str_id+" #eta",           
+           false, &(m_outData -> o_bjets),  iBJet, "Eta" );
+  m_outMngrHist -> AddStandardTH1( "bjet"+str_id+"_btagw", 0.1,-1.1,1.1,  ";b-jet"+str_id+" MV2c10",         
+           false, &(m_outData -> o_bjets),  iBJet, "btagw" );
+  m_outMngrHist -> AddStandardTH1( "bjet"+str_id+"_jvt",   0.1,-1.1,1.1,  ";b-jet"+str_id+" JVT",            
+           false, &(m_outData -> o_bjets),  iBJet, "jvt" );
+
+  //for MC
+  if(!m_opt->IsData() && (iBJet <= 0) ){
+    m_outMngrHist -> AddStandardTH1( "bjet_truth_b"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth B-Jet"+str_id+" p_{T} [GeV]",  DrawSyst,   
+             &(m_outData -> o_bjets_truth_b), iBJet, "Pt");
+    m_outMngrHist -> AddStandardTH1( "bjet_truth_c"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth C-Jet"+str_id+" p_{T} [GeV]",  DrawSyst,   
+             &(m_outData -> o_bjets_truth_c), iBJet, "Pt");
+    m_outMngrHist -> AddStandardTH1( "bjet_truth_tau"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth #tau-Jet"+str_id+" p_{T} [GeV]",  
+             DrawSyst, &(m_outData -> o_jets_truth_tau), iBJet, "Pt");
+    m_outMngrHist -> AddStandardTH1( "bjet_truth_lqg"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth Light-Jet"+str_id+" p_{T} [GeV]",  
+             DrawSyst, &(m_outData -> o_bjets_truth_lqg), iBJet, "Pt");
+  }
 
       }
       for ( int iLJet=-1; iLJet<=4; ++iLJet  ) {
-	std::string str_id = "";
-	str_id += std::to_string(iLJet);
-	if(iLJet==-1) str_id = "s";
-	m_outMngrHist -> AddStandardTH1( "ljet"+str_id+"_pt",    10, 0, 500,   ";light-jet"+str_id+" p_{T} [GeV]",  
-					 false, &(m_outData -> o_ljets), iLJet, "Pt" );
-	m_outMngrHist -> AddStandardTH1( "ljet"+str_id+"_eta",   0.2, -3, 3,   ";light-jet"+str_id+" #eta",         
-					 false, &(m_outData -> o_ljets), iLJet, "Eta" );
-	m_outMngrHist -> AddStandardTH1( "ljet"+str_id+"_btagw", 0.1,-1.1,1.1, ";light-jet"+str_id+" MV2c10", 
-					 false, &(m_outData -> o_ljets), iLJet, "btagw" );
-	m_outMngrHist -> AddStandardTH1( "ljet"+str_id+"_jvt",   0.1,-1.1,1.1, ";light-jet"+str_id+" JVT",    
-					 false, &(m_outData -> o_ljets), iLJet, "jvt" );
+  std::string str_id = "";
+  str_id += std::to_string(iLJet);
+  if(iLJet==-1) str_id = "s";
+  m_outMngrHist -> AddStandardTH1( "ljet"+str_id+"_pt",    10, 0, 500,   ";light-jet"+str_id+" p_{T} [GeV]",  
+           false, &(m_outData -> o_ljets), iLJet, "Pt" );
+  m_outMngrHist -> AddStandardTH1( "ljet"+str_id+"_eta",   0.2, -3, 3,   ";light-jet"+str_id+" #eta",         
+           false, &(m_outData -> o_ljets), iLJet, "Eta" );
+  m_outMngrHist -> AddStandardTH1( "ljet"+str_id+"_btagw", 0.1,-1.1,1.1, ";light-jet"+str_id+" MV2c10", 
+           false, &(m_outData -> o_ljets), iLJet, "btagw" );
+  m_outMngrHist -> AddStandardTH1( "ljet"+str_id+"_jvt",   0.1,-1.1,1.1, ";light-jet"+str_id+" JVT",    
+           false, &(m_outData -> o_ljets), iLJet, "jvt" );
       }
 
       //================ TRACK JETS ======================================
       if(m_opt->BtagCollection() == VLQ_Options::TRACK){
-	for ( int iTrkjet=-1; iTrkjet<=5; ++iTrkjet ) {
-	  std::string str_id = "";
-	  str_id += std::to_string(iTrkjet);
-	  if(iTrkjet==-1) str_id = "s";
-	  const bool DrawSyst = (iTrkjet <= 0) && otherVariables;
-	  m_outMngrHist -> AddStandardTH1( "trkjet"+str_id+"_pt",    10, 0, 1000,     ";Trkjet"+str_id+" p_{T} [GeV]",  DrawSyst,   
-					   &(m_outData -> o_trkjets), iTrkjet, "Pt");
-	  m_outMngrHist -> AddStandardTH1( "trkjet"+str_id+"_eta",   0.2, -3, 3,     ";Trkjet"+str_id+" #eta",          DrawSyst,   
-					   &(m_outData -> o_trkjets), iTrkjet, "Eta");
-	  m_outMngrHist -> AddStandardTH1( "trkjet"+str_id+"_phi",   0.2, -3.5, 3.5, ";Trkjet"+str_id+" #varphi",       false,      
-					   &(m_outData -> o_trkjets), iTrkjet, "Phi");
-	  m_outMngrHist -> AddStandardTH1( "trkjet"+str_id+"_btagw", 0.1,-1.1,1.1,   ";Trkjet"+str_id+" MV2c10",        false,      
-					   &(m_outData -> o_trkjets), iTrkjet, "btagw");
-	  m_outMngrHist -> AddStandardTH1( "trkjet"+str_id+"_reff", 0.05,0.,1.0,   ";Trkjet"+str_id+" R_{eff}",        false,      
-					   &(m_outData -> o_trkjets), iTrkjet, "reff");
-
-	  //for MC
-	  if(!m_opt->IsData() && (iTrkjet <= 0) ){
-	    m_outMngrHist -> AddStandardTH1( "trkjet_truth_b"+str_id+"_pt",    10, 0, 1000,     ";Truth B-Trkjet"+str_id+" p_{T} [GeV]",  DrawSyst,   
-					     &(m_outData -> o_trkjets_truth_b), iTrkjet, "Pt");
-	    m_outMngrHist -> AddStandardTH1( "trkjet_truth_c"+str_id+"_pt",    10, 0, 1000,     ";Truth C-Trkjet"+str_id+" p_{T} [GeV]",  DrawSyst,   
-					     &(m_outData -> o_trkjets_truth_c), iTrkjet, "Pt");
-	    m_outMngrHist -> AddStandardTH1( "trkjet_truth_tau"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth #tau-Trket"+str_id+" p_{T} [GeV]",  
-					   DrawSyst, &(m_outData -> o_trkjets_truth_tau), iTrkjet, "Pt");
-	    m_outMngrHist -> AddStandardTH1( "trkjet_truth_lqg"+str_id+"_pt",    10, 0, 1000,     ";Truth Light-Trkjet"+str_id+" p_{T} [GeV]",  DrawSyst,   
-					     &(m_outData -> o_trkjets_truth_lqg), iTrkjet, "Pt");
-
-	  }
-
-	}
-
-	for ( int iBTrkjet=-1; iBTrkjet<=3; ++iBTrkjet ) {
-	  std::string str_id = "";
-	  str_id += std::to_string(iBTrkjet);
-	  if(iBTrkjet==-1) str_id = "s";
-	  const bool DrawSyst = (iBTrkjet <= 0) && otherVariables;
-	  m_outMngrHist -> AddStandardTH1( "trkbjet"+str_id+"_pt",    10, 0, 1000,    ";b-trkjet"+str_id+" p_{T} [GeV]",   
-					   false, &(m_outData -> o_trkbjets),  iBTrkjet, "Pt" );
-	  m_outMngrHist -> AddStandardTH1( "trkbjet"+str_id+"_eta",   0.2, -3, 3,    ";b-trkjet"+str_id+" #eta",           
-					   false, &(m_outData -> o_trkbjets),  iBTrkjet, "Eta" );
-	  m_outMngrHist -> AddStandardTH1( "trkbjet"+str_id+"_btagw", 0.1,-1.1,1.1,  ";b-trkjet"+str_id+" MV2c10",         
-					   false, &(m_outData -> o_trkbjets),  iBTrkjet, "btagw" );
-	  m_outMngrHist -> AddStandardTH1( "trkbjet"+str_id+"_reff", 0.05,0.,0.4,   ";b-trkjet"+str_id+" R_{eff}",        false,      
-					   &(m_outData -> o_trkjets), iBTrkjet, "reff");
-
-	  //for MC
-	  if(!m_opt->IsData() && (iBTrkjet <= 0) ){
-	    m_outMngrHist -> AddStandardTH1( "trkbjet_truth_b"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth B-Trkjet"+str_id+" p_{T} [GeV]", 
-					     DrawSyst, &(m_outData -> o_trkbjets_truth_b), iBTrkjet, "Pt");
-	    m_outMngrHist -> AddStandardTH1( "trkbjet_truth_c"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth C-Trkjet"+str_id+" p_{T} [GeV]", 
-					     DrawSyst, &(m_outData -> o_trkbjets_truth_c), iBTrkjet, "Pt");
-	    m_outMngrHist -> AddStandardTH1( "trkbjet_truth_tau"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth #tau-Trket"+str_id+" p_{T} [GeV]",  
-					     DrawSyst, &(m_outData -> o_trkbjets_truth_tau), iBTrkjet, "Pt");
-	    m_outMngrHist -> AddStandardTH1( "trkbjet_truth_lqg"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth Light-Trkjet"+str_id+" p_{T} [GeV]",  
-					     DrawSyst, &(m_outData -> o_trkbjets_truth_lqg), iBTrkjet, "Pt");
-
-	  }
-	}
-	for ( int iLTrkjet=-1; iLTrkjet<=4; ++iLTrkjet  ) {
-	  std::string str_id = "";
-	  str_id += std::to_string(iLTrkjet);
-	  if(iLTrkjet==-1) str_id = "s";
-	  m_outMngrHist -> AddStandardTH1( "trkljet"+str_id+"_pt",    10, 0, 500,   ";light-trkjet"+str_id+" p_{T} [GeV]",  
-					   false, &(m_outData -> o_trkljets), iLTrkjet, "Pt" );
-	  m_outMngrHist -> AddStandardTH1( "trkljet"+str_id+"_eta",   0.2, -3, 3,   ";light-trkjet"+str_id+" #eta",         
-					   false, &(m_outData -> o_trkljets), iLTrkjet, "Eta" );
-	  m_outMngrHist -> AddStandardTH1( "trkljet"+str_id+"_btagw", 0.1,-1.1,1.1, ";light-trkjet"+str_id+" MV2c10", 
-					   false, &(m_outData -> o_trkljets), iLTrkjet, "btagw" );
-	  m_outMngrHist -> AddStandardTH1( "trkljet"+str_id+"_reff", 0.05,0.,0.4,   ";light-trkjet"+str_id+" R_{eff}",        false,      
-					   &(m_outData -> o_trkljets), iLTrkjet, "reff");
-	}
+  for ( int iTrkjet=-1; iTrkjet<=5; ++iTrkjet ) {
+    std::string str_id = "";
+    str_id += std::to_string(iTrkjet);
+    if(iTrkjet==-1) str_id = "s";
+    const bool DrawSyst = (iTrkjet <= 0) && otherVariables;
+    m_outMngrHist -> AddStandardTH1( "trkjet"+str_id+"_pt",    10, 0, 1000,     ";Trkjet"+str_id+" p_{T} [GeV]",  DrawSyst,   
+             &(m_outData -> o_trkjets), iTrkjet, "Pt");
+    m_outMngrHist -> AddStandardTH1( "trkjet"+str_id+"_eta",   0.2, -3, 3,     ";Trkjet"+str_id+" #eta",          DrawSyst,   
+             &(m_outData -> o_trkjets), iTrkjet, "Eta");
+    m_outMngrHist -> AddStandardTH1( "trkjet"+str_id+"_phi",   0.2, -3.5, 3.5, ";Trkjet"+str_id+" #varphi",       false,      
+             &(m_outData -> o_trkjets), iTrkjet, "Phi");
+    m_outMngrHist -> AddStandardTH1( "trkjet"+str_id+"_btagw", 0.1,-1.1,1.1,   ";Trkjet"+str_id+" MV2c10",        false,      
+             &(m_outData -> o_trkjets), iTrkjet, "btagw");
+    m_outMngrHist -> AddStandardTH1( "trkjet"+str_id+"_reff", 0.05,0.,1.0,   ";Trkjet"+str_id+" R_{eff}",        false,      
+             &(m_outData -> o_trkjets), iTrkjet, "reff");
+
+    //for MC
+    if(!m_opt->IsData() && (iTrkjet <= 0) ){
+      m_outMngrHist -> AddStandardTH1( "trkjet_truth_b"+str_id+"_pt",    10, 0, 1000,     ";Truth B-Trkjet"+str_id+" p_{T} [GeV]",  DrawSyst,   
+               &(m_outData -> o_trkjets_truth_b), iTrkjet, "Pt");
+      m_outMngrHist -> AddStandardTH1( "trkjet_truth_c"+str_id+"_pt",    10, 0, 1000,     ";Truth C-Trkjet"+str_id+" p_{T} [GeV]",  DrawSyst,   
+               &(m_outData -> o_trkjets_truth_c), iTrkjet, "Pt");
+      m_outMngrHist -> AddStandardTH1( "trkjet_truth_tau"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth #tau-Trket"+str_id+" p_{T} [GeV]",  
+             DrawSyst, &(m_outData -> o_trkjets_truth_tau), iTrkjet, "Pt");
+      m_outMngrHist -> AddStandardTH1( "trkjet_truth_lqg"+str_id+"_pt",    10, 0, 1000,     ";Truth Light-Trkjet"+str_id+" p_{T} [GeV]",  DrawSyst,   
+               &(m_outData -> o_trkjets_truth_lqg), iTrkjet, "Pt");
+
+    }
+
+  }
+
+  for ( int iBTrkjet=-1; iBTrkjet<=3; ++iBTrkjet ) {
+    std::string str_id = "";
+    str_id += std::to_string(iBTrkjet);
+    if(iBTrkjet==-1) str_id = "s";
+    const bool DrawSyst = (iBTrkjet <= 0) && otherVariables;
+    m_outMngrHist -> AddStandardTH1( "trkbjet"+str_id+"_pt",    10, 0, 1000,    ";b-trkjet"+str_id+" p_{T} [GeV]",   
+             false, &(m_outData -> o_trkbjets),  iBTrkjet, "Pt" );
+    m_outMngrHist -> AddStandardTH1( "trkbjet"+str_id+"_eta",   0.2, -3, 3,    ";b-trkjet"+str_id+" #eta",           
+             false, &(m_outData -> o_trkbjets),  iBTrkjet, "Eta" );
+    m_outMngrHist -> AddStandardTH1( "trkbjet"+str_id+"_btagw", 0.1,-1.1,1.1,  ";b-trkjet"+str_id+" MV2c10",         
+             false, &(m_outData -> o_trkbjets),  iBTrkjet, "btagw" );
+    m_outMngrHist -> AddStandardTH1( "trkbjet"+str_id+"_reff", 0.05,0.,0.4,   ";b-trkjet"+str_id+" R_{eff}",        false,      
+             &(m_outData -> o_trkjets), iBTrkjet, "reff");
+
+    //for MC
+    if(!m_opt->IsData() && (iBTrkjet <= 0) ){
+      m_outMngrHist -> AddStandardTH1( "trkbjet_truth_b"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth B-Trkjet"+str_id+" p_{T} [GeV]", 
+               DrawSyst, &(m_outData -> o_trkbjets_truth_b), iBTrkjet, "Pt");
+      m_outMngrHist -> AddStandardTH1( "trkbjet_truth_c"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth C-Trkjet"+str_id+" p_{T} [GeV]", 
+               DrawSyst, &(m_outData -> o_trkbjets_truth_c), iBTrkjet, "Pt");
+      m_outMngrHist -> AddStandardTH1( "trkbjet_truth_tau"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth #tau-Trket"+str_id+" p_{T} [GeV]",  
+               DrawSyst, &(m_outData -> o_trkbjets_truth_tau), iBTrkjet, "Pt");
+      m_outMngrHist -> AddStandardTH1( "trkbjet_truth_lqg"+str_id+"_pt",    10, 0, 1000,     ";b-tagged Truth Light-Trkjet"+str_id+" p_{T} [GeV]",  
+               DrawSyst, &(m_outData -> o_trkbjets_truth_lqg), iBTrkjet, "Pt");
+
+    }
+  }
+  for ( int iLTrkjet=-1; iLTrkjet<=4; ++iLTrkjet  ) {
+    std::string str_id = "";
+    str_id += std::to_string(iLTrkjet);
+    if(iLTrkjet==-1) str_id = "s";
+    m_outMngrHist -> AddStandardTH1( "trkljet"+str_id+"_pt",    10, 0, 500,   ";light-trkjet"+str_id+" p_{T} [GeV]",  
+             false, &(m_outData -> o_trkljets), iLTrkjet, "Pt" );
+    m_outMngrHist -> AddStandardTH1( "trkljet"+str_id+"_eta",   0.2, -3, 3,   ";light-trkjet"+str_id+" #eta",         
+             false, &(m_outData -> o_trkljets), iLTrkjet, "Eta" );
+    m_outMngrHist -> AddStandardTH1( "trkljet"+str_id+"_btagw", 0.1,-1.1,1.1, ";light-trkjet"+str_id+" MV2c10", 
+             false, &(m_outData -> o_trkljets), iLTrkjet, "btagw" );
+    m_outMngrHist -> AddStandardTH1( "trkljet"+str_id+"_reff", 0.05,0.,0.4,   ";light-trkjet"+str_id+" R_{eff}",        false,      
+             &(m_outData -> o_trkljets), iLTrkjet, "reff");
+  }
 
       }//TRACK JETS
 
       //Large-R jets
       if( m_opt -> UseLargeRJets() ){
-	m_outMngrHist -> AddStandardTH1( "FatJets_n", 1, -0.5, 5.5,     ";Number of large-R jets",  false, &(m_outData -> o_fjets_n) );
-	for ( int iLRJet=-1; iLRJet<=0; ++iLRJet ) {
-	  std::string str_id = "";
-	  str_id += std::to_string(iLRJet);
-	  if(iLRJet==-1) str_id = "s";
-	  m_outMngrHist -> AddStandardTH1( "FatJet"+str_id+"_pt",  50, 0, 1000, ";Fat jet"+str_id+"  p_{T} [GeV]"      ,  false, &(m_outData -> o_fjets), iLRJet, "Pt");
-	  m_outMngrHist -> AddStandardTH1( "FatJet"+str_id+"_eta", 0.2, -3, 3,  ";Fat jet"+str_id+"  #eta"             ,  false, &(m_outData -> o_fjets), iLRJet, "Eta");
-	  m_outMngrHist -> AddStandardTH1( "FatJet"+str_id+"_m",   10, 0, 400,  ";Fat jet"+str_id+"  mass [GeV]"       ,  false, &(m_outData -> o_fjets), iLRJet, "M");
-	}
+  m_outMngrHist -> AddStandardTH1( "FatJets_n", 1, -0.5, 5.5,     ";Number of large-R jets",  false, &(m_outData -> o_fjets_n) );
+  for ( int iLRJet=-1; iLRJet<=0; ++iLRJet ) {
+    std::string str_id = "";
+    str_id += std::to_string(iLRJet);
+    if(iLRJet==-1) str_id = "s";
+    m_outMngrHist -> AddStandardTH1( "FatJet"+str_id+"_pt",  50, 0, 1000, ";Fat jet"+str_id+"  p_{T} [GeV]"      ,  false, &(m_outData -> o_fjets), iLRJet, "Pt");
+    m_outMngrHist -> AddStandardTH1( "FatJet"+str_id+"_eta", 0.2, -3, 3,  ";Fat jet"+str_id+"  #eta"             ,  false, &(m_outData -> o_fjets), iLRJet, "Eta");
+    m_outMngrHist -> AddStandardTH1( "FatJet"+str_id+"_m",   10, 0, 400,  ";Fat jet"+str_id+"  mass [GeV]"       ,  false, &(m_outData -> o_fjets), iLRJet, "M");
+  }
       }
 
     }// DrawReco
@@ -753,13 +753,22 @@ bool VLQ_Analysis_Data2015::Begin(){
       const bool DrawSyst = (iRCJet == 0) && otherVariables;
 
       if(DrawReco){
-	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_pt",         50, 0, 1000, ";RC jet"+str_id+"  p_{T} [GeV]"      ,  false, &(m_outData -> o_rcjets), iRCJet, "Pt");
-	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_eta",        0.2, -3, 3,  ";RC jet"+str_id+"  #eta"             ,  false, &(m_outData -> o_rcjets), iRCJet, "Eta");
-	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_m",          10, 0, 500,  ";RC jet"+str_id+"  mass [GeV]"       ,  false, &(m_outData -> o_rcjets), iRCJet, "M");
-	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_nconsts",    1, -0.5,5.5, ";Number of RC jet"+str_id+"  consts" ,  false,    &(m_outData -> o_rcjets), iRCJet, "nconsts");
-	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_nbconsts",    1, -0.5,5.5, ";Number of RC jet"+str_id+" b-tagged consts" ,  false,    &(m_outData -> o_rcjets), iRCJet, "nbconsts");
-	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_isRCTTMass", 1, -.5, 1.5, ";Mass Tag"          ,  false,    &(m_outData -> o_rcjets), iRCJet, "isRCTTMass");
-
+  m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_pt",         50, 0, 1000, ";RC jet"+str_id+"  p_{T} [GeV]"      ,  false, &(m_outData -> o_rcjets), iRCJet, "Pt");
+  m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_eta",        0.2, -3, 3,  ";RC jet"+str_id+"  #eta"             ,  false, &(m_outData -> o_rcjets), iRCJet, "Eta");
+  m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_m",          10, 0, 500,  ";RC jet"+str_id+"  mass [GeV]"       ,  false, &(m_outData -> o_rcjets), iRCJet, "M");
+  m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_nconsts",    1, -0.5,5.5, ";Number of RC jet"+str_id+"  consts" ,  false,    &(m_outData -> o_rcjets), iRCJet, "nconsts");
+  m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_nbconsts",    1, -0.5,5.5, ";Number of RC jet"+str_id+" b-tagged consts" ,  false,    &(m_outData -> o_rcjets), iRCJet, "nbconsts");
+  m_outMngrHist -> AddStandardTH1( "RCjet"+str_id+"_isRCTTMass", 1, -.5, 1.5, ";Mass Tag"          ,  false,    &(m_outData -> o_rcjets), iRCJet, "isRCTTMass");
+
+  m_outMngrHist -> AddStandardTH2( "RCjet"+str_id+"_pt", "RCjet"+str_id+"_m", 50, 0, 1200, 10, 0, 500
+           , "RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" mass [GeV]", "RC jet"+str_id+" mass [GeV]"
+           , false, &(m_outData -> o_rcjets), &(m_outData -> o_rcjets), iRCJet, iRCJet, false, "Pt", "M" );
+  m_outMngrHist -> AddStandardTH2( "RCjet"+str_id+"_pt", "RCjet"+str_id+"_nconsts", 50, 0, 1200, 1, -0.5, 5.5
+           , "RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" p_{T} [GeV]; Number of RC jet"+str_id+" consts", "Number of RC jet"+str_id+" consts"
+           , false, &(m_outData -> o_rcjets), &(m_outData -> o_rcjets), iRCJet, iRCJet, false, "Pt", "nconsts" );
+  m_outMngrHist -> AddStandardTH2( "RCjet"+str_id+"_pt", "RCjet"+str_id+"_nbconsts", 50, 0, 1200, 1, -0.5, 5.5
+           , "RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" p_{T} [GeV]; Number of RC jet"+str_id+" b-tagged consts", "Number of RC jet"+str_id+" b-tagged consts"
+           , false, &(m_outData -> o_rcjets), &(m_outData -> o_rcjets), iRCJet, iRCJet, false, "Pt", "nbconsts" );
       }
 
       //
@@ -767,29 +776,29 @@ bool VLQ_Analysis_Data2015::Begin(){
       //
 
       if(DrawTruth){
-	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id + "_pT_truth", 50.,0.,3000., ";RC jet"+str_id+" p_{T}^{truth}"
-					 , false, &(m_outData -> o_rcjets), iRCJet, "pT_truth");
-	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id + "_fpT_truth", 0.1,0.,2., ";RC jet"+str_id+" p_{T}^{reco} / p_{T}^{truth}"
-					 , false, &(m_outData -> o_rcjets), iRCJet, "fpT_reco");
-	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id + "_dR_truth", 0.1,0.,6., ";RC jet"+str_id+" #DeltaR^{truth}"
-					 , false, &(m_outData -> o_rcjets), iRCJet, "dR_truth");
-	m_outMngrHist -> AddStandardTH1( "RCjet"+str_id + "_nmatch_truth", 1.,0.,3., ";RC jet"+str_id+" N_{match}^{truth}"
-					 , false, &(m_outData -> o_rcjets), iRCJet, "nmatch_truth");
+  m_outMngrHist -> AddStandardTH1( "RCjet"+str_id + "_pT_truth", 50.,0.,3000., ";RC jet"+str_id+" p_{T}^{truth}"
+           , false, &(m_outData -> o_rcjets), iRCJet, "pT_truth");
+  m_outMngrHist -> AddStandardTH1( "RCjet"+str_id + "_fpT_truth", 0.1,0.,2., ";RC jet"+str_id+" p_{T}^{reco} / p_{T}^{truth}"
+           , false, &(m_outData -> o_rcjets), iRCJet, "fpT_reco");
+  m_outMngrHist -> AddStandardTH1( "RCjet"+str_id + "_dR_truth", 0.1,0.,6., ";RC jet"+str_id+" #DeltaR^{truth}"
+           , false, &(m_outData -> o_rcjets), iRCJet, "dR_truth");
+  m_outMngrHist -> AddStandardTH1( "RCjet"+str_id + "_nmatch_truth", 1.,0.,3., ";RC jet"+str_id+" N_{match}^{truth}"
+           , false, &(m_outData -> o_rcjets), iRCJet, "nmatch_truth");
   m_outMngrHist -> AddStandardTH1( "RCjet"+str_id + "_pdgId_truth", 1.,0.,30., ";RC jet"+str_id+" PDGID^{truth}"
            , false, &(m_outData -> o_rcjets), iRCJet, "pdgId_truth");
 
-  m_outMngrHist -> AddStandardTH2( "RCjet"+str_id+"_pt", "RCjet"+str_id+"_pdgId_truth", 50, 0, 1000, 1, 0., 26.
-           , "RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" PDGID^{truth}", "RC jet"+str_id+" PDGID^{truth}"
-           , false, &(m_outData -> o_rcjets), &(m_outData -> o_rcjets), iRCJet, iRCJet, false, "Pt", "pdgId_truth" );
-  m_outMngrHist -> AddStandardTH2( "RCjet"+str_id+"_m", "RCjet"+str_id+"_pdgId_truth", 10, 0, 500, 1, 0., 26.
-           , "RC jet"+str_id+" mass [GeV]; RC jet"+str_id+" mass [GeV]; RC jet"+str_id+" PDGID^{truth}", "RC jet"+str_id+" PDGID^{truth}"
-           , false, &(m_outData -> o_rcjets), &(m_outData -> o_rcjets), iRCJet, iRCJet, false, "M", "pdgId_truth" );
-  m_outMngrHist -> AddStandardTH2( "RCjet"+str_id+"_nconsts", "RCjet"+str_id+"_pdgId_truth", 1, -0.5, 5.5, 1, 0., 26.
-           , "Number of RC jet"+str_id+" consts; Number of RC jet"+str_id+" consts; RC jet"+str_id+" PDGID^{truth}", "RC jet"+str_id+" PDGID^{truth}"
-           , false, &(m_outData -> o_rcjets), &(m_outData -> o_rcjets), iRCJet, iRCJet, false, "nconsts", "pdgId_truth" );
-  m_outMngrHist -> AddStandardTH2( "RCjet"+str_id+"_nbconsts", "RCjet"+str_id+"_pdgId_truth", 1, -0.5, 5.5, 1, 0., 26.
-           , "Number of RC jet"+str_id+" b-tagged consts; Number of RC jet"+str_id+" b-tagged consts; RC jet"+str_id+" PDGID^{truth}", "RC jet"+str_id+" PDGID^{truth}"
-           , false, &(m_outData -> o_rcjets), &(m_outData -> o_rcjets), iRCJet, iRCJet, false, "nbconsts", "pdgId_truth" );
+  // m_outMngrHist -> AddStandardTH2( "RCjet"+str_id+"_pt", "RCjet"+str_id+"_pdgId_truth", 50, 0, 1000, 1, 0., 26.
+  //          , "RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" PDGID^{truth}", "RC jet"+str_id+" PDGID^{truth}"
+  //          , false, &(m_outData -> o_rcjets), &(m_outData -> o_rcjets), iRCJet, iRCJet, false, "Pt", "pdgId_truth" );
+  // m_outMngrHist -> AddStandardTH2( "RCjet"+str_id+"_m", "RCjet"+str_id+"_pdgId_truth", 10, 0, 500, 1, 0., 26.
+  //          , "RC jet"+str_id+" mass [GeV]; RC jet"+str_id+" mass [GeV]; RC jet"+str_id+" PDGID^{truth}", "RC jet"+str_id+" PDGID^{truth}"
+  //          , false, &(m_outData -> o_rcjets), &(m_outData -> o_rcjets), iRCJet, iRCJet, false, "M", "pdgId_truth" );
+  // m_outMngrHist -> AddStandardTH2( "RCjet"+str_id+"_nconsts", "RCjet"+str_id+"_pdgId_truth", 1, -0.5, 5.5, 1, 0., 26.
+  //          , "Number of RC jet"+str_id+" consts; Number of RC jet"+str_id+" consts; RC jet"+str_id+" PDGID^{truth}", "RC jet"+str_id+" PDGID^{truth}"
+  //          , false, &(m_outData -> o_rcjets), &(m_outData -> o_rcjets), iRCJet, iRCJet, false, "nconsts", "pdgId_truth" );
+  // m_outMngrHist -> AddStandardTH2( "RCjet"+str_id+"_nbconsts", "RCjet"+str_id+"_pdgId_truth", 1, -0.5, 5.5, 1, 0., 26.
+  //          , "Number of RC jet"+str_id+" b-tagged consts; Number of RC jet"+str_id+" b-tagged consts; RC jet"+str_id+" PDGID^{truth}", "RC jet"+str_id+" PDGID^{truth}"
+  //          , false, &(m_outData -> o_rcjets), &(m_outData -> o_rcjets), iRCJet, iRCJet, false, "nbconsts", "pdgId_truth" );
       }
     }
 
@@ -835,11 +844,11 @@ bool VLQ_Analysis_Data2015::Begin(){
         str_id += std::to_string(iTT);
         if(iTT==-1) str_id = "s";
         const bool DrawSyst = (iTT == 0) && otherVariables;
-	if(DrawReco){
-	  m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_pt", 50, 0, 5000, ";"+decayType+" reco VLQ"+str_id+" p_{T} [GeV]" ,  
-					   DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "Pt" );
-	  m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_eta", 0.2, -3, 3, ";"+decayType+" reco VLQ"+str_id+" #eta"        ,  
-					   DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "Eta" );
+  if(DrawReco){
+    m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_pt", 50, 0, 5000, ";"+decayType+" reco VLQ"+str_id+" p_{T} [GeV]" ,  
+             DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "Pt" );
+    m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_eta", 0.2, -3, 3, ";"+decayType+" reco VLQ"+str_id+" #eta"        ,  
+             DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "Eta" );
     m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_m", 25, 0, 5000, ";"+decayType+" reco VLQ"+str_id+" mass [GeV]"    ,  
              DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "M" );
     m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_m1", 10, 0, 500, ";"+decayType+" reco VLQ"+str_id+" m_{1} [GeV]"    ,  
@@ -848,27 +857,27 @@ bool VLQ_Analysis_Data2015::Begin(){
              DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "m2" );
     m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_redm", 25, 0, 4000, ";"+decayType+" reco VLQ"+str_id+" reduced mass [GeV]"    ,  
              DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "redM" );
-	  m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_dR12", 0.1, 0, 6, ";"+decayType+" reco VLQ"+str_id+" #DeltaR(1,2)"    ,  
-					   DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "dR12" );
-	  m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_dPhi12", 0.1, 0, 4, ";"+decayType+" reco VLQ"+str_id+" #Delta#phi(1,2)"    ,  
-					   DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "dPhi12" );
-	  m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_dEta12", 0.1, 0, 6, ";"+decayType+" reco VLQ"+str_id+" #Delta#eta(1,2)"    ,  
-					   DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "dEta12" );
-	  m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_fpT12", 0.1, 0., 10., ";"+decayType+" reco VLQ"+str_id+" fpT(1,2)"    ,  
-					   DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "fpT12" );
-	}
-
- 	if(DrawTruth){
-	  m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ"+str_id + "_pT_truth", 50.,0.,3000., "; "+decayType+" reco VLQ"+str_id+" p_{T}^{truth}"
-					   , false, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "pT_truth");
-	  m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ"+str_id + "_fpT_truth", 0.1,0.,2., "; "+decayType+" reco VLQ"+str_id+" p_{T}^{reco} / p_{T}^{truth}"
-					   , false, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "fpT_reco");
-	  m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ"+str_id + "_dR_truth", 0.1,0.,6., "; "+decayType+" reco VLQ"+str_id+" #DeltaR^{truth}"
-					   , false, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "dR_truth");
-	  m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ"+str_id + "_nmatch_truth", 1.,0.,3., "; "+decayType+" reco VLQ"+str_id+" N_{match}^{truth}"
-					   , false, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "nmatch_truth");
-
-	}
+    m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_dR12", 0.1, 0, 6, ";"+decayType+" reco VLQ"+str_id+" #DeltaR(1,2)"    ,  
+             DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "dR12" );
+    m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_dPhi12", 0.1, 0, 4, ";"+decayType+" reco VLQ"+str_id+" #Delta#phi(1,2)"    ,  
+             DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "dPhi12" );
+    m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_dEta12", 0.1, 0, 6, ";"+decayType+" reco VLQ"+str_id+" #Delta#eta(1,2)"    ,  
+             DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "dEta12" );
+    m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_fpT12", 0.1, 0., 10., ";"+decayType+" reco VLQ"+str_id+" fpT(1,2)"    ,  
+             DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "fpT12" );
+  }
+
+  if(DrawTruth){
+    m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ"+str_id + "_pT_truth", 50.,0.,3000., "; "+decayType+" reco VLQ"+str_id+" p_{T}^{truth}"
+             , false, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "pT_truth");
+    m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ"+str_id + "_fpT_truth", 0.1,0.,2., "; "+decayType+" reco VLQ"+str_id+" p_{T}^{reco} / p_{T}^{truth}"
+             , false, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "fpT_reco");
+    m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ"+str_id + "_dR_truth", 0.1,0.,6., "; "+decayType+" reco VLQ"+str_id+" #DeltaR^{truth}"
+             , false, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "dR_truth");
+    m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ"+str_id + "_nmatch_truth", 1.,0.,3., "; "+decayType+" reco VLQ"+str_id+" N_{match}^{truth}"
+             , false, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "nmatch_truth");
+
+  }
 
       }//index loop
 
@@ -881,23 +890,23 @@ bool VLQ_Analysis_Data2015::Begin(){
 
       //======= Leptonic top ======
       m_outMngrHist -> AddStandardTH1( "leptop_pT_truth",   50, 0, 1000, ";Leptonic top p_{T}^{truth} [GeV]"
-				       ,  false, &(m_outData -> o_leptop), -1, "pT_truth");
+               ,  false, &(m_outData -> o_leptop), -1, "pT_truth");
       m_outMngrHist -> AddStandardTH1( "leptop_fpT_truth",   0.1, 0., 2., ";Leptonic top p_{T}^{reco}/p_{T}^{truth}"
-				       ,  false, &(m_outData -> o_leptop), -1, "fpT_truth");
+               ,  false, &(m_outData -> o_leptop), -1, "fpT_truth");
       m_outMngrHist -> AddStandardTH1( "leptop_dR_truth",   0.1, 0., 6., ";Leptonic top #DeltaR^{truth}"
-				       ,  false, &(m_outData -> o_leptop), -1, "dR_truth");
+               ,  false, &(m_outData -> o_leptop), -1, "dR_truth");
       m_outMngrHist -> AddStandardTH1( "leptop_nmatch_truth",   1, 0, 2, ";Leptonic top isTruthMatched"
-				       ,  false, &(m_outData -> o_leptop), -1, "nmatch_truth");
+               ,  false, &(m_outData -> o_leptop), -1, "nmatch_truth");
 
       //======= Leptonic W ======
       m_outMngrHist -> AddStandardTH1( "lepW_pT_truth",   50, 0, 1000, ";Leptonic W p_{T}^{truth} [GeV]"
-				       ,  false, &(m_outData -> o_lepW), -1, "pT_truth");
+               ,  false, &(m_outData -> o_lepW), -1, "pT_truth");
       m_outMngrHist -> AddStandardTH1( "lepW_fpT_truth",   0.1, 0., 2., ";Leptonic W p_{T}^{reco}/p_{T}^{truth}"
-				       ,  false, &(m_outData -> o_lepW), -1, "fpT_truth");
+               ,  false, &(m_outData -> o_lepW), -1, "fpT_truth");
       m_outMngrHist -> AddStandardTH1( "lepW_dR_truth",   0.1, 0., 6., ";Leptonic W #DeltaR^{truth}"
-				       ,  false, &(m_outData -> o_lepW), -1, "dR_truth");
+               ,  false, &(m_outData -> o_lepW), -1, "dR_truth");
       m_outMngrHist -> AddStandardTH1( "lepW_nmatch_truth",   1, 0, 2, ";Leptonic W isTruthMatched"
-				       ,  false, &(m_outData -> o_lepW), -1, "nmatch_truth");
+               ,  false, &(m_outData -> o_lepW), -1, "nmatch_truth");
 
     }
 
@@ -920,55 +929,66 @@ bool VLQ_Analysis_Data2015::Begin(){
       else if(type=="RCMV1bin"){ tagstring = "W/Z-tagged (#geq1b)"; }
 
       if(DrawReco){
-	m_outMngrHist -> AddStandardTH1( type + "_jets_n", 1, -0.5, 5.5, ";Number of "+tagstring+" jets",  otherVariables, &(m_outData -> o_taggedjets_n.at(type)) );
-	m_outMngrHist -> AddStandardTH1( type + "_leptop_dRmin",0.1, 0, 6.,";#DeltaR_{min}(Leptonic top, RC-tagged jet)", 
-					 false, &(m_outData -> o_leptop), -1, "dRmin_"+type, hopt_nouflow);
-	m_outMngrHist -> AddStandardTH1( type + "_leptop_b_dRmin",0.1, 0, 6.,";#DeltaR_{min}(Leptonic top-b, RC-tagged jet)", 
-					 false, &(m_outData -> o_leptop), -1, "dRmin_b_"+type, hopt_nouflow);
+  m_outMngrHist -> AddStandardTH1( type + "_jets_n", 1, -0.5, 5.5, ";Number of "+tagstring+" jets",  otherVariables, &(m_outData -> o_taggedjets_n.at(type)) );
+  m_outMngrHist -> AddStandardTH1( type + "_leptop_dRmin",0.1, 0, 6.,";#DeltaR_{min}(Leptonic top, RC-tagged jet)", 
+           false, &(m_outData -> o_leptop), -1, "dRmin_"+type, hopt_nouflow);
+  m_outMngrHist -> AddStandardTH1( type + "_leptop_b_dRmin",0.1, 0, 6.,";#DeltaR_{min}(Leptonic top-b, RC-tagged jet)", 
+           false, &(m_outData -> o_leptop), -1, "dRmin_b_"+type, hopt_nouflow);
       }
       for ( int iTT =-1; iTT <=0; ++iTT ) {
         std::string str_id = "";
         str_id += std::to_string(iTT);
         if(iTT==-1) str_id = "s";
         const bool DrawSyst = (iTT == 0) && otherVariables;
-	if(DrawReco){
-	  m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_pt", 50, 0, 1000, ";"+tagstring+" jet"+str_id+" p_{T} [GeV]" ,  
-					   DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "Pt" );
-	  m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_eta", 0.2, -3, 3, ";"+tagstring+" jet"+str_id+" #eta"        ,  
-					   DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "Eta" );
-	  m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_m", 10, 0, 500, ";"+tagstring+" jet"+str_id+" mass [GeV]"    ,  
-					   DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "M" );
-	  m_outMngrHist -> AddStandardTH1( type + "_jet" +str_id+ "_bconsts_n", 1, -0.5, 5.5, ";"+tagstring+" jet"+str_id+" N_{subjets}^{b-tagged}",  
-					   DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "nbconsts" );
-	  if(type=="RCTTMass" || type=="LooseRCTTMass"){
-	    m_outMngrHist -> AddStandardTH1( type + "_jet" +str_id+ "_consts_n", 1, -0.5, 5.5, ";"+tagstring+" jet"+str_id+" N_{subjets}",  
-					     DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "nconsts" );
-	  }
-	  m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_dR_lep", 0.1, 0., 6., "; #DeltaR("+tagstring+" jet"+str_id+", lep)" ,  
-					   DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "dR_lep", hopt_nouflow );
-	  m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_dPhi_lep", 0.1, 0., 3., "; #Delta#Phi("+tagstring+" jet"+str_id+", lep)" ,  
-					   DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "dPhi_lep", hopt_nouflow );
-	  m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_dPhi_met", 0.1, 0., 3., "; #Delta#Phi("+tagstring+" jet"+str_id+", met)" ,  
-					   DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "dPhi_met", hopt_nouflow );
-	  m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_dPhi_leptop", 0.1, 0., 3., "; #Delta#Phi("+tagstring+" jet"+str_id+", leptop)" ,  
-					   DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "dPhi_leptop", hopt_nouflow );
-	  m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_dR_leptop", 0.1, 0., 6., "; #DeltaR("+tagstring+" jet"+str_id+", leptop)" ,  
-					   DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "dR_leptop", hopt_nouflow );
-
-	}//DrawReco
-
-	//
-	// For truth-match studies
-	//
-	if(DrawTruth){
-	  m_outMngrHist -> AddStandardTH1( type + "_jet"+str_id + "_pT_truth", 50.,0.,3000., "; "+tagstring+" jet"+str_id+" p_{T}^{truth}"
-					   , false, &(m_outData -> o_taggedjets.at(type)), iTT, "pT_truth");
-	  m_outMngrHist -> AddStandardTH1( type + "_jet"+str_id + "_fpT_truth", 0.1,0.,2., "; "+tagstring+" jet"+str_id+" p_{T}^{reco} / p_{T}^{truth}"
-					   , false, &(m_outData -> o_taggedjets.at(type)), iTT, "fpT_truth");
-	  m_outMngrHist -> AddStandardTH1( type + "_jet"+str_id + "_dR_truth", 0.1,0.,6., "; "+tagstring+" jet"+str_id+" #DeltaR^{truth}"
-					   , false, &(m_outData -> o_taggedjets.at(type)), iTT, "dR_truth");
-	  m_outMngrHist -> AddStandardTH1( type + "_jet"+str_id + "_nmatch_truth", 1.,0.,3., "; "+tagstring+" jet"+str_id+" N_{match}^{truth}"
-					   , false, &(m_outData -> o_taggedjets.at(type)), iTT, "nmatch_truth");
+  if(DrawReco){
+    m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_pt", 50, 0, 1000, ";"+tagstring+" jet"+str_id+" p_{T} [GeV]" ,  
+             DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "Pt" );
+    m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_eta", 0.2, -3, 3, ";"+tagstring+" jet"+str_id+" #eta"        ,  
+             DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "Eta" );
+    m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_m", 10, 0, 500, ";"+tagstring+" jet"+str_id+" mass [GeV]"    ,  
+             DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "M" );
+    m_outMngrHist -> AddStandardTH1( type + "_jet" +str_id+ "_bconsts_n", 1, -0.5, 5.5, ";"+tagstring+" jet"+str_id+" N_{subjets}^{b-tagged}",  
+             DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "nbconsts" );
+    if(type=="RCTTMass" || type=="LooseRCTTMass"){
+      m_outMngrHist -> AddStandardTH1( type + "_jet" +str_id+ "_consts_n", 1, -0.5, 5.5, ";"+tagstring+" jet"+str_id+" N_{subjets}",  
+               DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "nconsts" );
+    }
+    m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_dR_lep", 0.1, 0., 6., "; #DeltaR("+tagstring+" jet"+str_id+", lep)" ,  
+             DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "dR_lep", hopt_nouflow );
+    m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_dPhi_lep", 0.1, 0., 3., "; #Delta#Phi("+tagstring+" jet"+str_id+", lep)" ,  
+             DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "dPhi_lep", hopt_nouflow );
+    m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_dPhi_met", 0.1, 0., 3., "; #Delta#Phi("+tagstring+" jet"+str_id+", met)" ,  
+             DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "dPhi_met", hopt_nouflow );
+    m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_dPhi_leptop", 0.1, 0., 3., "; #Delta#Phi("+tagstring+" jet"+str_id+", leptop)" ,  
+             DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "dPhi_leptop", hopt_nouflow );
+    m_outMngrHist -> AddStandardTH1( type + "_jet" + str_id + "_dR_leptop", 0.1, 0., 6., "; #DeltaR("+tagstring+" jet"+str_id+", leptop)" ,  
+             DrawSyst, &(m_outData -> o_taggedjets.at(type)), iTT, "dR_leptop", hopt_nouflow );
+
+    // 2D variables for boosted object tagging optimization studies
+    m_outMngrHist -> AddStandardTH2( type + "_jet" + str_id + "_pt", type + "_jet" + str_id + "_m", 50, 0, 1200, 10, 0, 500
+           , "RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" mass [GeV]", "RC jet"+str_id+" mass [GeV]"
+           , false, &(m_outData -> o_taggedjets.at(type)), &(m_outData -> o_taggedjets.at(type)), iTT, iTT, false, "Pt", "M" );
+    m_outMngrHist -> AddStandardTH2( type + "_jet" + str_id + "_pt", type + "_jet" + str_id + "_nconsts", 50, 0, 1200, 1, -0.5, 5.5
+           , "RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" p_{T} [GeV]; Number of RC jet"+str_id+" consts", "Number of RC jet"+str_id+" consts"
+           , false, &(m_outData -> o_taggedjets.at(type)), &(m_outData -> o_taggedjets.at(type)), iTT, iTT, false, "Pt", "nconsts" );
+    m_outMngrHist -> AddStandardTH2( type + "_jet" + str_id + "_pt", type + "_jet" + str_id + "_nbconsts", 50, 0, 1200, 1, -0.5, 5.5
+           , "RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" p_{T} [GeV]; Number of RC jet"+str_id+" b-tagged consts", "Number of RC jet"+str_id+" b-tagged consts"
+           , false, &(m_outData -> o_taggedjets.at(type)), &(m_outData -> o_taggedjets.at(type)), iTT, iTT, false, "Pt", "nbconsts" );
+
+  }//DrawReco
+
+  //
+  // For truth-match studies
+  //
+  if(DrawTruth){
+    m_outMngrHist -> AddStandardTH1( type + "_jet"+str_id + "_pT_truth", 50.,0.,3000., "; "+tagstring+" jet"+str_id+" p_{T}^{truth}"
+             , false, &(m_outData -> o_taggedjets.at(type)), iTT, "pT_truth");
+    m_outMngrHist -> AddStandardTH1( type + "_jet"+str_id + "_fpT_truth", 0.1,0.,2., "; "+tagstring+" jet"+str_id+" p_{T}^{reco} / p_{T}^{truth}"
+             , false, &(m_outData -> o_taggedjets.at(type)), iTT, "fpT_truth");
+    m_outMngrHist -> AddStandardTH1( type + "_jet"+str_id + "_dR_truth", 0.1,0.,6., "; "+tagstring+" jet"+str_id+" #DeltaR^{truth}"
+             , false, &(m_outData -> o_taggedjets.at(type)), iTT, "dR_truth");
+    m_outMngrHist -> AddStandardTH1( type + "_jet"+str_id + "_nmatch_truth", 1.,0.,3., "; "+tagstring+" jet"+str_id+" N_{match}^{truth}"
+             , false, &(m_outData -> o_taggedjets.at(type)), iTT, "nmatch_truth");
     m_outMngrHist -> AddStandardTH1( type + "_jet"+str_id + "_pdgId_truth", 1.,0.,26., "; "+tagstring+" jet"+str_id+" PDGID^{truth}"
              , false, &(m_outData -> o_taggedjets.at(type)), iTT, "pdgId_truth");
     }
@@ -1025,15 +1045,15 @@ bool VLQ_Analysis_Data2015::Begin(){
     if(DrawReco){
       m_outMngrHist -> AddStandardTH1( "lep_n", 1, -0.5, 5.5, ";Number of signal leptons", false, &(m_outData -> o_lep_n) );
       for ( int iLep=-1; iLep<=0; ++iLep ) {
-	std::string str_id = "";
-	str_id += std::to_string(iLep);
-	if(iLep==-1) str_id = "s";
-	m_outMngrHist -> AddStandardTH1( "lep"+str_id+"_pt",  50, 0, 800,            ";Lepton p_{T} [GeV]"     ,  otherVariables,           &(m_outData -> o_lep), iLep, "Pt" );
-	m_outMngrHist -> AddStandardTH1( "lep"+str_id+"_pt_zoom",  20, 10, 500,       ";Lepton p_{T} [GeV]"     ,  otherVariables,  &(m_outData -> o_lep), iLep, "Pt" );
-	m_outMngrHist -> AddStandardTH1( "lep"+str_id+"_eta",  0.2, -3, 3,           ";Lepton #eta"            ,  otherVariables,  &(m_outData -> o_lep), iLep, "Eta" );
-	m_outMngrHist -> AddStandardTH1( "lep"+str_id+"_phi",  0.2, -4, 4,           ";Lepton #phi"            ,  false,           &(m_outData -> o_lep), iLep, "Phi" );
-	m_outMngrHist -> AddStandardTH1( "lep"+str_id+"_d0sig",  0.1, 0, 5,          ";Lepton d_{0}^{sig}"     ,  false,           &(m_outData -> o_lep), iLep, "d0sig" );
-	m_outMngrHist -> AddStandardTH1( "lep"+str_id+"_z0",  0.025, -0.5, 0.5,      ";Lepton z_{0} [mm]"      ,  false,           &(m_outData -> o_lep), iLep, "z0" );
+  std::string str_id = "";
+  str_id += std::to_string(iLep);
+  if(iLep==-1) str_id = "s";
+  m_outMngrHist -> AddStandardTH1( "lep"+str_id+"_pt",  50, 0, 800,            ";Lepton p_{T} [GeV]"     ,  otherVariables,           &(m_outData -> o_lep), iLep, "Pt" );
+  m_outMngrHist -> AddStandardTH1( "lep"+str_id+"_pt_zoom",  20, 10, 500,       ";Lepton p_{T} [GeV]"     ,  otherVariables,  &(m_outData -> o_lep), iLep, "Pt" );
+  m_outMngrHist -> AddStandardTH1( "lep"+str_id+"_eta",  0.2, -3, 3,           ";Lepton #eta"            ,  otherVariables,  &(m_outData -> o_lep), iLep, "Eta" );
+  m_outMngrHist -> AddStandardTH1( "lep"+str_id+"_phi",  0.2, -4, 4,           ";Lepton #phi"            ,  false,           &(m_outData -> o_lep), iLep, "Phi" );
+  m_outMngrHist -> AddStandardTH1( "lep"+str_id+"_d0sig",  0.1, 0, 5,          ";Lepton d_{0}^{sig}"     ,  false,           &(m_outData -> o_lep), iLep, "d0sig" );
+  m_outMngrHist -> AddStandardTH1( "lep"+str_id+"_z0",  0.025, -0.5, 0.5,      ";Lepton z_{0} [mm]"      ,  false,           &(m_outData -> o_lep), iLep, "z0" );
       }
 
       //Kinematic variables
@@ -1070,15 +1090,15 @@ bool VLQ_Analysis_Data2015::Begin(){
       m_outMngrHist->AddStandardTH1("dRaverage_jetjet",         0.25,0,5   ,";#DeltaR_{ave.}(jet,jet)", false, &(m_outData -> o_dRaverage_jetjet)  );
 
       if(m_opt->DoLowBRegions()){
-	m_outMngrHist -> AddStandardTH1( "mtbmin_lowb_3b",      50, 0, 500,    ";m_{T}^{min}(b,MET) (LowB_3b)", false, &(m_outData->o_mTbmin_lowb_3b) );
-	m_outMngrHist -> AddStandardTH1( "mtbmin_lowb_3b_zoom", 25, 0, 250,    ";m_{T}^{min}(b,MET) (LowB_3b)", otherVariables, &(m_outData->o_mTbmin_lowb_3b) );
-	m_outMngrHist -> AddStandardTH1( "mbb_mindR_lowb_3b",  10,0,300,  ";m_{bb}^{#DeltaR min} (LowB_3b) [GeV]", otherVariables, &(m_outData -> o_mbb_mindR_lowb_3b) );
-	m_outMngrHist -> AddStandardTH1( "dR_bjetbjet_lowb_3b", 0.25,0,5,  ";#DeltaR_{min}(b-jet,b-jet) (LowB_3b)", false, &(m_outData -> o_dRmin_bjetbjet_lowb_3b) );
-	//---
-	m_outMngrHist -> AddStandardTH1( "mtbmin_lowb_4b",      50, 0, 500,    ";m_{T}^{min}(b,MET) (LowB_4b)", false, &(m_outData->o_mTbmin_lowb_4b) );
-	m_outMngrHist -> AddStandardTH1( "mtbmin_lowb_4b_zoom", 25, 0, 250,    ";m_{T}^{min}(b,MET) (LowB_4b)", otherVariables, &(m_outData->o_mTbmin_lowb_4b) );
-	m_outMngrHist -> AddStandardTH1( "mbb_mindR_lowb_4b",  10,0,300,  ";m_{bb}^{#DeltaR min} (LowB_4b) [GeV]", otherVariables, &(m_outData -> o_mbb_mindR_lowb_4b) );
-	m_outMngrHist -> AddStandardTH1( "dR_bjetbjet_lowb_4b", 0.25,0,5,  ";#DeltaR_{min}(b-jet,b-jet) (LowB_4b)", false, &(m_outData -> o_dRmin_bjetbjet_lowb_4b) );
+  m_outMngrHist -> AddStandardTH1( "mtbmin_lowb_3b",      50, 0, 500,    ";m_{T}^{min}(b,MET) (LowB_3b)", false, &(m_outData->o_mTbmin_lowb_3b) );
+  m_outMngrHist -> AddStandardTH1( "mtbmin_lowb_3b_zoom", 25, 0, 250,    ";m_{T}^{min}(b,MET) (LowB_3b)", otherVariables, &(m_outData->o_mTbmin_lowb_3b) );
+  m_outMngrHist -> AddStandardTH1( "mbb_mindR_lowb_3b",  10,0,300,  ";m_{bb}^{#DeltaR min} (LowB_3b) [GeV]", otherVariables, &(m_outData -> o_mbb_mindR_lowb_3b) );
+  m_outMngrHist -> AddStandardTH1( "dR_bjetbjet_lowb_3b", 0.25,0,5,  ";#DeltaR_{min}(b-jet,b-jet) (LowB_3b)", false, &(m_outData -> o_dRmin_bjetbjet_lowb_3b) );
+  //---
+  m_outMngrHist -> AddStandardTH1( "mtbmin_lowb_4b",      50, 0, 500,    ";m_{T}^{min}(b,MET) (LowB_4b)", false, &(m_outData->o_mTbmin_lowb_4b) );
+  m_outMngrHist -> AddStandardTH1( "mtbmin_lowb_4b_zoom", 25, 0, 250,    ";m_{T}^{min}(b,MET) (LowB_4b)", otherVariables, &(m_outData->o_mTbmin_lowb_4b) );
+  m_outMngrHist -> AddStandardTH1( "mbb_mindR_lowb_4b",  10,0,300,  ";m_{bb}^{#DeltaR min} (LowB_4b) [GeV]", otherVariables, &(m_outData -> o_mbb_mindR_lowb_4b) );
+  m_outMngrHist -> AddStandardTH1( "dR_bjetbjet_lowb_4b", 0.25,0,5,  ";#DeltaR_{min}(b-jet,b-jet) (LowB_4b)", false, &(m_outData -> o_dRmin_bjetbjet_lowb_4b) );
       }
 
     }//DrawReco
@@ -1088,202 +1108,202 @@ bool VLQ_Analysis_Data2015::Begin(){
       std::vector<std::string> truthTypes = {};
 
       if(m_opt -> SampleName() == SampleName::VLQ ){
-	truthTypes = {    
-	  "VLQ", "VLQ_Ht", "VLQ_Zt", "VLQ_Wb",
-	  "VLQ_Hbdect", "VLQ_Wlepb", "VLQ_Whadb", "VLQ_Zhadt",
-	  "b1", "b2",
-	  "H", "Hbb", "H_b1", "H_b2",
-	  "hadtop", "hadtop_b", "hadtop_W", "hadtop_q1", "hadtop_q2",
-	  "leptop", "leptop_b", "leptop_W", "leptop_lep", "leptop_nu",
-	  "hadZ", "hadZ_q1", "hadZ_q2",
-	  "lepZ", "lepZ_lep1", "lepZ_lep2",
-	  "invZ",
-	  "hadW", "hadW_q1", "hadW_q2",
-	  "lepW", "lepW_lep", "lepW_nu"
-	};
+  truthTypes = {    
+    "VLQ", "VLQ_Ht", "VLQ_Zt", "VLQ_Wb",
+    "VLQ_Hbdect", "VLQ_Wlepb", "VLQ_Whadb", "VLQ_Zhadt",
+    "b1", "b2",
+    "H", "Hbb", "H_b1", "H_b2",
+    "hadtop", "hadtop_b", "hadtop_W", "hadtop_q1", "hadtop_q2",
+    "leptop", "leptop_b", "leptop_W", "leptop_lep", "leptop_nu",
+    "hadZ", "hadZ_q1", "hadZ_q2",
+    "lepZ", "lepZ_lep1", "lepZ_lep2",
+    "invZ",
+    "hadW", "hadW_q1", "hadW_q2",
+    "lepW", "lepW_lep", "lepW_nu"
+  };
       }
       else if( m_outData -> o_is_ttbar ){
-	truthTypes = {    
-	  "hadtop", "hadtop_b", "hadtop_W", "hadtop_q1", "hadtop_q2",
-	  "leptop", "leptop_b", "leptop_W", "leptop_lep", "leptop_nu"
-	};
+  truthTypes = {    
+    "hadtop", "hadtop_b", "hadtop_W", "hadtop_q1", "hadtop_q2",
+    "leptop", "leptop_b", "leptop_W", "leptop_lep", "leptop_nu"
+  };
       }
 
 
       for ( const std::string type : truthTypes ){
 
-	m_outMngrHist -> AddStandardTH1( "truth_"+type + "_n", 1, -0.5, 5.5, ";Number of truth "+type,  false, &(m_outData -> o_truth_partons_n.at(type)) );
-	for ( int iTT =-1; iTT <=1; ++iTT ) {
-	  std::string str_id = "";
-	  str_id += std::to_string(iTT);
-	  if(iTT==-1) str_id = "s";
-
-	  m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_pt", 50, 0, 5000, "; truth "+type+", "+str_id+" p_{T} [GeV]" ,  
-					   false, &(m_outData -> o_truth_partons.at(type)), iTT, "Pt" );
-	  m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_eta", 0.2, -4, 4, "; truth "+type+", "+str_id+" #eta"        ,  
-					   false, &(m_outData -> o_truth_partons.at(type)), iTT, "Eta" );
-	  double  mmax_part = (type.find("VLQ") == std::string::npos) ? 500. : 2000.;
-	  m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_m", 10, 0, mmax_part, "; truth "+type+", "+str_id+" mass [GeV]"    ,  
-					   false, &(m_outData -> o_truth_partons.at(type)), iTT, "M" );
-
-	  if(type.find("_nu") != std::string::npos || (type.find("invZ") != std::string::npos)){
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dPhi_MET",  0.1,0.,4,  "; truth #Delta#phi("+type+", "+str_id+" ,MET)"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dPhi_MET"/*, hopt_nouflow*/  );
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_frac_MET",  0.1,0.,4,  "; truth MET fraction("+type+", "+str_id+")"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "frac_MET"/*, hopt_nouflow*/  );
-	  }
-	  if(type.find("VLQ") != std::string::npos){
-	  
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_fpT12",  0.25,0,5,  "; truth"+type+", "+str_id+" fpT_{12}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "fpT12"/*, hopt_nouflow*/  );
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR12",  0.1,0,6,  "; truth"+type+", "+str_id+" #DeltaR_{12}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR12"/*, hopt_nouflow*/  );
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dPhi12",  0.1,0.,4,  "; truth"+type+", "+str_id+" #Delta#phi_{12}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dPhi12"/*, hopt_nouflow*/  );
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dEta12",  0.1,0.,6,  "; truth"+type+", "+str_id+" #Delta#eta_{12}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dEta12"/*, hopt_nouflow*/  );
-	  }
-	  if(type=="hadtop" || type=="leptop"){
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_bW",  0.25,0,5,  "; truth"+type+", "+str_id+" #DeltaR(b,W)"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_bW"/*, hopt_nouflow*/  );
-	    if(type=="leptop"){
-	      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_blep",  0.25,0,5,  "; truth"+type+", "+str_id+" #DeltaR(b,lep)"
-					       , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_blep"/*, hopt_nouflow*/  );
-	      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dPhi_blep",  0.1,0.,4,  "; truth"+type+", "+str_id+" #Delta#phi(b,lep)"
-					       , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dPhi_blep"/*, hopt_nouflow*/  );
-	      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dPhi_bnu",  0.1,0.,4,  "; truth"+type+", "+str_id+" #Delta#phi(b,#nu)"
-					       , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dPhi_bnu"/*, hopt_nouflow*/  );
-	      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_mT_bnu", 25, 0, 3000, "; truth "+type+", "+str_id+" m_{T}(b,#nu) [GeV]"    ,  
-					       false, &(m_outData -> o_truth_partons.at(type)), iTT, "mT_bnu"/*, hopt_nouflow*/ );
-	    }//leptop
-	    if(type=="hadtop"){
-	      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dRmax_bq",  0.25,0,5,  "; truth"+type+", "+str_id+" #DeltaR_{max}(b,q_{1},q_{2})"
-					       , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dRmax_bq"/*, hopt_nouflow*/  );
-	    }//hadtop
-	  
-	  }//top
-	  if(type == "H"){
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_bb",  0.25,0,5,  "; truth"+type+", "+str_id+" #DeltaR(b_{1},b_{2})"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_bb"/*, hopt_nouflow*/  );
-	  }//Higgs
-	  if( (type == "lepW") || (type == "leptop") || (type == "leptop_W") ){
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dPhi_lepnu",  0.1,0,4,  "; truth"+type+", "+str_id+" #Delta#phi(lep,#nu)"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dPhi_lepnu"/*, hopt_nouflow*/  );
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dEta_lepnu",  0.1,0,8,  "; truth"+type+", "+str_id+" #Delta#eta(lep,#nu)"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dEta_lepnu"/*, hopt_nouflow*/  );
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_mT_lepnu", 25, 0, 3000, "; truth "+type+", "+str_id+" m_{T}(lep,#nu) [GeV]"    ,  
-					     false, &(m_outData -> o_truth_partons.at(type)), iTT, "mT_lepnu"/*, hopt_nouflow*/ );
-	    if(type == "leptop"){
-	      //Truth-matching
-	      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_pT_reco_leptop", 50.,0.,3000., "; truth"+type+", "+str_id+" p_{T}^{reco}"
-					       , false, &(m_outData -> o_truth_partons.at(type)), iTT, "pT_reco_leptop");
-	      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_fpT_reco_leptop", 0.1,0.,2., "; truth"+type+", "+str_id+" p_{T}^{reco}/ p_{T}^{truth}"
-					       , false, &(m_outData -> o_truth_partons.at(type)), iTT, "fpT_reco_leptop");
-	      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_m_reco_leptop", 20.,0.,400., "; truth"+type+", "+str_id+" m^{reco}"
-					       , false, &(m_outData -> o_truth_partons.at(type)), iTT, "m_reco_leptop");
-	      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_reco_leptop", 0.1,0.,6., "; truth"+type+", "+str_id+" #DeltaR^{reco}"
-					       , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_reco_leptop");
-	      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nmatch_reco_leptop", 1.,0.,2., "; truth"+type+", "+str_id+" IsRecoMatched"
-					       , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nmatch_reco_leptop");
-	    }
-	    else{
-	      //Truth-matching
-	      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_pT_reco", 50.,0.,3000., "; truth"+type+", "+str_id+" p_{T}^{reco}"
-					       , false, &(m_outData -> o_truth_partons.at(type)), iTT, "pT_reco");
-	      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_fpT_reco", 0.1,0.,2., "; truth"+type+", "+str_id+" p_{T}^{reco}/ p_{T}^{truth}"
-					       , false, &(m_outData -> o_truth_partons.at(type)), iTT, "fpT_reco");
-	      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_m_reco", 20.,0.,400., "; truth"+type+", "+str_id+" m^{reco}"
-					       , false, &(m_outData -> o_truth_partons.at(type)), iTT, "m_reco");
-	      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_reco", 0.1,0.,6., "; truth"+type+", "+str_id+" #DeltaR^{reco}"
-					       , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_reco");
-	      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nmatch_reco", 1.,0.,2., "; truth"+type+", "+str_id+" IsRecoMatched"
-					       , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nmatch_reco");
-	    }
-
-	  }//LepW or Leptop
-	  if(type == "lepZ"){
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_leplep",  0.25,0,5,  "; truth"+type+", "+str_id+" #DeltaR(lep_{1},lep_{2})"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_leplep"/*, hopt_nouflow*/  );
-	  }//LepZ
-	  if( (type == "hadW") || (type == "hadZ") || (type == "hadtop") || (type == "hadtop_W") ){
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_qq",  0.25,0,5,  "; truth"+type+", "+str_id+" #DeltaR(q_{1},q_{2})"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_qq"/*, hopt_nouflow*/  );
-	  }//HadW or HadZ or Hadtop
-
-	  //
-	  // Matched fat jet studies
-	  //
-	  if( (type.find("VLQ") != std::string::npos) ){
-
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_pT_reco", 50.,0.,3500., "; truth"+type+", "+str_id+" p_{T}^{reco}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "pT_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_fpT_reco", 0.1,0.,2., "; truth"+type+", "+str_id+" p_{T}^{reco} / p_{T}^{truth}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "fpT_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_m_reco", 20.,0.,3000., "; truth"+type+", "+str_id+" m^{reco}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "m_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nconsts_reco", 1.,0.,4., "; truth"+type+", "+str_id+" N_{consts}^{reco}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nconsts_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nbconsts_reco", 1.,0.,3., "; truth"+type+", "+str_id+" N_{b-consts}^{reco}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nbconsts_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_isRCMTop", 1.,0.,2., "; truth"+type+", "+str_id+" isTop-tagged"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "isRCMTop_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_isRCMHiggs", 1.,0.,2., "; truth"+type+", "+str_id+" isHiggs-tagged"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "isRCMHiggs_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_isRCMV", 1.,0.,2., "; truth"+type+", "+str_id+" isV-tagged"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "isRCMV_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nmatch_reco", 1.,0.,3., "; truth"+type+", "+str_id+" N_{match}^{reco}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nmatch_reco");
-	  }
-
-
-	  if( (type == "leptop") || (type == "hadtop") || (type == "hadtop_W") || 
-	      (type == "Hbb") || (type == "Hnonbb") || 
-	      (type == "hadW") || (type == "hadZ") ){
-
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_pT_reco", 50.,0.,2000., "; truth"+type+", "+str_id+" p_{T}^{RC}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "pT_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_fpT_reco", 0.1,0.,2., "; truth"+type+", "+str_id+" p_{T}^{RC} / p_{T}^{truth}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "fpT_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_m_reco", 20.,0.,3000., "; truth"+type+", "+str_id+" m^{RC}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "m_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nconsts_reco", 1.,0.,4., "; truth"+type+", "+str_id+" N_{consts}^{reco}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nconsts_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nbconsts_reco", 1.,0.,3., "; truth"+type+", "+str_id+" N_{b-consts}^{reco}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nbconsts_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_isRCMTop", 1.,0.,2., "; truth"+type+", "+str_id+" isTop-tagged"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "isRCMTop_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_isRCMHiggs", 1.,0.,2., "; truth"+type+", "+str_id+" isHiggs-tagged"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "isRCMHiggs_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_isRCMV", 1.,0.,2., "; truth"+type+", "+str_id+" isV-tagged"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "isRCMV_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_reco", 0.1,0.,6., "; truth"+type+", "+str_id+" #DeltaR^{RC}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nmatch_reco", 1.,0.,3., "; truth"+type+", "+str_id+" N_{match}^{RC}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nmatch_reco");
-	    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_ncontained_reco", 1.,0.,3., "; truth"+type+", "+str_id+" N_{contained}^{RC}"
-					     , false, &(m_outData -> o_truth_partons.at(type)), iTT, "ncontained_reco");
-	  }
-
-	}//Number of objects of a type
+  m_outMngrHist -> AddStandardTH1( "truth_"+type + "_n", 1, -0.5, 5.5, ";Number of truth "+type,  false, &(m_outData -> o_truth_partons_n.at(type)) );
+  for ( int iTT =-1; iTT <=1; ++iTT ) {
+    std::string str_id = "";
+    str_id += std::to_string(iTT);
+    if(iTT==-1) str_id = "s";
+
+    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_pt", 50, 0, 5000, "; truth "+type+", "+str_id+" p_{T} [GeV]" ,  
+             false, &(m_outData -> o_truth_partons.at(type)), iTT, "Pt" );
+    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_eta", 0.2, -4, 4, "; truth "+type+", "+str_id+" #eta"        ,  
+             false, &(m_outData -> o_truth_partons.at(type)), iTT, "Eta" );
+    double  mmax_part = (type.find("VLQ") == std::string::npos) ? 500. : 2000.;
+    m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_m", 10, 0, mmax_part, "; truth "+type+", "+str_id+" mass [GeV]"    ,  
+             false, &(m_outData -> o_truth_partons.at(type)), iTT, "M" );
+
+    if(type.find("_nu") != std::string::npos || (type.find("invZ") != std::string::npos)){
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dPhi_MET",  0.1,0.,4,  "; truth #Delta#phi("+type+", "+str_id+" ,MET)"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dPhi_MET"/*, hopt_nouflow*/  );
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_frac_MET",  0.1,0.,4,  "; truth MET fraction("+type+", "+str_id+")"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "frac_MET"/*, hopt_nouflow*/  );
+    }
+    if(type.find("VLQ") != std::string::npos){
+    
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_fpT12",  0.25,0,5,  "; truth"+type+", "+str_id+" fpT_{12}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "fpT12"/*, hopt_nouflow*/  );
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR12",  0.1,0,6,  "; truth"+type+", "+str_id+" #DeltaR_{12}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR12"/*, hopt_nouflow*/  );
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dPhi12",  0.1,0.,4,  "; truth"+type+", "+str_id+" #Delta#phi_{12}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dPhi12"/*, hopt_nouflow*/  );
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dEta12",  0.1,0.,6,  "; truth"+type+", "+str_id+" #Delta#eta_{12}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dEta12"/*, hopt_nouflow*/  );
+    }
+    if(type=="hadtop" || type=="leptop"){
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_bW",  0.25,0,5,  "; truth"+type+", "+str_id+" #DeltaR(b,W)"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_bW"/*, hopt_nouflow*/  );
+      if(type=="leptop"){
+        m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_blep",  0.25,0,5,  "; truth"+type+", "+str_id+" #DeltaR(b,lep)"
+                 , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_blep"/*, hopt_nouflow*/  );
+        m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dPhi_blep",  0.1,0.,4,  "; truth"+type+", "+str_id+" #Delta#phi(b,lep)"
+                 , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dPhi_blep"/*, hopt_nouflow*/  );
+        m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dPhi_bnu",  0.1,0.,4,  "; truth"+type+", "+str_id+" #Delta#phi(b,#nu)"
+                 , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dPhi_bnu"/*, hopt_nouflow*/  );
+        m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_mT_bnu", 25, 0, 3000, "; truth "+type+", "+str_id+" m_{T}(b,#nu) [GeV]"    ,  
+                 false, &(m_outData -> o_truth_partons.at(type)), iTT, "mT_bnu"/*, hopt_nouflow*/ );
+      }//leptop
+      if(type=="hadtop"){
+        m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dRmax_bq",  0.25,0,5,  "; truth"+type+", "+str_id+" #DeltaR_{max}(b,q_{1},q_{2})"
+                 , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dRmax_bq"/*, hopt_nouflow*/  );
+      }//hadtop
+    
+    }//top
+    if(type == "H"){
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_bb",  0.25,0,5,  "; truth"+type+", "+str_id+" #DeltaR(b_{1},b_{2})"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_bb"/*, hopt_nouflow*/  );
+    }//Higgs
+    if( (type == "lepW") || (type == "leptop") || (type == "leptop_W") ){
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dPhi_lepnu",  0.1,0,4,  "; truth"+type+", "+str_id+" #Delta#phi(lep,#nu)"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dPhi_lepnu"/*, hopt_nouflow*/  );
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dEta_lepnu",  0.1,0,8,  "; truth"+type+", "+str_id+" #Delta#eta(lep,#nu)"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dEta_lepnu"/*, hopt_nouflow*/  );
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_mT_lepnu", 25, 0, 3000, "; truth "+type+", "+str_id+" m_{T}(lep,#nu) [GeV]"    ,  
+               false, &(m_outData -> o_truth_partons.at(type)), iTT, "mT_lepnu"/*, hopt_nouflow*/ );
+      if(type == "leptop"){
+        //Truth-matching
+        m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_pT_reco_leptop", 50.,0.,3000., "; truth"+type+", "+str_id+" p_{T}^{reco}"
+                 , false, &(m_outData -> o_truth_partons.at(type)), iTT, "pT_reco_leptop");
+        m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_fpT_reco_leptop", 0.1,0.,2., "; truth"+type+", "+str_id+" p_{T}^{reco}/ p_{T}^{truth}"
+                 , false, &(m_outData -> o_truth_partons.at(type)), iTT, "fpT_reco_leptop");
+        m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_m_reco_leptop", 20.,0.,400., "; truth"+type+", "+str_id+" m^{reco}"
+                 , false, &(m_outData -> o_truth_partons.at(type)), iTT, "m_reco_leptop");
+        m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_reco_leptop", 0.1,0.,6., "; truth"+type+", "+str_id+" #DeltaR^{reco}"
+                 , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_reco_leptop");
+        m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nmatch_reco_leptop", 1.,0.,2., "; truth"+type+", "+str_id+" IsRecoMatched"
+                 , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nmatch_reco_leptop");
+      }
+      else{
+        //Truth-matching
+        m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_pT_reco", 50.,0.,3000., "; truth"+type+", "+str_id+" p_{T}^{reco}"
+                 , false, &(m_outData -> o_truth_partons.at(type)), iTT, "pT_reco");
+        m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_fpT_reco", 0.1,0.,2., "; truth"+type+", "+str_id+" p_{T}^{reco}/ p_{T}^{truth}"
+                 , false, &(m_outData -> o_truth_partons.at(type)), iTT, "fpT_reco");
+        m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_m_reco", 20.,0.,400., "; truth"+type+", "+str_id+" m^{reco}"
+                 , false, &(m_outData -> o_truth_partons.at(type)), iTT, "m_reco");
+        m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_reco", 0.1,0.,6., "; truth"+type+", "+str_id+" #DeltaR^{reco}"
+                 , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_reco");
+        m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nmatch_reco", 1.,0.,2., "; truth"+type+", "+str_id+" IsRecoMatched"
+                 , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nmatch_reco");
+      }
+
+    }//LepW or Leptop
+    if(type == "lepZ"){
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_leplep",  0.25,0,5,  "; truth"+type+", "+str_id+" #DeltaR(lep_{1},lep_{2})"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_leplep"/*, hopt_nouflow*/  );
+    }//LepZ
+    if( (type == "hadW") || (type == "hadZ") || (type == "hadtop") || (type == "hadtop_W") ){
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_qq",  0.25,0,5,  "; truth"+type+", "+str_id+" #DeltaR(q_{1},q_{2})"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_qq"/*, hopt_nouflow*/  );
+    }//HadW or HadZ or Hadtop
+
+    //
+    // Matched fat jet studies
+    //
+    if( (type.find("VLQ") != std::string::npos) ){
+
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_pT_reco", 50.,0.,3500., "; truth"+type+", "+str_id+" p_{T}^{reco}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "pT_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_fpT_reco", 0.1,0.,2., "; truth"+type+", "+str_id+" p_{T}^{reco} / p_{T}^{truth}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "fpT_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_m_reco", 20.,0.,3000., "; truth"+type+", "+str_id+" m^{reco}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "m_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nconsts_reco", 1.,0.,4., "; truth"+type+", "+str_id+" N_{consts}^{reco}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nconsts_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nbconsts_reco", 1.,0.,3., "; truth"+type+", "+str_id+" N_{b-consts}^{reco}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nbconsts_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_isRCMTop", 1.,0.,2., "; truth"+type+", "+str_id+" isTop-tagged"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "isRCMTop_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_isRCMHiggs", 1.,0.,2., "; truth"+type+", "+str_id+" isHiggs-tagged"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "isRCMHiggs_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_isRCMV", 1.,0.,2., "; truth"+type+", "+str_id+" isV-tagged"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "isRCMV_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nmatch_reco", 1.,0.,3., "; truth"+type+", "+str_id+" N_{match}^{reco}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nmatch_reco");
+    }
+
+
+    if( (type == "leptop") || (type == "hadtop") || (type == "hadtop_W") || 
+        (type == "Hbb") || (type == "Hnonbb") || 
+        (type == "hadW") || (type == "hadZ") ){
+
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_pT_reco", 50.,0.,2000., "; truth"+type+", "+str_id+" p_{T}^{RC}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "pT_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_fpT_reco", 0.1,0.,2., "; truth"+type+", "+str_id+" p_{T}^{RC} / p_{T}^{truth}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "fpT_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_m_reco", 20.,0.,3000., "; truth"+type+", "+str_id+" m^{RC}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "m_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nconsts_reco", 1.,0.,4., "; truth"+type+", "+str_id+" N_{consts}^{reco}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nconsts_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nbconsts_reco", 1.,0.,3., "; truth"+type+", "+str_id+" N_{b-consts}^{reco}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nbconsts_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_isRCMTop", 1.,0.,2., "; truth"+type+", "+str_id+" isTop-tagged"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "isRCMTop_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_isRCMHiggs", 1.,0.,2., "; truth"+type+", "+str_id+" isHiggs-tagged"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "isRCMHiggs_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_isRCMV", 1.,0.,2., "; truth"+type+", "+str_id+" isV-tagged"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "isRCMV_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_dR_reco", 0.1,0.,6., "; truth"+type+", "+str_id+" #DeltaR^{RC}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "dR_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_nmatch_reco", 1.,0.,3., "; truth"+type+", "+str_id+" N_{match}^{RC}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "nmatch_reco");
+      m_outMngrHist -> AddStandardTH1( "truth_" + type + str_id + "_ncontained_reco", 1.,0.,3., "; truth"+type+", "+str_id+" N_{contained}^{RC}"
+               , false, &(m_outData -> o_truth_partons.at(type)), iTT, "ncontained_reco");
+    }
+
+  }//Number of objects of a type
       
       }//Type of truth
 
       m_outMngrHist -> AddStandardTH1( "truth_dRmin_bb",  0.25,0,5,  "; truth #DeltaR_min(b,b)"
-				       , false, &(m_outData -> o_truth_dRmin_bb), -1, ""/*, hopt_nouflow*/  );
+               , false, &(m_outData -> o_truth_dRmin_bb), -1, ""/*, hopt_nouflow*/  );
       m_outMngrHist -> AddStandardTH1( "truth_minv_bb",  10.,0,1000.,  "; truth m_{inv}(b,b) [GeV]"
-				       , false, &(m_outData -> o_truth_minv_bb)  );
+               , false, &(m_outData -> o_truth_minv_bb)  );
       m_outMngrHist -> AddStandardTH1( "truth_dPhiMin_lepmet", 0.1,0,4,  "; truth #Delta#phi(lep,MET)"
-				       , false, &(m_outData -> o_truth_dPhiMin_lepmet), -1, ""/*, hopt_nouflow*/  );
+               , false, &(m_outData -> o_truth_dPhiMin_lepmet), -1, ""/*, hopt_nouflow*/  );
       m_outMngrHist -> AddStandardTH1( "truth_dPhiMin_jetmet", 0.1,0,4,  "; truth #Delta#phi_min(jet,MET)"
-				       , false, &(m_outData -> o_truth_dPhiMin_jetmet), -1, ""/*, hopt_nouflow*/  );
+               , false, &(m_outData -> o_truth_dPhiMin_jetmet), -1, ""/*, hopt_nouflow*/  );
       m_outMngrHist -> AddStandardTH1( "truth_partonMET",  25.,0,2000.,  "; truth (ME) E_{T}^{miss} [GeV]"
-				       , false, &(m_outData -> o_truth_partonMET), -1, "Pt"/*, hopt_nouflow*/  );
+               , false, &(m_outData -> o_truth_partonMET), -1, "Pt"/*, hopt_nouflow*/  );
       m_outMngrHist -> AddStandardTH1( "truth_mtw",  25.,0,3000.,  "; truth m_{T}^{W} [GeV]"
-				       , false, &(m_outData -> o_truth_mtw), -1, ""/*, hopt_nouflow*/  );
+               , false, &(m_outData -> o_truth_mtw), -1, ""/*, hopt_nouflow*/  );
       m_outMngrHist -> AddStandardTH1( "truth_ptw",  25.,0,5000.,  "; truth p_{T}^{W} [GeV]"
-				       , false, &(m_outData -> o_truth_ptw), -1, ""/*, hopt_nouflow*/  );
+               , false, &(m_outData -> o_truth_ptw), -1, ""/*, hopt_nouflow*/  );
       m_outMngrHist -> AddStandardTH1( "truth_mtbmin",  10.,0,1000.,  "; truth m_{T,b}^{min} [GeV]"
-				       , false, &(m_outData -> o_truth_mtbmin), -1, ""/*, hopt_nouflow*/  );
+               , false, &(m_outData -> o_truth_mtbmin), -1, ""/*, hopt_nouflow*/  );
       /*
       //TH2
       m_outMngrHist -> AddStandardTH2( "top_pt", "dR_Wb", 20, 0, 800, 0.1, 0., 5.,"Top p_{T} [GeV]", "#DeltaR(W,b)", false, &(m_outData -> o_truth_top_pt), &(m_outData -> o_truth_dR_Wb) );
@@ -1473,13 +1493,13 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry)
     if( m_opt -> FilterType() == VLQ_Options::APPLYFILTER ){
 
       if( m_opt -> StrSampleID().find("410470.") != std::string::npos ){
-	if( ht_truth > 600 ) return false;
+  if( ht_truth > 600 ) return false;
       } else if( m_opt -> StrSampleID().find("407344.") != std::string::npos ){
-	if( ht_truth < 600 || ht_truth > 1000 ) return false;
+  if( ht_truth < 600 || ht_truth > 1000 ) return false;
       } else if( m_opt -> StrSampleID().find("407343.") != std::string::npos  ){
-	if( ht_truth < 1000 || ht_truth > 1500 ) return false;
+  if( ht_truth < 1000 || ht_truth > 1500 ) return false;
       } else if( m_opt -> StrSampleID().find("407342.") != std::string::npos ){
-	if( ht_truth < 1500 ) return false;
+  if( ht_truth < 1500 ) return false;
       }
 
     }//filter
@@ -1708,7 +1728,7 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry)
   //###########################################################
   if( ( m_outData-> o_channel_type == VLQ_Enums::ELECTRON || m_outData-> o_channel_type == VLQ_Enums::MUON ) && 
       ( (m_outData -> o_AO_met->Pt() < m_opt->MinMetCutOneLep()) 
-	|| (m_opt->MaxMetCutOneLep() > 0. && m_outData -> o_AO_met->Pt() > m_opt->MaxMetCutOneLep()) ) ){ 
+  || (m_opt->MaxMetCutOneLep() > 0. && m_outData -> o_AO_met->Pt() > m_opt->MaxMetCutOneLep()) ) ){ 
     m_outData -> o_rejectEvent |= 1 << VLQ_Enums::METONELEP_REJECTED;
   }
 
@@ -1719,7 +1739,7 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry)
   //###########################################################
   if( (m_outData-> o_channel_type == VLQ_Enums::FULLHAD) &&
       ( (m_outData -> o_AO_met->Pt() < m_opt->MinMetCutZeroLep()) 
-	|| (m_opt->MaxMetCutZeroLep() > 0. && m_outData -> o_AO_met->Pt() > m_opt->MaxMetCutZeroLep()) ) ){ 
+  || (m_opt->MaxMetCutZeroLep() > 0. && m_outData -> o_AO_met->Pt() > m_opt->MaxMetCutZeroLep()) ) ){ 
     m_outData -> o_rejectEvent |= 1 << VLQ_Enums::METZEROLEP_REJECTED;
   }
 
@@ -1779,12 +1799,12 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry)
       if( m_outData -> o_is_ttbar ){ heavy_list = {"leptop", "hadtop", "hadtop_W"}; }
 
       for( const std::string & restype : heavy_list ){
-	AOVector* rescol = (m_outData -> o_truth_partons).at(restype);
-	if(!rescol){
-	  std::cerr << " WARNING => VLQ_Analysis_Data2015 : could not find parton collection " << restype << std::endl;
-	  continue;
-	}
-	for( AnalysisObject* parton : *rescol ){
+  AOVector* rescol = (m_outData -> o_truth_partons).at(restype);
+  if(!rescol){
+    std::cerr << " WARNING => VLQ_Analysis_Data2015 : could not find parton collection " << restype << std::endl;
+    continue;
+  }
+  for( AnalysisObject* parton : *rescol ){
     m_truthMngr -> MatchPartonToFatJets(*(m_outData -> o_rcjets), parton, 0.75 /*maxDR*/, true /*rcCollection*/, false /*tagCollection*/, true /*containment*/, 1.0 /*drcontained*/, true /*checkPt*/); 
 
     //===== Fill truth matched RC jets map =====
@@ -1814,20 +1834,20 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry)
     m_outData -> o_rcjets_truthmatched_n.at("truthHiggs") = m_outData -> o_rcjets_truthmatched.at("truthHiggs") -> size();
     m_outData -> o_rcjets_truthmatched_n.at("truthOther") = m_outData -> o_rcjets_truthmatched.at("truthOther") -> size();
 
-	}//each parton in collection
+  }//each parton in collection
 
       }//each collection of heavy resonance
 
 
       if( m_opt -> SampleName() == SampleName::VLQ ){
-	for ( const std::string decayType : {"Ht", "Zt", "Wb"} ){
+  for ( const std::string decayType : {"Ht", "Zt", "Wb"} ){
 
-	  AOVector& recoVLQCollection = *(m_outData -> o_recoVLQ.at(decayType));
-	  for( AnalysisObject* partonVLQ : *(m_outData -> o_truth_partons.at("VLQ_"+decayType)) ){
-	    m_truthMngr -> MatchPartonToFatJets( recoVLQCollection, partonVLQ, 1. /*maxDR*/, false /*rcCollection*/, false /*tagCollection*/, false /*containment*/, 1.0 /*drcontained*/, true /*checkPt*/ );
-	  }
+    AOVector& recoVLQCollection = *(m_outData -> o_recoVLQ.at(decayType));
+    for( AnalysisObject* partonVLQ : *(m_outData -> o_truth_partons.at("VLQ_"+decayType)) ){
+      m_truthMngr -> MatchPartonToFatJets( recoVLQCollection, partonVLQ, 1. /*maxDR*/, false /*rcCollection*/, false /*tagCollection*/, false /*containment*/, 1.0 /*drcontained*/, true /*checkPt*/ );
+    }
 
-	}
+  }
       }// VLQ samples
 
 
@@ -1837,37 +1857,37 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry)
       AOVector truth_lepW = {};
       truth_lepW.insert( truth_lepW.end(), m_outData -> o_truth_partons.at("leptop_W")->begin(), m_outData -> o_truth_partons.at("leptop_W")->end());
       if( m_opt -> SampleName() == SampleName::VLQ ){
-	truth_lepW.insert( truth_lepW.end(), m_outData -> o_truth_partons.at("lepW")->begin(), m_outData -> o_truth_partons.at("lepW")->end());
+  truth_lepW.insert( truth_lepW.end(), m_outData -> o_truth_partons.at("lepW")->begin(), m_outData -> o_truth_partons.at("lepW")->end());
       }
       for( AnalysisObject* obj : truth_lepW ){ obj -> SetMoment("nmatch_reco", 0); }
       if( m_outData -> o_lepW ){
-	double drmatch_truth_lepW = 100.; //Take all lepW
-	AnalysisObject* truth_lepW_match = m_varComputer -> GetClosestAO( m_outData->o_lepW, truth_lepW, drmatch_truth_lepW );
-	if(truth_lepW_match){
-
-	  double dr_truthreco_lepW = truth_lepW_match->DeltaR( *(m_outData->o_lepW) ); 
-	  if(dr_truthreco_lepW < 0.75){
-	    truth_lepW_match->SetMoment("nmatch_reco",1);
-	    m_outData->o_lepW->SetMoment("nmatch_truth",1);
-	  }
-	  else{
-	    truth_lepW_match->SetMoment("nmatch_reco",0);
-	    m_outData->o_lepW->SetMoment("nmatch_truth",0);
-	  }
-
-	  truth_lepW_match->SetMoment("pT_reco", (m_outData->o_lepW)->Pt());
-	  truth_lepW_match->SetMoment("fpT_reco", (m_outData->o_lepW)->Pt()/truth_lepW_match->Pt());
-	  truth_lepW_match->SetMoment("m_reco", (m_outData->o_lepW)->M());
-	  truth_lepW_match->SetMoment("dR_reco", dr_truthreco_lepW);
-
-
-	  m_outData->o_lepW->SetMoment("pT_truth", truth_lepW_match->Pt());
-	  m_outData->o_lepW->SetMoment("fpT_truth", (m_outData->o_lepW)->Pt()/truth_lepW_match->Pt());
-	  m_outData->o_lepW->SetMoment("dR_truth", dr_truthreco_lepW);
-	}
-	else{
-	  m_outData->o_lepW->SetMoment("nmatch_truth",0);
-	}
+  double drmatch_truth_lepW = 100.; //Take all lepW
+  AnalysisObject* truth_lepW_match = m_varComputer -> GetClosestAO( m_outData->o_lepW, truth_lepW, drmatch_truth_lepW );
+  if(truth_lepW_match){
+
+    double dr_truthreco_lepW = truth_lepW_match->DeltaR( *(m_outData->o_lepW) ); 
+    if(dr_truthreco_lepW < 0.75){
+      truth_lepW_match->SetMoment("nmatch_reco",1);
+      m_outData->o_lepW->SetMoment("nmatch_truth",1);
+    }
+    else{
+      truth_lepW_match->SetMoment("nmatch_reco",0);
+      m_outData->o_lepW->SetMoment("nmatch_truth",0);
+    }
+
+    truth_lepW_match->SetMoment("pT_reco", (m_outData->o_lepW)->Pt());
+    truth_lepW_match->SetMoment("fpT_reco", (m_outData->o_lepW)->Pt()/truth_lepW_match->Pt());
+    truth_lepW_match->SetMoment("m_reco", (m_outData->o_lepW)->M());
+    truth_lepW_match->SetMoment("dR_reco", dr_truthreco_lepW);
+
+
+    m_outData->o_lepW->SetMoment("pT_truth", truth_lepW_match->Pt());
+    m_outData->o_lepW->SetMoment("fpT_truth", (m_outData->o_lepW)->Pt()/truth_lepW_match->Pt());
+    m_outData->o_lepW->SetMoment("dR_truth", dr_truthreco_lepW);
+  }
+  else{
+    m_outData->o_lepW->SetMoment("nmatch_truth",0);
+  }
       }
 
       //
@@ -1875,35 +1895,35 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry)
       //
       for( AnalysisObject* obj : *(m_outData -> o_truth_partons.at("leptop")) ){ obj -> SetMoment("nmatch_reco", 0); }
       if( m_outData -> o_leptop ){
-	double drmatch_truth_leptop = 100.; //Take all leptop
-	AnalysisObject* truth_leptop_match = m_varComputer -> 
-	  GetClosestAO( m_outData->o_leptop, *(m_outData -> o_truth_partons.at("leptop")), drmatch_truth_leptop );
-	if(truth_leptop_match){
-
-	  double dr_truthreco_leptop = truth_leptop_match->DeltaR( *(m_outData->o_leptop) ); 
-	  if(dr_truthreco_leptop < 0.75){
-	    truth_leptop_match->SetMoment("nmatch_reco_leptop",1);
-	    m_outData->o_leptop->SetMoment("nmatch_truth",1);
-	  }
-	  else{
-	    truth_leptop_match->SetMoment("nmatch_reco_leptop",0);
-	    m_outData->o_leptop->SetMoment("nmatch_truth",0);
-	  }
-
-	  //truth_leptop_match->SetMoment("nmatch_reco_leptop",1);
-	  truth_leptop_match->SetMoment("pT_reco_leptop", (m_outData->o_leptop)->Pt());
-	  truth_leptop_match->SetMoment("fpT_reco_leptop", (m_outData->o_leptop)->Pt()/truth_leptop_match->Pt());
-	  truth_leptop_match->SetMoment("m_reco_leptop", (m_outData->o_leptop)->M());
-	  truth_leptop_match->SetMoment("dR_reco_leptop", dr_truthreco_leptop);
-
-	  //m_outData->o_leptop->SetMoment("nmatch_truth",1);
-	  m_outData->o_leptop->SetMoment("pT_truth", truth_leptop_match->Pt());
-	  m_outData->o_leptop->SetMoment("fpT_truth", (m_outData->o_leptop)->Pt()/truth_leptop_match->Pt());
-	  m_outData->o_leptop->SetMoment("dR_truth", dr_truthreco_leptop);
-	}
-	else{
-	  m_outData->o_leptop->SetMoment("nmatch_truth",0);
-	}
+  double drmatch_truth_leptop = 100.; //Take all leptop
+  AnalysisObject* truth_leptop_match = m_varComputer -> 
+    GetClosestAO( m_outData->o_leptop, *(m_outData -> o_truth_partons.at("leptop")), drmatch_truth_leptop );
+  if(truth_leptop_match){
+
+    double dr_truthreco_leptop = truth_leptop_match->DeltaR( *(m_outData->o_leptop) ); 
+    if(dr_truthreco_leptop < 0.75){
+      truth_leptop_match->SetMoment("nmatch_reco_leptop",1);
+      m_outData->o_leptop->SetMoment("nmatch_truth",1);
+    }
+    else{
+      truth_leptop_match->SetMoment("nmatch_reco_leptop",0);
+      m_outData->o_leptop->SetMoment("nmatch_truth",0);
+    }
+
+    //truth_leptop_match->SetMoment("nmatch_reco_leptop",1);
+    truth_leptop_match->SetMoment("pT_reco_leptop", (m_outData->o_leptop)->Pt());
+    truth_leptop_match->SetMoment("fpT_reco_leptop", (m_outData->o_leptop)->Pt()/truth_leptop_match->Pt());
+    truth_leptop_match->SetMoment("m_reco_leptop", (m_outData->o_leptop)->M());
+    truth_leptop_match->SetMoment("dR_reco_leptop", dr_truthreco_leptop);
+
+    //m_outData->o_leptop->SetMoment("nmatch_truth",1);
+    m_outData->o_leptop->SetMoment("pT_truth", truth_leptop_match->Pt());
+    m_outData->o_leptop->SetMoment("fpT_truth", (m_outData->o_leptop)->Pt()/truth_leptop_match->Pt());
+    m_outData->o_leptop->SetMoment("dR_truth", dr_truthreco_leptop);
+  }
+  else{
+    m_outData->o_leptop->SetMoment("nmatch_truth",0);
+  }
       }
 
 
@@ -2113,9 +2133,9 @@ bool VLQ_Analysis_Data2015::Terminate()
  
       SumAnalysisRegions(true);
       for( const std::pair<int, Selection*> &sel : *(m_selector->GetSelectionTree()) ){
-	if(sel.second->PassFlagAtBit(VLQ_Selector::PRESEL)){
-	  m_outMngrHist -> SaveStandardTH1(nameHist, false, AnalysisUtils::ReplaceString(sel.second->Name(),"-",""));
-	}
+  if(sel.second->PassFlagAtBit(VLQ_Selector::PRESEL)){
+    m_outMngrHist -> SaveStandardTH1(nameHist, false, AnalysisUtils::ReplaceString(sel.second->Name(),"-",""));
+  }
       }
 
     }
@@ -2152,9 +2172,9 @@ bool VLQ_Analysis_Data2015::SumAnalysisRegions(const bool newFile){
     void operator()(TH1D* hist, TH1D** target, const std::string& name, double scale = 1.){
       if(*target != NULL){ (*target)->Add(hist, scale); }
       else{ 
-	*target = (TH1D*)(hist->Clone(name.c_str()));
-	(*target)->SetDirectory(0);
-	(*target)->Scale(scale);
+  *target = (TH1D*)(hist->Clone(name.c_str()));
+  (*target)->SetDirectory(0);
+  (*target)->Scale(scale);
       } 
       
       return;
@@ -2169,46 +2189,46 @@ bool VLQ_Analysis_Data2015::SumAnalysisRegions(const bool newFile){
 
     if( m_opt->DoFitRegions() ){
       std::vector<std::string> regList_1L_fit = {
-	"c1lep0Tex0Hex6jin2bex",
-	"c1lep0Tex0Hex6jin3bex",
-	"c1lep0Tex0Hex6jin4bin",
-	"c1lep0Tex1Hex6jin2bex",
-	"c1lep0Tex1Hex6jin3bex",
-	"c1lep0Tex1Hex6jin4bin",
-	"c1lep1Tex0Hex6jin2bex",
-	"c1lep1Tex0Hex6jin3bex",
-	"c1lep1Tex0Hex6jin4bin",
-	"c1lep1Tex1Hex6jin2bex",
-	"c1lep1Tex1Hex6jin3bex",
-	"c1lep1Tex1Hex6jin4bin",
-	"c1lep2Tin0_1Hwin6jin2bex",
-	"c1lep2Tin0_1Hwin6jin3bex",
-	"c1lep2Tin0_1Hwin6jin4bin",
-	"c1lep0Tin2Hin6jin2bex",
-	"c1lep0Tin2Hin6jin3bex",
-	"c1lep0Tin2Hin6jin4bin"
+  "c1lep0Tex0Hex6jin2bex",
+  "c1lep0Tex0Hex6jin3bex",
+  "c1lep0Tex0Hex6jin4bin",
+  "c1lep0Tex1Hex6jin2bex",
+  "c1lep0Tex1Hex6jin3bex",
+  "c1lep0Tex1Hex6jin4bin",
+  "c1lep1Tex0Hex6jin2bex",
+  "c1lep1Tex0Hex6jin3bex",
+  "c1lep1Tex0Hex6jin4bin",
+  "c1lep1Tex1Hex6jin2bex",
+  "c1lep1Tex1Hex6jin3bex",
+  "c1lep1Tex1Hex6jin4bin",
+  "c1lep2Tin0_1Hwin6jin2bex",
+  "c1lep2Tin0_1Hwin6jin3bex",
+  "c1lep2Tin0_1Hwin6jin4bin",
+  "c1lep0Tin2Hin6jin2bex",
+  "c1lep0Tin2Hin6jin3bex",
+  "c1lep0Tin2Hin6jin4bin"
       };
       regList.insert(regList.end(), regList_1L_fit.begin(), regList_1L_fit.end());
     }//fit
     
     if( m_opt->DoValidnRegions() ){
       std::vector<std::string> regList_1L_valid = {
-	"c1lep0Tex0Hex5jex2bex",
-	"c1lep0Tex0Hex5jex3bex",
-	"c1lep0Tex0Hex5jex4bin",
-	"c1lep0Tex1Hex5jex2bex",
-	"c1lep0Tex1Hex5jex3bex",
-	"c1lep0Tex1Hex5jex4bin",
-	"c1lep1Tex0Hex5jex2bex",
-	"c1lep1Tex0Hex5jex3bex",
-	"c1lep1Tex0Hex5jex4bin",
-	"c1lep1Tex1Hex5jex2bex",
-	"c1lep1Tex1Hex5jex3bex",
-	"c1lep2Tin0_1Hwin5jex2bex",
-	"c1lep2Tin0_1Hwin5jex3bex",
-	"c1lep0Tin2Hin5jex2bex",
-	"c1lep0Tin2Hin5jex3bex",
-	"c1lep2THin5jex4bin"
+  "c1lep0Tex0Hex5jex2bex",
+  "c1lep0Tex0Hex5jex3bex",
+  "c1lep0Tex0Hex5jex4bin",
+  "c1lep0Tex1Hex5jex2bex",
+  "c1lep0Tex1Hex5jex3bex",
+  "c1lep0Tex1Hex5jex4bin",
+  "c1lep1Tex0Hex5jex2bex",
+  "c1lep1Tex0Hex5jex3bex",
+  "c1lep1Tex0Hex5jex4bin",
+  "c1lep1Tex1Hex5jex2bex",
+  "c1lep1Tex1Hex5jex3bex",
+  "c1lep2Tin0_1Hwin5jex2bex",
+  "c1lep2Tin0_1Hwin5jex3bex",
+  "c1lep0Tin2Hin5jex2bex",
+  "c1lep0Tin2Hin5jex3bex",
+  "c1lep2THin5jex4bin"
       };
       regList.insert(regList.end(), regList_1L_valid.begin(), regList_1L_valid.end());
     }//valid
@@ -2231,67 +2251,67 @@ bool VLQ_Analysis_Data2015::SumAnalysisRegions(const bool newFile){
 
     if( m_opt->DoFitRegions() ){
       std::vector<std::string> regList_0L_fit = {
-	"c0lep0Tex0Hex7jin2bexLowMtbmin",
-	"c0lep0Tex0Hex7jin2bexHighMtbmin",
-	"c0lep0Tex1Hex7jin2bexLowMtbmin",
-	"c0lep0Tex1Hex7jin2bexHighMtbmin",
-	"c0lep1Tex0Hex7jin2bexLowMtbmin",
-	"c0lep1Tex0Hex7jin2bexHighMtbmin",
-	"c0lep2THin7jin2bexLowMtbmin",
-	"c0lep2THin7jin2bexHighMtbmin",
-	"c0lep0Tex0Hex7jin3bexLowMtbmin",
-	"c0lep0Tex0Hex7jin3bexHighMtbmin",
-	"c0lep0Tex1Hex7jin3bexLowMtbmin",
-	"c0lep0Tex1Hex7jin3bexHighMtbmin",
-	"c0lep1Tex0Hex7jin3bexLowMtbmin",
-	"c0lep1Tex0Hex7jin3bexHighMtbmin",
-	"c0lep1Tex1Hex7jin3bexLowMtbmin",
-	"c0lep1Tex1Hex7jin3bexHighMtbmin",
-	"c0lep2Tin0_1Hwin7jin3bexLowMtbmin",
-	"c0lep2Tin0_1Hwin7jin3bexHighMtbmin",
-	"c0lep0Tin2Hin7jin3bex",
-	"c0lep0Tex0Hex7jin4binLowMtbmin",
-	"c0lep0Tex0Hex7jin4binHighMtbmin",
-	"c0lep0Tex1Hex7jin4binLowMtbmin",
-	"c0lep0Tex1Hex7jin4binHighMtbmin",
-	"c0lep1Tex0Hex7jin4binLowMtbmin",
-	"c0lep1Tex0Hex7jin4binHighMtbmin",
-	"c0lep2THin7jin4bin"
+  "c0lep0Tex0Hex7jin2bexLowMtbmin",
+  "c0lep0Tex0Hex7jin2bexHighMtbmin",
+  "c0lep0Tex1Hex7jin2bexLowMtbmin",
+  "c0lep0Tex1Hex7jin2bexHighMtbmin",
+  "c0lep1Tex0Hex7jin2bexLowMtbmin",
+  "c0lep1Tex0Hex7jin2bexHighMtbmin",
+  "c0lep2THin7jin2bexLowMtbmin",
+  "c0lep2THin7jin2bexHighMtbmin",
+  "c0lep0Tex0Hex7jin3bexLowMtbmin",
+  "c0lep0Tex0Hex7jin3bexHighMtbmin",
+  "c0lep0Tex1Hex7jin3bexLowMtbmin",
+  "c0lep0Tex1Hex7jin3bexHighMtbmin",
+  "c0lep1Tex0Hex7jin3bexLowMtbmin",
+  "c0lep1Tex0Hex7jin3bexHighMtbmin",
+  "c0lep1Tex1Hex7jin3bexLowMtbmin",
+  "c0lep1Tex1Hex7jin3bexHighMtbmin",
+  "c0lep2Tin0_1Hwin7jin3bexLowMtbmin",
+  "c0lep2Tin0_1Hwin7jin3bexHighMtbmin",
+  "c0lep0Tin2Hin7jin3bex",
+  "c0lep0Tex0Hex7jin4binLowMtbmin",
+  "c0lep0Tex0Hex7jin4binHighMtbmin",
+  "c0lep0Tex1Hex7jin4binLowMtbmin",
+  "c0lep0Tex1Hex7jin4binHighMtbmin",
+  "c0lep1Tex0Hex7jin4binLowMtbmin",
+  "c0lep1Tex0Hex7jin4binHighMtbmin",
+  "c0lep2THin7jin4bin"
       };
       regList.insert(regList.end(), regList_0L_fit.begin(), regList_0L_fit.end());
     }//fit
 
     if( m_opt->DoValidnRegions() ){
       std::vector<std::string> regList_0L_valid = {
-	"c0lep0Tex0Hex6jex2bexLowMtbmin",
-	"c0lep0Tex0Hex6jex2bexHighMtbmin",
-	"c0lep0Tex1Hex6jex2bexLowMtbmin",
-	"c0lep0Tex1Hex6jex2bexHighMtbmin",
-	"c0lep1Tex0Hex6jex2bexLowMtbmin",
-	"c0lep1Tex0Hex6jex2bexHighMtbmin",
-	"c0lep2THin6jex2bexLowMtbmin",
-	"c0lep2THin6jex2bexHighMtbmin",
-	"c0lep0Tex0Hex6jex3bexLowMtbmin",
-	"c0lep0Tex0Hex6jex3bexHighMtbmin",
-	"c0lep0Tex1Hex6jex3bexLowMtbmin",
-	"c0lep0Tex1Hex6jex3bexHighMtbmin",
-	"c0lep1Tex0Hex6jex3bexLowMtbmin",
-	"c0lep1Tex0Hex6jex3bexHighMtbmin",
-	"c0lep2THin6jex3bex",
-	"c0lep0Tex0Hex6jex4binLowMtbmin",
-	"c0lep0Tex0Hex6jex4binHighMtbmin",
-	"c0lep0Tex1Hex6jex4bin",
-	"c0lep1Tex0Hex6jex4bin",
-	"c0lep2THin6jex4bin"
+  "c0lep0Tex0Hex6jex2bexLowMtbmin",
+  "c0lep0Tex0Hex6jex2bexHighMtbmin",
+  "c0lep0Tex1Hex6jex2bexLowMtbmin",
+  "c0lep0Tex1Hex6jex2bexHighMtbmin",
+  "c0lep1Tex0Hex6jex2bexLowMtbmin",
+  "c0lep1Tex0Hex6jex2bexHighMtbmin",
+  "c0lep2THin6jex2bexLowMtbmin",
+  "c0lep2THin6jex2bexHighMtbmin",
+  "c0lep0Tex0Hex6jex3bexLowMtbmin",
+  "c0lep0Tex0Hex6jex3bexHighMtbmin",
+  "c0lep0Tex1Hex6jex3bexLowMtbmin",
+  "c0lep0Tex1Hex6jex3bexHighMtbmin",
+  "c0lep1Tex0Hex6jex3bexLowMtbmin",
+  "c0lep1Tex0Hex6jex3bexHighMtbmin",
+  "c0lep2THin6jex3bex",
+  "c0lep0Tex0Hex6jex4binLowMtbmin",
+  "c0lep0Tex0Hex6jex4binHighMtbmin",
+  "c0lep0Tex1Hex6jex4bin",
+  "c0lep1Tex0Hex6jex4bin",
+  "c0lep2THin6jex4bin"
       };
       regList.insert(regList.end(), regList_0L_valid.begin(), regList_0L_valid.end());
     }//valid
 
     std::map<std::string, std::vector<std::string> > targetPrintList_0L = {
-      {"sum0lep6jin2bin", {}},	
-      {"sum0lep7jin2bin", {}},	
-      {"sum0lep6jin3bin", {}},	
-      {"sum0lep7jin3bin", {}},	
+      {"sum0lep6jin2bin", {}},  
+      {"sum0lep7jin2bin", {}},  
+      {"sum0lep6jin3bin", {}},  
+      {"sum0lep7jin3bin", {}},  
       
       {"sum0lep1THin7jin2bin", {}}
     };
@@ -2301,10 +2321,10 @@ bool VLQ_Analysis_Data2015::SumAnalysisRegions(const bool newFile){
   }//0-lep
   
   /* 
-     {"sum0lep6jin2bin", {}},	
-    {"sum0lep7jin2bin", {}},	
-    {"sum0lep6jin3bin", {}},	
-    {"sum0lep7jin3bin", {}},	
+     {"sum0lep6jin2bin", {}}, 
+    {"sum0lep7jin2bin", {}},  
+    {"sum0lep6jin3bin", {}},  
+    {"sum0lep7jin3bin", {}},  
   */
     //{"sum0lep0Tex0Hex7jin2bin", {}},
     //{"sum0lep1THin7jin2bin", {}},
@@ -2370,14 +2390,14 @@ bool VLQ_Analysis_Data2015::SumAnalysisRegions(const bool newFile){
     if(region.find("0Tex0Hex") != std::string::npos){ boostcat = "0Tex0Hex"; }
     else if( (region.find("1Tex0Hex") != std::string::npos) || (region.find("0Tex1Hex") != std::string::npos) ){ boostcat = "1THex"; }
     else if( (region.find("2THin") != std::string::npos) || (region.find("2Tin0_1Hwin") != std::string::npos) 
-    	     || (region.find("1Tex1Hex") != std::string::npos) || (region.find("0Tin2Hin") != std::string::npos) ){ boostcat = "2THin"; }
+           || (region.find("1Tex1Hex") != std::string::npos) || (region.find("0Tin2Hin") != std::string::npos) ){ boostcat = "2THin"; }
 
 
     //else 
     /*
     if( (region.find("1Tex0Hex") != std::string::npos) || (region.find("0Tex1Hex") != std::string::npos)
-	     || (region.find("2THin") != std::string::npos) || (region.find("2Tin0_1Hwin") != std::string::npos) 
-    	     || (region.find("1Tex1Hex") != std::string::npos) || (region.find("0Tin2Hin") != std::string::npos) )
+       || (region.find("2THin") != std::string::npos) || (region.find("2Tin0_1Hwin") != std::string::npos) 
+           || (region.find("1Tex1Hex") != std::string::npos) || (region.find("0Tin2Hin") != std::string::npos) )
       { boostcat = "1THin"; }
     */
 
@@ -2399,23 +2419,23 @@ bool VLQ_Analysis_Data2015::SumAnalysisRegions(const bool newFile){
       //=========================== Preselections ==============================================
       targetPrintList.at("sum0lep6jin2bin").push_back(region);
       if(region.find("7jin") != std::string::npos){
-	targetPrintList.at("sum0lep7jin2bin").push_back(region);
+  targetPrintList.at("sum0lep7jin2bin").push_back(region);
       }
 
       if( (region.find("3bex") != std::string::npos) || (region.find("4bin") != std::string::npos) ){
-	targetPrintList.at("sum0lep6jin3bin").push_back(region);
+  targetPrintList.at("sum0lep6jin3bin").push_back(region);
 
-	if(region.find("7jin") != std::string::npos){
-	  targetPrintList.at("sum0lep7jin3bin").push_back(region);
-	}//7jin3bin
+  if(region.find("7jin") != std::string::npos){
+    targetPrintList.at("sum0lep7jin3bin").push_back(region);
+  }//7jin3bin
 
       }//3bin
 
       //targetPrintList.at("sum0lep"+boostcat+"6jin2bin").push_back(region);
       if(region.find("7jin") != std::string::npos){
-	if( !boostcat.empty() && (boostcat.find("0Tex0Hex") == std::string::npos) ){
-	  targetPrintList.at("sum0lep1THin7jin2bin").push_back(region);
-	}
+  if( !boostcat.empty() && (boostcat.find("0Tex0Hex") == std::string::npos) ){
+    targetPrintList.at("sum0lep1THin7jin2bin").push_back(region);
+  }
       }
       //targetPrintList.at("sum0lep"+boostcat+jetcat+bcat).push_back(region);
 
@@ -2425,24 +2445,24 @@ bool VLQ_Analysis_Data2015::SumAnalysisRegions(const bool newFile){
     else if(region.find("1lep") != std::string::npos){
       targetPrintList.at("sum1lep5jin2bin").push_back(region);
       if(region.find("6jin") != std::string::npos){
-	targetPrintList.at("sum1lep6jin2bin").push_back(region);
+  targetPrintList.at("sum1lep6jin2bin").push_back(region);
       }
 
       if( (region.find("3bex") != std::string::npos) || (region.find("4bin") != std::string::npos) ){
-	targetPrintList.at("sum1lep5jin3bin").push_back(region);
+  targetPrintList.at("sum1lep5jin3bin").push_back(region);
 
-	if(region.find("6jin") != std::string::npos){
-	  targetPrintList.at("sum1lep6jin3bin").push_back(region);
-	  if( !boostcat.empty() && (boostcat.find("0Tex0Hex") == std::string::npos) ){
-	    targetPrintList.at("sum1lep1THin6jin3bin").push_back(region);
-	  }
-	  //targetPrintList.at("sum1lep"+boostcat+"6jin3bin").push_back(region);
-	}//6jin3bin
+  if(region.find("6jin") != std::string::npos){
+    targetPrintList.at("sum1lep6jin3bin").push_back(region);
+    if( !boostcat.empty() && (boostcat.find("0Tex0Hex") == std::string::npos) ){
+      targetPrintList.at("sum1lep1THin6jin3bin").push_back(region);
+    }
+    //targetPrintList.at("sum1lep"+boostcat+"6jin3bin").push_back(region);
+  }//6jin3bin
 
-	//targetPrintList.at("sum1lep"+boostcat+jetcat+bcat).push_back(region);
+  //targetPrintList.at("sum1lep"+boostcat+jetcat+bcat).push_back(region);
 
       }//3bin
-	 
+   
     }//1L regions
 
   }
@@ -2452,7 +2472,7 @@ bool VLQ_Analysis_Data2015::SumAnalysisRegions(const bool newFile){
     for(std::pair<std::string, std::vector<std::string> > targetPair : targetPrintList){
       std::cout << " TARGET REGION : " <<  targetPair.first << " built from :: " <<std::endl;
       for(std::string source_reg : targetPair.second){
-	std::cout<<source_reg<<std::endl;
+  std::cout<<source_reg<<std::endl;
       }
       std::cout<<std::endl<<std::endl;
     }
@@ -2491,7 +2511,7 @@ bool VLQ_Analysis_Data2015::SumAnalysisRegions(const bool newFile){
     DRDSPropagator->WriteAllSystHistograms(false,false);
     delete DRDSPropagator;
   }
-			
+      
   std::string fileMode = newFile ? "RECREATE" : "UPDATE";
   TFile* outfile = TFile::Open( m_opt->OutputFile().c_str(), fileMode.c_str());
   
@@ -2504,324 +2524,324 @@ bool VLQ_Analysis_Data2015::SumAnalysisRegions(const bool newFile){
     for ( unsigned int i = 0 ; i <= ( ( m_opt -> SampleName() == SampleName::VLQ  && m_opt -> SplitVLQDecays() /* && split*/ ) ? 6 : 0 ) ; ++i) {
       std::string variable = "";
       if( i > 0 ){
-	variable += "vlq";
-	variable += std::to_string(i);
-	variable += "_";
+  variable += "vlq";
+  variable += std::to_string(i);
+  variable += "_";
       }
       variable +=  variable_base;
 
       for(std::pair<std::string, std::vector<std::string> > targetPair : targetPrintList){
       
-	if(is_QCD && targetPair.first.find("0lep") != std::string::npos){continue;}
-	if(is_QCD0L && targetPair.first.find("1lep") != std::string::npos){continue;}
-
-	for(const std::string& channel : lepchannels){
-	
-	  if(!channel.empty() && targetPair.first.find("1lep") == std::string::npos){ continue; }	  
-	
-	  //Regular weight systematics
-	  for(std::string sys : wgtList){
-
-	    //std::cout<<"============================ TARGET : "<<targetPair.first<<" ========================="<<std::endl;	  
-	    TH1D* targethist = NULL;
-	    double sumint = 0.;
-	    for(std::string source_reg : targetPair.second){
-	      TH1D* sourcehist = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable + sys).c_str() );
-	      AddHistogramToTarget(sourcehist, &targethist, targetPair.first + channel + "_" + variable + sys);
-	      sumint += sourcehist->GetEntries();
-	    }//source regions
-
-	    outfile->cd();
-	    if(targethist){
-	      HistManager::FinaliseTH1Bins(targethist);
-	      targethist->Write();
-	      delete targethist;
-	    }
-	    //std::cout<<"======================================================================================"<<std::endl;
-	  }//systematics + nominal
-
-	  //Region dependent weight systematics, including proxies for normalisation uncertainties 
-	  for(std::pair<std::string, std::string> boostcat : boostcat_systs){
-
-	    //============================ V+jets samples ===========================================================================
-	    if(is_Vjets){
-
-	      //only XS uncertainty
-	      TH1D* targethist_Vjets_XS_up = NULL;
-	      TH1D* targethist_Vjets_XS_down = NULL;
-	      for(std::string source_reg : targetPair.second){
-		TH1D* sourcehist = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable).c_str() );
-
-		//If source region is in the  boost category of the systematic, then scale it up and down
-		double sc_up = (source_reg.find(boostcat.second) != std::string::npos) ? 1.3 : 1.;
-		double sc_down = (source_reg.find(boostcat.second) != std::string::npos) ? 0.7 : 1.;
-
-		AddHistogramToTarget(sourcehist, &targethist_Vjets_XS_up, targetPair.first + channel + "_" + variable + "_weight_Vjets_XS_"+boostcat.first+"_up", sc_up);
-		AddHistogramToTarget(sourcehist, &targethist_Vjets_XS_down, targetPair.first + channel + "_" + variable + "_weight_Vjets_XS_"+boostcat.first+"_down", sc_down);
-	      }//source regions
-
-	      if(is_VjetsHF){
-		//only XS uncertainty
-		TH1D* targethist_VjetsHF_XS_up = NULL;
-		TH1D* targethist_VjetsHF_XS_down = NULL;
-		for(std::string source_reg : targetPair.second){
-		  TH1D* sourcehist = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable).c_str() );
-
-		  //If source region is in the  boost category of the systematic, then scale it up and down
-		  double sc_up = (source_reg.find(boostcat.second) != std::string::npos) ? 1.3 : 1.;
-		  double sc_down = (source_reg.find(boostcat.second) != std::string::npos) ? 0.7 : 1.;
-
-		  AddHistogramToTarget(sourcehist, &targethist_VjetsHF_XS_up, targetPair.first + channel + "_" + variable + "_weight_VjetsHF_XS_"+boostcat.first+"_up", sc_up);
-		  AddHistogramToTarget(sourcehist, &targethist_VjetsHF_XS_down, targetPair.first + channel + "_" + variable + "_weight_VjetsHF_XS_"+boostcat.first+"_down", sc_down);
-		}//source regions
-
-		outfile->cd();
-		if(targethist_VjetsHF_XS_up){
-		  HistManager::FinaliseTH1Bins(targethist_VjetsHF_XS_up);
-		  targethist_VjetsHF_XS_up->Write();
-		  delete targethist_VjetsHF_XS_up;
-		}
-		if(targethist_VjetsHF_XS_down){
-		  HistManager::FinaliseTH1Bins(targethist_VjetsHF_XS_down);
-		  targethist_VjetsHF_XS_down->Write();
-		  delete targethist_VjetsHF_XS_down;
-		}
-
-	      }//Vjets+HF sample
-
-	      outfile->cd();
-	      if(targethist_Vjets_XS_up){
-		HistManager::FinaliseTH1Bins(targethist_Vjets_XS_up);
-		targethist_Vjets_XS_up->Write();
-		delete targethist_Vjets_XS_up;
-	      }
-	      if(targethist_Vjets_XS_down){
-		HistManager::FinaliseTH1Bins(targethist_Vjets_XS_down);
-		targethist_Vjets_XS_down->Write();
-		delete targethist_Vjets_XS_down;
-	      }
-	    
-	    }//Vjets sample
-	    //================================================= V+jets samples ===========================================================
-
-	    //============================ Diboson samples ===========================================================================
-	    if(is_Diboson){
-
-	      //only XS uncertainty
-	      TH1D* targethist_Diboson_XS_up = NULL;
-	      TH1D* targethist_Diboson_XS_down = NULL;
-	      for(std::string source_reg : targetPair.second){
-		TH1D* sourcehist = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable).c_str() );
-
-		//If source region is in the  boost category of the systematic, then scale it up and down
-		double sc_up = (source_reg.find(boostcat.second) != std::string::npos) ? 1.48 : 1.;
-		double sc_down = (source_reg.find(boostcat.second) != std::string::npos) ? 0.52 : 1.;
-
-		AddHistogramToTarget(sourcehist, &targethist_Diboson_XS_up, targetPair.first + channel + "_" + variable + "_weight_Dibosons_XS_"+boostcat.first+"_up", sc_up);
-		AddHistogramToTarget(sourcehist, &targethist_Diboson_XS_down, targetPair.first + channel + "_" + variable + "_weight_Dibosons_XS_"+boostcat.first+"_down", sc_down);
-	      }//source regions
-
-	      outfile->cd();
-	      if(targethist_Diboson_XS_up){
-		HistManager::FinaliseTH1Bins(targethist_Diboson_XS_up);
-		targethist_Diboson_XS_up->Write();
-		delete targethist_Diboson_XS_up;
-	      }
-	      if(targethist_Diboson_XS_down){
-		HistManager::FinaliseTH1Bins(targethist_Diboson_XS_down);
-		targethist_Diboson_XS_down->Write();
-		delete targethist_Diboson_XS_down;
-	      }
-	    
-	    }//Diboson sample
-	    //================================================= Diboson samples ===========================================================
-
-	    //============================ Single top samples ===========================================================================
-	    if(is_singletop){
-
-	      std::vector<std::string> mtblist{};
-	      if(targetPair.first.find("0lep") != std::string::npos){ 
-		mtblist =  {"","LowMtbmin","HighMtbmin"};
-	      } 
-	      else{ 
-		mtblist = {""}; 
-	      }
-
-	      for(const std::string& mtbcat : mtblist){
-
-		std::string mtbsuffix = (mtbcat.empty()) ? mtbcat : "_"+mtbcat;
-		double sc_const = (mtbcat == "HighMtbmin") ? 0.25 : 0.20;
-		//XS uncertainty
-		TH1D* targethist_Singletop_XS_up = NULL;
-		TH1D* targethist_Singletop_DRDS_up = NULL;
-		TH1D* targethist_Singletop_XS_down = NULL;
-
-		//std::cout << std::endl <<" STARTING Target region: " << targetPair.first << " BOOSTCAT : " << boostcat.second << std::endl;
-
-		for(std::string source_reg : targetPair.second){
-		  TH1D* sourcehist = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable).c_str() );
-
-		  bool is_regmatch = ( (source_reg.find(boostcat.second) != std::string::npos) 
-				       && ( (mtbcat.empty() && (source_reg.find("Mtbmin") == std::string::npos)) 
-					    || (!mtbcat.empty() && (source_reg.find(mtbcat) != std::string::npos)) ) ); 
-
-		  //If source region is in the  boost category of the systematic, then scale it up and down
-		  //also add DRDS variation
-		  double sc_up = 1.;
-		  double sc_down = 1.;
-		  if(is_regmatch){
-		    sc_up = 1.+sc_const;
-		    sc_down = 1.-sc_const;
-		    TH1D* sourcehist_DRDS = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable + "_SingletopDRDS").c_str() );
-		    if(sourcehist_DRDS){
-		      //std::cout<<" DRDS Source region : "<<source_reg<<" --> "<<sourcehist_DRDS->Integral() << std::endl;
-		      AddHistogramToTarget(sourcehist_DRDS, &targethist_Singletop_DRDS_up
-					   , targetPair.first + channel + "_" + variable + "_SingletopDRDS_"+boostcat.first+mtbsuffix);
-		    }
-		  }
-		  else{
-		    //std::cout<<" Source region : "<<source_reg<<" --> "<<sourcehist->Integral() << std::endl;
-		    AddHistogramToTarget(sourcehist, &targethist_Singletop_DRDS_up
-					 , targetPair.first + channel + "_" + variable + "_SingletopDRDS_"+boostcat.first+mtbsuffix);
-		  }
+  if(is_QCD && targetPair.first.find("0lep") != std::string::npos){continue;}
+  if(is_QCD0L && targetPair.first.find("1lep") != std::string::npos){continue;}
+
+  for(const std::string& channel : lepchannels){
+  
+    if(!channel.empty() && targetPair.first.find("1lep") == std::string::npos){ continue; }   
+  
+    //Regular weight systematics
+    for(std::string sys : wgtList){
+
+      //std::cout<<"============================ TARGET : "<<targetPair.first<<" ========================="<<std::endl;   
+      TH1D* targethist = NULL;
+      double sumint = 0.;
+      for(std::string source_reg : targetPair.second){
+        TH1D* sourcehist = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable + sys).c_str() );
+        AddHistogramToTarget(sourcehist, &targethist, targetPair.first + channel + "_" + variable + sys);
+        sumint += sourcehist->GetEntries();
+      }//source regions
+
+      outfile->cd();
+      if(targethist){
+        HistManager::FinaliseTH1Bins(targethist);
+        targethist->Write();
+        delete targethist;
+      }
+      //std::cout<<"======================================================================================"<<std::endl;
+    }//systematics + nominal
+
+    //Region dependent weight systematics, including proxies for normalisation uncertainties 
+    for(std::pair<std::string, std::string> boostcat : boostcat_systs){
+
+      //============================ V+jets samples ===========================================================================
+      if(is_Vjets){
+
+        //only XS uncertainty
+        TH1D* targethist_Vjets_XS_up = NULL;
+        TH1D* targethist_Vjets_XS_down = NULL;
+        for(std::string source_reg : targetPair.second){
+    TH1D* sourcehist = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable).c_str() );
+
+    //If source region is in the  boost category of the systematic, then scale it up and down
+    double sc_up = (source_reg.find(boostcat.second) != std::string::npos) ? 1.3 : 1.;
+    double sc_down = (source_reg.find(boostcat.second) != std::string::npos) ? 0.7 : 1.;
+
+    AddHistogramToTarget(sourcehist, &targethist_Vjets_XS_up, targetPair.first + channel + "_" + variable + "_weight_Vjets_XS_"+boostcat.first+"_up", sc_up);
+    AddHistogramToTarget(sourcehist, &targethist_Vjets_XS_down, targetPair.first + channel + "_" + variable + "_weight_Vjets_XS_"+boostcat.first+"_down", sc_down);
+        }//source regions
+
+        if(is_VjetsHF){
+    //only XS uncertainty
+    TH1D* targethist_VjetsHF_XS_up = NULL;
+    TH1D* targethist_VjetsHF_XS_down = NULL;
+    for(std::string source_reg : targetPair.second){
+      TH1D* sourcehist = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable).c_str() );
+
+      //If source region is in the  boost category of the systematic, then scale it up and down
+      double sc_up = (source_reg.find(boostcat.second) != std::string::npos) ? 1.3 : 1.;
+      double sc_down = (source_reg.find(boostcat.second) != std::string::npos) ? 0.7 : 1.;
+
+      AddHistogramToTarget(sourcehist, &targethist_VjetsHF_XS_up, targetPair.first + channel + "_" + variable + "_weight_VjetsHF_XS_"+boostcat.first+"_up", sc_up);
+      AddHistogramToTarget(sourcehist, &targethist_VjetsHF_XS_down, targetPair.first + channel + "_" + variable + "_weight_VjetsHF_XS_"+boostcat.first+"_down", sc_down);
+    }//source regions
+
+    outfile->cd();
+    if(targethist_VjetsHF_XS_up){
+      HistManager::FinaliseTH1Bins(targethist_VjetsHF_XS_up);
+      targethist_VjetsHF_XS_up->Write();
+      delete targethist_VjetsHF_XS_up;
+    }
+    if(targethist_VjetsHF_XS_down){
+      HistManager::FinaliseTH1Bins(targethist_VjetsHF_XS_down);
+      targethist_VjetsHF_XS_down->Write();
+      delete targethist_VjetsHF_XS_down;
+    }
+
+        }//Vjets+HF sample
+
+        outfile->cd();
+        if(targethist_Vjets_XS_up){
+    HistManager::FinaliseTH1Bins(targethist_Vjets_XS_up);
+    targethist_Vjets_XS_up->Write();
+    delete targethist_Vjets_XS_up;
+        }
+        if(targethist_Vjets_XS_down){
+    HistManager::FinaliseTH1Bins(targethist_Vjets_XS_down);
+    targethist_Vjets_XS_down->Write();
+    delete targethist_Vjets_XS_down;
+        }
+      
+      }//Vjets sample
+      //================================================= V+jets samples ===========================================================
+
+      //============================ Diboson samples ===========================================================================
+      if(is_Diboson){
+
+        //only XS uncertainty
+        TH1D* targethist_Diboson_XS_up = NULL;
+        TH1D* targethist_Diboson_XS_down = NULL;
+        for(std::string source_reg : targetPair.second){
+    TH1D* sourcehist = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable).c_str() );
+
+    //If source region is in the  boost category of the systematic, then scale it up and down
+    double sc_up = (source_reg.find(boostcat.second) != std::string::npos) ? 1.48 : 1.;
+    double sc_down = (source_reg.find(boostcat.second) != std::string::npos) ? 0.52 : 1.;
+
+    AddHistogramToTarget(sourcehist, &targethist_Diboson_XS_up, targetPair.first + channel + "_" + variable + "_weight_Dibosons_XS_"+boostcat.first+"_up", sc_up);
+    AddHistogramToTarget(sourcehist, &targethist_Diboson_XS_down, targetPair.first + channel + "_" + variable + "_weight_Dibosons_XS_"+boostcat.first+"_down", sc_down);
+        }//source regions
+
+        outfile->cd();
+        if(targethist_Diboson_XS_up){
+    HistManager::FinaliseTH1Bins(targethist_Diboson_XS_up);
+    targethist_Diboson_XS_up->Write();
+    delete targethist_Diboson_XS_up;
+        }
+        if(targethist_Diboson_XS_down){
+    HistManager::FinaliseTH1Bins(targethist_Diboson_XS_down);
+    targethist_Diboson_XS_down->Write();
+    delete targethist_Diboson_XS_down;
+        }
+      
+      }//Diboson sample
+      //================================================= Diboson samples ===========================================================
+
+      //============================ Single top samples ===========================================================================
+      if(is_singletop){
+
+        std::vector<std::string> mtblist{};
+        if(targetPair.first.find("0lep") != std::string::npos){ 
+    mtblist =  {"","LowMtbmin","HighMtbmin"};
+        } 
+        else{ 
+    mtblist = {""}; 
+        }
+
+        for(const std::string& mtbcat : mtblist){
+
+    std::string mtbsuffix = (mtbcat.empty()) ? mtbcat : "_"+mtbcat;
+    double sc_const = (mtbcat == "HighMtbmin") ? 0.25 : 0.20;
+    //XS uncertainty
+    TH1D* targethist_Singletop_XS_up = NULL;
+    TH1D* targethist_Singletop_DRDS_up = NULL;
+    TH1D* targethist_Singletop_XS_down = NULL;
+
+    //std::cout << std::endl <<" STARTING Target region: " << targetPair.first << " BOOSTCAT : " << boostcat.second << std::endl;
+
+    for(std::string source_reg : targetPair.second){
+      TH1D* sourcehist = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable).c_str() );
+
+      bool is_regmatch = ( (source_reg.find(boostcat.second) != std::string::npos) 
+               && ( (mtbcat.empty() && (source_reg.find("Mtbmin") == std::string::npos)) 
+              || (!mtbcat.empty() && (source_reg.find(mtbcat) != std::string::npos)) ) ); 
+
+      //If source region is in the  boost category of the systematic, then scale it up and down
+      //also add DRDS variation
+      double sc_up = 1.;
+      double sc_down = 1.;
+      if(is_regmatch){
+        sc_up = 1.+sc_const;
+        sc_down = 1.-sc_const;
+        TH1D* sourcehist_DRDS = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable + "_SingletopDRDS").c_str() );
+        if(sourcehist_DRDS){
+          //std::cout<<" DRDS Source region : "<<source_reg<<" --> "<<sourcehist_DRDS->Integral() << std::endl;
+          AddHistogramToTarget(sourcehist_DRDS, &targethist_Singletop_DRDS_up
+             , targetPair.first + channel + "_" + variable + "_SingletopDRDS_"+boostcat.first+mtbsuffix);
+        }
+      }
+      else{
+        //std::cout<<" Source region : "<<source_reg<<" --> "<<sourcehist->Integral() << std::endl;
+        AddHistogramToTarget(sourcehist, &targethist_Singletop_DRDS_up
+           , targetPair.first + channel + "_" + variable + "_SingletopDRDS_"+boostcat.first+mtbsuffix);
+      }
  
-		  AddHistogramToTarget(sourcehist, &targethist_Singletop_XS_up, 
-				       targetPair.first + channel + "_" + variable + "_weight_Singletop_XS_"+boostcat.first+mtbsuffix+"_up", sc_up);
-		  AddHistogramToTarget(sourcehist, &targethist_Singletop_XS_down, 
-				       targetPair.first + channel + "_" + variable + "_weight_Singletop_XS_"+boostcat.first+mtbsuffix+"_down", sc_down);
-		}//source regions
-
-		outfile->cd();
-		if(targethist_Singletop_XS_up){
-		  HistManager::FinaliseTH1Bins(targethist_Singletop_XS_up);
-		  targethist_Singletop_XS_up->Write();
-		  delete targethist_Singletop_XS_up;
-		}
-		if(targethist_Singletop_XS_down){
-		  HistManager::FinaliseTH1Bins(targethist_Singletop_XS_down);
-		  targethist_Singletop_XS_down->Write();
-		  delete targethist_Singletop_XS_down;
-		}
-		if(targethist_Singletop_DRDS_up){
-		  //std::cout<<" Target region: " << targetPair.first << " --> " << targethist_Singletop_DRDS_up->Integral() << std::endl;
-		  HistManager::FinaliseTH1Bins(targethist_Singletop_DRDS_up);
-		  targethist_Singletop_DRDS_up->Write();
-		  delete targethist_Singletop_DRDS_up;
-		}
-
-	      }//mtbmin categories
-
-	    }//single top samples
-
-	    //================================================= Single top samples ===========================================================
-
-
-	    //============================ QCD samples ===========================================================================
-	    if(is_QCD0L){
-	      std::vector<std::string> mtblist =  {"","LowMtbmin","HighMtbmin"};
-
-	      for(const std::string& mtbcat : mtblist){
-
-		//XS uncertainty
-		TH1D* targethist_QCD0L_XS_up = NULL;
-		TH1D* targethist_QCD0L_XS_down = NULL;
-		for(std::string source_reg : targetPair.second){
-		  TH1D* sourcehist = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable).c_str() );
-
-		  bool is_regmatch = ( (source_reg.find(boostcat.second) != std::string::npos) 
-				       && ( (mtbcat.empty() && (source_reg.find("Mtbmin") == std::string::npos)) 
-					    || (!mtbcat.empty() && (source_reg.find(mtbcat) != std::string::npos)) ) ); 
+      AddHistogramToTarget(sourcehist, &targethist_Singletop_XS_up, 
+               targetPair.first + channel + "_" + variable + "_weight_Singletop_XS_"+boostcat.first+mtbsuffix+"_up", sc_up);
+      AddHistogramToTarget(sourcehist, &targethist_Singletop_XS_down, 
+               targetPair.first + channel + "_" + variable + "_weight_Singletop_XS_"+boostcat.first+mtbsuffix+"_down", sc_down);
+    }//source regions
+
+    outfile->cd();
+    if(targethist_Singletop_XS_up){
+      HistManager::FinaliseTH1Bins(targethist_Singletop_XS_up);
+      targethist_Singletop_XS_up->Write();
+      delete targethist_Singletop_XS_up;
+    }
+    if(targethist_Singletop_XS_down){
+      HistManager::FinaliseTH1Bins(targethist_Singletop_XS_down);
+      targethist_Singletop_XS_down->Write();
+      delete targethist_Singletop_XS_down;
+    }
+    if(targethist_Singletop_DRDS_up){
+      //std::cout<<" Target region: " << targetPair.first << " --> " << targethist_Singletop_DRDS_up->Integral() << std::endl;
+      HistManager::FinaliseTH1Bins(targethist_Singletop_DRDS_up);
+      targethist_Singletop_DRDS_up->Write();
+      delete targethist_Singletop_DRDS_up;
+    }
+
+        }//mtbmin categories
+
+      }//single top samples
+
+      //================================================= Single top samples ===========================================================
+
+
+      //============================ QCD samples ===========================================================================
+      if(is_QCD0L){
+        std::vector<std::string> mtblist =  {"","LowMtbmin","HighMtbmin"};
+
+        for(const std::string& mtbcat : mtblist){
+
+    //XS uncertainty
+    TH1D* targethist_QCD0L_XS_up = NULL;
+    TH1D* targethist_QCD0L_XS_down = NULL;
+    for(std::string source_reg : targetPair.second){
+      TH1D* sourcehist = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable).c_str() );
+
+      bool is_regmatch = ( (source_reg.find(boostcat.second) != std::string::npos) 
+               && ( (mtbcat.empty() && (source_reg.find("Mtbmin") == std::string::npos)) 
+              || (!mtbcat.empty() && (source_reg.find(mtbcat) != std::string::npos)) ) ); 
  
-		  //If source region is in the  boost category of the systematic, then scale it up and down
-		  double sc_up = is_regmatch ? 2. : 1.;
-		  double sc_down = is_regmatch ? 0. : 1.;
-		  /*
-		    if(is_regmatch){
-		    std::cout << " is_regmatch = " << is_regmatch << " source_reg = "<<source_reg 
-		    << " mtbcat = " << mtbcat << " boostcat = " << boostcat.second 
-		    << " sc_up " << sc_up << std::endl;
-		    }
-		  */
-		  std::string mtbsuffix = (mtbcat.empty()) ? mtbcat : "_"+mtbcat;
-		  AddHistogramToTarget(sourcehist, &targethist_QCD0L_XS_up, targetPair.first + channel + "_" + variable + "_weight_QCD0L_XS_"+boostcat.first+mtbsuffix+"_up", sc_up);
-		  AddHistogramToTarget(sourcehist, &targethist_QCD0L_XS_down, targetPair.first + channel + "_" + variable + "_weight_QCD0L_XS_"+boostcat.first+mtbsuffix+"_down", sc_down);
-		}//source regions
-
-		//DR/DS uncertainty (TO DO)
-
-		outfile->cd();
-		if(targethist_QCD0L_XS_up){
-		  HistManager::FinaliseTH1Bins(targethist_QCD0L_XS_up);
-		  targethist_QCD0L_XS_up->Write();
-		  delete targethist_QCD0L_XS_up;
-		}
-		if(targethist_QCD0L_XS_down){
-		  HistManager::FinaliseTH1Bins(targethist_QCD0L_XS_down);
-		  targethist_QCD0L_XS_down->Write();
-		  delete targethist_QCD0L_XS_down;
-		}
-
-	      }//mtbmin categories
-
-	    }//QCD0L samples 
-
-
-	    if(is_QCD){
-
-	      //weight uncertainty
-	      TH1D* targethist_QCD_el_up = NULL;
-	      TH1D* targethist_QCD_mu_up = NULL;
-
-	      for(std::string source_reg : targetPair.second){
-
-		if(source_reg.find(boostcat.second) != std::string::npos){
-		  //If source region is in the  boost category of the systematic, add the systematically varied histograms
-		  TH1D* sourcehist_el_up = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable + "_weight_qcd_el_up").c_str() );
-		  //TH1D* sourcehist_el_down = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable + "_weight_qcd_el_down").c_str() );
-		  TH1D* sourcehist_mu_up = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable + "_weight_qcd_mu_up").c_str() );
-		  //TH1D* sourcehist_mu_down = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable + "_weight_qcd_mu_down").c_str() );
-
-		  AddHistogramToTarget(sourcehist_el_up, &targethist_QCD_el_up, targetPair.first + channel + "_" + variable + "_weight_qcd_el_"+boostcat.first+"_up");
-		  //AddHistogramToTarget(sourcehist_el_down, &targethist_QCD_el_down, targetPair.first + channel + "_" + variable + "_weight_qcd_el_"+boostcat.first+"_down");
-		  AddHistogramToTarget(sourcehist_mu_up, &targethist_QCD_mu_up, targetPair.first + channel + "_" + variable + "_weight_qcd_mu_"+boostcat.first+"_up");
-		  //AddHistogramToTarget(sourcehist_mu_down, &targethist_QCD_mu_down, targetPair.first + channel + "_" + variable + "_weight_qcd_mu_"+boostcat.first+"_down");
-		}
-		else{
-		  TH1D* sourcehist = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable).c_str() );
-		  AddHistogramToTarget(sourcehist, &targethist_QCD_el_up, targetPair.first + channel + "_" + variable + "_weight_qcd_el_"+boostcat.first+"_up");
-		  //AddHistogramToTarget(sourcehist, &targethist_QCD_el_down, targetPair.first + channel + "_" + variable + "_weight_qcd_el_"+boostcat.first+"_down");
-		  AddHistogramToTarget(sourcehist, &targethist_QCD_mu_up, targetPair.first + channel + "_" + variable + "_weight_qcd_mu_"+boostcat.first+"_up");
-		  //AddHistogramToTarget(sourcehist, &targethist_QCD_mu_down, targetPair.first + channel + "_" + variable + "_weight_qcd_mu_"+boostcat.first+"_down");
-		}
-	      }//source regions
-
-	      outfile->cd();
-	      if(targethist_QCD_el_up){
-		HistManager::FinaliseTH1Bins(targethist_QCD_el_up);
-		targethist_QCD_el_up->Write();
-		delete targethist_QCD_el_up;
-	      }
-	      /*	    if(targethist_QCD_el_down){
-			    targethist_QCD_el_down->Write();
-			    delete targethist_QCD_el_down;
-			    }*/
-	      if(targethist_QCD_mu_up){
-		HistManager::FinaliseTH1Bins(targethist_QCD_mu_up);
-		targethist_QCD_mu_up->Write();
-		delete targethist_QCD_mu_up;
-	      }
-	      /*if(targethist_QCD_mu_down){
-		targethist_QCD_mu_down->Write();
-		delete targethist_QCD_mu_down;
-		}*/
-	  
-	    }//QCD samples
-	  
-	    //================================================= QCD samples ===========================================================
-	  
-	  }//Boosted categories
-
-	}//lepton channels
+      //If source region is in the  boost category of the systematic, then scale it up and down
+      double sc_up = is_regmatch ? 2. : 1.;
+      double sc_down = is_regmatch ? 0. : 1.;
+      /*
+        if(is_regmatch){
+        std::cout << " is_regmatch = " << is_regmatch << " source_reg = "<<source_reg 
+        << " mtbcat = " << mtbcat << " boostcat = " << boostcat.second 
+        << " sc_up " << sc_up << std::endl;
+        }
+      */
+      std::string mtbsuffix = (mtbcat.empty()) ? mtbcat : "_"+mtbcat;
+      AddHistogramToTarget(sourcehist, &targethist_QCD0L_XS_up, targetPair.first + channel + "_" + variable + "_weight_QCD0L_XS_"+boostcat.first+mtbsuffix+"_up", sc_up);
+      AddHistogramToTarget(sourcehist, &targethist_QCD0L_XS_down, targetPair.first + channel + "_" + variable + "_weight_QCD0L_XS_"+boostcat.first+mtbsuffix+"_down", sc_down);
+    }//source regions
+
+    //DR/DS uncertainty (TO DO)
+
+    outfile->cd();
+    if(targethist_QCD0L_XS_up){
+      HistManager::FinaliseTH1Bins(targethist_QCD0L_XS_up);
+      targethist_QCD0L_XS_up->Write();
+      delete targethist_QCD0L_XS_up;
+    }
+    if(targethist_QCD0L_XS_down){
+      HistManager::FinaliseTH1Bins(targethist_QCD0L_XS_down);
+      targethist_QCD0L_XS_down->Write();
+      delete targethist_QCD0L_XS_down;
+    }
+
+        }//mtbmin categories
+
+      }//QCD0L samples 
+
+
+      if(is_QCD){
+
+        //weight uncertainty
+        TH1D* targethist_QCD_el_up = NULL;
+        TH1D* targethist_QCD_mu_up = NULL;
+
+        for(std::string source_reg : targetPair.second){
+
+    if(source_reg.find(boostcat.second) != std::string::npos){
+      //If source region is in the  boost category of the systematic, add the systematically varied histograms
+      TH1D* sourcehist_el_up = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable + "_weight_qcd_el_up").c_str() );
+      //TH1D* sourcehist_el_down = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable + "_weight_qcd_el_down").c_str() );
+      TH1D* sourcehist_mu_up = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable + "_weight_qcd_mu_up").c_str() );
+      //TH1D* sourcehist_mu_down = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable + "_weight_qcd_mu_down").c_str() );
+
+      AddHistogramToTarget(sourcehist_el_up, &targethist_QCD_el_up, targetPair.first + channel + "_" + variable + "_weight_qcd_el_"+boostcat.first+"_up");
+      //AddHistogramToTarget(sourcehist_el_down, &targethist_QCD_el_down, targetPair.first + channel + "_" + variable + "_weight_qcd_el_"+boostcat.first+"_down");
+      AddHistogramToTarget(sourcehist_mu_up, &targethist_QCD_mu_up, targetPair.first + channel + "_" + variable + "_weight_qcd_mu_"+boostcat.first+"_up");
+      //AddHistogramToTarget(sourcehist_mu_down, &targethist_QCD_mu_down, targetPair.first + channel + "_" + variable + "_weight_qcd_mu_"+boostcat.first+"_down");
+    }
+    else{
+      TH1D* sourcehist = m_outMngrHist->HistMngr()->GetTH1D( (source_reg + channel + "_" + variable).c_str() );
+      AddHistogramToTarget(sourcehist, &targethist_QCD_el_up, targetPair.first + channel + "_" + variable + "_weight_qcd_el_"+boostcat.first+"_up");
+      //AddHistogramToTarget(sourcehist, &targethist_QCD_el_down, targetPair.first + channel + "_" + variable + "_weight_qcd_el_"+boostcat.first+"_down");
+      AddHistogramToTarget(sourcehist, &targethist_QCD_mu_up, targetPair.first + channel + "_" + variable + "_weight_qcd_mu_"+boostcat.first+"_up");
+      //AddHistogramToTarget(sourcehist, &targethist_QCD_mu_down, targetPair.first + channel + "_" + variable + "_weight_qcd_mu_"+boostcat.first+"_down");
+    }
+        }//source regions
+
+        outfile->cd();
+        if(targethist_QCD_el_up){
+    HistManager::FinaliseTH1Bins(targethist_QCD_el_up);
+    targethist_QCD_el_up->Write();
+    delete targethist_QCD_el_up;
+        }
+        /*      if(targethist_QCD_el_down){
+          targethist_QCD_el_down->Write();
+          delete targethist_QCD_el_down;
+          }*/
+        if(targethist_QCD_mu_up){
+    HistManager::FinaliseTH1Bins(targethist_QCD_mu_up);
+    targethist_QCD_mu_up->Write();
+    delete targethist_QCD_mu_up;
+        }
+        /*if(targethist_QCD_mu_down){
+    targethist_QCD_mu_down->Write();
+    delete targethist_QCD_mu_down;
+    }*/
+    
+      }//QCD samples
+    
+      //================================================= QCD samples ===========================================================
+    
+    }//Boosted categories
+
+  }//lepton channels
 
       }//target regions
 
-- 
GitLab


From 5f9b5cbfb59ac9845f4d3a98262612f70b822715 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Mon, 5 Aug 2019 19:25:27 +0200
Subject: [PATCH 20/33] Quick fix to axis labels for new 2D variables

---
 Root/VLQ_Analysis_Data2015.cxx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Root/VLQ_Analysis_Data2015.cxx b/Root/VLQ_Analysis_Data2015.cxx
index 29aae4b..0f6fa61 100644
--- a/Root/VLQ_Analysis_Data2015.cxx
+++ b/Root/VLQ_Analysis_Data2015.cxx
@@ -966,13 +966,13 @@ bool VLQ_Analysis_Data2015::Begin(){
 
     // 2D variables for boosted object tagging optimization studies
     m_outMngrHist -> AddStandardTH2( type + "_jet" + str_id + "_pt", type + "_jet" + str_id + "_m", 50, 0, 1200, 10, 0, 500
-           , "RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" mass [GeV]", "RC jet"+str_id+" mass [GeV]"
+           , tagstring+" jet"+str_id+" p_{T} [GeV]; "+tagstring+" jet"+str_id+" p_{T} [GeV]; "+tagstring+" jet"+str_id+" mass [GeV]", tagstring+" jet"+str_id+" mass [GeV]"
            , false, &(m_outData -> o_taggedjets.at(type)), &(m_outData -> o_taggedjets.at(type)), iTT, iTT, false, "Pt", "M" );
     m_outMngrHist -> AddStandardTH2( type + "_jet" + str_id + "_pt", type + "_jet" + str_id + "_nconsts", 50, 0, 1200, 1, -0.5, 5.5
-           , "RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" p_{T} [GeV]; Number of RC jet"+str_id+" consts", "Number of RC jet"+str_id+" consts"
+           , tagstring+" jet"+str_id+" p_{T} [GeV]; "+tagstring+" jet"+str_id+" p_{T} [GeV]; Number of "+tagstring+" jet"+str_id+" consts", "Number of "+tagstring+" jet"+str_id+" consts"
            , false, &(m_outData -> o_taggedjets.at(type)), &(m_outData -> o_taggedjets.at(type)), iTT, iTT, false, "Pt", "nconsts" );
     m_outMngrHist -> AddStandardTH2( type + "_jet" + str_id + "_pt", type + "_jet" + str_id + "_nbconsts", 50, 0, 1200, 1, -0.5, 5.5
-           , "RC jet"+str_id+" p_{T} [GeV]; RC jet"+str_id+" p_{T} [GeV]; Number of RC jet"+str_id+" b-tagged consts", "Number of RC jet"+str_id+" b-tagged consts"
+           , tagstring+" jet"+str_id+" p_{T} [GeV]; "+tagstring+" jet"+str_id+" p_{T} [GeV]; Number of "+tagstring+" jet"+str_id+" b-tagged consts", "Number of "+tagstring+" jet"+str_id+" b-tagged consts"
            , false, &(m_outData -> o_taggedjets.at(type)), &(m_outData -> o_taggedjets.at(type)), iTT, iTT, false, "Pt", "nbconsts" );
 
   }//DrawReco
-- 
GitLab


From ba55ff21ef8455d6fbd041f197a9f3444067a157 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 6 Aug 2019 14:15:37 +0200
Subject: [PATCH 21/33] Adding script for making 2D variable plots

---
 python/Make2DPlots_IFP.py | 289 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 289 insertions(+)
 create mode 100644 python/Make2DPlots_IFP.py

diff --git a/python/Make2DPlots_IFP.py b/python/Make2DPlots_IFP.py
new file mode 100644
index 0000000..c31cbfb
--- /dev/null
+++ b/python/Make2DPlots_IFP.py
@@ -0,0 +1,289 @@
+from ROOT import *
+import sys
+import subprocess
+import re
+import os
+
+samples = map(str, sys.argv[-3].strip('[]').split(','))
+list_key = sys.argv[-2]
+
+gStyle.SetOptStat(0)
+gStyle.SetPalette(kBird)
+
+noRegionsWithKeys = False#['1lep']
+onlyVariablesWithKeys = ['_vs_']
+noVariablesWithKeys = False
+plotTruthVarsTogether = True
+plotRCTypesTogether = True
+
+plotdir = "IFP_PNG/Plots_"+list_key+"/"
+
+os.system("mkdir -p "+plotdir)
+
+def GetRegionLabel(region):
+    legend = ""
+    if region == "call":
+        legend = "No selection"
+    if '1lep' in region:
+        legend+='1l, '
+    elif '0lep' in region:
+        legend+='0l, '
+    if 'jex' in region:
+        if not region[region.index('jex')-1]=='f':
+            legend+=region[region.index('jex')-1]+'j'
+    if 'jin' in region:
+        if not region[region.index('jin')-1]=='f':
+            legend+='#geq'+region[region.index('jin')-1]+'j'
+    if 'jwin' in region:
+        legend+=region[region.index('jwin')-3]+'-'+region[region.index('jwin')-1]+'j'
+    if 'bex' in region:
+        legend+=', '+region[region.index('bex')-1]+'b'
+    elif 'bin' in region:
+        legend+=', #geq'+region[region.index('bin')-1]+'b'
+    elif 'bwin' in region:
+        legend+=', '+region[region.index('bwin')-3]+'-'+region[region.index('bwin')-1]+'b'
+    if 'fjex' in region:
+        legend+=', '+region[region.index('fjex')-1]+'fj'
+    elif 'fjin' in region:
+        legend+=', #geq'+region[region.index('fjin')-1]+'fj'
+    if 'THin' in region:
+        legend+=', #geq'+region[region.index('THin')-1]+'h-t'
+    elif 'Hin' in region:
+        legend+=', #geq'+region[region.index('Hin')-1]+'h'
+    elif 'Hex' in region:
+        legend+=', '+region[region.index('Hex')-1]+'h'
+    if 'Vex' in region:
+        legend+=', '+region[region.index('Vex')-1]+'v'
+    elif 'Vin' in region:
+        legend+=', #geq'+region[region.index('Vin')-1]+'v'
+    if 'Tin' in region and region[region.index('Tin')-1].isdigit():
+        legend+=', #geq'+region[region.index('Tin')-1]+'t'
+    elif 'Tex' in region and region[region.index('Tex')-1].isdigit():
+        legend+=', '+region[region.index('Tex')-1]+'t'
+    if 'VTin' in region:
+        legend+=', #geq'+region[region.index('VTin')-1]+'v-t'
+    if 'LTex' in region:
+        legend+=', #geq'+region[region.index('LTex')-1]+'lt'
+    elif 'LTin' in region:
+        legend+=', #geq'+region[region.index('LTin')-1]+'lt'
+    if 'LTTin' in region:
+        legend+=', #geq'+region[region.index('LTTin')-1]+'lt-t'
+
+    if 'fj' in legend:
+        legend = "#splitline{%s}{%s}"%(legend[:legend.index("fj, ")+3],legend[legend.index("fj, ")+4:])
+
+    return legend
+
+def GetLegendLabel(truthType):
+    if truthType == "truthTop":
+        return "Top matched"
+    if truthType == "truthW":
+        return "W matched"
+    if truthType == "truthZ":
+        return "Z matched"
+    if truthType == "truthHiggs":
+        return "Higgs matched"
+    if truthType == "truthOther":
+        return "Unmatched"
+
+def GetRegionsAndVariables(file,prunevariables=False,noRegionsWithKeys=False,noVariablesWithKeys=False,onlyVariablesWithKeys=False):
+    lsrootpath = "/lsroot-00-01-03/bin/lsRoot"
+    if prunevariables:
+        proc = subprocess.Popen([".%s /dir %s"%(lsrootpath,file)], stdout=subprocess.PIPE, shell=True)
+    else:
+        proc = subprocess.Popen([".%s %s"%(lsrootpath,file)], stdout=subprocess.PIPE, shell=True)
+    (out, err) = proc.communicate()
+    contents = out.split()
+    regions,variables = [],[]
+    for content in contents:
+        if prunevariables and inputDir in content:
+            variables.append([])
+        if (len(content) < 9) or (not content.startswith('c')): continue
+        if (not content.startswith('call') and not content[1].isdigit()): continue
+        ind = [u.start() for u in re.finditer('_', content)]
+        splitind = [i for i in ind if not content[i-1].isdigit() and not content[i+1].isdigit()][0]
+        region = content[:splitind]
+        variable = content[splitind+1:]
+        if not region in regions:
+            regions.append(region)
+        if prunevariables:
+            if not variable in variables[-1]:
+                variables[-1].append(variable)
+        elif not variable in variables:
+            variables.append(variable)
+    if prunevariables:
+        variables = set.intersection(*map(set,variables))
+
+    if noVariablesWithKeys:
+        variables = [variable for variable in variables if not any(key in variable for key in noVariablesWithKeys)]
+    if onlyVariablesWithKeys:
+        variables = [variable for variable in variables if all(key in variable for key in onlyVariablesWithKeys)]
+    if noRegionsWithKeys:
+        regions = [region for region in regions if not any(key in region for key in noRegionsWithKeys)]
+
+    print "Doing regions:"
+    for reg in regions:
+        print reg
+    print "\nDoing %s variables"%len(variables)
+
+    # regionsvariables = []
+    # for region in regions:
+    #     for variable in variables:
+    #         regionsvariables.append(region+"_"+variable)
+    return regions,variables
+
+"""
+
+for sample in samples:
+
+    filename = "Rootfiles_Plots_"+list_key+"/"+sample+".root"
+    print "\nSample    -- %s"%sample
+    print "File name -- %s\n"%filename
+
+    f = TFile(filename,'read')
+
+    regions,variables = GetRegionsAndVariables(filename,noRegionsWithKeys=noRegionsWithKeys,noVariablesWithKeys=noVariablesWithKeys,onlyVariablesWithKeys=onlyVariablesWithKeys)
+
+    regionsvariables = []
+    for region in regions:
+        for variable in variables:
+            regionsvariables.append(region+"_"+variable)
+
+    for var in regionsvariables:
+        print var
+        h = f.Get(var)
+        c = TCanvas(h.GetName(),"",0,0,800,600)
+        # print c.GetName()
+        h.Draw('colz')
+        c.Print("IFP_PNG/Plots_"+list_key+"/canv_"+var+"_"+sample+".png")
+        c.Print("IFP_PDF/Plots_"+list_key+"/canv_"+var+"_"+sample+".pdf")
+        c.Clear()
+    
+"""
+
+if plotTruthVarsTogether:
+
+    gStyle.SetPadTopMargin(0.05)
+    gStyle.SetPadRightMargin(0.21)
+    gStyle.SetPadBottomMargin(0.12)
+    gStyle.SetPadLeftMargin(0.08)
+    gStyle.SetOptStat(0)
+    gStyle.SetStatStyle(0)
+    gStyle.SetTitleStyle(0)
+    gStyle.SetStatStyle(0)
+    gStyle.SetTitleStyle(0)
+    gStyle.SetCanvasBorderSize(0)
+    gStyle.SetFrameBorderSize(0)
+    gStyle.SetLegendBorderSize(0)
+    gStyle.SetTitleBorderSize(0)
+
+    print "Plotting truth variables together"
+
+    truthTypes = ['truthOther','truthW','truthZ','truthHiggs','truthTop']
+    truthcolors = [kOrange-2,kTeal+9,kOrange+7,kAzure+7,kMagenta-3]
+
+    hdict = {}
+    for truthType in truthTypes:
+        hdict[truthType] = {}
+
+    for sample in samples:
+
+        os.system("mkdir -p "+plotdir+sample)
+
+        filename = "Rootfiles_Plots_"+list_key+"/"+sample+".root"
+        print "\nSample    -- %s"%sample
+        print "File name -- %s\n"%filename
+
+        f = TFile(filename,'read')
+
+        regions,variables = GetRegionsAndVariables(filename,noRegionsWithKeys=noRegionsWithKeys,noVariablesWithKeys=noVariablesWithKeys,onlyVariablesWithKeys=onlyVariablesWithKeys)
+
+        variables_clean = []
+
+        for region in regions:
+
+            os.system("mkdir -p "+plotdir+sample+"/"+region)
+
+            for truthType in truthTypes:
+
+                if truthType=='truthZ' and not 'Zt' in sample:
+                    continue
+                if truthType=='truthHiggs' and not 'Ht' in sample:
+                    continue
+
+                hdict[truthType][region] = {}
+                for variable in variables:
+                    if truthType in variable:
+                        hdict[truthType][region][variable] = f.Get(region+'_'+variable)
+                        variables_clean.append(variable.replace(truthType+'_','TYPE_'))
+
+        variables_clean = list(set(variables_clean))
+
+        for region in regions:
+            for variable in variables_clean:
+                hlist = []
+
+                c = TCanvas(region+'_'+variable.replace('TYPE_',''),"",0,0,1400,900)
+                leg = TLegend(0.805,0.5,1.,0.92)
+                leg.SetHeader(GetRegionLabel(region))
+                leg.SetTextSize(0.037)
+                leg.AddEntry(0,"","")
+
+                for n,truthType in enumerate(truthTypes):
+
+                    if truthType=='truthZ' and not 'Zt' in sample:
+                        continue
+                    if truthType=='truthHiggs' and not 'Ht' in sample:
+                        continue
+
+                    hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].SetLineColor(truthcolors[n])
+                    hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].SetLineWidth(3)
+                    hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].SetFillColor(0)
+                    hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].SetTitle("")
+
+                    scale = hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].Integral()
+                    try:
+                        hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].Scale(1./scale)
+                    except ZeroDivisionError:
+                        pass
+
+                    hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].GetXaxis().SetTitleOffset(1.25)
+
+                    xtitle = hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].GetXaxis().GetTitle()
+                    ytitle = hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].GetYaxis().GetTitle()
+
+                    xtitle = xtitle.replace("unmatched ","")
+                    ytitle = ytitle.replace("unmatched ","")
+
+                    hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].GetXaxis().SetTitle(xtitle)
+                    hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].GetYaxis().SetTitle(ytitle)
+
+                    hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].GetXaxis().SetTitleSize(0.04)
+                    hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].GetYaxis().SetTitleSize(0.04)
+                    hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].GetXaxis().SetLabelSize(0.035)
+                    hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].GetYaxis().SetLabelSize(0.035)
+
+                    hdict[truthType][region][variable.replace('TYPE_',truthType+'_')].Draw('box same')
+                    leg.AddEntry(hdict[truthType][region][variable.replace('TYPE_',truthType+'_')],GetLegendLabel(truthType),'f')
+
+                leg.Draw()
+
+                printInfo = TLatex()
+                printInfo.SetNDC()
+                printInfo.SetTextFont(72)
+                printInfo.SetTextSize(0.043)
+                printInfo.DrawLatex(0.12, 0.88, "#scale[0.9]{ATLAS}")
+                printInfo.SetTextFont(42)
+                printInfo.DrawLatex(0.21, 0.88, "#scale[0.9]{Internal}")
+                printInfo.DrawLatex(0.12, 0.82, "#sqrt{s} = 13 TeV, 139 fb^{-1}")
+                printInfo.SetTextFont(41)
+                # printInfo.DrawLatex(0.12, 0.77, "%s"%GetRegionLabel(region))
+
+                c.Print("IFP_PNG/Plots_"+list_key+"/"+sample+"/"+region+"/canv_"+region+'_'+variable.replace('TYPE_','')+".png")
+                # c.Print("IFP_PDF/Plots_"+list_key+"/canv_"+region+'_'+variable.replace('TYPE_','')+'_'+sample+".pdf")
+                c.Clear()
+
+
+
+
+
-- 
GitLab


From 82bcf8e65cf71acb8bd25d9ae864dd3158a2d9db Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Fri, 9 Aug 2019 17:18:42 +0200
Subject: [PATCH 22/33] Adding truth matched RC jets in corresponding mass
 windows for boosted object tagging, and related plots

---
 Root/VLQ_Analysis_Data2015.cxx | 40 +++++++++++++++++++++++++++++-----
 Root/VLQ_OutputData.cxx        |  5 +++++
 2 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/Root/VLQ_Analysis_Data2015.cxx b/Root/VLQ_Analysis_Data2015.cxx
index 0f6fa61..b7a9e62 100644
--- a/Root/VLQ_Analysis_Data2015.cxx
+++ b/Root/VLQ_Analysis_Data2015.cxx
@@ -439,6 +439,11 @@ bool VLQ_Analysis_Data2015::Begin(){
   m_truthRCTypes.push_back("truthHiggs");
   m_truthRCTypes.push_back("truthOther");
 
+  m_truthRCTypes.push_back("truthTop_inMassWindow");
+  m_truthRCTypes.push_back("truthZ_inMassWindow");
+  m_truthRCTypes.push_back("truthW_inMassWindow");
+  m_truthRCTypes.push_back("truthHiggs_inMassWindow");
+
   if(m_opt->DumpHistos()){
 
     if(!m_opt->DoOneLeptonAna() && !m_opt->DoZeroLeptonAna()) {
@@ -811,6 +816,11 @@ bool VLQ_Analysis_Data2015::Begin(){
       else if(type=="truthHiggs"){ tagstring = "Higgs"; }
       else if(type=="truthOther"){ tagstring = "unmatched"; }
 
+      else if(type=="truthTop_inMassWindow"){ tagstring = "top (in mass window)"; }
+      else if(type=="truthZ_inMassWindow"){ tagstring = "Z (in mass window)"; }
+      else if(type=="truthW_inMassWindow"){ tagstring = "W (in mass window)"; }
+      else if(type=="truthHiggs_inMassWindow"){ tagstring = "Higgs (in mass window)"; }
+
       for ( int iRCJet =-1; iRCJet <=0; ++iRCJet ) {
         std::string str_id = "";
         str_id += std::to_string(iRCJet);
@@ -830,11 +840,10 @@ bool VLQ_Analysis_Data2015::Begin(){
         m_outMngrHist -> AddStandardTH1( type+"_RCjet"+str_id+"_m", 10, 0, 500, ";truth "+tagstring+" RC jet"+str_id+" mass [GeV]", false, &(m_outData -> o_rcjets_truthmatched.at(type)), iRCJet, "M");
         m_outMngrHist -> AddStandardTH1( type+"_RCjet"+str_id+"_nconsts", 1, -0.5, 5.5, ";Number of truth "+tagstring+" RC jet"+str_id+" consts", false, &(m_outData -> o_rcjets_truthmatched.at(type)), iRCJet, "nconsts");
         m_outMngrHist -> AddStandardTH1( type+"_RCjet"+str_id+"_nbconsts", 1, -0.5, 5.5, ";Number of truth "+tagstring+" RC jet"+str_id+" b-tagged consts", false, &(m_outData -> o_rcjets_truthmatched.at(type)), iRCJet, "nbconsts");
-
       }
 
-      // m_outMngrHist -> AddStandardTH1( type+"_RCjets_n", 1, -0.5, 4.5, ";Number of truth "+tagstring+" RC jets"
-         // , false, &(m_outData -> o_rcjets_truthmatched_n.at(type)));
+      m_outMngrHist -> AddStandardTH1( type+"_RCjets_n", 1, -0.5, 4.5, ";Number of truth "+tagstring+" RC jets"
+         , false, &(m_outData -> o_rcjets_truthmatched_n.at(type)));
     }
 
     for ( const std::string decayType : {"Ht", "Zt", "Wb"} ){
@@ -1809,22 +1818,36 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry)
 
     //===== Fill truth matched RC jets map =====
     for( AnalysisObject* rcjet : *(m_outData -> o_rcjets) ){
+
+      bool isTop = rcjet->M() > 140;
+      bool isHiggs = rcjet->M() > 105 && rcjet->M() < 140;
+      bool isV = rcjet->M() > 70 && rcjet->M() < 105;
+
       if( rcjet -> GetMoment("pdgId_truth") == 6 ){
         m_outData -> o_rcjets_truthmatched.at("truthTop") -> push_back(rcjet);
+        if( isTop ){
+          m_outData -> o_rcjets_truthmatched.at("truthTop_inMassWindow") -> push_back(rcjet);
+        }
       }
       if( rcjet -> GetMoment("pdgId_truth") == 23 ){
-        // std::cout << "filled Z rcjet" << std::endl;
         m_outData -> o_rcjets_truthmatched.at("truthZ") -> push_back(rcjet);
+        if( isV ){
+          m_outData -> o_rcjets_truthmatched.at("truthZ_inMassWindow") -> push_back(rcjet);
+        }
       }
       if( rcjet -> GetMoment("pdgId_truth") == 24 ){
         m_outData -> o_rcjets_truthmatched.at("truthW") -> push_back(rcjet);
+        if( isV ){
+          m_outData -> o_rcjets_truthmatched.at("truthW_inMassWindow") -> push_back(rcjet);
+        }
       }
       if( rcjet -> GetMoment("pdgId_truth") == 25 ){
-        // std::cout << "filled H rcjet" << std::endl;
         m_outData -> o_rcjets_truthmatched.at("truthHiggs") -> push_back(rcjet);
+        if( isHiggs ){
+          m_outData -> o_rcjets_truthmatched.at("truthHiggs_inMassWindow") -> push_back(rcjet);
+        }
       }
       if( rcjet -> GetMoment("pdgId_truth") == 0 ){
-        // std::cout << "filled H rcjet" << std::endl;
         m_outData -> o_rcjets_truthmatched.at("truthOther") -> push_back(rcjet);
       }
     }
@@ -1834,6 +1857,11 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry)
     m_outData -> o_rcjets_truthmatched_n.at("truthHiggs") = m_outData -> o_rcjets_truthmatched.at("truthHiggs") -> size();
     m_outData -> o_rcjets_truthmatched_n.at("truthOther") = m_outData -> o_rcjets_truthmatched.at("truthOther") -> size();
 
+    m_outData -> o_rcjets_truthmatched_n.at("truthTop_inMassWindow")   = m_outData -> o_rcjets_truthmatched.at("truthTop_inMassWindow")   -> size();
+    m_outData -> o_rcjets_truthmatched_n.at("truthZ_inMassWindow")     = m_outData -> o_rcjets_truthmatched.at("truthZ_inMassWindow")     -> size();
+    m_outData -> o_rcjets_truthmatched_n.at("truthW_inMassWindow")     = m_outData -> o_rcjets_truthmatched.at("truthW_inMassWindow")     -> size();
+    m_outData -> o_rcjets_truthmatched_n.at("truthHiggs_inMassWindow") = m_outData -> o_rcjets_truthmatched.at("truthHiggs_inMassWindow") -> size();
+
   }//each parton in collection
 
       }//each collection of heavy resonance
diff --git a/Root/VLQ_OutputData.cxx b/Root/VLQ_OutputData.cxx
index 1eb658f..d769656 100644
--- a/Root/VLQ_OutputData.cxx
+++ b/Root/VLQ_OutputData.cxx
@@ -155,6 +155,11 @@ o_is_ttbar(false)
   rcjetTruthType.push_back("truthW");
   rcjetTruthType.push_back("truthHiggs");
   rcjetTruthType.push_back("truthOther");
+
+  rcjetTruthType.push_back("truthTop_inMassWindow");
+  rcjetTruthType.push_back("truthZ_inMassWindow");
+  rcjetTruthType.push_back("truthW_inMassWindow");
+  rcjetTruthType.push_back("truthHiggs_inMassWindow");
   for ( const std::string type : rcjetTruthType ){
     o_rcjets_truthmatched.insert( std::pair<std::string, AOVector*>( type, new AOVector() ) );
     o_rcjets_truthmatched_n.insert( std::pair<std::string, int>( type, 0 ) );
-- 
GitLab


From 2998d79831c7fd47943e1cab367d8e89ef15d3e4 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Mon, 26 Aug 2019 15:52:31 +0200
Subject: [PATCH 23/33] Adding refined new point P1

---
 Root/VLQ_AnalysisTools.cxx | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index 4bc6164..c831e14 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -506,16 +506,21 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       const bool isHOT = obj->M() > 100 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= m_opt->RCNsubjetsCut() && obj -> Pt() > 300;
       obj -> SetMoment("isRCTTMass", isHOT);
       // Exclusive top-tagging
-      bool isTop = obj->M() > 140;//obj -> Pt() > 400 && obj->M() > 140;// && obj->M() < 210.;
-      // isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
+      bool isTop = obj->M() > 140;
+      isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 450 : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? obj -> Pt() > 400 :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 4 && obj -> Pt() > 350 );
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
-      bool isHiggs = obj->M() > 105 && obj->M() < 140;//obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 140;
-      // isHiggs = isHiggs && ( obj -> Pt() > 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
+      bool isHiggs = obj->M() > 105 && obj->M() < 140;
+      isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 600 );
       obj -> SetMoment("isRCMHiggs", isHiggs);
       //Exclusive V(W/Z)-tagging
-      bool isV = obj->M() > 70 && obj->M() < 105;//obj -> Pt() > 200 && obj->M() > 70 && obj->M() < 105;
-      // isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
+      bool isV = obj->M() > 70 && obj->M() < 105;
+      isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
+      isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 500 );
       obj -> SetMoment("isRCMV", isV);
       // Very loose HOT jets
       const bool isLooseHOT = obj->M() > 50 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1 && obj -> Pt() > 300;
-- 
GitLab


From 0c7455af495b40bfb9c3716d5f0511fd093a2e50 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Tue, 27 Aug 2019 13:48:23 +0200
Subject: [PATCH 24/33] Revert back to standard boosted object tagging for VR
 rho comparison

---
 Root/VLQ_AnalysisTools.cxx | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index c831e14..fd15a89 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -506,21 +506,24 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       const bool isHOT = obj->M() > 100 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= m_opt->RCNsubjetsCut() && obj -> Pt() > 300;
       obj -> SetMoment("isRCTTMass", isHOT);
       // Exclusive top-tagging
-      bool isTop = obj->M() > 140;
-      isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 450 : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? obj -> Pt() > 400 :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 4 && obj -> Pt() > 350 );
+      bool isTop = obj -> Pt() > 400 && obj->M() > 140;
+      isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
+      // isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 450 : 
+      //   m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? obj -> Pt() > 400 :
+      //   m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 4 && obj -> Pt() > 350 );
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
-      bool isHiggs = obj->M() > 105 && obj->M() < 140;
-      isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 600 );
+      bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 140;
+      isHiggs = isHiggs && ( obj -> Pt() < 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2);
+      // isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 : 
+      //   m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 600 );
       obj -> SetMoment("isRCMHiggs", isHiggs);
       //Exclusive V(W/Z)-tagging
-      bool isV = obj->M() > 70 && obj->M() < 105;
-      isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
-      isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 500 );
+      bool isV = obj -> Pt() > 200 && obj->M() > 70 && obj->M() < 105;
+      isV = isV && ( obj -> Pt() < 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2);
+      // isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
+      // isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 :
+      //   m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 500 );
       obj -> SetMoment("isRCMV", isV);
       // Very loose HOT jets
       const bool isLooseHOT = obj->M() > 50 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1 && obj -> Pt() > 300;
-- 
GitLab


From d5c3c5a4f7d61407dfce2b37f27048aed8b833c2 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Wed, 28 Aug 2019 14:43:04 +0200
Subject: [PATCH 25/33] Revert VLQ_Selector back to no b-requirements in RCMV
 jets

---
 Root/VLQ_Selector.cxx | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Root/VLQ_Selector.cxx b/Root/VLQ_Selector.cxx
index 26b80e4..2cf9a85 100644
--- a/Root/VLQ_Selector.cxx
+++ b/Root/VLQ_Selector.cxx
@@ -317,7 +317,6 @@ bool VLQ_Selector::Init(){
 
     // Signal regions
 
-    /*
     AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ);       //SR1
     AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-0LTex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ);       //SR1-a
     AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-0Tex-1Lin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1-b ORIG
@@ -340,10 +339,9 @@ bool VLQ_Selector::Init(){
 
     AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0Tex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ);          //SR2
     AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0LTex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ);    //SR2-a
-    AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0Tex-1Lin-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ);    //SR2-b ORIG
-    */
-
+    AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0Tex-1Lin-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ);    //SR2-b ORIG 
 
+    /*
     // === 1b requirement in V-tags ===
     AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-0Tex-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ);       //SR1
     AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-0LTex-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ);       //SR1-a
@@ -369,7 +367,7 @@ bool VLQ_Selector::Init(){
     AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0LTex-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);    //SR2-a
     AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0Tex-1Lin-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);    //SR2-b ORIG
     // ========
-
+    */
 
     AddVLQSelection("c-1lep-6jin-1bex-1fjin-1LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ);           //SR3 ORIG
     AddVLQSelection("c-1lep-6jin-1bex-1fjin-1Lex-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ);       //SR3-a 
-- 
GitLab


From 3ebe75755434730f53bcb9a4f854a405b0c0be68 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Wed, 28 Aug 2019 18:14:23 +0200
Subject: [PATCH 26/33] Correction for RCMV to refined RC tagging point P1

---
 Root/VLQ_AnalysisTools.cxx | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index fd15a89..7897b65 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -507,23 +507,22 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       obj -> SetMoment("isRCTTMass", isHOT);
       // Exclusive top-tagging
       bool isTop = obj -> Pt() > 400 && obj->M() > 140;
-      isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
-      // isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 450 : 
-      //   m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? obj -> Pt() > 400 :
-      //   m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 4 && obj -> Pt() > 350 );
+      // isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
+      isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 450 : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? obj -> Pt() > 400 :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 4 && obj -> Pt() > 350 );
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
       bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 140;
-      isHiggs = isHiggs && ( obj -> Pt() < 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2);
-      // isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 : 
-      //   m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 600 );
+      // isHiggs = isHiggs && ( obj -> Pt() < 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2);
+      isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 : 
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 600 );
       obj -> SetMoment("isRCMHiggs", isHiggs);
       //Exclusive V(W/Z)-tagging
       bool isV = obj -> Pt() > 200 && obj->M() > 70 && obj->M() < 105;
-      isV = isV && ( obj -> Pt() < 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2);
-      // isV = isV && ( obj -> Pt() > 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2);
-      // isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 :
-      //   m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 500 );
+      // isV = isV && ( obj -> Pt() < 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2);
+      isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 500 );
       obj -> SetMoment("isRCMV", isV);
       // Very loose HOT jets
       const bool isLooseHOT = obj->M() > 50 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1 && obj -> Pt() > 300;
-- 
GitLab


From bdbf078830321c280651299d5e9098053b59b2ef Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Mon, 9 Sep 2019 14:31:40 +0200
Subject: [PATCH 27/33] Adding recoVLQ_m and _redm as always-plotted variables,
 along with meff

---
 Root/VLQ_Analysis_Data2015.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Root/VLQ_Analysis_Data2015.cxx b/Root/VLQ_Analysis_Data2015.cxx
index b7a9e62..f63b5e1 100644
--- a/Root/VLQ_Analysis_Data2015.cxx
+++ b/Root/VLQ_Analysis_Data2015.cxx
@@ -859,13 +859,13 @@ bool VLQ_Analysis_Data2015::Begin(){
     m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_eta", 0.2, -3, 3, ";"+decayType+" reco VLQ"+str_id+" #eta"        ,  
              DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "Eta" );
     m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_m", 25, 0, 5000, ";"+decayType+" reco VLQ"+str_id+" mass [GeV]"    ,  
-             DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "M" );
+             true, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "M" );
     m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_m1", 10, 0, 500, ";"+decayType+" reco VLQ"+str_id+" m_{1} [GeV]"    ,  
              DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "m1" );
     m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_m2", 10, 0, 500, ";"+decayType+" reco VLQ"+str_id+" m_{2} [GeV]"    ,  
              DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "m2" );
     m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_redm", 25, 0, 4000, ";"+decayType+" reco VLQ"+str_id+" reduced mass [GeV]"    ,  
-             DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "redM" );
+             true, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "redM" );
     m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_dR12", 0.1, 0, 6, ";"+decayType+" reco VLQ"+str_id+" #DeltaR(1,2)"    ,  
              DrawSyst, &(m_outData -> o_recoVLQ.at(decayType)), iTT, "dR12" );
     m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_dPhi12", 0.1, 0, 4, ";"+decayType+" reco VLQ"+str_id+" #Delta#phi(1,2)"    ,  
-- 
GitLab


From 829e249864a8b3cffe9dd4872265f9d51d629e85 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Mon, 23 Sep 2019 18:54:52 +0200
Subject: [PATCH 28/33] Adding macro to read TRExFitter output and produce
 limit plots and do limit-level comparisons

---
 python/ReadTRExFitterResults.py | 272 ++++++++++++++++++++++++++++++++
 1 file changed, 272 insertions(+)
 create mode 100644 python/ReadTRExFitterResults.py

diff --git a/python/ReadTRExFitterResults.py b/python/ReadTRExFitterResults.py
new file mode 100644
index 0000000..303abd0
--- /dev/null
+++ b/python/ReadTRExFitterResults.py
@@ -0,0 +1,272 @@
+from ROOT import *
+
+gStyle.SetPadTopMargin(0.07)
+gStyle.SetPadRightMargin(0.01)
+gStyle.SetPadBottomMargin(0.12)
+gStyle.SetPadLeftMargin(0.095)
+gStyle.SetOptStat(0)
+gStyle.SetStatStyle(0)
+gStyle.SetTitleStyle(0)
+gStyle.SetCanvasBorderSize(0)
+gStyle.SetFrameBorderSize(0)
+gStyle.SetLegendBorderSize(0)
+gStyle.SetTitleBorderSize(0)
+
+drawAllPlots = False
+findBestConfigOverall = False
+findBestConfigPerSignal = True
+
+# not currently implemented fully
+draw1s = False
+draw2s = False
+
+# base path
+# currently configured to expect <base path>_<alg>_<coll>_<var>
+resultpath = '/nfs/at3/scratch2/tvdaalen/TRExFitter_WorkArea/SingleVLQ_RCStudies/singleVLQ_RC_studies_configFiles_ref2_'
+
+# configs to loop over
+algs = ['pT_ref_N_stan','pT_stan_N_stan','P2']
+colls = ['RCJ_r10pt05', 'VR_rho450', 'VR_rho500', 'VR_rho550', 'VR_rho600', 'VR_rho650']
+vars=['meff','recoVLQ_m','recoVLQ_redm']
+
+# sample names, colors, styles
+sampledict = {"T(#rightarrowHt)qb": [['sVLQ_WTHt11K03','sVLQ_WTHt16K05','sVLQ_WTHt20K05'],kGreen+2],
+            "T(#rightarrowHt)qt":[['sVLQ_ZTHt11K05','sVLQ_ZTHt16K05','sVLQ_ZTHt20K05'],kOrange+7],
+            "T(#rightarrowZt)qt":[['sVLQ_ZTZt11K05','sVLQ_ZTZt16K05'],kPink-3],
+            "T(#rightarrowZt)qb":[['sVLQ_WTZt11K03','sVLQ_WTZt16K05','sVLQ_WTZt20K05'],kBlue+1]}
+linestyles = [1,2,3,6,9,7,10,5]
+
+#
+# FUNCTIONS
+#
+
+def getSpecificLimit(fn):
+    f = TFile(fn,'read')
+    h = f.Get("limit")
+    return 0.1*h.GetBinContent(1)
+
+def getLimits(fntemplate=False,samples=False,draw1s=False,draw2s=False):
+    xs,ys = [],[]
+    for n,sample in enumerate(samples):
+        fn = fntemplate.replace('SIGNAL',sample)
+        f = TFile(fn,'read')
+        h = f.Get("limit")
+        limit = 0.1*h.GetBinContent(1)
+        limitplus1s = 0.1*h.GetBinContent(4)
+        limitmin1s = 0.1*h.GetBinContent(5)
+        limitplus2s = 0.1*h.GetBinContent(3)
+        limitmin2s = 0.1*h.GetBinContent(6)
+        if n==0:
+            x = 1100.
+        elif n==1:
+            x = 1600.
+        elif n==2:
+            x = 2000.
+        else:
+            print "wrong"
+            return
+        xs.append(x)
+        ys.append(limit)
+        if draw1s:
+            yplus1s.append(limitplus1s)
+            ymin1s.append(limitmin1s)
+        if draw2s:
+            yplus2s.append(limitplus2s)
+            ymin2s.append(limitmin2s)
+    out = [xs,ys]
+    if draw1s:
+        out.append(yplus1s,ymin1s)
+    if draw2s:
+        out.append(yplus2s,ymin2s)
+    return out
+
+def getLimitTGraph(x,y):
+    tlimit=TGraphAsymmErrors(len(x))
+    for n in range(len(x)):
+        tlimit.SetPoint(n,x[n],y[n])
+    return tlimit
+
+def setLimitStyle(TGlimit):
+    TGlimit.GetXaxis().SetTitle("Mass [GeV]")
+    TGlimit.GetYaxis().SetTitle("#sigma #times BR [pb]")
+    TGlimit.GetYaxis().SetTitleOffset(1.05)
+    TGlimit.GetXaxis().SetTitleOffset(1.2)
+    TGlimit.GetXaxis().SetTitleSize(0.045)
+    TGlimit.GetYaxis().SetTitleSize(0.045)
+    TGlimit.GetXaxis().SetLabelSize(0.035)
+    TGlimit.GetYaxis().SetLabelSize(0.035)
+
+def add1sLimits(TGlimit,tlimitplus1s,tlimitmin1s):
+    TGlimit.Add(tlimitplus1s)
+    TGlimit.Add(tlimitmin1s)
+    return TGlimit
+
+def add2sLimits(TGlimit,tlimitplus2s,tlimitmin2s):
+    TGlimit.Add(tlimitplus2s)
+    TGlimit.Add(tlimitmin2s)
+    return TGlimit
+
+def printLimitCanvas(resultpath=False,sampledict=False,compare='colls',colls=False,vars=False,algs=False,coll='RCJ_r10pt05',alg='P2',var='meff',draw1s=False,draw2s=False):
+    linestyles = [1,2,3,6,9,7,10,5]
+    for sampletype in sampledict.keys():
+        c1 = TCanvas("c1",'',10,10,1000,750)
+        c1.SetGrid()
+        if sampletype=="T(#rightarrowHt)qb":
+            leg = TLegend(0.13,0.65,0.43,0.925)
+        else:
+            leg = TLegend(0.7,0.65,0.988,0.925)
+        leg.SetTextSize(0.045) 
+        TGlimit = TMultiGraph()
+        if compare=='colls':
+            for i,coll in enumerate(colls):
+                fntemplate = resultpath+alg+'_'+coll+'_'+var+'/Results/BONLY__SIGNAL__/Limits/BONLY__SIGNAL__.root'
+                inlist = getLimits(fntemplate=fntemplate,samples=sampledict[sampletype][0])
+                tlimitlist = inlist[0:1]
+                if draw1s and draw2s:
+                    plusmin1s = inlist[2:3]
+                    plusmin2s = inlist[4:5]
+                elif draw1s:
+                    plusmin1s = inlist[2:3]
+                elif draw2s:
+                    plusmin2s = inlist[2:3]
+
+                tlimit = getLimitTGraph(*tlimitlist)
+                tlimit.SetLineColor(sampledict[sampletype][1])
+                tlimit.SetLineStyle(linestyles[i])
+                tlimit.SetLineWidth(3)
+                TGlimit.Add(tlimit)
+                leg.AddEntry(tlimit,coll,"l")
+            TGlimit.Draw('al3')
+            TGlimit.SetTitle(sampletype+', alg. = '+alg+', discr. = '+var)
+            setLimitStyle(TGlimit)
+            leg.Draw()
+            c1.Print("Plots_TRExLimits/%s_ref2_limits_comp-colls_%s_%s.png"%(sampledict[sampletype][0][0][5:9],alg,var))
+            c1.Print("Plots_TRExLimits/%s_ref2_limits_comp-colls_%s_%s.pdf"%(sampledict[sampletype][0][0][5:9],alg,var))
+            c1.Clear()
+            del c1
+
+        if compare=='algs':
+            for i,alg in enumerate(algs):
+                fntemplate = resultpath+alg+'_'+coll+'_'+var+'/Results/BONLY__SIGNAL__/Limits/BONLY__SIGNAL__.root'
+                tlimitlist = getLimits(fntemplate=fntemplate,samples=sampledict[sampletype][0])
+                tlimit = getLimitTGraph(*tlimitlist)
+                tlimit.SetLineColor(sampledict[sampletype][1])
+                tlimit.SetLineStyle(linestyles[i])
+                tlimit.SetLineWidth(3)
+                TGlimit.Add(tlimit)
+                leg.AddEntry(tlimit,alg,"l")
+            TGlimit.Draw('al3')
+            TGlimit.SetTitle(sampletype+', coll. = '+coll+', discr. = '+var)
+            setLimitStyle(TGlimit)
+            leg.Draw()
+            c1.Print("Plots_TRExLimits/%s_ref2_limits_comp-algs_%s_%s.png"%(sampledict[sampletype][0][0][5:9],coll,var))
+            c1.Print("Plots_TRExLimits/%s_ref2_limits_comp-algs_%s_%s.pdf"%(sampledict[sampletype][0][0][5:9],coll,var))
+            c1.Clear()
+            del c1
+
+        if compare=='vars':
+            for i,var in enumerate(vars):
+                fntemplate = resultpath+alg+'_'+coll+'_'+var+'/Results/BONLY__SIGNAL__/Limits/BONLY__SIGNAL__.root'
+                tlimitlist = getLimits(fntemplate=fntemplate,samples=sampledict[sampletype][0])
+                tlimit = getLimitTGraph(*tlimitlist)
+                tlimit.SetLineColor(sampledict[sampletype][1])
+                tlimit.SetLineStyle(linestyles[i])
+                tlimit.SetLineWidth(3)
+                TGlimit.Add(tlimit)
+                leg.AddEntry(tlimit,var,"l")
+            TGlimit.Draw('al3')
+            TGlimit.SetTitle(sampletype+', coll. = '+coll+', alg. = '+alg)
+            setLimitStyle(TGlimit)
+            leg.Draw()
+            c1.Print("Plots_TRExLimits/%s_ref2_limits_comp-vars_%s_%s.png"%(sampledict[sampletype][0][0][5:9],alg,coll))
+            c1.Print("Plots_TRExLimits/%s_ref2_limits_comp-vars_%s_%s.pdf"%(sampledict[sampletype][0][0][5:9],alg,coll))
+            c1.Clear()
+            del c1
+
+#
+# RUN
+#
+
+#
+if drawAllPlots:
+    for alg in algs:
+        for var in vars:
+            printLimitCanvas(resultpath=resultpath,sampledict=sampledict,compare='colls',colls=colls,alg=alg,var=var)
+    
+    for alg in algs:
+        for coll in colls:
+            printLimitCanvas(resultpath=resultpath,sampledict=sampledict,compare='vars',vars=vars,coll=coll,alg=alg)
+    
+    for coll in colls:
+        for var in vars:
+            printLimitCanvas(resultpath=resultpath,sampledict=sampledict,compare='algs',algs=algs,coll=coll,var=var)
+
+#
+if findBestConfigPerSignal:
+
+    print 'Best: \t\talg: \tvar: \t\tcoll:'
+    for sampletype in sampledict.keys():
+        for signal in sampledict[sampletype][0]:
+    
+            lim = 100000.
+            bestalg,bestvar,bestcoll=0,0,0
+    
+            for alg in algs:
+                for var in vars:
+                    for coll in colls:
+    
+                        fntemplate = resultpath+alg+'_'+coll+'_'+var+'/Results/BONLY__SIGNAL__/Limits/BONLY__SIGNAL__.root'
+                        fn = fntemplate.replace('SIGNAL',signal)
+                        thislim = getSpecificLimit(fn)
+                        if thislim < lim:
+                            lim = thislim
+                            bestalg=alg
+                            bestvar=var
+                            bestcoll=coll
+    
+            print signal,'\t',bestalg,'\t',bestvar,'\t',bestcoll
+
+#
+if findBestConfigOverall:
+
+    configdict,configdict_no11 = {},{}
+    for alg in algs:
+        for var in vars:
+            for coll in colls:
+    
+                configdict[alg+'_'+var+'_'+coll] = 0.
+                configdict_no11[alg+'_'+var+'_'+coll] = 0.
+    
+                for sampletype in sampledict.keys():
+                    for signal in sampledict[sampletype][0]:
+                        fntemplate = resultpath+alg+'_'+coll+'_'+var+'/Results/BONLY__SIGNAL__/Limits/BONLY__SIGNAL__.root'
+                        fn = fntemplate.replace('SIGNAL',signal)
+                        thislim = getSpecificLimit(fn)
+    
+                        configdict[alg+'_'+var+'_'+coll] += thislim
+                        if not '11' in signal:
+                            configdict_no11[alg+'_'+var+'_'+coll] += thislim
+
+    lim = 10000
+    for key in configdict.keys():
+        if configdict[key] < lim:
+            lim = configdict[key]
+            bestconfig = key
+    
+    lim = 10000
+    for key in configdict_no11.keys():
+        if configdict_no11[key] < lim:
+            lim = configdict_no11[key]
+            bestconfig_no11 = key
+    
+    print "Best config (all masses): ",bestconfig
+    print "Best config (no 1.1 TeV): ",bestconfig_no11
+    
+    
+    print "\nSorted configs and total limits:"
+    for key in sorted(configdict, key=configdict.get, reverse=False):
+        print key, configdict[key]
+    
+    print "\nSorted configs and total limits (no 1.1 TeV):"
+    for key in sorted(configdict_no11, key=configdict_no11.get, reverse=False):
+        print key, configdict_no11[key]
-- 
GitLab


From 0bb08cc8d9dc35df53bca6bbc589f182e065264e Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Mon, 30 Sep 2019 17:57:51 +0200
Subject: [PATCH 29/33] Last boosted object tagging change

---
 Root/VLQ_AnalysisTools.cxx | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx
index 7897b65..f20c3e5 100644
--- a/Root/VLQ_AnalysisTools.cxx
+++ b/Root/VLQ_AnalysisTools.cxx
@@ -507,22 +507,29 @@ bool VLQ_AnalysisTools::GetObjectVectors(){
       obj -> SetMoment("isRCTTMass", isHOT);
       // Exclusive top-tagging
       bool isTop = obj -> Pt() > 400 && obj->M() > 140;
-      // isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
-      isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 450 : 
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? obj -> Pt() > 400 :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 4 && obj -> Pt() > 350 );
+      /* // STANDARD CUTS:
+      isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1);
+      */
+      isTop = isTop && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 ? obj -> Pt() > 700 :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 500 :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 3 ? obj -> Pt() > 450 :
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 4 && obj -> Pt() > 400 );
       obj -> SetMoment("isRCMTop", isTop);
       // Exclusive Higgs tagging
-      bool isHiggs = obj -> Pt() > 300 && obj->M() > 105 && obj->M() < 140;
-      // isHiggs = isHiggs && ( obj -> Pt() < 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2);
+      bool isHiggs = obj -> Pt() > 350 && obj->M() > 105 && obj->M() < 140;
+      /* // STANDARD CUTS:
+      isHiggs = isHiggs && ( obj -> Pt() < 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2);
+      */
       isHiggs = isHiggs && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 : 
         m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 600 );
       obj -> SetMoment("isRCMHiggs", isHiggs);
       //Exclusive V(W/Z)-tagging
-      bool isV = obj -> Pt() > 200 && obj->M() > 70 && obj->M() < 105;
-      // isV = isV && ( obj -> Pt() < 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2);
+      bool isV = obj -> Pt() > 350 && obj->M() > 70 && obj->M() < 105;
+      /* // STANDARD CUTS:
+      isV = isV && ( obj -> Pt() < 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2);
+      */
       isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 :
-        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 500 );
+        m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 1 && obj -> Pt() > 450 );
       obj -> SetMoment("isRCMV", isV);
       // Very loose HOT jets
       const bool isLooseHOT = obj->M() > 50 && m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1 && obj -> Pt() > 300;
-- 
GitLab


From c45ac9887d59526de9f2c9c09eabfb6a9d7c8142 Mon Sep 17 00:00:00 2001
From: "tal.van.daalen" <tal.van.daalen@cern.ch>
Date: Mon, 30 Sep 2019 18:04:07 +0200
Subject: [PATCH 30/33] Some final python macro changes

---
 python/Make2DPlots_IFP.py       | 2 +-
 python/ReadTRExFitterResults.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/python/Make2DPlots_IFP.py b/python/Make2DPlots_IFP.py
index c31cbfb..0a0a7b7 100644
--- a/python/Make2DPlots_IFP.py
+++ b/python/Make2DPlots_IFP.py
@@ -15,7 +15,7 @@ onlyVariablesWithKeys = ['_vs_']
 noVariablesWithKeys = False
 plotTruthVarsTogether = True
 plotRCTypesTogether = True
-
+ 
 plotdir = "IFP_PNG/Plots_"+list_key+"/"
 
 os.system("mkdir -p "+plotdir)
diff --git a/python/ReadTRExFitterResults.py b/python/ReadTRExFitterResults.py
index 303abd0..06effd0 100644
--- a/python/ReadTRExFitterResults.py
+++ b/python/ReadTRExFitterResults.py
@@ -16,7 +16,7 @@ drawAllPlots = False
 findBestConfigOverall = False
 findBestConfigPerSignal = True
 
-# not currently implemented fully
+# not currently implemented fully 
 draw1s = False
 draw2s = False
 
-- 
GitLab


From b5a413e1af6f7da817db7f82c122c1ad685f133c Mon Sep 17 00:00:00 2001
From: Tal Roelof Van Daalen <tal.van.daalen@cern.ch>
Date: Wed, 2 Oct 2019 16:27:44 +0000
Subject: [PATCH 31/33] Taking out b-tag requirements in V-tagged jets in
 VLQ_Selector

---
 VLQAnalysis/VLQ_Selector.h | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/VLQAnalysis/VLQ_Selector.h b/VLQAnalysis/VLQ_Selector.h
index d6cc2a7..654e8a6 100644
--- a/VLQAnalysis/VLQ_Selector.h
+++ b/VLQAnalysis/VLQ_Selector.h
@@ -49,8 +49,6 @@ public:
 		   c_0Hex, c_0Hin, c_1Hex, c_1Hin, c_2Hin, c_0_1Hwin,
 		   /*V-tagged jet multiplicities*/
 		   c_0Vex, c_0Vin, c_1Vex, c_1Vin, c_2Vin, 
-           /*V-tagged jet with >=1 b-tag requirement multiplicities*/
-           c_0Vbex, c_0Vbin, c_1Vbex, c_1Vbin, c_2Vbin, 
 		   /*Forward jet multiplicities*/
 		   c_0fjex, c_0fjin, c_1fjex, c_1fjin, c_2fjin,
 		   /*T+H multiplicities*/
@@ -59,12 +57,8 @@ public:
 		   c_0LTex, c_1LTex, c_1LTin, c_2LTin,
            /*V+T multiplicities*/
            c_0VTex, c_1VTex, c_1VTin, c_2VTin, 
-           /*Vb+T multiplicities*/
-           c_0VbTex, c_1VbTex, c_1VbTin, c_2VbTin, 
            /*V+L+T multiplicities*/
            c_0VLTex, c_1VLTex, c_1VLTin, c_2VLTin,
-           /*Vb+L+T multiplicities*/
-           c_0VbLTex, c_1VbLTex, c_1VbLTin, c_2VbLTin,
 		   /*Kinematic cuts*/
 		   c_LowMtbmin, c_HighMtbmin, c_LowMbb, c_HighMbb, c_HighMetSig, c_LowMetSig, TOPSEL_MAX
   };
@@ -120,14 +114,10 @@ public:
     std::vector<SelProp>* m_sel_L_prop;
     std::vector<SelProp>* m_sel_H_prop;
     std::vector<SelProp>* m_sel_V_prop;
-    std::vector<SelProp>* m_sel_Vb_prop;
-
     std::vector<SelProp>* m_sel_TH_prop;
     std::vector<SelProp>* m_sel_LT_prop;
     std::vector<SelProp>* m_sel_VT_prop;
-    std::vector<SelProp>* m_sel_VbT_prop;
     std::vector<SelProp>* m_sel_VLT_prop;
-    std::vector<SelProp>* m_sel_VbLT_prop;
 
     std::vector<SelProp>* m_sel_Mbb_prop;
     std::vector<SelProp>* m_sel_Mtb_prop;
-- 
GitLab


From 13741bcf8702da9b3bc4aaebadff21233dde7441 Mon Sep 17 00:00:00 2001
From: Tal Roelof Van Daalen <tal.van.daalen@cern.ch>
Date: Wed, 2 Oct 2019 16:28:41 +0000
Subject: [PATCH 32/33] Taking out b-tag requirements in V-tagged jets in
 VLQ_Selector

---
 Root/VLQ_Selector.cxx | 122 +++---------------------------------------
 1 file changed, 7 insertions(+), 115 deletions(-)

diff --git a/Root/VLQ_Selector.cxx b/Root/VLQ_Selector.cxx
index 69cdfcd..100a007 100644
--- a/Root/VLQ_Selector.cxx
+++ b/Root/VLQ_Selector.cxx
@@ -150,9 +150,6 @@ bool VLQ_Selector::Init(){
   m_sel_V_prop = new std::vector<SelProp>({
       MakeSelProp("0Vex",c_0Vex), MakeSelProp("1Vex", c_1Vex), MakeSelProp("1Vin", c_1Vin), MakeSelProp("2Vin", c_2Vin) });
 
-  m_sel_Vb_prop = new std::vector<SelProp>({
-      MakeSelProp("0Vbex",c_0Vbex), MakeSelProp("1Vbex", c_1Vbex), MakeSelProp("1Vbin", c_1Vbin), MakeSelProp("2Vbin", c_2Vbin) });
-
   m_sel_TH_prop = new std::vector<SelProp>({
       MakeSelProp("0THex",c_0THex), MakeSelProp("1THex", c_1THex), MakeSelProp("1THin", c_1THin), MakeSelProp("2THex", c_2THex), MakeSelProp("2THin", c_2THin), MakeSelProp("3THin", c_3THin) });
 
@@ -162,15 +159,9 @@ bool VLQ_Selector::Init(){
   m_sel_VT_prop = new std::vector<SelProp>({
       MakeSelProp("0VTex",c_0VTex), MakeSelProp("1VTex", c_1VTex), MakeSelProp("1VTin", c_1VTin), MakeSelProp("2VTin", c_2VTin) });
 
-  m_sel_VbT_prop = new std::vector<SelProp>({
-      MakeSelProp("0VbTex",c_0VbTex), MakeSelProp("1VbTex", c_1VbTex), MakeSelProp("1VbTin", c_1VbTin), MakeSelProp("2VbTin", c_2VbTin) });
-
   m_sel_VLT_prop = new std::vector<SelProp>({
       MakeSelProp("0VLTex",c_0VLTex), MakeSelProp("1VLTex", c_1VLTex), MakeSelProp("1VLTin", c_1VLTin), MakeSelProp("2VLTin", c_2VLTin) });
 
-  m_sel_VbLT_prop = new std::vector<SelProp>({
-      MakeSelProp("0VbLTex",c_0VbLTex), MakeSelProp("1VbLTex", c_1VbLTex), MakeSelProp("1VbLTin", c_1VLTin), MakeSelProp("2VbLTin", c_2VLTin) });
-
   m_sel_Mbb_prop = new std::vector<SelProp>({
       MakeSelProp("LowMbb",c_LowMbb), MakeSelProp("HighMbb", c_HighMbb) });
 
@@ -192,13 +183,10 @@ bool VLQ_Selector::Init(){
   for(auto selprop : *m_sel_L_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_H_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_V_prop){ AddSelectionIndex(selprop.name, selprop.index); }
-  for(auto selprop : *m_sel_Vb_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_TH_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_LT_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_VT_prop){ AddSelectionIndex(selprop.name, selprop.index); }
-  for(auto selprop : *m_sel_VbT_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_VLT_prop){ AddSelectionIndex(selprop.name, selprop.index); }
-  for(auto selprop : *m_sel_VbLT_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_Mbb_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_Mtb_prop){ AddSelectionIndex(selprop.name, selprop.index); }
   for(auto selprop : *m_sel_MetSig_prop){ AddSelectionIndex(selprop.name, selprop.index); }
@@ -228,18 +216,18 @@ bool VLQ_Selector::Init(){
     }
     for(const std::string& jet : v_jet_presel_svlq){
       for(const std::string& bjet : v_bjet_presel_slvq){
-        //if(!(jet=="6jin" && bjet=="1bin") && !(jet=="3_5jwin" && bjet=="2bin") && !(jet=="3jin" && bjet=="2bin")){
+        if(!(jet=="6jin" && bjet=="1bin") && !(jet=="3_5jwin" && bjet=="2bin") && !(jet=="3jin" && bjet=="2bin")){
           AddVLQSelection("c-1lep-"+jet+"-"+bjet, do_runop, do_syst, PRESEL);
           if(m_opt->DoSplitEMu()){
             AddVLQSelection("c-1lep-"+jet+"-"+bjet+"_el", do_runop, do_syst, PRESEL);
             AddVLQSelection("c-1lep-"+jet+"-"+bjet+"_mu", do_runop, do_syst, PRESEL);
           }//split el/mu
-	  //}
+        }
       }//bjet
     }//jet
 
     if(m_opt->DoExtendedPreselection()){
-      std::vector<std::string> v_supr_svlq = {"0fjex", "1fjin", "1fjin-0Hex-0Vex", "1Hin-1LTin", "1Vin-1LTin"};
+      std::vector<std::string> v_supr_svlq = {"0fjex", "1fjin", "1fjin-0Hex-0Vex"};
       for(const std::string& supr : v_supr_svlq){
         AddVLQSelection("c-1lep-3_5jwin-1bin-"+supr, do_runop, do_syst, PRESEL);
         AddVLQSelection("c-1lep-6jin-2bin-"+supr, do_runop, do_syst, PRESEL);
@@ -341,34 +329,6 @@ bool VLQ_Selector::Init(){
     AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0LTex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ);    //SR2-a
     AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0Tex-1Lin-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ);    //SR2-b ORIG 
 
-    /*
-    // === 1b requirement in V-tags ===
-    AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-0Tex-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ);       //SR1
-    AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-0LTex-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ);       //SR1-a
-    AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-0Tex-1Lin-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ); //SR1-b ORIG
-
-    //AddVLQSelection("c-1lep-3_5jwin-1bex-1fjin-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ);       //SR1
-    AddVLQSelection("c-1lep-3_5jwin-1bex-1fjin-0LTex-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ);       //SR1-a
-    AddVLQSelection("c-1lep-3_5jwin-1bex-1fjin-0Tex-1Lin-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ); //SR1-b ORIG
-
-    AddVLQSelection("c-1lep-3_5jwin-2bex-1fjin-0Tex-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ);       //SR1
-    AddVLQSelection("c-1lep-3_5jwin-2bex-1fjin-0LTex-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ);       //SR1-a
-    AddVLQSelection("c-1lep-3_5jwin-2bex-1fjin-0Tex-1Lin-0Hex-1Vbin", do_runop, do_syst, SINGLEVLQ); //SR1-b ORIG
-
-    AddVLQSelection("c-1lep-3_5jwin-3bin-1fjin-0Tex-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);          //SR2
-    AddVLQSelection("c-1lep-3_5jwin-3bin-1fjin-0LTex-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);    //SR2-a
-    AddVLQSelection("c-1lep-3_5jwin-3bin-1fjin-0Tex-1Lin-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);    //SR2-b ORIG
-
-    AddVLQSelection("c-1lep-3_5jwin-3bex-1fjin-0Tex-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);          //SR2
-    AddVLQSelection("c-1lep-3_5jwin-3bex-1fjin-0LTex-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);    //SR2-a
-    AddVLQSelection("c-1lep-3_5jwin-3bex-1fjin-0Tex-1Lin-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);    //SR2-b ORIG
-
-    AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0Tex-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);          //SR2
-    AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0LTex-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);    //SR2-a
-    AddVLQSelection("c-1lep-3_5jwin-4bin-1fjin-0Tex-1Lin-1Hin-0Vbex", do_runop, do_syst, SINGLEVLQ);    //SR2-b ORIG
-    // ========
-    */
-
     AddVLQSelection("c-1lep-6jin-1bex-1fjin-1LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ);           //SR3 ORIG
     AddVLQSelection("c-1lep-6jin-1bex-1fjin-1Lex-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ);       //SR3-a 
     AddVLQSelection("c-1lep-6jin-1bex-1fjin-0Lex-1Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ);       //SR3-b 
@@ -742,13 +702,10 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
   SelProp* sprop_L = NULL;
   SelProp* sprop_H = NULL;
   SelProp* sprop_V = NULL;
-  SelProp* sprop_Vb = NULL;
   SelProp* sprop_TH = NULL;
   SelProp* sprop_LT = NULL;
   SelProp* sprop_VT = NULL;
-  SelProp* sprop_VbT = NULL;
   SelProp* sprop_VLT = NULL;
-  SelProp* sprop_VbLT = NULL;
   SelProp* sprop_Mbb = NULL;
   SelProp* sprop_Mtb = NULL;
   SelProp* sprop_MetSig = NULL;
@@ -842,15 +799,6 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     for(SelProp& Vprop : *m_sel_V_prop){
       if(Vprop.name == _parts_){
   sprop_V = &Vprop;
-  found = true; n_nodes++; break;
-      }
-    }
-    if(found) continue;
-
-    //=============== Vb-tag part ========================
-    for(SelProp& Vbprop : *m_sel_Vb_prop){
-      if(Vbprop.name == _parts_){
-  sprop_Vb = &Vbprop;
   found = true; n_nodes++; break;
       }
     }
@@ -879,15 +827,6 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     for(SelProp& VTprop : *m_sel_VT_prop){
       if(VTprop.name == _parts_){
   sprop_VT = &VTprop;
-  found = true; n_nodes++; break;
-      }
-    }
-    if(found) continue;
-
-    //=============== VbT-tag part ========================
-    for(SelProp& VbTprop : *m_sel_VbT_prop){
-      if(VbTprop.name == _parts_){
-  sprop_VbT = &VbTprop;
   found = true; n_nodes++; break;
       }
     }
@@ -901,17 +840,6 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
       }
     }
     if(found) continue;
- 
-     //=============== VLT-tag part ========================
-    for(SelProp& VbLTprop : *m_sel_VbLT_prop){
-      if(VbLTprop.name == _parts_){
-  sprop_VbLT = &VbLTprop;
-  found = true; n_nodes++; break;
-      }
-    }
-    if(found) continue;
- 
- 
 
     //=============== Mbb-split part ========================
     for(SelProp& Mbbprop : *m_sel_Mbb_prop){
@@ -978,9 +906,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     }
   }//el/mu channel splitting is done last
   else{
-    if( !(sprop_fwdjet || sprop_bjet || sprop_J || sprop_M || sprop_T || sprop_L || sprop_H || sprop_V || sprop_Vb 
-    || sprop_TH || sprop_LT || sprop_VT || sprop_VbT || sprop_VLT || sprop_VbLT
-    ||sprop_Mbb || sprop_Mtb || sprop_MetSig)  ){
+    if( !(sprop_fwdjet || sprop_bjet || sprop_J || sprop_M || sprop_T || sprop_L || sprop_H || sprop_V || 
+    || sprop_TH || sprop_LT || sprop_VT || sprop_VLT ||sprop_Mbb || sprop_Mtb || sprop_MetSig)  ){
 
       if(sprop_jet->primanc_name.empty()){
         SelectorBase::AddAncestors(*sel, {sprop_lep->index, sprop_jet->index}, sprop_lep->index);
@@ -991,9 +918,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
       }
 
     }//Lep + jet
-    else if( !(sprop_fwdjet || sprop_J || sprop_M || sprop_T || sprop_L || sprop_H || sprop_V || sprop_Vb 
-         || sprop_TH || sprop_LT || sprop_VT || sprop_VbT || sprop_VLT || sprop_VbLT
-         || sprop_Mbb || sprop_Mtb || sprop_MetSig) ){
+    else if( !(sprop_fwdjet || sprop_J || sprop_M || sprop_T || sprop_L || sprop_H || sprop_V 
+         || sprop_TH || sprop_LT || sprop_VT || sprop_VLT || sprop_Mbb || sprop_Mtb || sprop_MetSig) ){
       
       if(sprop_bjet->primanc_name.empty()){
         AddAncestor(*sel, "c-"+sprop_lep->name+"-"+sprop_jet->name, true);
@@ -1015,13 +941,10 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
         if(sprop_L )     { SelectorBase::AddAncestor(*sel, sprop_L->index); }
         if(sprop_H )      { SelectorBase::AddAncestor(*sel, sprop_H->index); }
         if(sprop_V )      { SelectorBase::AddAncestor(*sel, sprop_V->index); }
-        if(sprop_Vb )     { SelectorBase::AddAncestor(*sel, sprop_Vb->index); }
         if(sprop_TH )     { SelectorBase::AddAncestor(*sel, sprop_TH->index); }
         if(sprop_LT )     { SelectorBase::AddAncestor(*sel, sprop_LT->index); }
         if(sprop_VT )     { SelectorBase::AddAncestor(*sel, sprop_VT->index); }
-        if(sprop_VbT )     { SelectorBase::AddAncestor(*sel, sprop_VbT->index); }
         if(sprop_VLT )     { SelectorBase::AddAncestor(*sel, sprop_VLT->index); }
-        if(sprop_VbLT )    { SelectorBase::AddAncestor(*sel, sprop_VbLT->index); }
       }
     }//Lep-jet-bjet + boost
     else{
@@ -1051,11 +974,6 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     s_boost += sprop_V->name;
   }
 
-  if(sprop_Vb){
-    if(!s_boost.empty()){ s_boost += "-"; }
-    s_boost += sprop_Vb->name;
-  }
-
   if(sprop_LT){
     if(!s_boost.empty()){ s_boost += "-"; }
     s_boost += sprop_LT->name;
@@ -1066,21 +984,11 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     s_boost += sprop_VT->name;
   }
 
-  if(sprop_VbT){
-    if(!s_boost.empty()){ s_boost += "-"; }
-    s_boost += sprop_VbT->name;
-  }
-
   if(sprop_VLT){
     if(!s_boost.empty()){ s_boost += "-"; }
     s_boost += sprop_VLT->name;
   }
 
-  if(sprop_VbLT){
-    if(!s_boost.empty()){ s_boost += "-"; }
-    s_boost += sprop_VbLT->name;
-  }
-
       }
       if(!sprop_MetSig){
   if(sprop_Mbb){
@@ -1225,12 +1133,6 @@ bool VLQ_Selector::PassSelection(const int index){
   else if(index == c_1Vin){ pass = (m_outData->o_taggedjets_n.at("RCMV") >= 1); }
   else if(index == c_2Vin){ pass = (m_outData->o_taggedjets_n.at("RCMV") >= 2); }
 
-  else if(index == c_0Vbex){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin") == 0); }
-  else if(index == c_0Vbin){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin") >= 0); }
-  else if(index == c_1Vbex){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin") == 1); }
-  else if(index == c_1Vbin){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin") >= 1); }
-  else if(index == c_2Vbin){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin") >= 2); }
-
   else if(index == c_0THex){ pass = (m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_taggedjets_n.at("RCMHiggs") == 0); }
   else if(index == c_1THex){ pass = (m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_taggedjets_n.at("RCMHiggs") == 1); }
   else if(index == c_1THin){ pass = (m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_taggedjets_n.at("RCMHiggs") >= 1); }
@@ -1248,21 +1150,11 @@ bool VLQ_Selector::PassSelection(const int index){
   else if(index == c_1VTin){ pass = (m_outData->o_taggedjets_n.at("RCMV")+m_outData->o_taggedjets_n.at("RCMTop") >= 1); }
   else if(index == c_2VTin){ pass = (m_outData->o_taggedjets_n.at("RCMV")+m_outData->o_taggedjets_n.at("RCMTop") >= 2); }
 
-  else if(index == c_0VbTex){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop") == 0); }
-  else if(index == c_1VbTex){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop") == 1); }
-  else if(index == c_1VbTin){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop") >= 1); }
-  else if(index == c_2VbTin){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop") >= 2); }
-
   else if(index == c_0VLTex){ pass = (m_outData->o_taggedjets_n.at("RCMV")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n == 0); }
   else if(index == c_1VLTex){ pass = (m_outData->o_taggedjets_n.at("RCMV")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n == 1); }
   else if(index == c_1VLTin){ pass = (m_outData->o_taggedjets_n.at("RCMV")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n >= 1); }
   else if(index == c_2VLTin){ pass = (m_outData->o_taggedjets_n.at("RCMV")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n >= 2); }
 
-  else if(index == c_0VbLTex){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n == 0); }
-  else if(index == c_1VbLTex){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n == 1); }
-  else if(index == c_1VbLTin){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n >= 1); }
-  else if(index == c_2VbLTin){ pass = (m_outData->o_taggedjets_n.at("RCMV1bin")+m_outData->o_taggedjets_n.at("RCMTop")+m_outData->o_leptop_n >= 2); }
-
   //=========== B-tag multiplicities ====================
   else if(index == c_0bex){ pass = m_anaTools->PassBTagRequirement(0, false); }
   else if(index == c_1bex){ pass = m_anaTools->PassBTagRequirement(1, false); }
-- 
GitLab


From d40a916189ccc28f54444d7ce310d257eeb58811 Mon Sep 17 00:00:00 2001
From: Tal Roelof Van Daalen <tal.van.daalen@cern.ch>
Date: Wed, 2 Oct 2019 16:31:22 +0000
Subject: [PATCH 33/33] Taking out b-tag requirements in V-tagged jets in
 VLQ_Selector

---
 Root/VLQ_Selector.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Root/VLQ_Selector.cxx b/Root/VLQ_Selector.cxx
index 100a007..cba4804 100644
--- a/Root/VLQ_Selector.cxx
+++ b/Root/VLQ_Selector.cxx
@@ -906,7 +906,7 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name)
     }
   }//el/mu channel splitting is done last
   else{
-    if( !(sprop_fwdjet || sprop_bjet || sprop_J || sprop_M || sprop_T || sprop_L || sprop_H || sprop_V || 
+    if( !(sprop_fwdjet || sprop_bjet || sprop_J || sprop_M || sprop_T || sprop_L || sprop_H || sprop_V  
     || sprop_TH || sprop_LT || sprop_VT || sprop_VLT ||sprop_Mbb || sprop_Mtb || sprop_MetSig)  ){
 
       if(sprop_jet->primanc_name.empty()){
-- 
GitLab