CMS 3D CMS Logo

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 () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void endJob () override
 

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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 15 of file TopTauAnalyzer.h.

Constructor & Destructor Documentation

◆ TopTauAnalyzer()

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

Definition at line 3 of file TopTauAnalyzer.cc.

4  : inputToken_(consumes<std::vector<pat::Tau> >(cfg.getParameter<edm::InputTag>("input"))) {
6 
7  mult_ = fs->make<TH1F>("mult", "multiplicity (taus)", 30, 0, 30);
8  en_ = fs->make<TH1F>("en", "energy (taus)", 60, 0., 300.);
9  pt_ = fs->make<TH1F>("pt", "pt (taus}", 60, 0., 300.);
10  eta_ = fs->make<TH1F>("eta", "eta (taus)", 30, -3., 3.);
11  phi_ = fs->make<TH1F>("phi", "phi (taus)", 40, -4., 4.);
12 }

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

◆ ~TopTauAnalyzer()

TopTauAnalyzer::~TopTauAnalyzer ( )
override

Definition at line 14 of file TopTauAnalyzer.cc.

14 {}

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 16 of file TopTauAnalyzer.cc.

16  {
19 
20  // fill histograms
21 
22  mult_->Fill(taus->size());
23  for (std::vector<pat::Tau>::const_iterator tau = taus->begin(); tau != taus->end(); ++tau) {
24  en_->Fill(tau->energy());
25  pt_->Fill(tau->pt());
26  eta_->Fill(tau->eta());
27  phi_->Fill(tau->phi());
28  }
29 }

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

◆ beginJob()

void TopTauAnalyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 31 of file TopTauAnalyzer.cc.

31 {}

◆ endJob()

void TopTauAnalyzer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 33 of file TopTauAnalyzer.cc.

33 {}

Member Data Documentation

◆ en_

TH1F* TopTauAnalyzer::en_
private

Definition at line 28 of file TopTauAnalyzer.h.

Referenced by analyze(), and TopTauAnalyzer().

◆ eta_

TH1F* TopTauAnalyzer::eta_
private

Definition at line 30 of file TopTauAnalyzer.h.

Referenced by analyze(), and TopTauAnalyzer().

◆ inputToken_

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

Definition at line 25 of file TopTauAnalyzer.h.

Referenced by analyze().

◆ mult_

TH1F* TopTauAnalyzer::mult_
private

Definition at line 27 of file TopTauAnalyzer.h.

Referenced by analyze(), and TopTauAnalyzer().

◆ phi_

TH1F* TopTauAnalyzer::phi_
private

Definition at line 31 of file TopTauAnalyzer.h.

Referenced by analyze(), and TopTauAnalyzer().

◆ pt_

TH1F* TopTauAnalyzer::pt_
private

Definition at line 29 of file TopTauAnalyzer.h.

Referenced by analyze(), and TopTauAnalyzer().

TopTauAnalyzer::en_
TH1F * en_
Definition: TopTauAnalyzer.h:28
metsig::tau
Definition: SignAlgoResolutions.h:49
Tau3MuMonitor_cff.taus
taus
Definition: Tau3MuMonitor_cff.py:7
TopTauAnalyzer::phi_
TH1F * phi_
Definition: TopTauAnalyzer.h:31
edm::Handle
Definition: AssociativeIterator.h:50
TopTauAnalyzer::mult_
TH1F * mult_
Definition: TopTauAnalyzer.h:27
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:531
TopTauAnalyzer::pt_
TH1F * pt_
Definition: TopTauAnalyzer.h:29
edm::Service< TFileService >
TopTauAnalyzer::eta_
TH1F * eta_
Definition: TopTauAnalyzer.h:30
looper.cfg
cfg
Definition: looper.py:297
TopTauAnalyzer::inputToken_
edm::EDGetTokenT< std::vector< pat::Tau > > inputToken_
Definition: TopTauAnalyzer.h:25
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:153
edm::InputTag
Definition: InputTag.h:15
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64