DESY Hbb Analysis Framework
Functions
AnalyserJetsExample.cc File Reference
#include "Analysis/Tools/interface/Analyser.h"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 10 of file AnalyserJetsExample.cc.

References analysis::tools::JetAnalyser::actionApplyBjetRegression(), analysis::tools::JetAnalyser::actionApplyJER(), submitCrab3Data::config, analysis::tools::BaseAnalyser::config(), analysis::tools::Analyser::event(), analysis::tools::JetAnalyser::fillJetHistograms(), analysis::tools::JetAnalyser::jetHistograms(), analysis::tools::BaseAnalyser::nEvents(), analysis::tools::JetAnalyser::selectionJet(), analysis::tools::JetAnalyser::selectionJetDphi(), analysis::tools::JetAnalyser::selectionJetId(), analysis::tools::JetAnalyser::selectionJetPileupId(), and analysis::tools::JetAnalyser::selectionNJets().

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