ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbbAnalysis/HbbAnalyzer/plugins/HbbCandidateFinder.cc
Revision: 1.6
Committed: Tue Jun 28 12:02:37 2011 UTC (13 years, 10 months ago) by tboccali
Content type: text/plain
Branch: MAIN
CVS Tags: Jul20th2011, Jul18th2011, Jul17th2011, Jul8th2011, Jun30th2011, Jun28th2011
Changes since 1.5: +7 -207 lines
Log Message:
change candidate preselection

File Contents

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