-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnalysisStop.h
More file actions
149 lines (110 loc) · 5.72 KB
/
AnalysisStop.h
File metadata and controls
149 lines (110 loc) · 5.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#ifndef AnalysisStop_h
#define AnalysisStop_h
#include "AnalysisCMS.h"
#include "../../BTagSFUtil/BTagSFUtil.C"
#include <map>
class AnalysisStop : public AnalysisCMS
{
public :
AnalysisStop(TTree* tree, TString systematic);
AnalysisStop(TFile* file, TString systematic, int FillAllHistograms = 1);
void BookAnalysisHistograms();
void BookSystematicHistograms();
void GetAnalysisVariables();
void FillAnalysisHistograms(int ichannel,
int icut,
int ijet);
void FillSystematicHistograms(int ichannel,
int icut);
void FillLevelHistograms (int icut,
bool pass);
void SaveSystematicHistograms();
void Loop (TString analysis,
TString sample,
float luminosity,
float StopRefMass = -1.,
float NeutralinoRefMass = -1.);
void CorrectEventWeight ();
void SetStopNeutralinoMap ();
void GetMiniTree (TFile *MiniTreeFile, TString systematic);
bool PassFastsimJetsCleanup();
TString FastSimDataset;
BTagSFUtil *BTagSF, *BTagSF_Upb, *BTagSF_Dob, *BTagSF_UpFSb, *BTagSF_DoFSb;
typedef pair<int, int> MassPoint;
typedef pair<float, float> StopCrossSection;
typedef pair<StopCrossSection, int> MassPointParameters;
typedef map<MassPoint, MassPointParameters> MassPointMap;
MassPointMap StopNeutralinoMap;
typedef map<MassPoint, float> MassPointISRMap;
MassPointISRMap StopNeutralinoISRMap;
// Analysis histograms
//----------------------------------------------------------------------------
TH1D* h_mt2lblbcomb [nchannel][ncut][njetbin+1];
TH1D* h_mt2bbtrue [nchannel][ncut][njetbin+1];
TH1D* h_mt2lblbtrue [nchannel][ncut][njetbin+1];
TH1D* h_mt2lblbmatch [nchannel][ncut][njetbin+1];
TH1D* h_mlb1comb [nchannel][ncut][njetbin+1];
TH1D* h_mlb2comb [nchannel][ncut][njetbin+1];
TH1D* h_mlb1true [nchannel][ncut][njetbin+1];
TH1D* h_mlb2true [nchannel][ncut][njetbin+1];
TH2D* h_mt2lblbvsmlbtrue [nchannel][ncut][njetbin+1];
TH1D* h_nisrjet [nchannel][ncut][njetbin+1];
// TTZ
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
float _m2lep[3];
TH1F* h_counterLum_TTZexe [nchannel][ncut][njetbin+1];
TH1F* h_counterLum_TTZ [nchannel][ncut][njetbin+1];
TH1F* h_m2l_TTZexe [nchannel][ncut][njetbin+1];
TH1F* h_m2l_TTZ [nchannel][ncut][njetbin+1];
TH1F* h_metPfType1_TTZexe [nchannel][ncut][njetbin+1];
TH1F* h_metPfType1_TTZ [nchannel][ncut][njetbin+1];
TH1F* h_MT2ll_TTZexe [nchannel][ncut][njetbin+1];
TH1F* h_MT2ll_TTZ [nchannel][ncut][njetbin+1];
int _SaveHistograms;
float _metmeff, _MT2ll, _MT2llgen;
TH1D* h_metmeff [nchannel][ncut][njetbin+1];
TH1F* h_MT2ll [nchannel][ncut][njetbin+1];
TH1F* h_MT2llgen [nchannel][ncut][njetbin+1];
TH1F* h_MT2llisr [nchannel][ncut][njetbin+1];
TH1F* h_MT2llisrgen [nchannel][ncut][njetbin+1];
TH1F* h_MT2ll_nvtxup [nchannel][ncut][njetbin+1];
TH1F* h_MT2ll_nvtxdo [nchannel][ncut][njetbin+1];
TH1F* h_MT2llgen_nvtxup [nchannel][ncut][njetbin+1];
TH1F* h_MT2llgen_nvtxdo [nchannel][ncut][njetbin+1];
TH1F* h_MT2llisr_nvtxup [nchannel][ncut][njetbin+1];
TH1F* h_MT2llisr_nvtxdo [nchannel][ncut][njetbin+1];
TH1F* h_MT2llisrgen_nvtxup [nchannel][ncut][njetbin+1];
TH1F* h_MT2llisrgen_nvtxdo [nchannel][ncut][njetbin+1];
TH1F* h_MT2ll_fake [nchannel][ncut][njetbin+1];
TH1F* h_MT2ll_truth [nchannel][ncut][njetbin+1];
TH1F* h_MET_fake [nchannel][ncut][njetbin+1];
TH1F* h_MET_truth [nchannel][ncut][njetbin+1];
bool _hasisrjet;
int _nLeptonsMatched;
float _MT2_Met; int NbinsMT2 = 7; int NbinsMet = 5;
float vMinMT2 = 0., vMinMet = 0., vMaxMT2 = 140., vMaxMet = 500.;
TH1D* h_MT2_Met [nchannel][ncut][njetbin+1];
float _HTvisible_Met; int NbinsHTvisible = 5;
float vMinHTvisible = 0., vMaxHTvisible = 400.;
TH1D* h_HTvisible_Met [nchannel][ncut][njetbin+1];
float _MetMeff_Met; int NbinsMetMeff = 8;
float vMinMetMeff = 0., vMaxMetMeff = 0.8;
TH1D* h_MetMeff_Met [nchannel][ncut][njetbin+1];
float _R2_Met; int NbinsR2 = 7;
float vMinR2 = 0., vMaxR2 = 1.4;
TH1D* h_R2_Met [nchannel][ncut][njetbin+1];
// Systematic output
TFile* root_output_systematic[nsystematic];
TH1F* h_MT2ll_systematic [nchannel][ncut][nsystematic];
TH1F* h_MT2llgen_systematic [nchannel][ncut][nsystematic];
TH1F* h_MT2llisr_systematic [nchannel][ncut][nsystematic];
TH1F* h_MT2llisrgen_systematic [nchannel][ncut][nsystematic];
// Tools for ISR jet reweighting
// https://indico.cern.ch/event/592621/contributions/2398559/attachments/1383909/2105089/16-12-05_ana_manuelf_isr.pdf
bool _applyisrreweighting = true;
float _event_weight_Isrnjetup, _event_weight_Isrnjetdo;
void ApplyISRReweighting();
const int nISRMultiplicityBins = 7;
float ISRBinWeight[7] = {1., 0.920, 0.821, 0.715, 0.662, 0.561, 0.511};
};
#endif