1 |
algomez |
1.1 |
// The class definition in Analyzer.h has been generated automatically
|
2 |
|
|
// by the ROOT utility TTree::MakeSelector(). This class is derived
|
3 |
|
|
// from the ROOT class TSelector. For more information on the TSelector
|
4 |
|
|
// framework see $ROOTSYS/README/README.SELECTOR or the ROOT User Manual.
|
5 |
|
|
|
6 |
|
|
// The following methods are defined in this file:
|
7 |
|
|
// Begin(): called every time a loop on the tree starts,
|
8 |
|
|
// a convenient place to create your histograms.
|
9 |
|
|
// SlaveBegin(): called after Begin(), when on PROOF called only on the
|
10 |
|
|
// slave servers.
|
11 |
|
|
// Process(): called for each event, in this function you decide what
|
12 |
|
|
// to read and fill your histograms.
|
13 |
|
|
// SlaveTerminate: called at the end of the loop on the tree, when on PROOF
|
14 |
|
|
// called only on the slave servers.
|
15 |
|
|
// Terminate(): called at the end of the loop on the tree,
|
16 |
|
|
// a convenient place to draw/fit your histograms.
|
17 |
|
|
//
|
18 |
|
|
// To use this file, try the following session on your Tree T:
|
19 |
|
|
//
|
20 |
|
|
// Root > T->Process("Analyzer.C")
|
21 |
|
|
// Root > T->Process("Analyzer.C","some options")
|
22 |
|
|
// Root > T->Process("Analyzer.C+")
|
23 |
|
|
//
|
24 |
|
|
|
25 |
|
|
#include "Analyzer.h"
|
26 |
algomez |
1.15 |
#include "BTagWeight.h"
|
27 |
algomez |
1.9 |
#include "BTagSFUtil_lite.h"
|
28 |
algomez |
1.13 |
#include "CondFormats/JetMETObjects/interface/JetCorrectorParameters.h"
|
29 |
algomez |
1.1 |
//#include "Yumiceva/TreeAnalyzer/interface/JetCombinatorics.h"
|
30 |
algomez |
1.17 |
#include "PhysicsTools/Utilities/interface/Lumi3DReWeighting.h"
|
31 |
algomez |
1.1 |
|
32 |
|
|
#include <TStyle.h>
|
33 |
|
|
#include <TSystem.h>
|
34 |
|
|
|
35 |
|
|
#include <iostream>
|
36 |
|
|
#include <vector>
|
37 |
|
|
#include <stdio.h>
|
38 |
|
|
#include <stdlib.h>
|
39 |
algomez |
1.13 |
#include <algorithm>
|
40 |
|
|
//#define NMAX 100
|
41 |
|
|
|
42 |
|
|
struct sortPt
|
43 |
|
|
{
|
44 |
|
|
bool operator()(TopJetEvent s1, TopJetEvent s2) const
|
45 |
|
|
{
|
46 |
|
|
return s1.pt >= s2.pt;
|
47 |
|
|
}
|
48 |
|
|
} mysortPt;
|
49 |
algomez |
1.1 |
|
50 |
|
|
void Analyzer::ParseInput()
|
51 |
|
|
{
|
52 |
|
|
|
53 |
|
|
if (fMyOpt.Contains("muon"))
|
54 |
|
|
{
|
55 |
|
|
fChannel = 1;
|
56 |
|
|
}
|
57 |
|
|
if (fMyOpt.Contains("electron"))
|
58 |
|
|
{
|
59 |
|
|
fChannel = 2;
|
60 |
|
|
}
|
61 |
|
|
if (fMyOpt.Contains("verbose"))
|
62 |
|
|
{
|
63 |
|
|
fVerbose = true;
|
64 |
|
|
}
|
65 |
|
|
if (fMyOpt.Contains("JECUP")) { fdoJECunc = true; fdoJECup = true; }
|
66 |
|
|
if (fMyOpt.Contains("JECDOWN")) { fdoJECunc = true; fdoJECup = false; }
|
67 |
algomez |
1.13 |
if (fMyOpt.Contains("JERUP")) { fdoJERup = true; }
|
68 |
|
|
if (fMyOpt.Contains("JERDOWN")) { fdoJERdown = true; }
|
69 |
|
|
if (fMyOpt.Contains("PUUP")) { fpu_up = true;}
|
70 |
|
|
if (fMyOpt.Contains("PUDOWN")) { fpu_down = true;}
|
71 |
algomez |
1.17 |
if (fMyOpt.Contains("BTAGUP")) { fbtag_up = true;}
|
72 |
|
|
if (fMyOpt.Contains("BTAGDOWN")) { fbtag_down = true;}
|
73 |
algomez |
1.8 |
if (fMyOpt.Contains("QCD1")) fdoQCD1SideBand = true;//anti-isolation
|
74 |
|
|
if (fMyOpt.Contains("QCD2")) fdoQCD2SideBand = true;//MET < 20 GeV
|
75 |
algomez |
1.17 |
if (fMyOpt.Contains("diLepton")) fdodiLepton = true;
|
76 |
algomez |
1.1 |
if (fMyOpt.Contains("mtop")) fdoMtopCut = true;
|
77 |
|
|
if (fMyOpt.Contains("outdir")) {
|
78 |
|
|
TString tmp = fMyOpt;
|
79 |
|
|
tmp = tmp.Remove(0,fMyOpt.Index("outdir")+7);
|
80 |
|
|
fOutdir = tmp+"/";
|
81 |
|
|
Info("Begin","output files will be written to directory: %s", fOutdir.Data());
|
82 |
|
|
}
|
83 |
|
|
if (fMyOpt.Contains("sample"))
|
84 |
|
|
{
|
85 |
|
|
TString tmp = fMyOpt;
|
86 |
|
|
tmp = tmp.Remove(0,fMyOpt.Index("sample")+7);
|
87 |
|
|
fSample = tmp;
|
88 |
|
|
if (fdoJECunc && fdoJECup==true) fSample += "_JECUP";
|
89 |
|
|
if (fdoJECunc && fdoJECup==false) fSample += "_JECDOWN";
|
90 |
algomez |
1.2 |
if (fMyOpt.Contains("PUUP")) fSample += "_PUUP";
|
91 |
|
|
if (fMyOpt.Contains("PUDOWN")) fSample += "_PUDOWN";
|
92 |
algomez |
1.13 |
if (fdoJERunc && fdoJERup==true) fSample += "_JERUP";
|
93 |
|
|
if (fdoJERunc && fdoJERdown==true) fSample += "_JERDOWN";
|
94 |
algomez |
1.17 |
if (fMyOpt.Contains("BTAGUP")) fSample += "_BTAGUP";
|
95 |
|
|
if (fMyOpt.Contains("BTAGDOWN")) fSample += "_BTAGDOWN";
|
96 |
algomez |
1.1 |
|
97 |
|
|
Info("Begin","Histogram names will have suffix: %s", fSample.Data());
|
98 |
|
|
|
99 |
|
|
if ( fSample.Contains("data") )
|
100 |
|
|
{
|
101 |
|
|
fIsMC = false;
|
102 |
|
|
Info("Begin","This sample is treated as DATA");
|
103 |
|
|
if (fdoQCD1SideBand) fSample = "dataQCD1";
|
104 |
|
|
if (fdoQCD2SideBand) fSample = "dataQCD2";
|
105 |
|
|
}
|
106 |
algomez |
1.2 |
else
|
107 |
|
|
{
|
108 |
|
|
Info("Begin","This sample is treated as MC");
|
109 |
|
|
}
|
110 |
|
|
|
111 |
algomez |
1.1 |
|
112 |
|
|
}
|
113 |
|
|
}
|
114 |
|
|
|
115 |
|
|
void Analyzer::Begin(TTree * /*tree*/)
|
116 |
|
|
{
|
117 |
|
|
// The Begin() function is called at the start of the query.
|
118 |
|
|
// When running with PROOF Begin() is only called on the client.
|
119 |
|
|
// The tree argument is deprecated (on PROOF 0 is passed).
|
120 |
|
|
|
121 |
|
|
TString option = GetOption();
|
122 |
|
|
fMyOpt = option;
|
123 |
|
|
ParseInput();
|
124 |
|
|
|
125 |
|
|
Info("Begin", "starting with process option: %s", option.Data());
|
126 |
|
|
|
127 |
|
|
}
|
128 |
|
|
|
129 |
|
|
void Analyzer::SlaveBegin(TTree * tree)
|
130 |
|
|
{
|
131 |
|
|
|
132 |
|
|
// The SlaveBegin() function is called after the Begin() function.
|
133 |
|
|
// When running with PROOF SlaveBegin() is called on each slave server.
|
134 |
|
|
// The tree argument is deprecated (on PROOF 0 is passed).
|
135 |
|
|
|
136 |
|
|
TString option = GetOption();
|
137 |
|
|
fMyOpt = option;
|
138 |
|
|
ParseInput();
|
139 |
|
|
|
140 |
|
|
Info("SlaveBegin",
|
141 |
|
|
"starting with process option: %s (tree: %p)", option.Data(), tree);
|
142 |
|
|
|
143 |
|
|
//initialize the Tree branch addresses
|
144 |
|
|
Init(tree);
|
145 |
|
|
|
146 |
|
|
// We may be creating a dataset or a merge file: check it
|
147 |
|
|
TNamed *nm = dynamic_cast<TNamed *>(fInput->FindObject("SimpleNtuple.root"));
|
148 |
|
|
if (nm) {
|
149 |
algomez |
1.15 |
// Just create the object
|
150 |
|
|
UInt_t opt = TProofOutputFile::kRegister | TProofOutputFile::kOverwrite | TProofOutputFile::kVerify;
|
151 |
|
|
fProofFile = new TProofOutputFile( "SimpleNtuple.root",TProofOutputFile::kDataset, opt, nm->GetTitle());
|
152 |
algomez |
1.1 |
} else {
|
153 |
algomez |
1.15 |
// For the ntuple, we use the automatic file merging facility
|
154 |
|
|
// Check if an output URL has been given
|
155 |
|
|
TNamed *out = (TNamed *) fInput->FindObject("PROOF_OUTPUTFILE_LOCATION");
|
156 |
|
|
Info("SlaveBegin", "PROOF_OUTPUTFILE_LOCATION: %s", (out ? out->GetTitle() : "undef"));
|
157 |
algomez |
1.17 |
//TString dir = "file:/uscms_data/d3/algomez/files/fourtop/resultsTreeAnalyzer/resultsFinal/";
|
158 |
algomez |
1.18 |
TString dir = "file:/uscms_data/d3/algomez/files/fourtop/resultsTreeAnalyzer/results110/Nbjets3/";
|
159 |
|
|
//TString dir = "file:/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/";
|
160 |
algomez |
1.15 |
Info("SlaveBegin","We will store the sample under the directory: %s", dir.Data());
|
161 |
|
|
TString tmpfilename = "results";
|
162 |
|
|
if ( fSample != "" ) tmpfilename += "_"+fSample+".root";
|
163 |
|
|
else tmpfilename = "results.root";
|
164 |
|
|
//TString filename ="SimpleNtuple.root";
|
165 |
|
|
fProofFile = new TProofOutputFile(tmpfilename,TProofOutputFile::kMerge);
|
166 |
|
|
|
167 |
|
|
//fProofFile->SetOutputFileName(dir + "SimpleNtuple.root");
|
168 |
|
|
fProofFile->SetOutputFileName(dir + tmpfilename);
|
169 |
|
|
out = (TNamed *) fInput->FindObject("PROOF_OUTPUTFILE");
|
170 |
|
|
|
171 |
|
|
if (out) fProofFile->SetOutputFileName(out->GetTitle());
|
172 |
algomez |
1.1 |
}
|
173 |
|
|
|
174 |
|
|
// Open the file
|
175 |
|
|
//TDirectory *savedir = gDirectory;
|
176 |
|
|
if (!(fFile = fProofFile->OpenFile("RECREATE"))) {
|
177 |
|
|
Warning("SlaveBegin", "problems opening file: %s/%s",
|
178 |
|
|
fProofFile->GetDir(), fProofFile->GetFileName());
|
179 |
|
|
}
|
180 |
|
|
|
181 |
|
|
//create histograms
|
182 |
|
|
h1test = new TH1F("h1test","muon p_{T}",100,10.,400);
|
183 |
|
|
TString hname = "_"+fSample;
|
184 |
|
|
|
185 |
algomez |
1.16 |
hmuons["N0"] = new TH1F("N_muons_cut0"+hname,"Number of Muons",6, -0.5, 5.5);
|
186 |
|
|
hmuons["N"] = new TH1F("N_muons"+hname,"Number of Muons",6, -0.5, 5.5);
|
187 |
|
|
hmuons["Nelectrons_cut0"] = new TH1F("Nelectrons_cut0"+hname,"Number of Loose Electrons", 6, -0.5, 5.5);
|
188 |
algomez |
1.18 |
hmuons["eta_cut0"] = new TH1F("muon_eta_cut0"+hname,"#eta^{#mu}", 10, -2.5, 2.5);
|
189 |
|
|
hmuons["eta"] = new TH1F("muon_eta"+hname,"#eta^{#mu}", 25, -2.5, 2.5);
|
190 |
|
|
hmuons["phi_cut0"] = new TH1F("muon_phi_cut0"+hname,"#phi^{#mu}", 35, -3.5, 3.5);
|
191 |
|
|
hmuons["phi"] = new TH1F("muon_phi"+hname,"#phi^{#mu}", 35, -3.5, 3.5);
|
192 |
algomez |
1.16 |
hmuons["reliso"] = new TH1F("muon_reliso"+hname,"Relative Isolation", 20, 0, 0.2);
|
193 |
algomez |
1.18 |
hmuons["deltaR_cut0"] = new TH1F("deltaR_cut0"+hname,"#DeltaR(#mu,jet)",10, 0, 4);
|
194 |
|
|
hmuons["deltaR"] = new TH1F("deltaR"+hname,"min #DeltaR(#mu,j)", 20, 0, 4);
|
195 |
algomez |
1.17 |
hmuons["deltaR_cut2"] = new TH1F("deltaR_cut2"+hname,"#DeltaR(#mu,jet)", 20, 0, 4);
|
196 |
algomez |
1.16 |
hmuons["d0_cut1"] = new TH1F("d0_cut1"+hname,"#mu Impact Parameter [cm]",22,-0.1,0.1);
|
197 |
algomez |
1.18 |
hmuons["pt_cut0"] = new TH1F("muon_pt_cut0"+hname,"p_{T}^{#mu} [GeV/c]", 15, 0, 500);
|
198 |
|
|
hmuons["pt"] = new TH1F("muon_pt"+hname,"p_{T}^{#mu} [GeV/c]", 25, 0, 500);
|
199 |
|
|
hmuons["pt_cut2"] = new TH1F("muon_pt_cut2"+hname,"p_{T}^{#mu} [GeV/c]", 25, 0, 500);
|
200 |
algomez |
1.16 |
//hmuons["dz"] = new TH1F("dz"+hname,"|z(#mu) - z_{PV}| [cm]", 25, 0, 1.);
|
201 |
|
|
hmuons["Niso"] = new TH1F("Niso"+hname,"Number of Primary Vertices", 25, -0.5, 24.5);
|
202 |
|
|
hmuons["Ngood"] = new TH1F("Ngood"+hname,"Number of Primary Vertices",25, -0.5,24.5);
|
203 |
algomez |
1.15 |
hmuons["charge_tiso"] = new TH1F("charge_tiso"+hname,"#mu Charge", 5,-2.5,2.5);
|
204 |
algomez |
1.16 |
hmuons["j4m0"] = new TH1F("j4m0"+hname,"Number of Muons",6, 0.5,6.5);
|
205 |
|
|
hmuons["j5m0"] = new TH1F("j5m0"+hname,"Number of Muons",6, 0.5,6.5);
|
206 |
|
|
hmuons["j6m0"] = new TH1F("j6m0"+hname,"Number of Muons",6, 0.5,6.5);
|
207 |
|
|
hmuons["j4m1"] = new TH1F("j4m1"+hname,"Number of Muons",6, 0.5,6.5);
|
208 |
|
|
hmuons["j5m1"] = new TH1F("j5m1"+hname,"Number of Muons",6, 0.5,6.5);
|
209 |
|
|
hmuons["j6m1"] = new TH1F("j6m1"+hname,"Number of Muons",6, 0.5,6.5);
|
210 |
|
|
hmuons["j4m2"] = new TH1F("j4m2"+hname,"Number of Muons",6, 0.5,6.5);
|
211 |
|
|
hmuons["j5m2"] = new TH1F("j5m2"+hname,"Number of Muons",6, 0.5,6.5);
|
212 |
|
|
hmuons["j6m2"] = new TH1F("j6m2"+hname,"Number of Muons",6, 0.5,6.5);
|
213 |
algomez |
1.1 |
|
214 |
algomez |
1.16 |
|
215 |
|
|
hPVs["Nreweight_cut0"] = new TH1F("NPVreweight_cut0"+hname,"Number of PVs",25, -0.5,24.5);
|
216 |
|
|
hPVs["Nreweight"] = new TH1F("NPVreweight"+hname,"Number of PVs",25, -0.5, 24.5);
|
217 |
algomez |
1.17 |
hPVs["Nreweight_cut2"] = new TH1F("NPVreweight_cut2"+hname,"Number of PVs",25, -0.5, 24.5);
|
218 |
algomez |
1.1 |
|
219 |
algomez |
1.18 |
hMET["MET_cut0"] = new TH1F("MET_cut0"+hname,"Missing Transverse Energy [GeV]", 10, 0, 500);
|
220 |
|
|
hMET["MET"] = new TH1F("MET"+hname,"Missing Transverse Energy [GeV]", 25, 0, 500);
|
221 |
|
|
hMET["MET_cut2"] = new TH1F("MET_cut2"+hname,"Missing Transverse Energy [GeV]", 25, 0, 500);
|
222 |
algomez |
1.17 |
hMET["phi_cut0"] = new TH1F("MET_phi_cut0"+hname,"#phi Missing Transverse Energy [GeV]", 32, -3.15, 3.15);
|
223 |
|
|
hMET["phi"] = new TH1F("MET_phi"+hname,"#phi Missing Transverse Energy [GeV]", 32, -3.15, 3.15);
|
224 |
algomez |
1.16 |
hMET["Ht_cut0"] = new TH1F("Ht_cut0"+hname,"H_{T} [GeV]", 125, 0, 2500);
|
225 |
|
|
hMET["Ht"] = new TH1F("Ht"+hname,"H_{T} [GeV]", 125, 0, 2500);
|
226 |
algomez |
1.17 |
hMET["Ht_cut2"] = new TH1F("Ht_cut2"+hname,"H_{T} [GeV]", 125, 0, 2500);
|
227 |
algomez |
1.18 |
hMET["Stlep_cut0"] = new TH1F("Stlep_cut0"+hname,"S_{T}^{lep} [GeV/c]", 50, 0, 1000);
|
228 |
|
|
hMET["Stlep"] = new TH1F("Stlep"+hname,"S_{T}^{lep} [GeV/c]", 50, 0, 1000);
|
229 |
|
|
hMET["Stlep_cut2"] = new TH1F("Stlep_cut2"+hname,"S_{T}^{lep} [GeV/c]", 50, 0, 1000);
|
230 |
|
|
hMET["Stjet_cut0"] = new TH1F("Stjet_cut0"+hname,"S_{T}^{jet} [GeV/c]", 20, 0, 3000);
|
231 |
|
|
hMET["Stjet"] = new TH1F("Stjet"+hname,"S_{T}^{jet} [GeV/c]", 50, 0, 3000);
|
232 |
|
|
hMET["Stjet_cut2"] = new TH1F("Stjet_cut2"+hname,"S_{T}^{jet} [GeV/c]", 50, 0, 3000);
|
233 |
algomez |
1.16 |
hMET["PzNu"] = new TH1F("PzNu"+hname,"p_{z} #nu [GeV]", 60, -300,300);
|
234 |
|
|
//hMET["EtaNu"] = new TH1F("EtaNu"+hname,"#eta",44,-2.2,2.2);
|
235 |
algomez |
1.17 |
hMET["deltaPhiMETWlep"] = new TH1F("deltaPhiMETWlep"+hname,"#Delta #phi(Missing Transverse Energy,W(#mu,#nu))",32, -3.15, 3.15);
|
236 |
|
|
hMET["deltaPhiMETlep"] = new TH1F("deltaPhiMETlep"+hname,"#Delta #phi(Missing Transverse Energy,#mu)",32, -3.15, 3.15);
|
237 |
|
|
hMET["deltaPhiNulep"] = new TH1F("deltaPhiNulep"+hname,"#Delta #phi(#mu, #nu)",32, -3.15, 3.15);
|
238 |
|
|
hMET["deltaPhiMETWlep_cut2"] = new TH1F("deltaPhiMETWlep_cut2"+hname,"#Delta #phi(Missing Transverse Energy,W(#mu,#nu))",32, -3.15, 3.15);
|
239 |
|
|
hMET["deltaPhiMETlep_cut2"] = new TH1F("deltaPhiMETlep_cut2"+hname,"#Delta #phi(Missing Transverse Energy,#mu)",32, -3.15, 3.15);
|
240 |
|
|
hMET["deltaPhiNulep_cut2"] = new TH1F("deltaPhiNulep_cut2"+hname,"#Delta #phi(#mu, #nu)",32, -3.15, 3.15);
|
241 |
algomez |
1.1 |
|
242 |
algomez |
1.6 |
hM["WMt"] = new TH1F("Mt"+hname,"M_{T}(W) [GeV/c^{2}]", 50, 0, 500); // Transverse Mass sqrt(Wpt*Wpt - Wpx*Wpx - Wpy*Wpy)
|
243 |
algomez |
1.16 |
hM["WMt_cut0"] = new TH1F("Mt_cut0"+hname,"M_{T}(W) [GeV/c^{2}]", 50, 0, 500);
|
244 |
algomez |
1.17 |
hM["WMt_cut2"] = new TH1F("Mt_cut2"+hname,"M_{T}(W) [GeV/c^{2}]", 50, 0, 500);
|
245 |
algomez |
1.18 |
hM["dileadjet_cut0"] = new TH1F("dileadjet_cut0"+hname,"leading (jj) mass [GeV/c^{2}]", 50, 0, 1000);
|
246 |
algomez |
1.17 |
hM["dileadjet"] = new TH1F("dileadjet"+hname,"leading (jj) mass [GeV/c^{2}]", 30, 0, 600);
|
247 |
|
|
hM["dileadjet_cut2"] = new TH1F("dileadjet_cut2"+hname,"leading (jj) mass [GeV/c^{2}]", 25, 0, 500);
|
248 |
algomez |
1.18 |
hM["hadW_mass_cut0"] = new TH1F("hadW_mass_cut0"+hname,"Hadronic W mass [GeV/c^{2}]", 20, 0, 300);
|
249 |
|
|
hM["hadW_mass"] = new TH1F("hadW_mass"+hname,"Hadronic W mass [GeV/c^{2}]", 30, 0, 300);
|
250 |
|
|
hM["hadW_mass_cut2"] = new TH1F("hadW_mass_cut2"+hname,"Hadronic W mass [GeV/c^{2}]", 30, 0, 300);
|
251 |
|
|
hM["hadW_pt_cut0"] = new TH1F("hadW_pt_cut0"+hname,"Hadronic W p_{T} [GeV/c^{2}]", 20, 10, 500);
|
252 |
|
|
hM["hadW_pt"] = new TH1F("hadW_pt"+hname,"Hadronic W p_{T} [GeV/c^{2}]", 49, 10, 500);
|
253 |
|
|
hM["hadW_pt_cut2"] = new TH1F("hadW_pt_cut2"+hname,"Hadronic W p_{T} [GeV/c^{2}]", 49, 10, 500);
|
254 |
|
|
hM["secondhadW_mass_cut0"] = new TH1F("secondhadW_mass_cut0"+hname,"2nd Hadronic W mass [GeV/c^{2}]", 24, 10, 500);
|
255 |
|
|
hM["secondhadW_mass"] = new TH1F("secondhadW_mass"+hname,"2nd Hadronic W mass [GeV/c^{2}]", 49, 10, 500);
|
256 |
|
|
hM["secondhadW_mass_cut2"] = new TH1F("secondhadW_mass_cut2"+hname,"2nd Hadronic W mass [GeV/c^{2}]", 49, 10, 500);
|
257 |
|
|
hM["secondhadW_pt_cut0"] = new TH1F("secondhadW_pt_cut0"+hname,"2nd Hadronic W p_{T} [GeV/c^{2}]", 24, 10, 500);
|
258 |
|
|
hM["secondhadW_pt"] = new TH1F("secondhadW_pt"+hname,"2nd Hadronic W p_{T} [GeV/c^{2}]", 49, 10, 500);
|
259 |
|
|
hM["secondhadW_pt_cut2"] = new TH1F("secondhadW_pt_cut2"+hname,"2nd Hadronic W p_{T} [GeV/c^{2}]", 49, 10, 500);
|
260 |
|
|
hM["Htop_mass_cut0"] = new TH1F("Htop_mass_cut0"+hname,"Hadronic Top mass [GeV/c^{2}]", 10, 0, 600);
|
261 |
|
|
hM["Htop_mass"] = new TH1F("Htop_mass"+hname,"Hadronic Top mass [GeV/c^{2}]", 30, 0, 600);
|
262 |
|
|
hM["Htop_mass_cut2"] = new TH1F("Htop_mass_cut2"+hname,"Hadronic Top mass [GeV/c^{2}]", 30, 0, 600);
|
263 |
|
|
hM["Htop_pt"] = new TH1F("Htop_pt"+hname,"Hadronic Top p_{T} [GeV/c]", 20, 0, 1000);
|
264 |
|
|
hM["Htop_pt_cut0"] = new TH1F("Htop_pt_cut0"+hname,"Hadronic Top p_{T} [GeV/c]", 20, 0, 1000);
|
265 |
|
|
hM["Htop_pt_cut2"] = new TH1F("Htop_pt_cut2"+hname,"Hadronic Top p_{T} [GeV/c]", 50, 0, 500);
|
266 |
|
|
hM["secondHtop_mass_cut0"] = new TH1F("secondHtop_mass_cut0"+hname,"2nd Hadronic Top mass [GeV/c^{2}]", 25, 0, 500);
|
267 |
|
|
hM["secondHtop_mass"] = new TH1F("secondHtop_mass"+hname,"2nd Hadronic Top mass [GeV/c^{2}]", 25, 0, 500);
|
268 |
|
|
hM["secondHtop_mass_cut2"] = new TH1F("secondHtop_mass_cut2"+hname,"2nd Hadronic Top mass [GeV/c^{2}]", 25, 0, 500);
|
269 |
|
|
hM["secondHtop_pt"] = new TH1F("secondHtop_pt"+hname,"2nd Hadronic Top p_{T} [GeV/c]", 50, 0, 1000);
|
270 |
|
|
hM["secondHtop_pt_cut0"] = new TH1F("secondHtop_pt_cut0"+hname,"2nd Hadronic Top p_{T} [GeV/c]", 50, 0, 1000);
|
271 |
|
|
hM["secondHtop_pt_cut2"] = new TH1F("secondHtop_pt_cut2"+hname,"2nd Hadronic Top p_{T} [GeV/c]", 50, 0, 500);
|
272 |
|
|
hM["Leptop_mass_cut0"] = new TH1F("Leptop_cut0"+hname,"Leptonic Top mass [GeV/c^{2}]", 20, 0, 500);
|
273 |
algomez |
1.17 |
hM["Leptop_mass"] = new TH1F("Leptop"+hname,"Leptonic Top mass [GeV/c^{2}]", 25, 0, 500);
|
274 |
algomez |
1.18 |
hM["Leptop_pt_cut0"] = new TH1F("Leptop_pt_cut0"+hname,"Leptonic Top p_{T} [GeV/c]", 10, 0, 1000);
|
275 |
|
|
hM["Leptop_pt"] = new TH1F("Leptop_pt"+hname,"Leptonic Top p_{T} [GeV/c]", 50, 0, 1000);
|
276 |
|
|
hM["lepW_mass_cut0"] = new TH1F("lepW_mass_cut0"+hname,"W#rightarrow#mu#nu Mass [GeV/c^{2}]",15, 50, 200);
|
277 |
algomez |
1.17 |
hM["lepW_mass"] = new TH1F("lepW_mass"+hname,"W#rightarrow#mu#nu Mass [GeV/c^{2}]",15, 50, 200);
|
278 |
|
|
hM["lepW_mass_cut2"] = new TH1F("lepW_mass_cut2"+hname,"W#rightarrow#mu#nu Mass [GeV/c^{2}]",15, 50, 200);
|
279 |
|
|
hM["lepW_pt"]=new TH1F("lepW_pt"+hname,"W#rightarrow#mu#nu p_{t} [GeV/c^{2}]",100, 0, 1000);
|
280 |
|
|
hM["lepW_pt_cut2"]=new TH1F("lepW_pt_cut2"+hname,"W#rightarrow#mu#nu p_{t} [GeV/c^{2}]",100, 0, 1000);
|
281 |
algomez |
1.18 |
hM["diWdeltaphi"] = new TH1F("diWdeltaphi"+hname,"#Delta #phi(W(j,j), W(#mu,#nu))",35, -3.50, 3.50);
|
282 |
|
|
hM["diWdeltaR_cut0"] = new TH1F("diWdeltaR_cut0"+hname,"#Delta R (W(j,j), W(#mu,#nu))",30, 0, 6.);
|
283 |
algomez |
1.17 |
hM["diWdeltaR"] = new TH1F("diWdeltaR"+hname,"#Delta R (W(j,j), W(#mu,#nu))",30, 0, 6.);
|
284 |
algomez |
1.18 |
hM["chi2"] = new TH1F("chi2"+hname,"#chi^{2}", 25, 0, 500);
|
285 |
algomez |
1.6 |
|
286 |
algomez |
1.1 |
hjets["pt"] = new TH1F("jet_pt"+hname,"jet p_{T} [GeV/c]", 60, 30, 800);
|
287 |
algomez |
1.16 |
//hjets["pt_b_mc"] = new TH1F("jet_pt_b_mc"+hname,"jet p_{T} [GeV/c]", 60, 30, 800);
|
288 |
|
|
//hjets["pt_c_mc"] = new TH1F("jet_pt_c_mc"+hname,"jet p_{T} [GeV/c]", 60, 30, 800);
|
289 |
|
|
//hjets["pt_l_mc"] = new TH1F("jet_pt_l_mc"+hname,"jet p_{T} [GeV/c]", 60, 30, 800);
|
290 |
|
|
//hjets["pt_btag"] = new TH1F("jet_pt_btag"+hname,"jet p_{T} [GeV/c]", 60, 30, 800);
|
291 |
|
|
//hjets["pt_btag_b"] = new TH1F("jet_pt_btag_b"+hname,"jet p_{T} [GeV/c]", 60, 30, 800);
|
292 |
|
|
//hjets["pt_btag_c"] = new TH1F("jet_pt_btag_c"+hname,"jet p_{T} [GeV/c]", 60, 30, 800);
|
293 |
|
|
//hjets["pt_btag_l"] = new TH1F("jet_pt_btag_l"+hname,"jet p_{T} [GeV/c]", 60, 30, 800);
|
294 |
algomez |
1.18 |
hjets["1st_pt_cut0"] = new TH1F("jet1_pt_cut0"+hname,"1st Jet p_{T} [GeV/c]", 15, 0, 1200);
|
295 |
|
|
hjets["1st_pt"] = new TH1F("jet1_pt"+hname,"1st Jet p_{T} [GeV/c]", 60, 0, 1200);
|
296 |
|
|
hjets["1st_pt_cut2"] = new TH1F("jet1_pt_cut2"+hname,"1st Jet p_{T} [GeV/c]",60, 0, 1200);
|
297 |
|
|
hjets["2nd_pt_cut0"] = new TH1F("jet2_pt_cut0"+hname,"2nd Jet p_{T} [GeV/c]", 10, 0, 800);
|
298 |
|
|
hjets["2nd_pt"] = new TH1F("jet2_pt"+hname,"2nd Jet p_{T} [GeV/c]", 40, 0, 800);
|
299 |
|
|
hjets["2nd_pt_cut2"] = new TH1F("jet2_pt_cut2"+hname,"2nd Jet p_{T} [GeV/c]", 40, 0, 800);
|
300 |
|
|
hjets["3rd_pt_cut0"] = new TH1F("jet3_pt_cut0"+hname,"3rd Jet p_{T} [GeV/c]", 10, 0, 500);
|
301 |
|
|
hjets["3rd_pt"] = new TH1F("jet3_pt"+hname,"3rd Jet p_{T} [GeV/c]", 25, 0, 500);
|
302 |
|
|
hjets["3rd_pt_cut2"] = new TH1F("jet3_pt_cut2"+hname,"3rd Jet p_{T} [GeV/c]", 25, 0, 500);
|
303 |
|
|
hjets["4th_pt_cut0"] = new TH1F("jet4_pt_cut0"+hname,"4th Jet p_{T} [GeV/c]", 10, 0, 400);
|
304 |
|
|
hjets["4th_pt"] = new TH1F("jet4_pt"+hname,"4th Jet p_{T} [GeV/c]", 20, 0, 400);
|
305 |
|
|
hjets["4th_pt_cut2"] = new TH1F("jet4_pt_cut2"+hname,"4th Jet p_{T} [GeV/c]", 20, 0, 400);
|
306 |
algomez |
1.17 |
hjets["5th_pt_cut0"] = new TH1F("jet5_pt_cut0"+hname,"5th Jet p_{T} [GeV/c]", 29, 10, 300);
|
307 |
|
|
hjets["5th_pt"] = new TH1F("jet5_pt"+hname,"5th Jet p_{T} [GeV/c]", 29, 10, 300);
|
308 |
|
|
hjets["5th_pt_cut2"] = new TH1F("jet5_pt_cut2"+hname,"5th Jet p_{T} [GeV/c]", 29, 10, 300);
|
309 |
|
|
hjets["6th_pt_cut0"] = new TH1F("jet6_pt_cut0"+hname,"6th Jet p_{T} [GeV/c]", 29, 10, 300);
|
310 |
|
|
hjets["6th_pt"] = new TH1F("jet6_pt"+hname,"6th Jet p_{T} [GeV/c]", 29, 10, 300);
|
311 |
|
|
hjets["6th_pt_cut2"] = new TH1F("jet6_pt_cut2"+hname,"6th Jet p_{T} [GeV/c]", 29, 10, 300);
|
312 |
|
|
hjets["7th_pt_cut0"] = new TH1F("jet7_pt_cut0"+hname,"7th Jet p_{T} [GeV/c]", 29, 10, 300);
|
313 |
|
|
hjets["7th_pt"] = new TH1F("jet7_pt"+hname,"7th Jet p_{T} [GeV/c]", 29, 10, 300);
|
314 |
|
|
hjets["7th_pt_cut2"] = new TH1F("jet7_pt_cut2"+hname,"7th Jet p_{T} [GeV/c]", 29, 10, 300);
|
315 |
algomez |
1.18 |
hjets["eta"] = new TH1F("jet_eta"+hname,"jet #eta",24, -2.4, 2.4);
|
316 |
|
|
hjets["1st_eta_cut0"] = new TH1F("jet1_eta_cut0"+hname,"1st Jet #eta",12, -2.4, 2.4);
|
317 |
|
|
hjets["1st_eta"] = new TH1F("jet1_eta"+hname,"1st Jet #eta",24, -2.4, 2.4);
|
318 |
|
|
hjets["1st_eta_cut2"] = new TH1F("jet1_eta_cut2"+hname,"1st Jet #eta",24, -2.4, 2.4);
|
319 |
|
|
hjets["2nd_eta_cut0"] = new TH1F("jet2_eta_cut0"+hname,"2nd Jet #eta",12, -2.4, 2.4);
|
320 |
|
|
hjets["2nd_eta"] = new TH1F("jet2_eta"+hname,"2nd Jet #eta",24, -2.4, 2.4);
|
321 |
|
|
hjets["2nd_eta_cut2"] = new TH1F("jet2_eta_cut2"+hname,"2nd Jet #eta",24, -2.4, 2.4);
|
322 |
|
|
hjets["3rd_eta_cut0"] = new TH1F("jet3_eta_cut0"+hname,"3rd Jet #eta",12, -2.4, 2.4);
|
323 |
|
|
hjets["3rd_eta"] = new TH1F("jet3_eta"+hname,"3rd Jet #eta",24, -2.4, 2.4);
|
324 |
|
|
hjets["4th_eta_cut0"] = new TH1F("jet4_eta_cut0"+hname,"4th Jet #eta",12, -2.4, 2.4);
|
325 |
|
|
hjets["4th_eta"] = new TH1F("jet4_eta"+hname,"4th Jet #eta",24, -2.4, 2.4);
|
326 |
|
|
hjets["phi"] = new TH1F("jet_phi"+hname,"jet #phi",35, -3.5, 3.5);
|
327 |
algomez |
1.17 |
hjets["Njets_cut0"] = new TH1F("Njets_cut0"+hname,"Jet Multiplicity",12, 0.5,12.5);
|
328 |
algomez |
1.16 |
hjets["Njets"] = new TH1F("Njets"+hname,"jet multiplicity",12,0.5,12.5);
|
329 |
algomez |
1.17 |
hjets["Njets_cut2"] = new TH1F("Njets_cut2"+hname,"jet multiplicity",12, 0.5,12.5);
|
330 |
algomez |
1.16 |
hjets["Nbtags_TCHPM_cut0"] = new TH1F("Nbjets_TCHPM_cut0"+hname,"Tagged b-jets",8,-0.5,7.5);
|
331 |
|
|
hjets["Nbtags_TCHPM"] = new TH1F("Nbjets_TCHPM"+hname,"Tagged b-jets",8,-0.5,7.5);
|
332 |
|
|
hjets["Nbtags_CSVL_cut0"] = new TH1F("Nbjets_CSVL_cut0"+hname,"Tagged b-jets",8,-0.5,7.5);
|
333 |
algomez |
1.18 |
hjets["Nbtags_CSVL"] = new TH1F("Nbjets_CSVL"+hname,"CSV Loose Tagged b-jets",6,1.5,7.5);
|
334 |
algomez |
1.16 |
hjets["Nbtags_CSVM_cut0"] = new TH1F("Nbjets_CSVM_cut0"+hname,"Tagged b-jets",8, -0.5, 7.5);
|
335 |
algomez |
1.10 |
hjets["Nbtags_CSVM"] = new TH1F("Nbjets_CSVM"+hname,"Tagged b-jets",8,-0.5,7.5);
|
336 |
algomez |
1.16 |
hjets["Nbtags_CSVT_cut0"] = new TH1F("Nbjets_CSVT_cut0"+hname,"Tagged b-jets",8,-0.5,7.5);
|
337 |
algomez |
1.11 |
hjets["Nbtags_CSVT"] = new TH1F("Nbjets_CSVT"+hname,"Tagged b-jets",8,-0.5,7.5);
|
338 |
algomez |
1.17 |
hjets["deltaPhijj_cut0"] = new TH1F("deltaPhijj_cut0"+hname,"#Delta #phi(j1,j2)",34,-3.40,3.40);
|
339 |
|
|
hjets["deltaPhijj"] = new TH1F("deltaPhijj"+hname,"#Delta #phi(j1,j2)",34, -3.40, 3.40);
|
340 |
algomez |
1.18 |
hjets["deltaRjj_cut0"] = new TH1F("deltaRjj_cut0"+hname,"#DeltaR(j1,j2)",10,0.,4.);
|
341 |
|
|
hjets["mindeltaRjj_cut0"] = new TH1F("mindeltaRjj_cut0"+hname,"min #DeltaR(j,j)",15,0.,3.);
|
342 |
algomez |
1.17 |
hjets["mindeltaRjj"] = new TH1F("mindeltaRjj"+hname,"min #DeltaR(j,j)",15,0.,3.);
|
343 |
|
|
hjets["deltaRjj"] = new TH1F("deltaRjj"+hname,"#DeltaR(j1,j2)",30,0.,6.);
|
344 |
|
|
hjets["deltaRjj_cut2"] = new TH1F("deltaRjj_cut2"+hname,"#DeltaR(j1,j2)",30,0.,6.);
|
345 |
algomez |
1.18 |
hjets["deltaRmu2j_cut0"] = new TH1F("deltaRmu2j_cut0"+hname,"#DeltaR(#mu,j2)",30,0.,6.);
|
346 |
algomez |
1.17 |
hjets["deltaRmu2j"] = new TH1F("deltaRmu2j"+hname,"#DeltaR(#mu,j2)",30,0.,6.);
|
347 |
|
|
hjets["deltaRmu3j"] = new TH1F("deltaRmu3j"+hname,"#DeltaR(#mu,j2)",30,0.,6.);
|
348 |
|
|
hjets["deltaPhimu2j"] = new TH1F("deltaPhimu2j"+hname,"#Delta #phi(#mu,j2)",17, -3.40, 3.40);
|
349 |
|
|
hjets["deltaPhimu3j"] = new TH1F("deltaPhimu3j"+hname,"#Delta #phi(#mu,j3)",68, -3.40, 3.40);
|
350 |
algomez |
1.16 |
//hjets["tb_deltaPhi"] = new TH1F("tb_deltaPhi"+hname,"#Delta #phi(t,b)",30,0.,3.15);
|
351 |
|
|
//hjets["tb_deltaEta"] = new TH1F("tb_deltaEta"+hname,"#Delta #eta(t,b)",30,-5,5);
|
352 |
|
|
//hjets["pt_b"] = new TH1F("pt_b"+hname,"b-jet p_{T} [GeV]",60,0,1500);
|
353 |
|
|
//hjets["jet1_CSVM_pt"] = new TH1F("jet1_CSVM_pt"+hname,"leading btag jet p_{T} (CSVM) [GeV/c]",80, 0, 800);
|
354 |
|
|
//hjets["jet2_CSVM_pt"] = new TH1F("jet2_CSVM_pt"+hname,"2 leading btag jet p_{T} (CSVM) [GeV/c]",50, 0, 500);
|
355 |
|
|
//hjets["jet3_CSVM_pt"] = new TH1F("jet3_CSVM_pt"+hname,"3 leading btag jet p_{T} (CSVM) [GeV/c]",20, 0, 200);
|
356 |
|
|
//hjets["jet4_CSVM_pt"] = new TH1F("jet4_CSVM_pt"+hname,"4 leading btag jet p_{T} (CSVM) [GeV/c]",20, 0, 200);
|
357 |
algomez |
1.17 |
hjets["jet1_CSVL_pt"] = new TH1F("jet1_CSVL_pt"+hname,"leading btag jet p_{T} (CSVL) [GeV/c]",80, 0, 800);
|
358 |
algomez |
1.16 |
//hjets["jet2_CSVL_pt"] = new TH1F("jet2_CSVL_pt"+hname,"2 leading btag jet p_{T} (CSVL) [GeV/c]",50, 0, 500);
|
359 |
|
|
//hjets["jet3_CSVL_pt"] = new TH1F("jet3_CSVL_pt"+hname,"3 leading btag jet p_{T} (CSVL) [GeV/c]",20, 0, 200);
|
360 |
|
|
//hjets["jet4_CSVL_pt"] = new TH1F("jet4_CSVL_pt"+hname,"4 leading btag jet p_{T} (CSVL) [GeV/c]",20, 0, 200);
|
361 |
algomez |
1.17 |
//
|
362 |
|
|
//
|
363 |
|
|
//
|
364 |
|
|
//
|
365 |
|
|
//////////////////////////////////// Additional Plots
|
366 |
algomez |
1.18 |
/* /
|
367 |
algomez |
1.17 |
hjets["Stjetm1j4b0"] = new TH1F("Stjetm1j4b0"+hname,"S_{T}^{jet} (1 #mu & 4 jets & 0 btag)",70, 200, 3000 );
|
368 |
|
|
hjets["DeltaRdijetm1j4b0"] = new TH1F("DeltaRdijetm1j4b0"+hname,"#DeltaR(j,j) (1 #mu & 4 jets & 0 btag)",40,0.,4.);
|
369 |
|
|
hjets["DeltaPhiMETWlepm1j4b0"] = new TH1F("DeltaPhiMETWlepm1j4b0"+hname,"#Delta #phi(MET,W(#mu,#nu)) (1 #mu & 4 jets & 0 btag)",32, -3.15, 3.15 );
|
370 |
|
|
hjets["trijetmassm1j4b0"] = new TH1F("trijetmassm1j4b0"+hname,"top mass (1 #mu & 4 jets & 0 btag)", 100, 0, 1000 );
|
371 |
|
|
hjets["trijetptm1j4b0"] = new TH1F("trijetptm1j4b0"+hname,"top p_{T} (1 #mu & 4 jets & 0 btag)", 50, 0, 500);
|
372 |
|
|
hjets["deltaRmindijetm1j4b0"] = new TH1F("deltaRmindijetm1j4b0"+hname,"min #DeltaR(j,j) (1 #mu & 4 jets & 0 btag)", 40,0.,4.);
|
373 |
|
|
hjets["deltaRmu2jetm1j4b0"] = new TH1F("deltaRmu2jetm1j4b0"+hname,"#DeltaR(#mu,2nd j) (1 #mu & 4 jets & 0 btag)", 40,0.,4.);
|
374 |
|
|
hjets["deltaPhidijetm1j4b0"] = new TH1F("deltaPhidijetm1j4b0"+hname,"#Delta #phi(j,j) (1 #mu & 4 jets & 0 btag)", 32, -3.15, 3.15);
|
375 |
|
|
hjets["deltaPhimu2jetm1j4b0"] = new TH1F("deltaPhimu2jetm1j4b0"+hname,"#Delta #phi(#mu,2nd j) (1 #mu & 4 jets & 0 btag)", 32, -3.15, 3.15);
|
376 |
|
|
hjets["Stlepm1j4b0"] = new TH1F("Stlepm1j4b0"+hname,"S_{t}^{lep} (1 #mu & 4 jets & 0 btag)", 100, 0, 1000);
|
377 |
|
|
hjets["Htm1j4b0"] = new TH1F("Htm1j4b0"+hname,"H_{T} (1 #mu & 4 jets & 0 btag)", 125, 0, 2500);
|
378 |
|
|
hjets["Njetsm1j4b0"] = new TH1F("Njetsm1j4b0"+hname,"Njets (1 #mu & 4 jets & 0 btag)", 12,0.5,12.5);
|
379 |
|
|
hjets["Stjetm1j5b0"] = new TH1F("Stjetm1j5b0"+hname,"S_{T}^{jet} (1 #mu & 5 jets & 0 btag)",70, 200, 3000 );
|
380 |
|
|
hjets["DeltaRdijetm1j5b0"] = new TH1F("DeltaRdijetm1j5b0"+hname,"#DeltaR(j,j) (1 #mu & 5 jets & 0 btag)",40,0.,4.);
|
381 |
|
|
hjets["DeltaPhiMETWlepm1j5b0"] = new TH1F("DeltaPhiMETWlepm1j5b0"+hname,"#Delta #phi(MET,W(#mu,#nu)) (1 #mu & 5 jets & 0 btag)",32, -3.15, 3.15 );
|
382 |
|
|
hjets["trijetmassm1j5b0"] = new TH1F("trijetmassm1j5b0"+hname,"top mass (1 #mu & 5 jets & 0 btag)", 100, 0, 1000 );
|
383 |
|
|
hjets["trijetptm1j5b0"] = new TH1F("trijetptm1j5b0"+hname,"top p_{T} (1 #mu & 5 jets & 0 btag)", 50, 0, 500);
|
384 |
|
|
hjets["deltaRmindijetm1j5b0"] = new TH1F("deltaRmindijetm1j5b0"+hname,"min #DeltaR(j,j) (1 #mu & 5 jets & 0 btag)", 40,0.,4.);
|
385 |
|
|
hjets["deltaRmu2jetm1j5b0"] = new TH1F("deltaRmu2jetm1j5b0"+hname,"#DeltaR(#mu,2nd j) (1 #mu & 5 jets & 0 btag)", 40,0.,4.);
|
386 |
|
|
hjets["deltaPhidijetm1j5b0"] = new TH1F("deltaPhidijetm1j5b0"+hname,"#Delta #phi(j,j) (1 #mu & 5 jets & 0 btag)", 32, -3.15, 3.15);
|
387 |
|
|
hjets["deltaPhimu2jetm1j5b0"] = new TH1F("deltaPhimu2jetm1j5b0"+hname,"#Delta #phi(#mu,2nd j) (1 #mu & 5 jets & 0 btag)", 32, -3.15, 3.15);
|
388 |
|
|
hjets["Stlepm1j5b0"] = new TH1F("Stlepm1j5b0"+hname,"S_{t}^{lep} (1 #mu & 5 jets & 0 btag)", 100, 0, 1000);
|
389 |
|
|
hjets["Htm1j5b0"] = new TH1F("Htm1j5b0"+hname,"H_{T} (1 #mu & 5 jets & 0 btag)", 125, 0, 2500);
|
390 |
|
|
hjets["Njetsm1j5b0"] = new TH1F("Njetsm1j5b0"+hname,"Njets (1 #mu & 5 jets & 0 btag)", 12,0.5,12.5);
|
391 |
|
|
hjets["Stjetm1j6b0"] = new TH1F("Stjetm1j6b0"+hname,"S_{T}^{jet} (1 #mu & #geq 6 jets & 0 btag)",70, 200, 3000 );
|
392 |
|
|
hjets["DeltaRdijetm1j6b0"] = new TH1F("DeltaRdijetm1j6b0"+hname,"#DeltaR(j,j) (1 #mu & #geq 6 jets & 0 btag)",40,0.,4.);
|
393 |
|
|
hjets["DeltaPhiMETWlepm1j6b0"] = new TH1F("DeltaPhiMETWlepm1j6b0"+hname,"#Delta #phi(MET,W(#mu,#nu)) (1 #mu & #geq 6 jets & 0 btag)",32, -3.15, 3.15 );
|
394 |
|
|
hjets["trijetmassm1j6b0"] = new TH1F("trijetmassm1j6b0"+hname,"top mass (1 #mu & #geq 6 jets & 0 btag)", 100, 0, 1000 );
|
395 |
|
|
hjets["trijetptm1j6b0"] = new TH1F("trijetptm1j6b0"+hname,"top p_{T} (1 #mu & #geq 6 jets & 0 btag)", 50, 0, 500);
|
396 |
|
|
hjets["deltaRmindijetm1j6b0"] = new TH1F("deltaRmindijetm1j6b0"+hname,"min #DeltaR(j,j) (1 #mu & #geq 6 jets & 0 btag)", 40,0.,4.);
|
397 |
|
|
hjets["deltaRmu2jetm1j6b0"] = new TH1F("deltaRmu2jetm1j6b0"+hname,"#DeltaR(#mu,2nd j) (1 #mu & #geq 6 jets & 0 btag)", 40,0.,4.);
|
398 |
|
|
hjets["deltaPhidijetm1j6b0"] = new TH1F("deltaPhidijetm1j6b0"+hname,"#Delta #phi(j,j) (1 #mu & #geq 6 jets & 0 btag)", 32, -3.15, 3.15);
|
399 |
|
|
hjets["deltaPhimu2jetm1j6b0"] = new TH1F("deltaPhimu2jetm1j6b0"+hname,"#Delta #phi(#mu,2nd j) (1 #mu & #geq 6 jets & 0 btag)", 32, -3.15, 3.15);
|
400 |
|
|
hjets["Stlepm1j6b0"] = new TH1F("Stlepm1j6b0"+hname,"S_{t}^{lep} (1 #mu & #geq 6 jets & 0 btag)", 100, 0, 1000);
|
401 |
|
|
hjets["Htm1j6b0"] = new TH1F("Htm1j6b0"+hname,"H_{T} (1 #mu & #geq 6 jets & 0 btag)", 125, 0, 2500);
|
402 |
|
|
hjets["Njetsm1j6b0"] = new TH1F("Njetsm1j6b0"+hname,"Njets (1 #mu & #geq 6 jets & 0 btag)", 12,0.5,12.5);
|
403 |
|
|
|
404 |
|
|
|
405 |
|
|
hjets["Stjetm1j4b1"] = new TH1F("Stjetm1j4b1"+hname,"S_{T}^{jet} (1 #mu & 4 jets & 1 btag)",70, 200, 3000 );
|
406 |
|
|
hjets["DeltaRdijetm1j4b1"] = new TH1F("DeltaRdijetm1j4b1"+hname,"#DeltaR(j,j) (1 #mu & 4 jets & 1 btag)",40,0.,4.);
|
407 |
|
|
hjets["DeltaPhiMETWlepm1j4b1"] = new TH1F("DeltaPhiMETWlepm1j4b1"+hname,"#Delta #phi(MET,W(#mu,#nu)) (1 #mu & 4 jets & 1 btag)",32, -3.15, 3.15 );
|
408 |
|
|
hjets["trijetmassm1j4b1"] = new TH1F("trijetmassm1j4b1"+hname,"top mass (1 #mu & 4 jets & 1 btag)", 100, 0, 1000 );
|
409 |
|
|
hjets["trijetptm1j4b1"] = new TH1F("trijetptm1j4b1"+hname,"top p_{T} (1 #mu & 4 jets & 1 btag)", 50, 0, 500);
|
410 |
|
|
hjets["deltaRmindijetm1j4b1"] = new TH1F("deltaRmindijetm1j4b1"+hname,"min #DeltaR(j,j) (1 #mu & 4 jets & 1 btag)", 40,0.,4.);
|
411 |
|
|
hjets["deltaRmu2jetm1j4b1"] = new TH1F("deltaRmu2jetm1j4b1"+hname,"#DeltaR(#mu,2nd j) (1 #mu & 4 jets & 1 btag)", 40,0.,4.);
|
412 |
|
|
hjets["deltaPhidijetm1j4b1"] = new TH1F("deltaPhidijetm1j4b1"+hname,"#Delta #phi(j,j) (1 #mu & 4 jets & 1 btag)", 32, -3.15, 3.15);
|
413 |
|
|
hjets["deltaPhimu2jetm1j4b1"] = new TH1F("deltaPhimu2jetm1j4b1"+hname,"#Delta #phi(#mu,2nd j) (1 #mu & 4 jets & 1 btag)", 32, -3.15, 3.15);
|
414 |
|
|
hjets["Stlepm1j4b1"] = new TH1F("Stlepm1j4b1"+hname,"S_{t}^{lep} (1 #mu & 4 jets & 1 btag)", 100, 0, 1000);
|
415 |
|
|
hjets["Htm1j4b1"] = new TH1F("Htm1j4b1"+hname,"H_{T} (1 #mu & 4 jets & 1 btag)", 125, 0, 2500);
|
416 |
|
|
hjets["Njetsm1j4b1"] = new TH1F("Njetsm1j4b1"+hname,"Njets (1 #mu & 4 jets & 1 btag)", 12,0.5,12.5);
|
417 |
|
|
hjets["Stjetm1j5b1"] = new TH1F("Stjetm1j5b1"+hname,"S_{T}^{jet} (1 #mu & 5 jets & 1 btag)",70, 200, 3000 );
|
418 |
|
|
hjets["DeltaRdijetm1j5b1"] = new TH1F("DeltaRdijetm1j5b1"+hname,"#DeltaR(j,j) (1 #mu & 5 jets & 1 btag)",40,0.,4.);
|
419 |
|
|
hjets["DeltaPhiMETWlepm1j5b1"] = new TH1F("DeltaPhiMETWlepm1j5b1"+hname,"#Delta #phi(MET,W(#mu,#nu)) (1 #mu & 5 jets & 1 btag)",32, -3.15, 3.15 );
|
420 |
|
|
hjets["trijetmassm1j5b1"] = new TH1F("trijetmassm1j5b1"+hname,"top mass (1 #mu & 5 jets & 1 btag)", 100, 0, 1000 );
|
421 |
|
|
hjets["trijetptm1j5b1"] = new TH1F("trijetptm1j5b1"+hname,"top p_{T} (1 #mu & 5 jets & 1 btag)", 50, 0, 500);
|
422 |
|
|
hjets["deltaRmindijetm1j5b1"] = new TH1F("deltaRmindijetm1j5b1"+hname,"min #DeltaR(j,j) (1 #mu & 5 jets & 1 btag)", 40,0.,4.);
|
423 |
|
|
hjets["deltaRmu2jetm1j5b1"] = new TH1F("deltaRmu2jetm1j5b1"+hname,"#DeltaR(#mu,2nd j) (1 #mu & 5 jets & 1 btag)", 40,0.,4.);
|
424 |
|
|
hjets["deltaPhidijetm1j5b1"] = new TH1F("deltaPhidijetm1j5b1"+hname,"#Delta #phi(j,j) (1 #mu & 5 jets & 1 btag)", 32, -3.15, 3.15);
|
425 |
|
|
hjets["deltaPhimu2jetm1j5b1"] = new TH1F("deltaPhimu2jetm1j5b1"+hname,"#Delta #phi(#mu,2nd j) (1 #mu & 5 jets & 1 btag)", 32, -3.15, 3.15);
|
426 |
|
|
hjets["Stlepm1j5b1"] = new TH1F("Stlepm1j5b1"+hname,"S_{t}^{lep} (1 #mu & 5 jets & 1 btag)", 100, 0, 1000);
|
427 |
|
|
hjets["Htm1j5b1"] = new TH1F("Htm1j5b1"+hname,"H_{T} (1 #mu & 5 jets & 1 btag)", 125, 0, 2500);
|
428 |
|
|
hjets["Njetsm1j5b1"] = new TH1F("Njetsm1j5b1"+hname,"Njets (1 #mu & 5 jets & 1 btag)", 12,0.5,12.5);
|
429 |
|
|
hjets["Stjetm1j6b1"] = new TH1F("Stjetm1j6b1"+hname,"S_{T}^{jet} (1 #mu & #geq 6 jets & 1 btag)",70, 200, 3000 );
|
430 |
|
|
hjets["DeltaRdijetm1j6b1"] = new TH1F("DeltaRdijetm1j6b1"+hname,"#DeltaR(j,j) (1 #mu & #geq 6 jets & 1 btag)",40,0.,4.);
|
431 |
|
|
hjets["DeltaPhiMETWlepm1j6b1"] = new TH1F("DeltaPhiMETWlepm1j6b1"+hname,"#Delta #phi(MET,W(#mu,#nu)) (1 #mu & #geq 6 jets & 1 btag)",32, -3.15, 3.15 );
|
432 |
|
|
hjets["trijetmassm1j6b1"] = new TH1F("trijetmassm1j6b1"+hname,"top mass (1 #mu & #geq 6 jets & 1 btag)", 100, 0, 1000 );
|
433 |
|
|
hjets["trijetptm1j6b1"] = new TH1F("trijetptm1j6b1"+hname,"top p_{T} (1 #mu & #geq 6 jets & 1 btag)", 50, 0, 500);
|
434 |
|
|
hjets["deltaRmindijetm1j6b1"] = new TH1F("deltaRmindijetm1j6b1"+hname,"min #DeltaR(j,j) (1 #mu & #geq 6 jets & 1 btag)", 40,0.,4.);
|
435 |
|
|
hjets["deltaRmu2jetm1j6b1"] = new TH1F("deltaRmu2jetm1j6b1"+hname,"#DeltaR(#mu,2nd j) (1 #mu & #geq 6 jets & 1 btag)", 40,0.,4.);
|
436 |
|
|
hjets["deltaPhidijetm1j6b1"] = new TH1F("deltaPhidijetm1j6b1"+hname,"#Delta #phi(j,j) (1 #mu & #geq 6 jets & 1 btag)", 32, -3.15, 3.15);
|
437 |
|
|
hjets["deltaPhimu2jetm1j6b1"] = new TH1F("deltaPhimu2jetm1j6b1"+hname,"#Delta #phi(#mu,2nd j) (1 #mu & #geq 6 jets & 1 btag)", 32, -3.15, 3.15);
|
438 |
|
|
hjets["Stlepm1j6b1"] = new TH1F("Stlepm1j6b1"+hname,"S_{t}^{lep} (1 #mu & #geq 6 jets & 1 btag)", 100, 0, 1000);
|
439 |
|
|
hjets["Htm1j6b1"] = new TH1F("Htm1j6b1"+hname,"H_{T} (1 #mu & #geq 6 jets & 1 btag)", 125, 0, 2500);
|
440 |
|
|
hjets["Njetsm1j6b1"] = new TH1F("Njetsm1j6b1"+hname,"Njets (1 #mu & #geq 6 jets & 1 btag)", 12,0.5,12.5);
|
441 |
|
|
|
442 |
|
|
hjets["Stjetm1j4b2"] = new TH1F("Stjetm1j4b2"+hname,"S_{T}^{jet} (1 #mu & 4 jets & #geq 2 btag)",70, 200, 3000 );
|
443 |
|
|
hjets["DeltaRdijetm1j4b2"] = new TH1F("DeltaRdijetm1j4b2"+hname,"#DeltaR(j,j) (1 #mu & 4 jets & #geq 2 btag)",40,0.,4.);
|
444 |
|
|
hjets["DeltaPhiMETWlepm1j4b2"] = new TH1F("DeltaPhiMETWlepm1j4b2"+hname,"#Delta #phi(MET,W(#mu,#nu)) (1 #mu & 4 jets & #geq 2 btag)",32, -3.15, 3.15 );
|
445 |
|
|
hjets["trijetmassm1j4b2"] = new TH1F("trijetmassm1j4b2"+hname,"top mass (1 #mu & 4 jets & #geq 2 btag)", 100, 0, 1000 );
|
446 |
|
|
hjets["trijetptm1j4b2"] = new TH1F("trijetptm1j4b2"+hname,"top p_{T} (1 #mu & 4 jets & #geq 2 btag)", 50, 0, 500);
|
447 |
|
|
hjets["deltaRmindijetm1j4b2"] = new TH1F("deltaRmindijetm1j4b2"+hname,"min #DeltaR(j,j) (1 #mu & 4 jets & #geq 2 btag)", 40,0.,4.);
|
448 |
|
|
hjets["deltaRmu2jetm1j4b2"] = new TH1F("deltaRmu2jetm1j4b2"+hname,"#DeltaR(#mu,2nd j) (1 #mu & 4 jets & #geq 2 btag)", 40,0.,4.);
|
449 |
|
|
hjets["deltaPhidijetm1j4b2"] = new TH1F("deltaPhidijetm1j4b2"+hname,"#Delta #phi(j,j) (1 #mu & 4 jets & #geq 2 btag)", 32, -3.15, 3.15);
|
450 |
|
|
hjets["deltaPhimu2jetm1j4b2"] = new TH1F("deltaPhimu2jetm1j4b2"+hname,"#Delta #phi(#mu,2nd j) (1 #mu & 4 jets & #geq 2 btag)", 32, -3.15, 3.15);
|
451 |
|
|
hjets["Stlepm1j4b2"] = new TH1F("Stlepm1j4b2"+hname,"S_{t}^{lep} (1 #mu & 4 jets & #geq 2 btag)", 100, 0, 1000);
|
452 |
|
|
hjets["Htm1j4b2"] = new TH1F("Htm1j4b2"+hname,"H_{T} (1 #mu & 4 jets & #geq 2 btag)", 125, 0, 2500);
|
453 |
|
|
hjets["Njetsm1j4b2"] = new TH1F("Njetsm1j4b2"+hname,"Njets (1 #mu & 4 jets & #geq 2 btag)", 12,0.5,12.5);
|
454 |
|
|
hjets["Stjetm1j5b2"] = new TH1F("Stjetm1j5b2"+hname,"S_{T}^{jet} (1 #mu & 5 jets & #geq 2 btag)",70, 200, 3000 );
|
455 |
|
|
hjets["DeltaRdijetm1j5b2"] = new TH1F("DeltaRdijetm1j5b2"+hname,"#DeltaR(j,j) (1 #mu & 5 jets & #geq 2 btag)",40,0.,4.);
|
456 |
|
|
hjets["DeltaPhiMETWlepm1j5b2"] = new TH1F("DeltaPhiMETWlepm1j5b2"+hname,"#Delta #phi(MET,W(#mu,#nu)) (1 #mu & 5 jets & #geq 2 btag)",32, -3.15, 3.15 );
|
457 |
|
|
hjets["trijetmassm1j5b2"] = new TH1F("trijetmassm1j5b2"+hname,"top mass (1 #mu & 5 jets & #geq 2 btag)", 100, 0, 1000 );
|
458 |
|
|
hjets["trijetptm1j5b2"] = new TH1F("trijetptm1j5b2"+hname,"top p_{T} (1 #mu & 5 jets & #geq 2 btag)", 50, 0, 500);
|
459 |
|
|
hjets["deltaRmindijetm1j5b2"] = new TH1F("deltaRmindijetm1j5b2"+hname,"min #DeltaR(j,j) (1 #mu & 5 jets & #geq 2 btag)", 40,0.,4.);
|
460 |
|
|
hjets["deltaRmu2jetm1j5b2"] = new TH1F("deltaRmu2jetm1j5b2"+hname,"#DeltaR(#mu,2nd j) (1 #mu & 5 jets & #geq 2 btag)", 40,0.,4.);
|
461 |
|
|
hjets["deltaPhidijetm1j5b2"] = new TH1F("deltaPhidijetm1j5b2"+hname,"#Delta #phi(j,j) (1 #mu & 5 jets & #geq 2 btag)", 32, -3.15, 3.15);
|
462 |
|
|
hjets["deltaPhimu2jetm1j5b2"] = new TH1F("deltaPhimu2jetm1j5b2"+hname,"#Delta #phi(#mu,2nd j) (1 #mu & 5 jets & #geq 2 btag)", 32, -3.15, 3.15);
|
463 |
|
|
hjets["Stlepm1j5b2"] = new TH1F("Stlepm1j5b2"+hname,"S_{t}^{lep} (1 #mu & 5 jets & #geq 2 btag)", 100, 0, 1000);
|
464 |
|
|
hjets["Htm1j5b2"] = new TH1F("Htm1j5b2"+hname,"H_{T} (1 #mu & 5 jets & #geq 2 btag)", 125, 0, 2500);
|
465 |
|
|
hjets["Njetsm1j5b2"] = new TH1F("Njetsm1j5b2"+hname,"Njets (1 #mu & 5 jets & #geq 2 btag)", 12,0.5,12.5);
|
466 |
|
|
hjets["Stjetm1j6b2"] = new TH1F("Stjetm1j6b2"+hname,"S_{T}^{jet} (1 #mu & #geq 6 jets & #geq 2 btag)",70, 200, 3000 );
|
467 |
|
|
hjets["DeltaRdijetm1j6b2"] = new TH1F("DeltaRdijetm1j6b2"+hname,"#DeltaR(j,j) (1 #mu & #geq 6 jets & #geq 2 btag)",40,0.,4.);
|
468 |
|
|
hjets["DeltaPhiMETWlepm1j6b2"] = new TH1F("DeltaPhiMETWlepm1j6b2"+hname,"#Delta #phi(MET,W(#mu,#nu)) (1 #mu & #geq 6 jets & #geq 2 btag)",32, -3.15, 3.15 );
|
469 |
|
|
hjets["trijetmassm1j6b2"] = new TH1F("trijetmassm1j6b2"+hname,"top mass (1 #mu & #geq 6 jets & #geq 2 btag)", 100, 0, 1000 );
|
470 |
|
|
hjets["trijetptm1j6b2"] = new TH1F("trijetptm1j6b2"+hname,"top p_{T} (1 #mu & #geq 6 jets & #geq 2 btag)", 50, 0, 500);
|
471 |
|
|
hjets["deltaRmindijetm1j6b2"] = new TH1F("deltaRmindijetm1j6b2"+hname,"min #DeltaR(j,j) (1 #mu & #geq 6 jets & #geq 2 btag)", 40,0.,4.);
|
472 |
|
|
hjets["deltaRmu2jetm1j6b2"] = new TH1F("deltaRmu2jetm1j6b2"+hname,"#DeltaR(#mu,2nd j) (1 #mu & #geq 6 jets & #geq 2 btag)", 40,0.,4.);
|
473 |
|
|
hjets["deltaPhidijetm1j6b2"] = new TH1F("deltaPhidijetm1j6b2"+hname,"#Delta #phi(j,j) (1 #mu & #geq 6 jets & #geq 2 btag)", 32, -3.15, 3.15);
|
474 |
|
|
hjets["deltaPhimu2jetm1j6b2"] = new TH1F("deltaPhimu2jetm1j6b2"+hname,"#Delta #phi(#mu,2nd j) (1 #mu & #geq 6 jets & #geq 2 btag)", 32, -3.15, 3.15);
|
475 |
|
|
hjets["Stlepm1j6b2"] = new TH1F("Stlepm1j6b2"+hname,"S_{t}^{lep} (1 #mu & #geq 6 jets & #geq 2 btag)", 100, 0, 1000);
|
476 |
|
|
hjets["Htm1j6b2"] = new TH1F("Htm1j6b2"+hname,"H_{T} (1 #mu & #geq 6 jets & #geq 2 btag)", 125, 0, 2500);
|
477 |
|
|
hjets["Njetsm1j6b2"] = new TH1F("Njetsm1j6b2"+hname,"Njets (1 #mu & #geq 6 jets & #geq 2 btag)", 12,0.5,12.5);
|
478 |
|
|
|
479 |
|
|
hjets["Stjetm2j4b0"] = new TH1F("Stjetm2j4b0"+hname,"S_{T}^{jet} (2 #mu & 4 jets & 0 btag)",70, 200, 3000 );
|
480 |
|
|
hjets["DeltaRdijetm2j4b0"] = new TH1F("DeltaRdijetm2j4b0"+hname,"#DeltaR(j,j) (2 #mu & 4 jets & 0 btag)",40,0.,4.);
|
481 |
|
|
hjets["DeltaPhiMETWlepm2j4b0"] = new TH1F("DeltaPhiMETWlepm2j4b0"+hname,"#Delta #phi(MET,W(#mu,#nu)) (2 #mu & 4 jets & 0 btag)",32, -3.15, 3.15 );
|
482 |
|
|
hjets["trijetmassm2j4b0"] = new TH1F("trijetmassm2j4b0"+hname,"top mass (2 #mu & 4 jets & 0 btag)", 100, 0, 1000 );
|
483 |
|
|
hjets["trijetptm2j4b0"] = new TH1F("trijetptm2j4b0"+hname,"top p_{T} (2 #mu & 4 jets & 0 btag)", 50, 0, 500);
|
484 |
|
|
hjets["deltaRmindijetm2j4b0"] = new TH1F("deltaRmindijetm2j4b0"+hname,"min #DeltaR(j,j) (2 #mu & 4 jets & 0 btag)", 40,0.,4.);
|
485 |
|
|
hjets["deltaRmu2jetm2j4b0"] = new TH1F("deltaRmu2jetm2j4b0"+hname,"#DeltaR(#mu,2nd j) (2 #mu & 4 jets & 0 btag)", 40,0.,4.);
|
486 |
|
|
hjets["deltaPhidijetm2j4b0"] = new TH1F("deltaPhidijetm2j4b0"+hname,"#Delta #phi(j,j) (2 #mu & 4 jets & 0 btag)", 32, -3.15, 3.15);
|
487 |
|
|
hjets["deltaPhimu2jetm2j4b0"] = new TH1F("deltaPhimu2jetm2j4b0"+hname,"#Delta #phi(#mu,2nd j) (2 #mu & 4 jets & 0 btag)", 32, -3.15, 3.15);
|
488 |
|
|
hjets["Stlepm2j4b0"] = new TH1F("Stlepm2j4b0"+hname,"S_{t}^{lep} (2 #mu & 4 jets & 0 btag)", 100, 0, 1000);
|
489 |
|
|
hjets["Htm2j4b0"] = new TH1F("Htm2j4b0"+hname,"H_{T} (2 #mu & 4 jets & 0 btag)", 125, 0, 2500);
|
490 |
|
|
hjets["Njetsm2j4b0"] = new TH1F("Njetsm2j4b0"+hname,"Njets (2 #mu & 4 jets & 0 btag)", 12,0.5,12.5);
|
491 |
|
|
hjets["Stjetm2j5b0"] = new TH1F("Stjetm2j5b0"+hname,"S_{T}^{jet} (2 #mu & 5 jets & 0 btag)",70, 200, 3000 );
|
492 |
|
|
hjets["DeltaRdijetm2j5b0"] = new TH1F("DeltaRdijetm2j5b0"+hname,"#DeltaR(j,j) (2 #mu & 5 jets & 0 btag)",40,0.,4.);
|
493 |
|
|
hjets["DeltaPhiMETWlepm2j5b0"] = new TH1F("DeltaPhiMETWlepm2j5b0"+hname,"#Delta #phi(MET,W(#mu,#nu)) (2 #mu & 5 jets & 0 btag)",32, -3.15, 3.15 );
|
494 |
|
|
hjets["trijetmassm2j5b0"] = new TH1F("trijetmassm2j5b0"+hname,"top mass (2 #mu & 5 jets & 0 btag)", 100, 0, 1000 );
|
495 |
|
|
hjets["trijetptm2j5b0"] = new TH1F("trijetptm2j5b0"+hname,"top p_{T} (2 #mu & 5 jets & 0 btag)", 50, 0, 500);
|
496 |
|
|
hjets["deltaRmindijetm2j5b0"] = new TH1F("deltaRmindijetm2j5b0"+hname,"min #DeltaR(j,j) (2 #mu & 5 jets & 0 btag)", 40,0.,4.);
|
497 |
|
|
hjets["deltaRmu2jetm2j5b0"] = new TH1F("deltaRmu2jetm2j5b0"+hname,"#DeltaR(#mu,2nd j) (2 #mu & 5 jets & 0 btag)", 40,0.,4.);
|
498 |
|
|
hjets["deltaPhidijetm2j5b0"] = new TH1F("deltaPhidijetm2j5b0"+hname,"#Delta #phi(j,j) (2 #mu & 5 jets & 0 btag)", 32, -3.15, 3.15);
|
499 |
|
|
hjets["deltaPhimu2jetm2j5b0"] = new TH1F("deltaPhimu2jetm2j5b0"+hname,"#Delta #phi(#mu,2nd j) (2 #mu & 5 jets & 0 btag)", 32, -3.15, 3.15);
|
500 |
|
|
hjets["Stlepm2j5b0"] = new TH1F("Stlepm2j5b0"+hname,"S_{t}^{lep} (2 #mu & 5 jets & 0 btag)", 100, 0, 1000);
|
501 |
|
|
hjets["Htm2j5b0"] = new TH1F("Htm2j5b0"+hname,"H_{T} (2 #mu & 5 jets & 0 btag)", 125, 0, 2500);
|
502 |
|
|
hjets["Njetsm2j5b0"] = new TH1F("Njetsm2j5b0"+hname,"Njets (2 #mu & 5 jets & 0 btag)", 12,0.5,12.5);
|
503 |
|
|
hjets["Stjetm2j6b0"] = new TH1F("Stjetm2j6b0"+hname,"S_{T}^{jet} (2 #mu & #geq 6 jets & 0 btag)",70, 200, 3000 );
|
504 |
|
|
hjets["DeltaRdijetm2j6b0"] = new TH1F("DeltaRdijetm2j6b0"+hname,"#DeltaR(j,j) (2 #mu & #geq 6 jets & 0 btag)",40,0.,4.);
|
505 |
|
|
hjets["DeltaPhiMETWlepm2j6b0"] = new TH1F("DeltaPhiMETWlepm2j6b0"+hname,"#Delta #phi(MET,W(#mu,#nu)) (2 #mu & #geq 6 jets & 0 btag)",32, -3.15, 3.15 );
|
506 |
|
|
hjets["trijetmassm2j6b0"] = new TH1F("trijetmassm2j6b0"+hname,"top mass (2 #mu & #geq 6 jets & 0 btag)", 100, 0, 1000 );
|
507 |
|
|
hjets["trijetptm2j6b0"] = new TH1F("trijetptm2j6b0"+hname,"top p_{T} (2 #mu & #geq 6 jets & 0 btag)", 50, 0, 500);
|
508 |
|
|
hjets["deltaRmindijetm2j6b0"] = new TH1F("deltaRmindijetm2j6b0"+hname,"min #DeltaR(j,j) (2 #mu & #geq 6 jets & 0 btag)", 40,0.,4.);
|
509 |
|
|
hjets["deltaRmu2jetm2j6b0"] = new TH1F("deltaRmu2jetm2j6b0"+hname,"#DeltaR(#mu,2nd j) (2 #mu & #geq 6 jets & 0 btag)", 40,0.,4.);
|
510 |
|
|
hjets["deltaPhidijetm2j6b0"] = new TH1F("deltaPhidijetm2j6b0"+hname,"#Delta #phi(j,j) (2 #mu & #geq 6 jets & 0 btag)", 32, -3.15, 3.15);
|
511 |
|
|
hjets["deltaPhimu2jetm2j6b0"] = new TH1F("deltaPhimu2jetm2j6b0"+hname,"#Delta #phi(#mu,2nd j) (2 #mu & #geq 6 jets & 0 btag)", 32, -3.15, 3.15);
|
512 |
|
|
hjets["Stlepm2j6b0"] = new TH1F("Stlepm2j6b0"+hname,"S_{t}^{lep} (2 #mu & #geq 6 jets & 0 btag)", 100, 0, 1000);
|
513 |
|
|
hjets["Htm2j6b0"] = new TH1F("Htm2j6b0"+hname,"H_{T} (2 #mu & #geq 6 jets & 0 btag)", 125, 0, 2500);
|
514 |
|
|
hjets["Njetsm2j6b0"] = new TH1F("Njetsm2j6b0"+hname,"Njets (2 #mu & #geq 6 jets & 0 btag)", 12,0.5,12.5);
|
515 |
|
|
|
516 |
|
|
|
517 |
|
|
hjets["Stjetm2j4b1"] = new TH1F("Stjetm2j4b1"+hname,"S_{T}^{jet} (2 #mu & 4 jets & 1 btag)",70, 200, 3000 );
|
518 |
|
|
hjets["DeltaRdijetm2j4b1"] = new TH1F("DeltaRdijetm2j4b1"+hname,"#DeltaR(j,j) (2 #mu & 4 jets & 1 btag)",40,0.,4.);
|
519 |
|
|
hjets["DeltaPhiMETWlepm2j4b1"] = new TH1F("DeltaPhiMETWlepm2j4b1"+hname,"#Delta #phi(MET,W(#mu,#nu)) (2 #mu & 4 jets & 1 btag)",32, -3.15, 3.15 );
|
520 |
|
|
hjets["trijetmassm2j4b1"] = new TH1F("trijetmassm2j4b1"+hname,"top mass (2 #mu & 4 jets & 1 btag)", 100, 0, 1000 );
|
521 |
|
|
hjets["trijetptm2j4b1"] = new TH1F("trijetptm2j4b1"+hname,"top p_{T} (2 #mu & 4 jets & 1 btag)", 50, 0, 500);
|
522 |
|
|
hjets["deltaRmindijetm2j4b1"] = new TH1F("deltaRmindijetm2j4b1"+hname,"min #DeltaR(j,j) (2 #mu & 4 jets & 1 btag)", 40,0.,4.);
|
523 |
|
|
hjets["deltaRmu2jetm2j4b1"] = new TH1F("deltaRmu2jetm2j4b1"+hname,"#DeltaR(#mu,2nd j) (2 #mu & 4 jets & 1 btag)", 40,0.,4.);
|
524 |
|
|
hjets["deltaPhidijetm2j4b1"] = new TH1F("deltaPhidijetm2j4b1"+hname,"#Delta #phi(j,j) (2 #mu & 4 jets & 1 btag)", 32, -3.15, 3.15);
|
525 |
|
|
hjets["deltaPhimu2jetm2j4b1"] = new TH1F("deltaPhimu2jetm2j4b1"+hname,"#Delta #phi(#mu,2nd j) (2 #mu & 4 jets & 1 btag)", 32, -3.15, 3.15);
|
526 |
|
|
hjets["Stlepm2j4b1"] = new TH1F("Stlepm2j4b1"+hname,"S_{t}^{lep} (2 #mu & 4 jets & 1 btag)", 100, 0, 1000);
|
527 |
|
|
hjets["Htm2j4b1"] = new TH1F("Htm2j4b1"+hname,"H_{T} (2 #mu & 4 jets & 1 btag)", 125, 0, 2500);
|
528 |
|
|
hjets["Njetsm2j4b1"] = new TH1F("Njetsm2j4b1"+hname,"Njets (2 #mu & 4 jets & 1 btag)", 12,0.5,12.5);
|
529 |
|
|
hjets["Stjetm2j5b1"] = new TH1F("Stjetm2j5b1"+hname,"S_{T}^{jet} (2 #mu & 5 jets & 1 btag)",70, 200, 3000 );
|
530 |
|
|
hjets["DeltaRdijetm2j5b1"] = new TH1F("DeltaRdijetm2j5b1"+hname,"#DeltaR(j,j) (2 #mu & 5 jets & 1 btag)",40,0.,4.);
|
531 |
|
|
hjets["DeltaPhiMETWlepm2j5b1"] = new TH1F("DeltaPhiMETWlepm2j5b1"+hname,"#Delta #phi(MET,W(#mu,#nu)) (2 #mu & 5 jets & 1 btag)",32, -3.15, 3.15 );
|
532 |
|
|
hjets["trijetmassm2j5b1"] = new TH1F("trijetmassm2j5b1"+hname,"top mass (2 #mu & 5 jets & 1 btag)", 100, 0, 1000 );
|
533 |
|
|
hjets["trijetptm2j5b1"] = new TH1F("trijetptm2j5b1"+hname,"top p_{T} (2 #mu & 5 jets & 1 btag)", 50, 0, 500);
|
534 |
|
|
hjets["deltaRmindijetm2j5b1"] = new TH1F("deltaRmindijetm2j5b1"+hname,"min #DeltaR(j,j) (2 #mu & 5 jets & 1 btag)", 40,0.,4.);
|
535 |
|
|
hjets["deltaRmu2jetm2j5b1"] = new TH1F("deltaRmu2jetm2j5b1"+hname,"#DeltaR(#mu,2nd j) (2 #mu & 5 jets & 1 btag)", 40,0.,4.);
|
536 |
|
|
hjets["deltaPhidijetm2j5b1"] = new TH1F("deltaPhidijetm2j5b1"+hname,"#Delta #phi(j,j) (2 #mu & 5 jets & 1 btag)", 32, -3.15, 3.15);
|
537 |
|
|
hjets["deltaPhimu2jetm2j5b1"] = new TH1F("deltaPhimu2jetm2j5b1"+hname,"#Delta #phi(#mu,2nd j) (2 #mu & 5 jets & 1 btag)", 32, -3.15, 3.15);
|
538 |
|
|
hjets["Stlepm2j5b1"] = new TH1F("Stlepm2j5b1"+hname,"S_{t}^{lep} (2 #mu & 5 jets & 1 btag)", 100, 0, 1000);
|
539 |
|
|
hjets["Htm2j5b1"] = new TH1F("Htm2j5b1"+hname,"H_{T} (2 #mu & 5 jets & 1 btag)", 125, 0, 2500);
|
540 |
|
|
hjets["Njetsm2j5b1"] = new TH1F("Njetsm2j5b1"+hname,"Njets (2 #mu & 5 jets & 1 btag)", 12,0.5,12.5);
|
541 |
|
|
hjets["Stjetm2j6b1"] = new TH1F("Stjetm2j6b1"+hname,"S_{T}^{jet} (2 #mu & #geq 6 jets & 1 btag)",70, 200, 3000 );
|
542 |
|
|
hjets["DeltaRdijetm2j6b1"] = new TH1F("DeltaRdijetm2j6b1"+hname,"#DeltaR(j,j) (2 #mu & #geq 6 jets & 1 btag)",40,0.,4.);
|
543 |
|
|
hjets["DeltaPhiMETWlepm2j6b1"] = new TH1F("DeltaPhiMETWlepm2j6b1"+hname,"#Delta #phi(MET,W(#mu,#nu)) (2 #mu & #geq 6 jets & 1 btag)",32, -3.15, 3.15 );
|
544 |
|
|
hjets["trijetmassm2j6b1"] = new TH1F("trijetmassm2j6b1"+hname,"top mass (2 #mu & #geq 6 jets & 1 btag)", 100, 0, 1000 );
|
545 |
|
|
hjets["trijetptm2j6b1"] = new TH1F("trijetptm2j6b1"+hname,"top p_{T} (2 #mu & #geq 6 jets & 1 btag)", 50, 0, 500);
|
546 |
|
|
hjets["deltaRmindijetm2j6b1"] = new TH1F("deltaRmindijetm2j6b1"+hname,"min #DeltaR(j,j) (2 #mu & #geq 6 jets & 1 btag)", 40,0.,4.);
|
547 |
|
|
hjets["deltaRmu2jetm2j6b1"] = new TH1F("deltaRmu2jetm2j6b1"+hname,"#DeltaR(#mu,2nd j) (2 #mu & #geq 6 jets & 1 btag)", 40,0.,4.);
|
548 |
|
|
hjets["deltaPhidijetm2j6b1"] = new TH1F("deltaPhidijetm2j6b1"+hname,"#Delta #phi(j,j) (2 #mu & #geq 6 jets & 1 btag)", 32, -3.15, 3.15);
|
549 |
|
|
hjets["deltaPhimu2jetm2j6b1"] = new TH1F("deltaPhimu2jetm2j6b1"+hname,"#Delta #phi(#mu,2nd j) (2 #mu & #geq 6 jets & 1 btag)", 32, -3.15, 3.15);
|
550 |
|
|
hjets["Stlepm2j6b1"] = new TH1F("Stlepm2j6b1"+hname,"S_{t}^{lep} (2 #mu & #geq 6 jets & 1 btag)", 100, 0, 1000);
|
551 |
|
|
hjets["Htm2j6b1"] = new TH1F("Htm2j6b1"+hname,"H_{T} (2 #mu & #geq 6 jets & 1 btag)", 125, 0, 2500);
|
552 |
|
|
hjets["Njetsm2j6b1"] = new TH1F("Njetsm2j6b1"+hname,"Njets (2 #mu & #geq 6 jets & 1 btag)", 12,0.5,12.5);
|
553 |
|
|
|
554 |
|
|
hjets["Stjetm2j4b2"] = new TH1F("Stjetm2j4b2"+hname,"S_{T}^{jet} (2 #mu & 4 jets & #geq 2 btag)",70, 200, 3000 );
|
555 |
|
|
hjets["DeltaRdijetm2j4b2"] = new TH1F("DeltaRdijetm2j4b2"+hname,"#DeltaR(j,j) (2 #mu & 4 jets & #geq 2 btag)",40,0.,4.);
|
556 |
|
|
hjets["DeltaPhiMETWlepm2j4b2"] = new TH1F("DeltaPhiMETWlepm2j4b2"+hname,"#Delta #phi(MET,W(#mu,#nu)) (2 #mu & 4 jets & #geq 2 btag)",32, -3.15, 3.15 );
|
557 |
|
|
hjets["trijetmassm2j4b2"] = new TH1F("trijetmassm2j4b2"+hname,"top mass (2 #mu & 4 jets & #geq 2 btag)", 100, 0, 1000 );
|
558 |
|
|
hjets["trijetptm2j4b2"] = new TH1F("trijetptm2j4b2"+hname,"top p_{T} (2 #mu & 4 jets & #geq 2 btag)", 50, 0, 500);
|
559 |
|
|
hjets["deltaRmindijetm2j4b2"] = new TH1F("deltaRmindijetm2j4b2"+hname,"min #DeltaR(j,j) (2 #mu & 4 jets & #geq 2 btag)", 40,0.,4.);
|
560 |
|
|
hjets["deltaRmu2jetm2j4b2"] = new TH1F("deltaRmu2jetm2j4b2"+hname,"#DeltaR(#mu,2nd j) (2 #mu & 4 jets & #geq 2 btag)", 40,0.,4.);
|
561 |
|
|
hjets["deltaPhidijetm2j4b2"] = new TH1F("deltaPhidijetm2j4b2"+hname,"#Delta #phi(j,j) (2 #mu & 4 jets & #geq 2 btag)", 32, -3.15, 3.15);
|
562 |
|
|
hjets["deltaPhimu2jetm2j4b2"] = new TH1F("deltaPhimu2jetm2j4b2"+hname,"#Delta #phi(#mu,2nd j) (2 #mu & 4 jets & #geq 2 btag)", 32, -3.15, 3.15);
|
563 |
|
|
hjets["Stlepm2j4b2"] = new TH1F("Stlepm2j4b2"+hname,"S_{t}^{lep} (2 #mu & 4 jets & #geq 2 btag)", 100, 0, 1000);
|
564 |
|
|
hjets["Htm2j4b2"] = new TH1F("Htm2j4b2"+hname,"H_{T} (2 #mu & 4 jets & #geq 2 btag)", 125, 0, 2500);
|
565 |
|
|
hjets["Njetsm2j4b2"] = new TH1F("Njetsm2j4b2"+hname,"Njets (2 #mu & 4 jets & #geq 2 btag)", 12,0.5,12.5);
|
566 |
|
|
hjets["Stjetm2j5b2"] = new TH1F("Stjetm2j5b2"+hname,"S_{T}^{jet} (2 #mu & 5 jets & #geq 2 btag)",70, 200, 3000 );
|
567 |
|
|
hjets["DeltaRdijetm2j5b2"] = new TH1F("DeltaRdijetm2j5b2"+hname,"#DeltaR(j,j) (2 #mu & 5 jets & #geq 2 btag)",40,0.,4.);
|
568 |
|
|
hjets["DeltaPhiMETWlepm2j5b2"] = new TH1F("DeltaPhiMETWlepm2j5b2"+hname,"#Delta #phi(MET,W(#mu,#nu)) (2 #mu & 5 jets & #geq 2 btag)",32, -3.15, 3.15 );
|
569 |
|
|
hjets["trijetmassm2j5b2"] = new TH1F("trijetmassm2j5b2"+hname,"top mass (2 #mu & 5 jets & #geq 2 btag)", 100, 0, 1000 );
|
570 |
|
|
hjets["trijetptm2j5b2"] = new TH1F("trijetptm2j5b2"+hname,"top p_{T} (2 #mu & 5 jets & #geq 2 btag)", 50, 0, 500);
|
571 |
|
|
hjets["deltaRmindijetm2j5b2"] = new TH1F("deltaRmindijetm2j5b2"+hname,"min #DeltaR(j,j) (2 #mu & 5 jets & #geq 2 btag)", 40,0.,4.);
|
572 |
|
|
hjets["deltaRmu2jetm2j5b2"] = new TH1F("deltaRmu2jetm2j5b2"+hname,"#DeltaR(#mu,2nd j) (2 #mu & 5 jets & #geq 2 btag)", 40,0.,4.);
|
573 |
|
|
hjets["deltaPhidijetm2j5b2"] = new TH1F("deltaPhidijetm2j5b2"+hname,"#Delta #phi(j,j) (2 #mu & 5 jets & #geq 2 btag)", 32, -3.15, 3.15);
|
574 |
|
|
hjets["deltaPhimu2jetm2j5b2"] = new TH1F("deltaPhimu2jetm2j5b2"+hname,"#Delta #phi(#mu,2nd j) (2 #mu & 5 jets & #geq 2 btag)", 32, -3.15, 3.15);
|
575 |
|
|
hjets["Stlepm2j5b2"] = new TH1F("Stlepm2j5b2"+hname,"S_{t}^{lep} (2 #mu & 5 jets & #geq 2 btag)", 100, 0, 1000);
|
576 |
|
|
hjets["Htm2j5b2"] = new TH1F("Htm2j5b2"+hname,"H_{T} (2 #mu & 5 jets & #geq 2 btag)", 125, 0, 2500);
|
577 |
|
|
hjets["Njetsm2j5b2"] = new TH1F("Njetsm2j5b2"+hname,"Njets (2 #mu & 5 jets & #geq 2 btag)", 12,0.5,12.5);
|
578 |
|
|
hjets["Stjetm2j6b2"] = new TH1F("Stjetm2j6b2"+hname,"S_{T}^{jet} (2 #mu & #geq 6 jets & #geq 2 btag)",70, 200, 3000 );
|
579 |
|
|
hjets["DeltaRdijetm2j6b2"] = new TH1F("DeltaRdijetm2j6b2"+hname,"#DeltaR(j,j) (2 #mu & #geq 6 jets & #geq 2 btag)",40,0.,4.);
|
580 |
|
|
hjets["DeltaPhiMETWlepm2j6b2"] = new TH1F("DeltaPhiMETWlepm2j6b2"+hname,"#Delta #phi(MET,W(#mu,#nu)) (2 #mu & #geq 6 jets & #geq 2 btag)",32, -3.15, 3.15 );
|
581 |
|
|
hjets["trijetmassm2j6b2"] = new TH1F("trijetmassm2j6b2"+hname,"top mass (2 #mu & #geq 6 jets & #geq 2 btag)", 100, 0, 1000 );
|
582 |
|
|
hjets["trijetptm2j6b2"] = new TH1F("trijetptm2j6b2"+hname,"top p_{T} (2 #mu & #geq 6 jets & #geq 2 btag)", 50, 0, 500);
|
583 |
|
|
hjets["deltaRmindijetm2j6b2"] = new TH1F("deltaRmindijetm2j6b2"+hname,"min #DeltaR(j,j) (2 #mu & #geq 6 jets & #geq 2 btag)", 40,0.,4.);
|
584 |
|
|
hjets["deltaRmu2jetm2j6b2"] = new TH1F("deltaRmu2jetm2j6b2"+hname,"#DeltaR(#mu,2nd j) (2 #mu & #geq 6 jets & #geq 2 btag)", 40,0.,4.);
|
585 |
|
|
hjets["deltaPhidijetm2j6b2"] = new TH1F("deltaPhidijetm2j6b2"+hname,"#Delta #phi(j,j) (2 #mu & #geq 6 jets & #geq 2 btag)", 32, -3.15, 3.15);
|
586 |
|
|
hjets["deltaPhimu2jetm2j6b2"] = new TH1F("deltaPhimu2jetm2j6b2"+hname,"#Delta #phi(#mu,2nd j) (2 #mu & #geq 6 jets & #geq 2 btag)", 32, -3.15, 3.15);
|
587 |
|
|
hjets["Stlepm2j6b2"] = new TH1F("Stlepm2j6b2"+hname,"S_{t}^{lep} (2 #mu & #geq 6 jets & #geq 2 btag)", 100, 0, 1000);
|
588 |
|
|
hjets["Htm2j6b2"] = new TH1F("Htm2j6b2"+hname,"H_{T} (2 #mu & #geq 6 jets & #geq 2 btag)", 125, 0, 2500);
|
589 |
algomez |
1.18 |
hjets["Njetsm2j6b2"] = new TH1F("Njetsm2j6b2"+hname,"Njets (2 #mu & #geq 6 jets & #geq 2 btag)", 12,0.5,12.5); */
|
590 |
algomez |
1.8 |
|
591 |
algomez |
1.18 |
hjets["Njetsj4b0"] = new TH1F("Njetsj4b0"+hname,"Njets (#geq 4 jets & 0 btag)", 12,0.5,12.5);
|
592 |
|
|
hjets["Stjetj4b0"] = new TH1F("Stjetj4b0"+hname,"S_{t}^{jet} (#geq 4 jets & 0 btag)", 100, 0, 3000 );
|
593 |
|
|
hjets["Stjetj5b0"] = new TH1F("Stjetj5b0"+hname,"S_{t}^{jet} (5 jets & 0 btag)", 100, 0, 3000 );
|
594 |
|
|
hjets["Stjetj6b0"] = new TH1F("Stjetj6b0"+hname,"S_{t}^{jet} (6 jets & 0 btag)", 100, 0, 3000 );
|
595 |
|
|
hjets["Stjetj7b0"] = new TH1F("Stjetj7b0"+hname,"S_{t}^{jet} (#geq 7 jets & 0 btag)", 100, 0, 3000 );
|
596 |
|
|
hjets["Njetsj4b1"] = new TH1F("Njetsj4b1"+hname,"Njets (#geq 4 jets & #geq 1 btag)", 12,0.5,12.5);
|
597 |
|
|
hjets["Stjetj4b1"] = new TH1F("Stjetj4b1"+hname,"S_{t}^{jet} (#geq 4 jets & #geq 1 btag)", 100, 0, 3000 );
|
598 |
|
|
hjets["Stjetj5b1"] = new TH1F("Stjetj5b1"+hname,"S_{t}^{jet} (5 jets & #geq 1 btag)", 100, 0, 3000 );
|
599 |
|
|
hjets["Stjetj6b1"] = new TH1F("Stjetj6b1"+hname,"S_{t}^{jet} (6 jets & #geq 1 btag)", 100, 0, 3000 );
|
600 |
|
|
hjets["Stjetj7b1"] = new TH1F("Stjetj7b1"+hname,"S_{t}^{jet} (#geq 7 jets & #geq 1 btag)", 100, 0, 3000 );
|
601 |
|
|
hjets["Njetsj4b2"] = new TH1F("Njetsj4b2"+hname,"Njets (#geq 4 jets & #geq 2 btag)", 12,0.5,12.5);
|
602 |
|
|
hjets["Njetsj4b3"] = new TH1F("Njetsj4b3"+hname,"Njets (#geq 4 jets & #geq 3 btag)", 12,0.5,12.5);
|
603 |
|
|
hjets["Njetsj4b4"] = new TH1F("Njetsj4b4"+hname,"Njets (#geq 4 jets & #geq 4 btag)", 12,0.5,12.5);
|
604 |
|
|
|
605 |
|
|
hjets["Njets_7jets"] = new TH1F("Njets_7jets"+hname,"Jet Multiplicity",12, 0.5,12.5);
|
606 |
|
|
hjets["Njets_8jets"] = new TH1F("Njets_8jets"+hname,"Jet Multiplicity",12, 0.5,12.5);
|
607 |
|
|
hjets["Njets_9jets"] = new TH1F("Njets_9jets"+hname,"Jet Multiplicity",12, 0.5,12.5);
|
608 |
|
|
hjets["Nbtags_CSVL_7jets"] = new TH1F("Nbjets_CSVL_7jets"+hname,"Tagged b-jets",8,-0.5,7.5);
|
609 |
|
|
hjets["Nbtags_CSVL_8jets"] = new TH1F("Nbjets_CSVL_8jets"+hname,"Tagged b-jets",8,-0.5,7.5);
|
610 |
|
|
hjets["Nbtags_CSVL_9jets"] = new TH1F("Nbjets_CSVL_9jets"+hname,"Tagged b-jets",8,-0.5,7.5);
|
611 |
algomez |
1.1 |
|
612 |
|
|
map<string,TH1* > allhistos = hmuons;
|
613 |
|
|
allhistos.insert( helectrons.begin(), helectrons.end() );
|
614 |
|
|
allhistos.insert( hMET.begin(), hMET.end() );
|
615 |
|
|
allhistos.insert( hM.begin(), hM.end() );
|
616 |
|
|
allhistos.insert( hjets.begin(), hjets.end() );
|
617 |
|
|
|
618 |
|
|
for ( map<string,TH1* >::const_iterator imap=allhistos.begin(); imap!=allhistos.end(); ++imap )
|
619 |
|
|
{
|
620 |
|
|
TH1 *temp = imap->second;
|
621 |
|
|
temp->Sumw2();
|
622 |
|
|
temp->SetXTitle( temp->GetTitle() );
|
623 |
|
|
}
|
624 |
|
|
|
625 |
algomez |
1.13 |
//------- Store information in a Tree
|
626 |
|
|
MyStoreTree = new StoreTreeVariable();
|
627 |
|
|
|
628 |
|
|
if(fChannel == 1){
|
629 |
algomez |
1.18 |
MyStoreTree->SetElectronFalse();
|
630 |
algomez |
1.13 |
//MyStoreTree->SetJetFalse();
|
631 |
algomez |
1.18 |
MyStoreTree->SetVertexFalse();
|
632 |
|
|
MyStoreTree->SetTriggerFalse();
|
633 |
algomez |
1.13 |
//MyStoreTree->SetMetFalse();
|
634 |
algomez |
1.17 |
//MyStoreTree->SetMuonFalse();
|
635 |
algomez |
1.13 |
}
|
636 |
|
|
|
637 |
|
|
MyStoreTree->InitialAll();
|
638 |
|
|
//Get the Store Tree
|
639 |
|
|
MyStoreTree->GetStoreTree()->SetDirectory(fFile);
|
640 |
|
|
MyStoreTree->GetStoreTree()->AutoSave();
|
641 |
|
|
//////////////////////////////////////////
|
642 |
|
|
|
643 |
algomez |
1.1 |
// cut flow
|
644 |
|
|
if (fChannel==1)
|
645 |
|
|
{ //muon +jets
|
646 |
|
|
fCutLabels.push_back("Processed");
|
647 |
|
|
fCutLabels.push_back("OneIsoMu");
|
648 |
algomez |
1.16 |
fCutLabels.push_back("LooseMuVeto");
|
649 |
algomez |
1.17 |
//fCutLabels.push_back("ZMassVeto");
|
650 |
algomez |
1.1 |
fCutLabels.push_back("ElectronVeto");
|
651 |
algomez |
1.16 |
fCutLabels.push_back("MET");
|
652 |
algomez |
1.13 |
fCutLabels.push_back("4Jet");
|
653 |
algomez |
1.12 |
fCutLabels.push_back("Ht");
|
654 |
algomez |
1.15 |
fCutLabels.push_back("4Jet0b");
|
655 |
algomez |
1.13 |
fCutLabels.push_back("4Jet1b");
|
656 |
algomez |
1.14 |
fCutLabels.push_back("4JetCut");
|
657 |
|
|
fCutLabels.push_back("Stjet");
|
658 |
algomez |
1.18 |
fCutLabels.push_back("7Jet");
|
659 |
|
|
fCutLabels.push_back("8Jet");
|
660 |
|
|
fCutLabels.push_back("9Jet");
|
661 |
algomez |
1.1 |
}
|
662 |
|
|
else
|
663 |
|
|
{ //electron+jets
|
664 |
|
|
}
|
665 |
|
|
hcutflow = new TH1D("cutflow","cut flow", fCutLabels.size(), 0.5, fCutLabels.size() +0.5 );
|
666 |
|
|
|
667 |
|
|
for ( vector<string>::const_iterator ivec= fCutLabels.begin(); ivec!=fCutLabels.end(); ++ivec)
|
668 |
|
|
{
|
669 |
|
|
cutmap[ *ivec ] = 0;
|
670 |
|
|
}
|
671 |
|
|
|
672 |
algomez |
1.9 |
|
673 |
algomez |
1.15 |
if(fIsMC){
|
674 |
algomez |
1.18 |
//if (!fSample.Contains("SM") && !fSample.Contains("ttbar")){
|
675 |
|
|
//if (!fSample.Contains("UED6")){
|
676 |
|
|
if (!fSample.Contains("TTbar")){
|
677 |
|
|
LumiWeights_ = edm::Lumi3DReWeighting("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/PUMC_dist.root",
|
678 |
|
|
"/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/MyCert_160404_180252_pileupTruth_finebin.root",
|
679 |
algomez |
1.17 |
"pileup",
|
680 |
|
|
"pileup",
|
681 |
algomez |
1.18 |
"/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Weight_3Dnew.root");
|
682 |
algomez |
1.17 |
LumiWeights_.weight3D_init( 1.08 );
|
683 |
algomez |
1.18 |
LumiWeightsup_ = edm::Lumi3DReWeighting("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/PUMC_dist.root",
|
684 |
|
|
"/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/MyCert_160404_180252_pileupTruth_finebin.root",
|
685 |
algomez |
1.17 |
"pileup",
|
686 |
|
|
"pileup",
|
687 |
algomez |
1.18 |
"/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Weight_3Dup.root");
|
688 |
algomez |
1.17 |
LumiWeightsup_.weight3D_init( 1.167 );//up
|
689 |
algomez |
1.18 |
LumiWeightsdown_ = edm::Lumi3DReWeighting("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/PUMC_dist.root",
|
690 |
|
|
"/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/MyCert_160404_180252_pileupTruth_finebin.root",
|
691 |
algomez |
1.17 |
"pileup",
|
692 |
|
|
"pileup",
|
693 |
algomez |
1.18 |
"/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Weight_3Ddown.root");
|
694 |
algomez |
1.17 |
LumiWeightsdown_.weight3D_init( 0.994 );//down
|
695 |
algomez |
1.18 |
|
696 |
|
|
}
|
697 |
|
|
else {
|
698 |
algomez |
1.15 |
|
699 |
algomez |
1.18 |
LumiWeights_ = edm::Lumi3DReWeighting("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Fall11_PUMC_dist.root",
|
700 |
|
|
"/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/MyCert_160404_180252_pileupTruth_finebin.root",
|
701 |
|
|
"pileup",
|
702 |
|
|
"pileup",
|
703 |
|
|
"/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Weight_3Dnew.root");
|
704 |
|
|
LumiWeights_.weight3D_init( 1.08 );
|
705 |
|
|
LumiWeightsup_ = edm::Lumi3DReWeighting("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Fall11_PUMC_dist.root",
|
706 |
|
|
"/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/MyCert_160404_180252_pileupTruth_finebin.root",
|
707 |
|
|
"pileup",
|
708 |
|
|
"pileup",
|
709 |
|
|
"/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Weight_3Dup.root");
|
710 |
|
|
LumiWeightsup_.weight3D_init( 1.167 );//up
|
711 |
|
|
LumiWeightsdown_ = edm::Lumi3DReWeighting("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Fall11_PUMC_dist.root",
|
712 |
|
|
"/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/MyCert_160404_180252_pileupTruth_finebin.root",
|
713 |
|
|
"pileup",
|
714 |
|
|
"pileup",
|
715 |
|
|
"/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Weight_3Ddown.root");
|
716 |
|
|
LumiWeightsdown_.weight3D_init( 0.994 );//down
|
717 |
|
|
} }
|
718 |
algomez |
1.15 |
|
719 |
|
|
// For JEC uncertainties
|
720 |
algomez |
1.18 |
JetCorrectorParameters *jcp = new JetCorrectorParameters("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/JEC11_V10_AK5PF_UncertaintySources.txt","Total");
|
721 |
algomez |
1.15 |
if (fdoJECunc) fJECunc = new JetCorrectionUncertainty( *jcp );
|
722 |
|
|
|
723 |
|
|
//Medium
|
724 |
algomez |
1.18 |
bSF_table.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVM_beff_SF.txt");
|
725 |
|
|
bSF_table_error.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVM_beff_SF_Error.txt");
|
726 |
|
|
lSF_table.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVM_lmistag_SF.txt");
|
727 |
|
|
lSF_table_error_down.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVM_lmistag_SF_Error_Down.txt");
|
728 |
|
|
lSF_table_error_up.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVM_lmistag_SF_Error_Up.txt");
|
729 |
|
|
leff_table.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVM_lmistag_Eff.txt");
|
730 |
algomez |
1.15 |
|
731 |
|
|
//Loose
|
732 |
algomez |
1.18 |
bSF_table_loose.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVL_beff_SF.txt");
|
733 |
|
|
bSF_table_error_loose.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVL_beff_SF_Error.txt");
|
734 |
|
|
lSF_table_loose.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVL_lmistag_SF.txt");
|
735 |
|
|
lSF_table_error_down_loose.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVL_lmistag_SF_Error_Down.txt");
|
736 |
|
|
lSF_table_error_up_loose.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVL_lmistag_SF_Error_Up.txt");
|
737 |
|
|
leff_table_loose.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVL_lmistag_Eff.txt");
|
738 |
|
|
|
739 |
|
|
//Tight
|
740 |
|
|
bSF_table_tight.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVT_beff_SF.txt");
|
741 |
|
|
bSF_table_error_tight.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVT_beff_SF_Error.txt");
|
742 |
|
|
lSF_table_tight.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVT_lmistag_SF.txt");
|
743 |
|
|
lSF_table_error_down_tight.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVT_lmistag_SF_Error_Down.txt");
|
744 |
|
|
lSF_table_error_up_tight.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVT_lmistag_SF_Error_Up.txt");
|
745 |
|
|
leff_table_tight.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVT_lmistag_Eff.txt");
|
746 |
|
|
|
747 |
algomez |
1.15 |
|
748 |
algomez |
1.18 |
//#########################Btag Fast Sim Btag Correction Factor
|
749 |
|
|
//Medium
|
750 |
|
|
bCF_table.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVM_b_fastsim_CF.txt");
|
751 |
|
|
bCF_table_error.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVM_b_fastsim_CF_error.txt");
|
752 |
|
|
cCF_table.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVM_c_fastsim_CF.txt");
|
753 |
|
|
lCF_table_error.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVM_light_fastsim_CF_error.txt");
|
754 |
|
|
leff_CF_table.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVM_light_fastsim_CF.txt");
|
755 |
|
|
cCF_table_error.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVM_c_fastsim_CF_error.txt");
|
756 |
|
|
|
757 |
|
|
//Loose
|
758 |
|
|
/*
|
759 |
|
|
bCF_table_loose.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/.txt");
|
760 |
|
|
bCF_table_error_loose.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/.txt");
|
761 |
|
|
cCF_table_loose.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/.txt");
|
762 |
|
|
cCF_table_error_loose.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/.txt");
|
763 |
|
|
leff_CF_table_loose.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/.txt");
|
764 |
|
|
lCF_table_error_loose.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/.txt");
|
765 |
|
|
*/
|
766 |
|
|
|
767 |
algomez |
1.15 |
//Tight
|
768 |
algomez |
1.18 |
bCF_table_tight.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVT_b_fastsim_CF.txt");
|
769 |
|
|
bCF_table_error_tight.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVT_b_fastsim_CF_error.txt");
|
770 |
|
|
cCF_table_tight.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVT_c_fastsim_CF.txt");
|
771 |
|
|
cCF_table_error_tight.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVT_c_fastsim_CF_error.txt");
|
772 |
|
|
leff_CF_table_tight.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVT_light_fastsim_CF.txt");
|
773 |
|
|
lCF_table_error_tight.LoadTable("/uscms/home/algomez/work/CMSSW_4_2_4/src/Yumiceva/TreeAnalyzer/test/Tables/Table_CSVT_light_fastsim_CF_error.txt");
|
774 |
|
|
|
775 |
algomez |
1.1 |
}
|
776 |
|
|
|
777 |
|
|
Bool_t Analyzer::Process(Long64_t entry)
|
778 |
|
|
{
|
779 |
|
|
// The Process() function is called for each entry in the tree (or possibly
|
780 |
|
|
// keyed object in the case of PROOF) to be processed. The entry argument
|
781 |
|
|
// specifies which entry in the currently loaded tree is to be processed.
|
782 |
|
|
// It can be passed to either Analyzer::GetEntry() or TBranch::GetEntry()
|
783 |
|
|
// to read either all or the required parts of the data. When processing
|
784 |
|
|
// keyed objects with PROOF, the object is already loaded and is available
|
785 |
|
|
// via the fObject pointer.
|
786 |
|
|
//
|
787 |
|
|
// This function should contain the "body" of the analysis. It can contain
|
788 |
|
|
// simple or elaborate selection criteria, run algorithms on the data
|
789 |
|
|
// of the event and typically fill histograms.
|
790 |
|
|
//
|
791 |
|
|
// The processing can be stopped by calling Abort().
|
792 |
|
|
//
|
793 |
|
|
// Use fStatus to set the return value of TTree::Process().
|
794 |
|
|
//
|
795 |
|
|
// The return value is currently not used.
|
796 |
|
|
|
797 |
|
|
//TString option = GetOption();
|
798 |
|
|
|
799 |
algomez |
1.13 |
//if ( entry % 100 == 0 )
|
800 |
|
|
//cout<< "process entry " << entry << endl;
|
801 |
algomez |
1.1 |
|
802 |
|
|
//TString sEntry = Form("%f", float(entry) );
|
803 |
|
|
// Info("Process",
|
804 |
|
|
//"entry # %s", Form("%f", float(entry) ) );
|
805 |
|
|
|
806 |
|
|
//fChain->GetTree()->GetEntry(entry);
|
807 |
|
|
fChain->GetEntry(entry);
|
808 |
|
|
|
809 |
|
|
//if (entry>10) return kTRUE;
|
810 |
|
|
|
811 |
|
|
// event info
|
812 |
|
|
//cout << "run: " << ntuple->run << " lumi: " << ntuple->lumi << endl;
|
813 |
|
|
|
814 |
|
|
// get collections
|
815 |
|
|
vector< TopVertexEvent > primaryVertices = ntuple->vertices;
|
816 |
|
|
vector< TopMuonEvent > muons = ntuple->muons;
|
817 |
algomez |
1.2 |
vector< TopElectronEvent > electrons = ntuple->PFelectrons; // use PF electrons (gsf collection is called "electrons")
|
818 |
algomez |
1.1 |
vector< TopJetEvent > jets = ntuple->PFjets;
|
819 |
|
|
|
820 |
algomez |
1.2 |
// USE PF Isolation
|
821 |
|
|
fMuSelector.UsePFIsolation(true);
|
822 |
|
|
fEleSelector.UsePFIsolation(true);
|
823 |
|
|
|
824 |
algomez |
1.1 |
size_t total_pvs = primaryVertices.size();
|
825 |
|
|
size_t total_muons = muons.size();
|
826 |
|
|
size_t total_electrons = electrons.size();
|
827 |
|
|
size_t total_jets = jets.size();
|
828 |
|
|
|
829 |
|
|
float PVz = 0.;
|
830 |
|
|
TLorentzVector p4muon, p4ele, p4lepton, p4MET;
|
831 |
|
|
TLorentzVector p4Nu, p4OtherNu;
|
832 |
|
|
TLorentzVector p4QCDmuon;
|
833 |
|
|
|
834 |
|
|
vector< TLorentzVector > p4jets;
|
835 |
algomez |
1.15 |
vector< TLorentzVector > p4bjetscsvl;
|
836 |
|
|
vector< TLorentzVector > p4bjetscsvm;
|
837 |
algomez |
1.6 |
vector< TLorentzVector > p4Othermuon; // leading muon
|
838 |
algomez |
1.1 |
|
839 |
algomez |
1.13 |
// FILTER OUT DATA events
|
840 |
|
|
int testrun = ntuple->run;
|
841 |
|
|
if ( fSample =="data" && ( testrun == 176765 || testrun == 176771 || testrun == 176795 || testrun == 176796 || testrun == 176545 || testrun == 176547 || testrun == 176928 || testrun == 176982 ) ) return kTRUE;
|
842 |
|
|
if ( fSample =="dataMissing" && ( testrun != 176765 && testrun != 176771 && testrun != 176795 && testrun != 176796 && testrun != 176545 && testrun != 176547 && testrun != 176928 && testrun != 176982 ) ) return kTRUE;
|
843 |
|
|
|
844 |
algomez |
1.18 |
/*/--------- For MVA cuts
|
845 |
|
|
const char* inputVars[] = { "Stjet", "jet2_pt", "jet3_pt", "jet4_pt", "jet1_eta", "jet2_eta", "jet3_eta", "jet4_eta", "deltaRmindijet", "diWdeltaR", "deltaRdijet", "deltaRmu2jet", "Muonpt", "Muoneta", "MuondeltaR", "MET", "Htopmass", "Htoppt", "Leptopmass", "Leptoppt", "jet_number", "numBjets_csvl" };
|
846 |
|
|
std::vector<std::string> inputVarsMVA;
|
847 |
|
|
for (int i=0; i<22; ++i) inputVarsMVA.push_back( inputVars[i] );
|
848 |
|
|
ReadBDT mvaReader( inputVarsMVA );
|
849 |
|
|
double bdtresponse = -10.;
|
850 |
|
|
///////////////////////////////////////////////// */
|
851 |
algomez |
1.13 |
|
852 |
algomez |
1.2 |
////////////////////
|
853 |
|
|
// GENERATOR
|
854 |
|
|
///////////////////
|
855 |
algomez |
1.17 |
if (fIsMC && fSample.Contains("tttt") )
|
856 |
algomez |
1.2 |
{
|
857 |
|
|
TLorentzVector p4genLepton;
|
858 |
|
|
TLorentzVector p4genNu;
|
859 |
|
|
TLorentzVector p4genb;
|
860 |
|
|
if (ntuple->gen.bLep_pt>0)
|
861 |
|
|
{
|
862 |
|
|
p4genLepton.SetPtEtaPhiE(ntuple->gen.mu_pt,ntuple->gen.mu_eta,ntuple->gen.mu_phi,ntuple->gen.mu_e);
|
863 |
|
|
p4genNu.SetPtEtaPhiE(ntuple->gen.nu_pt,ntuple->gen.nu_eta,ntuple->gen.nu_phi,ntuple->gen.nu_e);
|
864 |
|
|
p4genb.SetPtEtaPhiE(ntuple->gen.bLep_pt,ntuple->gen.bLep_eta,ntuple->gen.bLep_phi,ntuple->gen.bLep_e);
|
865 |
|
|
|
866 |
algomez |
1.18 |
//hjets["gen_deltaR_mub"]->Fill( p4genLepton.DeltaR( p4genb ) );
|
867 |
algomez |
1.2 |
}
|
868 |
|
|
}
|
869 |
algomez |
1.15 |
|
870 |
|
|
//////////Seperate the Wbb, Wcc and Wlight///////////////////////////
|
871 |
|
|
//before the selection, We should seperate the samples
|
872 |
|
|
|
873 |
|
|
int numberb = 0;
|
874 |
|
|
int numberc = 0;
|
875 |
|
|
int numberl = 0;
|
876 |
|
|
|
877 |
|
|
for ( size_t ijet=0; ijet < total_jets; ++ijet)
|
878 |
|
|
{
|
879 |
|
|
TopJetEvent jet = jets[ijet];
|
880 |
|
|
int listflavor = jet.mc.flavor;
|
881 |
|
|
if(abs(listflavor) == 5){numberb++;}
|
882 |
|
|
if(abs(listflavor) == 4){numberc++;}
|
883 |
|
|
if(abs(listflavor) == 1 || abs(listflavor) == 2 || abs(listflavor) == 3 || abs(listflavor) == 21){numberl++;}
|
884 |
|
|
|
885 |
|
|
}
|
886 |
|
|
|
887 |
|
|
//begin this we are using the jet parton flovar to determine the Wbb Wcc and Wlight
|
888 |
algomez |
1.18 |
if(fSample.Contains("Wqq"))
|
889 |
algomez |
1.15 |
{
|
890 |
|
|
if((numberb > 0 || numberc > 0))
|
891 |
|
|
return kTRUE;
|
892 |
|
|
}
|
893 |
|
|
|
894 |
algomez |
1.18 |
if(fSample.Contains("Wcc"))
|
895 |
algomez |
1.15 |
{
|
896 |
|
|
if(numberc == 0 || numberb > 0 )
|
897 |
|
|
return kTRUE;
|
898 |
|
|
}
|
899 |
|
|
|
900 |
algomez |
1.18 |
if(fSample.Contains("Wbb"))
|
901 |
algomez |
1.15 |
{
|
902 |
|
|
if(numberb == 0)
|
903 |
|
|
return kTRUE;
|
904 |
|
|
}
|
905 |
|
|
|
906 |
|
|
//////////Seperate the Wbb, Wcc and Wlight///////////////////////////
|
907 |
algomez |
1.1 |
////////////////////////////////////
|
908 |
|
|
// PRIMARY VERTICES
|
909 |
|
|
///////////////////////////////////
|
910 |
|
|
|
911 |
algomez |
1.15 |
Int_t npvs = 0;
|
912 |
algomez |
1.6 |
for ( size_t ipv=0; ipv < total_pvs; ++ipv)
|
913 |
|
|
{
|
914 |
|
|
if (ipv==0) PVz = primaryVertices[ipv].vz;
|
915 |
algomez |
1.15 |
if (primaryVertices[ipv].IsGood == 1) {
|
916 |
|
|
npvs++;
|
917 |
|
|
}
|
918 |
algomez |
1.6 |
}
|
919 |
algomez |
1.1 |
|
920 |
|
|
|
921 |
algomez |
1.15 |
Double_t PUweight = 1.;
|
922 |
algomez |
1.2 |
|
923 |
algomez |
1.17 |
if(fIsMC && !fSample.Contains("tttt")){
|
924 |
algomez |
1.13 |
|
925 |
algomez |
1.15 |
Int_t mc_npvminus1 = ntuple->gen.Bx_minus1;
|
926 |
|
|
Int_t mc_npv0 = ntuple->gen.Bx_0;
|
927 |
|
|
Int_t mc_npvplus1 = ntuple->gen.Bx_plus1;
|
928 |
|
|
|
929 |
algomez |
1.18 |
//PUweight = LumiWeights_.weight3D(mc_npvminus1,mc_npv0,mc_npvplus1);
|
930 |
algomez |
1.17 |
if (fpu_down) PUweight = LumiWeightsdown_.weight3D(mc_npvminus1,mc_npv0,mc_npvplus1);
|
931 |
|
|
if (fpu_up) PUweight = LumiWeightsup_.weight3D(mc_npvminus1,mc_npv0,mc_npvplus1);
|
932 |
algomez |
1.18 |
//PUweight = 1.0;//This is just for test/Tables
|
933 |
algomez |
1.15 |
}
|
934 |
|
|
|
935 |
algomez |
1.17 |
if(fIsMC && fSample.Contains("tttt")){
|
936 |
algomez |
1.1 |
|
937 |
algomez |
1.15 |
Int_t mc_npvminus1 = ntuple->gen.Bx_0;
|
938 |
|
|
Int_t mc_npv0 = ntuple->gen.Bx_0;
|
939 |
|
|
Int_t mc_npvplus1 = ntuple->gen.Bx_0;
|
940 |
|
|
|
941 |
|
|
PUweight = LumiWeights_.weight3D(mc_npvminus1,mc_npv0,mc_npvplus1);
|
942 |
algomez |
1.17 |
if (fpu_down) PUweight = LumiWeightsdown_.weight3D(mc_npvminus1,mc_npv0,mc_npvplus1);
|
943 |
|
|
if (fpu_up) PUweight = LumiWeightsup_.weight3D(mc_npvminus1,mc_npv0,mc_npvplus1);
|
944 |
algomez |
1.18 |
//PUweight = 1.0;//This is just for test/Tables
|
945 |
algomez |
1.15 |
}
|
946 |
algomez |
1.5 |
|
947 |
algomez |
1.2 |
/////////////
|
948 |
|
|
// HLT scale factor for MC
|
949 |
|
|
////////////
|
950 |
|
|
double SF_hlt = 1.;
|
951 |
algomez |
1.9 |
if (fIsMC) SF_hlt = 0.97; //0.966;
|
952 |
|
|
double SF_iso = 1.;
|
953 |
|
|
if (fIsMC) SF_iso = 0.996;
|
954 |
|
|
PUweight = PUweight*SF_hlt*SF_iso; // LETS INCLUDE THE TRIGGER SF INTO THE PU WEIGHTS
|
955 |
|
|
|
956 |
algomez |
1.16 |
hPVs["Nreweight_cut0"]->Fill( total_pvs, PUweight );
|
957 |
algomez |
1.13 |
|
958 |
algomez |
1.9 |
//TEMP
|
959 |
|
|
//PUweight = 1.;
|
960 |
algomez |
1.2 |
|
961 |
algomez |
1.1 |
cutmap["Processed"] += PUweight;
|
962 |
|
|
|
963 |
|
|
if (fVerbose) cout << "done pv" << endl;
|
964 |
algomez |
1.6 |
|
965 |
algomez |
1.1 |
//////////////////////////////////
|
966 |
|
|
// MUONS
|
967 |
|
|
//////////////////////////////////
|
968 |
algomez |
1.2 |
int ngoodIDmuons = 0;
|
969 |
algomez |
1.1 |
int nloosemuons = 0;
|
970 |
|
|
int ntightmuons = 0;
|
971 |
|
|
int nqcdmuons = 0;
|
972 |
algomez |
1.9 |
int nmuonID[8] = {0};
|
973 |
algomez |
1.1 |
|
974 |
algomez |
1.17 |
//bool IsZevent = false;
|
975 |
|
|
|
976 |
algomez |
1.1 |
double RelIso = -1.;
|
977 |
|
|
double deltaR = -1.;
|
978 |
|
|
double QCDRelIso = -1.;
|
979 |
|
|
double QCDdeltaR = -1;
|
980 |
|
|
|
981 |
|
|
for ( size_t imu=0; imu < total_muons; ++imu) {
|
982 |
|
|
|
983 |
algomez |
1.6 |
TopMuonEvent muon = muons[imu];
|
984 |
algomez |
1.9 |
|
985 |
algomez |
1.6 |
h1test->Fill( muon.pt );
|
986 |
algomez |
1.9 |
|
987 |
|
|
if (muon.pt > 32. && fabs(muon.eta)<2.1 && muon.IsTrackerMuon==1 ) {
|
988 |
|
|
nmuonID[0] += 1;
|
989 |
|
|
if (fabs(muon.d0)<0.02 ) {
|
990 |
|
|
nmuonID[1] += 1;
|
991 |
|
|
if (muon.trackerhits>=11 ) {
|
992 |
|
|
nmuonID[2] += 1;
|
993 |
|
|
if (muon.normchi2<10 ) {
|
994 |
|
|
nmuonID[3] +=1;
|
995 |
|
|
if (muon.muonhits>0 ) {
|
996 |
|
|
nmuonID[4] += 1;
|
997 |
|
|
if (muon.pixelhits >= 1 ) {
|
998 |
|
|
nmuonID[5] += 1;
|
999 |
|
|
if (muon.muonstations > 1 ) {
|
1000 |
|
|
nmuonID[6] +=1;
|
1001 |
|
|
if (fabs(muon.vz - PVz) < 1.) {
|
1002 |
|
|
nmuonID[7] +=1;
|
1003 |
|
|
}
|
1004 |
|
|
}
|
1005 |
|
|
}
|
1006 |
|
|
}
|
1007 |
|
|
}
|
1008 |
|
|
}
|
1009 |
|
|
}
|
1010 |
|
|
}
|
1011 |
algomez |
1.6 |
|
1012 |
|
|
if ( fMuSelector.MuonID( muon, PVz ) ) ngoodIDmuons++;
|
1013 |
algomez |
1.9 |
|
1014 |
algomez |
1.6 |
// select only good muons
|
1015 |
algomez |
1.9 |
|
1016 |
algomez |
1.6 |
if ( fMuSelector.MuonLoose( muon ) ) {
|
1017 |
algomez |
1.9 |
|
1018 |
algomez |
1.6 |
nloosemuons++;
|
1019 |
algomez |
1.9 |
|
1020 |
algomez |
1.15 |
if ( fMuSelector.MuonTight( muon, PVz) ) hmuons["charge_tiso"]->Fill( muon.charge, PUweight );
|
1021 |
algomez |
1.6 |
//hmuons["N_tisomuons"]->Fill( nloosemuons );
|
1022 |
|
|
if ( fMuSelector.MuonTightDeltaR( muon, PVz, jets) ) {
|
1023 |
|
|
ntightmuons++;
|
1024 |
|
|
deltaR = fMuSelector.GetDeltaR();
|
1025 |
|
|
}
|
1026 |
algomez |
1.1 |
|
1027 |
algomez |
1.17 |
|
1028 |
algomez |
1.6 |
p4muon.SetPtEtaPhiE( muon.pt, muon.eta, muon.phi, muon.e );
|
1029 |
algomez |
1.17 |
p4Othermuon.push_back( p4muon ); // for leading muon
|
1030 |
algomez |
1.6 |
RelIso = muon.pfreliso; //muon.reliso03;
|
1031 |
algomez |
1.9 |
}
|
1032 |
algomez |
1.4 |
|
1033 |
algomez |
1.6 |
// check muon in QCD control region
|
1034 |
|
|
if ( fMuSelector.MuonRelax02IsoQCD( muon, PVz, jets ) ) {
|
1035 |
|
|
nqcdmuons++;
|
1036 |
algomez |
1.9 |
|
1037 |
algomez |
1.6 |
// keep the leading muon for selection
|
1038 |
|
|
if (nqcdmuons==1) {
|
1039 |
|
|
p4QCDmuon.SetPtEtaPhiE( muon.pt, muon.eta, muon.phi, muon.e );
|
1040 |
|
|
QCDRelIso = muon.pfreliso; //muon.reliso03;
|
1041 |
|
|
QCDdeltaR = fMuSelector.GetDeltaR();
|
1042 |
|
|
}
|
1043 |
algomez |
1.1 |
}
|
1044 |
algomez |
1.6 |
}
|
1045 |
algomez |
1.1 |
|
1046 |
algomez |
1.6 |
if (fVerbose) cout << "done muons" << endl;
|
1047 |
algomez |
1.1 |
|
1048 |
|
|
//////////////////////////////////
|
1049 |
|
|
// ELECTRONS
|
1050 |
|
|
//////////////////////////////////
|
1051 |
|
|
int nlooseelectrons = 0;
|
1052 |
|
|
int ntightelectrons = 0;
|
1053 |
|
|
bool IsConversion = false;
|
1054 |
|
|
|
1055 |
|
|
for ( size_t iele=0; iele < total_electrons; ++iele) {
|
1056 |
|
|
|
1057 |
algomez |
1.6 |
TopElectronEvent electron = electrons[iele];
|
1058 |
algomez |
1.1 |
|
1059 |
algomez |
1.6 |
if ( fEleSelector.ElectronLoose(electron) ) nlooseelectrons++;
|
1060 |
algomez |
1.1 |
|
1061 |
algomez |
1.6 |
if ( fEleSelector.ElectronTight(electron, PVz ) ) {
|
1062 |
algomez |
1.1 |
|
1063 |
algomez |
1.6 |
if (ntightelectrons == 0) {
|
1064 |
|
|
IsConversion = electron.IsConversion;
|
1065 |
|
|
p4ele.SetPtEtaPhiE( electron.pt, electron.eta, electron.phi, electron.e );
|
1066 |
algomez |
1.12 |
/*helectrons["pt_cut2"]->Fill( p4ele.Pt(), PUweight );
|
1067 |
algomez |
1.6 |
helectrons["eta_cut2"]->Fill( p4ele.Eta(), PUweight );
|
1068 |
algomez |
1.12 |
helectrons["phi_cut2"]->Fill( p4ele.Phi(), PUweight );*/
|
1069 |
algomez |
1.6 |
}
|
1070 |
|
|
ntightelectrons++;
|
1071 |
|
|
}
|
1072 |
algomez |
1.1 |
}
|
1073 |
|
|
if (fVerbose) cout << "done electron" << endl;
|
1074 |
|
|
|
1075 |
algomez |
1.6 |
/////////////////////////////////////
|
1076 |
|
|
// MUON/ELECTRON + JETS
|
1077 |
|
|
/////////////////////////////////////
|
1078 |
algomez |
1.1 |
|
1079 |
algomez |
1.6 |
if ( fChannel == 1 ) {
|
1080 |
algomez |
1.1 |
|
1081 |
algomez |
1.6 |
if (fdoQCD2SideBand) {
|
1082 |
algomez |
1.1 |
|
1083 |
algomez |
1.6 |
if (nqcdmuons == 0) return kTRUE;
|
1084 |
|
|
cutmap["OneIsoMu"] += PUweight;
|
1085 |
algomez |
1.1 |
|
1086 |
algomez |
1.6 |
p4lepton = p4QCDmuon;
|
1087 |
|
|
RelIso = QCDRelIso;
|
1088 |
|
|
deltaR = QCDdeltaR;
|
1089 |
|
|
}
|
1090 |
|
|
else {
|
1091 |
algomez |
1.2 |
|
1092 |
algomez |
1.6 |
if ( ngoodIDmuons > 0 ) hmuons["Ngood"]->Fill( total_pvs, PUweight);
|
1093 |
|
|
if ( ntightmuons > 0 ) hmuons["Niso"]->Fill( total_pvs, PUweight);
|
1094 |
algomez |
1.16 |
|
1095 |
algomez |
1.17 |
//if ( ntightmuons != 2 ) return kTRUE;
|
1096 |
algomez |
1.6 |
if ( ntightmuons != 1 ) return kTRUE;
|
1097 |
algomez |
1.16 |
//if ( ntightmuons < 1 ) return kTRUE;
|
1098 |
algomez |
1.6 |
cutmap["OneIsoMu"] += PUweight;
|
1099 |
algomez |
1.2 |
|
1100 |
algomez |
1.6 |
if ( nloosemuons > 1 ) return kTRUE;
|
1101 |
algomez |
1.17 |
//if ( nloosemuons > 2 ) return kTRUE;
|
1102 |
algomez |
1.16 |
cutmap["LooseMuVeto"] += PUweight;
|
1103 |
|
|
hmuons["N0"]->Fill( total_muons, PUweight );
|
1104 |
algomez |
1.1 |
|
1105 |
algomez |
1.6 |
if ( nlooseelectrons > 0 ) return kTRUE;
|
1106 |
algomez |
1.16 |
hmuons["Nelectrons_cut0"]->Fill( nlooseelectrons, PUweight );
|
1107 |
algomez |
1.6 |
cutmap["ElectronVeto"] += PUweight;
|
1108 |
algomez |
1.1 |
|
1109 |
algomez |
1.17 |
/*
|
1110 |
|
|
TLorentzVector zboson = p4Othermuon[0] + p4Othermuon[1];
|
1111 |
|
|
double zbosonmass = zboson.M();
|
1112 |
|
|
if ( abs(zbosonmass - 91.2 ) < 10.0) IsZevent = true;
|
1113 |
|
|
if (IsZevent) return kTRUE;
|
1114 |
|
|
cutmap["ZMassVeto"] += PUweight;*/
|
1115 |
|
|
|
1116 |
algomez |
1.6 |
p4lepton = p4muon;
|
1117 |
|
|
if (fVerbose) cout << "got a good lepton" << endl;
|
1118 |
|
|
}
|
1119 |
|
|
|
1120 |
algomez |
1.16 |
|
1121 |
|
|
hmuons["pt_cut0"]->Fill( p4lepton.Pt(), PUweight );
|
1122 |
|
|
hmuons["eta_cut0"]->Fill( p4lepton.Eta(), PUweight );
|
1123 |
|
|
hmuons["phi_cut0"]->Fill( p4lepton.Phi(), PUweight );
|
1124 |
algomez |
1.6 |
hmuons["reliso"]->Fill( RelIso, PUweight );
|
1125 |
algomez |
1.16 |
hmuons["deltaR_cut0"]->Fill( deltaR, PUweight );
|
1126 |
algomez |
1.1 |
|
1127 |
algomez |
1.6 |
}
|
1128 |
algomez |
1.1 |
else // electron+jets
|
1129 |
|
|
{
|
1130 |
|
|
// pending ...
|
1131 |
|
|
}
|
1132 |
|
|
|
1133 |
|
|
if (fVerbose) cout << "done lepton selection " << endl;
|
1134 |
|
|
|
1135 |
|
|
/////////////////////////////////
|
1136 |
algomez |
1.6 |
// MET + Ht
|
1137 |
algomez |
1.1 |
/////////////////////////////////
|
1138 |
|
|
|
1139 |
|
|
p4MET.SetPtEtaPhiE( ntuple->PFMET,
|
1140 |
|
|
0.,
|
1141 |
|
|
ntuple->PFMETphi,
|
1142 |
|
|
ntuple->PFMET );
|
1143 |
|
|
|
1144 |
|
|
//temporal check using genMET
|
1145 |
|
|
//p4MET.SetPtEtaPhiE( ntuple->gen.MET,
|
1146 |
|
|
// 0.,
|
1147 |
|
|
// ntuple->gen.METPhi,
|
1148 |
|
|
// ntuple->gen.MET );
|
1149 |
|
|
|
1150 |
algomez |
1.16 |
//if (fdoQCD1SideBand && p4MET.Et() > 20.) return kTRUE;
|
1151 |
|
|
//else if ( p4MET.Et() <= 20. && fdoQCD2SideBand==false ) return kTRUE;
|
1152 |
algomez |
1.17 |
// if ( p4MET.Et() <= 20.) return kTRUE;
|
1153 |
|
|
// if (fVerbose) cout << "pass MET cut" << endl;
|
1154 |
algomez |
1.1 |
|
1155 |
|
|
|
1156 |
|
|
//cutmap["MET"] += PUweight;
|
1157 |
algomez |
1.16 |
hMET["MET_cut0"]->Fill( p4MET.Pt(), PUweight );
|
1158 |
|
|
hMET["phi_cut0"]->Fill( p4MET.Phi(), PUweight );
|
1159 |
algomez |
1.6 |
|
1160 |
algomez |
1.1 |
|
1161 |
|
|
double Wpt = p4lepton.Pt() + p4MET.Pt();
|
1162 |
|
|
double Wpx = p4lepton.Px() + p4MET.Px();
|
1163 |
|
|
double Wpy = p4lepton.Py() + p4MET.Py();
|
1164 |
|
|
double WMt = sqrt(Wpt*Wpt-Wpx*Wpx-Wpy*Wpy);
|
1165 |
algomez |
1.16 |
hM["WMt_cut0"]->Fill( WMt, PUweight );
|
1166 |
algomez |
1.3 |
|
1167 |
algomez |
1.1 |
|
1168 |
|
|
/////////////////////////////////
|
1169 |
|
|
// JETS
|
1170 |
|
|
////////////////////////////////
|
1171 |
|
|
|
1172 |
algomez |
1.6 |
//JetCombinatorics myCombi = JetCombinatoric();
|
1173 |
algomez |
1.1 |
|
1174 |
|
|
int njets = 0;
|
1175 |
algomez |
1.8 |
MyStoreTree->GetJetVariable()->numjets = 0;
|
1176 |
algomez |
1.11 |
MyStoreTree->GetJetVariable()->numBjets_csvl = 0;
|
1177 |
algomez |
1.14 |
MyStoreTree->GetJetVariable()->numBjets_csvm = 0;
|
1178 |
algomez |
1.15 |
MyStoreTree->GetJetVariable()->numBjets_csvt = 0;
|
1179 |
algomez |
1.13 |
|
1180 |
algomez |
1.1 |
map< string, vector<float> > bdisc;
|
1181 |
|
|
map< string, vector<bool> > isTagb;
|
1182 |
algomez |
1.9 |
map< string, vector<bool> > isTagbUp;
|
1183 |
|
|
map< string, vector<bool> > isTagbDown;
|
1184 |
algomez |
1.1 |
vector<int> listflavor;
|
1185 |
algomez |
1.8 |
|
1186 |
algomez |
1.13 |
Float_t metcorpx = p4MET.Px();
|
1187 |
|
|
Float_t metcorpy = p4MET.Py();
|
1188 |
|
|
Float_t totJERptadd = 0.;
|
1189 |
|
|
Float_t totJERptminus = 0;
|
1190 |
|
|
|
1191 |
|
|
vector< TopJetEvent > tmp_corrjets;
|
1192 |
algomez |
1.1 |
|
1193 |
algomez |
1.17 |
////////////////////////////////
|
1194 |
|
|
///// JES, JER
|
1195 |
|
|
//////////////////////////////
|
1196 |
algomez |
1.6 |
for ( size_t ijet=0; ijet < total_jets; ++ijet) {
|
1197 |
algomez |
1.1 |
|
1198 |
algomez |
1.6 |
TopJetEvent jet = jets[ijet];
|
1199 |
|
|
double SF_JEC = 1.;
|
1200 |
algomez |
1.13 |
|
1201 |
|
|
//JER
|
1202 |
|
|
Float_t factor = 1.0;
|
1203 |
|
|
Float_t ptscale = 1.0;
|
1204 |
|
|
|
1205 |
algomez |
1.6 |
if (fdoJECunc){
|
1206 |
algomez |
1.13 |
|
1207 |
|
|
metcorpx = metcorpx + jet.uncorrpx;
|
1208 |
|
|
metcorpy = metcorpy + jet.uncorrpy;
|
1209 |
|
|
|
1210 |
algomez |
1.6 |
fJECunc->setJetEta( jet.eta);
|
1211 |
|
|
fJECunc->setJetPt( jet.pt);
|
1212 |
algomez |
1.13 |
double jec_unc = 0.;
|
1213 |
|
|
if (fdoJECup) jec_unc = fJECunc->getUncertainty(true);
|
1214 |
|
|
if (!fdoJECup) jec_unc = fJECunc->getUncertainty(false);
|
1215 |
algomez |
1.6 |
if (fVerbose) cout << "JEC uncertainty is " << jec_unc << endl;
|
1216 |
|
|
if (fdoJECup) SF_JEC = 1.+jec_unc;
|
1217 |
|
|
else SF_JEC = 1.-jec_unc;
|
1218 |
algomez |
1.13 |
|
1219 |
|
|
metcorpx = metcorpx - jet.uncorrpx * SF_JEC;
|
1220 |
|
|
metcorpy = metcorpy - jet.uncorrpy * SF_JEC;
|
1221 |
|
|
}
|
1222 |
|
|
|
1223 |
|
|
if(fIsMC && fdoJERunc) {
|
1224 |
|
|
if(fdoJERunc && !fdoJERup && !fdoJERdown){
|
1225 |
|
|
if(fabs(jet.eta) < 1.5) factor = 0.1;
|
1226 |
|
|
if(fabs(jet.eta) >= 1.5 && fabs(jet.eta) < 2.0) factor = 0.1;
|
1227 |
|
|
if(fabs(jet.eta) >= 2.0) factor = 0.1;
|
1228 |
|
|
}
|
1229 |
|
|
|
1230 |
|
|
if(fdoJERunc && fdoJERup){
|
1231 |
|
|
if(fabs(jet.eta) < 1.5) factor = 0.2;
|
1232 |
|
|
if(fabs(jet.eta) >= 1.5 && fabs(jet.eta) < 2.0) factor = 0.25;
|
1233 |
|
|
if(fabs(jet.eta) >= 2.0) factor = 0.3;
|
1234 |
|
|
}
|
1235 |
|
|
|
1236 |
|
|
if(fdoJERunc && fdoJERdown){
|
1237 |
|
|
if(fabs(jet.eta) < 1.5) factor = 0.0;
|
1238 |
|
|
if(fabs(jet.eta) >= 1.5 && fabs(jet.eta) < 2.0) factor = -0.05;
|
1239 |
|
|
if(fabs(jet.eta) >= 2.0) factor = -0.1;
|
1240 |
|
|
}
|
1241 |
|
|
|
1242 |
|
|
//if (jet.mc.pt < 15) continue;
|
1243 |
|
|
if (jet.mc.pt >= 15 ) {
|
1244 |
|
|
metcorpx += jet.uncorrpx;
|
1245 |
|
|
metcorpy += jet.uncorrpy;
|
1246 |
|
|
totJERptadd += TMath::Sqrt(jet.uncorrpx*jet.uncorrpx + jet.uncorrpy*jet.uncorrpy);
|
1247 |
|
|
|
1248 |
|
|
//if ( ntuple->run == 1 && ntuple->lumi == 4 && ntuple->event == 3611988 ) {
|
1249 |
|
|
// TString outstring = "Add:";
|
1250 |
|
|
// outstring += TString(Form("%f", TMath::Sqrt(jet.uncorrpx*jet.uncorrpx + jet.uncorrpy*jet.uncorrpy) ));
|
1251 |
|
|
// Info("MET", outstring);
|
1252 |
|
|
//}
|
1253 |
|
|
|
1254 |
|
|
Float_t deltapt = (jet.pt - jet.mc.pt) * factor;
|
1255 |
|
|
ptscale = TMath::Max( Float_t (0.) , (jet.pt + deltapt)/jet.pt );
|
1256 |
|
|
|
1257 |
|
|
metcorpx -= jet.uncorrpx * ptscale;
|
1258 |
|
|
metcorpy -= jet.uncorrpy * ptscale;
|
1259 |
|
|
|
1260 |
|
|
totJERptminus -= ptscale*TMath::Sqrt(jet.uncorrpx*jet.uncorrpx + jet.uncorrpy*jet.uncorrpy);
|
1261 |
|
|
|
1262 |
|
|
//if (ntuple->run == 1 && ntuple->lumi == 4 && ntuple->event == 3611988 ) {
|
1263 |
|
|
// TString outstring = "Subtract:";
|
1264 |
|
|
// outstring += TString(Form("%f", ptscale*TMath::Sqrt(jet.uncorrpx*jet.uncorrpx + jet.uncorrpy*jet.uncorrpy) ));
|
1265 |
|
|
// Info("MET", outstring);
|
1266 |
|
|
//}
|
1267 |
|
|
|
1268 |
|
|
}
|
1269 |
|
|
|
1270 |
|
|
if (jet.pt > 30 && fabs(jet.eta)< 2.4 ) {
|
1271 |
|
|
jet.pt = SF_JEC * ptscale * jet.pt;
|
1272 |
|
|
jet.e = SF_JEC * ptscale * jet.e;
|
1273 |
|
|
}
|
1274 |
algomez |
1.1 |
}
|
1275 |
|
|
|
1276 |
algomez |
1.13 |
if (jet.pt > 30 && fabs(jet.eta)< 2.4 ) tmp_corrjets.push_back( jet );
|
1277 |
|
|
|
1278 |
|
|
} // jets
|
1279 |
algomez |
1.17 |
|
1280 |
|
|
//p4MET.SetPtEtaPhiE( tmpmet + totJERptadd + totJERptminus, tmpeta, tmpphi, tmpmet + totJERptadd + totJERptminus ); //// previous way
|
1281 |
|
|
p4MET.SetPxPyPzE( metcorpx, metcorpy, 0, TMath::Sqrt((metcorpx * metcorpx ) + ( metcorpy * metcorpy)) );
|
1282 |
algomez |
1.13 |
|
1283 |
|
|
|
1284 |
|
|
//if (ntuple->run == 1 && ntuple->lumi == 4 && ntuple->event == 3611988 ) {
|
1285 |
|
|
// TString outstring ="MET after ";
|
1286 |
|
|
// outstring += TString(Form("%f", p4MET.Pt() ));
|
1287 |
|
|
// Info("MET", outstring);
|
1288 |
|
|
// outstring = "tot add = "+TString(Form("%f", totJERptadd))+ " tot minus = "+TString(Form("%f", totJERptminus));
|
1289 |
|
|
// Info("MET", outstring );
|
1290 |
|
|
//}
|
1291 |
algomez |
1.17 |
//
|
1292 |
|
|
if ( p4MET.Et() <= 20.) return kTRUE;
|
1293 |
|
|
cutmap["MET"] += PUweight;
|
1294 |
|
|
if (fVerbose) cout << "pass MET cut" << endl;
|
1295 |
|
|
|
1296 |
|
|
|
1297 |
|
|
//////////////////////////////////////////////
|
1298 |
|
|
////// Jets info
|
1299 |
|
|
/////////////////////////////////////////////
|
1300 |
algomez |
1.13 |
|
1301 |
|
|
jets = tmp_corrjets;
|
1302 |
|
|
sort( jets.begin(), jets.end(), mysortPt );
|
1303 |
|
|
|
1304 |
|
|
for ( size_t ijet=0; ijet < jets.size() ; ++ijet) {
|
1305 |
|
|
|
1306 |
|
|
TopJetEvent jet = jets[ijet];
|
1307 |
|
|
|
1308 |
|
|
bool jetpass = jets.size()>1 && jet.pt > 40. && fabs(jet.eta) < 2.4 && jets[0].pt > 100. && jets[1].pt > 60.;
|
1309 |
|
|
|
1310 |
|
|
if ( jetpass ) {
|
1311 |
algomez |
1.6 |
|
1312 |
algomez |
1.8 |
//if (fVerbose) cout << " jet pt " << SF_JEC*jet.pt << endl;
|
1313 |
algomez |
1.6 |
|
1314 |
algomez |
1.16 |
hjets["pt"]->Fill( jet.pt, PUweight );
|
1315 |
|
|
hjets["eta"]->Fill( jet.eta, PUweight );
|
1316 |
|
|
hjets["phi"]->Fill( jet.phi, PUweight );
|
1317 |
algomez |
1.6 |
|
1318 |
algomez |
1.15 |
TLorentzVector tmpjet, tmpbjetcsvl, tmpbjetcsvm;
|
1319 |
algomez |
1.13 |
tmpjet.SetPtEtaPhiE(jet.pt, jet.eta, jet.phi, jet.e);
|
1320 |
algomez |
1.6 |
p4jets.push_back( tmpjet);
|
1321 |
|
|
listflavor.push_back( jet.mc.flavor );
|
1322 |
|
|
|
1323 |
|
|
if (fVerbose) {
|
1324 |
|
|
cout << "done storing njets " << njets << endl;
|
1325 |
algomez |
1.15 |
cout << " bdisc " << jet.btag_TCHP << endl;
|
1326 |
algomez |
1.6 |
cout << " bdisc " << jet.btag_CSV << endl;
|
1327 |
|
|
}
|
1328 |
|
|
|
1329 |
algomez |
1.7 |
// store discriminators
|
1330 |
algomez |
1.16 |
bdisc["TCHP"].push_back( jet.btag_TCHP );
|
1331 |
algomez |
1.6 |
bdisc["CSV"].push_back( jet.btag_CSV );
|
1332 |
|
|
if (fVerbose) cout << "store bdisc" << endl;
|
1333 |
algomez |
1.15 |
if ( jet.btag_TCHP > 1.93 ) isTagb["TCHPM"].push_back(true);
|
1334 |
|
|
else isTagb["TCHPM"].push_back(false);
|
1335 |
|
|
if (fVerbose) cout << "done tchpl" << endl;
|
1336 |
|
|
if ( jet.btag_CSV > 0.679){
|
1337 |
|
|
isTagb["CSVM"].push_back(true);
|
1338 |
algomez |
1.16 |
tmpbjetcsvm.SetPtEtaPhiE(jet.pt, jet.eta, jet.phi, jet.e);
|
1339 |
algomez |
1.15 |
p4bjetscsvm.push_back(tmpbjetcsvm);
|
1340 |
|
|
//p4bjetscsvm.push_back(tmpjet);
|
1341 |
|
|
}
|
1342 |
|
|
else isTagb["CSVM"].push_back(false);
|
1343 |
|
|
if ( jet.btag_CSV > 0.679) isTagbUp["CSVM"].push_back(true);
|
1344 |
|
|
else isTagbUp["CSVM"].push_back(false);
|
1345 |
|
|
if ( jet.btag_CSV > 0.679) isTagbDown["CSVM"].push_back(true);
|
1346 |
|
|
else isTagbDown["CSVM"].push_back(false);
|
1347 |
|
|
//CSV Loose Tagger at 0.244
|
1348 |
|
|
if ( jet.btag_CSV > 0.244){
|
1349 |
|
|
isTagb["CSVL"].push_back(true);
|
1350 |
|
|
tmpbjetcsvl.SetPtEtaPhiE(jet.pt, jet.eta, jet.phi, jet.e);
|
1351 |
|
|
p4bjetscsvl.push_back(tmpbjetcsvl);
|
1352 |
|
|
}
|
1353 |
|
|
else isTagb["CSVL"].push_back(false);
|
1354 |
|
|
if ( jet.btag_CSV > 0.244) isTagbUp["CSVL"].push_back(true);
|
1355 |
|
|
else isTagbUp["CSVL"].push_back(false);
|
1356 |
|
|
if ( jet.btag_CSV > 0.244) isTagbDown["CSVL"].push_back(true);
|
1357 |
|
|
else isTagbDown["CSVL"].push_back(false);
|
1358 |
|
|
//CSV Tight Tagger at 0.898
|
1359 |
|
|
if ( jet.btag_CSV > 0.898) isTagb["CSVT"].push_back(true);
|
1360 |
|
|
else isTagb["CSVT"].push_back(false);
|
1361 |
|
|
if ( jet.btag_CSV > 0.898) isTagbUp["CSVT"].push_back(true);
|
1362 |
|
|
else isTagbUp["CSVT"].push_back(false);
|
1363 |
|
|
if ( jet.btag_CSV > 0.898) isTagbDown["CSVT"].push_back(true);
|
1364 |
|
|
else isTagbDown["CSVT"].push_back(false);
|
1365 |
|
|
|
1366 |
algomez |
1.11 |
if (fVerbose) cout << "done csv" << endl;
|
1367 |
algomez |
1.7 |
|
1368 |
algomez |
1.6 |
njets++;
|
1369 |
|
|
}
|
1370 |
|
|
}
|
1371 |
algomez |
1.1 |
|
1372 |
algomez |
1.16 |
|
1373 |
algomez |
1.13 |
/////////////////////////////////
|
1374 |
algomez |
1.17 |
// estimate Pz of neutrino
|
1375 |
algomez |
1.13 |
////////////////////////////////
|
1376 |
|
|
|
1377 |
|
|
fzCalculator.SetMET(p4MET);
|
1378 |
|
|
fzCalculator.SetLepton(p4lepton);
|
1379 |
|
|
|
1380 |
|
|
double pzNu = fzCalculator.Calculate();
|
1381 |
|
|
double pzOtherNu = fzCalculator.getOther();
|
1382 |
algomez |
1.17 |
p4Nu.SetPxPyPzE(p4MET.Px(), p4MET.Py(), pzNu, sqrt(p4MET.Px()*p4MET.Px()+p4MET.Py()*p4MET.Py()+pzNu*pzNu));
|
1383 |
|
|
p4OtherNu.SetPxPyPzE( p4MET.Px(), p4MET.Py(),pzOtherNu,sqrt(p4MET.Px()*p4MET.Px()+p4MET.Py()*p4MET.Py()+pzOtherNu*pzOtherNu));
|
1384 |
|
|
|
1385 |
algomez |
1.13 |
if (fabs(pzNu) > fabs(pzOtherNu) ) {
|
1386 |
|
|
double tmppzNu = pzNu;
|
1387 |
|
|
double tmppzOtherNu = pzOtherNu;
|
1388 |
|
|
pzNu = tmppzOtherNu;
|
1389 |
|
|
pzOtherNu = tmppzNu;
|
1390 |
|
|
}
|
1391 |
|
|
|
1392 |
algomez |
1.17 |
//p4Nu = TLorentzVector();
|
1393 |
|
|
//p4OtherNu = TLorentzVector();
|
1394 |
algomez |
1.13 |
|
1395 |
|
|
|
1396 |
|
|
//double WmassNoPt = (p4Nu+p4lepton).M();
|
1397 |
|
|
|
1398 |
|
|
if ( fzCalculator.IsComplex() ) {
|
1399 |
|
|
double ptNu1 = fzCalculator.getPtneutrino(1);
|
1400 |
|
|
double ptNu2 = fzCalculator.getPtneutrino(2);
|
1401 |
|
|
TLorentzVector p4Nu1tmp;
|
1402 |
|
|
TLorentzVector p4Nu2tmp;
|
1403 |
|
|
|
1404 |
|
|
p4Nu1tmp.SetPxPyPzE( ptNu1*p4MET.Px()/p4MET.Pt(), ptNu1*p4MET.Py()/p4MET.Pt(), pzNu, sqrt(ptNu1*ptNu1+pzNu*pzNu));
|
1405 |
|
|
p4Nu2tmp.SetPxPyPzE( ptNu2*p4MET.Px()/p4MET.Pt(), ptNu2*p4MET.Py()/p4MET.Pt(), pzNu, sqrt(ptNu2*ptNu2+pzNu*pzNu));
|
1406 |
|
|
|
1407 |
|
|
TLorentzVector Wtmp;
|
1408 |
|
|
Wtmp = p4lepton + p4Nu1tmp;
|
1409 |
|
|
double Wm1 = 0;
|
1410 |
|
|
double Wm2 = 0;
|
1411 |
|
|
Wm1 = Wtmp.M();
|
1412 |
|
|
Wtmp = p4lepton + p4Nu2tmp;
|
1413 |
|
|
Wm2 = Wtmp.M();
|
1414 |
|
|
if ( fabs( Wm1 - 80.4) < fabs( Wm2 - 80.4) ) p4Nu = p4Nu1tmp;
|
1415 |
|
|
else p4Nu = p4Nu2tmp;
|
1416 |
|
|
|
1417 |
|
|
p4OtherNu = p4Nu; // since we chose the real part, the two solutions are the same.
|
1418 |
|
|
}
|
1419 |
|
|
|
1420 |
|
|
|
1421 |
|
|
hMET["PzNu"]->Fill(pzNu, PUweight ); //change this to 2d with two sol and as a function of jets
|
1422 |
algomez |
1.17 |
|
1423 |
|
|
TLorentzVector nup4[2];
|
1424 |
|
|
nup4[0] = p4Nu;
|
1425 |
|
|
nup4[1] = p4OtherNu;
|
1426 |
algomez |
1.13 |
|
1427 |
|
|
|
1428 |
algomez |
1.17 |
//if ( fzCalculator.IsComplex() ) hM["lepW_massComplex"]->Fill( p4LepW.M(), PUweight );
|
1429 |
|
|
|
1430 |
|
|
///////////////////////////////////////
|
1431 |
|
|
// SOME VARIABLES
|
1432 |
|
|
///////////////////////////////////////
|
1433 |
algomez |
1.13 |
|
1434 |
algomez |
1.16 |
double Ht = 0;
|
1435 |
|
|
double Stlep = 0;
|
1436 |
|
|
double Stjet = 0;
|
1437 |
|
|
double Slep = 0;
|
1438 |
|
|
double deltaRminjj = 999.;
|
1439 |
|
|
double deltaRjj = 999.;
|
1440 |
|
|
double deltaRmu2j = 999.;
|
1441 |
|
|
double deltaPhijj = 0.;
|
1442 |
|
|
double deltaPhimu2j = 0.;
|
1443 |
algomez |
1.13 |
|
1444 |
algomez |
1.16 |
for (size_t mm=0; mm < p4Othermuon.size(); ++mm){
|
1445 |
|
|
Slep += p4Othermuon[mm].Pt();
|
1446 |
|
|
for ( size_t kkk=0; kkk < p4jets.size(); ++kkk) {
|
1447 |
|
|
deltaRmu2j = p4Othermuon[0].DeltaR(p4jets[1]);
|
1448 |
|
|
deltaPhimu2j = p4Othermuon[0].DeltaPhi(p4jets[1]);
|
1449 |
|
|
}
|
1450 |
|
|
}
|
1451 |
algomez |
1.1 |
|
1452 |
algomez |
1.16 |
for ( size_t kkk=0; kkk < p4jets.size(); ++kkk) {
|
1453 |
|
|
// Ht calculation
|
1454 |
|
|
Ht += p4jets[kkk].Pt();
|
1455 |
|
|
|
1456 |
|
|
// deltaR(jet,jet)
|
1457 |
|
|
for ( vector< TopJetEvent>::iterator ijet=jets.begin(); ijet != jets.end(); ++ijet) {
|
1458 |
|
|
|
1459 |
|
|
TopJetEvent jet = *ijet;
|
1460 |
|
|
TLorentzVector tmpp4Jet;
|
1461 |
|
|
tmpp4Jet.SetPtEtaPhiE(jet.pt, jet.eta, jet.phi, jet.e );
|
1462 |
|
|
double tmpdeltaR = p4jets[kkk].DeltaR(tmpp4Jet);
|
1463 |
|
|
if ( tmpdeltaR < 0.3 ) continue;
|
1464 |
|
|
if ( tmpdeltaR < deltaRminjj ) deltaRminjj = tmpdeltaR;
|
1465 |
|
|
}
|
1466 |
algomez |
1.17 |
deltaRjj = p4jets[0].DeltaR(p4jets[1]);
|
1467 |
|
|
deltaPhijj = p4jets[0].DeltaPhi(p4jets[1]);
|
1468 |
algomez |
1.1 |
|
1469 |
algomez |
1.16 |
}
|
1470 |
algomez |
1.1 |
|
1471 |
algomez |
1.16 |
// St Calculation
|
1472 |
|
|
Stlep = p4MET.Pt() + Slep ;
|
1473 |
|
|
Stjet = Stlep + Ht ;
|
1474 |
algomez |
1.1 |
|
1475 |
algomez |
1.16 |
// calculate dijet mass closest to W mass
|
1476 |
|
|
|
1477 |
|
|
double dileadjet_mass = 0;
|
1478 |
algomez |
1.17 |
double hadW_mass = 0;
|
1479 |
algomez |
1.18 |
double hadW_pt = 0;
|
1480 |
algomez |
1.16 |
double Htop_mass = 0;
|
1481 |
algomez |
1.18 |
double Htop_pt = 0;
|
1482 |
|
|
//double secondHtop_mass = 0;
|
1483 |
|
|
//double secondHtop_pt = 0;
|
1484 |
|
|
//double secondhadW_mass = 0;
|
1485 |
|
|
//double secondhadW_pt = 0;
|
1486 |
algomez |
1.17 |
double Leptop_mass = 0;
|
1487 |
|
|
double Leptop_pt = 0;
|
1488 |
|
|
double diWdeltaphi =0;
|
1489 |
|
|
double diWdeltaR =0;
|
1490 |
algomez |
1.16 |
double DeltaPhiMETWlep = 0;
|
1491 |
|
|
double DeltaPhiMETlep = 0;
|
1492 |
|
|
double DeltaPhiNulep = 0;
|
1493 |
algomez |
1.18 |
double sigma2 = 103.6; //10.5*10.5;
|
1494 |
|
|
double Whad = 82.7;
|
1495 |
|
|
double sigma2top = 302.4; //19.2 * 19.2;
|
1496 |
|
|
double Thad = 171.6;
|
1497 |
|
|
double lepsigma2 = 295.4; // 24.2*24.2;
|
1498 |
|
|
double TLep = 169.7;
|
1499 |
|
|
double bestchi2 = 999999999.;
|
1500 |
algomez |
1.16 |
double tmpchi2 = 999999999.;
|
1501 |
algomez |
1.18 |
double tmpfirstchi2 = 999999999.;
|
1502 |
|
|
double tmpsecondwchi2 = 999999999.;
|
1503 |
algomez |
1.17 |
double lepW_pt = 0;
|
1504 |
|
|
double lepW_mass = 0;
|
1505 |
algomez |
1.18 |
TLorentzVector p4dileadjet, p4HadW, p4HadTop, p4secondHadW, p4secondHadTop, p4LepW, p4Leptop;
|
1506 |
algomez |
1.8 |
|
1507 |
algomez |
1.17 |
//////////////////////////////////
|
1508 |
algomez |
1.16 |
// Btagging
|
1509 |
algomez |
1.17 |
/////////////////////////////////
|
1510 |
algomez |
1.16 |
|
1511 |
algomez |
1.15 |
Double_t SFb0only = 1.0;
|
1512 |
|
|
Double_t SFb1only = 1.0;
|
1513 |
|
|
Double_t SFb_2btag = 1.0;// weight factor
|
1514 |
|
|
Double_t SFb_1btag = 1.0; // at least one btag TCHPM jet
|
1515 |
|
|
Double_t SFb_only1tag_syst[2] = {1.0,1.0};
|
1516 |
|
|
Double_t SFb_1tag_syst[2] = {1.0,1.0};
|
1517 |
|
|
Double_t SFb_2tag_syst[2] = {1.0,1.0};
|
1518 |
|
|
//For Btag Systematic error
|
1519 |
|
|
Int_t NbtagsUp_CSVM = 0;
|
1520 |
|
|
Int_t NbtagsDown_CSVM = 0;
|
1521 |
|
|
Int_t Nbtags_CSVM = 0;
|
1522 |
|
|
Int_t myNbtags_CSVM = 0;
|
1523 |
|
|
Int_t NbtagsUp_CSVL = 0;
|
1524 |
|
|
Int_t NbtagsDown_CSVL = 0;
|
1525 |
|
|
Int_t Nbtags_CSVL = 0;
|
1526 |
|
|
Int_t NbtagsUp_CSVT = 0;
|
1527 |
|
|
Int_t NbtagsDown_CSVT = 0;
|
1528 |
|
|
Int_t Nbtags_CSVT = 0;
|
1529 |
|
|
|
1530 |
|
|
// count partons
|
1531 |
|
|
Int_t number_of_b = 0;
|
1532 |
|
|
Int_t number_of_c = 0;
|
1533 |
|
|
//Int_t number_of_l = 0;
|
1534 |
|
|
Int_t number_of_b_highpt = 0;
|
1535 |
|
|
Int_t number_of_c_highpt = 0;
|
1536 |
|
|
|
1537 |
|
|
Int_t number_of_b_all = 0;
|
1538 |
|
|
Int_t number_of_c_all = 0;
|
1539 |
|
|
|
1540 |
algomez |
1.18 |
if ( njets < 4 ) return kTRUE;
|
1541 |
|
|
if ( njets > 3) {
|
1542 |
|
|
|
1543 |
|
|
cutmap["4Jet"] += PUweight;
|
1544 |
|
|
if(fIsMC)
|
1545 |
|
|
{
|
1546 |
|
|
|
1547 |
|
|
//use the new Btag method
|
1548 |
|
|
for(size_t kk = 0; kk < p4jets.size(); ++kk)
|
1549 |
|
|
{
|
1550 |
|
|
|
1551 |
|
|
//The official Twiki of Btag Efficiency and Scale factor: https://twiki.cern.ch/twiki/bin/viewauth/CMS/BtagPOG
|
1552 |
|
|
//For the CSV Btag efficiency: x is the CSV btag discriminator
|
1553 |
|
|
//effb = -1.73338329789*x*x*x*x + 1.26161794785*x*x*x + 0.784721653518*x*x + -1.03328577451*x + 1.04305075822
|
1554 |
|
|
//effc = -1.5734604211*x*x*x*x + 1.52798999269*x*x*x + 0.866697059943*x*x + -1.66657942274*x + 0.780639301724
|
1555 |
|
|
//Tight Tagger has been Commented
|
1556 |
|
|
|
1557 |
|
|
//For the Mediem
|
1558 |
|
|
float b_data_eff = 0.730;
|
1559 |
|
|
float c_data_eff = 0.192;
|
1560 |
|
|
|
1561 |
|
|
//For the Loose
|
1562 |
|
|
float b_data_eff_loose = 0.850;
|
1563 |
|
|
float c_data_eff_loose = 0.442;
|
1564 |
|
|
|
1565 |
|
|
//For the tight
|
1566 |
|
|
float b_data_eff_tight = 0.534;
|
1567 |
|
|
float c_data_eff_tight = 0.0663;
|
1568 |
|
|
|
1569 |
|
|
//Medium
|
1570 |
|
|
float b_SF = bSF_table.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1571 |
|
|
float c_SF = b_SF;
|
1572 |
|
|
float b_SF_error = bSF_table_error.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1573 |
|
|
float c_SF_error = b_SF_error;
|
1574 |
|
|
float l_SF = lSF_table.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1575 |
|
|
float l_SF_up = lSF_table_error_up.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1576 |
|
|
float l_SF_down = lSF_table_error_down.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1577 |
|
|
float l_data_eff = leff_table.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1578 |
|
|
|
1579 |
|
|
//Loose
|
1580 |
|
|
float b_SF_loose = bSF_table_loose.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1581 |
|
|
float c_SF_loose = b_SF_loose;
|
1582 |
|
|
float b_SF_loose_error = bSF_table_error_loose.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1583 |
|
|
float c_SF_loose_error = b_SF_loose_error;
|
1584 |
|
|
float l_SF_loose = lSF_table_loose.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1585 |
|
|
float l_SF_up_loose = lSF_table_error_up_loose.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1586 |
|
|
float l_SF_down_loose = lSF_table_error_down_loose.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1587 |
|
|
float l_data_eff_loose = leff_table_loose.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1588 |
|
|
|
1589 |
|
|
//Tight
|
1590 |
|
|
float b_SF_tight = bSF_table_tight.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1591 |
|
|
float c_SF_tight = b_SF_tight;
|
1592 |
|
|
float b_SF_tight_error = bSF_table_error_tight.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1593 |
|
|
float c_SF_tight_error = b_SF_tight_error;
|
1594 |
|
|
float l_SF_tight = lSF_table_tight.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1595 |
|
|
float l_SF_up_tight = lSF_table_error_up_tight.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1596 |
|
|
float l_SF_down_tight = lSF_table_error_down_tight.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1597 |
|
|
float l_data_eff_tight = leff_table_tight.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1598 |
|
|
|
1599 |
|
|
//#####################Fast Sim Btag correction factor################################
|
1600 |
|
|
//Medium
|
1601 |
|
|
float b_CF = bCF_table.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1602 |
|
|
float b_CF_error = bCF_table_error.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1603 |
|
|
float c_CF = cCF_table.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1604 |
|
|
float c_CF_error = cCF_table_error.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1605 |
|
|
float l_CF = leff_CF_table.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1606 |
|
|
float l_CF_error = lCF_table_error.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1607 |
|
|
|
1608 |
|
|
//Loose
|
1609 |
|
|
/*float b_CF_loose = bCF_table_loose.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1610 |
|
|
float b_CF_error_loose = bCF_table_error_loose.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1611 |
|
|
float c_CF_loose = cCF_table_loose.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1612 |
|
|
float c_CF_error_loose = cCF_table_error_loose.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1613 |
|
|
float l_CF_loose = lCF_table_error_loose.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1614 |
|
|
float l_CF_error_loose = leff_CF_table_loose.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1615 |
|
|
*/
|
1616 |
|
|
|
1617 |
|
|
//Tight
|
1618 |
|
|
float b_CF_tight = bCF_table_tight.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1619 |
|
|
float b_CF_error_tight = bCF_table_error_tight.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1620 |
|
|
float c_CF_tight = cCF_table_tight.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1621 |
|
|
float c_CF_error_tight = cCF_table_error_tight.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1622 |
|
|
float l_CF_tight = lCF_table_error_tight.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1623 |
|
|
float l_CF_error_tight = leff_CF_table_tight.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1624 |
|
|
|
1625 |
|
|
Double_t ptmax = 670.;
|
1626 |
|
|
Double_t times = 2.0;
|
1627 |
|
|
|
1628 |
|
|
//Fast Sim Btag correction factor
|
1629 |
|
|
if(fIsMC && fSample.Contains("tttt") && !fSample.Contains("SM") && (p4jets[kk].Pt() <= ptmax))
|
1630 |
|
|
{
|
1631 |
|
|
//Medium
|
1632 |
|
|
b_SF = b_SF * b_CF;
|
1633 |
|
|
c_SF = c_SF * c_CF;
|
1634 |
|
|
l_SF = l_SF * l_CF;
|
1635 |
|
|
|
1636 |
|
|
//Correction Factor is relative uncertainty
|
1637 |
|
|
b_CF_error = b_CF_error * b_CF;
|
1638 |
|
|
c_CF_error = c_CF_error * c_CF;
|
1639 |
|
|
l_CF_error = l_CF_error * l_CF;
|
1640 |
|
|
|
1641 |
|
|
//Tight
|
1642 |
|
|
b_SF_tight = b_SF_tight * b_CF_tight;
|
1643 |
|
|
c_SF_tight = c_SF_tight * c_CF_tight;
|
1644 |
|
|
l_SF_tight = l_SF_tight * l_CF_tight;
|
1645 |
|
|
|
1646 |
|
|
b_CF_error_tight = b_CF_error_tight * b_CF_tight;
|
1647 |
|
|
c_CF_error_tight = c_CF_error_tight * c_CF_tight;
|
1648 |
|
|
l_CF_error_tight = l_CF_error_tight * l_CF_tight;
|
1649 |
|
|
|
1650 |
|
|
//Medium Error
|
1651 |
|
|
b_SF_error = TMath::Sqrt(TMath::Power(b_SF_error,2) + TMath::Power(b_CF_error,2));
|
1652 |
|
|
c_SF_error = TMath::Sqrt(TMath::Power(c_SF_error,2) + TMath::Power(c_CF_error,2));
|
1653 |
|
|
l_SF_up = l_SF + TMath::Sqrt(TMath::Power((l_SF_up - l_SF),2) + TMath::Power(l_CF_error,2));
|
1654 |
|
|
l_SF_down = l_SF - TMath::Sqrt(TMath::Power((l_SF - l_SF_down),2) + TMath::Power(l_CF_error,2));
|
1655 |
|
|
|
1656 |
|
|
//Tight Error
|
1657 |
|
|
b_SF_tight_error = TMath::Sqrt(TMath::Power(b_SF_tight_error,2) + TMath::Power(b_CF_error_tight,2));
|
1658 |
|
|
c_SF_tight_error = TMath::Sqrt(TMath::Power(c_SF_tight_error,2) + TMath::Power(c_CF_error_tight,2));
|
1659 |
|
|
l_SF_up_tight = l_SF_tight + TMath::Sqrt(TMath::Power((l_SF_up_tight - l_SF_tight),2) + TMath::Power(l_CF_error_tight,2));
|
1660 |
|
|
l_SF_down_tight = l_SF_tight - TMath::Sqrt(TMath::Power((l_SF_tight - l_SF_down_tight),2) + TMath::Power(l_CF_error_tight,2));
|
1661 |
|
|
}
|
1662 |
|
|
|
1663 |
|
|
if(p4jets[kk].Pt() > ptmax)
|
1664 |
|
|
{
|
1665 |
|
|
//btag scale factor error > Ptmax, two times uncerntainty, This has been considered into the Txt Files
|
1666 |
|
|
//b_SF_error = times * b_SF_error;
|
1667 |
|
|
//b_SF_loose_error = times * b_SF_loose_error;
|
1668 |
|
|
//b_SF_tight_error = times * b_SF_tight_error;
|
1669 |
|
|
|
1670 |
|
|
if(fIsMC && fSample.Contains("tttt")&& !fSample.Contains("SM"))
|
1671 |
|
|
{
|
1672 |
|
|
//Medium
|
1673 |
|
|
b_SF = b_SF * b_CF;
|
1674 |
|
|
c_SF = c_SF * c_CF;
|
1675 |
|
|
l_SF = l_SF * l_CF;
|
1676 |
|
|
|
1677 |
|
|
//Correction Factor is relative uncertainty
|
1678 |
|
|
b_CF_error = b_CF_error * b_CF;
|
1679 |
|
|
c_CF_error = c_CF_error * c_CF;
|
1680 |
|
|
l_CF_error = l_CF_error * l_CF;
|
1681 |
|
|
|
1682 |
|
|
//Tight
|
1683 |
|
|
b_SF_tight = b_SF_tight * b_CF_tight;
|
1684 |
|
|
c_SF_tight = c_SF_tight * c_CF_tight;
|
1685 |
|
|
l_SF_tight = l_SF_tight * l_CF_tight;
|
1686 |
|
|
|
1687 |
|
|
b_CF_error_tight = b_CF_error_tight * b_CF_tight;
|
1688 |
|
|
c_CF_error_tight = c_CF_error_tight * c_CF_tight;
|
1689 |
|
|
l_CF_error_tight = l_CF_error_tight * l_CF_tight;
|
1690 |
|
|
|
1691 |
|
|
//Medium Error
|
1692 |
|
|
b_SF_error = TMath::Sqrt(TMath::Power(b_SF_error,2) + TMath::Power(b_CF_error,2));
|
1693 |
|
|
c_SF_error = TMath::Sqrt(TMath::Power(c_SF_error,2) + TMath::Power(c_CF_error,2));
|
1694 |
|
|
l_SF_up = l_SF + TMath::Sqrt(TMath::Power((l_SF_up - l_SF),2) + TMath::Power(l_CF_error,2));
|
1695 |
|
|
l_SF_down = l_SF - TMath::Sqrt(TMath::Power((l_SF - l_SF_down),2) + TMath::Power(l_CF_error,2));
|
1696 |
|
|
|
1697 |
|
|
//Tight Error
|
1698 |
|
|
b_SF_tight_error = TMath::Sqrt(TMath::Power(b_SF_tight_error,2) + TMath::Power(b_CF_error_tight,2));
|
1699 |
|
|
c_SF_tight_error = TMath::Sqrt(TMath::Power(c_SF_tight_error,2) + TMath::Power(c_CF_error_tight,2));
|
1700 |
|
|
l_SF_up_tight = l_SF_tight + TMath::Sqrt(TMath::Power((l_SF_up_tight - l_SF_tight),2) + TMath::Power(l_CF_error_tight,2));
|
1701 |
|
|
l_SF_down_tight = l_SF_tight - TMath::Sqrt(TMath::Power((l_SF_tight - l_SF_down_tight),2) + TMath::Power(l_CF_error_tight,2));
|
1702 |
|
|
|
1703 |
|
|
}
|
1704 |
|
|
|
1705 |
|
|
//mistag scale factor error
|
1706 |
|
|
l_SF_up = l_SF + times * (l_SF_up - l_SF);
|
1707 |
|
|
l_SF_down = l_SF - times * (l_SF - l_SF_down);
|
1708 |
|
|
|
1709 |
|
|
//Loose
|
1710 |
|
|
l_SF_up_loose = l_SF_loose + times * (l_SF_up_loose - l_SF_loose);
|
1711 |
|
|
l_SF_down_loose = l_SF_loose - times * (l_SF_loose - l_SF_down_loose);
|
1712 |
|
|
|
1713 |
|
|
//Tight
|
1714 |
|
|
l_SF_up_tight = l_SF_tight + times * (l_SF_up_tight - l_SF_tight);
|
1715 |
|
|
l_SF_down_tight = l_SF_tight - times * (l_SF_tight - l_SF_down_tight);
|
1716 |
|
|
}
|
1717 |
|
|
|
1718 |
|
|
/*
|
1719 |
|
|
//From the twiki: https://twiki.cern.ch/twiki/pub/CMS/BtagPOG/SFb-mujet_payload.txt
|
1720 |
|
|
|
1721 |
|
|
float b_SF = bSF_table_medium.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSVMedium");
|
1722 |
|
|
float b_SF_error = bSF_table_medium.GetError(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1723 |
|
|
|
1724 |
|
|
float b_SF_loose = bSF_table_loose.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSVLoose");
|
1725 |
|
|
float b_SF_loose_error = bSF_table_loose.GetError(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));;
|
1726 |
|
|
|
1727 |
|
|
|
1728 |
|
|
float b_SF_tight = bSF_table_tight.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSVTight");
|
1729 |
|
|
float b_SF_tight_error = bSF_table_tight.GetError(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));;
|
1730 |
|
|
|
1731 |
|
|
//for Mediem tagger
|
1732 |
|
|
float l_SF = leff_SF_table_medium.GetLightSFValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","M");
|
1733 |
|
|
float l_SF_up = leff_SF_table_medium.GetLightSFError(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","M","Up");
|
1734 |
|
|
float l_SF_down = leff_SF_table_medium.GetLightSFError(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","M","Down");
|
1735 |
|
|
float l_data_eff = leff_SF_table_medium.GetMistagValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","M");
|
1736 |
|
|
|
1737 |
|
|
//for Loose tagger
|
1738 |
|
|
float l_SF_loose = leff_SF_table_loose.GetLightSFValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","L");
|
1739 |
|
|
float l_SF_up_loose = leff_SF_table_loose.GetLightSFError(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","L","Up");
|
1740 |
|
|
float l_SF_down_loose = leff_SF_table_loose.GetLightSFError(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","L","Down");
|
1741 |
|
|
float l_data_eff_loose = leff_SF_table_loose.GetMistagValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","L");
|
1742 |
|
|
|
1743 |
|
|
|
1744 |
|
|
//for Tight tagger
|
1745 |
|
|
float l_SF_tight = leff_SF_table_tight.GetLightSFValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","T");
|
1746 |
|
|
float l_SF_up_tight = leff_SF_table_tight.GetLightSFError(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","T","Up");
|
1747 |
|
|
float l_SF_down_tight = leff_SF_table_tight.GetLightSFError(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","T","Down");
|
1748 |
|
|
float l_data_eff_tight = leff_SF_table_tight.GetMistagValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","T");
|
1749 |
|
|
*/
|
1750 |
|
|
|
1751 |
|
|
double seed = abs(static_cast<int>(sin(p4jets[kk].Phi()*1000000)*100000));
|
1752 |
|
|
BTagSFUtil btsfutil = BTagSFUtil( seed );
|
1753 |
|
|
|
1754 |
|
|
//b jet
|
1755 |
|
|
if ( fIsMC && abs(listflavor[kk])==5 ){
|
1756 |
|
|
|
1757 |
|
|
//Medium
|
1758 |
|
|
bool tmp_IsTag = isTagb["CSVM"][kk];
|
1759 |
|
|
isTagb["CSVM"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag, abs(listflavor[kk]), b_SF, b_data_eff, l_SF, l_data_eff);
|
1760 |
|
|
|
1761 |
|
|
//Loose
|
1762 |
|
|
bool tmp_IsTag_loose = isTagb["CSVL"][kk];
|
1763 |
|
|
isTagb["CSVL"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_loose, abs(listflavor[kk]), b_SF_loose, b_data_eff_loose, l_SF, l_data_eff);
|
1764 |
|
|
|
1765 |
|
|
|
1766 |
|
|
//Tight
|
1767 |
|
|
bool tmp_IsTag_tight = isTagb["CSVT"][kk];
|
1768 |
|
|
isTagb["CSVT"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_tight, abs(listflavor[kk]), b_SF_tight, b_data_eff_tight, l_SF, l_data_eff);
|
1769 |
|
|
|
1770 |
|
|
|
1771 |
|
|
//the uncerntainty has been considered when getting the value
|
1772 |
|
|
tmp_IsTag = isTagbUp["CSVM"][kk];
|
1773 |
|
|
isTagbUp["CSVM"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag , abs(listflavor[kk]), b_SF + b_SF_error, b_data_eff, l_SF, l_data_eff);
|
1774 |
|
|
tmp_IsTag = isTagbDown["CSVM"][kk];
|
1775 |
|
|
isTagbDown["CSVM"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag , abs(listflavor[kk]), b_SF - b_SF_error, b_data_eff, l_SF, l_data_eff);
|
1776 |
|
|
|
1777 |
|
|
tmp_IsTag_loose = isTagbUp["CSVL"][kk];
|
1778 |
|
|
isTagbUp["CSVL"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_loose, abs(listflavor[kk]), b_SF_loose + b_SF_loose_error, b_data_eff_loose, l_SF, l_data_eff);
|
1779 |
|
|
tmp_IsTag_loose = isTagbDown["CSVL"][kk];
|
1780 |
|
|
isTagbDown["CSVL"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_loose, abs(listflavor[kk]), b_SF_loose - b_SF_loose_error, b_data_eff_loose, l_SF, l_data_eff);
|
1781 |
|
|
|
1782 |
|
|
|
1783 |
|
|
tmp_IsTag_tight = isTagbUp["CSVT"][kk];
|
1784 |
|
|
isTagbUp["CSVT"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_tight, abs(listflavor[kk]), b_SF_tight + b_SF_tight_error, b_data_eff_tight, l_SF, l_data_eff);
|
1785 |
|
|
tmp_IsTag_tight = isTagbDown["CSVT"][kk];
|
1786 |
|
|
isTagbDown["CSVT"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_tight, abs(listflavor[kk]), b_SF_tight - b_SF_tight_error, b_data_eff_tight, l_SF, l_data_eff);
|
1787 |
|
|
|
1788 |
|
|
}
|
1789 |
|
|
|
1790 |
|
|
if ( fIsMC && abs(listflavor[kk])==4 ) {
|
1791 |
|
|
|
1792 |
|
|
bool tmp_IsTag = isTagb["CSVM"][kk];
|
1793 |
|
|
isTagb["CSVM"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag, abs(listflavor[kk]), c_SF, c_data_eff,l_SF, l_data_eff );
|
1794 |
|
|
|
1795 |
|
|
//For the Loose
|
1796 |
|
|
bool tmp_IsTag_loose = isTagb["CSVL"][kk];
|
1797 |
|
|
isTagb["CSVL"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_loose, abs(listflavor[kk]), c_SF_loose, c_data_eff_loose,l_SF, l_data_eff );
|
1798 |
|
|
|
1799 |
|
|
//For the Tight
|
1800 |
|
|
bool tmp_IsTag_tight = isTagb["CSVT"][kk];
|
1801 |
|
|
isTagb["CSVT"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_tight, abs(listflavor[kk]), c_SF_tight, c_data_eff_tight,l_SF, l_data_eff );
|
1802 |
|
|
|
1803 |
|
|
|
1804 |
|
|
//use uncerntainty on the cjet, two times of B btag error
|
1805 |
|
|
tmp_IsTag = isTagbUp["CSVM"][kk];
|
1806 |
|
|
isTagbUp["CSVM"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag, abs(listflavor[kk]), c_SF + 2.0 * c_SF_error , c_data_eff, l_SF, l_data_eff);
|
1807 |
|
|
tmp_IsTag = isTagbDown["CSVM"][kk];
|
1808 |
|
|
isTagbDown["CSVM"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag, abs(listflavor[kk]), c_SF - 2.0 * c_SF_error, c_data_eff, l_SF, l_data_eff);
|
1809 |
|
|
|
1810 |
|
|
//use uncerntainty on the cjet
|
1811 |
|
|
tmp_IsTag_loose = isTagbUp["CSVL"][kk];
|
1812 |
|
|
isTagbUp["CSVL"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_loose, abs(listflavor[kk]), c_SF_loose + 2.0 * c_SF_loose_error, c_data_eff_loose, l_SF, l_data_eff);
|
1813 |
|
|
tmp_IsTag_loose = isTagbDown["CSVL"][kk];
|
1814 |
|
|
isTagbDown["CSVL"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_loose, abs(listflavor[kk]), c_SF_loose - 2.0 * c_SF_loose_error, c_data_eff_loose, l_SF, l_data_eff);
|
1815 |
|
|
|
1816 |
|
|
|
1817 |
|
|
//use uncerntainty on the cjet
|
1818 |
|
|
tmp_IsTag_tight = isTagbUp["CSVT"][kk];
|
1819 |
|
|
isTagbUp["CSVT"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_tight, abs(listflavor[kk]), c_SF_tight + 2.0 * c_SF_tight_error, c_data_eff_tight, l_SF, l_data_eff);
|
1820 |
|
|
tmp_IsTag_tight = isTagbDown["CSVT"][kk];
|
1821 |
|
|
isTagbDown["CSVT"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_tight, abs(listflavor[kk]), c_SF_tight - 2.0 * c_SF_tight_error, c_data_eff_tight, l_SF, l_data_eff);
|
1822 |
|
|
|
1823 |
|
|
}
|
1824 |
|
|
|
1825 |
algomez |
1.15 |
|
1826 |
algomez |
1.18 |
if ( fIsMC && (abs(listflavor[kk])==1 || abs(listflavor[kk])==2 || abs(listflavor[kk])==3 || abs(listflavor[kk])==21 )){
|
1827 |
algomez |
1.15 |
|
1828 |
algomez |
1.18 |
bool tmp_IsTag = isTagb["CSVM"][kk];
|
1829 |
|
|
isTagb["CSVM"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag, abs(listflavor[kk]), b_SF, b_data_eff, l_SF, l_data_eff);
|
1830 |
algomez |
1.15 |
|
1831 |
algomez |
1.18 |
//for loose
|
1832 |
|
|
bool tmp_IsTag_loose = isTagb["CSVL"][kk];
|
1833 |
|
|
isTagb["CSVL"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_loose, abs(listflavor[kk]), b_SF_loose, b_data_eff_loose, l_SF_loose, l_data_eff_loose);
|
1834 |
algomez |
1.15 |
|
1835 |
algomez |
1.18 |
//for tight
|
1836 |
|
|
bool tmp_IsTag_tight = isTagb["CSVT"][kk];
|
1837 |
|
|
isTagb["CSVT"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_tight, abs(listflavor[kk]), b_SF_tight, b_data_eff_tight, l_SF_tight, l_data_eff_tight);
|
1838 |
algomez |
1.7 |
|
1839 |
algomez |
1.15 |
|
1840 |
algomez |
1.18 |
tmp_IsTag = isTagbUp["CSVM"][kk];
|
1841 |
|
|
isTagbUp["CSVM"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag, abs(listflavor[kk]), b_SF, b_data_eff, l_SF_up , l_data_eff);
|
1842 |
|
|
tmp_IsTag = isTagbDown["CSVM"][kk];
|
1843 |
|
|
isTagbDown["CSVM"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag, abs(listflavor[kk]), b_SF, b_data_eff, l_SF_down, l_data_eff);
|
1844 |
algomez |
1.15 |
|
1845 |
algomez |
1.18 |
//for Loose
|
1846 |
|
|
tmp_IsTag_loose = isTagbUp["CSVL"][kk];
|
1847 |
|
|
isTagbUp["CSVL"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_loose , abs(listflavor[kk]), b_SF_loose, b_data_eff_loose, l_SF_up_loose, l_data_eff_loose);
|
1848 |
|
|
tmp_IsTag_loose = isTagbDown["CSVL"][kk];
|
1849 |
|
|
isTagbDown["CSVL"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_loose, abs(listflavor[kk]), b_SF_loose, b_data_eff_loose, l_SF_down_loose, l_data_eff_loose);
|
1850 |
algomez |
1.15 |
|
1851 |
|
|
|
1852 |
algomez |
1.18 |
//for tight
|
1853 |
|
|
tmp_IsTag_tight = isTagbUp["CSVT"][kk];
|
1854 |
|
|
isTagbUp["CSVT"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_tight , abs(listflavor[kk]), b_SF_tight, b_data_eff_tight, l_SF_up_tight, l_data_eff_tight);
|
1855 |
|
|
tmp_IsTag_tight = isTagbDown["CSVT"][kk];
|
1856 |
|
|
isTagbDown["CSVT"][kk] = btsfutil.modifyBTagsWithSF( tmp_IsTag_tight, abs(listflavor[kk]), b_SF_tight, b_data_eff_tight, l_SF_down_tight, l_data_eff_tight);
|
1857 |
algomez |
1.15 |
|
1858 |
algomez |
1.18 |
}
|
1859 |
algomez |
1.15 |
|
1860 |
algomez |
1.18 |
}//Loop of Jet
|
1861 |
|
|
}//MC sample
|
1862 |
algomez |
1.15 |
|
1863 |
algomez |
1.18 |
if( fIsMC )
|
1864 |
|
|
{
|
1865 |
|
|
//zero btag
|
1866 |
|
|
BTagWeight b0(0,0); // number of tags 1 to 3
|
1867 |
algomez |
1.15 |
|
1868 |
algomez |
1.18 |
//Using the Pt and Eta dependent Btag efficiency
|
1869 |
|
|
vector<BTagWeight::JetInfo> j;
|
1870 |
|
|
//for systematic Btag
|
1871 |
|
|
vector<BTagWeight::JetInfo> jj;//UP
|
1872 |
|
|
vector<BTagWeight::JetInfo> jk;//DOWN
|
1873 |
|
|
|
1874 |
|
|
//New Recommendtion from the Btag Group
|
1875 |
|
|
for(size_t kk = 0; kk < p4jets.size(); ++kk)
|
1876 |
|
|
{
|
1877 |
|
|
//Still Support for the Medium
|
1878 |
|
|
//For the Mediem
|
1879 |
|
|
float b_data_eff = 0.730;
|
1880 |
|
|
float c_data_eff = 0.192;
|
1881 |
|
|
|
1882 |
|
|
float b_SF1 = bSF_table.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1883 |
|
|
float b_SF_error1 = bSF_table_error.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1884 |
|
|
|
1885 |
|
|
float l_SF1 = lSF_table.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1886 |
|
|
float l_SF_up1 = lSF_table_error_up.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1887 |
|
|
float l_SF_down1 = lSF_table_error_down.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1888 |
|
|
float l_data_eff1 = leff_table.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1889 |
|
|
|
1890 |
|
|
Double_t ptmax = 670.;
|
1891 |
|
|
|
1892 |
|
|
if(p4jets[kk].Pt() > ptmax)
|
1893 |
|
|
{
|
1894 |
|
|
//btag scale factor error > Ptmax, two times uncerntainty
|
1895 |
|
|
b_SF_error1 = 2.0 * b_SF_error1;
|
1896 |
|
|
|
1897 |
|
|
//mistag scale factor error
|
1898 |
|
|
l_SF_up1 = l_SF1 + 2.0 * (l_SF_up1 - l_SF1);
|
1899 |
|
|
l_SF_down1 = l_SF1 - 2.0 * (l_SF1 - l_SF_down1);
|
1900 |
|
|
}
|
1901 |
algomez |
1.15 |
|
1902 |
algomez |
1.18 |
/*//From the twiki: https://twiki.cern.ch/twiki/pub/CMS/BtagPOG/SFb-mujet_payload.txt
|
1903 |
|
|
float b_SF1 = bSF_table_medium.GetValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSVMedium");
|
1904 |
|
|
float b_SF_error1 = bSF_table_medium.GetError(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()));
|
1905 |
|
|
|
1906 |
|
|
//for Mediem tagger
|
1907 |
|
|
float l_SF1 = leff_SF_table_medium.GetLightSFValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","M");
|
1908 |
|
|
float l_SF_up1 = leff_SF_table_medium.GetLightSFError(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","M","Up");
|
1909 |
|
|
float l_SF_down1 = leff_SF_table_medium.GetLightSFError(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","M","Down");
|
1910 |
|
|
float l_data_eff1 = leff_SF_table_medium.GetMistagValue(p4jets[kk].Pt(),fabs(p4jets[kk].Eta()),"CSV","M");
|
1911 |
|
|
*/
|
1912 |
|
|
|
1913 |
|
|
if(abs(listflavor[kk]) == 5)
|
1914 |
|
|
{
|
1915 |
|
|
Double_t tageff = b_data_eff;
|
1916 |
|
|
Double_t b_SF = b_SF1;
|
1917 |
|
|
Double_t b_SF_error = b_SF_error1;
|
1918 |
|
|
|
1919 |
|
|
BTagWeight::JetInfo bjlow(tageff,b_SF);
|
1920 |
|
|
BTagWeight::JetInfo bjlowUP(tageff,b_SF + b_SF_error);
|
1921 |
|
|
BTagWeight::JetInfo bjlowDOWN(tageff,b_SF - b_SF_error);
|
1922 |
|
|
j.push_back(bjlow);
|
1923 |
|
|
jj.push_back(bjlowUP);
|
1924 |
|
|
jk.push_back(bjlowDOWN);
|
1925 |
|
|
}
|
1926 |
algomez |
1.15 |
|
1927 |
algomez |
1.18 |
if(abs(listflavor[kk]) == 4)
|
1928 |
|
|
{
|
1929 |
|
|
Double_t tageff = c_data_eff;
|
1930 |
|
|
Double_t b_SF = b_SF1;
|
1931 |
|
|
Double_t b_SF_error = b_SF_error1;
|
1932 |
|
|
|
1933 |
|
|
BTagWeight::JetInfo cjlow(tageff,b_SF);
|
1934 |
|
|
BTagWeight::JetInfo cjlowUP(tageff,b_SF + 2.0 * b_SF_error);
|
1935 |
|
|
BTagWeight::JetInfo cjlowDOWN(tageff,b_SF - 2.0 * b_SF_error);
|
1936 |
|
|
j.push_back(cjlow);
|
1937 |
|
|
jj.push_back(cjlowUP);
|
1938 |
|
|
jk.push_back(cjlowDOWN);
|
1939 |
|
|
}
|
1940 |
algomez |
1.15 |
|
1941 |
algomez |
1.18 |
if(abs(listflavor[kk]) == 1 || abs(listflavor[kk]) == 2 || abs(listflavor[kk]) == 3 || abs(listflavor[kk]) == 21)
|
1942 |
|
|
{
|
1943 |
|
|
Double_t tageff = l_data_eff1;
|
1944 |
|
|
Double_t l_SF = l_SF1;
|
1945 |
|
|
Double_t l_SF_up = l_SF_up1;
|
1946 |
|
|
Double_t l_SF_down = l_SF_down1;
|
1947 |
|
|
|
1948 |
|
|
BTagWeight::JetInfo lightj(tageff,l_SF);
|
1949 |
|
|
BTagWeight::JetInfo lightjUP(tageff,l_SF_up);
|
1950 |
|
|
BTagWeight::JetInfo lightjDOWN(tageff,l_SF_down);
|
1951 |
|
|
|
1952 |
|
|
j.push_back(lightj);
|
1953 |
|
|
jj.push_back(lightjUP);
|
1954 |
|
|
jk.push_back(lightjDOWN);
|
1955 |
algomez |
1.15 |
|
1956 |
algomez |
1.18 |
}
|
1957 |
|
|
}//LOOP of Jet
|
1958 |
algomez |
1.15 |
|
1959 |
algomez |
1.18 |
//changed from TCHPM to CSVM
|
1960 |
|
|
if(myNbtags_CSVM == 0){
|
1961 |
|
|
SFb0only = b0.weight(j,0);
|
1962 |
|
|
}
|
1963 |
algomez |
1.15 |
|
1964 |
algomez |
1.18 |
if(myNbtags_CSVM == 1){
|
1965 |
|
|
BTagWeight b11(1,1);
|
1966 |
|
|
SFb1only = b11.weight(j,1);
|
1967 |
algomez |
1.15 |
|
1968 |
algomez |
1.18 |
SFb_only1tag_syst[0] = b11.weight(jj,1); //UP
|
1969 |
|
|
SFb_only1tag_syst[1] = b11.weight(jk,1);//DOWN
|
1970 |
|
|
}
|
1971 |
algomez |
1.9 |
|
1972 |
algomez |
1.18 |
if(myNbtags_CSVM >= 1){
|
1973 |
|
|
BTagWeight b1(1,myNbtags_CSVM);
|
1974 |
|
|
SFb_1btag = b1.weight(j,1);
|
1975 |
algomez |
1.15 |
|
1976 |
algomez |
1.18 |
SFb_1tag_syst[0] = b1.weight(jj,1); //UP
|
1977 |
|
|
SFb_1tag_syst[1] = b1.weight(jk,1);//DOWN
|
1978 |
|
|
}
|
1979 |
algomez |
1.15 |
|
1980 |
algomez |
1.18 |
if(myNbtags_CSVM >= 2) {
|
1981 |
|
|
BTagWeight b2(2,myNbtags_CSVM);
|
1982 |
|
|
SFb_2btag = b2.weight(j,2);
|
1983 |
algomez |
1.15 |
|
1984 |
algomez |
1.18 |
SFb_2tag_syst[0] = b2.weight(jj,2); //UP
|
1985 |
|
|
SFb_2tag_syst[1] = b2.weight(jk,2);//DOWN
|
1986 |
|
|
}
|
1987 |
|
|
}//MC sample
|
1988 |
|
|
|
1989 |
|
|
number_of_b_all = number_of_b + number_of_b_highpt;
|
1990 |
|
|
number_of_c_all = number_of_c + number_of_c_highpt;
|
1991 |
algomez |
1.15 |
|
1992 |
algomez |
1.18 |
// count number of b-tags
|
1993 |
|
|
Int_t Nbtags_TCHPM = 0;
|
1994 |
|
|
Int_t Nbtags_SSVHEM = 0;
|
1995 |
algomez |
1.9 |
|
1996 |
algomez |
1.18 |
//This number of btag jet has been applied the scale factor, so be careful!!!!!!!!!!!!!!!!!!
|
1997 |
|
|
for ( size_t itag=0; itag< isTagb["TCHPM"].size(); ++itag )
|
1998 |
|
|
{
|
1999 |
|
|
if ( isTagb["TCHPM"][itag] ) Nbtags_TCHPM++;
|
2000 |
|
|
if ( isTagb["SSVHEM"][itag] ) Nbtags_SSVHEM++;
|
2001 |
|
|
if ( isTagb["CSVM"][itag] ) Nbtags_CSVM++;
|
2002 |
|
|
if ( isTagb["CSVL"][itag] ) Nbtags_CSVL++;
|
2003 |
|
|
if ( isTagb["CSVT"][itag] ) Nbtags_CSVT++;
|
2004 |
|
|
if ( isTagbUp["CSVL"][itag] ) NbtagsUp_CSVL++;
|
2005 |
|
|
if ( isTagbDown["CSVL"][itag] ) NbtagsDown_CSVL++;
|
2006 |
|
|
if ( isTagbUp["CSVT"][itag] ) NbtagsUp_CSVT++;
|
2007 |
|
|
if ( isTagbDown["CSVT"][itag] ) NbtagsDown_CSVT++;
|
2008 |
|
|
if ( isTagbUp["CSVM"][itag] ) NbtagsUp_CSVM++;
|
2009 |
|
|
if ( isTagbDown["CSVM"][itag] ) NbtagsDown_CSVM++;
|
2010 |
algomez |
1.15 |
|
2011 |
algomez |
1.17 |
}///////////////////////////////////////////////////////////////// end btaging
|
2012 |
|
|
|
2013 |
|
|
|
2014 |
|
|
//calculate cloest di jet mass which is the cloest to W mass
|
2015 |
algomez |
1.18 |
Int_t bestjettopindex[3] = {-1,-1,-1};
|
2016 |
|
|
Int_t bestjetindex[2] = {-1, -1}; // best index combination cloest to the Top mass
|
2017 |
|
|
Int_t bestjetsecondWindex[2] = {-1,-1};
|
2018 |
|
|
Int_t bestjettopindex2[3] = {-1,-1,-1};
|
2019 |
|
|
Int_t mymetnum = 2;
|
2020 |
|
|
//Double_t mindeltamass = 100000000.;
|
2021 |
|
|
vector<Double_t> topmasscombination;
|
2022 |
|
|
topmasscombination.clear();
|
2023 |
algomez |
1.17 |
|
2024 |
algomez |
1.18 |
/* for ( Int_t iijet = 0; iijet < (njets - 2); ++iijet ) {
|
2025 |
algomez |
1.17 |
for ( Int_t jjjet = iijet + 1; jjjet < njets - 1; ++jjjet ) {
|
2026 |
|
|
for(Int_t kkjet = iijet + 2; kkjet < njets; ++kkjet){
|
2027 |
|
|
TLorentzVector tmpvv = p4jets[iijet] + p4jets[jjjet];
|
2028 |
|
|
Double_t tmpmass = tmpvv.M();
|
2029 |
|
|
TLorentzVector tmptop = p4jets[iijet] + p4jets[jjjet] + p4jets[kkjet];
|
2030 |
|
|
Double_t tmptopmass = tmptop.M();
|
2031 |
|
|
Double_t reconstructionchi2 = TMath::Abs(tmpmass - 80.4) * TMath::Abs(tmpmass - 80.4)/sigma2 + TMath::Abs(tmptopmass - 172.5) * TMath::Abs(tmptopmass - 172.5)/sigma2top;
|
2032 |
|
|
if( tmpchi2 > reconstructionchi2){
|
2033 |
|
|
tmpchi2 = reconstructionchi2;
|
2034 |
algomez |
1.18 |
bestjettopindex[0] = iijet;
|
2035 |
|
|
bestjettopindex[1] = jjjet;
|
2036 |
|
|
bestjettopindex[2] = kkjet;
|
2037 |
|
|
}
|
2038 |
|
|
}
|
2039 |
|
|
}
|
2040 |
|
|
} */
|
2041 |
|
|
|
2042 |
|
|
//Leptonic and First Hadronic Top
|
2043 |
|
|
|
2044 |
|
|
Int_t loopnumber = 0;
|
2045 |
|
|
if(njets < 6)
|
2046 |
|
|
{
|
2047 |
|
|
for(Int_t l = 0; l < mymetnum; l++){
|
2048 |
|
|
for ( Int_t iijet = 0; iijet < (njets ); ++iijet ) {//leptonic top jet
|
2049 |
|
|
for ( Int_t jjjet = 0; jjjet < njets - 1; ++jjjet ) { //first hadronic top jet
|
2050 |
|
|
for(Int_t kkjet = jjjet + 1; kkjet < njets; ++kkjet){ //second hadronic top jet
|
2051 |
|
|
for(Int_t lljet = 0; lljet < njets; ++lljet){//third hadronic top jet
|
2052 |
|
|
if(jjjet == iijet || jjjet == lljet || kkjet == lljet) continue;
|
2053 |
|
|
if(kkjet == iijet) continue;
|
2054 |
|
|
if(lljet == iijet) continue;
|
2055 |
|
|
loopnumber++;
|
2056 |
|
|
//cout << l << " " << iijet << " " << jjjet << " "<< kkjet << " " << lljet << << endl;
|
2057 |
|
|
TLorentzVector tmpleptop = p4lepton + nup4[l] + p4jets[iijet];
|
2058 |
|
|
TLorentzVector tmpvv = p4jets[jjjet] + p4jets[kkjet];
|
2059 |
|
|
Double_t tmpmass = tmpvv.M();
|
2060 |
|
|
TLorentzVector tmptop = p4jets[jjjet] + p4jets[kkjet] + p4jets[lljet];
|
2061 |
|
|
Double_t tmptopmass = tmptop.M();
|
2062 |
|
|
//Double_t reconstructionchi2 = TMath::Abs(tmpleptop.M() - 172.5) * TMath::Abs(tmpleptop.M() - 172.5) /lepsigma2 + TMath::Abs(tmpmass - 80.4) * TMath::Abs(tmpmass - 80.4)/sigma2 + TMath::Abs(tmptopmass - 172.5) * TMath::Abs(tmptopmass - 172.5)/sigma2top;
|
2063 |
|
|
Double_t reconstructionchi2 = TMath::Abs(tmpleptop.M() - TLep) * TMath::Abs(tmpleptop.M() - TLep) /lepsigma2 + TMath::Abs(tmpmass - Whad) * TMath::Abs(tmpmass - Whad)/sigma2 + TMath::Abs(tmptopmass - Thad) * TMath::Abs(tmptopmass - Thad)/sigma2top;
|
2064 |
|
|
if( tmpfirstchi2 > reconstructionchi2){
|
2065 |
|
|
tmpfirstchi2 = reconstructionchi2;
|
2066 |
|
|
bestjetindex[0] = l;
|
2067 |
|
|
bestjetindex[1] = iijet;
|
2068 |
|
|
//bestjetWindex[0] = jjjet;
|
2069 |
|
|
//bestjetWindex[1] = kkjet;
|
2070 |
|
|
bestjettopindex[0] = jjjet;
|
2071 |
|
|
bestjettopindex[1] = kkjet;
|
2072 |
|
|
bestjettopindex[2] = lljet;
|
2073 |
|
|
}
|
2074 |
|
|
}
|
2075 |
|
|
}
|
2076 |
algomez |
1.17 |
}
|
2077 |
|
|
}
|
2078 |
|
|
}
|
2079 |
algomez |
1.18 |
//cout<< "Jet Loop:" << loopnumber << endl;
|
2080 |
algomez |
1.17 |
}
|
2081 |
algomez |
1.18 |
else if(njets >= 6)
|
2082 |
|
|
{
|
2083 |
|
|
for(Int_t l = 0; l < mymetnum; l++){
|
2084 |
|
|
for ( Int_t iijet = 0; iijet < (njets ); ++iijet ) {//leptonic top jet
|
2085 |
|
|
for ( Int_t jjjet = 0; jjjet < njets - 1; ++jjjet ) { //first hadronic top jet
|
2086 |
|
|
for(Int_t kkjet = jjjet + 1; kkjet < njets; ++kkjet){ //second hadronic top jet
|
2087 |
|
|
for(Int_t lljet = 0; lljet < njets; ++lljet){//third hadronic top jet
|
2088 |
|
|
for(Int_t mmjet = 0; mmjet < (njets - 1); ++mmjet){
|
2089 |
|
|
for(Int_t nnjet = mmjet + 1; nnjet < njets; ++nnjet){
|
2090 |
|
|
if(jjjet == iijet || jjjet == lljet || kkjet == lljet || jjjet == mmjet || jjjet == nnjet) continue;
|
2091 |
|
|
if(kkjet == iijet || kkjet == mmjet || kkjet == nnjet) continue;
|
2092 |
|
|
if(lljet == iijet || lljet == mmjet || lljet == nnjet) continue;
|
2093 |
|
|
if(mmjet == iijet) continue;
|
2094 |
|
|
if(nnjet == iijet) continue;
|
2095 |
|
|
loopnumber++;
|
2096 |
|
|
TLorentzVector tmpleptop = p4lepton + nup4[l] + p4jets[iijet];
|
2097 |
|
|
TLorentzVector tmpvv = p4jets[jjjet] + p4jets[kkjet];
|
2098 |
|
|
Double_t tmpmass = tmpvv.M();
|
2099 |
|
|
TLorentzVector tmptop = p4jets[jjjet] + p4jets[kkjet] + p4jets[lljet];
|
2100 |
|
|
Double_t tmptopmass = tmptop.M();
|
2101 |
|
|
TLorentzVector tmpsecondvv = p4jets[mmjet] + p4jets[nnjet];
|
2102 |
|
|
//Double_t tmpsecondmass = tmpsecondvv.M();
|
2103 |
|
|
//Double_t reconstructionchi2 = TMath::Abs(tmpleptop.M() - 172.5) * TMath::Abs(tmpleptop.M() - 172.5) /lepsigma2 + TMath::Abs(tmpmass - 80.4) * TMath::Abs(tmpmass - 80.4)/sigma2 + TMath::Abs(tmptopmass - 172.5) * TMath::Abs(tmptopmass - 172.5)/sigma2top + TMath::Abs(tmpsecondmass - 80.4) * TMath::Abs(tmpsecondmass - 80.4) / sigma2;
|
2104 |
|
|
Double_t reconstructionchi2 = TMath::Abs(tmpleptop.M() - TLep) * TMath::Abs(tmpleptop.M() - TLep) /lepsigma2 + TMath::Abs(tmpmass - Whad) * TMath::Abs(tmpmass - Whad)/sigma2 + TMath::Abs(tmptopmass - Thad) * TMath::Abs(tmptopmass - Thad)/sigma2top;
|
2105 |
|
|
if( tmpsecondwchi2 > reconstructionchi2){
|
2106 |
|
|
tmpsecondwchi2 = reconstructionchi2;
|
2107 |
|
|
bestjetindex[0] = l;
|
2108 |
|
|
bestjetindex[1] = iijet;
|
2109 |
|
|
//bestjetWindex[0] = jjjet;
|
2110 |
|
|
//bestjetWindex[1] = kkjet;
|
2111 |
|
|
bestjettopindex[0] = jjjet;
|
2112 |
|
|
bestjettopindex[1] = kkjet;
|
2113 |
|
|
bestjettopindex[2] = lljet;
|
2114 |
|
|
bestjetsecondWindex[0] = mmjet;
|
2115 |
|
|
bestjetsecondWindex[1] = nnjet;
|
2116 |
|
|
}
|
2117 |
|
|
}
|
2118 |
|
|
}
|
2119 |
|
|
}
|
2120 |
|
|
}
|
2121 |
|
|
}
|
2122 |
|
|
}
|
2123 |
|
|
}
|
2124 |
|
|
//cout<< "Jet Loop:" << loopnumber << endl;
|
2125 |
|
|
}
|
2126 |
|
|
//
|
2127 |
|
|
// second try
|
2128 |
|
|
/*for(Int_t l = 0; l < mymetnum; l++){
|
2129 |
|
|
for ( Int_t iijet = 0; iijet < (njets ); ++iijet ) {
|
2130 |
|
|
for ( Int_t jjjet = 0; jjjet < (njets - 2); ++jjjet ) {
|
2131 |
|
|
for(Int_t kkjet = jjjet + 1; kkjet < (njets - 1); ++kkjet){
|
2132 |
|
|
for(Int_t lljet = jjjet + 2; lljet < njets; ++lljet){
|
2133 |
|
|
if(jjjet == iijet) continue;
|
2134 |
|
|
if(kkjet == iijet) continue;
|
2135 |
|
|
if(lljet == iijet) continue;
|
2136 |
|
|
|
2137 |
|
|
TLorentzVector tmpleptop = p4lepton + nup4[l] + p4jets[iijet];
|
2138 |
|
|
TLorentzVector tmpvv = p4jets[jjjet] + p4jets[kkjet];
|
2139 |
|
|
Double_t tmpmass = tmpvv.M();
|
2140 |
|
|
TLorentzVector tmptop = p4jets[jjjet] + p4jets[kkjet] + p4jets[lljet];
|
2141 |
|
|
Double_t tmptopmass = tmptop.M();
|
2142 |
|
|
Double_t reconstructionchi2 = TMath::Abs(tmpleptop.M() - 172.5) * TMath::Abs(tmpleptop.M() - 172.5) /lepsigma2 + TMath::Abs(tmpmass - 80.4) * TMath::Abs(tmpmass - 80.4)/sigma2 + TMath::Abs(tmptopmass - 172.5) * TMath::Abs(tmptopmass - 172.5)/sigma2top;
|
2143 |
|
|
if( tmpfirstchi2 > reconstructionchi2){
|
2144 |
|
|
tmpfirstchi2 = reconstructionchi2;
|
2145 |
|
|
//tmpchi2 = reconstructionchi2;
|
2146 |
|
|
bestjetindex[0] = l;
|
2147 |
|
|
bestjetindex[1] = iijet;
|
2148 |
|
|
//bestjetWindex[0] = jjjet;
|
2149 |
|
|
//bestjetWindex[1] = kkjet;
|
2150 |
|
|
bestjettopindex[0] = jjjet;
|
2151 |
|
|
bestjettopindex[1] = kkjet;
|
2152 |
|
|
bestjettopindex[2] = lljet;
|
2153 |
|
|
}
|
2154 |
|
|
}
|
2155 |
|
|
}
|
2156 |
|
|
}
|
2157 |
|
|
}
|
2158 |
|
|
}*/
|
2159 |
algomez |
1.17 |
|
2160 |
algomez |
1.18 |
tmpchi2 = tmpfirstchi2;
|
2161 |
|
|
|
2162 |
|
|
//calculate second closest di jet mass which is the cloest to W mass
|
2163 |
|
|
if(njets > 5){ /// larger than 6 because we are only reconstructing the 2nd W
|
2164 |
|
|
/*for ( Int_t iijet = 0; iijet < (njets - 1); ++iijet ) {
|
2165 |
|
|
for ( Int_t jjjet = iijet + 1; jjjet < (njets); ++jjjet ) {
|
2166 |
|
|
if(iijet == bestjetindex[1] || iijet == bestjettopindex[0] || iijet == bestjettopindex[1] || iijet == bestjettopindex[2]) continue;
|
2167 |
|
|
if(jjjet == bestjetindex[1] || jjjet == bestjettopindex[0] || jjjet == bestjettopindex[1] || jjjet == bestjettopindex[2]) continue;
|
2168 |
|
|
TLorentzVector tmpvv = p4jets[iijet] + p4jets[jjjet];
|
2169 |
|
|
Double_t tmpmass = tmpvv.M();
|
2170 |
|
|
Double_t reconstructionchi2 = TMath::Abs(tmpmass - 80.4) * TMath::Abs(tmpmass - 80.4)/sigma2;
|
2171 |
|
|
if( tmpsecondwchi2 > reconstructionchi2){
|
2172 |
|
|
tmpsecondwchi2 = reconstructionchi2;
|
2173 |
|
|
bestjetsecondWindex[0] = iijet;
|
2174 |
|
|
bestjetsecondWindex[1] = jjjet;
|
2175 |
|
|
}
|
2176 |
|
|
}
|
2177 |
|
|
}*/
|
2178 |
|
|
|
2179 |
|
|
//tmpchi2 = tmpfirstchi2 + tmpsecondwchi2;
|
2180 |
|
|
tmpchi2 = tmpsecondwchi2;
|
2181 |
|
|
}
|
2182 |
|
|
|
2183 |
|
|
//Second Hadronic Top
|
2184 |
|
|
Double_t tmpchi22 = 9999999;
|
2185 |
|
|
if (njets >=7 ) {
|
2186 |
|
|
for ( Int_t iijet = 0; iijet < (njets - 2); ++iijet ) {
|
2187 |
|
|
for ( Int_t jjjet = iijet + 1; jjjet < njets - 1; ++jjjet ) {
|
2188 |
|
|
for(Int_t kkjet = iijet + 2; kkjet < njets; ++kkjet){
|
2189 |
|
|
if(iijet == bestjetindex[1] || iijet == bestjettopindex[0] || iijet == bestjettopindex[1] || iijet == bestjettopindex[2]) continue;
|
2190 |
|
|
if(jjjet == bestjetindex[1] || jjjet == bestjettopindex[0] || jjjet == bestjettopindex[1] || jjjet == bestjettopindex[2]) continue;
|
2191 |
|
|
if(kkjet == bestjetindex[1] || kkjet == bestjettopindex[0] || kkjet == bestjettopindex[1] || kkjet == bestjettopindex[2]) continue;
|
2192 |
|
|
TLorentzVector tmpvv = p4jets[iijet] + p4jets[jjjet];
|
2193 |
|
|
Double_t tmpmass = tmpvv.M();
|
2194 |
|
|
TLorentzVector tmptop = p4jets[iijet] + p4jets[jjjet] + p4jets[kkjet];
|
2195 |
|
|
Double_t tmptopmass = tmptop.M();
|
2196 |
|
|
//Double_t reconstructionchi2 = TMath::Abs(tmpmass - 80.4) * TMath::Abs(tmpmass - 80.4)/sigma2 + TMath::Abs(tmptopmass - 172.5) * TMath::Abs(tmptopmass - 172.5)/sigma2top;
|
2197 |
|
|
Double_t reconstructionchi2 = TMath::Abs(tmpmass - Whad) * TMath::Abs(tmpmass - Whad)/sigma2 + TMath::Abs(tmptopmass - Thad) * TMath::Abs(tmptopmass - Thad)/sigma2top;
|
2198 |
|
|
if( tmpchi22 > reconstructionchi2){
|
2199 |
|
|
tmpchi22 = reconstructionchi2;
|
2200 |
|
|
bestjettopindex2[0] = iijet;
|
2201 |
|
|
bestjettopindex2[1] = jjjet;
|
2202 |
|
|
bestjettopindex2[2] = kkjet;
|
2203 |
|
|
}
|
2204 |
|
|
}
|
2205 |
|
|
}
|
2206 |
|
|
}
|
2207 |
|
|
}
|
2208 |
algomez |
1.17 |
|
2209 |
|
|
|
2210 |
|
|
// Leptonic Top
|
2211 |
algomez |
1.18 |
/*for(Int_t l = 0; l < 2; l++){
|
2212 |
algomez |
1.17 |
for(Int_t m = 0; m < njets; m++){
|
2213 |
|
|
TLorentzVector sum;
|
2214 |
|
|
sum = p4lepton + nup4[l] + p4jets[m];
|
2215 |
|
|
|
2216 |
|
|
topmasscombination.push_back(sum.M());
|
2217 |
|
|
|
2218 |
|
|
if (mindeltamass > TMath::Abs(sum.M()- 172.5)) {
|
2219 |
|
|
mindeltamass = TMath::Abs(sum.M()- 172.5);
|
2220 |
|
|
Leptop_mass = sum.M();
|
2221 |
|
|
Leptop_pt = sum.Pt();
|
2222 |
|
|
index[0] = l;
|
2223 |
|
|
index[1] = m;
|
2224 |
|
|
}
|
2225 |
|
|
}
|
2226 |
algomez |
1.18 |
}*/
|
2227 |
algomez |
1.17 |
|
2228 |
algomez |
1.18 |
p4dileadjet = p4jets[0] + p4jets[1];
|
2229 |
|
|
dileadjet_mass = p4dileadjet.M();
|
2230 |
|
|
p4LepW = p4lepton + nup4[bestjetindex[0]];
|
2231 |
|
|
p4Leptop = p4lepton + nup4[bestjetindex[0]] + p4jets[bestjetindex[1]];
|
2232 |
|
|
p4HadW = p4jets[bestjettopindex[0]] + p4jets[bestjettopindex[1]];
|
2233 |
|
|
p4HadTop = p4jets[bestjettopindex[0]] + p4jets[bestjettopindex[1]] + p4jets[bestjettopindex[2]];
|
2234 |
|
|
p4secondHadW = p4jets[bestjetsecondWindex[0]] + p4jets[bestjetsecondWindex[1]];
|
2235 |
|
|
p4secondHadTop = p4jets[bestjettopindex2[0]] + p4jets[bestjettopindex2[1]] + p4jets[bestjettopindex2[2]];
|
2236 |
algomez |
1.16 |
|
2237 |
algomez |
1.18 |
bestchi2 = tmpchi2;
|
2238 |
|
|
hadW_mass = p4HadW.M();
|
2239 |
|
|
hadW_pt = p4HadW.Pt();
|
2240 |
|
|
Htop_mass = p4HadTop.M();
|
2241 |
|
|
Htop_pt = p4HadTop.Pt();
|
2242 |
|
|
double secondhadW_mass = p4secondHadW.M();
|
2243 |
|
|
double secondhadW_pt = p4secondHadW.Pt();
|
2244 |
|
|
double secondHtop_mass = p4secondHadTop.M();
|
2245 |
|
|
double secondHtop_pt = p4secondHadTop.Pt();
|
2246 |
|
|
diWdeltaphi = p4LepW.DeltaPhi(p4HadW);
|
2247 |
|
|
diWdeltaR = p4LepW.DeltaR(p4HadW);
|
2248 |
algomez |
1.17 |
DeltaPhiMETWlep = p4LepW.DeltaPhi(p4MET);
|
2249 |
|
|
DeltaPhiMETlep = p4lepton.DeltaPhi(p4MET);
|
2250 |
|
|
DeltaPhiNulep = p4lepton.DeltaPhi(p4Nu);
|
2251 |
|
|
lepW_pt = p4LepW.Pt();
|
2252 |
|
|
lepW_mass = p4LepW.M();
|
2253 |
algomez |
1.18 |
Leptop_pt = p4Leptop.Pt();
|
2254 |
|
|
Leptop_mass = p4Leptop.M();
|
2255 |
algomez |
1.17 |
|
2256 |
|
|
|
2257 |
|
|
|
2258 |
|
|
hMET["Ht_cut0"]->Fill( Ht, PUweight );
|
2259 |
|
|
hMET["Stlep_cut0"]->Fill( Stlep , PUweight );
|
2260 |
|
|
hMET["Stjet_cut0"]->Fill( Stjet , PUweight );
|
2261 |
|
|
hM["dileadjet_cut0"]->Fill( dileadjet_mass, PUweight );
|
2262 |
|
|
hM["hadW_mass_cut0"]->Fill( hadW_mass, PUweight );
|
2263 |
algomez |
1.18 |
hM["Htop_mass_cut0"]->Fill( Htop_mass, PUweight );
|
2264 |
|
|
hM["Leptop_mass_cut0"]->Fill( Leptop_mass, PUweight );
|
2265 |
|
|
hM["Htop_pt_cut0"]->Fill( Htop_pt, PUweight );
|
2266 |
|
|
hM["Leptop_pt_cut0"]->Fill( Leptop_pt, PUweight );
|
2267 |
|
|
hM["diWdeltaR_cut0"]->Fill( diWdeltaR, PUweight );
|
2268 |
algomez |
1.17 |
hjets["1st_pt_cut0"]->Fill( p4jets[0].Pt(), PUweight );
|
2269 |
|
|
hjets["1st_eta_cut0"]->Fill( p4jets[0].Eta(), PUweight );
|
2270 |
|
|
hjets["2nd_pt_cut0"]->Fill( p4jets[1].Pt(), PUweight );
|
2271 |
|
|
hjets["2nd_eta_cut0"]->Fill( p4jets[1].Eta(), PUweight );
|
2272 |
|
|
hjets["3rd_pt_cut0"]->Fill( p4jets[2].Pt(), PUweight );
|
2273 |
algomez |
1.18 |
hjets["3rd_eta_cut0"]->Fill( p4jets[2].Eta(), PUweight );
|
2274 |
algomez |
1.17 |
hjets["4th_pt_cut0"]->Fill( p4jets[3].Pt(), PUweight );
|
2275 |
algomez |
1.18 |
hjets["4th_eta_cut0"]->Fill( p4jets[3].Eta(), PUweight );
|
2276 |
algomez |
1.17 |
hjets["Njets_cut0"]->Fill( njets, PUweight );
|
2277 |
algomez |
1.18 |
hjets["mindeltaRjj_cut0"]->Fill( deltaRminjj, PUweight );
|
2278 |
|
|
hjets["deltaRmu2j_cut0"]->Fill( deltaRmu2j, PUweight );
|
2279 |
algomez |
1.17 |
hjets["Nbtags_CSVL_cut0"]->Fill( Nbtags_CSVL, PUweight );
|
2280 |
|
|
hjets["Nbtags_CSVM_cut0"]->Fill( Nbtags_CSVM, PUweight );
|
2281 |
|
|
hjets["Nbtags_CSVT_cut0"]->Fill( Nbtags_CSVT, PUweight );
|
2282 |
|
|
hjets["Nbtags_TCHPM_cut0"]->Fill( Nbtags_TCHPM, PUweight );
|
2283 |
|
|
hjets["deltaPhijj_cut0"]->Fill( deltaPhijj, PUweight );
|
2284 |
algomez |
1.18 |
hPVs["Nreweight"]->Fill( total_pvs, PUweight );
|
2285 |
algomez |
1.17 |
|
2286 |
algomez |
1.18 |
/* if ( total_muons == 1){
|
2287 |
algomez |
1.17 |
if ( Nbtags_CSVL == 0 ){
|
2288 |
|
|
if (njets == 4){
|
2289 |
|
|
hjets["Stjetm1j4b0"]->Fill( Stjet , PUweight );
|
2290 |
|
|
hjets["DeltaRdijetm1j4b0"]->Fill( deltaRjj , PUweight );
|
2291 |
|
|
hjets["DeltaPhiMETWlepm1j4b0"]->Fill( DeltaPhiMETWlep , PUweight );
|
2292 |
|
|
hjets["trijetmassm1j4b0"]->Fill( Htop_mass , PUweight );
|
2293 |
algomez |
1.18 |
hjets["trijetptm1j4b0"]->Fill( Htop_pt , PUweight );
|
2294 |
algomez |
1.17 |
hjets["deltaRmindijetm1j4b0"]->Fill( deltaRminjj , PUweight );
|
2295 |
|
|
hjets["deltaRmu2jetm1j4b0"]->Fill( deltaRmu2j , PUweight );
|
2296 |
|
|
hjets["deltaPhidijetm1j4b0"]->Fill( deltaPhijj , PUweight );
|
2297 |
|
|
hjets["deltaPhimu2jetm1j4b0"]->Fill( deltaPhimu2j , PUweight );
|
2298 |
|
|
hjets["Stlepm1j4b0"]->Fill( Stlep, PUweight );
|
2299 |
|
|
hjets["Htm1j4b0"]->Fill( Ht, PUweight );
|
2300 |
|
|
hjets["Njetsm1j4b0"]->Fill( njets, PUweight );
|
2301 |
|
|
}
|
2302 |
|
|
if (njets == 5){
|
2303 |
|
|
hjets["Stjetm1j5b0"]->Fill( Stjet , PUweight );
|
2304 |
|
|
hjets["DeltaRdijetm1j5b0"]->Fill( deltaRjj , PUweight );
|
2305 |
|
|
hjets["DeltaPhiMETWlepm1j5b0"]->Fill( DeltaPhiMETWlep , PUweight );
|
2306 |
|
|
hjets["trijetmassm1j5b0"]->Fill( Htop_mass , PUweight );
|
2307 |
algomez |
1.18 |
hjets["trijetptm1j5b0"]->Fill( Htop_pt , PUweight );
|
2308 |
algomez |
1.17 |
hjets["deltaRmindijetm1j5b0"]->Fill( deltaRminjj , PUweight );
|
2309 |
|
|
hjets["deltaRmu2jetm1j5b0"]->Fill( deltaRmu2j , PUweight );
|
2310 |
|
|
hjets["deltaPhidijetm1j5b0"]->Fill( deltaPhijj , PUweight );
|
2311 |
|
|
hjets["deltaPhimu2jetm1j5b0"]->Fill( deltaPhimu2j , PUweight );
|
2312 |
|
|
hjets["Stlepm1j5b0"]->Fill( Stlep, PUweight );
|
2313 |
|
|
hjets["Htm1j5b0"]->Fill( Ht, PUweight );
|
2314 |
|
|
hjets["Njetsm1j5b0"]->Fill( njets, PUweight );
|
2315 |
|
|
}
|
2316 |
|
|
if (njets >= 6){
|
2317 |
|
|
hjets["Stjetm1j6b0"]->Fill( Stjet , PUweight );
|
2318 |
|
|
hjets["DeltaRdijetm1j6b0"]->Fill( deltaRjj , PUweight );
|
2319 |
|
|
hjets["DeltaPhiMETWlepm1j6b0"]->Fill( DeltaPhiMETWlep , PUweight );
|
2320 |
|
|
hjets["trijetmassm1j6b0"]->Fill( Htop_mass , PUweight );
|
2321 |
algomez |
1.18 |
hjets["trijetptm1j6b0"]->Fill( Htop_pt , PUweight );
|
2322 |
algomez |
1.17 |
hjets["deltaRmindijetm1j6b0"]->Fill( deltaRminjj , PUweight );
|
2323 |
|
|
hjets["deltaRmu2jetm1j6b0"]->Fill( deltaRmu2j , PUweight );
|
2324 |
|
|
hjets["deltaPhidijetm1j6b0"]->Fill( deltaPhijj , PUweight );
|
2325 |
|
|
hjets["deltaPhimu2jetm1j6b0"]->Fill( deltaPhimu2j , PUweight );
|
2326 |
|
|
hjets["Stlepm1j6b0"]->Fill( Stlep, PUweight );
|
2327 |
|
|
hjets["Htm1j6b0"]->Fill( Ht, PUweight );
|
2328 |
|
|
hjets["Njetsm1j6b0"]->Fill( njets, PUweight );
|
2329 |
|
|
}
|
2330 |
|
|
}
|
2331 |
|
|
|
2332 |
|
|
if ( Nbtags_CSVL == 1 ){
|
2333 |
|
|
if (njets == 4){
|
2334 |
|
|
hjets["Stjetm1j4b1"]->Fill( Stjet , PUweight );
|
2335 |
|
|
hjets["DeltaRdijetm1j4b1"]->Fill( deltaRjj , PUweight );
|
2336 |
|
|
hjets["DeltaPhiMETWlepm1j4b1"]->Fill( DeltaPhiMETWlep , PUweight );
|
2337 |
|
|
hjets["trijetmassm1j4b1"]->Fill( Htop_mass , PUweight );
|
2338 |
algomez |
1.18 |
hjets["trijetptm1j4b1"]->Fill( Htop_pt , PUweight );
|
2339 |
algomez |
1.17 |
hjets["deltaRmindijetm1j4b1"]->Fill( deltaRminjj , PUweight );
|
2340 |
|
|
hjets["deltaRmu2jetm1j4b1"]->Fill( deltaRmu2j , PUweight );
|
2341 |
|
|
hjets["deltaPhidijetm1j4b1"]->Fill( deltaPhijj , PUweight );
|
2342 |
|
|
hjets["deltaPhimu2jetm1j4b1"]->Fill( deltaPhimu2j , PUweight );
|
2343 |
|
|
hjets["Stlepm1j4b1"]->Fill( Stlep, PUweight );
|
2344 |
|
|
hjets["Htm1j4b1"]->Fill( Ht, PUweight );
|
2345 |
|
|
hjets["Njetsm1j4b1"]->Fill( njets, PUweight );
|
2346 |
|
|
}
|
2347 |
|
|
if (njets == 5){
|
2348 |
|
|
hjets["Stjetm1j5b1"]->Fill( Stjet , PUweight );
|
2349 |
|
|
hjets["DeltaRdijetm1j5b1"]->Fill( deltaRjj , PUweight );
|
2350 |
|
|
hjets["DeltaPhiMETWlepm1j5b1"]->Fill( DeltaPhiMETWlep , PUweight );
|
2351 |
|
|
hjets["trijetmassm1j5b1"]->Fill( Htop_mass , PUweight );
|
2352 |
algomez |
1.18 |
hjets["trijetptm1j5b1"]->Fill( Htop_pt , PUweight );
|
2353 |
algomez |
1.17 |
hjets["deltaRmindijetm1j5b1"]->Fill( deltaRminjj , PUweight );
|
2354 |
|
|
hjets["deltaRmu2jetm1j5b1"]->Fill( deltaRmu2j , PUweight );
|
2355 |
|
|
hjets["deltaPhidijetm1j5b1"]->Fill( deltaPhijj , PUweight );
|
2356 |
|
|
hjets["deltaPhimu2jetm1j5b1"]->Fill( deltaPhimu2j , PUweight );
|
2357 |
|
|
hjets["Stlepm1j5b1"]->Fill( Stlep, PUweight );
|
2358 |
|
|
hjets["Htm1j5b1"]->Fill( Ht, PUweight );
|
2359 |
|
|
hjets["Njetsm1j5b1"]->Fill( njets, PUweight );
|
2360 |
|
|
}
|
2361 |
|
|
if (njets >= 6){
|
2362 |
|
|
hjets["Stjetm1j6b1"]->Fill( Stjet , PUweight );
|
2363 |
|
|
hjets["DeltaRdijetm1j6b1"]->Fill( deltaRjj , PUweight );
|
2364 |
|
|
hjets["DeltaPhiMETWlepm1j6b1"]->Fill( DeltaPhiMETWlep , PUweight );
|
2365 |
|
|
hjets["trijetmassm1j6b1"]->Fill( Htop_mass , PUweight );
|
2366 |
algomez |
1.18 |
hjets["trijetptm1j6b1"]->Fill( Htop_pt , PUweight );
|
2367 |
algomez |
1.17 |
hjets["deltaRmindijetm1j6b1"]->Fill( deltaRminjj , PUweight );
|
2368 |
|
|
hjets["deltaRmu2jetm1j6b1"]->Fill( deltaRmu2j , PUweight );
|
2369 |
|
|
hjets["deltaPhidijetm1j6b1"]->Fill( deltaPhijj , PUweight );
|
2370 |
|
|
hjets["deltaPhimu2jetm1j6b1"]->Fill( deltaPhimu2j , PUweight );
|
2371 |
|
|
hjets["Stlepm1j6b1"]->Fill( Stlep, PUweight );
|
2372 |
|
|
hjets["Htm1j6b1"]->Fill( Ht, PUweight );
|
2373 |
|
|
hjets["Njetsm1j6b1"]->Fill( njets, PUweight );
|
2374 |
|
|
}
|
2375 |
|
|
}
|
2376 |
|
|
|
2377 |
|
|
if ( Nbtags_CSVL >= 2 ){
|
2378 |
|
|
if (njets == 4){
|
2379 |
|
|
hjets["Stjetm1j4b2"]->Fill( Stjet , PUweight );
|
2380 |
|
|
hjets["DeltaRdijetm1j4b2"]->Fill( deltaRjj , PUweight );
|
2381 |
|
|
hjets["DeltaPhiMETWlepm1j4b2"]->Fill( DeltaPhiMETWlep , PUweight );
|
2382 |
|
|
hjets["trijetmassm1j4b2"]->Fill( Htop_mass , PUweight );
|
2383 |
algomez |
1.18 |
hjets["trijetptm1j4b2"]->Fill( Htop_pt , PUweight );
|
2384 |
algomez |
1.17 |
hjets["deltaRmindijetm1j4b2"]->Fill( deltaRminjj , PUweight );
|
2385 |
|
|
hjets["deltaRmu2jetm1j4b2"]->Fill( deltaRmu2j , PUweight );
|
2386 |
|
|
hjets["deltaPhidijetm1j4b2"]->Fill( deltaPhijj , PUweight );
|
2387 |
|
|
hjets["deltaPhimu2jetm1j4b2"]->Fill( deltaPhimu2j , PUweight );
|
2388 |
|
|
hjets["Stlepm1j4b2"]->Fill( Stlep, PUweight );
|
2389 |
|
|
hjets["Htm1j4b2"]->Fill( Ht, PUweight );
|
2390 |
|
|
hjets["Njetsm1j4b2"]->Fill( njets, PUweight );
|
2391 |
|
|
}
|
2392 |
|
|
if (njets == 5){
|
2393 |
|
|
hjets["Stjetm1j5b2"]->Fill( Stjet , PUweight );
|
2394 |
|
|
hjets["DeltaRdijetm1j5b2"]->Fill( deltaRjj , PUweight );
|
2395 |
|
|
hjets["DeltaPhiMETWlepm1j5b2"]->Fill( DeltaPhiMETWlep , PUweight );
|
2396 |
|
|
hjets["trijetmassm1j5b2"]->Fill( Htop_mass , PUweight );
|
2397 |
algomez |
1.18 |
hjets["trijetptm1j5b2"]->Fill( Htop_pt , PUweight );
|
2398 |
algomez |
1.17 |
hjets["deltaRmindijetm1j5b2"]->Fill( deltaRminjj , PUweight );
|
2399 |
|
|
hjets["deltaRmu2jetm1j5b2"]->Fill( deltaRmu2j , PUweight );
|
2400 |
|
|
hjets["deltaPhidijetm1j5b2"]->Fill( deltaPhijj , PUweight );
|
2401 |
|
|
hjets["deltaPhimu2jetm1j5b2"]->Fill( deltaPhimu2j , PUweight );
|
2402 |
|
|
hjets["Stlepm1j5b2"]->Fill( Stlep, PUweight );
|
2403 |
|
|
hjets["Htm1j5b2"]->Fill( Ht, PUweight );
|
2404 |
|
|
hjets["Njetsm1j5b2"]->Fill( njets, PUweight );
|
2405 |
|
|
}
|
2406 |
|
|
if (njets >= 6){
|
2407 |
|
|
hjets["Stjetm1j6b2"]->Fill( Stjet , PUweight );
|
2408 |
|
|
hjets["DeltaRdijetm1j6b2"]->Fill( deltaRjj , PUweight );
|
2409 |
|
|
hjets["DeltaPhiMETWlepm1j6b2"]->Fill( DeltaPhiMETWlep , PUweight );
|
2410 |
|
|
hjets["trijetmassm1j6b2"]->Fill( Htop_mass , PUweight );
|
2411 |
algomez |
1.18 |
hjets["trijetptm1j6b2"]->Fill( Htop_pt , PUweight );
|
2412 |
algomez |
1.17 |
hjets["deltaRmindijetm1j6b2"]->Fill( deltaRminjj , PUweight );
|
2413 |
|
|
hjets["deltaRmu2jetm1j6b2"]->Fill( deltaRmu2j , PUweight );
|
2414 |
|
|
hjets["deltaPhidijetm1j6b2"]->Fill( deltaPhijj , PUweight );
|
2415 |
|
|
hjets["deltaPhimu2jetm1j6b2"]->Fill( deltaPhimu2j , PUweight );
|
2416 |
|
|
hjets["Stlepm1j6b2"]->Fill( Stlep, PUweight );
|
2417 |
|
|
hjets["Htm1j6b2"]->Fill( Ht, PUweight );
|
2418 |
|
|
hjets["Njetsm1j6b2"]->Fill( njets, PUweight );
|
2419 |
|
|
}
|
2420 |
|
|
}
|
2421 |
|
|
|
2422 |
|
|
}
|
2423 |
algomez |
1.16 |
|
2424 |
algomez |
1.17 |
if ( total_muons == 2){
|
2425 |
|
|
if ( Nbtags_CSVL == 0 ){
|
2426 |
|
|
if (njets == 4){
|
2427 |
|
|
hjets["Stjetm2j4b0"]->Fill( Stjet , PUweight );
|
2428 |
|
|
hjets["DeltaRdijetm2j4b0"]->Fill( deltaRjj , PUweight );
|
2429 |
|
|
hjets["DeltaPhiMETWlepm2j4b0"]->Fill( DeltaPhiMETWlep , PUweight );
|
2430 |
|
|
hjets["trijetmassm2j4b0"]->Fill( Htop_mass , PUweight );
|
2431 |
algomez |
1.18 |
hjets["trijetptm2j4b0"]->Fill( Htop_pt , PUweight );
|
2432 |
algomez |
1.17 |
hjets["deltaRmindijetm2j4b0"]->Fill( deltaRminjj , PUweight );
|
2433 |
|
|
hjets["deltaRmu2jetm2j4b0"]->Fill( deltaRmu2j , PUweight );
|
2434 |
|
|
hjets["deltaPhidijetm2j4b0"]->Fill( deltaPhijj , PUweight );
|
2435 |
|
|
hjets["deltaPhimu2jetm2j4b0"]->Fill( deltaPhimu2j , PUweight );
|
2436 |
|
|
hjets["Stlepm2j4b0"]->Fill( Stlep, PUweight );
|
2437 |
|
|
hjets["Htm2j4b0"]->Fill( Ht, PUweight );
|
2438 |
|
|
hjets["Njetsm2j4b0"]->Fill( njets, PUweight );
|
2439 |
|
|
}
|
2440 |
|
|
if (njets == 5){
|
2441 |
|
|
hjets["Stjetm2j5b0"]->Fill( Stjet , PUweight );
|
2442 |
|
|
hjets["DeltaRdijetm2j5b0"]->Fill( deltaRjj , PUweight );
|
2443 |
|
|
hjets["DeltaPhiMETWlepm2j5b0"]->Fill( DeltaPhiMETWlep , PUweight );
|
2444 |
|
|
hjets["trijetmassm2j5b0"]->Fill( Htop_mass , PUweight );
|
2445 |
algomez |
1.18 |
hjets["trijetptm2j5b0"]->Fill( Htop_pt , PUweight );
|
2446 |
algomez |
1.17 |
hjets["deltaRmindijetm2j5b0"]->Fill( deltaRminjj , PUweight );
|
2447 |
|
|
hjets["deltaRmu2jetm2j5b0"]->Fill( deltaRmu2j , PUweight );
|
2448 |
|
|
hjets["deltaPhidijetm2j5b0"]->Fill( deltaPhijj , PUweight );
|
2449 |
|
|
hjets["deltaPhimu2jetm2j5b0"]->Fill( deltaPhimu2j , PUweight );
|
2450 |
|
|
hjets["Stlepm2j5b0"]->Fill( Stlep, PUweight );
|
2451 |
|
|
hjets["Htm2j5b0"]->Fill( Ht, PUweight );
|
2452 |
|
|
hjets["Njetsm2j5b0"]->Fill( njets, PUweight );
|
2453 |
|
|
}
|
2454 |
|
|
if (njets >= 6){
|
2455 |
|
|
hjets["Stjetm2j6b0"]->Fill( Stjet , PUweight );
|
2456 |
|
|
hjets["DeltaRdijetm2j6b0"]->Fill( deltaRjj , PUweight );
|
2457 |
|
|
hjets["DeltaPhiMETWlepm2j6b0"]->Fill( DeltaPhiMETWlep , PUweight );
|
2458 |
|
|
hjets["trijetmassm2j6b0"]->Fill( Htop_mass , PUweight );
|
2459 |
algomez |
1.18 |
hjets["trijetptm2j6b0"]->Fill( Htop_pt , PUweight );
|
2460 |
algomez |
1.17 |
hjets["deltaRmindijetm2j6b0"]->Fill( deltaRminjj , PUweight );
|
2461 |
|
|
hjets["deltaRmu2jetm2j6b0"]->Fill( deltaRmu2j , PUweight );
|
2462 |
|
|
hjets["deltaPhidijetm2j6b0"]->Fill( deltaPhijj , PUweight );
|
2463 |
|
|
hjets["deltaPhimu2jetm2j6b0"]->Fill( deltaPhimu2j , PUweight );
|
2464 |
|
|
hjets["Stlepm2j6b0"]->Fill( Stlep, PUweight );
|
2465 |
|
|
hjets["Htm2j6b0"]->Fill( Ht, PUweight );
|
2466 |
|
|
hjets["Njetsm2j6b0"]->Fill( njets, PUweight );
|
2467 |
|
|
}
|
2468 |
|
|
}
|
2469 |
|
|
|
2470 |
|
|
if ( Nbtags_CSVL == 1 ){
|
2471 |
|
|
if (njets == 4){
|
2472 |
|
|
hjets["Stjetm2j4b1"]->Fill( Stjet , PUweight );
|
2473 |
|
|
hjets["DeltaRdijetm2j4b1"]->Fill( deltaRjj , PUweight );
|
2474 |
|
|
hjets["DeltaPhiMETWlepm2j4b1"]->Fill( DeltaPhiMETWlep , PUweight );
|
2475 |
|
|
hjets["trijetmassm2j4b1"]->Fill( Htop_mass , PUweight );
|
2476 |
algomez |
1.18 |
hjets["trijetptm2j4b1"]->Fill( Htop_pt , PUweight );
|
2477 |
algomez |
1.17 |
hjets["deltaRmindijetm2j4b1"]->Fill( deltaRminjj , PUweight );
|
2478 |
|
|
hjets["deltaRmu2jetm2j4b1"]->Fill( deltaRmu2j , PUweight );
|
2479 |
|
|
hjets["deltaPhidijetm2j4b1"]->Fill( deltaPhijj , PUweight );
|
2480 |
|
|
hjets["deltaPhimu2jetm2j4b1"]->Fill( deltaPhimu2j , PUweight );
|
2481 |
|
|
hjets["Stlepm2j4b1"]->Fill( Stlep, PUweight );
|
2482 |
|
|
hjets["Htm2j4b1"]->Fill( Ht, PUweight );
|
2483 |
|
|
hjets["Njetsm2j4b1"]->Fill( njets, PUweight );
|
2484 |
|
|
}
|
2485 |
|
|
if (njets == 5){
|
2486 |
|
|
hjets["Stjetm2j5b1"]->Fill( Stjet , PUweight );
|
2487 |
|
|
hjets["DeltaRdijetm2j5b1"]->Fill( deltaRjj , PUweight );
|
2488 |
|
|
hjets["DeltaPhiMETWlepm2j5b1"]->Fill( DeltaPhiMETWlep , PUweight );
|
2489 |
|
|
hjets["trijetmassm2j5b1"]->Fill( Htop_mass , PUweight );
|
2490 |
algomez |
1.18 |
hjets["trijetptm2j5b1"]->Fill( Htop_pt , PUweight );
|
2491 |
algomez |
1.17 |
hjets["deltaRmindijetm2j5b1"]->Fill( deltaRminjj , PUweight );
|
2492 |
|
|
hjets["deltaRmu2jetm2j5b1"]->Fill( deltaRmu2j , PUweight );
|
2493 |
|
|
hjets["deltaPhidijetm2j5b1"]->Fill( deltaPhijj , PUweight );
|
2494 |
|
|
hjets["deltaPhimu2jetm2j5b1"]->Fill( deltaPhimu2j , PUweight );
|
2495 |
|
|
hjets["Stlepm2j5b1"]->Fill( Stlep, PUweight );
|
2496 |
|
|
hjets["Htm2j5b1"]->Fill( Ht, PUweight );
|
2497 |
|
|
hjets["Njetsm2j5b1"]->Fill( njets, PUweight );
|
2498 |
|
|
}
|
2499 |
|
|
if (njets >= 6){
|
2500 |
|
|
hjets["Stjetm2j6b1"]->Fill( Stjet , PUweight );
|
2501 |
|
|
hjets["DeltaRdijetm2j6b1"]->Fill( deltaRjj , PUweight );
|
2502 |
|
|
hjets["DeltaPhiMETWlepm2j6b1"]->Fill( DeltaPhiMETWlep , PUweight );
|
2503 |
|
|
hjets["trijetmassm2j6b1"]->Fill( Htop_mass , PUweight );
|
2504 |
algomez |
1.18 |
hjets["trijetptm2j6b1"]->Fill( Htop_pt , PUweight );
|
2505 |
algomez |
1.17 |
hjets["deltaRmindijetm2j6b1"]->Fill( deltaRminjj , PUweight );
|
2506 |
|
|
hjets["deltaRmu2jetm2j6b1"]->Fill( deltaRmu2j , PUweight );
|
2507 |
|
|
hjets["deltaPhidijetm2j6b1"]->Fill( deltaPhijj , PUweight );
|
2508 |
|
|
hjets["deltaPhimu2jetm2j6b1"]->Fill( deltaPhimu2j , PUweight );
|
2509 |
|
|
hjets["Stlepm2j6b1"]->Fill( Stlep, PUweight );
|
2510 |
|
|
hjets["Htm2j6b1"]->Fill( Ht, PUweight );
|
2511 |
|
|
hjets["Njetsm2j6b1"]->Fill( njets, PUweight );
|
2512 |
|
|
}
|
2513 |
|
|
}
|
2514 |
|
|
|
2515 |
|
|
if ( Nbtags_CSVL >= 2 ){
|
2516 |
|
|
if (njets == 4){
|
2517 |
|
|
hjets["Stjetm2j4b2"]->Fill( Stjet , PUweight );
|
2518 |
|
|
hjets["DeltaRdijetm2j4b2"]->Fill( deltaRjj , PUweight );
|
2519 |
|
|
hjets["DeltaPhiMETWlepm2j4b2"]->Fill( DeltaPhiMETWlep , PUweight );
|
2520 |
|
|
hjets["trijetmassm2j4b2"]->Fill( Htop_mass , PUweight );
|
2521 |
algomez |
1.18 |
hjets["trijetptm2j4b2"]->Fill( Htop_pt , PUweight );
|
2522 |
algomez |
1.17 |
hjets["deltaRmindijetm2j4b2"]->Fill( deltaRminjj , PUweight );
|
2523 |
|
|
hjets["deltaRmu2jetm2j4b2"]->Fill( deltaRmu2j , PUweight );
|
2524 |
|
|
hjets["deltaPhidijetm2j4b2"]->Fill( deltaPhijj , PUweight );
|
2525 |
|
|
hjets["deltaPhimu2jetm2j4b2"]->Fill( deltaPhimu2j , PUweight );
|
2526 |
|
|
hjets["Stlepm2j4b2"]->Fill( Stlep, PUweight );
|
2527 |
|
|
hjets["Htm2j4b2"]->Fill( Ht, PUweight );
|
2528 |
|
|
hjets["Njetsm2j4b2"]->Fill( njets, PUweight );
|
2529 |
|
|
}
|
2530 |
|
|
if (njets == 5){
|
2531 |
|
|
hjets["Stjetm2j5b2"]->Fill( Stjet , PUweight );
|
2532 |
|
|
hjets["DeltaRdijetm2j5b2"]->Fill( deltaRjj , PUweight );
|
2533 |
|
|
hjets["DeltaPhiMETWlepm2j5b2"]->Fill( DeltaPhiMETWlep , PUweight );
|
2534 |
|
|
hjets["trijetmassm2j5b2"]->Fill( Htop_mass , PUweight );
|
2535 |
algomez |
1.18 |
hjets["trijetptm2j5b2"]->Fill( Htop_pt , PUweight );
|
2536 |
algomez |
1.17 |
hjets["deltaRmindijetm2j5b2"]->Fill( deltaRminjj , PUweight );
|
2537 |
|
|
hjets["deltaRmu2jetm2j5b2"]->Fill( deltaRmu2j , PUweight );
|
2538 |
|
|
hjets["deltaPhidijetm2j5b2"]->Fill( deltaPhijj , PUweight );
|
2539 |
|
|
hjets["deltaPhimu2jetm2j5b2"]->Fill( deltaPhimu2j , PUweight );
|
2540 |
|
|
hjets["Stlepm2j5b2"]->Fill( Stlep, PUweight );
|
2541 |
|
|
hjets["Htm2j5b2"]->Fill( Ht, PUweight );
|
2542 |
|
|
hjets["Njetsm2j5b2"]->Fill( njets, PUweight );
|
2543 |
|
|
}
|
2544 |
|
|
if (njets >= 6){
|
2545 |
|
|
hjets["Stjetm2j6b2"]->Fill( Stjet , PUweight );
|
2546 |
|
|
hjets["DeltaRdijetm2j6b2"]->Fill( deltaRjj , PUweight );
|
2547 |
|
|
hjets["DeltaPhiMETWlepm2j6b2"]->Fill( DeltaPhiMETWlep , PUweight );
|
2548 |
|
|
hjets["trijetmassm2j6b2"]->Fill( Htop_mass , PUweight );
|
2549 |
algomez |
1.18 |
hjets["trijetptm2j6b2"]->Fill( Htop_pt , PUweight );
|
2550 |
algomez |
1.17 |
hjets["deltaRmindijetm2j6b2"]->Fill( deltaRminjj , PUweight );
|
2551 |
|
|
hjets["deltaRmu2jetm2j6b2"]->Fill( deltaRmu2j , PUweight );
|
2552 |
|
|
hjets["deltaPhidijetm2j6b2"]->Fill( deltaPhijj , PUweight );
|
2553 |
|
|
hjets["deltaPhimu2jetm2j6b2"]->Fill( deltaPhimu2j , PUweight );
|
2554 |
|
|
hjets["Stlepm2j6b2"]->Fill( Stlep, PUweight );
|
2555 |
|
|
hjets["Htm2j6b2"]->Fill( Ht, PUweight );
|
2556 |
|
|
hjets["Njetsm2j6b2"]->Fill( njets, PUweight );
|
2557 |
|
|
}
|
2558 |
|
|
}
|
2559 |
|
|
|
2560 |
algomez |
1.18 |
} */
|
2561 |
|
|
|
2562 |
|
|
if ( Nbtags_CSVL == 0){
|
2563 |
|
|
hjets["Njetsj4b0"]->Fill( njets, PUweight );
|
2564 |
|
|
hjets["Stjetj4b0"]->Fill( Stjet , PUweight );
|
2565 |
|
|
if (njets == 5) hjets["Stjetj5b0"]->Fill( Stjet , PUweight );
|
2566 |
|
|
if (njets == 6) hjets["Stjetj6b0"]->Fill( Stjet , PUweight );
|
2567 |
|
|
if (njets >= 7) hjets["Stjetj7b0"]->Fill( Stjet , PUweight );
|
2568 |
|
|
}
|
2569 |
|
|
if ( Nbtags_CSVL >= 1){
|
2570 |
|
|
hjets["Njetsj4b1"]->Fill( njets, PUweight );
|
2571 |
|
|
hjets["Stjetj4b1"]->Fill( Stjet , PUweight );
|
2572 |
|
|
if (njets == 5) hjets["Stjetj5b1"]->Fill( Stjet , PUweight );
|
2573 |
|
|
if (njets == 6) hjets["Stjetj6b1"]->Fill( Stjet , PUweight );
|
2574 |
|
|
if (njets >= 7) hjets["Stjetj7b1"]->Fill( Stjet , PUweight );
|
2575 |
|
|
}
|
2576 |
|
|
if ( Nbtags_CSVL >= 2){
|
2577 |
|
|
hjets["Njetsj4b2"]->Fill( njets, PUweight );
|
2578 |
algomez |
1.17 |
}
|
2579 |
algomez |
1.18 |
if ( Nbtags_CSVL >= 3){
|
2580 |
|
|
hjets["Njetsj4b3"]->Fill( njets, PUweight );
|
2581 |
algomez |
1.16 |
}
|
2582 |
algomez |
1.18 |
if ( Nbtags_CSVL >= 4){
|
2583 |
|
|
hjets["Njetsj4b4"]->Fill( njets, PUweight );
|
2584 |
algomez |
1.16 |
}
|
2585 |
algomez |
1.18 |
|
2586 |
|
|
/////////////////////////////////////////////////////////// Cuts
|
2587 |
algomez |
1.15 |
if ( Ht < 300. ) return kTRUE;
|
2588 |
algomez |
1.6 |
|
2589 |
algomez |
1.14 |
if ( Ht >= 300.0 ) {
|
2590 |
algomez |
1.15 |
cutmap["Ht"] += PUweight;
|
2591 |
algomez |
1.18 |
/*if(Nbtags_CSVM == 4){
|
2592 |
algomez |
1.16 |
cout <<"Run : "<< ntuple->run <<", Lumi : "<< ntuple->lumi << ", Event: "<< ntuple->event << endl;
|
2593 |
|
|
for (size_t h = 0; h < p4jets.size(); ++h){
|
2594 |
|
|
TopJetEvent jet = jets[h];
|
2595 |
|
|
cout << h << " " << p4jets[h].Pt() << " " << jet.btag_CSV << endl;
|
2596 |
|
|
}
|
2597 |
algomez |
1.18 |
}*/
|
2598 |
algomez |
1.16 |
|
2599 |
algomez |
1.15 |
|
2600 |
algomez |
1.16 |
/*double jet1CSVMpt = 0;
|
2601 |
algomez |
1.15 |
double jet2CSVMpt = 0;
|
2602 |
|
|
double jet3CSVMpt = 0;
|
2603 |
|
|
double jet4CSVMpt = 0;
|
2604 |
|
|
double jet1CSVLpt = 0;
|
2605 |
|
|
double jet2CSVLpt = 0;
|
2606 |
|
|
double jet3CSVLpt = 0;
|
2607 |
algomez |
1.16 |
double jet4CSVLpt = 0;*/
|
2608 |
algomez |
1.15 |
|
2609 |
|
|
//if ( Nbtags_CSVM < 1 ) return kTRUE;
|
2610 |
|
|
|
2611 |
algomez |
1.16 |
/*if ( Nbtags_CSVL > 0 ){ jet1CSVLpt = p4bjetscsvl[0].Pt(); hjets["jet1_CSVL_pt"]->Fill ( jet1CSVLpt, PUweight ); }
|
2612 |
algomez |
1.15 |
if ( Nbtags_CSVL > 1 ){ jet2CSVLpt = p4bjetscsvl[1].Pt(); hjets["jet2_CSVL_pt"]->Fill ( jet2CSVLpt, PUweight ); }
|
2613 |
|
|
if ( Nbtags_CSVL > 2 ){ jet3CSVLpt = p4bjetscsvl[2].Pt(); hjets["jet3_CSVL_pt"]->Fill ( jet3CSVLpt, PUweight ); }
|
2614 |
|
|
if ( Nbtags_CSVL > 3 ){ jet4CSVLpt = p4bjetscsvl[3].Pt(); hjets["jet4_CSVL_pt"]->Fill ( jet4CSVLpt, PUweight ); }
|
2615 |
|
|
if ( Nbtags_CSVM > 0 ){ jet1CSVMpt = p4bjetscsvm[0].Pt(); hjets["jet1_CSVM_pt"]->Fill ( jet1CSVMpt, PUweight ); }
|
2616 |
|
|
if ( Nbtags_CSVM > 1 ){ jet2CSVMpt = p4bjetscsvm[1].Pt(); hjets["jet2_CSVM_pt"]->Fill ( jet2CSVMpt, PUweight ); }
|
2617 |
|
|
if ( Nbtags_CSVM > 2 ){ jet3CSVMpt = p4bjetscsvl[2].Pt(); hjets["jet3_CSVM_pt"]->Fill ( jet3CSVMpt, PUweight ); }
|
2618 |
algomez |
1.16 |
if ( Nbtags_CSVM > 3 ){ jet4CSVMpt = p4bjetscsvl[3].Pt(); hjets["jet4_CSVM_pt"]->Fill ( jet4CSVMpt, PUweight ); } */
|
2619 |
|
|
|
2620 |
algomez |
1.17 |
|
2621 |
algomez |
1.18 |
if ( !fbtag_up && !fbtag_down && Nbtags_CSVL < 3 ){ cutmap["4Jet0b"] += PUweight; return kTRUE;}
|
2622 |
|
|
if ( fbtag_down && NbtagsDown_CSVL < 3 ){ cutmap["4Jet0b"] += PUweight; return kTRUE;}
|
2623 |
|
|
if ( fbtag_up && NbtagsUp_CSVL < 3) { cutmap["4Jet0b"] += PUweight; return kTRUE;}
|
2624 |
|
|
//if ( Nbtags_CSVL < 3 ) return kTRUE;
|
2625 |
|
|
if ( Nbtags_CSVL > 2){
|
2626 |
algomez |
1.15 |
cutmap["4Jet1b"] += PUweight;
|
2627 |
algomez |
1.18 |
//return kTRUE;
|
2628 |
algomez |
1.17 |
|
2629 |
|
|
//double jet1CSVLpt = p4bjetscsvl[0].Pt();
|
2630 |
|
|
//hjets["jet1_CSVL_pt"]->Fill ( jet1CSVLpt, PUweight );
|
2631 |
|
|
|
2632 |
|
|
hMET["Ht"]->Fill( Ht, PUweight );
|
2633 |
|
|
hMET["MET"]->Fill( p4MET.Pt(), PUweight );
|
2634 |
|
|
hMET["phi"]->Fill( p4MET.Phi(), PUweight );
|
2635 |
|
|
hMET["Stlep"]->Fill( Stlep , PUweight );
|
2636 |
|
|
hMET["Stjet"]->Fill( Stjet , PUweight );
|
2637 |
|
|
hjets["Njets"]->Fill( njets, PUweight );
|
2638 |
|
|
hjets["1st_pt"]->Fill( p4jets[0].Pt(), PUweight );
|
2639 |
|
|
hjets["1st_eta"]->Fill( p4jets[0].Eta(), PUweight );
|
2640 |
|
|
hjets["2nd_pt"]->Fill( p4jets[1].Pt(), PUweight );
|
2641 |
|
|
hjets["2nd_eta"]->Fill( p4jets[1].Eta(), PUweight );
|
2642 |
|
|
hjets["3rd_pt"]->Fill( p4jets[2].Pt(), PUweight );
|
2643 |
|
|
hjets["3rd_eta"]->Fill( p4jets[2].Eta(), PUweight );
|
2644 |
|
|
hjets["4th_pt"]->Fill( p4jets[3].Pt(), PUweight );
|
2645 |
|
|
hjets["4th_eta"]->Fill( p4jets[3].Eta(), PUweight );
|
2646 |
|
|
hjets["5th_pt"]->Fill( p4jets[4].Pt(), PUweight );
|
2647 |
|
|
hjets["6th_pt"]->Fill( p4jets[5].Pt(), PUweight );
|
2648 |
|
|
hjets["7th_pt"]->Fill( p4jets[6].Pt(), PUweight );
|
2649 |
|
|
hjets["mindeltaRjj"]->Fill( deltaRminjj, PUweight );
|
2650 |
|
|
hjets["deltaRjj"]->Fill( deltaRjj, PUweight );
|
2651 |
|
|
hjets["deltaPhijj"]->Fill( deltaPhijj, PUweight );
|
2652 |
|
|
hjets["deltaRmu2j"]->Fill( deltaRmu2j, PUweight );
|
2653 |
|
|
hjets["deltaPhimu2j"]->Fill( deltaPhimu2j, PUweight );
|
2654 |
|
|
hmuons["N"]->Fill( total_muons, PUweight );
|
2655 |
|
|
hmuons["pt"]->Fill( p4lepton.Pt(), PUweight );
|
2656 |
|
|
hmuons["eta"]->Fill( p4lepton.Eta(), PUweight );
|
2657 |
|
|
hmuons["phi"]->Fill( p4lepton.Phi(), PUweight );
|
2658 |
|
|
hmuons["deltaR"]->Fill( deltaR, PUweight );
|
2659 |
|
|
hM["WMt"]->Fill( WMt, PUweight );
|
2660 |
|
|
|
2661 |
|
|
// B-tagging
|
2662 |
|
|
hjets["Nbtags_CSVL"]->Fill( Nbtags_CSVL, PUweight );
|
2663 |
|
|
hjets["Nbtags_CSVM"]->Fill( Nbtags_CSVM, PUweight );
|
2664 |
|
|
hjets["Nbtags_CSVT"]->Fill( Nbtags_CSVT, PUweight );
|
2665 |
|
|
hjets["Nbtags_TCHPM"]->Fill( Nbtags_TCHPM, PUweight );
|
2666 |
|
|
|
2667 |
|
|
|
2668 |
|
|
hM["hadW_mass"]->Fill( hadW_mass, PUweight );
|
2669 |
algomez |
1.18 |
hM["hadW_pt"]->Fill( hadW_pt, PUweight );
|
2670 |
|
|
hM["Htop_mass"]->Fill( Htop_mass, PUweight );
|
2671 |
|
|
hM["Htop_pt"]->Fill( Htop_pt, PUweight );
|
2672 |
algomez |
1.17 |
hM["Leptop_mass"]->Fill( Leptop_mass, PUweight );
|
2673 |
|
|
hM["Leptop_pt"]->Fill( Leptop_pt, PUweight );
|
2674 |
|
|
hM["lepW_mass"]->Fill(lepW_mass, PUweight );
|
2675 |
algomez |
1.18 |
hM["lepW_pt"]->Fill( lepW_pt, PUweight );
|
2676 |
|
|
hM["secondhadW_mass"]->Fill( secondhadW_mass, PUweight );
|
2677 |
|
|
hM["secondhadW_pt"]->Fill( secondhadW_pt, PUweight );
|
2678 |
|
|
if ( secondHtop_mass > 0) {
|
2679 |
|
|
hM["secondHtop_mass"]->Fill( secondHtop_mass, PUweight );
|
2680 |
|
|
hM["secondHtop_pt"]->Fill( secondHtop_pt, PUweight );
|
2681 |
|
|
}
|
2682 |
|
|
hM["chi2"]->Fill( bestchi2, PUweight );
|
2683 |
|
|
hM["dileadjet"]->Fill( dileadjet_mass, PUweight );
|
2684 |
algomez |
1.17 |
hM["diWdeltaphi"]->Fill( diWdeltaphi , PUweight );
|
2685 |
|
|
hM["diWdeltaR"]->Fill( diWdeltaR , PUweight );
|
2686 |
|
|
hMET["deltaPhiMETWlep"]->Fill( DeltaPhiMETWlep , PUweight );
|
2687 |
|
|
hMET["deltaPhiMETlep"]->Fill( DeltaPhiMETlep , PUweight );
|
2688 |
|
|
hMET["deltaPhiNulep"]->Fill( DeltaPhiNulep , PUweight );
|
2689 |
|
|
|
2690 |
algomez |
1.18 |
/* vector<double>mvaInputVal;
|
2691 |
|
|
mvaInputVal.push_back( Stjet );
|
2692 |
|
|
double jet2_pt = p4jets[1].Pt();
|
2693 |
|
|
double jet3_pt = p4jets[2].Pt();
|
2694 |
|
|
double jet4_pt = p4jets[3].Pt();
|
2695 |
|
|
mvaInputVal.push_back( jet2_pt );
|
2696 |
|
|
mvaInputVal.push_back( jet3_pt );
|
2697 |
|
|
mvaInputVal.push_back( jet4_pt );
|
2698 |
|
|
double jet1_eta = p4jets[0].Eta();
|
2699 |
|
|
double jet2_eta = p4jets[1].Eta();
|
2700 |
|
|
double jet3_eta = p4jets[2].Eta();
|
2701 |
|
|
double jet4_eta = p4jets[3].Eta();
|
2702 |
|
|
mvaInputVal.push_back( jet1_eta );
|
2703 |
|
|
mvaInputVal.push_back( jet2_eta );
|
2704 |
|
|
mvaInputVal.push_back( jet3_eta );
|
2705 |
|
|
mvaInputVal.push_back( jet4_eta );
|
2706 |
|
|
double deltaRmindijet = deltaRminjj;
|
2707 |
|
|
mvaInputVal.push_back( deltaRmindijet );
|
2708 |
|
|
mvaInputVal.push_back( diWdeltaR);
|
2709 |
|
|
double deltaRdijet = deltaRjj;
|
2710 |
|
|
mvaInputVal.push_back( deltaRdijet);
|
2711 |
|
|
double deltaRmu2jet = deltaRmu2j;
|
2712 |
|
|
mvaInputVal.push_back( deltaRmu2jet );
|
2713 |
|
|
double Muonpt = p4lepton.Pt();
|
2714 |
|
|
mvaInputVal.push_back( Muonpt );
|
2715 |
|
|
double Muoneta = p4lepton.Eta();
|
2716 |
|
|
mvaInputVal.push_back( Muoneta );
|
2717 |
|
|
double MuondeltaR = deltaR;
|
2718 |
|
|
mvaInputVal.push_back( MuondeltaR );
|
2719 |
|
|
double MET = p4MET.Pt();
|
2720 |
|
|
mvaInputVal.push_back( MET );
|
2721 |
|
|
double Htopmass = Htop_mass;
|
2722 |
|
|
mvaInputVal.push_back( Htopmass);
|
2723 |
|
|
double Htoppt = Htop_pt;
|
2724 |
|
|
mvaInputVal.push_back( Htoppt);
|
2725 |
|
|
double Leptopmass = Leptop_mass;
|
2726 |
|
|
mvaInputVal.push_back( Leptopmass);
|
2727 |
|
|
double Leptoppt = Leptop_pt;
|
2728 |
|
|
mvaInputVal.push_back( Leptoppt);
|
2729 |
|
|
double jet_number = njets;
|
2730 |
|
|
mvaInputVal.push_back( jet_number);
|
2731 |
|
|
double numBjets_csvl = Nbtags_CSVL;
|
2732 |
|
|
mvaInputVal.push_back( numBjets_csvl );
|
2733 |
|
|
|
2734 |
|
|
bdtresponse = mvaReader.GetMvaValue( mvaInputVal );
|
2735 |
|
|
if ( bdtresponse > - 0.3 ){ */
|
2736 |
|
|
|
2737 |
|
|
|
2738 |
algomez |
1.15 |
if ( p4jets[3].Pt() > 50.){
|
2739 |
|
|
cutmap["4JetCut"] += PUweight;
|
2740 |
algomez |
1.18 |
if ( Stjet >= 500 ) {
|
2741 |
algomez |
1.15 |
cutmap["Stjet"] += PUweight;
|
2742 |
algomez |
1.18 |
//hPVs["Nreweight_cut2"]->Fill( total_pvs, PUweight );
|
2743 |
algomez |
1.17 |
hMET["Ht_cut2"]->Fill( Ht, PUweight );
|
2744 |
|
|
hMET["MET_cut2"]->Fill( p4MET.Pt(), PUweight );
|
2745 |
|
|
hMET["Stlep_cut2"]->Fill( Stlep , PUweight );
|
2746 |
|
|
hMET["Stjet_cut2"]->Fill( Stjet , PUweight );
|
2747 |
|
|
hM["lepW_mass_cut2"]->Fill(p4LepW.M(), PUweight );
|
2748 |
|
|
hMET["deltaPhiMETWlep_cut2"]->Fill( DeltaPhiMETWlep , PUweight );
|
2749 |
|
|
hMET["deltaPhiMETlep_cut2"]->Fill( DeltaPhiMETlep , PUweight );
|
2750 |
|
|
hMET["deltaPhiNulep_cut2"]->Fill( DeltaPhiNulep , PUweight );
|
2751 |
|
|
hjets["Njets_cut2"]->Fill(njets, PUweight );
|
2752 |
|
|
hjets["1st_pt_cut2"]->Fill( p4jets[0].Pt(), PUweight );
|
2753 |
|
|
hjets["1st_eta_cut2"]->Fill( p4jets[0].Eta(), PUweight );
|
2754 |
|
|
hjets["2nd_pt_cut2"]->Fill( p4jets[1].Pt(), PUweight );
|
2755 |
|
|
hjets["2nd_eta_cut2"]->Fill( p4jets[1].Eta(), PUweight );
|
2756 |
|
|
hjets["3rd_pt_cut2"]->Fill( p4jets[2].Pt(), PUweight );
|
2757 |
|
|
hjets["4th_pt_cut2"]->Fill( p4jets[3].Pt(), PUweight );
|
2758 |
|
|
hjets["5th_pt_cut2"]->Fill( p4jets[4].Pt(), PUweight );
|
2759 |
|
|
hjets["6th_pt_cut2"]->Fill( p4jets[5].Pt(), PUweight );
|
2760 |
|
|
hjets["deltaRjj_cut2"]->Fill( deltaRminjj, PUweight );
|
2761 |
|
|
hmuons["pt_cut2"]->Fill( p4lepton.Pt(), PUweight );
|
2762 |
|
|
hmuons["deltaR_cut2"]->Fill( deltaR, PUweight );
|
2763 |
|
|
hM["WMt_cut2"]->Fill( WMt, PUweight );
|
2764 |
|
|
hM["dileadjet_cut2"]->Fill( dileadjet_mass, PUweight );
|
2765 |
|
|
hM["hadW_mass_cut2"]->Fill( hadW_mass, PUweight );
|
2766 |
algomez |
1.18 |
hM["Htop_mass_cut2"]->Fill( Htop_mass, PUweight );
|
2767 |
|
|
hM["Htop_pt_cut2"]->Fill( Htop_pt, PUweight );
|
2768 |
algomez |
1.15 |
} // Stjet cut
|
2769 |
|
|
} // 4 leading jet
|
2770 |
|
|
|
2771 |
algomez |
1.17 |
//if ( njets < 4 ) return kTRUE;
|
2772 |
algomez |
1.14 |
// Variables in 4Tree
|
2773 |
algomez |
1.10 |
MyStoreTree->GetGeneralVariable()->PUWeight = PUweight;
|
2774 |
algomez |
1.17 |
MyStoreTree->GetMuonVariable()->Muonpt = p4lepton.Pt();
|
2775 |
|
|
MyStoreTree->GetMuonVariable()->Muoneta = p4lepton.Eta();
|
2776 |
|
|
MyStoreTree->GetMuonVariable()->Muonphi = p4lepton.Phi();
|
2777 |
|
|
MyStoreTree->GetMuonVariable()->MuondeltaR = deltaR;
|
2778 |
algomez |
1.10 |
MyStoreTree->GetMetVariable()->Ht = Ht;
|
2779 |
algomez |
1.15 |
MyStoreTree->GetMetVariable()->MET = p4MET.Pt();
|
2780 |
algomez |
1.17 |
MyStoreTree->GetMetVariable()->METphi = p4MET.Phi();
|
2781 |
algomez |
1.10 |
MyStoreTree->GetMetVariable()->Stlep = Stlep;
|
2782 |
|
|
MyStoreTree->GetMetVariable()->Stjet = Stjet;
|
2783 |
algomez |
1.18 |
MyStoreTree->GetMetVariable()->dileadjetmass = dileadjet_mass;
|
2784 |
algomez |
1.17 |
MyStoreTree->GetMetVariable()->diWdeltaphi = diWdeltaphi;
|
2785 |
|
|
MyStoreTree->GetMetVariable()->diWdeltaR = diWdeltaR;
|
2786 |
algomez |
1.15 |
MyStoreTree->GetMetVariable()->DeltaPhiMETWlep = DeltaPhiMETWlep;
|
2787 |
|
|
MyStoreTree->GetMetVariable()->DeltaPhiMETlep = DeltaPhiMETlep;
|
2788 |
|
|
MyStoreTree->GetMetVariable()->DeltaPhiNulep = DeltaPhiNulep;
|
2789 |
algomez |
1.17 |
MyStoreTree->GetMetVariable()->LepWPt = lepW_pt;
|
2790 |
algomez |
1.18 |
MyStoreTree->GetMetVariable()->Leptopmass = Leptop_mass;
|
2791 |
|
|
MyStoreTree->GetMetVariable()->Leptoppt = Leptop_pt;
|
2792 |
|
|
MyStoreTree->GetMetVariable()->hadWmass = hadW_mass;
|
2793 |
|
|
MyStoreTree->GetMetVariable()->hadWpt = hadW_pt;
|
2794 |
|
|
MyStoreTree->GetMetVariable()->Htopmass = Htop_mass;
|
2795 |
|
|
MyStoreTree->GetMetVariable()->Htoppt = Htop_pt;
|
2796 |
|
|
MyStoreTree->GetMetVariable()->secondHtopmass = secondHtop_mass;
|
2797 |
|
|
MyStoreTree->GetMetVariable()->secondHtoppt = secondHtop_pt;
|
2798 |
|
|
MyStoreTree->GetMetVariable()->secondhadWmass = secondhadW_mass;
|
2799 |
|
|
MyStoreTree->GetMetVariable()->secondhadWpt = secondhadW_pt;
|
2800 |
|
|
MyStoreTree->GetMetVariable()->chi2 = bestchi2;
|
2801 |
algomez |
1.10 |
MyStoreTree->GetJetVariable()->numjets= njets;
|
2802 |
algomez |
1.11 |
MyStoreTree->GetJetVariable()->numBjets_csvl= Nbtags_CSVL;
|
2803 |
algomez |
1.14 |
MyStoreTree->GetJetVariable()->numBjets_csvm= Nbtags_CSVM;
|
2804 |
|
|
MyStoreTree->GetJetVariable()->numBjets_csvt= Nbtags_CSVT;
|
2805 |
|
|
MyStoreTree->GetJetVariable()->jet1pt = p4jets[0].Pt() ;
|
2806 |
|
|
MyStoreTree->GetJetVariable()->jet2pt = p4jets[1].Pt() ;
|
2807 |
|
|
MyStoreTree->GetJetVariable()->jet3pt = p4jets[2].Pt() ;
|
2808 |
|
|
MyStoreTree->GetJetVariable()->jet4pt = p4jets[3].Pt() ;
|
2809 |
algomez |
1.18 |
MyStoreTree->GetJetVariable()->jet1eta = p4jets[0].Eta() ;
|
2810 |
|
|
MyStoreTree->GetJetVariable()->jet2eta = p4jets[1].Eta() ;
|
2811 |
|
|
MyStoreTree->GetJetVariable()->jet3eta = p4jets[2].Eta() ;
|
2812 |
|
|
MyStoreTree->GetJetVariable()->jet4eta = p4jets[3].Eta() ;
|
2813 |
algomez |
1.16 |
MyStoreTree->GetJetVariable()->deltaRmindijet = deltaRminjj ;
|
2814 |
algomez |
1.15 |
MyStoreTree->GetJetVariable()->deltaRdijet = deltaRjj ;
|
2815 |
algomez |
1.16 |
MyStoreTree->GetJetVariable()->deltaPhidijet = deltaPhijj ;
|
2816 |
|
|
MyStoreTree->GetJetVariable()->deltaRmu2jet = deltaRmu2j ;
|
2817 |
|
|
MyStoreTree->GetJetVariable()->deltaPhimu2jet = deltaPhimu2j ;
|
2818 |
algomez |
1.17 |
//MyStoreTree->GetJetVariable()->jet1CSVLpt = jet1CSVLpt ;
|
2819 |
|
|
/*if (p4bjetscsvl[1].Pt() < 1000 && p4bjetscsvl[1].Pt() > 40 ) MyStoreTree->GetJetVariable()->jet2CSVLpt = p4bjetscsvl[1].Pt() ;
|
2820 |
algomez |
1.16 |
if (p4bjetscsvl[2].Pt() < 1000 && p4bjetscsvl[2].Pt() > 40 ) MyStoreTree->GetJetVariable()->jet3CSVLpt = p4bjetscsvl[2].Pt() ;
|
2821 |
|
|
if (p4bjetscsvl[3].Pt() < 1000 && p4bjetscsvl[3].Pt() > 40 ) MyStoreTree->GetJetVariable()->jet4CSVLpt = p4bjetscsvl[3].Pt() ;
|
2822 |
|
|
if (p4bjetscsvm[0].Pt() < 1000 && p4bjetscsvm[0].Pt() > 40 ) MyStoreTree->GetJetVariable()->jet1CSVMpt = p4bjetscsvm[0].Pt() ;
|
2823 |
|
|
if (p4bjetscsvm[1].Pt() < 1000 && p4bjetscsvm[1].Pt() > 40 ) MyStoreTree->GetJetVariable()->jet2CSVMpt = p4bjetscsvm[1].Pt() ;
|
2824 |
|
|
if (p4bjetscsvm[2].Pt() < 1000 && p4bjetscsvm[2].Pt() > 40 ) MyStoreTree->GetJetVariable()->jet3CSVMpt = p4bjetscsvm[2].Pt() ;
|
2825 |
|
|
if (p4bjetscsvm[3].Pt() < 1000 && p4bjetscsvm[3].Pt() > 40 ) MyStoreTree->GetJetVariable()->jet4CSVMpt = p4bjetscsvm[3].Pt() ;*/
|
2826 |
algomez |
1.10 |
//////////////////////////////////////////////////////////////////////////////////
|
2827 |
algomez |
1.17 |
|
2828 |
algomez |
1.18 |
//////////////////////////////////////////////////////////////////////////////////
|
2829 |
|
|
//if ( njets < 7 ) return kTRUE;
|
2830 |
|
|
if ( njets > 6){
|
2831 |
|
|
cutmap["7Jet"] += PUweight;
|
2832 |
|
|
hjets["Njets_7jets"]->Fill( njets, PUweight);
|
2833 |
|
|
hjets["Nbtags_CSVL_7jets"]->Fill( Nbtags_CSVL, PUweight);
|
2834 |
|
|
}
|
2835 |
|
|
|
2836 |
|
|
//if ( njets < 8 ) return kTRUE;
|
2837 |
|
|
if ( njets > 7){
|
2838 |
|
|
cutmap["8Jet"] += PUweight;
|
2839 |
|
|
hjets["Njets_8jets"]->Fill( njets, PUweight);
|
2840 |
|
|
hjets["Nbtags_CSVL_8jets"]->Fill( Nbtags_CSVL, PUweight);
|
2841 |
|
|
}
|
2842 |
|
|
|
2843 |
|
|
//if ( njets < 9 ) return kTRUE;
|
2844 |
|
|
if ( njets > 8){
|
2845 |
|
|
cutmap["9Jet"] += PUweight;
|
2846 |
|
|
hjets["Njets_9jets"]->Fill( njets, PUweight);
|
2847 |
|
|
hjets["Nbtags_CSVL_9jets"]->Fill( Nbtags_CSVL, PUweight);
|
2848 |
|
|
}
|
2849 |
algomez |
1.17 |
} // 1 btag */
|
2850 |
algomez |
1.15 |
} // Ht
|
2851 |
|
|
} // jets
|
2852 |
algomez |
1.1 |
|
2853 |
algomez |
1.9 |
MyStoreTree->GetGeneralVariable()->Run = ntuple->run;
|
2854 |
|
|
MyStoreTree->GetGeneralVariable()->Lumi = ntuple->lumi;
|
2855 |
|
|
MyStoreTree->GetGeneralVariable()->Event = ntuple->event;
|
2856 |
algomez |
1.8 |
|
2857 |
algomez |
1.13 |
MyStoreTree->GetStoreTree()->Fill();
|
2858 |
algomez |
1.14 |
|
2859 |
algomez |
1.1 |
if (fVerbose) cout << "done analysis" << endl;
|
2860 |
|
|
return kTRUE;
|
2861 |
|
|
}
|
2862 |
|
|
|
2863 |
|
|
void Analyzer::SlaveTerminate()
|
2864 |
|
|
{
|
2865 |
|
|
// The SlaveTerminate() function is called after all entries or objects
|
2866 |
|
|
// have been processed. When running with PROOF SlaveTerminate() is called
|
2867 |
|
|
// on each slave server.
|
2868 |
|
|
|
2869 |
|
|
// fill cutflow histogram
|
2870 |
|
|
|
2871 |
|
|
int ibin = 1;
|
2872 |
|
|
for ( vector<string>::const_iterator ivec= fCutLabels.begin(); ivec != fCutLabels.end(); ++ivec )
|
2873 |
|
|
// for ( map<string, int >::const_iterator imap=cutmap.begin(); imap!=cutmap.end(); ++imap )
|
2874 |
|
|
{
|
2875 |
|
|
hcutflow->SetBinContent( ibin, cutmap[ *ivec ] );
|
2876 |
|
|
ibin++;
|
2877 |
|
|
}
|
2878 |
algomez |
1.8 |
|
2879 |
algomez |
1.1 |
// Write the ntuple to the file
|
2880 |
|
|
if (fFile) {
|
2881 |
algomez |
1.8 |
Bool_t cleanup = kFALSE;
|
2882 |
|
|
TDirectory *savedir = gDirectory;
|
2883 |
algomez |
1.15 |
if(MyStoreTree->GetStoreTree()->GetEntries() > 0){
|
2884 |
algomez |
1.8 |
fFile->cd();
|
2885 |
|
|
h1test->Write();
|
2886 |
|
|
hcutflow->Write();
|
2887 |
algomez |
1.15 |
MyStoreTree->GetStoreTree()->Write();
|
2888 |
algomez |
1.8 |
//h2_pt_Wprime->Write();
|
2889 |
|
|
fFile->mkdir("muons");
|
2890 |
|
|
fFile->cd("muons");
|
2891 |
|
|
for ( map<string,TH1* >::const_iterator imap=hmuons.begin(); imap!=hmuons.end(); ++imap ) {
|
2892 |
|
|
TH1 *temp = imap->second;
|
2893 |
|
|
if ( temp->GetEntries() > 0 )
|
2894 |
|
|
temp->Write();
|
2895 |
|
|
//else cout << "Warning: empty histogram " << temp->GetName() << " will not be written to file." << endl;
|
2896 |
|
|
}
|
2897 |
|
|
fFile->cd();
|
2898 |
|
|
fFile->mkdir("PVs");
|
2899 |
|
|
fFile->cd("PVs");
|
2900 |
|
|
for ( map<string,TH1* >::const_iterator imap=hPVs.begin(); imap!=hPVs.end(); ++imap ) {
|
2901 |
|
|
TH1 *temp = imap->second;
|
2902 |
|
|
if ( temp->GetEntries() > 0 )
|
2903 |
|
|
temp->Write();
|
2904 |
|
|
//else cout << "Warning: empty histogram " << temp->GetName() << " will not be written to file." << endl;
|
2905 |
|
|
}
|
2906 |
|
|
fFile->cd();
|
2907 |
|
|
fFile->mkdir("jets");
|
2908 |
|
|
fFile->cd("jets");
|
2909 |
|
|
for ( map<string,TH1* >::const_iterator imap=hjets.begin(); imap!=hjets.end(); ++imap ) {
|
2910 |
|
|
TH1 *temp = imap->second;
|
2911 |
|
|
if ( temp->GetEntries() > 0 )
|
2912 |
|
|
temp->Write();
|
2913 |
|
|
}
|
2914 |
|
|
fFile->cd();
|
2915 |
|
|
fFile->mkdir("mass");
|
2916 |
|
|
fFile->cd("mass");
|
2917 |
|
|
for ( map<string,TH1* >::const_iterator imap=hM.begin(); imap!=hM.end(); ++imap ) {
|
2918 |
|
|
TH1 *temp = imap->second;
|
2919 |
|
|
if ( temp->GetEntries() > 0 )
|
2920 |
|
|
temp->Write();
|
2921 |
|
|
}
|
2922 |
|
|
fFile->cd();
|
2923 |
|
|
fFile->mkdir("MET");
|
2924 |
|
|
fFile->cd("MET");
|
2925 |
|
|
for ( map<string,TH1* >::const_iterator imap=hMET.begin(); imap!=hMET.end(); ++imap ) {
|
2926 |
|
|
TH1 *temp = imap->second;
|
2927 |
|
|
if ( temp->GetEntries() > 0 )
|
2928 |
|
|
temp->Write();
|
2929 |
|
|
}
|
2930 |
|
|
fFile->cd();
|
2931 |
|
|
|
2932 |
|
|
fProofFile->Print();
|
2933 |
|
|
fOutput->Add(fProofFile);
|
2934 |
|
|
} else {
|
2935 |
|
|
cleanup = kTRUE;
|
2936 |
|
|
}
|
2937 |
algomez |
1.1 |
|
2938 |
|
|
|
2939 |
|
|
h1test->SetDirectory(0);
|
2940 |
|
|
hcutflow->SetDirectory(0);
|
2941 |
algomez |
1.15 |
MyStoreTree->GetStoreTree()->SetDirectory(0);
|
2942 |
algomez |
1.1 |
gDirectory = savedir;
|
2943 |
|
|
fFile->Close();
|
2944 |
|
|
// Cleanup, if needed
|
2945 |
|
|
if (cleanup) {
|
2946 |
algomez |
1.8 |
TUrl uf(*(fFile->GetEndpointUrl()));
|
2947 |
|
|
SafeDelete(fFile);
|
2948 |
|
|
gSystem->Unlink(uf.GetFile());
|
2949 |
|
|
SafeDelete(fProofFile);
|
2950 |
algomez |
1.1 |
}
|
2951 |
|
|
}
|
2952 |
|
|
|
2953 |
|
|
}
|
2954 |
|
|
|
2955 |
|
|
void Analyzer::Terminate()
|
2956 |
|
|
{
|
2957 |
|
|
// The Terminate() function is the last function to be called during
|
2958 |
|
|
// a query. It always runs on the client, it can be used to present
|
2959 |
|
|
// the results graphically or save the results to file.
|
2960 |
|
|
|
2961 |
|
|
Info("Terminate","Analyzer done.");
|
2962 |
|
|
}
|