Revision: | 1.10 |
Committed: | Mon May 14 15:33:51 2012 UTC (13 years ago) by arizzi |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | EDMV42_Step2_V6, EDMV42_Step2_V5a, EDMV42_Step2_V5, tauCandV42, hbbsubstructDev_11, hbbsubstructDev_10, hbbsubstructDev_9, hbbsubstructDev_8, hbbsubstructDev_7, hbbsubstructDev_6, hbbsubstructDev_5, hbbsubstructDev_4, hbbsubstructDev_3, hbbsubstructDev_2, hbbsubstructDev_1, hbbsubstructDev, EDMV42_Step2_V4a, EDMV42_Step2_V4, EDMV42_Step2_V3, EDMV42_Step2_V2, EDMV42_Step2_V1, EdmV42, EdmV41alpha1, EdmV40alpha1, EdmV40alpha, EdmV33Jun12v2_consistent, Step2ForV33_v2, Step2ForV33_v1, EdmV33Jun12v2, EdmV33Jun12v1, EdmV33Jun12v0, Step2ForV32_v2, Step2ForV32_v0, Step2ForV31_v0, EdmV32May24v0, EdmV31May21v1, EdmV31May17v0, HEAD |
Branch point for: | V42TauCandidate, hbbsubstructDevPostHCP |
Changes since 1.9: | +5 -2 lines |
Log Message: | fix usless producer |
# | Content |
---|---|
1 | #include "VHbbAnalysis/HbbAnalyzer/interface/HbbCandidateFinder.h" |
2 | |
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 | |
10 | HbbCandidateFinder::~HbbCandidateFinder(){delete algo_;} |
11 | |
12 | void HbbCandidateFinder::beginJob(){} |
13 | void HbbCandidateFinder::endJob(){} |
14 | |
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 | |
19 | |
20 | edm::Handle<VHbbEventAuxInfo> vHbbEventAux; |
21 | // iEvent.getByLabel(vhbbevent_, vHbbEvent); |
22 | iEvent.getByType(vHbbEventAux); |
23 | edm::Handle<VHbbEvent> vHbbEvent; |
24 | // iEvent.getByLabel(vhbbevent_, vHbbEvent); |
25 | iEvent.getByType(vHbbEvent); |
26 | |
27 | // |
28 | // start searching for candidates |
29 | // |
30 | |
31 | // hbbCandidateFinderAlgo(vHbbCandidates, vHbbEvent-> result()); |
32 | // do nothing for a test |
33 | |
34 | algo_->run(vHbbEvent.product(),(*vHbbCandidates),*vHbbEventAux.product()); |
35 | |
36 | |
37 | if (verbose_) |
38 | std::cout <<" Pushing VHbb candidates: "<<vHbbCandidates->size()<<std::endl; |
39 | |
40 | iEvent.put(vHbbCandidates); |
41 | |
42 | if (applyFilter == false) return true; |
43 | if (vHbbCandidates->size() == 0) return false; |
44 | return true; |
45 | } |
46 | |
47 | |
48 | |
49 | //define this as a plug-in |
50 | DEFINE_FWK_MODULE(HbbCandidateFinder); |