ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/AnaTools/src/PUAnalyzer.cc
Revision: 1.2
Committed: Fri Jul 5 08:51:00 2013 UTC (11 years, 10 months ago) by wulsin
Content type: text/plain
Branch: MAIN
CVS Tags: V02-03-02, HEAD
Changes since 1.1: +1 -1 lines
Log Message:
fix include statement

File Contents

# Content
1 #include "OSUT3Analysis/AnaTools/interface/PUAnalyzer.h"
2
3 PUAnalyzer::PUAnalyzer (const edm::ParameterSet &cfg) :
4 events_ (cfg.getParameter<edm::InputTag> ("events"))
5 {
6 TH1::SetDefaultSumw2 ();
7
8 masterCutFlow_ = new CutFlow (fs_);
9
10 oneDHists_["pu"] = fs_->make<TH1D> ("pu",";pileup", 65, 0, 65);
11 }
12
13 PUAnalyzer::~PUAnalyzer ()
14 {
15 delete masterCutFlow_;
16 }
17
18 void
19 PUAnalyzer::analyze (const edm::Event &event, const edm::EventSetup &setup)
20 {
21 edm::Handle<BNeventCollection> events;
22 event.getByLabel (events_, events);
23
24 masterCutFlow_->fillCutFlow ();
25
26 oneDHists_["pu"]->Fill (events->at (0).numTruePV);
27 }
28
29 #include "FWCore/Framework/interface/MakerMacros.h"
30 DEFINE_FWK_MODULE(PUAnalyzer);