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.6 by tboccali, Tue Jun 28 12:02:37 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    produces<std::vector<VHbbCandidate > >();
6   }
7  
8 < HbbCandidateFinder::~HbbCandidateFinder(){}
8 > HbbCandidateFinder::~HbbCandidateFinder(){delete algo_;}
9  
10   void HbbCandidateFinder::beginJob(){}
11   void HbbCandidateFinder::endJob(){}
12  
15
16 float HbbCandidateFinder::getDeltaTheta( VHbbEvent::SimpleJet * j1, VHbbEvent::SimpleJet * j2 ){return -1.;}
17
18
19
13   void HbbCandidateFinder::produce( edm::Event& iEvent, const edm::EventSetup& iEventSetup){
14    
15    std::auto_ptr<std::vector<VHbbCandidate> >  vHbbCandidates( new std::vector<VHbbCandidate>  );
16  
17    edm::Handle<VHbbEvent>  vHbbEvent;
18 <  iEvent.getByLabel(vhbbevent_, vHbbEvent);
18 >  //  iEvent.getByLabel(vhbbevent_, vHbbEvent);
19 >  iEvent.getByType(vHbbEvent);
20    
21  
22    //
# Line 32 | Line 26 | void HbbCandidateFinder::produce( edm::E
26    //  hbbCandidateFinderAlgo(vHbbCandidates, vHbbEvent-> result());
27    // do nothing for a test
28    
29 +  algo_->run(vHbbEvent.product(),(*vHbbCandidates));
30 +  
31 +  
32 +  if (verbose_)
33 +    std::cout <<" Pushing VHbb candidates: "<<vHbbCandidates->size()<<std::endl;
34 +  
35    iEvent.put(vHbbCandidates);  
36 <
36 >  
37   }
38  
39  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines