diff --git a/Root/VLQ_Analysis_Data2015.cxx b/Root/VLQ_Analysis_Data2015.cxx index 7b0ae4e00e39135cbbbd2893d54158774e8e5cbe..f1a0c849f0abaec52fc6ab45c00929ff8c1c930c 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; diff --git a/macros/macros_stats/LaunchTRExFitterOnBatch.py b/macros/macros_stats/LaunchTRExFitterOnBatch.py index 4d77a8d02d8f5f60be6d2873fcc650e2dff148f5..6f41bc415f5d18df51758956b4cf50e3d8368a4c 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 412b956e91cf97b05198ae8d0452966ff17f2c07..ed811ea1c04f7697359803e6bd28b392d2f128cb 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") diff --git a/macros/macros_stats/templates/TEMPLATE_Systematics_BackNorm.txt b/macros/macros_stats/templates/TEMPLATE_Systematics_BackNorm.txt index 94a73a1830a243099d91315b8f990d862c9d9df6..abf9e310d1433a47f58a2517903386db7ff13af2 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