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 edm::EDConsumerBase

Public Member Functions

 TopTauAnalyzer (const edm::ParameterSet &)
 
 ~TopTauAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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