diff --git a/Root/VLQ_AnalysisTools.cxx b/Root/VLQ_AnalysisTools.cxx index 34aaa8bad57fe24269e98c483df438ef9b4ba9fe..28229469a1aa2708ac652515b1f6cdf44e278145 100644 --- a/Root/VLQ_AnalysisTools.cxx +++ b/Root/VLQ_AnalysisTools.cxx @@ -188,115 +188,115 @@ 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. ); - - 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); + 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 + + } - 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 - - - } - + }//loop over all track jets - - + + //=============== 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(); ){ - - 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++; - } - + tj_j < (m_outData -> o_trkjets)->end(); ){ + + 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++; + } + }//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++; } - + }// - + m_outData -> o_trkjets_n = m_outData -> o_trkjets -> size(); m_outData -> o_trkbjets_n = m_outData -> o_trkbjets -> size(); m_outData -> o_trkljets_n = m_outData -> o_trkljets -> size(); - + if( !m_opt->IsData() ){ m_outData -> o_trkjets_truth_b_n = m_outData -> o_trkjets_truth_b -> size(); m_outData -> o_trkjets_truth_c_n = m_outData -> o_trkjets_truth_c -> size(); @@ -312,8 +312,8 @@ bool VLQ_AnalysisTools::GetObjectVectors(){ } // if track jets are to be used - - + + //%%%%%%%%%%%%%%%%%%%%%%%%%%% // Small-radius jets //%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -343,68 +343,68 @@ 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 - + } - + }//loop over all jets @@ -420,8 +420,7 @@ bool VLQ_AnalysisTools::GetObjectVectors(){ // Forward jets bool isFwdJet = m_ntupData -> d_fwdjet_pt -> at(iFwdjet) >= m_opt->FwdJetsPtCut(); isFwdJet = isFwdJet && TMath::Abs( m_ntupData -> d_fwdjet_eta -> at(iFwdjet) ) < m_opt->FwdJetsEtaCut() && TMath::Abs( m_ntupData -> d_fwdjet_eta -> at(iFwdjet) ) >= m_opt->JetsEtaCut(); - // isFwdJet = isFwdJet && m_ntupData -> d_fwdjet_isSignal -> at(iFwdjet); - // isFwdJet = isFwdJet && m_ntupData -> d_fwdjet_passOR -> at(iFwdjet); + isFwdJet = isFwdJet && ( (m_ntupData -> d_fwdjet_fJvt -> at(iFwdjet) < 0.5) || (m_ntupData -> d_fwdjet_pt -> at(iFwdjet) > 120.) ); if( isFwdJet ){ AnalysisObject *obj = new AnalysisObject(); @@ -434,7 +433,7 @@ bool VLQ_AnalysisTools::GetObjectVectors(){ } }//loop over all fwd jets if(m_opt -> MsgLevel() == Debug::DEBUG) std::cout << "==> After filling fwd jets " << std::endl; - + //If doing low-b regions, fill the low-b fake b's if( m_opt->DoLowBRegions() ){ //ONLY FOR CALO-JETS @@ -451,7 +450,7 @@ bool VLQ_AnalysisTools::GetObjectVectors(){ m_outData -> o_fwdjets_eta40_45_n = m_outData -> o_fwdjets_eta40_45 -> size(); m_outData -> o_bjets_n = m_outData -> o_bjets -> size(); m_outData -> o_ljets_n = m_outData -> o_ljets -> size(); - + if( !m_opt->IsData() ){ m_outData -> o_jets_truth_b_n = m_outData -> o_jets_truth_b -> size(); m_outData -> o_jets_truth_c_n = m_outData -> o_jets_truth_c -> size(); @@ -496,17 +495,17 @@ 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); - + // // Truth matching // obj -> SetMoment( "pdgId_truth", 0 ); obj -> SetMoment( "nmatch_truth", 0 ); - - + + // // Tagging by different algorithms // @@ -515,36 +514,42 @@ bool VLQ_AnalysisTools::GetObjectVectors(){ obj -> SetMoment("isRCTTMass", isHOT); // Exclusive top-tagging bool isTop = obj -> Pt() > 400 && obj->M() > 140; - /* // 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 ); + if(m_opt -> DoOldBoost()){ + isTop = isTop && ( obj -> Pt() < 800 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) >= 1); + } + else{ + 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() > 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 ); + if(m_opt->DoOldBoost()){ + isHiggs = isHiggs && ( obj -> Pt() < 500 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2); + } + else{ + 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() > 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() > 450 ); + if(m_opt->DoOldBoost()){ + isV = isV && ( obj -> Pt() < 400 ? m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 : m_ntupData -> d_rcjets_nconsts -> at(iRCJet) <= 2); + } + else{ + isV = isV && ( m_ntupData -> d_rcjets_nconsts -> at(iRCJet) == 2 ? obj -> Pt() > 350 : + 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; obj -> SetMoment("isLooseRCTTMass", isLooseHOT); - + obj -> SetMoment("isRCMTopHiggs", (isTop || isHiggs) ); - + if( isHOT ){ m_outData -> o_taggedjets.at("RCTTMass") -> push_back(obj); } @@ -553,46 +558,40 @@ 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_met", fabs(obj->DeltaPhi( *(m_outData -> o_AO_met) )) ); + obj -> SetMoment ("dPhi_met", fabs(obj->DeltaPhi( *(m_outData -> o_AO_met) )) ); + m_outData -> o_rcjets -> push_back(obj); } } @@ -842,6 +841,13 @@ bool VLQ_AnalysisTools::ComputeAllVariables(){ if(m_opt -> MsgLevel() == Debug::DEBUG) std::cout << " -> After m_outData -> o_mtwl (" << m_outData -> o_mtwl << ")" << std::endl; m_outData -> o_ptwl = m_varComputer -> GetPTw( *(m_outData->o_el), *(m_outData->o_mu), m_outData->o_AO_met ); if(m_opt -> MsgLevel() == Debug::DEBUG) std::cout << " -> After m_outData -> o_ptwl (" << m_outData -> o_ptwl << ")" << std::endl; + + AOVector v_lep; + v_lep.insert( v_lep.end(), m_outData -> o_el->begin(), m_outData -> o_el->end()); + v_lep.insert( v_lep.end(), m_outData -> o_mu->begin(), m_outData -> o_mu->end()); + m_outData -> o_mll = m_varComputer -> GetMjjLeadingJets( v_lep ); + if(m_opt -> MsgLevel() == Debug::DEBUG) std::cout << " -> After m_outData -> o_mll (" << m_outData -> o_mll << ")" << std::endl; + m_outData -> o_hthad = m_varComputer -> GetHtHad( *(m_outData->o_jets) ); if(m_opt -> MsgLevel() == Debug::DEBUG) std::cout << " -> After m_outData -> o_hthad (" << m_outData -> o_hthad << ")" << std::endl; m_outData -> o_hthadRC = m_varComputer -> GetHtHad( *(m_outData->o_rcjets) ); diff --git a/Root/VLQ_Analysis_Data2015.cxx b/Root/VLQ_Analysis_Data2015.cxx index d77e1f52dab351aaa913108d6132947cec1f187b..cbec1bae82b4bf55e82ccd2595e32404f200d985 100644 --- a/Root/VLQ_Analysis_Data2015.cxx +++ b/Root/VLQ_Analysis_Data2015.cxx @@ -446,7 +446,7 @@ bool VLQ_Analysis_Data2015::Begin(){ if(m_opt->DumpHistos()){ - if(!m_opt->DoOneLeptonAna() && !m_opt->DoZeroLeptonAna()) { + if(!m_opt->DoOneLeptonAna() && !m_opt->DoZeroLeptonAna() && !m_opt->DoTwoLeptonAna()) { throw std::invalid_argument("Must choose a lepton channel"); } @@ -465,6 +465,7 @@ bool VLQ_Analysis_Data2015::Begin(){ m_outMngrHist -> AddStandardTH1( "mtw", 25, 0, 1000, ";m_{T}(W) [GeV]", otherVariables, &(m_outData -> o_mtwl) ); //m_outMngrHist -> AddStandardTH1( "mtw_zoom", 25, 0, 300, ";m_{T}(W) [GeV]", false, &(m_outData -> o_mtwl) ); m_outMngrHist -> AddStandardTH1( "ptw", 25, 0, 1000, ";p_{T}(W) [GeV]", false, &(m_outData -> o_ptwl) ); + m_outMngrHist -> AddStandardTH1( "mll", 5, 0, 500, ";m_{ll} [GeV]", false, &(m_outData -> o_mll) ); //m_outMngrHist -> AddStandardTH1( "ptw_zoom", 25, 0, 300, ";p_{T}(W) [GeV]", false, &(m_outData -> o_ptwl) ); m_outMngrHist -> AddStandardTH1( "hthad", 25, 0, 3000, ";H_{T}^{had} [GeV]", false, &(m_outData -> o_hthad) ); m_outMngrHist -> AddStandardTH1( "hthadRC", 50, 0, 5000, ";H_{T}^{had} (RC jets) [GeV]", false, &(m_outData -> o_hthadRC) ); @@ -513,16 +514,16 @@ 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 m_outMngrHist -> AddStandardTH1( "jets_n", 1, -2.5, 15.5,";Number of jets", otherVariables, &(m_outData -> o_jets_n) ); m_outMngrHist -> AddStandardTH1( "trkjets_n", 1, -2.5, 15.5,";Number of track-jets", otherVariables, &(m_outData -> o_trkjets_n) ); @@ -541,7 +542,7 @@ 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) ); @@ -581,221 +582,221 @@ bool VLQ_Analysis_Data2015::Begin(){ //================ 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 ) { - std::string str_id = ""; - str_id += std::to_string(iFwdJet); - 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"); - m_outMngrHist -> AddStandardTH1( "fwdjet"+str_id+"_eta", 0.2, -5, 5, ";Fwd-jet"+str_id+" #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"); - m_outMngrHist -> AddStandardTH1( "fwdjet"+str_id+"_m", 4, 0, 100, ";Fwd-jet"+str_id+" mass [GeV]", - false, &(m_outData -> o_fwdjets), iFwdJet, "M"); - - m_outMngrHist -> AddStandardTH1( "fwdjet_eta25_30"+str_id+"_pt", 5, 0, 500, ";Fwd-jet"+str_id+" 2.5<|#eta|<3.0 p_{T} [GeV]", - DrawSyst, &(m_outData -> o_fwdjets_eta25_30), iFwdJet, "Pt"); - m_outMngrHist -> AddStandardTH1( "fwdjet_eta25_30"+str_id+"_eta", 0.2, -5, 5, ";Fwd-jet"+str_id+" 2.5<|#eta|<3.0 #eta", - DrawSyst, &(m_outData -> o_fwdjets_eta25_30), iFwdJet, "Eta"); - m_outMngrHist -> AddStandardTH1( "fwdjet_eta25_30"+str_id+"_phi", 0.2, -3.5, 3.5, ";Fwd-jet"+str_id+" 2.5<|#eta|<3.0 #varphi", - false, &(m_outData -> o_fwdjets_eta25_30), iFwdJet, "Phi"); - m_outMngrHist -> AddStandardTH1( "fwdjet_eta25_30"+str_id+"_m", 4, 0, 100, ";Fwd-jet"+str_id+" 2.5<|#eta|<3.0 mass [GeV]", - false, &(m_outData -> o_fwdjets_eta25_30), iFwdJet, "M"); - - m_outMngrHist -> AddStandardTH1( "fwdjet_eta30_35"+str_id+"_pt", 5, 0, 500, ";Fwd-jet"+str_id+" 3.0<|#eta|<3.5 p_{T} [GeV]", - DrawSyst, &(m_outData -> o_fwdjets_eta30_35), iFwdJet, "Pt"); - m_outMngrHist -> AddStandardTH1( "fwdjet_eta30_35"+str_id+"_eta", 0.2, -5, 5, ";Fwd-jet"+str_id+" 3.0<|#eta|<3.5 #eta", - DrawSyst, &(m_outData -> o_fwdjets_eta30_35), iFwdJet, "Eta"); - m_outMngrHist -> AddStandardTH1( "fwdjet_eta30_35"+str_id+"_phi", 0.2, -3.5, 3.5, ";Fwd-jet"+str_id+" 3.0<|#eta|<3.5 #varphi", - false, &(m_outData -> o_fwdjets_eta30_35), iFwdJet, "Phi"); - m_outMngrHist -> AddStandardTH1( "fwdjet_eta30_35"+str_id+"_m", 4, 0, 100, ";Fwd-jet"+str_id+" 3.0<|#eta|<3.5 mass [GeV]", - false, &(m_outData -> o_fwdjets_eta30_35), iFwdJet, "M"); - - m_outMngrHist -> AddStandardTH1( "fwdjet_eta35_40"+str_id+"_pt", 5, 0, 500, ";Fwd-jet"+str_id+" 3.5<|#eta|<4.0 p_{T} [GeV]", - DrawSyst, &(m_outData -> o_fwdjets_eta35_40), iFwdJet, "Pt"); - m_outMngrHist -> AddStandardTH1( "fwdjet_eta35_40"+str_id+"_eta", 0.2, -5, 5, ";Fwd-jet"+str_id+" 3.5<|#eta|<4.0 #eta", - DrawSyst, &(m_outData -> o_fwdjets_eta35_40), iFwdJet, "Eta"); - m_outMngrHist -> AddStandardTH1( "fwdjet_eta35_40"+str_id+"_phi", 0.2, -3.5, 3.5, ";Fwd-jet"+str_id+" 3.5<|#eta|<4.0 #varphi", - false, &(m_outData -> o_fwdjets_eta35_40), iFwdJet, "Phi"); - m_outMngrHist -> AddStandardTH1( "fwdjet_eta35_40"+str_id+"_m", 4, 0, 100, ";Fwd-jet"+str_id+" 3.5<|#eta|<4.0 mass [GeV]", - false, &(m_outData -> o_fwdjets_eta35_40), iFwdJet, "M"); - - - m_outMngrHist -> AddStandardTH1( "fwdjet_eta40_45"+str_id+"_pt", 5, 0, 500, ";Fwd-jet"+str_id+" 4.0<|#eta|<4.5 p_{T} [GeV]", - DrawSyst, &(m_outData -> o_fwdjets_eta40_45), iFwdJet, "Pt"); - m_outMngrHist -> AddStandardTH1( "fwdjet_eta40_45"+str_id+"_eta", 0.2, -5, 5, ";Fwd-jet"+str_id+" 4.0<|#eta|<4.5 #eta", - DrawSyst, &(m_outData -> o_fwdjets_eta40_45), iFwdJet, "Eta"); - m_outMngrHist -> AddStandardTH1( "fwdjet_eta40_45"+str_id+"_phi", 0.2, -3.5, 3.5, ";Fwd-jet"+str_id+" 4.0<|#eta|<4.5 #varphi", - false, &(m_outData -> o_fwdjets_eta40_45), iFwdJet, "Phi"); - m_outMngrHist -> AddStandardTH1( "fwdjet_eta40_45"+str_id+"_m", 4, 0, 100, ";Fwd-jet"+str_id+" 4.0<|#eta|<4.5 mass [GeV]", - false, &(m_outData -> o_fwdjets_eta40_45), 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"); - } - + for ( int iFwdJet=-1; iFwdJet<=5; ++iFwdJet ) { + std::string str_id = ""; + str_id += std::to_string(iFwdJet); + 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"); + m_outMngrHist -> AddStandardTH1( "fwdjet"+str_id+"_eta", 0.2, -5, 5, ";Fwd-jet"+str_id+" #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"); + m_outMngrHist -> AddStandardTH1( "fwdjet"+str_id+"_m", 4, 0, 100, ";Fwd-jet"+str_id+" mass [GeV]", + false, &(m_outData -> o_fwdjets), iFwdJet, "M"); + + m_outMngrHist -> AddStandardTH1( "fwdjet_eta25_30"+str_id+"_pt", 5, 0, 500, ";Fwd-jet"+str_id+" 2.5<|#eta|<3.0 p_{T} [GeV]", + DrawSyst, &(m_outData -> o_fwdjets_eta25_30), iFwdJet, "Pt"); + m_outMngrHist -> AddStandardTH1( "fwdjet_eta25_30"+str_id+"_eta", 0.2, -5, 5, ";Fwd-jet"+str_id+" 2.5<|#eta|<3.0 #eta", + DrawSyst, &(m_outData -> o_fwdjets_eta25_30), iFwdJet, "Eta"); + m_outMngrHist -> AddStandardTH1( "fwdjet_eta25_30"+str_id+"_phi", 0.2, -3.5, 3.5, ";Fwd-jet"+str_id+" 2.5<|#eta|<3.0 #varphi", + false, &(m_outData -> o_fwdjets_eta25_30), iFwdJet, "Phi"); + m_outMngrHist -> AddStandardTH1( "fwdjet_eta25_30"+str_id+"_m", 4, 0, 100, ";Fwd-jet"+str_id+" 2.5<|#eta|<3.0 mass [GeV]", + false, &(m_outData -> o_fwdjets_eta25_30), iFwdJet, "M"); + + m_outMngrHist -> AddStandardTH1( "fwdjet_eta30_35"+str_id+"_pt", 5, 0, 500, ";Fwd-jet"+str_id+" 3.0<|#eta|<3.5 p_{T} [GeV]", + DrawSyst, &(m_outData -> o_fwdjets_eta30_35), iFwdJet, "Pt"); + m_outMngrHist -> AddStandardTH1( "fwdjet_eta30_35"+str_id+"_eta", 0.2, -5, 5, ";Fwd-jet"+str_id+" 3.0<|#eta|<3.5 #eta", + DrawSyst, &(m_outData -> o_fwdjets_eta30_35), iFwdJet, "Eta"); + m_outMngrHist -> AddStandardTH1( "fwdjet_eta30_35"+str_id+"_phi", 0.2, -3.5, 3.5, ";Fwd-jet"+str_id+" 3.0<|#eta|<3.5 #varphi", + false, &(m_outData -> o_fwdjets_eta30_35), iFwdJet, "Phi"); + m_outMngrHist -> AddStandardTH1( "fwdjet_eta30_35"+str_id+"_m", 4, 0, 100, ";Fwd-jet"+str_id+" 3.0<|#eta|<3.5 mass [GeV]", + false, &(m_outData -> o_fwdjets_eta30_35), iFwdJet, "M"); + + m_outMngrHist -> AddStandardTH1( "fwdjet_eta35_40"+str_id+"_pt", 5, 0, 500, ";Fwd-jet"+str_id+" 3.5<|#eta|<4.0 p_{T} [GeV]", + DrawSyst, &(m_outData -> o_fwdjets_eta35_40), iFwdJet, "Pt"); + m_outMngrHist -> AddStandardTH1( "fwdjet_eta35_40"+str_id+"_eta", 0.2, -5, 5, ";Fwd-jet"+str_id+" 3.5<|#eta|<4.0 #eta", + DrawSyst, &(m_outData -> o_fwdjets_eta35_40), iFwdJet, "Eta"); + m_outMngrHist -> AddStandardTH1( "fwdjet_eta35_40"+str_id+"_phi", 0.2, -3.5, 3.5, ";Fwd-jet"+str_id+" 3.5<|#eta|<4.0 #varphi", + false, &(m_outData -> o_fwdjets_eta35_40), iFwdJet, "Phi"); + m_outMngrHist -> AddStandardTH1( "fwdjet_eta35_40"+str_id+"_m", 4, 0, 100, ";Fwd-jet"+str_id+" 3.5<|#eta|<4.0 mass [GeV]", + false, &(m_outData -> o_fwdjets_eta35_40), iFwdJet, "M"); + + + m_outMngrHist -> AddStandardTH1( "fwdjet_eta40_45"+str_id+"_pt", 5, 0, 500, ";Fwd-jet"+str_id+" 4.0<|#eta|<4.5 p_{T} [GeV]", + DrawSyst, &(m_outData -> o_fwdjets_eta40_45), iFwdJet, "Pt"); + m_outMngrHist -> AddStandardTH1( "fwdjet_eta40_45"+str_id+"_eta", 0.2, -5, 5, ";Fwd-jet"+str_id+" 4.0<|#eta|<4.5 #eta", + DrawSyst, &(m_outData -> o_fwdjets_eta40_45), iFwdJet, "Eta"); + m_outMngrHist -> AddStandardTH1( "fwdjet_eta40_45"+str_id+"_phi", 0.2, -3.5, 3.5, ";Fwd-jet"+str_id+" 4.0<|#eta|<4.5 #varphi", + false, &(m_outData -> o_fwdjets_eta40_45), iFwdJet, "Phi"); + m_outMngrHist -> AddStandardTH1( "fwdjet_eta40_45"+str_id+"_m", 4, 0, 100, ";Fwd-jet"+str_id+" 4.0<|#eta|<4.5 mass [GeV]", + false, &(m_outData -> o_fwdjets_eta40_45), 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"); + } + } 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 - + //Reclustered jet"+str_id+" variables m_outMngrHist -> AddStandardTH1( "RCjets_n", 1, -0.5, 5.5, ";Number of signal RC jets", otherVariables, &(m_outData -> o_rcjets_n) ); for ( int iRCJet=-1; iRCJet<=0; ++iRCJet ) { @@ -805,55 +806,55 @@ 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 -> 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" ); + 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" ); } - + // // For truth-match studies // 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 + "_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 -> 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" ); } } - + for ( const std::string type : m_truthRCTypes ){ std::string tagstring = ""; @@ -874,19 +875,25 @@ bool VLQ_Analysis_Data2015::Begin(){ 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" ); + , "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" ); + , "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"); + , "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+"_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" @@ -900,41 +907,41 @@ 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" ); - m_outMngrHist -> AddStandardTH1( decayType + "_recoVLQ" + str_id + "_m", 25, 0, 5000, ";"+decayType+" reco VLQ"+str_id+" mass [GeV]" , - 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]" , - 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)" , - 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"); - - } - + 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]" , + 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]" , + 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)" , + 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 }//decay types @@ -1005,70 +1012,73 @@ 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 ); - - // 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 - , 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 - , 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 - , 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 - - // - // 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"); - } - + 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 + , 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 + , 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 + , 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 + + // + // 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"); + } + }//index loop } /* @@ -1083,7 +1093,7 @@ bool VLQ_Analysis_Data2015::Begin(){ m_outMngrHist -> AddStandardTH2( "meff", "tageff_TTT", 25, 0, 3000, 0.05, 0., 1.5, "m_{eff} [GeV]", "Tagging efficiency", false, &(m_outData -> o_meff), &(m_outData -> o_tageff_TTT) ); */ - /* + //Electron variables m_outMngrHist -> AddStandardTH1( "el_n", 1, -0.5, 5.5, ";Number of signal electrons", false, &(m_outData -> o_el_n) ); for ( int iEl=-1; iEl<=0; ++iEl ) { @@ -1094,10 +1104,10 @@ bool VLQ_Analysis_Data2015::Begin(){ m_outMngrHist -> AddStandardTH1( "el"+str_id+"_pt_zoom", 10, 0, 500, ";Electron p_{T} [GeV]" , false, &(m_outData -> o_el), iEl, "Pt" ); m_outMngrHist -> AddStandardTH1( "el"+str_id+"_eta", 0.2, -3, 3, ";Electron #eta" , false, &(m_outData -> o_el), iEl, "Eta" ); m_outMngrHist -> AddStandardTH1( "el"+str_id+"_phi", 0.2, -4, 4, ";Electron #phi" , false, &(m_outData -> o_el), iEl, "Phi" ); - m_outMngrHist -> AddStandardTH1( "el"+str_id+"_d0sig", 0.1, 0, 5, ";Electron d_{0}^{sig}" , false, &(m_outData -> o_el), iEl, "d0sig" ); - m_outMngrHist -> AddStandardTH1( "el"+str_id+"_z0", 0.025, -0.5, 0.5, ";Electron z_{0} [mm]" , false, &(m_outData -> o_el), iEl, "z0" ); - m_outMngrHist -> AddStandardTH1( "el"+str_id+"_ptvarcone20", 0.01, 0, 0.1, ";Electron ptvarcone20/p_{T}" , false, &(m_outData -> o_el), iEl, "ptvarcone20" ); - m_outMngrHist -> AddStandardTH1( "el"+str_id+"_topoetcone20", 0.01, 0, 0.1,";Electron topoetcone20/p_{T}" , false, &(m_outData -> o_el), iEl, "topoetcone20" ); + //m_outMngrHist -> AddStandardTH1( "el"+str_id+"_d0sig", 0.1, 0, 5, ";Electron d_{0}^{sig}" , false, &(m_outData -> o_el), iEl, "d0sig" ); + //m_outMngrHist -> AddStandardTH1( "el"+str_id+"_z0", 0.025, -0.5, 0.5, ";Electron z_{0} [mm]" , false, &(m_outData -> o_el), iEl, "z0" ); + //m_outMngrHist -> AddStandardTH1( "el"+str_id+"_ptvarcone20", 0.01, 0, 0.1, ";Electron ptvarcone20/p_{T}" , false, &(m_outData -> o_el), iEl, "ptvarcone20" ); + //m_outMngrHist -> AddStandardTH1( "el"+str_id+"_topoetcone20", 0.01, 0, 0.1,";Electron topoetcone20/p_{T}" , false, &(m_outData -> o_el), iEl, "topoetcone20" ); } //Muon variables @@ -1110,26 +1120,26 @@ bool VLQ_Analysis_Data2015::Begin(){ m_outMngrHist -> AddStandardTH1( "mu"+str_id+"_pt_zoom", 10, 0, 500, ";Muon p_{T} [GeV]" , false, &(m_outData -> o_mu), iMu, "Pt" ); m_outMngrHist -> AddStandardTH1( "mu"+str_id+"_eta", 0.2, -3, 3, ";Muon #eta" , false, &(m_outData -> o_mu), iMu, "Eta" ); m_outMngrHist -> AddStandardTH1( "mu"+str_id+"_phi", 0.2, -4, 4, ";Muon #phi" , false, &(m_outData -> o_mu), iMu, "Phi" ); - m_outMngrHist -> AddStandardTH1( "mu"+str_id+"_d0sig", 0.1, 0, 5, ";Muon d_{0}^{sig}" , false, &(m_outData -> o_mu), iMu, "d0sig" ); - m_outMngrHist -> AddStandardTH1( "mu"+str_id+"_z0", 0.025, -0.5, 0.5, ";Muon z_{0}" , false, &(m_outData -> o_mu), iMu, "z0" ); - m_outMngrHist -> AddStandardTH1( "mu"+str_id+"_ptvarcone30", 0.01, 0, 0.2, ";Muon ptvarcone30/p_{T}" , false, &(m_outData -> o_mu), iMu, "ptvarcone30" ); - m_outMngrHist -> AddStandardTH1( "mu"+str_id+"_topoetcone20", 0.01, 0, 0.2,";Muon topoetcone20/p_{T}" , false, &(m_outData -> o_mu), iMu, "topoetcone20" ); + //m_outMngrHist -> AddStandardTH1( "mu"+str_id+"_d0sig", 0.1, 0, 5, ";Muon d_{0}^{sig}" , false, &(m_outData -> o_mu), iMu, "d0sig" ); + //m_outMngrHist -> AddStandardTH1( "mu"+str_id+"_z0", 0.025, -0.5, 0.5, ";Muon z_{0}" , false, &(m_outData -> o_mu), iMu, "z0" ); + //m_outMngrHist -> AddStandardTH1( "mu"+str_id+"_ptvarcone30", 0.01, 0, 0.2, ";Muon ptvarcone30/p_{T}" , false, &(m_outData -> o_mu), iMu, "ptvarcone30" ); + //m_outMngrHist -> AddStandardTH1( "mu"+str_id+"_topoetcone20", 0.01, 0, 0.2,";Muon topoetcone20/p_{T}" , false, &(m_outData -> o_mu), iMu, "topoetcone20" ); } - */ + //Lepton variables 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 @@ -1166,17 +1176,17 @@ 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 //Truth variables @@ -1184,28 +1194,28 @@ 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)) ); @@ -1569,15 +1579,15 @@ 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 }//ttbar @@ -1670,9 +1680,30 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry) } } m_outData -> o_selLep = lepton; - } else if ( (m_outData -> o_mu_n + m_outData -> o_el_n) == 0 ) { + }//1-lepton + else if ( (m_outData -> o_mu_n + m_outData -> o_el_n) == 0 ) { m_outData-> o_channel_type = VLQ_Enums::FULLHAD; - } else { + }//0-lepton + else if ( (m_outData -> o_mu_n + m_outData -> o_el_n) == 2 ) { + if( m_outData -> o_el_n == 2){ + m_outData-> o_channel_type = VLQ_Enums::ELEL; + lepton = m_outData -> o_el -> at(0); + }//ee + else if( m_outData -> o_mu_n == 2){ + m_outData-> o_channel_type = VLQ_Enums::MUMU; + lepton = m_outData -> o_mu -> at(0); + }//mumu + else { + m_outData-> o_channel_type = VLQ_Enums::ELMU; + if(m_outData -> o_mu -> at(0)->Pt() > m_outData -> o_el -> at(0)->Pt()){ + lepton = m_outData -> o_mu -> at(0); + } + else{ + lepton = m_outData -> o_el -> at(0); + } + }//emu + }//2-lepton + else { m_outData -> o_rejectEvent |= 1 << VLQ_Enums::LEPTON_REJECTED; } if(m_opt -> MsgLevel() == Debug::DEBUG) std::cout << "==> After lepton selection" << std::endl; @@ -1683,15 +1714,23 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry) // # //########################################################### bool isTriggerMatched = false; - if( m_outData-> o_channel_type == VLQ_Enums::ELECTRON || m_outData-> o_channel_type == VLQ_Enums::MUON ){ + if( !(m_outData-> o_channel_type == VLQ_Enums::UNDEFINED || m_outData-> o_channel_type == VLQ_Enums::FULLHAD) ){ bool checkTriggerMatching = true; if( !m_opt -> UseLeptonTrigger()) checkTriggerMatching = false; if( m_opt -> UseMETTriggerOneLep() && trigMETPass && m_outData -> o_AO_met -> Pt() > 200 ) checkTriggerMatching = false; if( checkTriggerMatching ){ + + bool ele_ch = (m_outData-> o_channel_type == VLQ_Enums::ELECTRON) || (m_outData-> o_channel_type == VLQ_Enums::ELEL); + bool mu_ch = (m_outData-> o_channel_type == VLQ_Enums::MUON) || (m_outData-> o_channel_type == VLQ_Enums::MUMU); + + if(m_outData-> o_channel_type == VLQ_Enums::ELMU){ + ele_ch = m_outData -> o_el -> at(0)->Pt() > m_outData -> o_mu -> at(0)->Pt(); + mu_ch = !ele_ch; + } + for(TriggerInfo* trig : m_outData -> o_trigger_list){ if( !(trig->Period() & m_outData->o_period) ) continue; - if( (trig->Type()==VLQ_Enums::TRIGELEC && m_outData-> o_channel_type==VLQ_Enums::ELECTRON) - || (trig->Type()==VLQ_Enums::TRIGMUON && m_outData-> o_channel_type==VLQ_Enums::MUON) ){ + if( (trig->Type()==VLQ_Enums::TRIGELEC && ele_ch) || (trig->Type()==VLQ_Enums::TRIGMUON && mu_ch) ){ if( (int)lepton->GetMoment(trig->Name()) ){ isTriggerMatched = true; break; @@ -1709,27 +1748,55 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry) // Refining channel definition # // # //########################################################### + bool isElectronChannel = false; bool isMuonChannel = false; + bool isElElChannel = false; + bool isMuMuChannel = false; + bool isElMuChannel = false; + bool isElectronChannelHMET = false; bool isMuonChannelHMET = false; + bool isElElChannelHMET = false; + bool isMuMuChannelHMET = false; + bool isElMuChannelHMET = false; + if(m_opt->UseLeptonTrigger()){ isElectronChannel = ( m_outData-> o_channel_type == VLQ_Enums::ELECTRON ) && trigElecPass && isTriggerMatched; isMuonChannel = ( m_outData-> o_channel_type == VLQ_Enums::MUON ) && trigMuonPass && isTriggerMatched; + isElElChannel = ( m_outData-> o_channel_type == VLQ_Enums::ELEL ) && trigElecPass && isTriggerMatched; + isMuMuChannel = ( m_outData-> o_channel_type == VLQ_Enums::MUMU ) && trigMuonPass && isTriggerMatched; + isElMuChannel = ( m_outData-> o_channel_type == VLQ_Enums::ELMU ) && (trigElecPass || trigMuonPass) && isTriggerMatched; } if(m_opt->UseMETTriggerOneLep()){ isElectronChannelHMET = ( m_outData-> o_channel_type == VLQ_Enums::ELECTRON ) && ( trigMETPass && m_outData -> o_AO_met -> Pt() > 200 ); isMuonChannelHMET = ( m_outData-> o_channel_type == VLQ_Enums::MUON ) && ( trigMETPass && m_outData -> o_AO_met -> Pt() > 200 ); + isElElChannelHMET = ( m_outData-> o_channel_type == VLQ_Enums::ELEL ) && ( trigMETPass && m_outData -> o_AO_met -> Pt() > 200 ); + isMuMuChannelHMET = ( m_outData-> o_channel_type == VLQ_Enums::MUMU ) && ( trigMETPass && m_outData -> o_AO_met -> Pt() > 200 ); + isElMuChannelHMET = ( m_outData-> o_channel_type == VLQ_Enums::ELMU ) && ( trigMETPass && m_outData -> o_AO_met -> Pt() > 200 ); } + bool is0LeptonChannel = ( m_outData-> o_channel_type == VLQ_Enums::FULLHAD ) && ( trigMETPass && m_outData -> o_AO_met -> Pt() > 200 ); if( isElectronChannel || isElectronChannelHMET ){ m_outData-> o_channel_type = VLQ_Enums::ELECTRON; - } else if( isMuonChannel || isMuonChannelHMET ){ + } + else if( isMuonChannel || isMuonChannelHMET ){ m_outData-> o_channel_type = VLQ_Enums::MUON; - } else if( is0LeptonChannel ){ + } + else if( isElElChannel || isElElChannelHMET ){ + m_outData-> o_channel_type = VLQ_Enums::ELEL; + } + else if( isMuMuChannel || isMuMuChannelHMET ){ + m_outData-> o_channel_type = VLQ_Enums::MUMU; + } + else if( isElMuChannel || isElMuChannelHMET ){ + m_outData-> o_channel_type = VLQ_Enums::ELMU; + } + else if( is0LeptonChannel ){ m_outData-> o_channel_type = VLQ_Enums::FULLHAD; - } else { + } + else { m_outData-> o_channel_type = VLQ_Enums::UNDEFINED; } @@ -1875,116 +1942,118 @@ 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 ){ - 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) ){ - - 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 ){ - 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 ){ - 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 ){ - 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(); - - 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 - + 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 ===== + 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 ){ + 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 ){ + 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 ){ + 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(); + + 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 - - + + if( m_opt -> SampleName() == SampleName::VLQ ){ - 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*/ ); - } - - } + 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*/ ); + } + + } }// VLQ samples - - + + // // Match leptonic W parton to reconstructed leptonic W // 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); + } } - + // // Match leptonic top parton to reconstructed leptonic top // @@ -1993,37 +2062,37 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry) obj -> SetMoment("nmatch_reco_leptop", 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); + } } - + // // Match small-R jets to b-quarks @@ -2034,7 +2103,7 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry) }// if doing truth analysis - } + }//if MC if(m_opt -> MsgLevel() == Debug::DEBUG) std::cout << "==> After truth handling" << std::endl; @@ -2045,7 +2114,7 @@ bool VLQ_Analysis_Data2015::Process(Long64_t entry) //########################################################### if ( !(m_opt -> IsData() || (m_opt -> StrSampleName().find("QCD") != std::string::npos)) ) { m_weightMngr -> SetCrossSectionWeight(); - const bool use_met_trigger = isElectronChannelHMET || isMuonChannelHMET; + const bool use_met_trigger = isElectronChannelHMET || isMuonChannelHMET || isElElChannelHMET || isMuMuChannelHMET || isElMuChannelHMET; m_weightMngr -> SetLeptonSFWeights( !use_met_trigger ); if( m_opt ->ReweightKinematics() ){ @@ -2231,11 +2300,11 @@ 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(),"-","")); + } } - + } else{ m_outMngrHist -> SaveStandardTH1(nameHist); @@ -2270,9 +2339,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; @@ -2284,49 +2353,49 @@ bool VLQ_Analysis_Data2015::SumAnalysisRegions(const bool newFile){ std::map<std::string, std::vector<std::string> > targetPrintList{}; if( m_opt->DoOneLeptonAna() ){ - + 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 @@ -2349,58 +2418,58 @@ 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 @@ -2488,14 +2557,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) ) + 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) ) { boostcat = "1THin"; } */ @@ -2517,50 +2586,50 @@ 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); - - if(region.find("7jin") != std::string::npos){ - targetPrintList.at("sum0lep7jin3bin").push_back(region); - }//7jin3bin - + targetPrintList.at("sum0lep6jin3bin").push_back(region); + + 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); - + }//0L regions //===================== 1L REGIONS ======================================== 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); - - 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("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 + + //targetPrintList.at("sum1lep"+boostcat+jetcat+bcat).push_back(region); + }//3bin - + }//1L regions } @@ -2570,7 +2639,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; } @@ -2622,331 +2691,331 @@ 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;} + 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){ + for(const std::string& channel : lepchannels){ - if(!channel.empty() && targetPair.first.find("1lep") == std::string::npos){ continue; } + 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; - } + //Regular weight systematics + for(std::string sys : wgtList){ - }//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"}; + //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 - for(const std::string& mtbcat : mtblist){ + //Region dependent weight systematics, including proxies for normalisation uncertainties + for(std::pair<std::string, std::string> boostcat : boostcat_systs){ - //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() ); + //============================ V+jets samples =========================================================================== + if(is_Vjets){ - 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; - } + //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 - }//mtbmin categories + }//single top samples - }//QCD0L samples + //================================================= Single top samples =========================================================== - if(is_QCD){ + //============================ QCD samples =========================================================================== + if(is_QCD0L){ + std::vector<std::string> mtblist = {"","LowMtbmin","HighMtbmin"}; - //weight uncertainty - TH1D* targethist_QCD_el_up = NULL; - TH1D* targethist_QCD_mu_up = NULL; + 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 - 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() ); + if(is_QCD){ - 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 + //weight uncertainty + TH1D* targethist_QCD_el_up = NULL; + TH1D* targethist_QCD_mu_up = NULL; - 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 =========================================================== + 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 - }//Boosted categories - - }//lepton channels + }//lepton channels }//target regions - + }//vlq decays - + }//variables - + //==== Normalisation === //Vjets_XS -- split by lepton channel and boosted category 30% (additional histograms for charm and beauty) //Dibosons_XS -- split by lepton channel and boosted category (48%) @@ -2961,7 +3030,7 @@ bool VLQ_Analysis_Data2015::SumAnalysisRegions(const bool newFile){ wgtList.clear(); regList.clear(); targetPrintList.clear(); - + outfile->Close(); return true; } diff --git a/Root/VLQ_NtupleData.cxx b/Root/VLQ_NtupleData.cxx index d720faf24354e870e8b50bfb878583cb3ab213c1..b7c44a7857713ae75002dcd8b1ff865e1d9c1ee2 100644 --- a/Root/VLQ_NtupleData.cxx +++ b/Root/VLQ_NtupleData.cxx @@ -49,6 +49,7 @@ d_fwdjet_phi(0), d_fwdjet_E(0), d_fwdjet_btag_weight(0), d_fwdjet_jvt(0), +d_fwdjet_fJvt(0), d_fwdjet_truthLabel(0), d_fwdjet_isSignal(0), d_fwdjet_passOR(0), diff --git a/Root/VLQ_NtupleReader.cxx b/Root/VLQ_NtupleReader.cxx index 295d7711b91073c97ed6deae417f9ee0c35a2430..2581494904c27672b6a0cecb72dda7eda665cc70 100644 --- a/Root/VLQ_NtupleReader.cxx +++ b/Root/VLQ_NtupleReader.cxx @@ -135,6 +135,7 @@ int VLQ_NtupleReader::SetJetBranchAddresses(const string &/*sj*/){ stat = SetVariableToChain("fwjets_e", &(m_VLQ_ntupData->d_fwdjet_E) ); if(stat != 0){ return stat; } // stat = SetVariableToChain("fwjets_btag_weight", &(m_VLQ_ntupData->d_fwdjet_btag_weight) ); if(stat != 0){ return stat; } stat = SetVariableToChain("fwjets_jvt", &(m_VLQ_ntupData->d_fwdjet_jvt) ); if(stat != 0){ return stat; } + stat = SetVariableToChain("fwjets_fJvt", &(m_VLQ_ntupData->d_fwdjet_fJvt) ); if(stat != 0){ return stat; } // stat = SetVariableToChain("jets_isSignal", &(m_VLQ_ntupData->d_fwdjet_isSignal) ); if(stat != 0){ return stat; } // stat = SetVariableToChain("jets_passOR", &(m_VLQ_ntupData->d_fwdjet_passOR) ); if(stat != 0){ return stat; } if(!(m_opt->IsData() || m_opt -> StrSampleName().find("QCD") != std::string::npos)){ diff --git a/Root/VLQ_Options.cxx b/Root/VLQ_Options.cxx index 302d890f65f046283c4eb74ddd9d20f34378e857..9f07b9f7b3b36a1dfea071775c9c61b1e7e6a93e 100644 --- a/Root/VLQ_Options.cxx +++ b/Root/VLQ_Options.cxx @@ -42,6 +42,7 @@ m_useLeptonTrigger(false), m_useLargeRJets(false), m_doCutFlow(true), m_doOneLeptonAna(false), +m_doTwoLeptonAna(false), m_doZeroLeptonAna(false), // m_doPreselRegions(true), m_doSingleVLQPreselection(false), @@ -130,6 +131,7 @@ OptionsBase(q) m_useLargeRJets = q.m_useLargeRJets; m_doCutFlow = q.m_doCutFlow; m_doOneLeptonAna = q.m_doOneLeptonAna; + m_doTwoLeptonAna = q.m_doTwoLeptonAna; m_doZeroLeptonAna = q.m_doZeroLeptonAna; // m_doPreselRegions = q.m_doPreselRegions; m_doSingleVLQPreselection = q.m_doSingleVLQPreselection; @@ -263,6 +265,8 @@ bool VLQ_Options::IdentifyOption ( const std::string &argument, const std::strin m_doCutFlow = AnalysisUtils::BoolValue(temp_val, temp_arg); } else if( temp_arg.find("--DOONELEPTONANA") != std::string::npos ){ m_doOneLeptonAna = AnalysisUtils::BoolValue(temp_val, temp_arg); + } else if( temp_arg.find("--DOTWOLEPTONANA") != std::string::npos ){ + m_doTwoLeptonAna = AnalysisUtils::BoolValue(temp_val, temp_arg); } else if( temp_arg.find("--DOZEROLEPTONANA") != std::string::npos ){ m_doZeroLeptonAna = AnalysisUtils::BoolValue(temp_val, temp_arg); // } else if( temp_arg.find("--DOPRESELREGIONS") != std::string::npos ){ @@ -483,6 +487,7 @@ void VLQ_Options::PrintOptions(){ std::cout << " m_useMETTriggerOneLep = " << m_useMETTriggerOneLep<< std::endl; std::cout << " m_doCutFlow = " << m_doCutFlow << std::endl; std::cout << " m_doOneLeptonAna = " << m_doOneLeptonAna << std::endl; + std::cout << " m_doTwoLeptonAna = " << m_doTwoLeptonAna << std::endl; std::cout << " m_doZeroLeptonAna = " << m_doZeroLeptonAna << std::endl; // std::cout << " m_doPreselRegions = " << m_doPreselRegions << std::endl; std::cout << " m_doSingleVLQPreselection = " << m_doSingleVLQPreselection<< std::endl; @@ -537,10 +542,17 @@ void VLQ_Options::checkConcistency() const +" useMETTrigger "+bool2string(m_useMETTrigger)+"," +" useLeptonTrigger "+bool2string(m_useLeptonTrigger)+"," +" useMETTriggerOneLep "+bool2string(m_useMETTriggerOneLep)); - if(m_doOneLeptonAna==false and m_doZeroLeptonAna==false) + if(m_doOneLeptonAna==false and m_doZeroLeptonAna==false and m_doTwoLeptonAna==false) throw logic_error(string(__FILE__)+"\n" - +" choose at least one of the two analyses:" + +" choose at least one of the three analyses:" +" doOneLeptonAna "+bool2string(m_doOneLeptonAna)+"," - +" doZeroLeptonAna "+bool2string(m_doZeroLeptonAna)); + +" doZeroLeptonAna "+bool2string(m_doZeroLeptonAna) + +" doTwoLeptonAna "+bool2string(m_doTwoLeptonAna)); + if( (m_doOneLeptonAna==true or m_doZeroLeptonAna==true) and m_doTwoLeptonAna==true) + throw logic_error(string(__FILE__)+"\n" + +" Cannot run dilepton channel together with 0-lep or 1-lep channels:" + +" doOneLeptonAna "+bool2string(m_doOneLeptonAna)+"," + +" doZeroLeptonAna "+bool2string(m_doZeroLeptonAna) + +" doTwoLeptonAna "+bool2string(m_doTwoLeptonAna)); // TODO implement other checks } diff --git a/Root/VLQ_OutputData.cxx b/Root/VLQ_OutputData.cxx index d2ddb7ddb5ce55fda1124bb626ea7a756f9f713b..52a4e8a15be021dcfc274de07080c3eaf7c7fdf2 100644 --- a/Root/VLQ_OutputData.cxx +++ b/Root/VLQ_OutputData.cxx @@ -14,7 +14,7 @@ VLQ_OutputData::VLQ_OutputData( VLQ_Options* opt ): OutputData(), m_opt(opt), //Event variables -o_channel_type(0),o_period(0),o_run_number(0),o_pileup_mu(0),o_npv(0), o_meff(0), o_met(0), o_mtwl(0), o_ptwl(0), +o_channel_type(0),o_period(0),o_run_number(0),o_pileup_mu(0),o_npv(0), o_meff(0), o_met(0), o_mtwl(0), o_ptwl(0), o_mll(0), o_hthad(0), o_hthadRC(0), o_hthadRCtag(0), o_hthadRCM(0), o_mJsum(0), o_metsig_ev(0), o_metsig_obj(0), //Jet type numbers o_jets_n(0),o_bjets_n(0),o_ljets_n(0), @@ -442,6 +442,7 @@ void VLQ_OutputData::ClearOutputData() o_met = 0; o_mtwl = 0; o_ptwl = 0; + o_mll = 0; o_hthad = 0; o_metsig_ev = 0; o_metsig_obj = 0; diff --git a/Root/VLQ_Selector.cxx b/Root/VLQ_Selector.cxx index cba4804c1b1eaa3bf4c6c584b08f3c0983276a05..073b41bcf3173d77cca28b726b9f4bd9a2d6495b 100644 --- a/Root/VLQ_Selector.cxx +++ b/Root/VLQ_Selector.cxx @@ -46,7 +46,8 @@ VLQ_Selector::VLQ_Selector( VLQ_Options *opt, const VLQ_NtupleData *ntupData, m_sel_VLT_prop(NULL), m_sel_Mbb_prop(NULL), m_sel_Mtb_prop(NULL), - m_sel_MetSig_prop(NULL) + m_sel_MetSig_prop(NULL), + m_sel_MLL_prop(NULL) { } @@ -56,31 +57,32 @@ VLQ_Selector::VLQ_Selector( VLQ_Options *opt, const VLQ_NtupleData *ntupData, VLQ_Selector::VLQ_Selector( const VLQ_Selector &q ): SelectorBase(q) { - m_opt = q.m_opt; - m_ntupData = q.m_ntupData; - m_outData = q.m_outData; - m_anaTools = q.m_anaTools; - m_outMngrHist = q.m_outMngrHist; - m_sel_indices = new std::map<std::string, int>(*(q.m_sel_indices)); - m_sel_names = new std::map<int, std::string>(*(q.m_sel_names)); - m_sel_lep_prop = new std::vector<SelProp>(*(q.m_sel_lep_prop)); - m_sel_lepflav_prop = new std::vector<SelProp>(*(q.m_sel_lepflav_prop)); - m_sel_jet_prop = new std::vector<SelProp>(*(q.m_sel_jet_prop)); - m_sel_fwdjet_prop = new std::vector<SelProp>(*(q.m_sel_fwdjet_prop)); - m_sel_bjet_prop = new std::vector<SelProp>(*(q.m_sel_bjet_prop)); - m_sel_J_prop = new std::vector<SelProp>(*(q.m_sel_J_prop)); - m_sel_M_prop = new std::vector<SelProp>(*(q.m_sel_M_prop)); - m_sel_T_prop = new std::vector<SelProp>(*(q.m_sel_T_prop)); + m_opt = q.m_opt; + m_ntupData = q.m_ntupData; + m_outData = q.m_outData; + m_anaTools = q.m_anaTools; + m_outMngrHist = q.m_outMngrHist; + m_sel_indices = new std::map<std::string, int>(*(q.m_sel_indices)); + m_sel_names = new std::map<int, std::string>(*(q.m_sel_names)); + m_sel_lep_prop = new std::vector<SelProp>(*(q.m_sel_lep_prop)); + m_sel_lepflav_prop = new std::vector<SelProp>(*(q.m_sel_lepflav_prop)); + m_sel_jet_prop = new std::vector<SelProp>(*(q.m_sel_jet_prop)); + m_sel_fwdjet_prop = new std::vector<SelProp>(*(q.m_sel_fwdjet_prop)); + m_sel_bjet_prop = new std::vector<SelProp>(*(q.m_sel_bjet_prop)); + m_sel_J_prop = new std::vector<SelProp>(*(q.m_sel_J_prop)); + m_sel_M_prop = new std::vector<SelProp>(*(q.m_sel_M_prop)); + m_sel_T_prop = new std::vector<SelProp>(*(q.m_sel_T_prop)); m_sel_L_prop = new std::vector<SelProp>(*(q.m_sel_L_prop)); - m_sel_H_prop = new std::vector<SelProp>(*(q.m_sel_H_prop)); - m_sel_V_prop = new std::vector<SelProp>(*(q.m_sel_V_prop)); - m_sel_TH_prop = new std::vector<SelProp>(*(q.m_sel_TH_prop)); + m_sel_H_prop = new std::vector<SelProp>(*(q.m_sel_H_prop)); + m_sel_V_prop = new std::vector<SelProp>(*(q.m_sel_V_prop)); + m_sel_TH_prop = new std::vector<SelProp>(*(q.m_sel_TH_prop)); m_sel_LT_prop = new std::vector<SelProp>(*(q.m_sel_LT_prop)); - m_sel_VT_prop = new std::vector<SelProp>(*(q.m_sel_VT_prop)); + m_sel_VT_prop = new std::vector<SelProp>(*(q.m_sel_VT_prop)); m_sel_VLT_prop = new std::vector<SelProp>(*(q.m_sel_VLT_prop)); - m_sel_Mbb_prop = new std::vector<SelProp>(*(q.m_sel_Mbb_prop)); - m_sel_Mtb_prop = new std::vector<SelProp>(*(q.m_sel_Mtb_prop)); - m_sel_MetSig_prop = new std::vector<SelProp>(*(q.m_sel_MetSig_prop)); + m_sel_Mbb_prop = new std::vector<SelProp>(*(q.m_sel_Mbb_prop)); + m_sel_Mtb_prop = new std::vector<SelProp>(*(q.m_sel_Mtb_prop)); + m_sel_MetSig_prop = new std::vector<SelProp>(*(q.m_sel_MetSig_prop)); + m_sel_MLL_prop = new std::vector<SelProp>(*(q.m_sel_MLL_prop)); } //______________________________________________________________________________ @@ -102,10 +104,12 @@ bool VLQ_Selector::Init(){ m_sel_names = new std::map<int, std::string>(); m_sel_lep_prop = new std::vector<SelProp>({ - MakeSelProp("all", c_all), MakeSelProp("1lep", c_1l_chan) , MakeSelProp("0lep", c_0l_chan) }); + MakeSelProp("all", c_all), + MakeSelProp("1lep", c_1l_chan) , MakeSelProp("0lep", c_0l_chan), MakeSelProp("2lep", c_2l_chan) }); m_sel_lepflav_prop = new std::vector<SelProp>({ - MakeSelProp("1el", c_1el_chan) , MakeSelProp("1mu", c_1mu_chan) }); + MakeSelProp("1el", c_1el_chan) , MakeSelProp("1mu", c_1mu_chan) + , MakeSelProp("ee", c_ee_chan), MakeSelProp("mumu", c_mumu_chan), MakeSelProp("emu", c_emu_chan) }); m_sel_jet_prop = new std::vector<SelProp>({ MakeSelProp("2jin", c_2jin, ""),MakeSelProp("3jin", c_3jin, "2jin"), @@ -120,8 +124,8 @@ 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, "") ,MakeSelProp("1bex", c_1bex, "1bin"), MakeSelProp("2bin", c_2bin, "1bin") @@ -170,6 +174,8 @@ bool VLQ_Selector::Init(){ m_sel_MetSig_prop = new std::vector<SelProp>({ MakeSelProp("LowMetSig",c_LowMetSig), MakeSelProp("HighMetSig", c_HighMetSig) }); + m_sel_MLL_prop = new std::vector<SelProp>({ + MakeSelProp("HighMLL",c_HighMLL), MakeSelProp("ZwinMLL", c_ZwinMLL) }); for(auto selprop : *m_sel_lep_prop){ AddSelectionIndex(selprop.name, selprop.index); } @@ -190,6 +196,7 @@ bool VLQ_Selector::Init(){ 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); } + for(auto selprop : *m_sel_MLL_prop){ AddSelectionIndex(selprop.name, selprop.index); } if(m_opt->MsgLevel() == Debug::DEBUG){ std::cout<<"Added all top selections "<<std::endl; } //========================== Add desired regions ================================================ @@ -197,9 +204,24 @@ bool VLQ_Selector::Init(){ bool do_runop = true; std::vector<std::string> ch_lep; ch_lep.clear(); - if(m_opt->DoSplitEMu()) ch_lep = {"", "_el", "_mu"}; + if(m_opt->DoSplitEMu()){ + if(m_opt->DoOneLeptonAna()) ch_lep = {"", "_el", "_mu"}; + else if(m_opt->DoTwoLeptonAna()) ch_lep = {"", "_ee", "_mumu", "_emu"}; + } else ch_lep = {""}; + std::string lep_prefix = ""; + if(m_opt->DoOneLeptonAna()) lep_prefix = "c-1lep-"; + else if(m_opt->DoTwoLeptonAna()) lep_prefix = "c-2lep-"; + + std::string nolep_prefix = "c-0lep-"; + + + std::vector<std::string> ch_mll; ch_mll.clear(); + if(m_opt->DoTwoLeptonAna()) ch_mll = {"", "-HighMLL", "-ZwinMLL"}; + else ch_mll = {""}; + + //======== PRESELECTION========= if(m_opt->DoSingleVLQPreselection()){ @@ -208,39 +230,40 @@ bool VLQ_Selector::Init(){ AddVLQSelection("c-all",do_runop, do_syst, PRESEL); + std::vector<std::string> v_bjet_presel_slvq = {"1bin", "2bin", "3bin"}; std::vector<std::string> v_jet_presel_svlq = {"3jin", "3_5jwin", "5jin", "6jin"}; if(m_opt->DoLowBRegions()){ + v_bjet_presel_slvq.push_back("0bin"); v_bjet_presel_slvq.push_back("0bex"); v_bjet_presel_slvq.push_back("1bex"); } 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")){ - 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 - } + //if(!(jet=="6jin" && bjet=="1bin") && !(jet=="3_5jwin" && bjet=="2bin") && !(jet=="3jin" && bjet=="2bin")){ + for(const std::string& lepsuf : ch_lep){ + + for(const std::string& mllsuf : ch_mll){ + AddVLQSelection(lep_prefix+jet+"-"+bjet+mllsuf+lepsuf, do_runop, do_syst, PRESEL); + }//mll channels + }//lep channels + //} + }//bjet }//jet if(m_opt->DoExtendedPreselection()){ 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); - if(m_opt->DoSplitEMu()){ - AddVLQSelection("c-1lep-3_5jwin-1bin-"+supr+"_el", do_runop, do_syst, PRESEL); - AddVLQSelection("c-1lep-6jin-2bin-"+supr+"_el", do_runop, do_syst, PRESEL); - AddVLQSelection("c-1lep-3_5jwin-1bin-"+supr+"_mu", do_runop, do_syst, PRESEL); - AddVLQSelection("c-1lep-6jin-2bin-"+supr+"_mu", do_runop, do_syst, PRESEL); - }//split el/mu + for(const std::string& lepsuf : ch_lep){ + AddVLQSelection(lep_prefix+"3_5jwin-1bin-"+supr+lepsuf, do_runop, do_syst, PRESEL); + AddVLQSelection(lep_prefix+"6jin-2bin-"+supr+lepsuf, do_runop, do_syst, PRESEL); + } }//signal suppressing }//Extended preselection }//Single VLQ preselection + if (m_opt->DoPairVLQPreselection()){ bool do_syst = true; @@ -258,10 +281,10 @@ bool VLQ_Selector::Init(){ } for(const std::string& jet : v_jet_presel_pair){ for(const std::string& bjet : v_bjet_presel_pair){ - AddVLQSelection("c-1lep-"+jet+"-"+bjet, do_runop, do_syst, PRESEL); + AddVLQSelection(lep_prefix+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); + AddVLQSelection(lep_prefix+jet+"-"+bjet+"_el", do_runop, do_syst, PRESEL); + AddVLQSelection(lep_prefix+jet+"-"+bjet+"_mu", do_runop, do_syst, PRESEL); }//split el/mu }//bjet }//jet @@ -275,9 +298,9 @@ bool VLQ_Selector::Init(){ } for(const std::string& jet : v_jet_presel_pair){ for(const std::string& bjet : v_bjet_presel_pair){ - AddVLQSelection("c-0lep-"+jet+"-"+bjet, do_runop, do_syst, PRESEL); - // AddVLQSelection("c-0lep-"+jet+"-"+bjet+"-HighMtbmin", do_runop, do_syst, PRESEL); - // AddVLQSelection("c-0lep-"+jet+"-"+bjet+"-LowMtbmin", do_runop, do_syst, PRESEL); + AddVLQSelection(nolep_prefix+jet+"-"+bjet, do_runop, do_syst, PRESEL); + // AddVLQSelection(nolep_prefix+jet+"-"+bjet+"-HighMtbmin", do_runop, do_syst, PRESEL); + // AddVLQSelection(nolep_prefix+jet+"-"+bjet+"-LowMtbmin", do_runop, do_syst, PRESEL); }//bjet }//jet }//0-lep @@ -304,107 +327,106 @@ bool VLQ_Selector::Init(){ */ // Signal regions + AddVLQSelection(lep_prefix+"3_5jwin-1_2bwin-1fjin-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1 + AddVLQSelection(lep_prefix+"3_5jwin-1_2bwin-1fjin-0LTex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1-a + AddVLQSelection(lep_prefix+"3_5jwin-1_2bwin-1fjin-0Tex-1Lin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1-b ORIG - 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 - - //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-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1-a - AddVLQSelection("c-1lep-3_5jwin-1bex-1fjin-0Tex-1Lin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1-b ORIG + //AddVLQSelection(lep_prefix+"3_5jwin-1bex-1fjin-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1 + AddVLQSelection(lep_prefix+"3_5jwin-1bex-1fjin-0LTex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1-a + AddVLQSelection(lep_prefix+"3_5jwin-1bex-1fjin-0Tex-1Lin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1-b ORIG - AddVLQSelection("c-1lep-3_5jwin-2bex-1fjin-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1 - AddVLQSelection("c-1lep-3_5jwin-2bex-1fjin-0LTex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1-a - AddVLQSelection("c-1lep-3_5jwin-2bex-1fjin-0Tex-1Lin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1-b ORIG + AddVLQSelection(lep_prefix+"3_5jwin-2bex-1fjin-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1 + AddVLQSelection(lep_prefix+"3_5jwin-2bex-1fjin-0LTex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1-a + AddVLQSelection(lep_prefix+"3_5jwin-2bex-1fjin-0Tex-1Lin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR1-b ORIG - AddVLQSelection("c-1lep-3_5jwin-3bin-1fjin-0Tex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR2 - AddVLQSelection("c-1lep-3_5jwin-3bin-1fjin-0LTex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR2-a - AddVLQSelection("c-1lep-3_5jwin-3bin-1fjin-0Tex-1Lin-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR2-b ORIG + AddVLQSelection(lep_prefix+"3_5jwin-3bin-1fjin-0Tex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR2 + AddVLQSelection(lep_prefix+"3_5jwin-3bin-1fjin-0LTex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR2-a + AddVLQSelection(lep_prefix+"3_5jwin-3bin-1fjin-0Tex-1Lin-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR2-b ORIG - AddVLQSelection("c-1lep-3_5jwin-3bex-1fjin-0Tex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR2 - AddVLQSelection("c-1lep-3_5jwin-3bex-1fjin-0LTex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR2-a - AddVLQSelection("c-1lep-3_5jwin-3bex-1fjin-0Tex-1Lin-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR2-b ORIG + AddVLQSelection(lep_prefix+"3_5jwin-3bex-1fjin-0Tex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR2 + AddVLQSelection(lep_prefix+"3_5jwin-3bex-1fjin-0LTex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR2-a + AddVLQSelection(lep_prefix+"3_5jwin-3bex-1fjin-0Tex-1Lin-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR2-b ORIG - 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(lep_prefix+"3_5jwin-4bin-1fjin-0Tex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR2 + AddVLQSelection(lep_prefix+"3_5jwin-4bin-1fjin-0LTex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR2-a + AddVLQSelection(lep_prefix+"3_5jwin-4bin-1fjin-0Tex-1Lin-1Hin-0Vex", 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 - AddVLQSelection("c-1lep-6jin-1bex-1fjin-2LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-c + AddVLQSelection(lep_prefix+"6jin-1bex-1fjin-1LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3 ORIG + AddVLQSelection(lep_prefix+"6jin-1bex-1fjin-1Lex-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-a + AddVLQSelection(lep_prefix+"6jin-1bex-1fjin-0Lex-1Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-b + AddVLQSelection(lep_prefix+"6jin-1bex-1fjin-2LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-c - AddVLQSelection("c-1lep-6jin-2bex-1fjin-1LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3 ORIG - AddVLQSelection("c-1lep-6jin-2bex-1fjin-1Lex-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-a - AddVLQSelection("c-1lep-6jin-2bex-1fjin-0Lex-1Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-b - AddVLQSelection("c-1lep-6jin-2bex-1fjin-2LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-c + AddVLQSelection(lep_prefix+"6jin-2bex-1fjin-1LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3 ORIG + AddVLQSelection(lep_prefix+"6jin-2bex-1fjin-1Lex-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-a + AddVLQSelection(lep_prefix+"6jin-2bex-1fjin-0Lex-1Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-b + AddVLQSelection(lep_prefix+"6jin-2bex-1fjin-2LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-c - AddVLQSelection("c-1lep-6jin-1_2bwin-1fjin-1LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3 ORIG - AddVLQSelection("c-1lep-6jin-1_2bwin-1fjin-1Lex-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-a - AddVLQSelection("c-1lep-6jin-1_2bwin-1fjin-0Lex-1Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-b - AddVLQSelection("c-1lep-6jin-1_2bwin-1fjin-2LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-c + AddVLQSelection(lep_prefix+"6jin-1_2bwin-1fjin-1LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3 ORIG + AddVLQSelection(lep_prefix+"6jin-1_2bwin-1fjin-1Lex-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-a + AddVLQSelection(lep_prefix+"6jin-1_2bwin-1fjin-0Lex-1Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-b + AddVLQSelection(lep_prefix+"6jin-1_2bwin-1fjin-2LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR3-c - AddVLQSelection("c-1lep-6jin-3bin-1fjin-1VTin-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-0 ORIG + AddVLQSelection(lep_prefix+"6jin-3bin-1fjin-1VTin-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-0 ORIG - AddVLQSelection("c-1lep-6jin-3bin-1fjin-1Lex-0VTex-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-a - AddVLQSelection("c-1lep-6jin-3bin-1fjin-0Lex-1VTex-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-b - AddVLQSelection("c-1lep-6jin-3bin-1fjin-2VLTin-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-c + AddVLQSelection(lep_prefix+"6jin-3bin-1fjin-1Lex-0VTex-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-a + AddVLQSelection(lep_prefix+"6jin-3bin-1fjin-0Lex-1VTex-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-b + AddVLQSelection(lep_prefix+"6jin-3bin-1fjin-2VLTin-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-c - AddVLQSelection("c-1lep-6jin-3bex-1fjin-1VTin-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-0 ORIG + AddVLQSelection(lep_prefix+"6jin-3bex-1fjin-1VTin-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-0 ORIG - AddVLQSelection("c-1lep-6jin-3bex-1fjin-1Lex-0VTex-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-a - AddVLQSelection("c-1lep-6jin-3bex-1fjin-0Lex-1VTex-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-b - AddVLQSelection("c-1lep-6jin-3bex-1fjin-2VLTin-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-c + AddVLQSelection(lep_prefix+"6jin-3bex-1fjin-1Lex-0VTex-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-a + AddVLQSelection(lep_prefix+"6jin-3bex-1fjin-0Lex-1VTex-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-b + AddVLQSelection(lep_prefix+"6jin-3bex-1fjin-2VLTin-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-c - AddVLQSelection("c-1lep-6jin-4bin-1fjin-1VTin-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-0 ORIG + AddVLQSelection(lep_prefix+"6jin-4bin-1fjin-1VTin-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-0 ORIG - AddVLQSelection("c-1lep-6jin-4bin-1fjin-1Lex-0VTex-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-a - AddVLQSelection("c-1lep-6jin-4bin-1fjin-0Lex-1VTex-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-b - AddVLQSelection("c-1lep-6jin-4bin-1fjin-2VLTin-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-c + AddVLQSelection(lep_prefix+"6jin-4bin-1fjin-1Lex-0VTex-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-a + AddVLQSelection(lep_prefix+"6jin-4bin-1fjin-0Lex-1VTex-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-b + AddVLQSelection(lep_prefix+"6jin-4bin-1fjin-2VLTin-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-c - //AddVLQSelection("c-1lep-6jin-3bin-1fjin-0Tex-1Lin-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR4-b - //AddVLQSelection("c-1lep-6jin-3bin-1fjin-1VLTin-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-c + //AddVLQSelection(lep_prefix+"6jin-3bin-1fjin-0Tex-1Lin-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); //SR4-b + //AddVLQSelection(lep_prefix+"6jin-3bin-1fjin-1VLTin-1Hin", do_runop, do_syst, SINGLEVLQ); //SR4-c - // AddVLQSelection("c-1lep-6jin-2bex-1fjin-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR5 - // AddVLQSelection("c-1lep-6jin-3bin-1fjin-0Tex-1Lin-1Hin-1Vin", do_runop, do_syst, SINGLEVLQ); //SR6 + // AddVLQSelection(lep_prefix+"6jin-2bex-1fjin-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); //SR5 + // AddVLQSelection(lep_prefix+"6jin-3bin-1fjin-0Tex-1Lin-1Hin-1Vin", do_runop, do_syst, SINGLEVLQ); //SR6 /* // Validation regions // SR1-a - AddVLQSelection("c-1lep-3_5jwin-1_2bwin-0fjex-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); - AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-1Tin-0Hex-0Vex", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"3_5jwin-1_2bwin-0fjex-0Tex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"3_5jwin-1_2bwin-1fjin-1Tin-0Hex-0Vex", do_runop, do_syst, SINGLEVLQ); //SR1-b - AddVLQSelection("c-1lep-3_5jwin-1_2bwin-0fjex-0Tex-1Lin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); - AddVLQSelection("c-1lep-3_5jwin-1_2bwin-1fjin-1Tin-0Lex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"3_5jwin-1_2bwin-0fjex-0Tex-1Lin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"3_5jwin-1_2bwin-1fjin-1Tin-0Lex-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); // SR2-a - // AddVLQSelection("c-1lep-3_5jwin-3bin-0fjex-0Tex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); - // AddVLQSelection("c-1lep-3_5jwin-3bin-1fjin-1Tin-0Hex-0Vex", do_runop, do_syst, SINGLEVLQ); + // AddVLQSelection(lep_prefix+"3_5jwin-3bin-0fjex-0Tex-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); + // AddVLQSelection(lep_prefix+"3_5jwin-3bin-1fjin-1Tin-0Hex-0Vex", do_runop, do_syst, SINGLEVLQ); // SR2-b - AddVLQSelection("c-1lep-3_5jwin-3bin-0fjex-0Tex-1Lin-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); - AddVLQSelection("c-1lep-3_5jwin-3bin-1fjin-1Tin-0Lex-0Hex-0Vex", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"3_5jwin-3bin-0fjex-0Tex-1Lin-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"3_5jwin-3bin-1fjin-1Tin-0Lex-0Hex-0Vex", do_runop, do_syst, SINGLEVLQ); // SR3-a - AddVLQSelection("c-1lep-6jin-2bex-0fjex-2VTin-0Hex", do_runop, do_syst, SINGLEVLQ); - AddVLQSelection("c-1lep-6jin-2bex-1fjin-1Tex-0Hex-0Vex", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"6jin-2bex-0fjex-2VTin-0Hex", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"6jin-2bex-1fjin-1Tex-0Hex-0Vex", do_runop, do_syst, SINGLEVLQ); // SR3-b - AddVLQSelection("c-1lep-6jin-2bex-0fjex-1LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); - AddVLQSelection("c-1lep-6jin-2bex-1fjin-1LTin-0Hex-0Vex", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"6jin-2bex-0fjex-1LTin-0Hex-1Vin", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"6jin-2bex-1fjin-1LTin-0Hex-0Vex", do_runop, do_syst, SINGLEVLQ); // SR4-a - AddVLQSelection("c-1lep-6jin-3bin-0fjex-1VTin-1Hin", do_runop, do_syst, SINGLEVLQ); - AddVLQSelection("c-1lep-6jin-3bin-1fjin-1VTin-0Hex", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"6jin-3bin-0fjex-1VTin-1Hin", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"6jin-3bin-1fjin-1VTin-0Hex", do_runop, do_syst, SINGLEVLQ); // SR4-b - AddVLQSelection("c-1lep-6jin-3bin-0fjex-0Tex-1Lin-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); - AddVLQSelection("c-1lep-6jin-3bin-1fjin-0Tex-1Lin-0Hex-0Vex", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"6jin-3bin-0fjex-0Tex-1Lin-1Hin-0Vex", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"6jin-3bin-1fjin-0Tex-1Lin-0Hex-0Vex", do_runop, do_syst, SINGLEVLQ); // SR4-c - AddVLQSelection("c-1lep-6jin-3bin-0fjex-1VLTin-1Hin", do_runop, do_syst, SINGLEVLQ); - AddVLQSelection("c-1lep-6jin-3bin-1fjin-1VLTin-0Hex", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"6jin-3bin-0fjex-1VLTin-1Hin", do_runop, do_syst, SINGLEVLQ); + AddVLQSelection(lep_prefix+"6jin-3bin-1fjin-1VLTin-0Hex", do_runop, do_syst, SINGLEVLQ); */ }//Single VLQ regions @@ -433,19 +455,6 @@ bool VLQ_Selector::Init(){ std::vector<std::string> boostlist_0L_lowb{}; std::vector<std::string> boostlist_0L_highb{}; - if(m_opt->DoOldBoost()){ - std::vector<std::string> boostlist_old = {"2Min", "1Min", "1Mex", "0Mex", "3Jin", "2Jin", "2Jex", "1Jex", "0Jex"}; - if(m_opt->DoOneLeptonAna()){ - boostlist_1L_default.insert(boostlist_1L_default.end(), boostlist_old.begin(), boostlist_old.end()); - boostlist_1L_valid_4b.insert(boostlist_1L_valid_4b.end(), boostlist_old.begin(), boostlist_old.end()); - } - - if(m_opt->DoZeroLeptonAna()){ - boostlist_0L_lowb.insert(boostlist_0L_lowb.end(), boostlist_old.begin(), boostlist_old.end()); - boostlist_0L_highb.insert(boostlist_0L_highb.end(), boostlist_old.begin(), boostlist_old.end()); - } - }//OldBoost - if(m_opt->DoNewFullBoost()){ std::vector<std::string> boostlist_new = { "2Tin-2Hin", "2Tin-1Hex", "2Tin-0Hex", @@ -466,9 +475,9 @@ 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()){ boostlist_0L_valid_lowb.insert(boostlist_0L_valid_lowb.end(), boostlist_supermerge.begin(), boostlist_supermerge.end()); boostlist_0L_lowb.insert(boostlist_0L_lowb.end(), boostlist_supermerge.begin(), boostlist_supermerge.end()); @@ -483,46 +492,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 = { + /* + 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_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_valid_4b = { + /* + 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()); } @@ -535,7 +544,7 @@ bool VLQ_Selector::Init(){ std::set<std::string> boostset_0L_lowb(boostlist_0L_lowb.begin(), boostlist_0L_lowb.end()); std::set<std::string> boostset_0L_valid_lowb(boostlist_0L_valid_lowb.begin(), boostlist_0L_valid_lowb.end()); std::set<std::string> boostset_0L_highb(boostlist_0L_highb.begin(), boostlist_0L_highb.end()); - + //0-lepton analysis regions if(m_opt->DoZeroLeptonAna()){ std::vector<std::string> jet_analist_0L{}; @@ -561,27 +570,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( (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{ continue; } //FIXME: No low-b analysis regions right now - */ - AddVLQSelection("c-0lep-"+jet+"-"+bjet, false/*do_runop*/, false/*do_syst*/, PRESEL); + /* + 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( (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{ continue; } //FIXME: No low-b analysis regions right now + */ + AddVLQSelection(nolep_prefix+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 + AddVLQSelection(nolep_prefix+boost+"-"+jet+"-"+bjet+mtb, do_runop, do_syst, reg_type); + if(m_opt->ApplyMetSignificanceCut() && (bjet=="2bex") ){ + AddVLQSelection(nolep_prefix+boost+"-"+jet+"-"+bjet+mtb+"-HighMetSig", do_runop, do_syst, reg_type); + }//metsig }//mtb split }//boost list @@ -591,41 +600,29 @@ bool VLQ_Selector::Init(){ //One-lepton analysis regions if(m_opt->DoOneLeptonAna()){ - + for( const std::string& bjet : bjet_analist ){ - AddVLQSelection("c-1lep-6jin-"+bjet, false/*do_runop*/, false/*do_syst*/, PRESEL); - AddVLQSelection("c-1lep-5jex-"+bjet, false/*do_runop*/, false/*do_syst*/, PRESEL); + AddVLQSelection(lep_prefix+"6jin-"+bjet, false/*do_runop*/, false/*do_syst*/, PRESEL); + AddVLQSelection(lep_prefix+"5jex-"+bjet, false/*do_runop*/, false/*do_syst*/, PRESEL); for(const std::string& channel : ch_lep){ for( const std::string& boost : boostset_1L_default){ //Fit regions - AddVLQSelection("c-1lep-"+boost+"-6jin-"+bjet+channel, true, true, FIT); + AddVLQSelection(lep_prefix+boost+"-6jin-"+bjet+channel, true, true, FIT); if(bjet != "4bin"){ //Validation regions - AddVLQSelection("c-1lep-"+boost+"-5jex-"+bjet+channel, true, true, VALIDATION); + AddVLQSelection(lep_prefix+boost+"-5jex-"+bjet+channel, true, true, VALIDATION); } }//Default boost merging if(bjet == "4bin"){ //Validation regions for( const std::string& boost : boostset_1L_valid_4b){ - AddVLQSelection("c-1lep-"+boost+"-5jex-"+bjet+channel, true, true, VALIDATION); + AddVLQSelection(lep_prefix+boost+"-5jex-"+bjet+channel, true, true, VALIDATION); } }//Special merging for 4b validation regions - if(m_opt->DoSplitMbb() && m_opt->DoOldBoost()){ - - for( const std::string& boost : {"0Mex", "1Mex", "2Min"}){ - for(const std::string& jet : {"5jex", "6jin"}){ - const int reg_type = (jet=="5jex") ? VALIDATION : FIT; - - AddVLQSelection("c-1lep-"+boost+"-"+jet+"-"+bjet+"-"+"LowMbb"+channel, true, true, reg_type); - AddVLQSelection("c-1lep-"+boost+"-"+jet+"-"+bjet+"-"+"HighMbb"+channel, true, true, reg_type); - } - } - }//Splitting by Mbb for older boost categories - }//ana bjet channels }//lepton channel }//1-lepton @@ -709,7 +706,7 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name) SelProp* sprop_Mbb = NULL; SelProp* sprop_Mtb = NULL; SelProp* sprop_MetSig = NULL; - + SelProp* sprop_MLL = NULL; do{ pos = AnalysisUtils::ParseString(_name_, _parts_, "-"); AnalysisUtils::TrimString(_parts_); bool found = false; @@ -717,8 +714,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; @@ -726,8 +723,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; @@ -735,8 +732,8 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name) //=============== Fwd-jet part ======================== for(SelProp& fwdjetprop : *m_sel_fwdjet_prop){ if(fwdjetprop.name == _parts_){ - sprop_fwdjet = &fwdjetprop; - found = true; n_nodes++; break; + sprop_fwdjet = &fwdjetprop; + found = true; n_nodes++; break; } } if(found) continue; @@ -744,8 +741,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; @@ -753,8 +750,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; @@ -762,8 +759,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; @@ -771,8 +768,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; @@ -780,8 +777,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; @@ -789,8 +786,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; @@ -798,8 +795,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 +804,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 +814,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 = <prop; - found = true; n_nodes++; break; + sprop_LT = <prop; + found = true; n_nodes++; break; } } if(found) continue; @@ -826,8 +823,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 +832,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; @@ -844,8 +841,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; @@ -853,15 +850,22 @@ 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; + } + } + //=============== MLL selection part ======================== + for(SelProp& MLLprop : *m_sel_MLL_prop){ + if(MLLprop.name == _parts_){ + sprop_MLL = &MLLprop; + found = true; n_nodes++; break; } } if(found) continue; @@ -895,6 +899,7 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name) if(n_nodes <= 1){ ;//no ancestors added for a top selection } + else if( (sel_name.find("_el") == sel_name.size()-3) || (sel_name.find("_mu") == sel_name.size()-3) ){ if(sel_name.find("_el") != std::string::npos){ AddAncestor(*sel, sel_name.substr(0, sel_name.find("_el")), true); @@ -904,10 +909,28 @@ Selection* VLQ_Selector::MakeSelection(const int index, const std::string& name) AddAncestor(*sel, sel_name.substr(0, sel_name.find("_mu")), true); SelectorBase::AddAncestor(*sel, c_1mu_chan); } + } + else if( (sel_name.find("_ee") == sel_name.size()-3) || (sel_name.find("_mumu") == sel_name.size()-5) + || (sel_name.find("_emu") == sel_name.size()-4) ){ + if(sel_name.find("_ee") != std::string::npos){ + AddAncestor(*sel, sel_name.substr(0, sel_name.find("_ee")), true); + SelectorBase::AddAncestor(*sel, c_ee_chan); + } + else if(sel_name.find("_mumu") != std::string::npos){ + AddAncestor(*sel, sel_name.substr(0, sel_name.find("_mumu")), true); + SelectorBase::AddAncestor(*sel, c_mumu_chan); + } + else if(sel_name.find("_emu") != std::string::npos){ + AddAncestor(*sel, sel_name.substr(0, sel_name.find("_emu")), true); + SelectorBase::AddAncestor(*sel, c_emu_chan); + } + }//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) ){ + 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_MLL) ){ if(sprop_jet->primanc_name.empty()){ SelectorBase::AddAncestors(*sel, {sprop_lep->index, sprop_jet->index}, sprop_lep->index); @@ -919,18 +942,19 @@ 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 || sprop_MLL) ){ 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); SelectorBase::AddAncestors(*sel, {sprop_lep->index, sprop_jet->index, sprop_bjet->index}); } } //Lep + jet + bjet - else if( !(sprop_Mbb || sprop_Mtb || sprop_MetSig) ){ + else if( !(sprop_Mbb || sprop_Mtb || sprop_MetSig || sprop_MLL) ){ AddAncestor(*sel, "c-"+sprop_lep->name+"-"+sprop_jet->name+"-"+sprop_bjet->name, true); if(sprop_J){ SelectorBase::AddAncestor(*sel, sprop_J->index); } @@ -954,65 +978,67 @@ 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_MetSig || sprop_MLL) ){ + AddAncestor(*sel, "c-" + sprop_lep->name + "-" + s_boost + "-" + sprop_jet->name + "-" + sprop_bjet->name, true); + if(sprop_Mbb){ + SelectorBase::AddAncestor(*sel, sprop_Mbb->index); + } + else if(sprop_Mtb){ + SelectorBase::AddAncestor(*sel, sprop_Mtb->index); + } }//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); - }//Lep-jet-bjet-boost-mt[b]b-metsig + 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); + if(sprop_MetSig){ + SelectorBase::AddAncestor(*sel, sprop_MetSig->index); + } + if(sprop_MLL){ + SelectorBase::AddAncestor(*sel, sprop_MLL->index); + } + }//Lep-jet-bjet-boost-mt[b]b-metsig-mll }//post-boost if(m_opt->MsgLevel() == Debug::DEBUG){ std::cout<<" Selection "<<sel_name<<" successfully added"<<std::endl; } - }//if not el or mu channel return sel; @@ -1038,6 +1064,21 @@ bool VLQ_Selector::PassSelection(const int index){ else if(index == c_1mu_chan){ pass = (m_outData->o_channel_type == VLQ_Enums::MUON); } + + else if(index == c_2l_chan){ + pass = (m_outData->o_channel_type == VLQ_Enums::ELEL) || (m_outData->o_channel_type == VLQ_Enums::MUMU) + || (m_outData->o_channel_type == VLQ_Enums::ELMU) ; + } + else if(index == c_ee_chan){ + pass = (m_outData->o_channel_type == VLQ_Enums::ELEL); + } + else if(index == c_mumu_chan){ + pass = (m_outData->o_channel_type == VLQ_Enums::MUMU); + } + else if(index == c_emu_chan){ + pass = (m_outData->o_channel_type == VLQ_Enums::ELMU); + } + else if(index == c_0l_chan){ pass = (m_outData->o_channel_type == VLQ_Enums::FULLHAD); } @@ -1066,6 +1107,13 @@ bool VLQ_Selector::PassSelection(const int index){ pass = (m_outData->o_metsig_ev > 10.); } + //==== MLL ====== + else if(index == c_HighMLL){ + pass = (m_outData->o_mll > 15.); + } + else if(index == c_ZwinMLL){ + pass = (fabs(m_outData->o_mll-91.) < 10.); + } //=========== Jet multiplicities ==================== else if(index == c_3jex){ pass = (m_outData->o_jets_n == 3); } diff --git a/Root/VLQ_TRFManager.cxx b/Root/VLQ_TRFManager.cxx index ebf09801c9344424d418e5c9f4efcc4a8350b2fc..7176bf27d232ffb9fe932543df8133ac1aefb820 100644 --- a/Root/VLQ_TRFManager.cxx +++ b/Root/VLQ_TRFManager.cxx @@ -31,7 +31,7 @@ void VLQ_TRFManager::Init(){ if(m_opt -> MsgLevel() == Debug::DEBUG){ std::cout << "In VLQ_TRFManager constructor: Creating TRF Object" << std::endl; } - m_trfint = new TRFinterface("FixedCutBEff_"+m_opt->BtagOP(),//b-tag OP + m_trfint = new TRFinterface(m_opt->BtagOP(),//b-tag OP "AntiKt4EMTopoJets",//jet collection m_opt->TRFCDIPath(),//CDI file false, //ignore SF diff --git a/VLQAnalysis/VLQ_Enums.h b/VLQAnalysis/VLQ_Enums.h index 8cf0bb8a5eb9fff3385b11fe3f50c0a38bae3914..170d4818642492866206b89c9d5b71fef11b915d 100644 --- a/VLQAnalysis/VLQ_Enums.h +++ b/VLQAnalysis/VLQ_Enums.h @@ -27,7 +27,10 @@ namespace VLQ_Enums { UNDEFINED = 0, ELECTRON = 1, MUON = 2, - FULLHAD = 3 + ELEL = 3, + MUMU = 4, + ELMU = 5, + FULLHAD = 6 }; enum TriggerType { diff --git a/VLQAnalysis/VLQ_NtupleData.h b/VLQAnalysis/VLQ_NtupleData.h index 70662ef2f3f3dc9e91e8ed98f5da2247dd82a2b2..db48bd719cdf2f2df8a54e1f0b04a9e780094af4 100644 --- a/VLQAnalysis/VLQ_NtupleData.h +++ b/VLQAnalysis/VLQ_NtupleData.h @@ -75,6 +75,7 @@ public: std::vector<float> *d_fwdjet_E; std::vector<double> *d_fwdjet_btag_weight; std::vector<float> *d_fwdjet_jvt; + std::vector<float> *d_fwdjet_fJvt; std::vector<int> *d_fwdjet_truthLabel; std::vector<int> *d_fwdjet_isSignal; std::vector<int> *d_fwdjet_passOR; diff --git a/VLQAnalysis/VLQ_Options.h b/VLQAnalysis/VLQ_Options.h index bdd4b88e5976972183843d43f06de51fe8aca94b..68c8a1fbc6b5e5ec77c1f67d661d4f8cbb646dbc 100644 --- a/VLQAnalysis/VLQ_Options.h +++ b/VLQAnalysis/VLQ_Options.h @@ -61,6 +61,7 @@ public: inline bool UseLargeRJets() const { return m_useLargeRJets; } inline bool DoCutFlow() const { return m_doCutFlow; } inline bool DoOneLeptonAna() const { return m_doOneLeptonAna; } + inline bool DoTwoLeptonAna() const { return m_doTwoLeptonAna; } inline bool DoZeroLeptonAna() const { return m_doZeroLeptonAna; } // inline bool DoPreselRegions() const { return m_doPreselRegions; } inline bool DoSingleVLQPreselection() const { return m_doSingleVLQPreselection; } @@ -153,6 +154,7 @@ private: bool m_useLargeRJets; bool m_doCutFlow; bool m_doOneLeptonAna; + bool m_doTwoLeptonAna; bool m_doZeroLeptonAna; bool /*m_doPreselRegions,*/ m_doSingleVLQPreselection, m_doPairVLQPreselection, diff --git a/VLQAnalysis/VLQ_OutputData.h b/VLQAnalysis/VLQ_OutputData.h index eed0149656d32b4a306427ec70cb8c9a7ac3a083..a0df88cbfa86c0b549ed3cb34404dda23ed484eb 100644 --- a/VLQAnalysis/VLQ_OutputData.h +++ b/VLQAnalysis/VLQ_OutputData.h @@ -50,6 +50,7 @@ public: double o_met; double o_mtwl; double o_ptwl; + double o_mll; double o_hthad; double o_hthadRC; double o_hthadRCtag; diff --git a/VLQAnalysis/VLQ_Selector.h b/VLQAnalysis/VLQ_Selector.h index 654e8a603f9470120cc8b36d8d3be55ef2a64ec4..053b373dc3e470731949abe5b271b84e9f6ca8ca 100644 --- a/VLQAnalysis/VLQ_Selector.h +++ b/VLQAnalysis/VLQ_Selector.h @@ -28,8 +28,10 @@ public: enum VLQSelFlags{DOSYST=DOTREE+1,PRESEL,SINGLEVLQ,PAIRVLQ,VALIDATION,FIT,ONELEP,ZEROLEP}; //=========== Top selections ========================= - enum VLQTopSels{ c_1l_chan=1, c_1el_chan, c_1mu_chan, c_0l_chan, - c_all, + enum VLQTopSels{ c_all=1, + c_1l_chan, c_1el_chan, c_1mu_chan, + c_2l_chan, c_ee_chan, c_mumu_chan, c_emu_chan, + c_0l_chan, /*jet multiplicities*/ c_2jin, c_3jin, c_3jex, c_3_5jwin, c_4jex, c_5jex, c_6jex, c_7jex, c_8jex, c_6_8jwin, @@ -60,7 +62,7 @@ public: /*V+L+T multiplicities*/ c_0VLTex, c_1VLTex, c_1VLTin, c_2VLTin, /*Kinematic cuts*/ - c_LowMtbmin, c_HighMtbmin, c_LowMbb, c_HighMbb, c_HighMetSig, c_LowMetSig, TOPSEL_MAX + c_LowMtbmin, c_HighMtbmin, c_LowMbb, c_HighMbb, c_HighMetSig, c_LowMetSig, c_HighMLL, c_ZwinMLL, TOPSEL_MAX }; @@ -122,6 +124,7 @@ public: std::vector<SelProp>* m_sel_Mbb_prop; std::vector<SelProp>* m_sel_Mtb_prop; std::vector<SelProp>* m_sel_MetSig_prop; + std::vector<SelProp>* m_sel_MLL_prop; std::ifstream m_blinding_config; //int m_nsel; diff --git a/data/samples_info_tag-21.2.67-0-fJvt-DL1.mc16a.dat b/data/samples_info_tag-21.2.67-0-fJvt-DL1.mc16a.dat new file mode 100644 index 0000000000000000000000000000000000000000..873de49f7c6cdfe9c5c788f4b26f8d75b527ecb9 --- /dev/null +++ b/data/samples_info_tag-21.2.67-0-fJvt-DL1.mc16a.dat @@ -0,0 +1,129 @@ +# +# +# Path to files: /nfs/at3/scratch2/farooque/MBJOutputs/tag-21.2.67-0-fJvt/DL1/ +# Date: 2019_09_24_0944 +# Histogram used to normalize: cut_flow +# +# +410470.mc16a 86329600711.37488 452.3464774336864 +407342.mc16a 1424639338.3170166 0.5095361759984895 +407343.mc16a 5756317742.167603 2.95832079199123 +407344.mc16a 7246379659.205994 21.32715815993678 +364170.mc16a 16788422.983433984 15324.216355601999 +364171.mc16a 5679456.922066647 2428.4862755999998 +364172.mc16a 10553785.923033781 832.2037582319999 +364173.mc16a 5415989.611952713 618.6973679686799 +364174.mc16a 3760767.332419059 224.00317771524 +364175.mc16a 8029891.544809276 94.88757384414 +364176.mc16a 6234702.265768298 197.307201861 +364177.mc16a 9528510.595714519 94.962584178 +364178.mc16a 18433491.262349915 35.910950977439995 +364179.mc16a 4378414.323111284 38.34053260883999 +364180.mc16a 2812495.500159416 22.364320275989996 +364181.mc16a 2873526.187812444 9.586344844692 +364182.mc16a 6085450.809471808 14.598599399999998 +364183.mc16a 4129139.921382189 1.1976148800000002 +364156.mc16a 16783367.71521499 15317.8576551 +364157.mc16a 5726997.700749142 2435.729944032 +364158.mc16a 10559843.078788698 828.8801421516 +364159.mc16a 5482207.91320644 618.5647247472 +364160.mc16a 3739738.716532326 223.35841325951998 +364161.mc16a 8101688.300630657 77.479415244 +364162.mc16a 6228867.748728445 197.79329214413997 +364163.mc16a 9512303.278907686 96.4494137376 +364164.mc16a 18531580.76314757 36.345256660943996 +364165.mc16a 4376833.834797125 38.299835163744 +364166.mc16a 2813148.816152606 22.395646627199998 +364167.mc16a 2816636.726889219 8.768196432072 +364168.mc16a 6029336.825471029 14.558821199999999 +364169.mc16a 4108152.1357874125 1.19800296 +364184.mc16a 16819156.769012704 15324.88733622 +364186.mc16a 10626861.126148202 837.6280998624 +364187.mc16a 5496494.3806171445 619.44787491048 +364188.mc16a 3772484.908089432 222.59530293461998 +364189.mc16a 4026450.5208074925 95.34031806222 +364190.mc16a 12393699.045994757 197.35804480392 +364191.mc16a 8011502.004224883 93.89560207103999 +364192.mc16a 18537130.78417476 34.82262388836 +364193.mc16a 6569745.474769918 39.281122066032 +364194.mc16a 4214680.481690008 22.25461612374 +364195.mc16a 2872290.1204565056 9.490847272829999 +364196.mc16a 5998107.731048442 14.603450399999998 +364197.mc16a 4113124.759367764 1.1973238199999998 +364114.mc16a 5374833.0167511655 1587.0215945528 +364115.mc16a 2872880.276419831 219.99581160900001 +364116.mc16a 4110178.060184562 127.08321503919997 +364117.mc16a 2175375.4170209 74.90028453263999 +364118.mc16a 724681.6999146859 20.3159891025 +364119.mc16a 2083822.2855407787 12.738808005420001 +364120.mc16a 2996565.6191174244 24.419835672925 +364121.mc16a 2001395.9013305015 9.236812813011 +364122.mc16a 8626709.418257698 6.081007354100001 +364123.mc16a 1723396.1057260092 4.7969474232267 +364124.mc16a 918309.6249333983 2.249655316216 +364125.mc16a 1875662.6901882673 1.4944508339145 +364126.mc16a 2968474.179291472 1.7641509199999998 +364127.mc16a 1016520.8332891464 0.14504612500000003 +364100.mc16a 5372476.06854472 1588.4963084899998 +364101.mc16a 2871991.426143632 219.474347631 +364102.mc16a 4120985.3373376993 127.3100652285 +364103.mc16a 2166490.4418362915 73.42295186688 +364104.mc16a 732465.502557937 20.897287166699996 +364105.mc16a 2082263.9685920272 12.44678183959 +364106.mc16a 2974012.067161903 23.303793402540002 +364107.mc16a 1991088.3307372543 9.143665195889 +364108.mc16a 8646674.040882234 6.05591861616 +364109.mc16a 1427630.2489854293 4.657367095488799 +364110.mc16a 918652.6238898593 2.2148275320268995 +364111.mc16a 1880442.9321024213 1.4697257097894 +364112.mc16a 2980513.214440966 1.7425036999999999 +364113.mc16a 1017049.2935065031 0.14392476 +364128.mc16a 5376034.859370685 1612.6789640079999 +364129.mc16a 2869441.986585051 219.63438591850002 +364130.mc16a 4114442.115225237 127.10315612673 +364131.mc16a 2190964.0132290125 74.73901859424001 +364132.mc16a 731614.1690864876 20.5294394676 +364133.mc16a 2090757.1902140307 11.966186954862 +364135.mc16a 2001155.3521046278 9.303012849312 +364136.mc16a 3472626.201425271 6.171084868872 +364137.mc16a 1678900.3320766045 4.764891832735999 +364138.mc16a 918259.6501284568 2.2360613145023995 +364139.mc16a 1860875.9646869525 1.491237143214 +364140.mc16a 2978478.47471847 1.76278578 +364141.mc16a 1018271.2946459055 0.144568326 +410658.mc16a 177371127.73414174 44.154726000000004 +410659.mc16a 105687644.47309086 26.275157500000002 +410646.mc16a 189644620.31536865 35.84952 +410647.mc16a 189607897.91196442 35.8467585 +410644.mc16a 4056368.955808401 2.061459 +410645.mc16a 2537965.303387642 1.2885655799999998 +410155.mc16a 4110680.752181828 0.60084912 +410156.mc16a 232491.18038365245 0.1721166 +410157.mc16a 1425550.927701354 0.5863131 +410218.mc16a 52012.904244579375 0.04128880000000001 +410219.mc16a 52021.83777882159 0.04129216 +410220.mc16a 34220.875033184886 0.0409416 +410276.mc16a 6385.081647302955 0.0204176 +410277.mc16a 6380.906849391758 0.020410880000000003 +410278.mc16a 579.8894139712211 0.00219184 +345874.mc16a 1551390.035546273 0.22957963770000003 +345875.mc16a 474057.62611168064 0.055139999999999995 +363356.mc16a 3493297.569607314 2.20355112 +363357.mc16a 559370.3905766859 6.7951 +363358.mc16a 254404.24982877885 3.4328000000000003 +363359.mc16a 1076338.1368878877 24.708000000000002 +363360.mc16a 1080428.4093693169 24.724 +363489.mc16a 1124496.0669597378 11.42 +310778.mc16a 6908.508334308863 0.1 +311376.mc16a 1626.3709105551243 0.1 +311377.mc16a 4378.577824681997 0.1 +310777.mc16a 1669.7026533074677 0.1 +310776.mc16a 5320.767490193248 0.1 +306997.mc16a 199000.0 0.1 +310779.mc16a 1106.4673364162445 0.1 +307054.mc16a 200000.0 0.1 +311365.mc16a 200000.0 0.1 +307059.mc16a 200000.0 0.1 +307061.mc16a 100000.0 0.1 +307042.mc16a 197000.0 0.1 +307047.mc16a 189000.0 0.1 diff --git a/data/samples_info_tag-21.2.67-0-fJvt-DL1.mc16d.dat b/data/samples_info_tag-21.2.67-0-fJvt-DL1.mc16d.dat new file mode 100644 index 0000000000000000000000000000000000000000..8cff1741825debcefdd8a646027a7d108891c747 --- /dev/null +++ b/data/samples_info_tag-21.2.67-0-fJvt-DL1.mc16d.dat @@ -0,0 +1,118 @@ +# +# +# Path to files: /nfs/at3/scratch2/farooque/MBJOutputs/tag-21.2.67-0-fJvt/DL1/ +# Date: 2019_09_17_0950 +# Histogram used to normalize: cut_flow +# +# +410470.mc16d 100217957761.60278 452.3464774336864 +407342.mc16d 1747888273.2282104 0.5095361759984895 +407343.mc16d 7150336293.13562 2.95832079199123 +407344.mc16d 8906858971.933777 21.32715815993678 +364170.mc16d 20732831.654968683 15324.216355601999 +364171.mc16d 7152174.965797247 2428.4862755999998 +364172.mc16d 13185528.958004251 832.2037582319999 +364173.mc16d 6779036.612022326 618.6973679686799 +364174.mc16d 4686194.973897405 224.00317771524 +364175.mc16d 10054148.181599164 94.88757384414 +364176.mc16d 7733763.4854888655 197.307201861 +364177.mc16d 11975483.782908736 94.962584178 +364178.mc16d 23622685.385285657 35.910950977439995 +364179.mc16d 5259053.309356796 38.34053260883999 +364180.mc16d 3507553.8031311557 22.364320275989996 +364181.mc16d 3538269.9484084705 9.586344844692 +364182.mc16d 7522018.711002981 14.598599399999998 +364183.mc16d 9181308.679551005 1.1976148800000002 +364156.mc16d 20980416.12652493 15317.8576551 +364157.mc16d 7032248.816644446 2435.729944032 +364158.mc16d 13107422.277371798 828.8801421516 +364159.mc16d 6809091.182864059 618.5647247472 +364160.mc16d 4736031.708851198 223.35841325951998 +364161.mc16d 10251557.926743405 77.479415244 +364162.mc16d 7671069.993160637 197.79329214413997 +364163.mc16d 11965922.578568932 96.4494137376 +364164.mc16d 19595421.329191618 36.345256660943996 +364165.mc16d 5457432.74563455 38.299835163744 +364166.mc16d 3511511.9970141947 22.395646627199998 +364167.mc16d 3594065.7825383255 8.768196432072 +364168.mc16d 7537726.06146276 14.558821199999999 +364169.mc16d 5139781.52323699 1.19800296 +364184.mc16d 20991167.73853296 15324.88733622 +364185.mc16d 7153489.514357489 2446.723619802 +364186.mc16d 13264431.697058592 837.6280998624 +364187.mc16d 6799003.576742884 619.44787491048 +364188.mc16d 4704295.7505325135 222.59530293461998 +364189.mc16d 5038960.269808608 95.34031806222 +364190.mc16d 15569130.535491113 197.35804480392 +364191.mc16d 9985726.794827893 93.89560207103999 +364192.mc16d 23645222.953472972 34.82262388836 +364193.mc16d 8180294.068472981 39.281122066032 +364194.mc16d 5274270.253322026 22.25461612374 +364195.mc16d 3586555.9285339043 9.490847272829999 +364196.mc16d 7546298.144787088 14.603450399999998 +364197.mc16d 5121805.794290066 1.1973238199999998 +364114.mc16d 6719012.35031461 1587.0215945528 +364115.mc16d 3583695.6724392697 219.99581160900001 +364116.mc16d 5139202.169442051 127.08321503919997 +364117.mc16d 2702655.20994666 74.90028453263999 +364118.mc16d 907295.3193301978 20.3159891025 +364119.mc16d 2628718.293705561 12.738808005420001 +364120.mc16d 3744160.0568083622 24.419835672925 +364121.mc16d 2499776.7955379463 9.236812813011 +364122.mc16d 10889156.868336618 6.081007354100001 +364123.mc16d 2152620.70413427 4.7969474232267 +364124.mc16d 1147074.0964410082 2.249655316216 +364125.mc16d 2343737.9946358767 1.4944508339145 +364126.mc16d 3677712.001134162 1.7641509199999998 +364127.mc16d 1270333.509212494 0.14504612500000003 +364100.mc16d 6693737.228810846 1588.4963084899998 +364101.mc16d 3576209.472664592 219.474347631 +364102.mc16d 4717877.141645549 127.3100652285 +364103.mc16d 2717596.446847317 73.42295186688 +364104.mc16d 902414.3690206725 20.897287166699996 +364105.mc16d 2606755.7377836 12.44678183959 +364106.mc16d 3716021.1706106565 23.303793402540002 +364107.mc16d 2491777.660066071 9.143665195889 +364108.mc16d 10833133.075693833 6.05591861616 +364109.mc16d 2116546.384079381 4.657367095488799 +364110.mc16d 1145984.9755594395 2.2148275320268995 +364111.mc16d 2344779.0434629517 1.4697257097894 +364112.mc16d 3725326.760743403 1.7425036999999999 +364113.mc16d 1274067.2296616435 0.14392476 +364128.mc16d 6726281.149512045 1612.6789640079999 +364129.mc16d 3532960.237735696 219.63438591850002 +364130.mc16d 5137387.928968945 127.10315612673 +364131.mc16d 2755702.5985126654 74.73901859424001 +364132.mc16d 903049.705499231 20.5294394676 +364133.mc16d 1338312.7365541663 11.966186954862 +364134.mc16d 3734850.5381259616 24.59183946128 +364135.mc16d 2500529.8938449174 9.303012849312 +364136.mc16d 4324785.165015286 6.171084868872 +364137.mc16d 2155327.639876549 4.764891832735999 +364138.mc16d 1133852.6804158948 2.2360613145023995 +364139.mc16d 2343161.4162654895 1.491237143214 +364140.mc16d 3723236.2297408693 1.76278578 +364141.mc16d 1272900.203109026 0.144568326 +410658.mc16d 230476260.4708776 44.154726000000004 +410659.mc16d 132472573.49418662 26.275157500000002 +410646.mc16d 118052970.02194977 35.84952 +410647.mc16d 236691706.79514313 35.8467585 +410644.mc16d 5065597.106669903 2.061459 +410645.mc16d 3171824.083278179 1.2885655799999998 +410155.mc16d 4111925.0083904862 0.60084912 +410156.mc16d 232220.94164696336 0.1721166 +410157.mc16d 1585437.047315836 0.5863131 +410219.mc16d 49331.13402491063 0.04129216 +410220.mc16d 32785.08994945139 0.0409416 +410276.mc16d 6378.69163717702 0.0204176 +410277.mc16d 6385.645516723394 0.020410880000000003 +410278.mc16d 565.5066210089717 0.00219184 +345874.mc16d 2758683.1446843743 0.22957963770000003 +345875.mc16d 293429.8373513846 0.055139999999999995 +363355.mc16d 3490355.38164979 4.3079415999999995 +363356.mc16d 3493067.334427736 2.20355112 +363357.mc16d 555940.2063387907 6.7951 +363358.mc16d 1267165.2709668311 3.4328000000000003 +363359.mc16d 5370566.941446427 24.708000000000002 +363360.mc16d 2149924.584562771 24.724 +363489.mc16d 5628089.087317359 11.42 diff --git a/data/samples_info_tag-21.2.67-0-fJvt-DL1.mc16e.dat b/data/samples_info_tag-21.2.67-0-fJvt-DL1.mc16e.dat new file mode 100644 index 0000000000000000000000000000000000000000..7ed3749c12e25fb86f68f627112f3bbc98a81726 --- /dev/null +++ b/data/samples_info_tag-21.2.67-0-fJvt-DL1.mc16e.dat @@ -0,0 +1,114 @@ +# +# +# Path to files: /nfs/at3/scratch2/farooque/MBJOutputs/tag-21.2.67-0-fJvt/DL1/ +# Date: 2019_09_17_0953 +# Histogram used to normalize: cut_flow +# +# +410470.mc16e 133858077028.69019 452.3464774336864 +407342.mc16e 6138434567.3671875 0.5095361759984895 +407343.mc16e 7493853712.184937 2.95832079199123 +407344.mc16e 11953651623.202637 21.32715815993678 +364170.mc16e 27911952.372652557 15324.216355601999 +364171.mc16e 9510771.69890468 2428.4862755999998 +364172.mc16e 17769161.503225513 832.2037582319999 +364173.mc16e 9012384.3730582 618.6973679686799 +364174.mc16e 6278065.924517471 224.00317771524 +364175.mc16e 12491350.22966859 94.88757384414 +364176.mc16e 10421583.2661119 197.307201861 +364177.mc16e 15871433.723524138 94.962584178 +364178.mc16e 30839939.301806636 35.910950977439995 +364179.mc16e 7262765.666412178 38.34053260883999 +364180.mc16e 4669541.174297653 22.364320275989996 +364181.mc16e 4774962.662233636 9.586344844692 +364182.mc16e 9989635.619478885 14.598599399999998 +364183.mc16e 6857553.787731737 1.1976148800000002 +364156.mc16e 27891406.310241155 15317.8576551 +364157.mc16e 9507825.300200135 2435.729944032 +364158.mc16e 17513474.888650086 828.8801421516 +364159.mc16e 9077204.489510672 618.5647247472 +364160.mc16e 6028051.801757201 223.35841325951998 +364161.mc16e 13434928.073148537 77.479415244 +364162.mc16e 10439801.157056244 197.79329214413997 +364163.mc16e 15918364.7860627 96.4494137376 +364164.mc16e 30795290.64888697 36.345256660943996 +364165.mc16e 7277819.755885538 38.299835163744 +364166.mc16e 4674171.1153828595 22.395646627199998 +364167.mc16e 4780092.0348148 8.768196432072 +364168.mc16e 9991646.084691226 14.558821199999999 +364169.mc16e 6828577.429056138 1.19800296 +364184.mc16e 27945045.927947737 15324.88733622 +364185.mc16e 9527616.104189437 2446.723619802 +364186.mc16e 17644560.75967602 837.6280998624 +364187.mc16e 9111352.668959629 619.44787491048 +364188.mc16e 6248831.814641442 222.59530293461998 +364189.mc16e 10099506.171325658 95.34031806222 +364190.mc16e 20668245.913758177 197.35804480392 +364191.mc16e 13223272.61839131 93.89560207103999 +364192.mc16e 30910708.375011448 34.82262388836 +364193.mc16e 10921667.928664856 39.281122066032 +364194.mc16e 7017716.721964937 22.25461612374 +364195.mc16e 4773563.571976438 9.490847272829999 +364196.mc16e 10027886.219541289 14.603450399999998 +364197.mc16e 6818924.821220279 1.1973238199999998 +364114.mc16e 8917788.640627537 1587.0215945528 +364115.mc16e 4772097.831127533 219.99581160900001 +364116.mc16e 6830130.162783679 127.08321503919997 +364117.mc16e 3638099.621086968 74.90028453263999 +364118.mc16e 1208443.7459066021 20.3159891025 +364119.mc16e 3471145.110198727 12.738808005420001 +364120.mc16e 5011356.113882409 24.419835672925 +364121.mc16e 3323981.519727367 9.236812813011 +364122.mc16e 14437641.448529854 6.081007354100001 +364123.mc16e 2951583.7821916887 4.7969474232267 +364124.mc16e 1593508.8808104508 2.249655316216 +364125.mc16e 3083921.571990045 1.4944508339145 +364126.mc16e 4930255.9358734265 1.7641509199999998 +364127.mc16e 1697923.5854374766 0.14504612500000003 +364100.mc16e 8936223.69749164 1588.4963084899998 +364101.mc16e 4779260.689438459 219.474347631 +364103.mc16e 3615557.0648046397 73.42295186688 +364104.mc16e 1192954.520856347 20.897287166699996 +364106.mc16e 4929117.991469355 23.303793402540002 +364107.mc16e 3324229.03917229 9.143665195889 +364108.mc16e 14367137.174127037 6.05591861616 +364109.mc16e 2555087.624004475 4.657367095488799 +364110.mc16e 1531850.9662022581 2.2148275320268995 +364111.mc16e 3121481.584973544 1.4697257097894 +364112.mc16e 5078116.864055352 1.7425036999999999 +364113.mc16e 1622696.6512544751 0.14392476 +364128.mc16e 8932067.905398387 1612.6789640079999 +364129.mc16e 4771039.621597946 219.63438591850002 +364130.mc16e 6843571.442215623 127.10315612673 +364131.mc16e 3656688.450165033 74.73901859424001 +364132.mc16e 1209846.3939533927 20.5294394676 +364133.mc16e 3476879.5616393015 11.966186954862 +364134.mc16e 4966303.561057217 24.59183946128 +364135.mc16e 3329676.0495885755 9.303012849312 +364136.mc16e 5756186.477358049 6.171084868872 +364137.mc16e 2858152.852915926 4.764891832735999 +364138.mc16e 1532853.8918604166 2.2360613145023995 +364140.mc16e 4922786.759697786 1.76278578 +364141.mc16e 1697854.8654967546 0.144568326 +410658.mc16e 306995965.1772995 44.154726000000004 +410659.mc16e 184202839.55086434 26.275157500000002 +410646.mc16e 315046579.55454636 35.84952 +410647.mc16e 313730034.05451584 35.8467585 +410644.mc16e 6699455.012125969 2.061459 +410645.mc16e 4207585.823101759 1.2885655799999998 +410155.mc16e 6415852.652219474 0.60084912 +410156.mc16e 310260.3004670441 0.1721166 +410157.mc16e 1895730.984977007 0.5863131 +410218.mc16e 79922.39313930273 0.04128880000000001 +410219.mc16e 80098.10679871589 0.04129216 +410220.mc16e 35092.02892035991 0.0409416 +410276.mc16e 8518.29944318533 0.0204176 +410277.mc16e 8509.097548354417 0.020410880000000003 +410278.mc16e 398.2432826582808 0.00219184 +363355.mc16e 5795084.355500013 4.3079415999999995 +363356.mc16e 5798104.492057383 2.20355112 +363357.mc16e 928257.3438840844 6.7951 +363358.mc16e 421818.6744698011 3.4328000000000003 +363359.mc16e 1784626.7644427395 24.708000000000002 +363360.mc16e 1787130.816855038 24.724 +363489.mc16e 1873760.204523365 11.42 diff --git a/data/samples_info_tag-21.2.67-0-fJvt-MV2.mc16a.dat b/data/samples_info_tag-21.2.67-0-fJvt-MV2.mc16a.dat new file mode 100644 index 0000000000000000000000000000000000000000..2830e616ec0713c91f46746ed7a80df775114ca3 --- /dev/null +++ b/data/samples_info_tag-21.2.67-0-fJvt-MV2.mc16a.dat @@ -0,0 +1,130 @@ +# +# +# Path to files: /nfs/at3/scratch2/farooque/MBJOutputs/tag-21.2.67-0-fJvt/MV2/ +# Date: 2019_09_24_0954 +# Histogram used to normalize: cut_flow +# +# +410470.mc16a 87205814506.85889 452.3464774336864 +407342.mc16a 1424639338.3170166 0.5095361759984895 +407343.mc16a 5756317742.167603 2.95832079199123 +407344.mc16a 7246379659.205994 21.32715815993678 +364170.mc16a 16788422.98343398 15324.216355601999 +364171.mc16a 5679456.922066648 2428.4862755999998 +364172.mc16a 10553785.923033783 832.2037582319999 +364173.mc16a 5415989.611952713 618.6973679686799 +364174.mc16a 3760767.332419059 224.00317771524 +364175.mc16a 8029891.544809277 94.88757384414 +364176.mc16a 6234702.265768298 197.307201861 +364177.mc16a 9528510.595714517 94.962584178 +364178.mc16a 18433491.262349915 35.910950977439995 +364179.mc16a 4378414.323111284 38.34053260883999 +364180.mc16a 2812495.500159416 22.364320275989996 +364181.mc16a 2873526.187812444 9.586344844692 +364182.mc16a 6085450.809471808 14.598599399999998 +364183.mc16a 4129139.921382189 1.1976148800000002 +364156.mc16a 16783367.71521499 15317.8576551 +364157.mc16a 5726997.700749142 2435.729944032 +364158.mc16a 10559843.078788698 828.8801421516 +364159.mc16a 5482207.913206439 618.5647247472 +364160.mc16a 3739738.716532326 223.35841325951998 +364161.mc16a 8101688.300630657 77.479415244 +364162.mc16a 6228867.748728445 197.79329214413997 +364163.mc16a 9512303.278907686 96.4494137376 +364164.mc16a 18531580.763147574 36.345256660943996 +364165.mc16a 4376833.834797125 38.299835163744 +364166.mc16a 2813148.816152606 22.395646627199998 +364167.mc16a 2816636.726889219 8.768196432072 +364168.mc16a 6029336.825471029 14.558821199999999 +364169.mc16a 4108152.1357874125 1.19800296 +364184.mc16a 16819156.769012704 15324.88733622 +364186.mc16a 10626861.126148202 837.6280998624 +364187.mc16a 5496494.3806171445 619.44787491048 +364188.mc16a 3772484.908089432 222.59530293461998 +364189.mc16a 4026450.520807493 95.34031806222 +364190.mc16a 12393699.045994757 197.35804480392 +364191.mc16a 8011502.004224883 93.89560207103999 +364192.mc16a 18537130.78417476 34.82262388836 +364193.mc16a 6569745.474769918 39.281122066032 +364194.mc16a 4214680.481690008 22.25461612374 +364195.mc16a 2872290.1204565056 9.490847272829999 +364196.mc16a 5998107.731048442 14.603450399999998 +364197.mc16a 4113124.759367764 1.1973238199999998 +364114.mc16a 5374833.0167511655 1587.0215945528 +364115.mc16a 2872880.276419831 219.99581160900001 +364116.mc16a 4110178.0601845616 127.08321503919997 +364117.mc16a 2175375.4170209006 74.90028453263999 +364118.mc16a 724681.6999146859 20.3159891025 +364119.mc16a 2083822.285540779 12.738808005420001 +364120.mc16a 2996565.6191174244 24.419835672925 +364121.mc16a 2001395.9013305015 9.236812813011 +364122.mc16a 8626709.418257697 6.081007354100001 +364123.mc16a 1723396.1057260092 4.7969474232267 +364124.mc16a 918309.6249333983 2.249655316216 +364125.mc16a 1875662.6901882673 1.4944508339145 +364126.mc16a 2968474.179291472 1.7641509199999998 +364127.mc16a 1016520.8332891464 0.14504612500000003 +364100.mc16a 5372476.06854472 1588.4963084899998 +364101.mc16a 2871991.426143632 219.474347631 +364102.mc16a 4120985.3373376993 127.3100652285 +364103.mc16a 2166490.4418362915 73.42295186688 +364104.mc16a 732465.502557937 20.897287166699996 +364105.mc16a 2082263.9685920272 12.44678183959 +364106.mc16a 2974012.067161903 23.303793402540002 +364107.mc16a 1991088.3307372543 9.143665195889 +364108.mc16a 8646674.040882234 6.05591861616 +364109.mc16a 1728411.3116012672 4.657367095488799 +364110.mc16a 918652.6238898593 2.2148275320268995 +364111.mc16a 1880442.9321024213 1.4697257097894 +364112.mc16a 2980513.214440966 1.7425036999999999 +364113.mc16a 1017049.2935065031 0.14392476 +364128.mc16a 5376034.859370685 1612.6789640079999 +364129.mc16a 2869441.986585051 219.63438591850002 +364130.mc16a 4114442.115225237 127.10315612673 +364131.mc16a 2190964.0132290125 74.73901859424001 +364132.mc16a 731614.1690864876 20.5294394676 +364133.mc16a 2090757.1902140307 11.966186954862 +364134.mc16a 2959723.056789671 24.59183946128 +364135.mc16a 2001155.3521046278 9.303012849312 +364136.mc16a 3472626.201425271 6.171084868872 +364137.mc16a 1678900.3320766045 4.764891832735999 +364138.mc16a 918259.6501284568 2.2360613145023995 +364139.mc16a 1860875.9646869525 1.491237143214 +364140.mc16a 2183993.96640135 1.76278578 +364141.mc16a 1018271.2946459055 0.144568326 +410658.mc16a 177371127.73414174 44.154726000000004 +410659.mc16a 105687644.47309086 26.275157500000002 +410646.mc16a 189644620.31536865 35.84952 +410647.mc16a 189607897.91196442 35.8467585 +410644.mc16a 4056368.955808401 2.061459 +410645.mc16a 2537965.303387642 1.2885655799999998 +410155.mc16a 4110680.752181828 0.60084912 +410156.mc16a 232491.18038365245 0.1721166 +410157.mc16a 1583158.6200356483 0.5863131 +410218.mc16a 52012.904244579375 0.04128880000000001 +410219.mc16a 52021.83777882159 0.04129216 +410220.mc16a 34220.875033184886 0.0409416 +410276.mc16a 6385.081647302955 0.0204176 +410277.mc16a 6380.906849391758 0.020410880000000003 +410278.mc16a 579.8894139712211 0.00219184 +345874.mc16a 3190303.2606038153 0.22957963770000003 +345875.mc16a 474057.62611168064 0.055139999999999995 +363356.mc16a 3493297.5696073147 2.20355112 +363357.mc16a 559370.3905766859 6.7951 +363358.mc16a 254404.24982877885 3.4328000000000003 +363359.mc16a 1076338.136887888 24.708000000000002 +363360.mc16a 1080428.4093693169 24.724 +363489.mc16a 1124496.0669597378 11.42 +310778.mc16a 6908.508334308863 0.1 +311376.mc16a 1626.3709105551243 0.1 +311377.mc16a 4378.577824681997 0.1 +310777.mc16a 1669.7026533074677 0.1 +310776.mc16a 5320.767490193248 0.1 +306997.mc16a 199000.0 0.1 +310779.mc16a 1106.4673364162445 0.1 +307054.mc16a 200000.0 0.1 +311365.mc16a 200000.0 0.1 +307059.mc16a 200000.0 0.1 +307061.mc16a 100000.0 0.1 +307042.mc16a 197000.0 0.1 +307047.mc16a 189000.0 0.1 diff --git a/data/samples_info_tag-21.2.67-0-fJvt-MV2.mc16d.dat b/data/samples_info_tag-21.2.67-0-fJvt-MV2.mc16d.dat new file mode 100644 index 0000000000000000000000000000000000000000..8f1a7cdbc2a5119f6e51cc2390e3ba476c0d7af0 --- /dev/null +++ b/data/samples_info_tag-21.2.67-0-fJvt-MV2.mc16d.dat @@ -0,0 +1,119 @@ +# +# +# Path to files: /nfs/at3/scratch2/farooque/MBJOutputs/tag-21.2.67-0-fJvt/MV2/ +# Date: 2019_09_17_0947 +# Histogram used to normalize: cut_flow +# +# +410470.mc16d 109034065946.99658 452.3464774336864 +407342.mc16d 1747888273.2282104 0.5095361759984895 +407343.mc16d 7150336293.13562 2.95832079199123 +407344.mc16d 8906858971.933777 21.32715815993678 +364170.mc16d 20732831.65496868 15324.216355601999 +364171.mc16d 7152174.965797249 2428.4862755999998 +364172.mc16d 13185528.958004255 832.2037582319999 +364173.mc16d 6779036.612022325 618.6973679686799 +364174.mc16d 4686194.973897405 224.00317771524 +364175.mc16d 10054148.181599164 94.88757384414 +364176.mc16d 7733763.4854888655 197.307201861 +364177.mc16d 11975483.782908736 94.962584178 +364178.mc16d 23622685.385285653 35.910950977439995 +364179.mc16d 5259053.309356796 38.34053260883999 +364180.mc16d 3507553.8031311557 22.364320275989996 +364181.mc16d 3538269.9484084705 9.586344844692 +364182.mc16d 7522018.711002981 14.598599399999998 +364183.mc16d 9181308.679551005 1.1976148800000002 +364156.mc16d 20980416.12652493 15317.8576551 +364157.mc16d 7032248.816644445 2435.729944032 +364158.mc16d 13107422.277371796 828.8801421516 +364159.mc16d 6809091.182864059 618.5647247472 +364160.mc16d 4736031.708851198 223.35841325951998 +364161.mc16d 10251557.926743405 77.479415244 +364162.mc16d 7671069.993160637 197.79329214413997 +364163.mc16d 11965922.578568932 96.4494137376 +364164.mc16d 19595421.329191618 36.345256660943996 +364165.mc16d 5457432.74563455 38.299835163744 +364166.mc16d 3511511.9970141947 22.395646627199998 +364167.mc16d 3594065.7825383255 8.768196432072 +364168.mc16d 7537726.06146276 14.558821199999999 +364169.mc16d 5139781.52323699 1.19800296 +364184.mc16d 20991167.73853296 15324.88733622 +364185.mc16d 7153489.514357489 2446.723619802 +364186.mc16d 13264431.697058592 837.6280998624 +364187.mc16d 6799003.576742884 619.44787491048 +364188.mc16d 4704295.7505325135 222.59530293461998 +364189.mc16d 5038960.269808608 95.34031806222 +364190.mc16d 15569130.535491113 197.35804480392 +364191.mc16d 9985726.794827893 93.89560207103999 +364192.mc16d 23645222.953472972 34.82262388836 +364193.mc16d 8180294.068472981 39.281122066032 +364194.mc16d 5274270.253322026 22.25461612374 +364195.mc16d 3586555.9285339043 9.490847272829999 +364196.mc16d 7546298.144787088 14.603450399999998 +364197.mc16d 5121805.794290066 1.1973238199999998 +364114.mc16d 6719012.350314611 1587.0215945528 +364115.mc16d 3583695.6724392697 219.99581160900001 +364116.mc16d 5139202.16944205 127.08321503919997 +364117.mc16d 2702655.20994666 74.90028453263999 +364118.mc16d 907295.3193301978 20.3159891025 +364119.mc16d 2628718.2937055607 12.738808005420001 +364120.mc16d 3744160.0568083622 24.419835672925 +364121.mc16d 2499776.7955379463 9.236812813011 +364122.mc16d 10889156.86833662 6.081007354100001 +364123.mc16d 2152620.70413427 4.7969474232267 +364124.mc16d 1147074.0964410082 2.249655316216 +364125.mc16d 2343737.9946358767 1.4944508339145 +364126.mc16d 3677712.001134162 1.7641509199999998 +364127.mc16d 1270333.509212494 0.14504612500000003 +364100.mc16d 6693737.228810846 1588.4963084899998 +364101.mc16d 3576209.472664592 219.474347631 +364102.mc16d 4966492.606712536 127.3100652285 +364103.mc16d 2717596.4468473163 73.42295186688 +364104.mc16d 902414.3690206725 20.897287166699996 +364105.mc16d 2606755.7377836 12.44678183959 +364106.mc16d 3716021.1706106565 23.303793402540002 +364107.mc16d 2491777.660066071 9.143665195889 +364108.mc16d 10833133.07569383 6.05591861616 +364109.mc16d 2116546.384079381 4.657367095488799 +364110.mc16d 1145984.9755594395 2.2148275320268995 +364111.mc16d 2344779.0434629517 1.4697257097894 +364112.mc16d 3725326.760743403 1.7425036999999999 +364113.mc16d 1274067.2296616435 0.14392476 +364128.mc16d 6726281.149512045 1612.6789640079999 +364129.mc16d 3532960.237735696 219.63438591850002 +364130.mc16d 5137387.928968945 127.10315612673 +364131.mc16d 2755702.5985126654 74.73901859424001 +364132.mc16d 903049.705499231 20.5294394676 +364133.mc16d 2628966.31477965 11.966186954862 +364134.mc16d 3734850.5381259616 24.59183946128 +364135.mc16d 2500529.8938449174 9.303012849312 +364136.mc16d 4324785.165015286 6.171084868872 +364137.mc16d 2155327.639876549 4.764891832735999 +364138.mc16d 1133852.6804158948 2.2360613145023995 +364139.mc16d 2343161.4162654895 1.491237143214 +364140.mc16d 3723236.2297408693 1.76278578 +364141.mc16d 1272900.203109026 0.144568326 +410658.mc16d 230476260.47087762 44.154726000000004 +410659.mc16d 132472573.49418662 26.275157500000002 +410646.mc16d 227499085.63306046 35.84952 +410647.mc16d 236691706.79514313 35.8467585 +410644.mc16d 5065597.106669903 2.061459 +410645.mc16d 3171824.083278179 1.2885655799999998 +410155.mc16d 4111925.0083904862 0.60084912 +410156.mc16d 232220.94164696336 0.1721166 +410157.mc16d 1585437.047315836 0.5863131 +410218.mc16d 43754.805960044265 0.04128880000000001 +410219.mc16d 49331.13402491063 0.04129216 +410220.mc16d 21859.75870911032 0.0409416 +410276.mc16d 6378.69163717702 0.0204176 +410277.mc16d 6385.645516723394 0.020410880000000003 +410278.mc16d 565.5066210089717 0.00219184 +345874.mc16d 2758683.1446843743 0.22957963770000003 +345875.mc16d 293429.8373513846 0.055139999999999995 +363355.mc16d 3490355.38164979 4.3079415999999995 +363356.mc16d 3493067.3344277362 2.20355112 +363357.mc16d 555940.2063387907 6.7951 +363358.mc16d 1267165.2709668314 3.4328000000000003 +363359.mc16d 5370566.941446427 24.708000000000002 +363360.mc16d 2149924.584562771 24.724 +363489.mc16d 5628089.087317359 11.42 diff --git a/data/samples_info_tag-21.2.67-0-fJvt-MV2.mc16e.dat b/data/samples_info_tag-21.2.67-0-fJvt-MV2.mc16e.dat new file mode 100644 index 0000000000000000000000000000000000000000..6b5d8bebdcc14ce5ce6f87204814308d04678f48 --- /dev/null +++ b/data/samples_info_tag-21.2.67-0-fJvt-MV2.mc16e.dat @@ -0,0 +1,115 @@ +# +# +# Path to files: /nfs/at3/scratch2/farooque/MBJOutputs/tag-21.2.67-0-fJvt/MV2/ +# Date: 2019_09_24_0959 +# Histogram used to normalize: cut_flow +# +# +410470.mc16e 140141457277.88916 452.3464774336864 +407342.mc16e 6343772119.003662 0.5095361759984895 +407343.mc16e 9450622306.472534 2.95832079199123 +407344.mc16e 11953651623.202637 21.32715815993678 +364170.mc16e 27911952.372652557 15324.216355601999 +364171.mc16e 9510771.698904678 2428.4862755999998 +364172.mc16e 17769161.503225517 832.2037582319999 +364173.mc16e 9012384.3730582 618.6973679686799 +364174.mc16e 6278065.924517471 224.00317771524 +364175.mc16e 12491350.229668591 94.88757384414 +364176.mc16e 10421583.266111897 197.307201861 +364177.mc16e 15871433.723524138 94.962584178 +364178.mc16e 30839939.30180663 35.910950977439995 +364179.mc16e 7262765.666412178 38.34053260883999 +364180.mc16e 4669541.174297653 22.364320275989996 +364181.mc16e 4774962.662233636 9.586344844692 +364182.mc16e 9989635.619478885 14.598599399999998 +364183.mc16e 6857553.787731737 1.1976148800000002 +364156.mc16e 27891406.310241155 15317.8576551 +364157.mc16e 9507825.300200135 2435.729944032 +364158.mc16e 17513474.888650086 828.8801421516 +364159.mc16e 9077204.48951067 618.5647247472 +364160.mc16e 6028051.801757202 223.35841325951998 +364161.mc16e 13434928.073148541 77.479415244 +364162.mc16e 10439801.157056242 197.79329214413997 +364163.mc16e 15918364.7860627 96.4494137376 +364164.mc16e 30795290.648886967 36.345256660943996 +364165.mc16e 7277819.755885538 38.299835163744 +364166.mc16e 4674171.1153828595 22.395646627199998 +364167.mc16e 4780092.0348148 8.768196432072 +364168.mc16e 9991646.084691226 14.558821199999999 +364169.mc16e 6828577.429056138 1.19800296 +364184.mc16e 27945045.927947737 15324.88733622 +364185.mc16e 9527616.104189437 2446.723619802 +364186.mc16e 17644560.75967602 837.6280998624 +364187.mc16e 9111352.668959629 619.44787491048 +364188.mc16e 6248831.814641442 222.59530293461998 +364189.mc16e 10099506.171325658 95.34031806222 +364190.mc16e 20668245.913758177 197.35804480392 +364191.mc16e 13223272.618391313 93.89560207103999 +364192.mc16e 30910708.375011448 34.82262388836 +364193.mc16e 10921667.928664854 39.281122066032 +364194.mc16e 7017716.721964937 22.25461612374 +364195.mc16e 4773563.571976438 9.490847272829999 +364196.mc16e 10027886.219541289 14.603450399999998 +364197.mc16e 6818924.821220279 1.1973238199999998 +364114.mc16e 8917788.640627537 1587.0215945528 +364115.mc16e 4772097.831127534 219.99581160900001 +364116.mc16e 6830130.162783679 127.08321503919997 +364117.mc16e 3638099.621086968 74.90028453263999 +364118.mc16e 1208443.7459066021 20.3159891025 +364119.mc16e 3471145.110198727 12.738808005420001 +364120.mc16e 5011356.113882409 24.419835672925 +364121.mc16e 3323981.5197273665 9.236812813011 +364122.mc16e 14437641.448529854 6.081007354100001 +364123.mc16e 2951583.7821916887 4.7969474232267 +364124.mc16e 1593508.8808104508 2.249655316216 +364125.mc16e 3083921.571990045 1.4944508339145 +364126.mc16e 4930255.9358734265 1.7641509199999998 +364127.mc16e 1697923.5854374766 0.14504612500000003 +364100.mc16e 8936223.697491638 1588.4963084899998 +364101.mc16e 4779260.68943846 219.474347631 +364103.mc16e 3615557.0648046397 73.42295186688 +364104.mc16e 1192954.520856347 20.897287166699996 +364106.mc16e 4929117.991469354 23.303793402540002 +364107.mc16e 3324229.03917229 9.143665195889 +364108.mc16e 14367137.174127039 6.05591861616 +364109.mc16e 2261304.1601487063 4.657367095488799 +364110.mc16e 1531850.9662022581 2.2148275320268995 +364111.mc16e 3121481.584973544 1.4697257097894 +364112.mc16e 5078116.864055352 1.7425036999999999 +364113.mc16e 1622696.6512544751 0.14392476 +364128.mc16e 8932067.905398387 1612.6789640079999 +364129.mc16e 4771039.621597946 219.63438591850002 +364130.mc16e 6843571.442215623 127.10315612673 +364131.mc16e 3656688.450165033 74.73901859424001 +364132.mc16e 1209846.3939533927 20.5294394676 +364133.mc16e 3476879.5616393015 11.966186954862 +364134.mc16e 4966303.561057217 24.59183946128 +364135.mc16e 3329676.0495885755 9.303012849312 +364136.mc16e 5756186.477358048 6.171084868872 +364137.mc16e 2858152.852915926 4.764891832735999 +364138.mc16e 1532853.8918604166 2.2360613145023995 +364139.mc16e 3119964.18503478 1.491237143214 +364140.mc16e 4922786.759697786 1.76278578 +364141.mc16e 1697854.8654967546 0.144568326 +410658.mc16e 306995965.1772995 44.154726000000004 +410659.mc16e 184202839.55086437 26.275157500000002 +410646.mc16e 315046579.55454636 35.84952 +410647.mc16e 313730034.05451584 35.8467585 +410644.mc16e 6699455.012125969 2.061459 +410645.mc16e 4207585.823101759 1.2885655799999998 +410155.mc16e 6601725.5496377945 0.60084912 +410156.mc16e 310260.3004670441 0.1721166 +410157.mc16e 1895730.984977007 0.5863131 +410218.mc16e 79922.39313930273 0.04128880000000001 +410219.mc16e 80098.10679871589 0.04129216 +410220.mc16e 35092.02892035991 0.0409416 +410276.mc16e 8518.29944318533 0.0204176 +410277.mc16e 8509.097548354417 0.020410880000000003 +410278.mc16e 339.7433944423683 0.00219184 +363355.mc16e 5795084.355500013 4.3079415999999995 +363356.mc16e 5798104.492057384 2.20355112 +363357.mc16e 928257.3438840844 6.7951 +363358.mc16e 421818.6744698011 3.4328000000000003 +363359.mc16e 1784626.7644427395 24.708000000000002 +363360.mc16e 1787130.816855038 24.724 +363489.mc16e 1873760.204523365 11.42 diff --git a/macros/macros_stats/LaunchTRExFitterOnBatch_newTRexF.py b/macros/macros_stats/LaunchTRExFitterOnBatch_newTRexF.py new file mode 100644 index 0000000000000000000000000000000000000000..4f25d6c24f911ccb40a0636ce68e9e08ac123f13 --- /dev/null +++ b/macros/macros_stats/LaunchTRExFitterOnBatch_newTRexF.py @@ -0,0 +1,239 @@ +#!/bin/python +import os +import glob +import sys +import socket + +sys.path.append( os.getenv("ROOTCOREBIN") + "/python/IFAETopFramework/" ) +from BatchTools import * + +##---------------------------------------------------------- +## Write scripts and launch jobs +##---------------------------------------------------------- +def writeScriptsAndLaunchJobs( scriptTempName, configFile, instructions, LaunchJobs = True ): + pathToCreate = "" + scriptName = scriptTempName + + for level in scriptName.split("/"): + if(level==scriptName.split("/")[len(scriptName.split("/"))-1]): continue + pathToCreate += level + pathToCreate += "/" + os.system("mkdir -p " + pathToCreate) + + scriptName += configFile.split("/")[len(configFile.split("/"))-1].replace(" ","") + + script = open(scriptName,'w') + script.write("#!/bin/bash \n") + + script.write("cd $TMPDIR \n\n") + + script.write("echo \"==> About to copy the TRexFitter tarball !\"\n") + script.write("cp -r " + m_tarballPath + " tarball.tgz \n") + script.write("echo \"==> After the copy ! (doing an ls just in case)\"\n") + script.write("ls -lrth \n") + script.write("\n\n") + + script.write("echo \"==> Now untarring the tarball to have the code !\"\n") + script.write("tar xf tarball.tgz \n") + script.write("echo \"==> After the copy ! (doing an ls just in case)\"\n") + script.write("ls -lrth \n") + script.write("\n\n") + + script.write("echo \"==> Now getting the CONFIG file\"\n") + script.write("cp " + configFile + " configFile.txt \n") + script.write("echo \"==> Done\"\n") + script.write("\n\n") + + script.write("source setup.sh \n") + script.write("rm -rf build \n") + script.write("mkdir -p build && cd build/ && cmake ../ && cmake --build ./ && cd ../") + script.write("\n\n") + + tRexFitterOutDirectory = "" + f_config_file = open(configFile,'r') + for config_line in f_config_file: + if config_line.find("Job:")>-1: + config_line_splitted = config_line.split(" ") + if len(config_line_splitted)>1: + tRexFitterOutDirectory = config_line_splitted[1].replace("\"","").replace("\n","") + break + + script.write("mkdir -p " + tRexFitterOutDirectory + "/Histograms/\n") + + script.write("echo \"==> Now running the code with the following instructions:\"\n") + for inst in instructions: + script.write("echo \" " + inst + "\"\n") + + counter = 0 + script.write("trex-fitter h configFile.txt >& logFileRunning_h \n") + for inst in instructions: + script.write("echo \"==> Now executing the instruction: " + inst + "\"\n") + script.write("trex-fitter " + inst.replace("_CONFIGFILE_","configFile.txt") + " >& logFileRunning_" + `counter` + " \n") + counter += 1 + + script.write("\n\n") + script.write("echo \"==> The code ran ! Doing an ls so that you can check !\"\n") + script.write("ls -lrth . " + tRexFitterOutDirectory + "/ \n") + script.write("\n\n") + + #Creating the output repositories + script.write("mkdir -p " + m_outputDir + "/" + tRexFitterOutDirectory + "/Histograms\n") + script.write("mkdir -p " + m_outputDir + "/" + tRexFitterOutDirectory + "/Systematics\n") + script.write("mkdir -p " + m_outputDir + "/" + tRexFitterOutDirectory + "/Fits\n") + script.write("mkdir -p " + m_outputDir + "/" + tRexFitterOutDirectory + "/RooStats\n") + script.write("mkdir -p " + m_outputDir + "/" + tRexFitterOutDirectory + "/Plots\n") + script.write("mkdir -p " + m_outputDir + "/" + tRexFitterOutDirectory + "/Significance\n") + script.write("mkdir -p " + m_outputDir + "/" + tRexFitterOutDirectory + "/Tables\n") + script.write("mkdir -p " + m_outputDir + "/" + tRexFitterOutDirectory + "/Limits\n") + + #Copying outputs in the final repository + script.write("mv " + tRexFitterOutDirectory + "/Systematics/* " + m_outputDir + "/" + tRexFitterOutDirectory + "/Systematics \n") + script.write("mv " + tRexFitterOutDirectory + "/*.{png,eps,pdf} " + m_outputDir + "/" + tRexFitterOutDirectory + "/ \n") + script.write("mv " + tRexFitterOutDirectory + "/Fits/* " + m_outputDir + "/" + tRexFitterOutDirectory + "/Fits/ \n") + script.write("mv " + tRexFitterOutDirectory + "/RooStats/* " + m_outputDir + "/" + tRexFitterOutDirectory + "/RooStats/ \n") + script.write("mv " + tRexFitterOutDirectory + "/Plots/* " + m_outputDir + "/" + tRexFitterOutDirectory + "/Plots/ \n") + script.write("mv " + tRexFitterOutDirectory + "/Significance/* " + m_outputDir + "/" + tRexFitterOutDirectory + "/Significance/ \n") + script.write("mv " + tRexFitterOutDirectory + "/Tables/* " + m_outputDir + "/" + tRexFitterOutDirectory + "/Tables/ \n") + script.write("mv " + tRexFitterOutDirectory + "/Limits/* " + m_outputDir + "/" + tRexFitterOutDirectory + "/Limits/ \n") + script.write("mv logFileRunning* " + m_outputDir + "/" + tRexFitterOutDirectory + "/ \n") + + script.write("\n\n") + script.write("echo \"==> Finished transfering the output files !\"\n") + script.write("\n\n") + + script.write("rm -rf $TMPDIR/*") + + script.close() + if LaunchJobs: + if socket.gethostname().find("cca")>-1: + #You are working at CCIN2P3 ... you must be Loic !! + os.system("mkdir -p " + m_outputDir + "/" + tRexFitterOutDirectory) + os.system("qsub -l sps=1 -P P_atlas -o " + m_outputDir + "/" + tRexFitterOutDirectory + "/ -e " + m_outputDir + "/" + tRexFitterOutDirectory + "/ " + scriptName) + else: + os.system("mkdir " + m_outputDir + "/" + tRexFitterOutDirectory) + os.system("qsub -q " + m_batch_queue + " " + scriptName + " -o " + m_outputDir + "/" + tRexFitterOutDirectory + "/ -e " + m_outputDir + "/" + tRexFitterOutDirectory + "/") + +##------------------------------------------------------ +## Checking the arguments +##------------------------------------------------------ +if(len(sys.argv)<5): + printWarning("Arguments checker ==> Wrong input arguments") + print "" + print " python "+sys.argv[0]+" [arg]" + print "" + print "Arguments" + print "=========" + print " tarball=<path to the tarball containing TRExFitter>" + print " outputDir=<place where to store all the results>" + print " action=<action to perform with this job> chosen between RANKING/HISTOS/FIT/POSTPLOTS/PREPLOTS/LIMIT" + print " inputDir=<ABSOLUTE path to the config files>" + print " n_NP=<number of NP to be run for each job when performing the ranking> " + print " queue=<name of the batch queue to launch the jobs. delfault in at3> " + print "" + sys.exit() + +##------------------------------------------------------ +## Selects the arguments +##------------------------------------------------------ +m_tarballPath = "tarball.tgz" +m_outputDir = "" +m_action = "" +m_inputConfigFiles = "" +m_rankingNPMerging = 10 +m_mergeJobs = False +m_batch_queue = "at3" +for iArg in range(1,len(sys.argv)): + splitted=sys.argv[iArg].split("=") + argument = splitted[0].upper() + if(argument=="TARBALL"): m_tarballPath = splitted[1] + elif(argument=="OUTPUTDIR"): m_outputDir = splitted[1] + elif(argument=="ACTION"): m_action = splitted[1].upper() + elif(argument=="INPUTDIR"): m_inputConfigFiles = splitted[1] + elif(argument=="N_NP"): m_rankingNPMerging = int(splitted[1]) + elif(argument=="QUEUE"): m_batch_queue = splitted[1] + elif(argument=="MERGEJOBS"): m_mergeJobs = True + else: + printWarning("/!\ Unrecognized argument ("+splitted[0]+") ! Please check !") +if(m_inputConfigFiles==""): + printError("<!> Please provide an input config file to use !") + sys.exit() + +##------------------------------------------------------ +## Creating the output folder +##------------------------------------------------------ +os.system("mkdir -p " + m_outputDir) + +##------------------------------------------------------ +## Getting the file list +##------------------------------------------------------ +configFileList = glob.glob(m_inputConfigFiles+"*.txt") +nMerge = 1 +if len(configFileList)>100 and not m_mergeJobs: + printWarning("=> You are about to submit A LOT of jobs ("+`len(configFileList)`+") ... Are you sure you want to do that ?") + go_ahead="" + while go_ahead!="y" and go_ahead!="n": + go_ahead = raw_input(" Type 'y' to continue or 'n' to merge jobs: ") + if go_ahead=="n": + m_mergeJobs = True + nMerge = int(raw_input(" Type the number of jobs to merge: ")) + +##------------------------------------------------------ +## Looping on the configfiles and launch a job (or more for each) +##------------------------------------------------------ + +for config in configFileList: + print "=> Taking care of config file: ", config + if m_action == "RANKING": + #Determining the number of systematics to consider + f_config = open(config,'r') + syst_list = [] + for config_line in f_config: + if config_line.find("Systematic: ")>-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 systematic in syst_list: + syst = systematic.replace("\"","").replace(" ","").replace("\n","") + if commands == []: + commands += ["wfr _CONFIGFILE_ 'Ranking=" + syst + "'"] + else: + commands += ["r _CONFIGFILE_ 'Ranking=" + syst + "'"] + if len(commands)==m_rankingNPMerging: + writeScriptsAndLaunchJobs( m_outputDir + "/scripts_RANKING"+syst, config, commands ) + commands = [] + writeScriptsAndLaunchJobs( m_outputDir + "/scripts_RANKING_ttbbNorm", config, ["wfr _CONFIGFILE_ 'Ranking=HTX_BKGNORM_TTBARBB'",] ) + else: + com = "w" + if m_action.find("FIT")>-1: + com += "f" + if m_action.find("POSTPLOTS")>-1: + com += "p" + if m_action.find("LIMIT")>-1: + com += "ls" + if m_action.find("PREPLOTS")>-1: + com += "d" + writeScriptsAndLaunchJobs( m_outputDir + "/scripts_", config, [com + " _CONFIGFILE_",], m_mergeJobs==False ) + +if m_mergeJobs: + list_scripts = glob.glob(m_outputDir + "/scripts_*") + counter = 0 + counter_scripts = 0 + for script in list_scripts: + if counter == 0: + counter_scripts += 1 + counter += 1 + os.system("cat " + script + " > " + m_outputDir + "/mergedScripts_"+`counter_scripts`) + else: + counter += 1 + os.system("echo '\n\n\n\n' >> " + m_outputDir + "/mergedScripts_"+`counter_scripts`) + os.system("cat " + script + " >> " + m_outputDir + "/mergedScripts_"+`counter_scripts`) + + if counter==nMerge: + counter = 0 + com = "qsub -q at3 " + m_outputDir + "/mergedScripts_"+`counter_scripts` + " -o " + m_outputDir + "/LOG_mergedScripts_"+`counter_scripts` + "/ -e " + m_outputDir + "/LOG_mergedScripts_"+`counter_scripts` + "/" + os.system(com) + printGoodNews("=> You effectively submitted \"only\" " + `counter_scripts` + " jobs instead of "+`len(configFileList)`+" !!") diff --git a/macros/macros_stats/PrepareConfigFilesFromTemplate.py b/macros/macros_stats/PrepareConfigFilesFromTemplate.py index 40c9cf7ea1c415a90eeb6d052ce1948fff141342..69109fd3b7ed1aa771c1be9ed5040efe71875218 100644 --- a/macros/macros_stats/PrepareConfigFilesFromTemplate.py +++ b/macros/macros_stats/PrepareConfigFilesFromTemplate.py @@ -291,8 +291,8 @@ for counter,sample in enumerate(Signals): corrected_line += "HistoName: " + reg['name'].replace("HTX_","") + channel + "_" + reg_discriminant + "\n" corrected_line += "VariableTitle: " + discriminant_title +"\n" corrected_line += "Binning: " + reg[binning_key] + "\n" - corrected_line += "Label: " + reg['legend'] + "\n" - corrected_line += "ShortLabel: " + reg['legend'] + "\n" + corrected_line += "Label: " + "\"" + reg['legend'] + "\"\n" + corrected_line += "ShortLabel: " + "\"" + reg['legend'] + "\"\n" #if(reg['name'].find("c1lep")>-1 and inputDir.find("/1lep")==-1): # corrected_line += "HistoPathSuff: 1lep/ \n" #elif(reg['name'].find("c0lep")>-1 and inputDir.find("/0lep")==-1): @@ -341,12 +341,12 @@ for counter,sample in enumerate(Signals): f_adapted.write("Sample: \""+SType+"\"\n") f_adapted.write(" Title: \""+TypeTemp+"\"\n") - f_adapted.write(" Type: \"signal\"\n") + f_adapted.write(" Type: signal\n") f_adapted.write(" NormFactor: \"mu_signal\","+SignalNormFactor+"\n") f_adapted.write(" FillColor: 2\n") f_adapted.write(" LineColor: 2\n") f_adapted.write(" HistoFile: "+cleaned_sampleType+"\n") - + f_adapted.write(" LumiScale: 139020.02\n") f_adapted.write(" \n") f_adapted.close() diff --git a/macros/macros_stats/templates/TEMPLATE_Systematics_DUMMY.txt b/macros/macros_stats/templates/TEMPLATE_Systematics_DUMMY.txt index 44779d7b60a5ccb893df0b9e8fd05bb82e42fa4b..051c668fca4bf0644afb7cdb331ed01960402f53 100644 --- a/macros/macros_stats/templates/TEMPLATE_Systematics_DUMMY.txt +++ b/macros/macros_stats/templates/TEMPLATE_Systematics_DUMMY.txt @@ -8,5 +8,5 @@ Systematic: "Dummy" Category: Others OverallUp: 1.e-5 OverallDown: -1.e-5 - Exclude: QCD,QCD0L +% Exclude: QCD,QCD0L diff --git a/macros/macros_stats/templates/TEMPLATE_configFile_newTRexF_sVLQ__SIGNAL_.txt b/macros/macros_stats/templates/TEMPLATE_configFile_newTRexF_sVLQ__SIGNAL_.txt new file mode 100644 index 0000000000000000000000000000000000000000..3bee769359028febcd7e71218f25c57e9e8cb93e --- /dev/null +++ b/macros/macros_stats/templates/TEMPLATE_configFile_newTRexF_sVLQ__SIGNAL_.txt @@ -0,0 +1,218 @@ +% -------------------------- % +% ------- JOB ------- % +% -------------------------- % + +Job: "__FITTYPE_____SIGNAL_____ADDITION__" +Label: "Ht+X analysis" +CmeLabel: "13 TeV" +LumiLabel: "139.02 fb^{-1}" +Lumi: 1. +POI: "mu_signal" +ReadFrom: HIST +HistoPath: "__HISTOPATH__" +DebugLevel: 0 +SystControlPlots: FALSE +SystPruningShape: 0.01 +SystPruningNorm: 0.01 +CorrelationThreshold: 0.20 +HistoChecks: NOCRASH +SplitHistoFiles: TRUE +MCstatThreshold: 0.05 +StatOnly: __STATONLY__ +SystLarge: 10. +%GetChi2: FALSE +PlotOptions: YIELDS +%PlotOptions: CHI2 + +% -------------------------- % +% ------- FIT ------- % +% -------------------------- % + +Fit: "__FITTYPE__" +FitType: __FITTYPE__ +FitRegion: __FITREGION__ +FitBlind: __FITBLIND__ +POIAsimov: __FITPOIASIMOV__ + +% --------------------------- % +% ---------- LIMIT ---------- % +% --------------------------- % + +Limit: "limit" +LimitType: ASYMPTOTIC +LimitBlind: __LIMITBLIND__ +POIAsimov: __LIMITPOIASIMOV__ + +% -------------------------- % +% --------- REGIONS -------- % +% -------------------------- % + +_REGIONLIST_ + +% --------------------------- % +% -------- SAMPLES -------- % +% --------------------------- % + +Sample: "ttbarlight" +Title: "t#bar{t}+light" +Type: background +FillColor: 0 +LineColor: 1 +HistoFiles: ttbarlight.mc16a,ttbarlight.mc16d,ttbarlight.mc16e +LumiScales: 36207.66,44307.4,58450.1 + +Sample: "ttbarcc" +Title: "t#bar{t}+cc" +Type: background +FillColor: 590 +LineColor: 1 +HistoFiles: ttbarcc.mc16a,ttbarcc.mc16d,ttbarcc.mc16e +LumiScales: 36207.66,44307.4,58450.1 +%HistoFile: ttbarcc + +Sample: "ttbarbb" +Title: "t#bar{t}+bb" +Type: background +FillColor: 594 +LineColor: 1 +HistoFiles: ttbarbb.mc16a,ttbarbb.mc16d,ttbarbb.mc16e +LumiScales: 36207.66,44307.4,58450.1 +%HistoFile: ttbarbb + +Sample: "topEW" +Title: "topEW" +Type: background +FillColor: 410 +LineColor: 1 +HistoFiles: topEW.mc16a,topEW.mc16d,topEW.mc16e +LumiScales: 36207.66,44307.4,58450.1 +%HistoFile: topEW +Group: Non-t#bar{t} + +Sample: "ttH" +Title: "ttH" +Type: background +FillColor: 410 +LineColor: 1 +HistoFile: ttH.mc16a +LumiScale: 139020.02 +LumiScales: 36207.66,44307.4,58450.1 +%HistoFiles: ttH.mc16a,ttH.mc16d,ttH.mc16e +%LumiScales: 36207.66,44307.4,58450.1 +%HistoFile: ttH +Group: Non-t#bar{t} + +Sample: "Wjets" +Title: "W+jets" +Type: background +FillColor: 410 +LineColor: 1 +HistoFiles: Wjets.mc16a,Wjets.mc16d,Wjets.mc16e +LumiScales: 36207.66,44307.4,58450.1 +%HistoFile: Wjets +Group: Non-t#bar{t} + +#Sample: Wjetslight +#Title: W+jetslight +#Type: background +#FillColor: 410 +#LineColor: 1 +#HistoFile: Wjets22light +#Group: Non-t#bar{t} + +#Sample: Wjetscharm +#Title: W+jetscharm +#Type: background +#FillColor: 410 +#LineColor: 1 +#HistoFile: Wjets22charm +#Group: Non-t#bar{t} + +#Sample: Wjetsbeauty +#Title: W+jetsbeauty +#Type: background +#FillColor: 410 +#LineColor: 1 +#HistoFile: Wjets22beauty +#Group: Non-t#bar{t} + +Sample: "Zjets" +Title: "Z+jets" +Type: background +FillColor: 410 +LineColor: 1 +HistoFiles: Zjets.mc16a,Zjets.mc16d,Zjets.mc16e +LumiScales: 36207.66,44307.4,58450.1 +%HistoFile: Zjets +Group: Non-t#bar{t} + +#Sample: Zjetslight +#Title: Z+jetslight +#Type: background +#FillColor: 410 +#LineColor: 1 +#HistoFile: Zjets22light +#Group: Non-t#bar{t} + +#Sample: Zjetscharm +#Title: Z+jetscharm +#Type: background +#FillColor: 410 +#LineColor: 1 +#HistoFile: Zjets22charm +#Group: Non-t#bar{t} + +#Sample: Zjetsbeauty +#Title: Z+jetsbeauty +#Type: background +#FillColor: 410 +#LineColor: 1 +#HistoFile: Zjets22beauty +#Group: Non-t#bar{t} + +Sample: "Singletop" +Title: "Single-top" +Type: background +FillColor: 410 +LineColor: 1 +HistoFiles: Singletop.mc16a,Singletop.mc16d,Singletop.mc16e +LumiScales: 36207.66,44307.4,58450.1 +%HistoFile: Singletop +Group: Non-t#bar{t} + +Sample: "Dibosons" +Title: "Dibosons" +Type: background +FillColor: 410 +LineColor: 1 +HistoFiles: Dibosons.mc16a,Dibosons.mc16d,Dibosons.mc16e +LumiScales: 36207.66,44307.4,58450.1 +%HistoFile: Dibosons +Group: Non-t#bar{t} + +#Sample: QCD +#Title: QCD +#Type: background +#FillColor: 410 +#LineColor: 1 +#HistoFile: QCD +#Group: Non-t#bar{t} +#NormalizedByTheory: FALSE +#Regions: HTX_c1lep* + +#Sample: QCD0L +#Title: QCD0L +#Type: background +#FillColor: 410 +#LineColor: 1 +#HistoFile: QCD0L +#Group: Non-t#bar{t} +#NormalizedByTheory: FALSE +#Regions: HTX_c0lep* + +#NormFactor: HTX_BKGNORM_TTBARBB +#Title: t#bar{t}+#geq1b normalisation +#Nominal: 1 +#Min: -10 +#Max: 10 +#Samples: ttbarbb diff --git a/python/VLQ_Samples_mc.py b/python/VLQ_Samples_mc.py index 0efe3c1b9eaaf07f84b092cfc460b31d11ddf144..94ddbc98abd84e69172189c457d6921f5bc8b3d7 100644 --- a/python/VLQ_Samples_mc.py +++ b/python/VLQ_Samples_mc.py @@ -185,6 +185,7 @@ def GetZSamplesSherpa221( useWeightSyst=False, useObjectSyst=False, campaign="", Samples = [] ######## Z+jets ########### + #ee Samples += [getSampleUncertainties(name,"364114."+campaign, ObjectSystematics , WeightSystematics)] Samples += [getSampleUncertainties(name,"364115."+campaign, ObjectSystematics , WeightSystematics)] Samples += [getSampleUncertainties(name,"364116."+campaign, ObjectSystematics , WeightSystematics)] @@ -199,6 +200,7 @@ def GetZSamplesSherpa221( useWeightSyst=False, useObjectSyst=False, campaign="", Samples += [getSampleUncertainties(name,"364125."+campaign, ObjectSystematics , WeightSystematics)] Samples += [getSampleUncertainties(name,"364126."+campaign, ObjectSystematics , WeightSystematics)] Samples += [getSampleUncertainties(name,"364127."+campaign, ObjectSystematics , WeightSystematics)] + #mumu Samples += [getSampleUncertainties(name,"364100."+campaign, ObjectSystematics , WeightSystematics)] Samples += [getSampleUncertainties(name,"364101."+campaign, ObjectSystematics , WeightSystematics)] Samples += [getSampleUncertainties(name,"364102."+campaign, ObjectSystematics , WeightSystematics)] @@ -213,6 +215,7 @@ def GetZSamplesSherpa221( useWeightSyst=False, useObjectSyst=False, campaign="", Samples += [getSampleUncertainties(name,"364111."+campaign, ObjectSystematics , WeightSystematics)] Samples += [getSampleUncertainties(name,"364112."+campaign, ObjectSystematics , WeightSystematics)] Samples += [getSampleUncertainties(name,"364113."+campaign, ObjectSystematics , WeightSystematics)] + #tautau Samples += [getSampleUncertainties(name,"364128."+campaign, ObjectSystematics , WeightSystematics)] Samples += [getSampleUncertainties(name,"364129."+campaign, ObjectSystematics , WeightSystematics)] Samples += [getSampleUncertainties(name,"364130."+campaign, ObjectSystematics , WeightSystematics)]