-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sync changes #2
base: master
Are you sure you want to change the base?
sync changes #2
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,8 @@ | |
#include <cp3_llbb/Framework/interface/HLTProducer.h> | ||
|
||
#include <cmath> | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, whiteline should be added back |
||
#include <vector> | ||
#include <TCanvas.h> | ||
#define ttH_GEN_DEBUG (false) | ||
#define TT_GEN_DEBUG (false) | ||
|
||
|
@@ -26,7 +27,6 @@ void ttHAnalyzer::registerCategories(CategoryManager& manager, const edm::Parame | |
manager.new_category<MuElCategory>("muel", "Category with leading leptons as muon, subleading as electron", newconfig); | ||
} | ||
|
||
|
||
void ttHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const ProducersManager& producers, const AnalyzersManager&, const CategoryManager&) { | ||
|
||
// Reset event | ||
|
@@ -37,15 +37,13 @@ void ttHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const | |
jj.clear(); | ||
//llmetjj.clear(); | ||
//llmetjj_cmva.clear(); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whiteline |
||
const JetsProducer& alljets = producers.get<JetsProducer>(m_jets_producer); | ||
const ElectronsProducer& allelectrons = producers.get<ElectronsProducer>(m_electrons_producer); | ||
const MuonsProducer& allmuons = producers.get<MuonsProducer>(m_muons_producer); | ||
const EventProducer& fwevent = producers.get<EventProducer>("event"); | ||
const HLTProducer& hlt = producers.get<HLTProducer>("hlt"); | ||
const METProducer& pf_met = producers.get<METProducer>(m_met_producer); | ||
|
||
|
||
if (!event.isRealData()) { | ||
|
||
// FIXME Moriond 2017 | ||
|
@@ -339,9 +337,15 @@ void ttHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const | |
if (allelectrons.p4[ielectron].Pt() > m_subleadingElectronPtCut | ||
&& fabs(allelectrons.p4[ielectron].Eta()) < m_electronEtaCut) | ||
{ | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whiteline |
||
// some selection | ||
// Ask for medium ID | ||
if (!allelectrons.ids[ielectron][m_electron_medium_wp_name]) | ||
// Ask for loose ID | ||
// for(auto& mapelement : allelectrons.ids[ielectron]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indentation should be maintained |
||
// { | ||
// std::cout << mapelement.first << std::endl; | ||
// } | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whiteline not needed |
||
if (!allelectrons.ids[ielectron][m_electron_loose_wp_name]) | ||
continue; | ||
|
||
ttH::Lepton ele; | ||
|
@@ -360,11 +364,18 @@ void ttHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const | |
ele.hlt_leg2 = false; | ||
|
||
ele.sc_eta = allelectrons.products[ielectron]->superCluster()->eta(); | ||
|
||
leptons.push_back(ele); | ||
//selElectrons.push_back(ele); | ||
} | ||
}//end of loop on electrons | ||
|
||
//histo is defined in the header file and added as a class member | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. two whitelines |
||
int nElectrons=leptons.size(); //leptons is first filled by ele | ||
if (nElectrons==1) m_f1->Fill(0); //filling the histo m_f1 bin 0 | ||
m_f1->Draw(); //drawing the histo | ||
|
||
for (unsigned int imuon = 0; imuon < allmuons.p4.size(); imuon++) | ||
{ | ||
if (allmuons.p4[imuon].Pt() > m_subleadingMuonPtCut | ||
|
@@ -388,7 +399,9 @@ void ttHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const | |
mu.hlt_leg2 = false; | ||
|
||
leptons.push_back(mu); | ||
//selMuons.push_back(mu); | ||
} | ||
|
||
}//end of loop on muons | ||
|
||
// sort leptons by pt (ignoring flavour, id and iso) | ||
|
@@ -496,6 +509,7 @@ void ttHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const | |
ll.push_back(dilep); | ||
} | ||
} | ||
|
||
// have the ll collection sorted by ht | ||
std::sort(ll.begin(), ll.end(), [&](ttH::Dilepton& a, ttH::Dilepton& b){return a.ht_l_l > b.ht_l_l;}); | ||
|
||
|
@@ -1312,7 +1326,6 @@ void ttHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const | |
} | ||
|
||
void ttHAnalyzer::endJob(MetadataManager& metadata) { | ||
|
||
if (! doingSystematics()) { | ||
metadata.add(this->m_name + "_count_has2leptons", count_has2leptons); | ||
metadata.add(this->m_name + "_count_has2leptons_elel", count_has2leptons_elel); | ||
|
@@ -1329,5 +1342,10 @@ void ttHAnalyzer::endJob(MetadataManager& metadata) { | |
metadata.add(this->m_name + "_count_has2leptons_elmu_1llmetjj_2btagM", count_has2leptons_elmu_1llmetjj_2btagM); | ||
metadata.add(this->m_name + "_count_has2leptons_muel_1llmetjj_2btagM", count_has2leptons_muel_1llmetjj_2btagM); | ||
metadata.add(this->m_name + "_count_has2leptons_mumu_1llmetjj_2btagM", count_has2leptons_mumu_1llmetjj_2btagM); | ||
|
||
} | ||
m_f1->Write(); //writing the histo to htest.root | ||
m_f->Close(); //closing htest.root which is defined in header and added as a class member | ||
delete m_f; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
enable = cms.bool(True), | ||
categories_parameters = cms.PSet( | ||
# Per-category lepton pt cuts | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, I don't understand this commit. I don't remember I touched that intentionally :) |
||
mumu_leadingLeptonPtCut = cms.untracked.double(20), # muon | ||
mumu_leadingLeptonPtCut = cms.untracked.double(0), # muon | ||
mumu_subleadingLeptonPtCut = cms.untracked.double(10), # muon | ||
elel_leadingLeptonPtCut = cms.untracked.double(25), # electron | ||
elel_subleadingLeptonPtCut = cms.untracked.double(15), # electron | ||
|
@@ -57,7 +57,14 @@ | |
muonLooseIsoCut = cms.untracked.double(.25), # https://twiki.cern.ch/twiki/bin/view/CMS/TopMUO | ||
muonTightIsoCut = cms.untracked.double(.15), # https://twiki.cern.ch/twiki/bin/view/CMS/TopMUO | ||
muonEtaCut = cms.untracked.double(2.4), | ||
electrons_loose_wp_name = cms.untracked.string("cutBasedElectronID-Summer16-80X-V1-loose"), | ||
#electrons_loose_wp_name = cms.untracked.string("cutBasedElectronID-Summer16-80X-V1-loose"), #old working point | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whiteline |
||
#cutBasedElectronID-Fall17-94X-V2-loose | ||
#cutBasedElectronID-Fall17-94X-V2-medium | ||
#cutBasedElectronID-Fall17-94X-V2-tight | ||
#cutBasedElectronID-Fall17-94X-V2-veto | ||
|
||
electrons_loose_wp_name = cms.untracked.string("cutBasedElectronID-Fall17-94X-V2-loose"), #new working point | ||
electrons_medium_wp_name = cms.untracked.string("cutBasedElectronID-Summer16-80X-V1-medium"), | ||
electrons_tight_wp_name = cms.untracked.string("cutBasedElectronID-Summer16-80X-V1-tight"), | ||
electrons_hlt_safe_wp_name = cms.untracked.string("cutBasedElectronHLTPreselection-Summer16-V1"), | ||
|
@@ -142,4 +149,4 @@ | |
|
||
#process.MessageLogger.cerr.FwkReport.reportEvery = 1 | ||
#process.source.skipEvents = cms.untracked.uint32(10) | ||
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1000)) | ||
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(-1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is usually desirable to not have whiteline removed/added without a specific reason.
I am usually personally quite indifferent to that, but there are very picky persons here and there :)
The general idea is that if you don't really need to remove/add a whiteline there, then there is no reason for having it.