#include <TopTauAnalyzer.h>
Public Member Functions | |
TopTauAnalyzer (const edm::ParameterSet &) | |
~TopTauAnalyzer () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | endJob () |
Private Attributes | |
TH1F * | en_ |
TH1F * | eta_ |
edm::InputTag | input_ |
TH1F * | mult_ |
TH1F * | phi_ |
TH1F * | pt_ |
Definition at line 13 of file TopTauAnalyzer.h.
TopTauAnalyzer::TopTauAnalyzer | ( | const edm::ParameterSet & | cfg | ) | [explicit] |
Definition at line 5 of file TopTauAnalyzer.cc.
References en_, eta_, mult_, phi_, and pt_.
: input_(cfg.getParameter<edm::InputTag>("input")) { edm::Service<TFileService> fs; mult_ = fs->make<TH1F>("mult", "multiplicity (taus)", 30, 0 , 30); en_ = fs->make<TH1F>("en" , "energy (taus)", 60, 0., 300.); pt_ = fs->make<TH1F>("pt" , "pt (taus}", 60, 0., 300.); eta_ = fs->make<TH1F>("eta" , "eta (taus)", 30, -3., 3.); phi_ = fs->make<TH1F>("phi" , "phi (taus)", 40, -4., 4.); }
TopTauAnalyzer::~TopTauAnalyzer | ( | ) |
Definition at line 17 of file TopTauAnalyzer.cc.
{ }
void TopTauAnalyzer::analyze | ( | const edm::Event & | evt, |
const edm::EventSetup & | setup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 22 of file TopTauAnalyzer.cc.
References en_, eta_, edm::Event::getByLabel(), input_, mult_, phi_, pt_, and metsig::tau.
{ edm::Handle<std::vector<pat::Tau> > taus; evt.getByLabel(input_, taus); // fill histograms mult_->Fill( taus->size() ); for(std::vector<pat::Tau>::const_iterator tau=taus->begin(); tau!=taus->end(); ++tau){ en_ ->Fill( tau->energy() ); pt_ ->Fill( tau->pt() ); eta_->Fill( tau->eta() ); phi_->Fill( tau->phi() ); } }
void TopTauAnalyzer::beginJob | ( | void | ) | [private, virtual] |
void TopTauAnalyzer::endJob | ( | void | ) | [private, virtual] |
TH1F* TopTauAnalyzer::en_ [private] |
Definition at line 29 of file TopTauAnalyzer.h.
Referenced by analyze(), and TopTauAnalyzer().
TH1F* TopTauAnalyzer::eta_ [private] |
Definition at line 31 of file TopTauAnalyzer.h.
Referenced by analyze(), and TopTauAnalyzer().
edm::InputTag TopTauAnalyzer::input_ [private] |
Definition at line 26 of file TopTauAnalyzer.h.
Referenced by analyze().
TH1F* TopTauAnalyzer::mult_ [private] |
Definition at line 28 of file TopTauAnalyzer.h.
Referenced by analyze(), and TopTauAnalyzer().
TH1F* TopTauAnalyzer::phi_ [private] |
Definition at line 32 of file TopTauAnalyzer.h.
Referenced by analyze(), and TopTauAnalyzer().
TH1F* TopTauAnalyzer::pt_ [private] |
Definition at line 30 of file TopTauAnalyzer.h.
Referenced by analyze(), and TopTauAnalyzer().