diff --git a/.gitignore b/.gitignore index afc0fa68..9fc18e16 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ Makefile *.py[cod] *.log *.so +*.root Debug/ Profile/ Release/ diff --git a/README.md b/README.md index 05caff84..1fd02f4d 100644 --- a/README.md +++ b/README.md @@ -5,23 +5,28 @@ Analysis software for TTbar+X differential cross section analysis (TOP-12-042) ## General Recipe -To setup the standalone version of the code: +To setup the stand-alone version of the code: ``` -#get the code from the repository +# get the code from the repository git clone https://github.com/BristolTopGroup/AnalysisSoftware.git AnalysisSoftware cd AnalysisSoftware -#create the makefile using cmake (install it if you don't have it: https://github.com/Kitware/CMake) +# create the makefile using cmake (install it if you don't have it: https://github.com/Kitware/CMake) cmake CMakeLists.txt -#compile and build +# for older versions of boost you will need to +#sed -i 's/lib64\/lib64/lib64/g' ./CMakeFiles/AnalysisSoftware.dir/build.make +#sed -i 's/lib64\/lib64/lib64/g' ./CMakeFiles/AnalysisSoftware.dir/link.txt +# as the library path is wrong (contains lib64/lib64) + +# compile and build make -j24 -#adjust the toolsFolder environment variable +# adjust the toolsFolder environment variable export toolsFolder=$PWD/ -#test run the code: +# test run the code: nohup ./AnalysisSoftware python/test_cfg.py &> test.log & ``` @@ -34,15 +39,15 @@ cmsrel CMSSW_6_0_0 cd CMSSW_6_0_0/src cmsenv -#get the code from the repository +# get the code from the repository git clone https://github.com/BristolTopGroup/AnalysisSoftware.git BristolAnalysis/Tools -#compile +# compile scram b -j2 hash -r #or rehash in case that BAT cannot be found -#test run the code: +# test run the code: nohup BAT BristolAnalysis/Tools/python/test_cfg.py &> test.log & ``` diff --git a/interface/Analysers/TTbar_plus_X_analyser.h b/interface/Analysers/TTbar_plus_X_analyser.h index e1b10f45..ab7534fd 100644 --- a/interface/Analysers/TTbar_plus_X_analyser.h +++ b/interface/Analysers/TTbar_plus_X_analyser.h @@ -32,10 +32,6 @@ class TTbar_plus_X_analyser: public BAT::BasicAnalyser { void muPlusJetsQcdAnalysis(const EventPtr); void ePlusJetsSignalAnalysis(const EventPtr); void muPlusJetsSignalAnalysis(const EventPtr); - //compare shift up/down for the systematic samples - //for the argument of 0-btag vs >=2 b-tag shape -// void ePlusJetsSystematicsAnalysis(const EventPtr); -// void muPlusJetsSystematicsAnalysis(const EventPtr); private: //signal selections @@ -43,14 +39,11 @@ class TTbar_plus_X_analyser: public BAT::BasicAnalyser { //QCD selections with respect to reference selection SelectionPointer qcdNonIsoElectronSelection_, qcdConversionSelection_; SelectionPointer qcd_noniso_muon_plus_jets_selection_, qcd_noniso_muon_plus_jets_selection_ge4j_; -// SelectionPointer qcdPFRelIsoEPlusJetsSelection_, qcdPFRelIsoMuPlusJetsSelection_, -// qcd_noiso_muon_plus_jets_selection_; + SelectionPointer qcdPFRelIsoEPlusJetsSelection_, qcdPFRelIsoMuPlusJetsSelection_; /** * Analysers */ - //no selection -// METAnalyserLocalPtr metAnalyserEPlusJetsNoSelection_, metAnalyserMuPlusJetsNoSelection_; //signal regions METAnalyserLocalPtr metAnalyserEPlusJetsRefSelection_, metAnalyserMuPlusJetsRefSelection_; ElectronAnalyserLocalPtr electronAnalyserRefSelection_; @@ -66,74 +59,49 @@ class TTbar_plus_X_analyser: public BAT::BasicAnalyser { METAnalyserLocalPtr metAnalyserqcdConversionSelection_; ElectronAnalyserLocalPtr qcdConversionsElectronAnalyser_; //No iso -// ElectronAnalyserLocalPtr qcdEPlusjetsPFRelIsoElectronAnalyser_; -// MuonAnalyserLocalPtr qcdMuPlusjetsPFRelIsoMuonAnalyser_, qcdNoIsolationMuonAnalyser_; + ElectronAnalyserLocalPtr qcdEPlusjetsPFRelIsoElectronAnalyser_; + MuonAnalyserLocalPtr qcdMuPlusjetsPFRelIsoMuonAnalyser_; std::vector metBins_, ht_bins_, st_bins_, mt_bins_, wpt_bins_; //MET analysers electron -// std::vector no_selection_binned_MET_analyser_electron_eta_; std::vector ref_selection_binned_MET_analyser_electron_eta_; std::vector qcd_conversion_binned_MET_analyser_electron_eta_; std::vector qcd_noniso_binned_MET_analyser_electron_eta_; -// std::vector qcd_PFRelIso_binned_MET_analyser_electron_isolation_; //for QCD rate estimation -// std::vector qcd_PFRelIso_binned_MET_analyser_electron_rhocorrected_isolation_; //for QCD rate estimation //MET analysers muon -// std::vector no_selection_binned_MET_analyser_muon_eta_; std::vector ref_selection_binned_MET_analyser_muon_eta_; std::vector qcd_noniso_binned_MET_analyser_muon_eta_; -// std::vector qcd_PFRelIso_binned_MET_analyser_muon_eta_; //HT analysers electron -// Binned_Variable_analyser_ptr no_selection_binned_HT_analyser_electron_eta_; Binned_Variable_analyser_ptr ref_selection_binned_HT_analyser_electron_eta_; Binned_Variable_analyser_ptr qcd_conversion_binned_HT_analyser_electron_eta_; Binned_Variable_analyser_ptr qcd_noniso_binned_HT_analyser_electron_eta_; -// Binned_Variable_analyser_ptr qcd_PFRelIso_binned_HT_analyser_electron_isolation_; //for QCD rate estimation -// Binned_Variable_analyser_ptr qcd_PFRelIso_binned_HT_analyser_electron_rhocorrected_isolation_; //for QCD rate estimation //HT analysers muon -// Binned_Variable_analyser_ptr no_selection_binned_HT_analyser_muon_eta_; Binned_Variable_analyser_ptr ref_selection_binned_HT_analyser_muon_eta_; Binned_Variable_analyser_ptr qcd_noniso_binned_HT_analyser_muon_eta_; -// Binned_Variable_analyser_ptr qcd_PFRelIso_binned_HT_analyser_muon_eta_; //ST analysers electron -// std::vector no_selection_binned_ST_analyser_electron_eta_; std::vector ref_selection_binned_ST_analyser_electron_eta_; std::vector qcd_conversion_binned_ST_analyser_electron_eta_; std::vector qcd_noniso_binned_ST_analyser_electron_eta_; -// std::vector qcd_PFRelIso_binned_ST_analyser_electron_isolation_; //for QCD rate estimation -// std::vector qcd_PFRelIso_binned_ST_analyser_electron_rhocorrected_isolation_; //for QCD rate estimation //ST analysers muon -// std::vector no_selection_binned_ST_analyser_muon_eta_; std::vector ref_selection_binned_ST_analyser_muon_eta_; std::vector qcd_noniso_binned_ST_analyser_muon_eta_; -// std::vector qcd_PFRelIso_binned_ST_analyser_muon_eta_; //MT analysers electron -// std::vector no_selection_binned_MT_analyser_electron_eta_; std::vector ref_selection_binned_MT_analyser_electron_eta_; std::vector qcd_conversion_binned_MT_analyser_electron_eta_; std::vector qcd_noniso_binned_MT_analyser_electron_eta_; -// std::vector qcd_PFRelIso_binned_MT_analyser_electron_isolation_; //for QCD rate estimation -// std::vector qcd_PFRelIso_binned_MT_analyser_electron_rhocorrected_isolation_; //for QCD rate estimation //MT analysers muon -// std::vector no_selection_binned_MT_analyser_muon_eta_; std::vector ref_selection_binned_MT_analyser_muon_eta_; std::vector qcd_noniso_binned_MT_analyser_muon_eta_; -// std::vector qcd_PFRelIso_binned_MT_analyser_muon_eta_; //WPT analysers electron -// std::vector no_selection_binned_WPT_analyser_electron_eta_; std::vector ref_selection_binned_WPT_analyser_electron_eta_; std::vector qcd_conversion_binned_WPT_analyser_electron_eta_; std::vector qcd_noniso_binned_WPT_analyser_electron_eta_; -// std::vector qcd_PFRelIso_binned_WPT_analyser_electron_isolation_; //for QCD rate estimation -// std::vector qcd_PFRelIso_binned_WPT_analyser_electron_rhocorrected_isolation_; //for QCD rate estimation //WPT analysers muon -// std::vector no_selection_binned_WPT_analyser_muon_eta_; std::vector ref_selection_binned_WPT_analyser_muon_eta_; std::vector qcd_noniso_binned_WPT_analyser_muon_eta_; -// std::vector qcd_PFRelIso_binned_WPT_analyser_muon_eta_; JetAnalyserLocalPtr jetAnalyserEPlusJetsRefSelection_, jetAnalyserMuPlusJetsRefSelection_; diff --git a/interface/DataTypes.h b/interface/DataTypes.h index 83787539..96ae19b8 100644 --- a/interface/DataTypes.h +++ b/interface/DataTypes.h @@ -173,7 +173,7 @@ const boost::array names = { { "QCD_Pt-1000_MuEnrichedPt5", // "GJets_HT-40To100", // "GJets_HT-100To200", // - "GJets_HT-200", // + "GJets_HT-200ToInf", // //2012 PJ samples "GJets_HT-200To400", // "GJets_HT-400ToInf", // diff --git a/python/DataSetInfo.py b/python/DataSetInfo.py index 6d6ef710..7b94391b 100644 --- a/python/DataSetInfo.py +++ b/python/DataSetInfo.py @@ -33,7 +33,7 @@ datasetInfo['GJets_HT-40To100'] = {"cross-section": 23620., "NumberOfProcessedEvents":12730863} datasetInfo['GJets_HT-100To200'] = {"cross-section": 3476., "NumberOfProcessedEvents":1536287} -datasetInfo['GJets_HT-200'] = {"cross-section": 485., "NumberOfProcessedEvents":9377168} +datasetInfo['GJets_HT-200ToInf'] = {"cross-section": 485., "NumberOfProcessedEvents":9377168} datasetInfo['QCD_Pt-20to30_BCtoE'] = {"cross-section": 0.2355e9 * 0.00046, "NumberOfProcessedEvents":2002588} datasetInfo['QCD_Pt-30to80_BCtoE'] = {"cross-section": 0.0593e9 * 0.00234, "NumberOfProcessedEvents":2030030} diff --git a/python/DataSetInfo_7TeV.py b/python/DataSetInfo_7TeV.py index 766ebd4e..367b1269 100644 --- a/python/DataSetInfo_7TeV.py +++ b/python/DataSetInfo_7TeV.py @@ -29,7 +29,7 @@ datasetInfo['GJets_HT-40To100'] = {"cross-section": 23620., "NumberOfProcessedEvents":12730169} datasetInfo['GJets_HT-100To200'] = {"cross-section": 3476., "NumberOfProcessedEvents":1535665} -datasetInfo['GJets_HT-200'] = {"cross-section": 485., "NumberOfProcessedEvents":9366381} +datasetInfo['GJets_HT-200ToInf'] = {"cross-section": 485., "NumberOfProcessedEvents":9366381} datasetInfo['QCD_Pt-20to30_BCtoE'] = {"cross-section": 0.2355e9 * 0.00046, "NumberOfProcessedEvents":2081553} datasetInfo['QCD_Pt-30to80_BCtoE'] = {"cross-section": 0.0593e9 * 0.00234, "NumberOfProcessedEvents":2030029} diff --git a/python/DataSetInfo_V7.py b/python/DataSetInfo_V7.py index c26bafa7..6822c18f 100644 --- a/python/DataSetInfo_V7.py +++ b/python/DataSetInfo_V7.py @@ -33,7 +33,7 @@ datasetInfo['GJets_HT-40To100'] = {"cross-section": 23620., "NumberOfProcessedEvents":12658883} datasetInfo['GJets_HT-100To200'] = {"cross-section": 3476., "NumberOfProcessedEvents":1520063} -datasetInfo['GJets_HT-200'] = {"cross-section": 485., "NumberOfProcessedEvents":9377168} +datasetInfo['GJets_HT-200ToInf'] = {"cross-section": 485., "NumberOfProcessedEvents":9377168} datasetInfo['QCD_Pt-20to30_BCtoE'] = {"cross-section": 0.2355e9 * 0.00046, "NumberOfProcessedEvents":1796637} datasetInfo['QCD_Pt-30to80_BCtoE'] = {"cross-section": 0.0593e9 * 0.00234, "NumberOfProcessedEvents":2030030} diff --git a/python/test_cfg.py b/python/test_cfg.py index c8c91848..1b9f5f81 100644 --- a/python/test_cfg.py +++ b/python/test_cfg.py @@ -5,7 +5,7 @@ #center of mass energy: 7TeV for 2010/2011 data/MC, 8TeV for 2012 data #this value will be part of the output file name: DataType_CenterOfMassEnergyTeV_lumipb-1_.... -centerOfMassEnergy = 7 +centerOfMassEnergy = 8 nTuple_version = 10 #number of events to be processed maxEvents = 10000 @@ -60,11 +60,11 @@ useHitFit = False produceFitterASCIIoutput = False inputFiles = [ -# '/storage/TopQuarkGroup/data/2012/SingleElectron/nTuple_v10_Run2012D-22Jan2013-v1_AOD_GoldenJSON_LeptonPlus3Jets/*.root' # 53X 8TeV data + '/storage/TopQuarkGroup/data/2012/SingleElectron/nTuple_v10_Run2012D-22Jan2013-v1_AOD_GoldenJSON_LeptonPlus3Jets/*.root' # 53X 8TeV data # '/storage/TopQuarkGroup/mc/8TeV/LeptonPlus3JetsSkim/TTJets_MassiveBinDECAY_TuneZ2star_8TeV-madgraph-tauola/nTuple_v10_Summer12_DR53X-PU_S10_START53_V7C-v1_LeptonPlus3Jets/*.root' #53X 8TeV MC # '/storage/TopQuarkGroup/data/2011/ElectronHad/nTuple_v10_Run2011A-12Oct2013-v1_53X_GoldenJSON_LeptonPlus3Jets/*.root' # 53X 7TeV data # ''53X 7TeV MC not available yet - '/storage/TopQuarkGroup/data/2011/ElectronHad/nTuple_v10_Run2011B-19Nov2011-v1_44X_GoldenJSON_LeptonPlus3Jets/*.root' #44X 7TeV data +# '/storage/TopQuarkGroup/data/2011/ElectronHad/nTuple_v10_Run2011B-19Nov2011-v1_44X_GoldenJSON_LeptonPlus3Jets/*.root' #44X 7TeV data # '/storage/TopQuarkGroup/mc/7TeV/v10/LeptonPlus3JetsSkim/TTJets_TuneZ2_7TeV-madgraph-tauola/nTuple_v10_Fall11-PU_S6_START44_V9B-v1_LeptonPlus3Jets/*.root' #44X 7TeV MC ] diff --git a/src/Analysers/ElectronAnalyser.cpp b/src/Analysers/ElectronAnalyser.cpp index 6ee3fb2e..a48a101f 100644 --- a/src/Analysers/ElectronAnalyser.cpp +++ b/src/Analysers/ElectronAnalyser.cpp @@ -22,9 +22,9 @@ void ElectronAnalyser::analyse(const EventPtr event) { histMan_->H1D_BJetBinned("All_Electron_Eta")->Fill(electron->eta(), weight_); histMan_->H1D_BJetBinned("All_Electron_AbsEta")->Fill(fabs(electron->eta()), weight_); histMan_->H1D_BJetBinned("All_Electron_Phi")->Fill(electron->phi(), weight_); - histMan_->H1D_BJetBinned("All_Electron_pfIsolation_03")->Fill(electron->pfRelativeIsolation(0.3), weight_); - histMan_->H1D_BJetBinned("All_Electron_pfIsolation_04")->Fill(electron->pfRelativeIsolation(0.4), weight_); - histMan_->H1D_BJetBinned("All_Electron_pfIsolation_05")->Fill(electron->pfRelativeIsolation(0.5), weight_); +// histMan_->H1D_BJetBinned("All_Electron_pfIsolation_03")->Fill(electron->pfRelativeIsolation(0.3), weight_); +// histMan_->H1D_BJetBinned("All_Electron_pfIsolation_04")->Fill(electron->pfRelativeIsolation(0.4), weight_); +// histMan_->H1D_BJetBinned("All_Electron_pfIsolation_05")->Fill(electron->pfRelativeIsolation(0.5), weight_); histMan_->H1D_BJetBinned("All_Electron_rhoCorrectedIso_03")->Fill(electron->pfRelativeIsolationRhoCorrected(), weight_); histMan_->H1D_BJetBinned("All_Electron_sigma_ietaieta")->Fill(electron->sigmaIEtaIEta(), weight_); @@ -44,15 +44,15 @@ void ElectronAnalyser::analyseElectron(const ElectronPointer electron, double we return; histMan_->H1D_BJetBinned("electron_eta")->Fill(electron->eta(), weight_); histMan_->H1D_BJetBinned("electron_AbsEta")->Fill(fabs(electron->eta()), weight_); - histMan_->H1D_BJetBinned("electron_pfIsolation_03")->Fill(electron->pfRelativeIsolation(0.3), weight_); + histMan_->H1D_BJetBinned("electron_rhoCorrectedIso_03")->Fill(electron->pfRelativeIsolationRhoCorrected(), weight_); +// histMan_->H1D_BJetBinned("electron_pfIsolation_03")->Fill(electron->pfRelativeIsolation(0.3), weight_); if (!ttbarPlusMETAnalysisSetup_) { histMan_->H1D_BJetBinned("electron_pT")->Fill(electron->pt(), weight_); histMan_->H1D_BJetBinned("electron_phi")->Fill(electron->phi(), weight_); - histMan_->H1D_BJetBinned("electron_pfIsolation_04")->Fill(electron->pfRelativeIsolation(0.4), weight_); - histMan_->H1D_BJetBinned("electron_pfIsolation_05")->Fill(electron->pfRelativeIsolation(0.5), weight_); - histMan_->H1D_BJetBinned("electron_rhoCorrectedIso_03")->Fill(electron->pfRelativeIsolationRhoCorrected(), weight_); +// histMan_->H1D_BJetBinned("electron_pfIsolation_04")->Fill(electron->pfRelativeIsolation(0.4), weight_); +// histMan_->H1D_BJetBinned("electron_pfIsolation_05")->Fill(electron->pfRelativeIsolation(0.5), weight_); histMan_->H1D_BJetBinned("electron_sigma_ietaieta")->Fill(electron->sigmaIEtaIEta(), weight_); histMan_->H1D_BJetBinned("electron_dPhi_in")->Fill(electron->dPhiIn(), weight_); @@ -84,12 +84,12 @@ void ElectronAnalyser::createHistograms() { histMan_->addH1D_BJetBinned("All_Electron_Eta", "Electron #eta; #eta(e); Events/(0.02)", 300, -3, 3); histMan_->addH1D_BJetBinned("All_Electron_AbsEta", "Electron |#eta|; |#eta(e)|; Events/(0.01)", 300, 0, 3); histMan_->addH1D_BJetBinned("All_Electron_Phi", "Electron #phi; #phi(e); Events/(0.02)", 400, -4, 4); - histMan_->addH1D_BJetBinned("All_Electron_pfIsolation_03", - "Electron relative pf isolation (DR=0.3); PF relative isolation; Events/(0.01)", 500, 0, 5); - histMan_->addH1D_BJetBinned("All_Electron_pfIsolation_04", - "Electron relative pf isolation (DR=0.4); PF relative isolation; Events/(0.01)", 500, 0, 5); - histMan_->addH1D_BJetBinned("All_Electron_pfIsolation_05", - "Electron relative pf isolation (DR=0.5); PF relative isolation; Events/(0.01)", 500, 0, 5); +// histMan_->addH1D_BJetBinned("All_Electron_pfIsolation_03", +// "Electron relative pf isolation (DR=0.3); PF relative isolation; Events/(0.01)", 500, 0, 5); +// histMan_->addH1D_BJetBinned("All_Electron_pfIsolation_04", +// "Electron relative pf isolation (DR=0.4); PF relative isolation; Events/(0.01)", 500, 0, 5); +// histMan_->addH1D_BJetBinned("All_Electron_pfIsolation_05", +// "Electron relative pf isolation (DR=0.5); PF relative isolation; Events/(0.01)", 500, 0, 5); histMan_->addH1D_BJetBinned("All_Electron_rhoCorrectedIso_03", "Electron rho-corrected isolation (DR=0.3); rho-corrected isolation; Events/(0.01)", 500, 0, 5); histMan_->addH1D_BJetBinned("All_Electron_sigma_ietaieta", @@ -110,12 +110,10 @@ void ElectronAnalyser::createHistograms() { //b-jet binning useful for QCD estimates - histMan_->addH1D_BJetBinned("electron_pfIsolation_04", - "Electron relative pf isolation (DR=0.4); PF relative isolation; Events/(0.01)", 500, 0, 5); - histMan_->addH1D_BJetBinned("electron_pfIsolation_05", - "Electron relative pf isolation (DR=0.5); PF relative isolation; Events/(0.01)", 500, 0, 5); - histMan_->addH1D_BJetBinned("electron_rhoCorrectedIso_03", - "Electron rho-corrected isolation (DR=0.3); rho-corrected isolation; Events/(0.01)", 500, 0, 5); +// histMan_->addH1D_BJetBinned("electron_pfIsolation_04", +// "Electron relative pf isolation (DR=0.4); PF relative isolation; Events/(0.01)", 500, 0, 5); +// histMan_->addH1D_BJetBinned("electron_pfIsolation_05", +// "Electron relative pf isolation (DR=0.5); PF relative isolation; Events/(0.01)", 500, 0, 5); histMan_->addH1D_BJetBinned("electron_sigma_ietaieta", "Electron #sigma_{i#etai#eta}; #sigma_{i#etai#eta}; Events/(0.001)", 100, 0, 0.1); histMan_->addH1D_BJetBinned("electron_dPhi_in", "Electron #Delta#Phi_{in}; #Delta#Phi_{in}; Events/(0.01)", 200, -1, @@ -133,8 +131,10 @@ void ElectronAnalyser::createHistograms() { if (singleElectronOnly_) { histMan_->addH1D_BJetBinned("electron_eta", "Electron #eta; #eta(e); Events/(0.02)", 300, -3, 3); histMan_->addH1D_BJetBinned("electron_AbsEta", "Electron |#eta|; |#eta(e)|; Events/(0.01)", 300, 0, 3); - histMan_->addH1D_BJetBinned("electron_pfIsolation_03", - "Electron relative pf isolation (DR=0.3); PF relative isolation; Events/(0.01)", 500, 0, 5); + histMan_->addH1D_BJetBinned("electron_rhoCorrectedIso_03", + "Electron rho-corrected isolation (DR=0.3); rho-corrected isolation; Events/(0.01)", 500, 0, 5); +// histMan_->addH1D_BJetBinned("electron_pfIsolation_03", +// "Electron relative pf isolation (DR=0.3); PF relative isolation; Events/(0.01)", 500, 0, 5); } } diff --git a/src/Analysers/TTbar_plus_X_analyser.cpp b/src/Analysers/TTbar_plus_X_analyser.cpp index ce8cb261..6d271806 100644 --- a/src/Analysers/TTbar_plus_X_analyser.cpp +++ b/src/Analysers/TTbar_plus_X_analyser.cpp @@ -15,11 +15,9 @@ #include "../../interface/Selections/QCDNonIsolatedElectronSelection.h" #include "../../interface/Selections/QCDConversionsSelection.h" #include "../../interface/Selections/QCDPFRelIsoEPlusJetsSelection.h" -#include "../../interface/Selections/QCDAntiIDEPlusJetsSelection.h" //muons #include "../../interface/Selections/QCDPFRelIsoMuPlusJetsSelection.h" #include "../../interface/Selections/QCDNonIsolatedMuonSelection.h" -#include "../../interface/Selections/NoIsolationMuonSelection.h" namespace BAT { @@ -28,10 +26,6 @@ void TTbar_plus_X_analyser::analyse(const EventPtr event) { ePlusJetsQcdAnalysis(event); muPlusJetsSignalAnalysis(event); muPlusJetsQcdAnalysis(event); - - //no selection -// ePlusJetsSystematicsAnalysis(event); -// muPlusJetsSystematicsAnalysis(event); } void TTbar_plus_X_analyser::ePlusJetsSignalAnalysis(const EventPtr event) { @@ -128,71 +122,6 @@ void TTbar_plus_X_analyser::ePlusJetsSignalAnalysis(const EventPtr event) { } -//void TTbar_plus_X_analyser::ePlusJetsSystematicsAnalysis(const EventPtr event) { -// if (topEplusJetsRefSelection_->passesSelectionUpToStep(event, 1)) { -// const JetCollection jets(topEplusJetsRefSelection_->cleanedJets(event)); -// const JetCollection bJets(topEplusJetsRefSelection_->cleanedBJets(event)); -// unsigned int numberOfBjets(bJets.size()); -// vector bjetWeights; -// if (event->isRealData()) { -// for (unsigned int index = 0; index <= numberOfBjets; ++index) { -// if (index == numberOfBjets) -// bjetWeights.push_back(1.); -// else -// bjetWeights.push_back(0); -// } -// } else -// bjetWeights = BjetWeights(jets, numberOfBjets); -// histMan_->setCurrentJetBin(jets.size()); -// histMan_->setCurrentBJetBin(numberOfBjets); -// -// const LeptonPointer signalLepton = topEplusJetsRefSelection_->signalLepton(event); -// const ElectronPointer signalElectron(boost::static_pointer_cast(signalLepton)); -// -// for (unsigned int weightIndex = 0; weightIndex < bjetWeights.size(); ++weightIndex) { -// double bjetWeight = bjetWeights.at(weightIndex); -// histMan_->setCurrentBJetBin(weightIndex); -// -// metAnalyserEPlusJetsNoSelection_->setScale(bjetWeight); -// -// metAnalyserEPlusJetsNoSelection_->analyse(event, signalLepton, jets); -// -// no_selection_binned_HT_analyser_electron_eta_->setScale(bjetWeight); -// no_selection_binned_HT_analyser_electron_eta_->analyse(Event::HT(jets), fabs(signalElectron->eta()), -// event->weight()); -// -// for (unsigned int metIndex = 0; metIndex < METAlgorithm::NUMBER_OF_METALGORITHMS; ++metIndex) { -// if (!MET::isAvailableInNTupleVersion(Globals::NTupleVersion, metIndex)) -// continue; -// bool isMCOnlyMET = MET::isMCOnlyMETType(metIndex); -// //skip MC only MET entries -// if (isMCOnlyMET && event->isRealData()) -// continue; -// string metPrefix = METAlgorithm::names.at(metIndex); -// const METPointer met(event->MET((METAlgorithm::value) metIndex)); -// no_selection_binned_MET_analyser_electron_eta_.at(metIndex)->setScale(bjetWeight); -// no_selection_binned_MET_analyser_electron_eta_.at(metIndex)->analyse(met->et(), -// fabs(signalElectron->eta()), event->weight()); -// -// no_selection_binned_ST_analyser_electron_eta_.at(metIndex)->setScale(bjetWeight); -// no_selection_binned_ST_analyser_electron_eta_.at(metIndex)->analyse( -// Event::ST(jets, signalElectron, met), fabs(signalElectron->eta()), event->weight()); -// -// no_selection_binned_MT_analyser_electron_eta_.at(metIndex)->setScale(bjetWeight); -// no_selection_binned_MT_analyser_electron_eta_.at(metIndex)->analyse(Event::MT(signalElectron, met), -// fabs(signalElectron->eta()), event->weight()); -// -// no_selection_binned_WPT_analyser_electron_eta_.at(metIndex)->setScale(bjetWeight); -// no_selection_binned_WPT_analyser_electron_eta_.at(metIndex)->analyse(Event::WPT(signalElectron, met), -// fabs(signalElectron->eta()), event->weight()); -// -// } -// -// } -// } -// -//} - void TTbar_plus_X_analyser::ePlusJetsQcdAnalysis(const EventPtr event) { //selection with respect to reference selection if (qcdNonIsoElectronSelection_->passesSelectionUpToStep(event, @@ -360,94 +289,37 @@ void TTbar_plus_X_analyser::ePlusJetsQcdAnalysis(const EventPtr event) { } } -// if (qcdPFRelIsoEPlusJetsSelection_->passesSelectionUpToStep(event, -// TTbarEPlusJetsReferenceSelection::AtLeastFourGoodJets)) { -// const JetCollection jets(qcdPFRelIsoEPlusJetsSelection_->cleanedJets(event)); -// const JetCollection bJets(qcdPFRelIsoEPlusJetsSelection_->cleanedBJets(event)); -// unsigned int numberOfBjets(bJets.size()); -// vector bjetWeights; -// if (event->isRealData()) { -// for (unsigned int index = 0; index <= numberOfBjets; ++index) { -// if (index == numberOfBjets) -// bjetWeights.push_back(1); -// else -// bjetWeights.push_back(0); -// } -// } else -// bjetWeights = BjetWeights(jets, numberOfBjets); -// histMan_->setCurrentJetBin(jets.size()); -// histMan_->setCurrentBJetBin(numberOfBjets); -// unsigned int prescale(qcdPFRelIsoEPlusJetsSelection_->prescale(event)); -// const LeptonPointer signalLepton = qcdPFRelIsoEPlusJetsSelection_->signalLepton(event); -// const ElectronPointer signalElectron(boost::static_pointer_cast(signalLepton)); -// -// qcdEPlusjetsPFRelIsoElectronAnalyser_->setPrescale(prescale); -// for (unsigned int weightIndex = 0; weightIndex < bjetWeights.size(); ++weightIndex) { -// double bjetWeight = bjetWeights.at(weightIndex); -// histMan_->setCurrentBJetBin(weightIndex); -// qcdEPlusjetsPFRelIsoElectronAnalyser_->setScale(bjetWeight); -// -// qcdEPlusjetsPFRelIsoElectronAnalyser_->analyse(event); -// qcdEPlusjetsPFRelIsoElectronAnalyser_->analyseElectron(signalElectron, event->weight()); -// -// qcd_PFRelIso_binned_HT_analyser_electron_isolation_->setScale(bjetWeight); -// qcd_PFRelIso_binned_HT_analyser_electron_isolation_->analyse(Event::HT(jets), -// signalElectron->pfRelativeIsolation(0.3), event->weight()); -// -// qcd_PFRelIso_binned_HT_analyser_electron_rhocorrected_isolation_->setScale(bjetWeight); -// qcd_PFRelIso_binned_HT_analyser_electron_rhocorrected_isolation_->analyse(Event::HT(jets), -// signalElectron->pfRelativeIsolationRhoCorrected(), event->weight()); -// -// for (unsigned int metIndex = 0; metIndex < METAlgorithm::NUMBER_OF_METALGORITHMS; ++metIndex) { -// if (!MET::isAvailableInNTupleVersion(Globals::NTupleVersion, metIndex)) -// continue; -// bool isMCOnlyMET = MET::isMCOnlyMETType(metIndex); -// //skip MC only MET entries -// if (isMCOnlyMET && event->isRealData()) -// continue; -// string metPrefix = METAlgorithm::names.at(metIndex); -// const METPointer met(event->MET((METAlgorithm::value) metIndex)); -// -// //this is rho corrected as well! But a bit different, due to 2011 active areas I assume -// qcd_PFRelIso_binned_MET_analyser_electron_isolation_.at(metIndex)->setScale(bjetWeight); -// qcd_PFRelIso_binned_MET_analyser_electron_isolation_.at(metIndex)->analyse(met->et(), -// signalElectron->pfRelativeIsolation(0.3), event->weight()); -// -// qcd_PFRelIso_binned_MET_analyser_electron_rhocorrected_isolation_.at(metIndex)->setScale(bjetWeight); -// qcd_PFRelIso_binned_MET_analyser_electron_rhocorrected_isolation_.at(metIndex)->analyse(met->et(), -// signalElectron->pfRelativeIsolationRhoCorrected(), event->weight()); -// -// qcd_PFRelIso_binned_ST_analyser_electron_isolation_.at(metIndex)->setScale(bjetWeight); -// qcd_PFRelIso_binned_ST_analyser_electron_isolation_.at(metIndex)->analyse( -// Event::ST(jets, signalElectron, met), signalElectron->pfRelativeIsolation(0.3), -// event->weight()); -// -// qcd_PFRelIso_binned_ST_analyser_electron_rhocorrected_isolation_.at(metIndex)->setScale(bjetWeight); -// qcd_PFRelIso_binned_ST_analyser_electron_rhocorrected_isolation_.at(metIndex)->analyse( -// Event::ST(jets, signalElectron, met), signalElectron->pfRelativeIsolationRhoCorrected(), -// event->weight()); -// -// qcd_PFRelIso_binned_MT_analyser_electron_isolation_.at(metIndex)->setScale(bjetWeight); -// qcd_PFRelIso_binned_MT_analyser_electron_isolation_.at(metIndex)->analyse( -// Event::MT(signalElectron, met), signalElectron->pfRelativeIsolation(0.3), event->weight()); -// -// qcd_PFRelIso_binned_MT_analyser_electron_rhocorrected_isolation_.at(metIndex)->setScale(bjetWeight); -// qcd_PFRelIso_binned_MT_analyser_electron_rhocorrected_isolation_.at(metIndex)->analyse( -// Event::MT(signalElectron, met), signalElectron->pfRelativeIsolationRhoCorrected(), -// event->weight()); -// -// qcd_PFRelIso_binned_WPT_analyser_electron_isolation_.at(metIndex)->setScale(bjetWeight); -// qcd_PFRelIso_binned_WPT_analyser_electron_isolation_.at(metIndex)->analyse( -// Event::WPT(signalElectron, met), signalElectron->pfRelativeIsolation(0.3), event->weight()); -// -// qcd_PFRelIso_binned_WPT_analyser_electron_rhocorrected_isolation_.at(metIndex)->setScale(bjetWeight); -// qcd_PFRelIso_binned_WPT_analyser_electron_rhocorrected_isolation_.at(metIndex)->analyse( -// Event::WPT(signalElectron, met), signalElectron->pfRelativeIsolationRhoCorrected(), -// event->weight()); -// -// } -// } -// } + if (qcdPFRelIsoEPlusJetsSelection_->passesSelectionUpToStep(event, + TTbarEPlusJetsReferenceSelection::AtLeastFourGoodJets)) { + const JetCollection jets(qcdPFRelIsoEPlusJetsSelection_->cleanedJets(event)); + const JetCollection bJets(qcdPFRelIsoEPlusJetsSelection_->cleanedBJets(event)); + unsigned int numberOfBjets(bJets.size()); + vector bjetWeights; + if (event->isRealData()) { + for (unsigned int index = 0; index <= numberOfBjets; ++index) { + if (index == numberOfBjets) + bjetWeights.push_back(1); + else + bjetWeights.push_back(0); + } + } else + bjetWeights = BjetWeights(jets, numberOfBjets); + histMan_->setCurrentJetBin(jets.size()); + histMan_->setCurrentBJetBin(numberOfBjets); + unsigned int prescale(qcdPFRelIsoEPlusJetsSelection_->prescale(event)); + const LeptonPointer signalLepton = qcdPFRelIsoEPlusJetsSelection_->signalLepton(event); + const ElectronPointer signalElectron(boost::static_pointer_cast(signalLepton)); + + qcdEPlusjetsPFRelIsoElectronAnalyser_->setPrescale(prescale); + for (unsigned int weightIndex = 0; weightIndex < bjetWeights.size(); ++weightIndex) { + double bjetWeight = bjetWeights.at(weightIndex); + histMan_->setCurrentBJetBin(weightIndex); + qcdEPlusjetsPFRelIsoElectronAnalyser_->setScale(bjetWeight); + + qcdEPlusjetsPFRelIsoElectronAnalyser_->analyse(event); + qcdEPlusjetsPFRelIsoElectronAnalyser_->analyseElectron(signalElectron, event->weight()); + } + } } void TTbar_plus_X_analyser::muPlusJetsSignalAnalysis(const EventPtr event) { @@ -544,72 +416,6 @@ void TTbar_plus_X_analyser::muPlusJetsSignalAnalysis(const EventPtr event) { } -//void TTbar_plus_X_analyser::muPlusJetsSystematicsAnalysis(const EventPtr event) { -// -// if (topMuplusJetsRefSelection_->passesSelectionUpToStep(event, 1)) { -// const JetCollection jets(topMuplusJetsRefSelection_->cleanedJets(event)); -// const JetCollection bJets(topMuplusJetsRefSelection_->cleanedBJets(event)); -// unsigned int numberOfBjets(bJets.size()); -// vector bjetWeights; -// if (event->isRealData()) { -// for (unsigned int index = 0; index <= numberOfBjets; ++index) { -// if (index == numberOfBjets) -// bjetWeights.push_back(1); -// else -// bjetWeights.push_back(0); -// } -// } else -// bjetWeights = BjetWeights(jets, numberOfBjets); -// histMan_->setCurrentJetBin(jets.size()); -// histMan_->setCurrentBJetBin(numberOfBjets); -// const LeptonPointer signalLepton = topMuplusJetsRefSelection_->signalLepton(event); -// const MuonPointer signalMuon(boost::static_pointer_cast(signalLepton)); -// double efficiencyCorrection = event->isRealData() ? 1. : signalMuon->getEfficiencyCorrection(false); -// -// for (unsigned int weightIndex = 0; weightIndex < bjetWeights.size(); ++weightIndex) { -// double bjetWeight = bjetWeights.at(weightIndex); -// histMan_->setCurrentBJetBin(weightIndex); -// histMan_->setCurrentHistogramFolder(histogramFolder_ + "/MuPlusJets/Ref selection"); -// -// metAnalyserMuPlusJetsNoSelection_->setScale(bjetWeight * efficiencyCorrection); -// -// metAnalyserMuPlusJetsNoSelection_->analyse(event, signalLepton, jets); -// -// no_selection_binned_HT_analyser_muon_eta_->setScale(bjetWeight * efficiencyCorrection); -// no_selection_binned_HT_analyser_muon_eta_->analyse(Event::HT(jets), fabs(signalMuon->eta()), -// event->weight()); -// -// for (unsigned int metIndex = 0; metIndex < METAlgorithm::NUMBER_OF_METALGORITHMS; ++metIndex) { -// if (!MET::isAvailableInNTupleVersion(Globals::NTupleVersion, metIndex)) -// continue; -// bool isMCOnlyMET = MET::isMCOnlyMETType(metIndex); -// //skip MC only MET entries -// if (isMCOnlyMET && event->isRealData()) -// continue; -// string metPrefix = METAlgorithm::names.at(metIndex); -// const METPointer met(event->MET((METAlgorithm::value) metIndex)); -// no_selection_binned_MET_analyser_muon_eta_.at(metIndex)->setScale(bjetWeight * efficiencyCorrection); -// no_selection_binned_MET_analyser_muon_eta_.at(metIndex)->analyse(met->et(), fabs(signalMuon->eta()), -// event->weight()); -// -// no_selection_binned_ST_analyser_muon_eta_.at(metIndex)->setScale(bjetWeight * efficiencyCorrection); -// no_selection_binned_ST_analyser_muon_eta_.at(metIndex)->analyse(Event::ST(jets, signalMuon, met), -// fabs(signalMuon->eta()), event->weight()); -// -// no_selection_binned_MT_analyser_muon_eta_.at(metIndex)->setScale(bjetWeight * efficiencyCorrection); -// no_selection_binned_MT_analyser_muon_eta_.at(metIndex)->analyse(Event::MT(signalMuon, met), -// fabs(signalMuon->eta()), event->weight()); -// -// no_selection_binned_WPT_analyser_muon_eta_.at(metIndex)->setScale(bjetWeight * efficiencyCorrection); -// no_selection_binned_WPT_analyser_muon_eta_.at(metIndex)->analyse(Event::WPT(signalMuon, met), -// fabs(signalMuon->eta()), event->weight()); -// } -// } -// -// } -// -//} - void TTbar_plus_X_analyser::muPlusJetsQcdAnalysis(const EventPtr event) { //selection with respect to reference selection if (qcd_noniso_muon_plus_jets_selection_->passesSelectionUpToStep(event, @@ -749,102 +555,38 @@ void TTbar_plus_X_analyser::muPlusJetsQcdAnalysis(const EventPtr event) { } } -// if (qcdPFRelIsoMuPlusJetsSelection_->passesSelectionUpToStep(event, -// TTbarMuPlusJetsReferenceSelection::AtLeastThreeGoodJets)) { -// const JetCollection jets(qcdPFRelIsoMuPlusJetsSelection_->cleanedJets(event)); -// const JetCollection bJets(qcdPFRelIsoMuPlusJetsSelection_->cleanedBJets(event)); -// unsigned int numberOfBjets(bJets.size()); -// vector bjetWeights; -// if (event->isRealData()) { -// for (unsigned int index = 0; index <= numberOfBjets; ++index) { -// if (index == numberOfBjets) -// bjetWeights.push_back(1); -// else -// bjetWeights.push_back(0); -// } -// } else -// bjetWeights = BjetWeights(jets, numberOfBjets); -// histMan_->setCurrentJetBin(jets.size()); -// histMan_->setCurrentBJetBin(numberOfBjets); -// unsigned int prescale(qcdPFRelIsoMuPlusJetsSelection_->prescale(event)); -// const LeptonPointer signalLepton = qcdPFRelIsoMuPlusJetsSelection_->signalLepton(event); -// const MuonPointer signalMuon(boost::static_pointer_cast(signalLepton)); -// double efficiencyCorrection = event->isRealData() ? 1. : signalMuon->getEfficiencyCorrection(true); -// -// qcdMuPlusjetsPFRelIsoMuonAnalyser_->setPrescale(prescale); -// for (unsigned int weightIndex = 0; weightIndex < bjetWeights.size(); ++weightIndex) { -// double bjetWeight = bjetWeights.at(weightIndex); -// histMan_->setCurrentBJetBin(weightIndex); -// qcdMuPlusjetsPFRelIsoMuonAnalyser_->setScale(bjetWeight * efficiencyCorrection); -// -// qcdMuPlusjetsPFRelIsoMuonAnalyser_->analyse(event); -// qcdMuPlusjetsPFRelIsoMuonAnalyser_->analyseMuon(signalMuon, event->weight()); -// -// qcd_PFRelIso_binned_HT_analyser_muon_eta_->setScale(bjetWeight * efficiencyCorrection); -// qcd_PFRelIso_binned_HT_analyser_muon_eta_->analyse(Event::HT(jets), fabs(signalMuon->eta()), -// event->weight()); -// for (unsigned int metIndex = 0; metIndex < METAlgorithm::NUMBER_OF_METALGORITHMS; ++metIndex) { -// if (!MET::isAvailableInNTupleVersion(Globals::NTupleVersion, metIndex)) -// continue; -// bool isMCOnlyMET = MET::isMCOnlyMETType(metIndex); -// //skip MC only MET entries -// if (isMCOnlyMET && event->isRealData()) -// continue; -// string metPrefix = METAlgorithm::names.at(metIndex); -// const METPointer met(event->MET((METAlgorithm::value) metIndex)); -// qcd_PFRelIso_binned_MET_analyser_muon_eta_.at(metIndex)->setScale(bjetWeight * efficiencyCorrection); -// qcd_PFRelIso_binned_MET_analyser_muon_eta_.at(metIndex)->analyse(met->et(), fabs(signalMuon->eta()), -// event->weight()); -// -// qcd_PFRelIso_binned_ST_analyser_muon_eta_.at(metIndex)->setScale(bjetWeight * efficiencyCorrection); -// qcd_PFRelIso_binned_ST_analyser_muon_eta_.at(metIndex)->analyse(Event::ST(jets, signalMuon, met), -// fabs(signalMuon->eta()), event->weight()); -// -// qcd_PFRelIso_binned_MT_analyser_muon_eta_.at(metIndex)->setScale(bjetWeight * efficiencyCorrection); -// qcd_PFRelIso_binned_MT_analyser_muon_eta_.at(metIndex)->analyse(Event::MT(signalMuon, met), -// fabs(signalMuon->eta()), event->weight()); -// -// qcd_PFRelIso_binned_WPT_analyser_muon_eta_.at(metIndex)->setScale(bjetWeight * efficiencyCorrection); -// qcd_PFRelIso_binned_WPT_analyser_muon_eta_.at(metIndex)->analyse(Event::WPT(signalMuon, met), -// fabs(signalMuon->eta()), event->weight()); -// } -// } -// } -// -// if (qcd_noiso_muon_plus_jets_selection_->passesSelectionUpToStep(event, -// TTbarMuPlusJetsReferenceSelection::AtLeastThreeGoodJets)) { -// const JetCollection jets(qcd_noiso_muon_plus_jets_selection_->cleanedJets(event)); -// const JetCollection bJets(qcd_noiso_muon_plus_jets_selection_->cleanedBJets(event)); -// unsigned int numberOfBjets(bJets.size()); -// vector bjetWeights; -// if (event->isRealData()) { -// for (unsigned int index = 0; index <= numberOfBjets; ++index) { -// if (index == numberOfBjets) -// bjetWeights.push_back(1); -// else -// bjetWeights.push_back(0); -// } -// } else -// bjetWeights = BjetWeights(jets, numberOfBjets); -// histMan_->setCurrentJetBin(jets.size()); -// histMan_->setCurrentBJetBin(numberOfBjets); -// unsigned int prescale(qcd_noiso_muon_plus_jets_selection_->prescale(event)); -// const LeptonPointer signalLepton = qcd_noiso_muon_plus_jets_selection_->signalLepton(event); -// const MuonPointer signalMuon(boost::static_pointer_cast(signalLepton)); -// double efficiencyCorrection = event->isRealData() ? 1. : signalMuon->getEfficiencyCorrection(true); -// -// qcdNoIsolationMuonAnalyser_->setPrescale(prescale); -// for (unsigned int weightIndex = 0; weightIndex < bjetWeights.size(); ++weightIndex) { -// double bjetWeight = bjetWeights.at(weightIndex); -// histMan_->setCurrentBJetBin(weightIndex); -// qcdNoIsolationMuonAnalyser_->setScale(bjetWeight * efficiencyCorrection); -// -// qcdNoIsolationMuonAnalyser_->analyse(event); -// qcdNoIsolationMuonAnalyser_->analyseMuon(signalMuon, event->weight()); -// -// } -// } + if (qcdPFRelIsoMuPlusJetsSelection_->passesSelectionUpToStep(event, + TTbarMuPlusJetsReferenceSelection::AtLeastThreeGoodJets)) { + const JetCollection jets(qcdPFRelIsoMuPlusJetsSelection_->cleanedJets(event)); + const JetCollection bJets(qcdPFRelIsoMuPlusJetsSelection_->cleanedBJets(event)); + unsigned int numberOfBjets(bJets.size()); + vector bjetWeights; + if (event->isRealData()) { + for (unsigned int index = 0; index <= numberOfBjets; ++index) { + if (index == numberOfBjets) + bjetWeights.push_back(1); + else + bjetWeights.push_back(0); + } + } else + bjetWeights = BjetWeights(jets, numberOfBjets); + histMan_->setCurrentJetBin(jets.size()); + histMan_->setCurrentBJetBin(numberOfBjets); + unsigned int prescale(qcdPFRelIsoMuPlusJetsSelection_->prescale(event)); + const LeptonPointer signalLepton = qcdPFRelIsoMuPlusJetsSelection_->signalLepton(event); + const MuonPointer signalMuon(boost::static_pointer_cast(signalLepton)); + double efficiencyCorrection = event->isRealData() ? 1. : signalMuon->getEfficiencyCorrection(true); + + qcdMuPlusjetsPFRelIsoMuonAnalyser_->setPrescale(prescale); + for (unsigned int weightIndex = 0; weightIndex < bjetWeights.size(); ++weightIndex) { + double bjetWeight = bjetWeights.at(weightIndex); + histMan_->setCurrentBJetBin(weightIndex); + qcdMuPlusjetsPFRelIsoMuonAnalyser_->setScale(bjetWeight * efficiencyCorrection); + qcdMuPlusjetsPFRelIsoMuonAnalyser_->analyse(event); + qcdMuPlusjetsPFRelIsoMuonAnalyser_->analyseMuon(signalMuon, event->weight()); + } + } } void TTbar_plus_X_analyser::createHistograms() { @@ -874,10 +616,8 @@ void TTbar_plus_X_analyser::createHistograms() { histMan_->addH1D_BJetBinned("bjet_invariant_mass", "Invariant mass of 2 b-jets; m(b-jet, b-jet); Events", 5000, 0, 5000); //signal -// metAnalyserEPlusJetsNoSelection_->createHistograms(); metAnalyserEPlusJetsRefSelection_->createHistograms(); electronAnalyserRefSelection_->createHistograms(); -// metAnalyserMuPlusJetsNoSelection_->createHistograms(); metAnalyserMuPlusJetsRefSelection_->createHistograms(); muonAnalyserRefSelection_->createHistograms(); @@ -888,81 +628,55 @@ void TTbar_plus_X_analyser::createHistograms() { metAnalyserqcdNonIsoElectronSelection_->createHistograms(); qcdNonIsoMuonAnalyser_->createHistograms(); qcdNonIsoMuonAnalyser_ge4j_->createHistograms(); -// qcdNoIsolationMuonAnalyser_->createHistograms(); metAnalyserqcdNonIsoMuonSelection_->createHistograms(); metAnalyserqcdNonIsoMuonSelection_ge4j_->createHistograms(); qcdConversionsElectronAnalyser_->createHistograms(); metAnalyserqcdConversionSelection_->createHistograms(); -// qcdEPlusjetsPFRelIsoElectronAnalyser_->createHistograms(); -// qcdMuPlusjetsPFRelIsoMuonAnalyser_->createHistograms(); + qcdEPlusjetsPFRelIsoElectronAnalyser_->createHistograms(); + qcdMuPlusjetsPFRelIsoMuonAnalyser_->createHistograms(); for (unsigned int index = 0; index < ref_selection_binned_MET_analyser_electron_eta_.size(); ++index) { ref_selection_binned_MET_analyser_electron_eta_.at(index)->createHistograms(); } -// no_selection_binned_HT_analyser_electron_eta_->createHistograms(); -// no_selection_binned_HT_analyser_muon_eta_->createHistograms(); ref_selection_binned_HT_analyser_electron_eta_->createHistograms(); ref_selection_binned_HT_analyser_muon_eta_->createHistograms(); qcd_noniso_binned_HT_analyser_electron_eta_->createHistograms(); qcd_noniso_binned_HT_analyser_muon_eta_->createHistograms(); -// qcd_PFRelIso_binned_HT_analyser_electron_isolation_->createHistograms(); -// qcd_PFRelIso_binned_HT_analyser_electron_rhocorrected_isolation_->createHistograms(); -// qcd_PFRelIso_binned_HT_analyser_muon_eta_->createHistograms(); qcd_conversion_binned_HT_analyser_electron_eta_->createHistograms(); for (unsigned int index = 0; index < METAlgorithm::NUMBER_OF_METALGORITHMS; ++index) { if (!MET::isAvailableInNTupleVersion(Globals::NTupleVersion, index)) continue; -// no_selection_binned_MET_analyser_electron_eta_.at(index)->createHistograms(); ref_selection_binned_MET_analyser_electron_eta_.at(index)->createHistograms(); qcd_conversion_binned_MET_analyser_electron_eta_.at(index)->createHistograms(); qcd_noniso_binned_MET_analyser_electron_eta_.at(index)->createHistograms(); -// qcd_PFRelIso_binned_MET_analyser_electron_isolation_.at(index)->createHistograms(); -// qcd_PFRelIso_binned_MET_analyser_electron_rhocorrected_isolation_.at(index)->createHistograms(); -// no_selection_binned_MET_analyser_muon_eta_.at(index)->createHistograms(); ref_selection_binned_MET_analyser_muon_eta_.at(index)->createHistograms(); -// qcd_PFRelIso_binned_MET_analyser_muon_eta_.at(index)->createHistograms(); qcd_noniso_binned_MET_analyser_muon_eta_.at(index)->createHistograms(); -// no_selection_binned_ST_analyser_electron_eta_.at(index)->createHistograms(); ref_selection_binned_ST_analyser_electron_eta_.at(index)->createHistograms(); qcd_conversion_binned_ST_analyser_electron_eta_.at(index)->createHistograms(); qcd_noniso_binned_ST_analyser_electron_eta_.at(index)->createHistograms(); -// qcd_PFRelIso_binned_ST_analyser_electron_isolation_.at(index)->createHistograms(); -// qcd_PFRelIso_binned_ST_analyser_electron_rhocorrected_isolation_.at(index)->createHistograms(); -// no_selection_binned_ST_analyser_muon_eta_.at(index)->createHistograms(); ref_selection_binned_ST_analyser_muon_eta_.at(index)->createHistograms(); -// qcd_PFRelIso_binned_ST_analyser_muon_eta_.at(index)->createHistograms(); qcd_noniso_binned_ST_analyser_muon_eta_.at(index)->createHistograms(); -// no_selection_binned_MT_analyser_electron_eta_.at(index)->createHistograms(); ref_selection_binned_MT_analyser_electron_eta_.at(index)->createHistograms(); qcd_conversion_binned_MT_analyser_electron_eta_.at(index)->createHistograms(); qcd_noniso_binned_MT_analyser_electron_eta_.at(index)->createHistograms(); -// qcd_PFRelIso_binned_MT_analyser_electron_isolation_.at(index)->createHistograms(); -// qcd_PFRelIso_binned_MT_analyser_electron_rhocorrected_isolation_.at(index)->createHistograms(); -// no_selection_binned_MT_analyser_muon_eta_.at(index)->createHistograms(); ref_selection_binned_MT_analyser_muon_eta_.at(index)->createHistograms(); -// qcd_PFRelIso_binned_MT_analyser_muon_eta_.at(index)->createHistograms(); qcd_noniso_binned_MT_analyser_muon_eta_.at(index)->createHistograms(); -// no_selection_binned_WPT_analyser_electron_eta_.at(index)->createHistograms(); ref_selection_binned_WPT_analyser_electron_eta_.at(index)->createHistograms(); qcd_conversion_binned_WPT_analyser_electron_eta_.at(index)->createHistograms(); qcd_noniso_binned_WPT_analyser_electron_eta_.at(index)->createHistograms(); -// qcd_PFRelIso_binned_WPT_analyser_electron_isolation_.at(index)->createHistograms(); -// qcd_PFRelIso_binned_WPT_analyser_electron_rhocorrected_isolation_.at(index)->createHistograms(); -// no_selection_binned_WPT_analyser_muon_eta_.at(index)->createHistograms(); ref_selection_binned_WPT_analyser_muon_eta_.at(index)->createHistograms(); -// qcd_PFRelIso_binned_WPT_analyser_muon_eta_.at(index)->createHistograms(); qcd_noniso_binned_WPT_analyser_muon_eta_.at(index)->createHistograms(); } @@ -978,15 +692,11 @@ TTbar_plus_X_analyser::TTbar_plus_X_analyser(HistogramManagerPtr histMan, std::s //QCD selections with respect to reference selection qcdNonIsoElectronSelection_(new QCDNonIsolatedElectronSelection()), // qcdConversionSelection_(new QCDConversionsSelection()), // -// qcdPFRelIsoEPlusJetsSelection_(new QCDPFRelIsoEPlusJetsSelection()), // -// qcdPFRelIsoMuPlusJetsSelection_(new QCDPFRelIsoMuPlusJetsSelection()), // qcd_noniso_muon_plus_jets_selection_(new QCDNonIsolatedMuonSelection()), // qcd_noniso_muon_plus_jets_selection_ge4j_(new QCDNonIsolatedMuonSelection()), // -// qcd_noiso_muon_plus_jets_selection_(new NoIsolationMuonSelection()), // + qcdPFRelIsoEPlusJetsSelection_(new QCDPFRelIsoEPlusJetsSelection()), // + qcdPFRelIsoMuPlusJetsSelection_(new QCDPFRelIsoMuPlusJetsSelection()), // //analysers - //no selection -// metAnalyserEPlusJetsNoSelection_(new METAnalyser(histMan, histogramFolder + "/EPlusJets/No selection/MET")), // -// metAnalyserMuPlusJetsNoSelection_(new METAnalyser(histMan, histogramFolder + "/MuPlusJets/No selection/MET")), // //signal regions metAnalyserEPlusJetsRefSelection_(new METAnalyser(histMan, histogramFolder + "/EPlusJets/Ref selection/MET")), // metAnalyserMuPlusJetsRefSelection_(new METAnalyser(histMan, histogramFolder + "/MuPlusJets/Ref selection/MET")), // @@ -1013,32 +723,23 @@ TTbar_plus_X_analyser::TTbar_plus_X_analyser(HistogramManagerPtr histMan, std::s metAnalyserqcdConversionSelection_(new METAnalyser(histMan, histogramFolder + "/EPlusJets/QCDConversions/MET")), // qcdConversionsElectronAnalyser_( new ElectronAnalyser(histMan, histogramFolder + "/EPlusJets/QCDConversions/Electron", true)), // -// qcdEPlusjetsPFRelIsoElectronAnalyser_( -// new ElectronAnalyser(histMan, histogramFolder + "/EPlusJets/QCD e+jets PFRelIso/Electron", true)), // -// qcdMuPlusjetsPFRelIsoMuonAnalyser_( -// new MuonAnalyser(histMan, histogramFolder + "/MuPlusJets/QCD mu+jets PFRelIso/Muon", true)), // -// qcdNoIsolationMuonAnalyser_(new MuonAnalyser(histMan, histogramFolder + "/MuPlusJets/QCD No Iso/Muon", true)), // + qcdEPlusjetsPFRelIsoElectronAnalyser_( + new ElectronAnalyser(histMan, histogramFolder + "/EPlusJets/QCD e+jets PFRelIso/Electron", true)), // + qcdMuPlusjetsPFRelIsoMuonAnalyser_( + new MuonAnalyser(histMan, histogramFolder + "/MuPlusJets/QCD mu+jets PFRelIso ge3j/Muon", true)), // metBins_(), // ht_bins_(), // st_bins_(), // mt_bins_(), // wpt_bins_(), // //MET -// no_selection_binned_MET_analyser_electron_eta_(), // ref_selection_binned_MET_analyser_electron_eta_(), // qcd_conversion_binned_MET_analyser_electron_eta_(), // qcd_noniso_binned_MET_analyser_electron_eta_(), // -// qcd_PFRelIso_binned_MET_analyser_electron_isolation_(), // -// qcd_PFRelIso_binned_MET_analyser_electron_rhocorrected_isolation_(), // -// no_selection_binned_MET_analyser_muon_eta_(), // ref_selection_binned_MET_analyser_muon_eta_(), // qcd_noniso_binned_MET_analyser_muon_eta_(), // -// qcd_PFRelIso_binned_MET_analyser_muon_eta_(), // //HT -// no_selection_binned_HT_analyser_electron_eta_( -// new Binned_variable_analyser(histMan_, -// histogramFolder_ + "/EPlusJets/No selection/Binned_HT_Analysis")), // ref_selection_binned_HT_analyser_electron_eta_( new Binned_variable_analyser(histMan_, histogramFolder_ + "/EPlusJets/Ref selection/Binned_HT_Analysis")), // @@ -1048,63 +749,36 @@ TTbar_plus_X_analyser::TTbar_plus_X_analyser(HistogramManagerPtr histMan, std::s qcd_noniso_binned_HT_analyser_electron_eta_( new Binned_variable_analyser(histMan_, histogramFolder_ + "/EPlusJets/QCD non iso e+jets/Binned_HT_Analysis")), // -// qcd_PFRelIso_binned_HT_analyser_electron_isolation_( -// new Binned_variable_analyser(histMan_, -// histogramFolder_ + "/EPlusJets/QCD e+jets PFRelIso/Binned_HT_Analysis")), // -// qcd_PFRelIso_binned_HT_analyser_electron_rhocorrected_isolation_( -// new Binned_variable_analyser(histMan_, -// histogramFolder_ + "/EPlusJets/QCD e+jets PFRelIso/Binned_HT_Analysis")), // //HT muons -// no_selection_binned_HT_analyser_muon_eta_( -// new Binned_variable_analyser(histMan_, -// histogramFolder_ + "/MuPlusJets/No selection/Binned_HT_Analysis")), // ref_selection_binned_HT_analyser_muon_eta_( new Binned_variable_analyser(histMan_, histogramFolder_ + "/MuPlusJets/Ref selection/Binned_HT_Analysis")), // qcd_noniso_binned_HT_analyser_muon_eta_( new Binned_variable_analyser(histMan_, histogramFolder_ + "/MuPlusJets/QCD non iso mu+jets ge3j/Binned_HT_Analysis")), // -// qcd_PFRelIso_binned_HT_analyser_muon_eta_( -// new Binned_variable_analyser(histMan_, -// histogramFolder_ + "/MuPlusJets/QCD mu+jets PFRelIso/Binned_HT_Analysis")), // //ST -// no_selection_binned_ST_analyser_electron_eta_(), // ref_selection_binned_ST_analyser_electron_eta_(), // qcd_conversion_binned_ST_analyser_electron_eta_(), // qcd_noniso_binned_ST_analyser_electron_eta_(), // -// qcd_PFRelIso_binned_ST_analyser_electron_isolation_(), // -// qcd_PFRelIso_binned_ST_analyser_electron_rhocorrected_isolation_(), // //ST -// no_selection_binned_ST_analyser_muon_eta_(), // ref_selection_binned_ST_analyser_muon_eta_(), // qcd_noniso_binned_ST_analyser_muon_eta_(), // -// qcd_PFRelIso_binned_ST_analyser_muon_eta_(), // //MT electrons -// no_selection_binned_MT_analyser_electron_eta_(), // ref_selection_binned_MT_analyser_electron_eta_(), // qcd_conversion_binned_MT_analyser_electron_eta_(), // qcd_noniso_binned_MT_analyser_electron_eta_(), // -// qcd_PFRelIso_binned_MT_analyser_electron_isolation_(), // -// qcd_PFRelIso_binned_MT_analyser_electron_rhocorrected_isolation_(), // //MT muons -// no_selection_binned_MT_analyser_muon_eta_(), // ref_selection_binned_MT_analyser_muon_eta_(), // qcd_noniso_binned_MT_analyser_muon_eta_(), // -// qcd_PFRelIso_binned_MT_analyser_muon_eta_(), // //WPT electrons -// no_selection_binned_WPT_analyser_electron_eta_(), // ref_selection_binned_WPT_analyser_electron_eta_(), // qcd_conversion_binned_WPT_analyser_electron_eta_(), // qcd_noniso_binned_WPT_analyser_electron_eta_(), // -// qcd_PFRelIso_binned_WPT_analyser_electron_isolation_(), // -// qcd_PFRelIso_binned_WPT_analyser_electron_rhocorrected_isolation_(), // //WPT muons -// no_selection_binned_WPT_analyser_muon_eta_(), // ref_selection_binned_WPT_analyser_muon_eta_(), // qcd_noniso_binned_WPT_analyser_muon_eta_(), // -// qcd_PFRelIso_binned_WPT_analyser_muon_eta_(), // jetAnalyserEPlusJetsRefSelection_(new JetAnalyser(histMan, histogramFolder + "/EPlusJets/Ref selection/Jets")), // jetAnalyserMuPlusJetsRefSelection_(new JetAnalyser(histMan, histogramFolder + "/MuPlusJets/Ref selection/Jets")) { @@ -1160,9 +834,6 @@ void TTbar_plus_X_analyser::make_binned_MET_analysers() { continue; string metPrefix = METAlgorithm::names.at(metIndex); - Binned_Variable_analyser_ptr no_selection_binned_met_electron_eta_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/EPlusJets/No selection/Binned_MET_Analysis")); Binned_Variable_analyser_ptr ref_selection_binned_met_electron_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/EPlusJets/Ref selection/Binned_MET_Analysis")); @@ -1172,78 +843,42 @@ void TTbar_plus_X_analyser::make_binned_MET_analysers() { Binned_Variable_analyser_ptr qcd_noniso_binned_met_electron_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/EPlusJets/QCD non iso e+jets/Binned_MET_Analysis")); - Binned_Variable_analyser_ptr qcd_PFRelIso_binned_met_electron_isolation_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/EPlusJets/QCD e+jets PFRelIso/Binned_MET_Analysis")); - Binned_Variable_analyser_ptr qcd_PFRelIso_binned_met_electron_rhocorrected_isolation_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/EPlusJets/QCD e+jets PFRelIso/Binned_MET_Analysis")); - no_selection_binned_met_electron_eta_analyser->set_variables(metPrefix, metBins_, "electron_absolute_eta", 30, - 0.0, 3.0); ref_selection_binned_met_electron_eta_analyser->set_variables(metPrefix, metBins_, "electron_absolute_eta", 30, 0.0, 3.0); qcd_conversion_binned_met_electron_eta_analyser->set_variables(metPrefix, metBins_, "electron_absolute_eta", 30, 0.0, 3.0); qcd_noniso_binned_met_electron_eta_analyser->set_variables(metPrefix, metBins_, "electron_absolute_eta", 30, 0.0, 3.0); - qcd_PFRelIso_binned_met_electron_isolation_analyser->set_variables(metPrefix, metBins_, - "electron_pfIsolation_03", 500, 0, 5); - qcd_PFRelIso_binned_met_electron_rhocorrected_isolation_analyser->set_variables(metPrefix, metBins_, - "electron_rhoCorrectedIso_03", 500, 0, 5); -// no_selection_binned_MET_analyser_electron_eta_.push_back(no_selection_binned_met_electron_eta_analyser); ref_selection_binned_MET_analyser_electron_eta_.push_back(ref_selection_binned_met_electron_eta_analyser); qcd_conversion_binned_MET_analyser_electron_eta_.push_back(qcd_conversion_binned_met_electron_eta_analyser); qcd_noniso_binned_MET_analyser_electron_eta_.push_back(qcd_noniso_binned_met_electron_eta_analyser); -// qcd_PFRelIso_binned_MET_analyser_electron_isolation_.push_back( -// qcd_PFRelIso_binned_met_electron_isolation_analyser); -// qcd_PFRelIso_binned_MET_analyser_electron_rhocorrected_isolation_.push_back( -// qcd_PFRelIso_binned_met_electron_rhocorrected_isolation_analyser); //binned MET muons - Binned_Variable_analyser_ptr no_selection_binned_met_muon_eta_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/MuPlusJets/No selection/Binned_MET_Analysis")); Binned_Variable_analyser_ptr ref_selection_binned_met_muon_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/MuPlusJets/Ref selection/Binned_MET_Analysis")); - Binned_Variable_analyser_ptr qcd_PFRelIso_binned_met_muon_eta_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/MuPlusJets/QCD mu+jets PFRelIso/Binned_MET_Analysis")); Binned_Variable_analyser_ptr qcd_noniso_binned_met_muon_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/MuPlusJets/QCD non iso mu+jets ge3j/Binned_MET_Analysis")); - no_selection_binned_met_muon_eta_analyser->set_variables(metPrefix, metBins_, "muon_absolute_eta", 30, 0.0, - 3.0); ref_selection_binned_met_muon_eta_analyser->set_variables(metPrefix, metBins_, "muon_absolute_eta", 30, 0.0, 3.0); - qcd_PFRelIso_binned_met_muon_eta_analyser->set_variables(metPrefix, metBins_, "muon_absolute_eta", 30, 0.0, - 3.0); qcd_noniso_binned_met_muon_eta_analyser->set_variables(metPrefix, metBins_, "muon_absolute_eta", 30, 0.0, 3.0); -// no_selection_binned_MET_analyser_muon_eta_.push_back(no_selection_binned_met_muon_eta_analyser); ref_selection_binned_MET_analyser_muon_eta_.push_back(ref_selection_binned_met_muon_eta_analyser); -// qcd_PFRelIso_binned_MET_analyser_muon_eta_.push_back(qcd_PFRelIso_binned_met_muon_eta_analyser); qcd_noniso_binned_MET_analyser_muon_eta_.push_back(qcd_noniso_binned_met_muon_eta_analyser); } } void TTbar_plus_X_analyser::make_binned_HT_analysers() { -// no_selection_binned_HT_analyser_electron_eta_->set_variables("HT", ht_bins_, "electron_absolute_eta", 30, 0.0, 3.0); ref_selection_binned_HT_analyser_electron_eta_->set_variables("HT", ht_bins_, "electron_absolute_eta", 30, 0.0, 3.0); qcd_conversion_binned_HT_analyser_electron_eta_->set_variables("HT", ht_bins_, "electron_absolute_eta", 30, 0.0, 3.0); qcd_noniso_binned_HT_analyser_electron_eta_->set_variables("HT", ht_bins_, "electron_absolute_eta", 30, 0.0, 3.0); -// qcd_PFRelIso_binned_HT_analyser_electron_isolation_->set_variables("HT", ht_bins_, "electron_pfIsolation_03", 500, -// 0, 5); -// qcd_PFRelIso_binned_HT_analyser_electron_rhocorrected_isolation_->set_variables("HT", ht_bins_, -// "electron_rhoCorrectedIso_03", 500, 0, 5); - -// no_selection_binned_HT_analyser_muon_eta_->set_variables("HT", ht_bins_, "muon_absolute_eta", 30, 0.0, 3.0); + // muon channel ref_selection_binned_HT_analyser_muon_eta_->set_variables("HT", ht_bins_, "muon_absolute_eta", 30, 0.0, 3.0); -// qcd_PFRelIso_binned_HT_analyser_muon_eta_->set_variables("HT", ht_bins_, "muon_absolute_eta", 30, 0.0, 3.0); qcd_noniso_binned_HT_analyser_muon_eta_->set_variables("HT", ht_bins_, "muon_absolute_eta", 30, 0.0, 3.0); } @@ -1254,9 +889,6 @@ void TTbar_plus_X_analyser::make_binned_ST_analysers() { continue; string metPrefix = METAlgorithm::names.at(metIndex); - Binned_Variable_analyser_ptr no_selection_binned_ST_electron_eta_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/EPlusJets/No selection/Binned_ST_Analysis")); Binned_Variable_analyser_ptr ref_selection_binned_ST_electron_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/EPlusJets/Ref selection/Binned_ST_Analysis")); @@ -1266,14 +898,6 @@ void TTbar_plus_X_analyser::make_binned_ST_analysers() { Binned_Variable_analyser_ptr qcd_noniso_binned_ST_electron_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/EPlusJets/QCD non iso e+jets/Binned_ST_Analysis")); - Binned_Variable_analyser_ptr qcd_PFRelIso_binned_ST_electron_isolation_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/EPlusJets/QCD e+jets PFRelIso/Binned_ST_Analysis")); - Binned_Variable_analyser_ptr qcd_PFRelIso_binned_ST_electron_rhocorrected_isolation_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/EPlusJets/QCD e+jets PFRelIso/Binned_ST_Analysis")); - no_selection_binned_ST_electron_eta_analyser->set_variables("ST_with_" + metPrefix, st_bins_, - "electron_absolute_eta", 30, 0.0, 3.0); ref_selection_binned_ST_electron_eta_analyser->set_variables("ST_with_" + metPrefix, st_bins_, "electron_absolute_eta", 30, 0.0, 3.0); @@ -1281,45 +905,24 @@ void TTbar_plus_X_analyser::make_binned_ST_analysers() { "electron_absolute_eta", 30, 0.0, 3.0); qcd_noniso_binned_ST_electron_eta_analyser->set_variables("ST_with_" + metPrefix, st_bins_, "electron_absolute_eta", 30, 0.0, 3.0); - qcd_PFRelIso_binned_ST_electron_isolation_analyser->set_variables("ST_with_" + metPrefix, st_bins_, - "electron_pfIsolation_03", 500, 0, 5); - qcd_PFRelIso_binned_ST_electron_rhocorrected_isolation_analyser->set_variables("ST_with_" + metPrefix, st_bins_, - "electron_rhoCorrectedIso_03", 500, 0, 5); -// no_selection_binned_ST_analyser_electron_eta_.push_back(no_selection_binned_ST_electron_eta_analyser); ref_selection_binned_ST_analyser_electron_eta_.push_back(ref_selection_binned_ST_electron_eta_analyser); qcd_conversion_binned_ST_analyser_electron_eta_.push_back(qcd_conversion_binned_ST_electron_eta_analyser); qcd_noniso_binned_ST_analyser_electron_eta_.push_back(qcd_noniso_binned_ST_electron_eta_analyser); -// qcd_PFRelIso_binned_ST_analyser_electron_isolation_.push_back( -// qcd_PFRelIso_binned_ST_electron_isolation_analyser); -// qcd_PFRelIso_binned_ST_analyser_electron_rhocorrected_isolation_.push_back( -// qcd_PFRelIso_binned_ST_electron_rhocorrected_isolation_analyser); //binned ST muons - Binned_Variable_analyser_ptr no_selection_binned_ST_muon_eta_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/MuPlusJets/No selection/Binned_ST_Analysis")); Binned_Variable_analyser_ptr ref_selection_binned_ST_muon_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/MuPlusJets/Ref selection/Binned_ST_Analysis")); - Binned_Variable_analyser_ptr qcd_PFRelIso_binned_ST_muon_eta_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/MuPlusJets/QCD mu+jets PFRelIso/Binned_ST_Analysis")); Binned_Variable_analyser_ptr qcd_noniso_binned_ST_muon_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/MuPlusJets/QCD non iso mu+jets ge3j/Binned_ST_Analysis")); - no_selection_binned_ST_muon_eta_analyser->set_variables("ST_with_" + metPrefix, st_bins_, "muon_absolute_eta", - 30, 0.0, 3.0); ref_selection_binned_ST_muon_eta_analyser->set_variables("ST_with_" + metPrefix, st_bins_, "muon_absolute_eta", 30, 0.0, 3.0); - qcd_PFRelIso_binned_ST_muon_eta_analyser->set_variables("ST_with_" + metPrefix, st_bins_, "muon_absolute_eta", - 30, 0.0, 3.0); qcd_noniso_binned_ST_muon_eta_analyser->set_variables("ST_with_" + metPrefix, st_bins_, "muon_absolute_eta", 30, 0.0, 3.0); -// no_selection_binned_ST_analyser_muon_eta_.push_back(no_selection_binned_ST_muon_eta_analyser); ref_selection_binned_ST_analyser_muon_eta_.push_back(ref_selection_binned_ST_muon_eta_analyser); -// qcd_PFRelIso_binned_ST_analyser_muon_eta_.push_back(qcd_PFRelIso_binned_ST_muon_eta_analyser); qcd_noniso_binned_ST_analyser_muon_eta_.push_back(qcd_noniso_binned_ST_muon_eta_analyser); } @@ -1332,9 +935,6 @@ void TTbar_plus_X_analyser::make_binned_MT_analysers() { continue; string metPrefix = METAlgorithm::names.at(metIndex); - Binned_Variable_analyser_ptr no_selection_binned_MT_electron_eta_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/EPlusJets/No selection/Binned_MT_Analysis")); Binned_Variable_analyser_ptr ref_selection_binned_MT_electron_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/EPlusJets/Ref selection/Binned_MT_Analysis")); @@ -1344,60 +944,31 @@ void TTbar_plus_X_analyser::make_binned_MT_analysers() { Binned_Variable_analyser_ptr qcd_noniso_binned_MT_electron_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/EPlusJets/QCD non iso e+jets/Binned_MT_Analysis")); - Binned_Variable_analyser_ptr qcd_PFRelIso_binned_MT_electron_isolation_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/EPlusJets/QCD e+jets PFRelIso/Binned_MT_Analysis")); - Binned_Variable_analyser_ptr qcd_PFRelIso_binned_MT_electron_rhocorrected_isolation_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/EPlusJets/QCD e+jets PFRelIso/Binned_MT_Analysis")); - no_selection_binned_MT_electron_eta_analyser->set_variables("MT_with_" + metPrefix, mt_bins_, - "electron_absolute_eta", 30, 0.0, 3.0); ref_selection_binned_MT_electron_eta_analyser->set_variables("MT_with_" + metPrefix, mt_bins_, "electron_absolute_eta", 30, 0.0, 3.0); qcd_conversion_binned_MT_electron_eta_analyser->set_variables("MT_with_" + metPrefix, mt_bins_, "electron_absolute_eta", 30, 0.0, 3.0); qcd_noniso_binned_MT_electron_eta_analyser->set_variables("MT_with_" + metPrefix, mt_bins_, "electron_absolute_eta", 30, 0.0, 3.0); - qcd_PFRelIso_binned_MT_electron_isolation_analyser->set_variables("MT_with_" + metPrefix, mt_bins_, - "electron_pfIsolation_03", 500, 0, 5); - qcd_PFRelIso_binned_MT_electron_rhocorrected_isolation_analyser->set_variables("MT_with_" + metPrefix, mt_bins_, - "electron_rhoCorrectedIso_03", 500, 0, 5); -// no_selection_binned_MT_analyser_electron_eta_.push_back(no_selection_binned_MT_electron_eta_analyser); ref_selection_binned_MT_analyser_electron_eta_.push_back(ref_selection_binned_MT_electron_eta_analyser); qcd_conversion_binned_MT_analyser_electron_eta_.push_back(qcd_conversion_binned_MT_electron_eta_analyser); qcd_noniso_binned_MT_analyser_electron_eta_.push_back(qcd_noniso_binned_MT_electron_eta_analyser); -// qcd_PFRelIso_binned_MT_analyser_electron_isolation_.push_back( -// qcd_PFRelIso_binned_MT_electron_isolation_analyser); -// qcd_PFRelIso_binned_MT_analyser_electron_rhocorrected_isolation_.push_back( -// qcd_PFRelIso_binned_MT_electron_rhocorrected_isolation_analyser); //binned MT muons - Binned_Variable_analyser_ptr no_selection_binned_MT_muon_eta_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/MuPlusJets/No selection/Binned_MT_Analysis")); Binned_Variable_analyser_ptr ref_selection_binned_MT_muon_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/MuPlusJets/Ref selection/Binned_MT_Analysis")); - Binned_Variable_analyser_ptr qcd_PFRelIso_binned_MT_muon_eta_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/MuPlusJets/QCD mu+jets PFRelIso/Binned_MT_Analysis")); Binned_Variable_analyser_ptr qcd_noniso_binned_MT_muon_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/MuPlusJets/QCD non iso mu+jets ge3j/Binned_MT_Analysis")); - no_selection_binned_MT_muon_eta_analyser->set_variables("MT_with_" + metPrefix, mt_bins_, "muon_absolute_eta", - 30, 0.0, 3.0); ref_selection_binned_MT_muon_eta_analyser->set_variables("MT_with_" + metPrefix, mt_bins_, "muon_absolute_eta", 30, 0.0, 3.0); - qcd_PFRelIso_binned_MT_muon_eta_analyser->set_variables("MT_with_" + metPrefix, mt_bins_, "muon_absolute_eta", - 30, 0.0, 3.0); qcd_noniso_binned_MT_muon_eta_analyser->set_variables("MT_with_" + metPrefix, mt_bins_, "muon_absolute_eta", 30, 0.0, 3.0); -// no_selection_binned_MT_analyser_muon_eta_.push_back(no_selection_binned_MT_muon_eta_analyser); ref_selection_binned_MT_analyser_muon_eta_.push_back(ref_selection_binned_MT_muon_eta_analyser); -// qcd_PFRelIso_binned_MT_analyser_muon_eta_.push_back(qcd_PFRelIso_binned_MT_muon_eta_analyser); qcd_noniso_binned_MT_analyser_muon_eta_.push_back(qcd_noniso_binned_MT_muon_eta_analyser); } @@ -1410,9 +981,6 @@ void TTbar_plus_X_analyser::make_binned_WPT_analysers() { continue; string metPrefix = METAlgorithm::names.at(metIndex); - Binned_Variable_analyser_ptr no_selection_binned_WPT_electron_eta_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/EPlusJets/No selection/Binned_WPT_Analysis")); Binned_Variable_analyser_ptr ref_selection_binned_WPT_electron_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/EPlusJets/Ref selection/Binned_WPT_Analysis")); @@ -1422,32 +990,15 @@ void TTbar_plus_X_analyser::make_binned_WPT_analysers() { Binned_Variable_analyser_ptr qcd_noniso_binned_WPT_electron_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/EPlusJets/QCD non iso e+jets/Binned_WPT_Analysis")); - Binned_Variable_analyser_ptr qcd_PFRelIso_binned_WPT_electron_isolation_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/EPlusJets/QCD e+jets PFRelIso/Binned_WPT_Analysis")); - Binned_Variable_analyser_ptr qcd_PFRelIso_binned_WPT_electron_rhocorrected_isolation_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/EPlusJets/QCD e+jets PFRelIso/Binned_WPT_Analysis")); - no_selection_binned_WPT_electron_eta_analyser->set_variables("WPT_with_" + metPrefix, wpt_bins_, - "electron_absolute_eta", 30, 0.0, 3.0); ref_selection_binned_WPT_electron_eta_analyser->set_variables("WPT_with_" + metPrefix, wpt_bins_, "electron_absolute_eta", 30, 0.0, 3.0); qcd_conversion_binned_WPT_electron_eta_analyser->set_variables("WPT_with_" + metPrefix, wpt_bins_, "electron_absolute_eta", 30, 0.0, 3.0); qcd_noniso_binned_WPT_electron_eta_analyser->set_variables("WPT_with_" + metPrefix, wpt_bins_, "electron_absolute_eta", 30, 0.0, 3.0); - qcd_PFRelIso_binned_WPT_electron_isolation_analyser->set_variables("WPT_with_" + metPrefix, wpt_bins_, - "electron_pfIsolation_03", 500, 0, 5); - qcd_PFRelIso_binned_WPT_electron_rhocorrected_isolation_analyser->set_variables("WPT_with_" + metPrefix, - wpt_bins_, "electron_rhoCorrectedIso_03", 500, 0, 5); -// no_selection_binned_WPT_analyser_electron_eta_.push_back(no_selection_binned_WPT_electron_eta_analyser); ref_selection_binned_WPT_analyser_electron_eta_.push_back(ref_selection_binned_WPT_electron_eta_analyser); qcd_conversion_binned_WPT_analyser_electron_eta_.push_back(qcd_conversion_binned_WPT_electron_eta_analyser); qcd_noniso_binned_WPT_analyser_electron_eta_.push_back(qcd_noniso_binned_WPT_electron_eta_analyser); -// qcd_PFRelIso_binned_WPT_analyser_electron_isolation_.push_back( -// qcd_PFRelIso_binned_WPT_electron_isolation_analyser); -// qcd_PFRelIso_binned_WPT_analyser_electron_rhocorrected_isolation_.push_back( -// qcd_PFRelIso_binned_WPT_electron_rhocorrected_isolation_analyser); //binned WPT muons Binned_Variable_analyser_ptr no_selection_binned_WPT_muon_eta_analyser( @@ -1456,9 +1007,6 @@ void TTbar_plus_X_analyser::make_binned_WPT_analysers() { Binned_Variable_analyser_ptr ref_selection_binned_WPT_muon_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/MuPlusJets/Ref selection/Binned_WPT_Analysis")); - Binned_Variable_analyser_ptr qcd_PFRelIso_binned_WPT_muon_eta_analyser( - new Binned_variable_analyser(histMan_, - histogramFolder_ + "/MuPlusJets/QCD mu+jets PFRelIso/Binned_WPT_Analysis")); Binned_Variable_analyser_ptr qcd_noniso_binned_WPT_muon_eta_analyser( new Binned_variable_analyser(histMan_, histogramFolder_ + "/MuPlusJets/QCD non iso mu+jets ge3j/Binned_WPT_Analysis")); @@ -1467,14 +1015,10 @@ void TTbar_plus_X_analyser::make_binned_WPT_analysers() { "muon_absolute_eta", 30, 0.0, 3.0); ref_selection_binned_WPT_muon_eta_analyser->set_variables("WPT_with_" + metPrefix, wpt_bins_, "muon_absolute_eta", 30, 0.0, 3.0); - qcd_PFRelIso_binned_WPT_muon_eta_analyser->set_variables("WPT_with_" + metPrefix, wpt_bins_, - "muon_absolute_eta", 30, 0.0, 3.0); qcd_noniso_binned_WPT_muon_eta_analyser->set_variables("WPT_with_" + metPrefix, wpt_bins_, "muon_absolute_eta", 30, 0.0, 3.0); -// no_selection_binned_WPT_analyser_muon_eta_.push_back(no_selection_binned_WPT_muon_eta_analyser); ref_selection_binned_WPT_analyser_muon_eta_.push_back(ref_selection_binned_WPT_muon_eta_analyser); -// qcd_PFRelIso_binned_WPT_analyser_muon_eta_.push_back(qcd_PFRelIso_binned_WPT_muon_eta_analyser); qcd_noniso_binned_WPT_analyser_muon_eta_.push_back(qcd_noniso_binned_WPT_muon_eta_analyser); } diff --git a/src/Selections/QCDAntiIDEPlusJetsSelection.cpp b/src/Selections/QCDAntiIDEPlusJetsSelection.cpp index a120916b..a7945123 100644 --- a/src/Selections/QCDAntiIDEPlusJetsSelection.cpp +++ b/src/Selections/QCDAntiIDEPlusJetsSelection.cpp @@ -24,7 +24,8 @@ bool QCDAntiIDEPlusJetsSelection::isGoodElectron(const ElectronPointer electron) } bool QCDAntiIDEPlusJetsSelection::isIsolated(const LeptonPointer lepton) const { - return lepton->pfRelativeIsolation(0.3) < 0.2; + const ElectronPointer electron(boost::static_pointer_cast(lepton)); + return electron->pfRelativeIsolationRhoCorrected() < 0.2; } QCDAntiIDEPlusJetsSelection::~QCDAntiIDEPlusJetsSelection() { diff --git a/src/Selections/QCDNonIsolatedElectronSelection.cpp b/src/Selections/QCDNonIsolatedElectronSelection.cpp index 3a3a035b..9fb73185 100644 --- a/src/Selections/QCDNonIsolatedElectronSelection.cpp +++ b/src/Selections/QCDNonIsolatedElectronSelection.cpp @@ -26,10 +26,10 @@ bool QCDNonIsolatedElectronSelection::hasExactlyOneIsolatedLepton(const EventPtr const ElectronPointer electron(allElectrons.at(index)); if (isGoodElectron(electron)) { ++nGoodElectrons; - if (electron->pfRelativeIsolation(0.3) < 0.2) + if (electron->pfRelativeIsolationRhoCorrected() < 0.2) ++nGoodIsolatedElectrons; - if (electron->pfRelativeIsolation(0.3) > 0.2) + if (electron->pfRelativeIsolationRhoCorrected() > 0.2) ++nGoodNonIsolatedElectrons; } } diff --git a/src/Selections/QCDPFRelIsoEPlusJetsSelection.cpp b/src/Selections/QCDPFRelIsoEPlusJetsSelection.cpp index 67f31beb..3493e409 100644 --- a/src/Selections/QCDPFRelIsoEPlusJetsSelection.cpp +++ b/src/Selections/QCDPFRelIsoEPlusJetsSelection.cpp @@ -69,7 +69,7 @@ const ElectronPointer QCDPFRelIsoEPlusJetsSelection::MostIsolatedElectron(const unsigned int bestIsolatedLepton = 990; for (unsigned int index = 0; index < electrons.size(); ++index) { - double currentIsolation(electrons.at(index)->pfRelativeIsolation(0.3)); + double currentIsolation(electrons.at(index)->pfRelativeIsolationRhoCorrected()); if (currentIsolation < bestIsolation) { bestIsolation = currentIsolation; diff --git a/src/Selections/TopPairEPlusJetsReferenceSelection.cpp b/src/Selections/TopPairEPlusJetsReferenceSelection.cpp index 3faec1c3..3d9ad99d 100644 --- a/src/Selections/TopPairEPlusJetsReferenceSelection.cpp +++ b/src/Selections/TopPairEPlusJetsReferenceSelection.cpp @@ -164,9 +164,7 @@ bool TopPairEPlusJetsReferenceSelection::isGoodElectron(const ElectronPointer el bool TopPairEPlusJetsReferenceSelection::isIsolated(const LeptonPointer lepton) const { const ElectronPointer electron(boost::static_pointer_cast(lepton)); - //TODO: switch to rho-based isolation return electron->pfRelativeIsolationRhoCorrected() < 0.1; -// return electron->pfRelativeIsolation(0.3) < 0.1; } bool TopPairEPlusJetsReferenceSelection::passesLooseLeptonVeto(const EventPtr event) const { diff --git a/src/Selections/TopPairMuPlusJetsReferenceSelection2011.cpp b/src/Selections/TopPairMuPlusJetsReferenceSelection2011.cpp index 883e753b..85f4e358 100644 --- a/src/Selections/TopPairMuPlusJetsReferenceSelection2011.cpp +++ b/src/Selections/TopPairMuPlusJetsReferenceSelection2011.cpp @@ -187,7 +187,7 @@ bool TopPairMuPlusJetsReferenceSelection2011::isLooseElectron(const ElectronPoin bool passesEtAndEta = electron->et() > 15. && fabs(electron->eta()) < 2.5 && !electron->isInCrack(); // bool passesID(electron->passesElectronID(ElectronID::MVAIDTrigger)); - bool passesIso = electron->pfRelativeIsolation(0.3) < 0.2; + bool passesIso = electron->pfRelativeIsolationRhoCorrected() < 0.2; return passesEtAndEta && passesIso; }