PhysicsTools
PatExamples
interface
PatMuonAnalyzer.h
Go to the documentation of this file.
1
#include <map>
2
#include <string>
3
4
#include "TH1.h"
5
#include "
PhysicsTools/UtilAlgos/interface/BasicAnalyzer.h
"
6
#include "
DataFormats/PatCandidates/interface/Muon.h
"
7
18
class
PatMuonAnalyzer
:
public
edm::BasicAnalyzer
{
19
public
:
21
PatMuonAnalyzer
(
const
edm::ParameterSet
&
cfg
,
TFileDirectory
& fs);
22
PatMuonAnalyzer
(
const
edm::ParameterSet
&
cfg
,
TFileDirectory
& fs,
edm::ConsumesCollector
&& iC);
24
~PatMuonAnalyzer
()
override
{};
26
void
beginJob
()
override
{};
28
void
endJob
()
override
{};
30
void
analyze
(
const
edm::EventBase
&
event
)
override
;
31
32
private
:
34
edm::InputTag
muons_
;
35
edm::EDGetTokenT<std::vector<pat::Muon>
>
muonsToken_
;
37
std::map<std::string, TH1*>
hists_
;
38
};
PatMuonAnalyzer
Example class that can be used to analyze pat::Muons both within FWLite and within the full framework...
Definition:
PatMuonAnalyzer.h:18
PatMuonAnalyzer::beginJob
void beginJob() override
everything that needs to be done before the event loop
Definition:
PatMuonAnalyzer.h:26
edm::EDGetTokenT
Definition:
EDGetToken.h:33
Muon.h
TFileDirectory
Definition:
TFileDirectory.h:24
PatMuonAnalyzer::PatMuonAnalyzer
PatMuonAnalyzer(const edm::ParameterSet &cfg, TFileDirectory &fs)
default constructor
Definition:
PatMuonAnalyzer.cc:6
BasicAnalyzer.h
PatMuonAnalyzer::endJob
void endJob() override
everything that needs to be done after the event loop
Definition:
PatMuonAnalyzer.h:28
PatMuonAnalyzer::analyze
void analyze(const edm::EventBase &event) override
everything that needs to be done during the event loop
Definition:
PatMuonAnalyzer.cc:22
edm::ParameterSet
Definition:
ParameterSet.h:47
PatMuonAnalyzer::muonsToken_
edm::EDGetTokenT< std::vector< pat::Muon > > muonsToken_
Definition:
PatMuonAnalyzer.h:35
looper.cfg
cfg
Definition:
looper.py:296
edm::BasicAnalyzer
Definition:
BasicAnalyzer.h:42
edm::EventBase
Definition:
EventBase.h:46
PatMuonAnalyzer::hists_
std::map< std::string, TH1 * > hists_
histograms
Definition:
PatMuonAnalyzer.h:37
PatMuonAnalyzer::muons_
edm::InputTag muons_
input tag for mouns
Definition:
PatMuonAnalyzer.h:34
PatMuonAnalyzer::~PatMuonAnalyzer
~PatMuonAnalyzer() override
default destructor
Definition:
PatMuonAnalyzer.h:24
event
Definition:
event.py:1
edm::InputTag
Definition:
InputTag.h:15
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
Generated for CMSSW Reference Manual by
1.8.16