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 |
|
// |
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 |
|
|