ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/plugins/HbbTreeMaker.cc
(Generate patch)

Comparing UserCode/HbbAnalysis/plugins/HbbTreeMaker.cc (file contents):
Revision 1.37 by agilbert, Thu Jun 23 13:03:51 2011 UTC vs.
Revision 1.38 by amagnan, Sat Jul 16 10:00:59 2011 UTC

# Line 36 | Line 36
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  
# Line 81 | Line 82 | HbbTreeMaker::HbbTreeMaker(const edm::Pa
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")),
# Line 220 | Line 222 | void HbbTreeMaker::analyze(const edm::Ev
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      }
# Line 1696 | Line 1709 | void HbbTreeMaker::HbbParticles(const ed
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,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines