CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
TopTauAnalyzer Class Reference

#include <TopTauAnalyzer.h>

Inheritance diagram for TopTauAnalyzer:
edm::EDAnalyzer

Public Member Functions

 TopTauAnalyzer (const edm::ParameterSet &)
 
 ~TopTauAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

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_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 13 of file TopTauAnalyzer.h.

Constructor & Destructor Documentation

TopTauAnalyzer::TopTauAnalyzer ( const edm::ParameterSet cfg)
explicit

Definition at line 5 of file TopTauAnalyzer.cc.

References en_, eta_, TFileDirectory::make(), mult_, phi_, and pt_.

5  :
6  input_(cfg.getParameter<edm::InputTag>("input"))
7 {
9 
10  mult_ = fs->make<TH1F>("mult", "multiplicity (taus)", 30, 0 , 30);
11  en_ = fs->make<TH1F>("en" , "energy (taus)", 60, 0., 300.);
12  pt_ = fs->make<TH1F>("pt" , "pt (taus}", 60, 0., 300.);
13  eta_ = fs->make<TH1F>("eta" , "eta (taus)", 30, -3., 3.);
14  phi_ = fs->make<TH1F>("phi" , "phi (taus)", 40, -4., 4.);
15 }
T getParameter(std::string const &) const
edm::InputTag input_
T * make() const
make new ROOT object
TopTauAnalyzer::~TopTauAnalyzer ( )

Definition at line 17 of file TopTauAnalyzer.cc.

18 {
19 }

Member Function Documentation

void TopTauAnalyzer::analyze ( const edm::Event evt,
const edm::EventSetup setup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 22 of file TopTauAnalyzer.cc.

References en_, eta_, edm::Event::getByLabel(), input_, mult_, phi_, pt_, and metsig::tau.

23 {
25  evt.getByLabel(input_, taus);
26 
27  // fill histograms
28 
29  mult_->Fill( taus->size() );
30  for(std::vector<pat::Tau>::const_iterator tau=taus->begin(); tau!=taus->end(); ++tau){
31  en_ ->Fill( tau->energy() );
32  pt_ ->Fill( tau->pt() );
33  eta_->Fill( tau->eta() );
34  phi_->Fill( tau->phi() );
35  }
36 }
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
edm::InputTag input_
void TopTauAnalyzer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 38 of file TopTauAnalyzer.cc.

39 {
40 }
void TopTauAnalyzer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 42 of file TopTauAnalyzer.cc.

43 {
44 }

Member Data Documentation

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().