ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/AnaTools/interface/PUWeight.h
Revision: 1.1
Committed: Fri Nov 23 11:24:59 2012 UTC (12 years, 5 months ago) by ahart
Content type: text/plain
Branch: MAIN
CVS Tags: V02-03-02, V02-03-01, V02-03-00, V02-02-00, V02-01-01, V02-01-00, V01-01-00, V01-00-01, V01-00-00, V00-01-00, V00-00-01, HEAD
Log Message:
First commit of the PUWeight class.

File Contents

# User Rev Content
1 ahart 1.1 #ifndef PU_WEIGHT
2    
3     #define PU_WEIGHT
4    
5     #include <iostream>
6     #include <iomanip>
7     #include <map>
8     #include <string>
9     #include <vector>
10    
11     #include "TH1D.h"
12     #include "TFile.h"
13    
14     using namespace std;
15    
16     class PUWeight
17     {
18     public:
19     PUWeight () {};
20     PUWeight (const string &, const string &, const string &);
21     ~PUWeight ();
22     double operator[] (const unsigned &pu) { return puWeight_->GetBinContent (puWeight_->FindBin (pu)); };
23     double at (const unsigned &pu) { return (*this)[pu]; };
24    
25     private:
26     TH1D *puWeight_;
27     };
28    
29     #endif