36 |
|
#include "DataFormats/PatCandidates/interface/Electron.h" |
37 |
|
#include "DataFormats/PatCandidates/interface/Tau.h" |
38 |
|
#include "DataFormats/PatCandidates/interface/Jet.h" |
39 |
+ |
#include "DataFormats/PatCandidates/interface/GenJet.h" |
40 |
|
#include "DataFormats/PatCandidates/interface/JetCorrFactors.h" |
41 |
|
#include "DataFormats/PatCandidates/interface/MET.h" |
42 |
|
|
82 |
|
flavour_(pset.getParameter<unsigned int>("JetFlavour")), |
83 |
|
doGen_(pset.getParameter<bool>("DOGEN")), |
84 |
|
genParticleSrc_(pset.getParameter<edm::InputTag>("GenParticles")), |
85 |
+ |
genJetSrc_(pset.getParameter<edm::InputTag>("GenJets")), |
86 |
|
trackSrc_(pset.getParameter<edm::InputTag>("Tracks")), |
87 |
|
dcsSrc_(pset.getParameter<edm::InputTag>("DCSInfo")), |
88 |
|
electronSrc_(pset.getParameter<edm::InputTag>("Electrons")), |
222 |
|
std::cout << "AMM: Collection GenInfoProduct not available! Exception : " << e.what() << ". " << std::endl; |
223 |
|
} |
224 |
|
|
225 |
+ |
|
226 |
+ |
edm::Handle<reco::GenJetCollection> lGenJets; |
227 |
+ |
try { |
228 |
+ |
aEvt.getByLabel(genJetSrc_,lGenJets); |
229 |
+ |
if (debug_) std::cout << "** ngenJets = " << lGenJets->size() << std::endl; |
230 |
+ |
} catch(cms::Exception& e) { |
231 |
+ |
std::cout << "AMM: Collection genParticles not available! Exception : " << e.what() << ". " << std::endl; |
232 |
+ |
} |
233 |
+ |
|
234 |
+ |
if (lGenJets.isValid()) HbbGenJets(lGenJets,event_->genjets()); |
235 |
+ |
|
236 |
|
if (mcProd.isValid() && lRunProd.isValid()){ |
237 |
|
HbbGenInfo(mcProd,lRunProd); |
238 |
|
} |
1709 |
|
|
1710 |
|
}//genparticles |
1711 |
|
|
1712 |
+ |
void HbbTreeMaker::HbbGenJets(const edm::Handle<reco::GenJetCollection> & aCol, |
1713 |
+ |
std::vector<HbbAnalysis::GenJet> & aVec) |
1714 |
+ |
{ |
1715 |
+ |
|
1716 |
+ |
//TODO |
1717 |
+ |
|
1718 |
+ |
} |
1719 |
+ |
|
1720 |
|
|
1721 |
|
|
1722 |
|
void HbbTreeMaker::HbbVertices(const edm::Handle<std::vector<reco::Vertex> > & aCol, |