TopQuarkAnalysis
Examples
plugins
TopTauAnalyzer.cc
Go to the documentation of this file.
1
#include "
TopQuarkAnalysis/Examples/plugins/TopTauAnalyzer.h
"
2
3
TopTauAnalyzer::TopTauAnalyzer
(
const
edm::ParameterSet
&
cfg
)
4
: inputToken_(consumes<
std
::vector<
pat
::
Tau
> >(
cfg
.getParameter<
edm
::
InputTag
>(
"input"
))) {
5
edm::Service<TFileService>
fs;
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
}
13
14
TopTauAnalyzer::~TopTauAnalyzer
() {}
15
16
void
TopTauAnalyzer::analyze
(
const
edm::Event
& evt,
const
edm::EventSetup
&
setup
) {
17
edm::Handle<std::vector<pat::Tau>
>
taus
;
18
evt.
getByToken
(
inputToken_
,
taus
);
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
}
30
31
void
TopTauAnalyzer::beginJob
() {}
32
33
void
TopTauAnalyzer::endJob
() {}
TopTauAnalyzer::en_
TH1F * en_
Definition:
TopTauAnalyzer.h:28
TopTauAnalyzer.h
metsig::tau
Definition:
SignAlgoResolutions.h:49
Tau3MuMonitor_cff.taus
taus
Definition:
Tau3MuMonitor_cff.py:7
edm
HLT enums.
Definition:
AlignableModifier.h:19
TopTauAnalyzer::TopTauAnalyzer
TopTauAnalyzer(const edm::ParameterSet &)
Definition:
TopTauAnalyzer.cc:3
TopTauAnalyzer::phi_
TH1F * phi_
Definition:
TopTauAnalyzer.h:31
Tau
Definition:
Tau.py:1
edm::Handle
Definition:
AssociativeIterator.h:50
singleTopDQM_cfi.setup
setup
Definition:
singleTopDQM_cfi.py:37
TopTauAnalyzer::beginJob
void beginJob() override
Definition:
TopTauAnalyzer.cc:31
TopTauAnalyzer::mult_
TH1F * mult_
Definition:
TopTauAnalyzer.h:27
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition:
Event.h:528
HLT_2018_cff.InputTag
InputTag
Definition:
HLT_2018_cff.py:79016
edm::ParameterSet
Definition:
ParameterSet.h:36
TopTauAnalyzer::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
TopTauAnalyzer.cc:16
TopTauAnalyzer::pt_
TH1F * pt_
Definition:
TopTauAnalyzer.h:29
edm::Service< TFileService >
TopTauAnalyzer::eta_
TH1F * eta_
Definition:
TopTauAnalyzer.h:30
edm::EventSetup
Definition:
EventSetup.h:57
pat
Definition:
HeavyIon.h:7
looper.cfg
cfg
Definition:
looper.py:297
std
Definition:
JetResolutionObject.h:76
TopTauAnalyzer::inputToken_
edm::EDGetTokenT< std::vector< pat::Tau > > inputToken_
Definition:
TopTauAnalyzer.h:25
TopTauAnalyzer::~TopTauAnalyzer
~TopTauAnalyzer() override
Definition:
TopTauAnalyzer.cc:14
edm::Event
Definition:
Event.h:73
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition:
TFileService.h:64
TopTauAnalyzer::endJob
void endJob() override
Definition:
TopTauAnalyzer.cc:33
Generated for CMSSW Reference Manual by
1.8.16