HiggsAnalysis-KITHiggsToTauTau
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
MEtSys.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <TFile.h>
5 #include <TH1.h>
6 #include <TH2.h>
7 #include <TF1.h>
8 #include <TString.h>
9 #include <TRandom.h>
10 #include <TMath.h>
11 #include <assert.h>
12 
13 class MEtSys {
14 
15  public:
16  MEtSys(TString fileName);
17  ~MEtSys(){};
18 
19  void ApplyMEtSys(float metPx,
20  float metPy,
21  float genVPx,
22  float genVPy,
23  float visVPx,
24  float visVPy,
25  int njets,
26  int bkgdType,
27  int sysType,
28  int shiftType,
29  float & metShiftPx,
30  float & metShiftPy);
31 
32  void ShiftMEt(float metPx,
33  float metPy,
34  float genVPx,
35  float genVPy,
36  float visVPx,
37  float visVPy,
38  int njets,
39  int bkgdType,
40  int sysType,
41  float sysShift,
42  float & metShiftPx,
43  float & metShiftPy);
44 
45  void ShiftResponseMet(float metPx,
46  float metPy,
47  float genVPx,
48  float genVPy,
49  float visVPx,
50  float visVPy,
51  int njets,
52  int bkgdType,
53  float sysShift,
54  float & metShiftPx,
55  float & metShiftPy);
56 
57 
58  void ShiftResolutionMet(float metPx,
59  float metPy,
60  float genVPx,
61  float genVPy,
62  float visVPx,
63  float visVPy,
64  int njets,
65  int bkgdType,
66  float sysShift,
67  float & metShiftPx,
68  float & metShiftPy);
69 
70  enum ProcessType{BOSON=0, EWK=1, TOP=2};
72  enum SysShift{NoShift=-1, Up=0, Down=1};
73 
74  private:
75 
76  void ComputeHadRecoilFromMet(float metX,
77  float metY,
78  float genVPx,
79  float genVPy,
80  float visVPx,
81  float visVPy,
82  float & Hparal,
83  float & Hperp);
84 
85 
86  void ComputeMetFromHadRecoil(float Hparal,
87  float Hperp,
88  float genVPx,
89  float genVPy,
90  float visVPx,
91  float visVPy,
92  float & metX,
93  float & metY);
94 
95 
96  int nBkgdTypes;
97  int nJetBins;
98  TH1D * responseHist[3][5];
99  float sysUnc[3][2][3]; // first index : bkgd type
100  // second index : type of uncertainty 0=response, 1=resolution
101  // third index : jet multiplicity bin (0,1,2);
102 
103 };
Definition: MEtSys.h:71
MEtSys(TString fileName)
Definition: MEtSys.cc:3
Definition: MEtSys.h:13
Definition: MEtSys.h:72
Definition: MEtSys.h:71
Definition: MEtSys.h:72
void ShiftResolutionMet(float metPx, float metPy, float genVPx, float genVPy, float visVPx, float visVPy, int njets, int bkgdType, float sysShift, float &metShiftPx, float &metShiftPy)
Definition: MEtSys.cc:175
void ShiftResponseMet(float metPx, float metPy, float genVPx, float genVPy, float visVPx, float visVPy, int njets, int bkgdType, float sysShift, float &metShiftPx, float &metShiftPy)
Definition: MEtSys.cc:127
Definition: MEtSys.h:70
void ShiftMEt(float metPx, float metPy, float genVPx, float genVPy, float visVPx, float visVPy, int njets, int bkgdType, int sysType, float sysShift, float &metShiftPx, float &metShiftPy)
Definition: MEtSys.cc:225
ProcessType
Definition: MEtSys.h:70
SysType
Definition: MEtSys.h:71
SysShift
Definition: MEtSys.h:72
Definition: MEtSys.h:72
void ApplyMEtSys(float metPx, float metPy, float genVPx, float genVPy, float visVPx, float visVPy, int njets, int bkgdType, int sysType, int shiftType, float &metShiftPx, float &metShiftPy)
Definition: MEtSys.cc:269
Definition: MEtSys.h:71
Definition: MEtSys.h:70
Definition: MEtSys.h:70
~MEtSys()
Definition: MEtSys.h:17