ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbbAnalysis/HbbAnalyzer/plugins/HbbCandidateFinder.cc
Revision: 1.7
Committed: Thu Jul 21 14:12:14 2011 UTC (13 years, 9 months ago) by tboccali
Content type: text/plain
Branch: MAIN
CVS Tags: Jul26th2011, Jul25th2011, Jul22nd2011, Jul21st2011
Changes since 1.6: +3 -2 lines
Log Message:
moved the algo

File Contents

# User Rev Content
1 tboccali 1.1 #include "VHbbAnalysis/HbbAnalyzer/interface/HbbCandidateFinder.h"
2    
3 tboccali 1.7 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 tboccali 1.1 produces<std::vector<VHbbCandidate > >();
7     }
8    
9 tboccali 1.6 HbbCandidateFinder::~HbbCandidateFinder(){delete algo_;}
10 tboccali 1.1
11     void HbbCandidateFinder::beginJob(){}
12     void HbbCandidateFinder::endJob(){}
13    
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 tboccali 1.3 // iEvent.getByLabel(vhbbevent_, vHbbEvent);
20     iEvent.getByType(vHbbEvent);
21 tboccali 1.1
22    
23     //
24     // start searching for candidates
25     //
26    
27     // hbbCandidateFinderAlgo(vHbbCandidates, vHbbEvent-> result());
28     // do nothing for a test
29    
30 tboccali 1.6 algo_->run(vHbbEvent.product(),(*vHbbCandidates));
31    
32    
33 tboccali 1.3 if (verbose_)
34     std::cout <<" Pushing VHbb candidates: "<<vHbbCandidates->size()<<std::endl;
35 tboccali 1.6
36 tboccali 1.1 iEvent.put(vHbbCandidates);
37 tboccali 1.2
38     }
39    
40 tboccali 1.1
41     //define this as a plug-in
42     DEFINE_FWK_MODULE(HbbCandidateFinder);