DESY Hbb Analysis Framework
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Analysis
Tools
bin
AnalyserJetsExample.cc
Go to the documentation of this file.
1
#include "
Analysis/Tools/interface/Analyser.h
"
2
3
// this example has no selection
4
// for MC it will apply the generator weights
5
6
using namespace
std
;
7
using namespace
analysis
;
8
using namespace
analysis::tools
;
9
10
int
main
(
int
argc,
char
** argv)
11
{
12
Analyser
analyser(argc,argv);
13
auto
config
= analyser.
config
();
14
15
// HISTOGRAMS definitions
16
// create some predefined jet histograms
17
// if not defined, the number of jets is nJetMin from the configurations
18
analyser.
jetHistograms
(
"selection01"
);
19
20
for
(
int
i = 0 ; i < analyser.
nEvents
() ; ++i )
21
{
22
if
( ! analyser.
event
(i) )
continue
;
23
24
// JETS
25
analyser.
actionApplyJER
();
// correction : jet energy resolution smearing
26
analyser.
actionApplyBjetRegression
();
// correction : jet energy regression (for b jets)
27
if
( ! analyser.
selectionJetId
() )
continue
;
// selection : jet identification
28
if
( ! analyser.
selectionJetPileupId
() )
continue
;
// selection : jet Pileup identification
29
if
( ! analyser.
selectionNJets
() )
continue
;
// selection : number of jets
30
31
// the lines below will only be executed if rank <= nJetsMin
32
if
( ! analyser.
selectionJet
(1) )
continue
;
// selection : jet1 pt and eta
33
if
( ! analyser.
selectionJet
(2) )
continue
;
// selection : jet2 pt and eta
34
if
( ! analyser.
selectionJetDphi
(1,2) )
continue
;
// selection : delta_phi_jets (1,2) [or MIN(neg): analyser.selectionJetDphi(1,2,-2.0) / MAX(pos): analyser.selectionJetDphi(1,2,+2.0)]
35
36
// HISTOGRAMS
37
analyser.
fillJetHistograms
(
"selection01"
);
// histograms : jets fill
38
39
}
//end event loop
40
41
42
}
// end main
43
analysis::tools::JetAnalyser::selectionJetDphi
virtual bool selectionJetDphi(const int &r1, const int &r2)
Given the rankings r1 and r2 of two jets, it returns whether the jets passes the delta_phi selection;...
Definition:
JetAnalyser.cc:492
analysis::tools::BaseAnalyser::config
std::shared_ptr< Config > config()
returns pointer to Config object
Definition:
BaseAnalyser.cc:208
analysis
Definition:
MssmHbbAnalyser.h:35
analysis::tools
Definition:
Analyser.h:38
analysis::tools::JetAnalyser::selectionJet
virtual bool selectionJet(const int &r)
Given the ranking 'r' of a jet, it returns whether the jet passes the pt_min and |eta_max|, optionally pt_max, where the values of the thresholds pt_min and |eta_max|, pt_max are passed by configuration file.
Definition:
JetAnalyser.cc:378
std
Definition:
JetResolutionObject.h:74
analysis::tools::JetAnalyser::fillJetHistograms
virtual void fillJetHistograms(const std::string &label="x")
Fill the pre-defined histograms created by the jetHistograms() method.
Definition:
JetAnalyser.cc:795
analysis::tools::JetAnalyser::actionApplyJER
virtual void actionApplyJER()
Definition:
JetAnalyser.cc:992
submitCrab3Data.config
config
Definition:
submitCrab3Data.py:80
analysis::tools::JetAnalyser::jetHistograms
virtual void jetHistograms(const int &n, const std::string &label="x")
Creates pre-defined histograms in directory 'label' for analysis with 'n' jets.
Definition:
JetAnalyser.cc:172
analysis::tools::JetAnalyser::selectionNJets
virtual bool selectionNJets()
Definition:
JetAnalyser.cc:670
analysis::tools::Analyser
inheritance
Definition:
Analyser.h:41
Analyser.h
analysis::tools::Analyser::event
virtual bool event(const int &)
Read event and perform basic selections and actions.
Definition:
Analyser.cc:42
main
int main(int argc, char **argv)
Definition:
AnalyserJetsExample.cc:10
analysis::tools::BaseAnalyser::nEvents
int nEvents()
number of events to be processed
Definition:
BaseAnalyser.cc:213
analysis::tools::JetAnalyser::actionApplyBjetRegression
virtual void actionApplyBjetRegression()
Definition:
JetAnalyser.cc:1044
analysis::tools::JetAnalyser::selectionJetId
virtual bool selectionJetId()
Definition:
JetAnalyser.cc:624
analysis::tools::JetAnalyser::selectionJetPileupId
virtual bool selectionJetPileupId()
Definition:
JetAnalyser.cc:646
Generated by
1.8.11