DESY Hbb Analysis Framework
AnalyserInit.cc
Go to the documentation of this file.
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  TH1::SetDefaultSumw2(); // proper treatment of errors when scaling histograms
13 
14  Analyser analyser(argc,argv);
15 
16  // you can always get the ususal analysis class
17  auto analysis = analyser.analysis();
18 
19  for ( int i = 0 ; i < analyser.nEvents() ; ++i )
20  {
21  if ( ! analyser.event(i) ) continue;
22 
23 // PILEUP RE-WEIGHT
24  analyser.actionApplyPileupWeight();
25 
26  } //end event loop
27 } // end main
28 
int main(int argc, char **argv)
Definition: AnalyserInit.cc:10
void actionApplyPileupWeight(const int &var=0)
apply pileup weight given a systematic variation
virtual bool event(const int &)
Read event and perform basic selections and actions.
Definition: Analyser.cc:42
std::shared_ptr< Analysis > analysis()
returns pointer to Analysis object
int nEvents()
number of events to be processed