From 2145d8e2a9bedaceb6f68e4e63c7b148ede6970d Mon Sep 17 00:00:00 2001 From: "lvalery@ifae.es" <lvalery@at307.pic.es> Date: Wed, 21 Jun 2017 16:13:04 +0200 Subject: [PATCH 1/3] Update the launch_all_jobs.py macro --- macros/macros_stats/LaunchTRExFitterOnBatch.py | 18 +++++++++++------- macros/macros_stats/launch_all_jobs.py | 4 ++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/macros/macros_stats/LaunchTRExFitterOnBatch.py b/macros/macros_stats/LaunchTRExFitterOnBatch.py index 4d77a8d..6f41bc4 100644 --- a/macros/macros_stats/LaunchTRExFitterOnBatch.py +++ b/macros/macros_stats/LaunchTRExFitterOnBatch.py @@ -20,7 +20,8 @@ def writeScriptsAndLaunchJobs( scriptTempName, configFile, instructions, LaunchJ pathToCreate += "/" os.system("mkdir -p " + pathToCreate) - scriptName += configFile.split("/")[len(configFile.split("/"))-1] + scriptName += configFile.split("/")[len(configFile.split("/"))-1].replace(" ","") + script = open(scriptName,'w') script.write("#!/bin/bash \n") @@ -184,21 +185,24 @@ for config in configFileList: if m_action == "RANKING": #Determining the number of systematics to consider f_config = open(config,'r') - syst_n = 0 + syst_list = [] for config_line in f_config: if config_line.find("Systematic: ")>-1: - syst_n += 1 + temp_line = config_line + temp_line = temp_line.replace("Systematic: ","").replace("\"","") + syst_list += temp_line.split(";") f_config.close() #Splits into subjobs to maximize efficiency ... commands = [] - for iJob in range(0,syst_n): + for systematic in syst_list: + syst = systematic.replace("\"","").replace(" ","").replace("\n","") if commands == []: - commands += ["wfr _CONFIGFILE_ 'Ranking=" + `iJob` + "'"] + commands += ["wfr _CONFIGFILE_ 'Ranking=" + syst + "'"] else: - commands += ["r _CONFIGFILE_ 'Ranking=" + `iJob` + "'"] + commands += ["r _CONFIGFILE_ 'Ranking=" + syst + "'"] if len(commands)==m_rankingNPMerging: - writeScriptsAndLaunchJobs( m_outputDir + "/scripts_RANKING"+`iJob`, config, commands ) + writeScriptsAndLaunchJobs( m_outputDir + "/scripts_RANKING"+syst, config, commands ) commands = [] writeScriptsAndLaunchJobs( m_outputDir + "/scripts_RANKING_ttbbNorm", config, ["wfr _CONFIGFILE_ 'Ranking=HTX_BKGNORM_TTBARBB'",] ) else: diff --git a/macros/macros_stats/launch_all_jobs.py b/macros/macros_stats/launch_all_jobs.py index 412b956..ed811ea 100644 --- a/macros/macros_stats/launch_all_jobs.py +++ b/macros/macros_stats/launch_all_jobs.py @@ -111,5 +111,5 @@ for fit in fits: final_coms += [temp_com] for command in final_coms: - os.system(com) - os.system("sleep 10") + os.system(command) + os.system("sleep 2") -- GitLab From bff7d6990b8f0bc2d8eaea315f569bd6f022d0d2 Mon Sep 17 00:00:00 2001 From: "lvalery@ifae.es" <lvalery@at301.pic.es> Date: Thu, 29 Jun 2017 22:45:31 +0200 Subject: [PATCH 2/3] Adding a finer ttbb classification --- Root/VLQ_Analysis_Data2015.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Root/VLQ_Analysis_Data2015.cxx b/Root/VLQ_Analysis_Data2015.cxx index 7b0ae4e..f1a0c84 100644 --- a/Root/VLQ_Analysis_Data2015.cxx +++ b/Root/VLQ_Analysis_Data2015.cxx @@ -765,6 +765,17 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry) // if( m_opt -> SampleName() == SampleName::TTBARBB ){ if( ttbar_HF <= 0 ) return false; + const int classification = ( m_ntupData -> d_HF_Classification - ( m_ntupData -> d_HF_Classification % 100 ) ) / 100; + //ttb + if( (m_opt -> StrSampleName() == "TTBARBB_B") && classification != 10 ) return false; + //ttbb + if( (m_opt -> StrSampleName() == "TTBARBB_BB") && classification != 20 ) return false; + //ttB + if( (m_opt -> StrSampleName() == "TTBARBB_BIGB") && classification != 1 ) return false; + //others + if( (m_opt -> StrSampleName() == "TTBARBB_OTHERS") && (classification == 10 || classification == 20 || classification == 1) ) return false; + //tt no B + if( (m_opt -> StrSampleName() == "TTBARBB_NOBIGB") && classification == 1 ) return false; } if( m_opt -> SampleName() == SampleName::TTBARCC ){ if( ttbar_HF >= 0 ) return false; @@ -1007,7 +1018,7 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry) if( !(m_opt -> IsData() || (m_opt -> StrSampleName().find("QCD") != std::string::npos)) && m_truthMngr ){ m_outData -> o_VLQtype = m_truthMngr -> GetVLQDecayType(); m_outMngrHist -> HistMngr() -> FillTH1D( "vlqType", m_outData->o_VLQtype, m_outData -> o_eventWeight_Nom ); - //&& m_truthMngr -> Initialize() + //&& m_truthMngr -> Initialize() } if(m_opt -> MsgLevel() == Debug::DEBUG) std::cout << "==> After truth handling" << std::endl; -- GitLab From 4823be2666f0db2d38e9139623f7d52089c3a976 Mon Sep 17 00:00:00 2001 From: "lvalery@ifae.es" <lvalery@at301.pic.es> Date: Thu, 29 Jun 2017 23:05:26 +0200 Subject: [PATCH 3/3] Update the config file to avoid naming issues --- .../macros_stats/templates/TEMPLATE_Systematics_BackNorm.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/macros/macros_stats/templates/TEMPLATE_Systematics_BackNorm.txt b/macros/macros_stats/templates/TEMPLATE_Systematics_BackNorm.txt index 94a73a1..abf9e31 100644 --- a/macros/macros_stats/templates/TEMPLATE_Systematics_BackNorm.txt +++ b/macros/macros_stats/templates/TEMPLATE_Systematics_BackNorm.txt @@ -134,7 +134,6 @@ Systematic: "HTX_BKGNP_OTHERS_Dibosons_XS_0l_0T0H" ; "HTX_BKGNP_OTHERS_Dibosons_ Samples: Dibosons Regions: HTX_c0lep0Tex0Hex*;HTX_c0lep1Tex0Hex*;HTX_c0lep0Tex1Hex*;HTX_c0lep1Tex1Hex*;HTX_c0lep2Tin0_1Hwin*;HTX_c0lep0Tin2Hin*;HTX_c0lep2TH* - % ---------------------------- % % -------- Top EW ---------- % % ---------------------------- % @@ -216,7 +215,7 @@ Systematic: HTX_BKGNP_OTHERS_Singletop_XS_1lep_0Tex0Hex; HTX_BKGNP_OTHERS_Single Systematic: HTX_BKGNP_OTHERS_Singletop_XS_0lepHighMtbmin_0Tex0Hex; HTX_BKGNP_OTHERS_Singletop_XS_0lepHighMtbmin_1Tex0Hex; HTX_BKGNP_OTHERS_Singletop_XS_0lepHighMtbmin_0Tex1Hex; HTX_BKGNP_OTHERS_Singletop_XS_0lepHighMtbmin_1Tex1Hex; HTX_BKGNP_OTHERS_Singletop_XS_0lepHighMtbmin_2Tin0_1Hwin; HTX_BKGNP_OTHERS_Singletop_XS_0lepHighMtbmin_2THin - Title: "Single-top norm. (0l, 0T, 0H)"; "Single-top norm. (0l, 1T, 0H)"; "Single-top norm. (0l, 0T, 1H)"; "Single-top norm. (0l, 1T, 1H)"; "Single-top norm. (0l, #geq2T,0-1H)"; "Single-top norm. (0l, #geq2TH)" + Title: "Single-top norm. (0l, 0T, 0H, HM)"; "Single-top norm. (0l, 1T, 0H, HM)"; "Single-top norm. (0l, 0T, 1H, HM)"; "Single-top norm. (0l, 1T, 1H, HM)"; "Single-top norm. (0l, #geq2T,0-1H, HM)"; "Single-top norm. (0l, #geq2TH, HM)" Type: OVERALL Category: "Background uncertainties" OverallUp: 0.8 @@ -226,7 +225,7 @@ Systematic: HTX_BKGNP_OTHERS_Singletop_XS_0lepHighMtbmin_0Tex0Hex; HTX_BKGNP_OTH Systematic: HTX_BKGNP_OTHERS_Singletop_XS_0lepLowMtbmin_0Tex0Hex; HTX_BKGNP_OTHERS_Singletop_XS_0lepLowMtbmin_1Tex0Hex; HTX_BKGNP_OTHERS_Singletop_XS_0lepLowMtbmin_0Tex1Hex; HTX_BKGNP_OTHERS_Singletop_XS_0lepLowMtbmin_1Tex1Hex; HTX_BKGNP_OTHERS_Singletop_XS_0lepLowMtbmin_2Tin0_1Hwin - Title: "Single-top norm. (0l, 0T, 0H)"; "Single-top norm. (0l, 1T, 0H)"; "Single-top norm. (0l, 0T, 1H)"; "Single-top norm. (0l, 1T, 1H)"; "Single-top norm. (0l, #geq2T,0-1H)" + Title: "Single-top norm. (0l, 0T, 0H, LM)"; "Single-top norm. (0l, 1T, 0H, LM)"; "Single-top norm. (0l, 0T, 1H, LM)"; "Single-top norm. (0l, 1T, 1H, LM)"; "Single-top norm. (0l, #geq2T, 0-1H, LM)" Type: OVERALL Category: "Background uncertainties" OverallUp: 0.6 -- GitLab