Revision: | 1.1 |
Committed: | Tue Mar 12 20:43:04 2013 UTC (12 years, 1 month 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, HEAD |
Log Message: | First commit of lepton scale factor machinery. |
# | User | Rev | Content |
---|---|---|---|
1 | ahart | 1.1 | #ifndef SF_WEIGHT |
2 | |||
3 | #define SF_WEIGHT | ||
4 | |||
5 | #include <iostream> | ||
6 | #include <iomanip> | ||
7 | #include <map> | ||
8 | #include <string> | ||
9 | #include <vector> | ||
10 | #include <cmath> | ||
11 | |||
12 | #include "TH1D.h" | ||
13 | #include "TGraphAsymmErrors.h" | ||
14 | #include "TFile.h" | ||
15 | |||
16 | using namespace std; | ||
17 | |||
18 | class MuonSFWeight | ||
19 | { | ||
20 | public: | ||
21 | MuonSFWeight () {}; | ||
22 | MuonSFWeight (const string &, const string &); | ||
23 | MuonSFWeight (const string &, const string &, const string &); | ||
24 | ~MuonSFWeight (); | ||
25 | double operator[] (const double &eta) { return muonSFWeight_->FindBin (eta) > muonSFWeight_->GetNbinsX () ? 0.0 : muonSFWeight_->GetBinContent (muonSFWeight_->FindBin (eta)); }; | ||
26 | double at (const double &eta) { return (*this)[eta]; }; | ||
27 | |||
28 | private: | ||
29 | TH1D *muonSFWeight_; | ||
30 | }; | ||
31 | |||
32 | class ElectronSFWeight | ||
33 | { | ||
34 | public: | ||
35 | ElectronSFWeight () {}; | ||
36 | ElectronSFWeight (const string &, const string &); | ||
37 | ~ElectronSFWeight (); | ||
38 | double at (const double &, const double &); | ||
39 | |||
40 | private: | ||
41 | string cmsswRelease_; | ||
42 | string id_; | ||
43 | }; | ||
44 | |||
45 | #endif |