DESY Hbb Analysis Framework
PileupWeight.h
Go to the documentation of this file.
1 #ifndef Analysis_Tools_PileupWeight_h
2 #define Analysis_Tools_PileupWeight_h 1
3 
4 // -*- C++ -*-
5 //
6 // Package: Analysis/Tools
7 // Class: xxx
8 //
16 //
17 // Original Author: Roberval Walsh Bastos Rangel
18 // Created: Mon, 20 Oct 2014 14:24:08 GMT
19 //
20 //
21 
22 // system include files
23 #include <memory>
24 #include <vector>
25 #include <string>
26 #include <map>
27 #include <iostream>
28 //
29 // user include files
30 
31 #include "TH1.h"
32 
33 
34 //
35 // class declaration
36 //
37 
38 namespace analysis {
39  namespace tools {
40 
41  class PileupWeight {
42  public:
44  PileupWeight();
45  PileupWeight(const std::string &);
47  ~PileupWeight();
48 
49  // ----------member data ---------------------------
50  protected:
51  std::map<int,std::shared_ptr<TH1D> > histos_;
52 
53  private:
54 
55  public:
56  float weight(const float & truepu, const int & var = 0);
57  std::shared_ptr<TH1D> histogram(const int & var = 0);
58  };
59  }
60 }
61 
62 #endif // Analysis_Tools_PileupWeight_h
std::shared_ptr< TH1D > histogram(const int &var=0)
float weight(const float &truepu, const int &var=0)
Definition: PileupWeight.cc:64
std::map< int, std::shared_ptr< TH1D > > histos_
Definition: PileupWeight.h:51