test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
TopQuarkAnalysis
Examples
plugins
TopTauAnalyzer.cc
Go to the documentation of this file.
1
#include "
TopQuarkAnalysis/Examples/plugins/TopTauAnalyzer.h
"
2
3
4
TopTauAnalyzer::TopTauAnalyzer
(
const
edm::ParameterSet
&
cfg
):
5
inputToken_(consumes<std::vector<pat::
Tau
> >(cfg.getParameter<edm::
InputTag
>(
"input"
)))
6
{
7
edm::Service<TFileService>
fs;
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
}
15
16
TopTauAnalyzer::~TopTauAnalyzer
()
17
{
18
}
19
20
void
21
TopTauAnalyzer::analyze
(
const
edm::Event
& evt,
const
edm::EventSetup
&
setup
)
22
{
23
edm::Handle<std::vector<pat::Tau>
> taus;
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
}
36
37
void
TopTauAnalyzer::beginJob
()
38
{
39
}
40
41
void
TopTauAnalyzer::endJob
()
42
{
43
}
44
looper.cfg
tuple cfg
Definition:
looper.py:293
edm::Service< TFileService >
TopTauAnalyzer.h
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition:
Event.h:462
edm::Handle
Definition:
AssociativeIterator.h:47
TopTauAnalyzer::pt_
TH1F * pt_
Definition:
TopTauAnalyzer.h:32
TFileService::make
T * make(const Args &...args) const
make new ROOT object
Definition:
TFileService.h:64
HLT_25ns10e33_v2_cff.InputTag
tuple InputTag
Definition:
HLT_25ns10e33_v2_cff.py:58467
TopTauAnalyzer::en_
TH1F * en_
Definition:
TopTauAnalyzer.h:31
TopTauAnalyzer::endJob
virtual void endJob()
Definition:
TopTauAnalyzer.cc:41
TopTauAnalyzer::phi_
TH1F * phi_
Definition:
TopTauAnalyzer.h:34
reco::tau::disc::Tau
const PFTau & Tau
Definition:
RecoTauDiscriminantFunctions.h:24
metsig::tau
Definition:
SignAlgoResolutions.h:40
edm::EventSetup
Definition:
EventSetup.h:45
TopTauAnalyzer::inputToken_
edm::EDGetTokenT< std::vector< pat::Tau > > inputToken_
Definition:
TopTauAnalyzer.h:28
TopTauAnalyzer::analyze
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition:
TopTauAnalyzer.cc:21
TopTauAnalyzer::eta_
TH1F * eta_
Definition:
TopTauAnalyzer.h:33
GeneralSetup.setup
def setup
Definition:
GeneralSetup.py:1
TopTauAnalyzer::TopTauAnalyzer
TopTauAnalyzer(const edm::ParameterSet &)
Definition:
TopTauAnalyzer.cc:4
TopTauAnalyzer::mult_
TH1F * mult_
Definition:
TopTauAnalyzer.h:30
edm::ParameterSet
Definition:
ParameterSet.h:36
TopTauAnalyzer::beginJob
virtual void beginJob()
Definition:
TopTauAnalyzer.cc:37
edm::Event
Definition:
Event.h:65
TopTauAnalyzer::~TopTauAnalyzer
~TopTauAnalyzer()
Definition:
TopTauAnalyzer.cc:16
Generated for CMSSW Reference Manual by
1.8.5