TIMBER  beta
Tree Interface for Making Binned Events with RDataFrame
Pileup_weight.h
1 #ifndef _TIMBER_PILEUP_WEIGHT
2 #define _TIMBER_PILEUP_WEIGHT
3 #include <iostream>
4 #include <TFile.h>
5 #include <TH1.h>
6 #include <TROOT.h>
7 #include <TTree.h>
8 #include "common.h"
9 #include "../ext/WeightCalculatorFromHistogram.h"
10 
15  private:
16  TFile *_dataFile, *_mcFile;
17  TH1 *_dataHist, *_dataHistUp, *_dataHistDown,
18  *_mcHist, *_mcHistUp, *_mcHistDown;
19  WeightCalculatorFromHistogram _worker, _worker_plus, _worker_minus;
20  bool _autoPU;
21 
22  void init(std::string filename_mc, std::string filename_data,
23  std::string histname_mc, std::string histname_data);
24 
25  public:
35  Pileup_weight(std::string filename_mc, std::string filename_data,
36  std::string histname_mc, std::string histname_data);
44  Pileup_weight(std::string era);
51  std::vector<float> eval(int Pileup_nTrueInt);
52  ~Pileup_weight(){};
53 };
54 #endif
Pileup_weight(std::string filename_mc, std::string filename_data, std::string histname_mc, std::string histname_data)
Construct a new Pileup_weight object, providing custom MC and data histograms to take the ratio of th...
Definition: Pileup_weight.cc:3
std::vector< float > eval(int Pileup_nTrueInt)
Evaluate the pileup weight (value of ratio of data to simulation).
Definition: Pileup_weight.cc:37
C++ class to handle pileup reweighting. Used in AutoPU.py.
Definition: Pileup_weight.h:14