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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) 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::EDGetTokenT< std::vector
< pat::Tau > > 
inputToken_
 
TH1F * mult_
 
TH1F * phi_
 
TH1F * pt_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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::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 15 of file TopTauAnalyzer.h.

Constructor & Destructor Documentation

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

Definition at line 4 of file TopTauAnalyzer.cc.

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

4  :
5  inputToken_(consumes<std::vector<pat::Tau> >(cfg.getParameter<edm::InputTag>("input")))
6 {
8 
9  mult_ = fs->make<TH1F>("mult", "multiplicity (taus)", 30, 0 , 30);
10  en_ = fs->make<TH1F>("en" , "energy (taus)", 60, 0., 300.);
11  pt_ = fs->make<TH1F>("pt" , "pt (taus}", 60, 0., 300.);
12  eta_ = fs->make<TH1F>("eta" , "eta (taus)", 30, -3., 3.);
13  phi_ = fs->make<TH1F>("phi" , "phi (taus)", 40, -4., 4.);
14 }
T getParameter(std::string const &) const
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< std::vector< pat::Tau > > inputToken_
TopTauAnalyzer::~TopTauAnalyzer ( )

Definition at line 16 of file TopTauAnalyzer.cc.

17 {
18 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 21 of file TopTauAnalyzer.cc.

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

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

Reimplemented from edm::EDAnalyzer.

Definition at line 37 of file TopTauAnalyzer.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 41 of file TopTauAnalyzer.cc.

42 {
43 }

Member Data Documentation

TH1F* TopTauAnalyzer::en_
private

Definition at line 31 of file TopTauAnalyzer.h.

Referenced by analyze(), and TopTauAnalyzer().

TH1F* TopTauAnalyzer::eta_
private

Definition at line 33 of file TopTauAnalyzer.h.

Referenced by analyze(), and TopTauAnalyzer().

edm::EDGetTokenT<std::vector<pat::Tau> > TopTauAnalyzer::inputToken_
private

Definition at line 28 of file TopTauAnalyzer.h.

Referenced by analyze().

TH1F* TopTauAnalyzer::mult_
private

Definition at line 30 of file TopTauAnalyzer.h.

Referenced by analyze(), and TopTauAnalyzer().

TH1F* TopTauAnalyzer::phi_
private

Definition at line 34 of file TopTauAnalyzer.h.

Referenced by analyze(), and TopTauAnalyzer().

TH1F* TopTauAnalyzer::pt_
private

Definition at line 32 of file TopTauAnalyzer.h.

Referenced by analyze(), and TopTauAnalyzer().