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

Comparing UserCode/VHbbAnalysis/HbbAnalyzer/plugins/HbbCandidateFinder.cc (file contents):
Revision 1.1 by tboccali, Tue Jun 14 15:55:44 2011 UTC vs.
Revision 1.8 by tboccali, Tue Jul 26 08:45:44 2011 UTC

# Line 1 | Line 1
1   #include "VHbbAnalysis/HbbAnalyzer/interface/HbbCandidateFinder.h"
2  
3 <
4 <
5 <
6 < HbbCandidateFinder::HbbCandidateFinder(const edm::ParameterSet& iConfig):   vhbbevent_(iConfig.getParameter<edm::InputTag>("VHbbEventLabel")) {
3 > HbbCandidateFinder::HbbCandidateFinder(const edm::ParameterSet& iConfig): verbose_(iConfig.getParameter<bool>("verbose") ) {
4 >  algo_ = new HbbCandidateFinderAlgo(iConfig.getParameter<bool>("verbose"), iConfig.getParameter<double>("jetPtThreshold"),
5 >                                     iConfig.getParameter<bool>("useHighestPtHiggs")                         );
6    produces<std::vector<VHbbCandidate > >();
7   }
8  
9 < HbbCandidateFinder::~HbbCandidateFinder(){}
9 > HbbCandidateFinder::~HbbCandidateFinder(){delete algo_;}
10  
11   void HbbCandidateFinder::beginJob(){}
12   void HbbCandidateFinder::endJob(){}
13  
15
16 float HbbCandidateFinder::getDeltaTheta( VHbbEvent::SimpleJet * j1, VHbbEvent::SimpleJet * j2 ){return -1.;}
17
18
19
14   void HbbCandidateFinder::produce( edm::Event& iEvent, const edm::EventSetup& iEventSetup){
15    
16    std::auto_ptr<std::vector<VHbbCandidate> >  vHbbCandidates( new std::vector<VHbbCandidate>  );
17  
18    edm::Handle<VHbbEvent>  vHbbEvent;
19 <  iEvent.getByLabel(vhbbevent_, vHbbEvent);
19 >  //  iEvent.getByLabel(vhbbevent_, vHbbEvent);
20 >  iEvent.getByType(vHbbEvent);
21    
22  
23    //
# Line 32 | Line 27 | void HbbCandidateFinder::produce( edm::E
27    //  hbbCandidateFinderAlgo(vHbbCandidates, vHbbEvent-> result());
28    // do nothing for a test
29    
30 +  algo_->run(vHbbEvent.product(),(*vHbbCandidates));
31 +  
32 +  
33 +  if (verbose_)
34 +    std::cout <<" Pushing VHbb candidates: "<<vHbbCandidates->size()<<std::endl;
35 +  
36    iEvent.put(vHbbCandidates);  
37 <
37 >  
38   }
39  
40  
41 +
42   //define this as a plug-in
43   DEFINE_FWK_MODULE(HbbCandidateFinder);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines