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.7 by tboccali, Thu Jul 21 14:12:14 2011 UTC vs.
Revision 1.9 by tboccali, Thu Jul 28 13:17:30 2011 UTC

# Line 3 | Line 3
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 +  applyFilter = iConfig.getParameter<bool>("actAsAFilter");
7    produces<std::vector<VHbbCandidate > >();
8   }
9  
# Line 11 | Line 12 | HbbCandidateFinder::~HbbCandidateFinder(
12   void HbbCandidateFinder::beginJob(){}
13   void HbbCandidateFinder::endJob(){}
14  
15 < void HbbCandidateFinder::produce( edm::Event& iEvent, const edm::EventSetup& iEventSetup){
15 > bool HbbCandidateFinder::filter( edm::Event& iEvent, const edm::EventSetup& iEventSetup){
16    
17    std::auto_ptr<std::vector<VHbbCandidate> >  vHbbCandidates( new std::vector<VHbbCandidate>  );
18  
# Line 34 | Line 35 | void HbbCandidateFinder::produce( edm::E
35      std::cout <<" Pushing VHbb candidates: "<<vHbbCandidates->size()<<std::endl;
36    
37    iEvent.put(vHbbCandidates);  
38 <  
38 >
39 >  if (applyFilter == false) return true;
40 >  if (vHbbCandidates->size() == 0) return false;
41 >  return true;
42   }
43  
44  
45 +
46   //define this as a plug-in
47   DEFINE_FWK_MODULE(HbbCandidateFinder);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines