ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitHzz4l/NonMCBackground/src/compute_fakes.cc
Revision: 1.1
Committed: Sat Dec 17 21:29:32 2011 UTC (13 years, 5 months ago) by dkralph
Content type: text/plain
Branch: MAIN
CVS Tags: synced_FSR_2, synced_FSR, synched2, synched, AN490
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 dkralph 1.1 #include "compute_fakes.h"
2    
3     //=== MAIN =================================================================================================
4     void makeHTML(const TString outDir);
5     TGraphAsymmErrors* computeFakeRate1D(const TH1F* hpass, const TH1F* htotal);
6     void computeFakeRate2D(const TH2D *hpass, const TH2D* htotal,
7     TH2D *hresult, TH2D* herrl, TH2D* herrh);
8    
9     int main(int argc, char** argv)
10     {
11    
12     TString input("./NonMCBackground/data/elefr.input");
13     TString format("png");
14     Bool_t doAbsEta = kFALSE;
15     TString seletype("bdt");
16     TString tightness("medium");
17    
18     //
19     // args
20     //--------------------------------------------------------------------------------------------------------------
21     FOFlags ctrl;
22     parse_foargs( argc, argv, ctrl );
23     ctrl.dump();
24    
25     //--------------------------------------------------------------------------------------------------------------
26     // Settings
27     //==============================================================================================================
28    
29     // bin edges for kinematic variables
30     vector<Double_t> ptBinEdgesv;
31     vector<Double_t> etaBinEdgesv;
32     vector<Double_t> phiBinEdgesv;
33    
34     TString outputDir;
35    
36     vector<TString> fnamev;
37     vector<Int_t> colorv;
38     vector<TString> labelv;
39    
40     //
41     // parse .fo file
42     //
43     ifstream ifs;
44     ifs.open(input.Data());
45     assert(ifs.is_open());
46     string line;
47     Int_t state=0;
48     while(getline(ifs,line)) {
49     if(line[0]=='#') continue;
50     if(line[0]=='%') {
51     state++;
52     continue;
53     }
54    
55     if(state==0) {
56     // outputDir = line;
57     outputDir = ctrl.inputdir;
58    
59     } else if(state==1) {
60     stringstream ss(line);
61     string fname;
62     Int_t color;
63     ss >> fname >> color;
64     string label = line.substr(line.find('@')+1);
65     // fnamev.push_back(fname);
66     fnamev.push_back(ctrl.inputdir); // not used!
67     colorv.push_back(color);
68     labelv.push_back(label);
69    
70     } else if(state>=2 && state<=4) {
71     Double_t edge;
72     stringstream ss(line);
73     ss >> edge;
74     if(state==2) { etaBinEdgesv.push_back(edge); }
75     else if(state==3) { ptBinEdgesv.push_back(edge); }
76     else if(state==4) { phiBinEdgesv.push_back(edge); }
77     }
78     }
79     ifs.close();
80    
81     // CPlot::sOutDir = outputDir + TString("/plots");
82    
83     Double_t yhigh1 = 0.5;
84    
85     //--------------------------------------------------------------------------------------------------------------
86     // Main analysis code
87     //==============================================================================================================
88    
89     //
90     // Set up histograms
91     //
92     TH1F *hNumerPt0=0, *hNumerEta0=0, *hNumerPhi0=0;
93     TH1F *hDenomPt0=0, *hDenomEta0=0, *hDenomPhi0=0;
94    
95     vector<TH1F*> hNumerPtv;
96     vector<TH1F*> hNumerEtav;
97     vector<TH1F*> hNumerPhiv;
98    
99     vector<TH1F*> hDenomPtv;
100     vector<TH1F*> hDenomEtav;
101     vector<TH1F*> hDenomPhiv;
102    
103     vector<TGraphAsymmErrors*> effPtv;
104     vector<TGraphAsymmErrors*> effEtav;
105     vector<TGraphAsymmErrors*> effPhiv;
106    
107     vector<TH2D*> hNumerEtaPtv, hDenomEtaPtv, hEffEtaPtv, hErrlEtaPtv, hErrhEtaPtv;
108    
109     Int_t nbins = ptBinEdgesv.size()-1;
110     Double_t *ptbinning = new Double_t[ptBinEdgesv.size()];
111     for(UInt_t i=0; i<ptBinEdgesv.size(); i++) { ptbinning[i] = ptBinEdgesv[i]; }
112     hNumerPt0 = new TH1F("hNumerPt0","",nbins,ptbinning);
113     hDenomPt0 = new TH1F("hDenomPt0","",nbins,ptbinning);
114     for(UInt_t ifile=0; ifile<fnamev.size(); ifile++) {
115     char hname[100];
116     sprintf(hname,"hNumerPt_%i",ifile); hNumerPtv.push_back(new TH1F(hname,"",nbins,ptbinning)); hNumerPtv[ifile]->Sumw2();
117     sprintf(hname,"hDenomPt_%i",ifile); hDenomPtv.push_back(new TH1F(hname,"",nbins,ptbinning)); hDenomPtv[ifile]->Sumw2();
118     }
119    
120     nbins = etaBinEdgesv.size()-1;
121     Double_t *etabinning = new Double_t[etaBinEdgesv.size()];
122     for(UInt_t i=0; i<etaBinEdgesv.size(); i++) { etabinning[i] = etaBinEdgesv[i]; }
123     hNumerEta0 = new TH1F("hNumerEta0","",nbins,etabinning);
124     hDenomEta0 = new TH1F("hDenomEta0","",nbins,etabinning);
125     for(UInt_t ifile=0; ifile<fnamev.size(); ifile++) {
126     char hname[100];
127     sprintf(hname,"hNumerEta_%i",ifile); hNumerEtav.push_back(new TH1F(hname,"",nbins,etabinning)); hNumerEtav[ifile]->Sumw2();
128     sprintf(hname,"hDenomEta_%i",ifile); hDenomEtav.push_back(new TH1F(hname,"",nbins,etabinning)); hDenomEtav[ifile]->Sumw2();
129     }
130    
131     nbins = phiBinEdgesv.size()-1;
132     Double_t *phibinning = new Double_t[phiBinEdgesv.size()];
133     for(UInt_t i=0; i<phiBinEdgesv.size(); i++) { phibinning[i] = phiBinEdgesv[i]; }
134     hNumerPhi0 = new TH1F("hNumerPhi0","",nbins,phibinning);
135     hDenomPhi0 = new TH1F("hDenomPhi0","",nbins,phibinning);
136     for(UInt_t ifile=0; ifile<fnamev.size(); ifile++) {
137     char hname[100];
138     sprintf(hname,"hNumerPhi_%i",ifile); hNumerPhiv.push_back(new TH1F(hname,"",nbins,phibinning)); hNumerPhiv[ifile]->Sumw2();
139     sprintf(hname,"hDenomPhi_%i",ifile); hDenomPhiv.push_back(new TH1F(hname,"",nbins,phibinning)); hDenomPhiv[ifile]->Sumw2();
140     }
141    
142     for(UInt_t ifile=0; ifile<fnamev.size(); ifile++) {
143     char hname[100];
144     sprintf(hname,"hNumerEtaPt_%i",ifile);
145     hNumerEtaPtv.push_back(new TH2D(hname,"",etaBinEdgesv.size()-1,etabinning,ptBinEdgesv.size()-1,ptbinning));
146     hNumerEtaPtv[ifile]->Sumw2();
147    
148     sprintf(hname,"hDenomEtaPt_%i",ifile);
149     hDenomEtaPtv.push_back(new TH2D(hname,"",etaBinEdgesv.size()-1,etabinning,ptBinEdgesv.size()-1,ptbinning));
150     hDenomEtaPtv[ifile]->Sumw2();
151    
152     sprintf(hname,"hEffEtaPt_%i",ifile);
153     hEffEtaPtv.push_back(new TH2D(hname,"",etaBinEdgesv.size()-1,etabinning,ptBinEdgesv.size()-1,ptbinning));
154     hEffEtaPtv[ifile]->Sumw2();
155    
156     sprintf(hname,"hErrlEtaPt_%i",ifile);
157     hErrlEtaPtv.push_back(new TH2D(hname,"",etaBinEdgesv.size()-1,etabinning,ptBinEdgesv.size()-1,ptbinning));
158     hErrlEtaPtv[ifile]->Sumw2();
159    
160     sprintf(hname,"hErrhEtaPt_%i",ifile);
161     hErrhEtaPtv.push_back(new TH2D(hname,"",etaBinEdgesv.size()-1,etabinning,ptBinEdgesv.size()-1,ptbinning));
162     hErrhEtaPtv[ifile]->Sumw2();
163     }
164    
165     delete [] ptbinning;
166     delete [] etabinning;
167     delete [] phibinning;
168    
169     TChain *inchain = new TChain("FO","FO");
170     TString inputfilename(ctrl.inputdir + "/fo.root");
171     cout << "Adding: " << inputfilename << "... " << endl;
172     inchain->Add(inputfilename);
173    
174     Float_t pt,eta,phi,pass,jpt;
175     inchain->SetBranchAddress( "pt", &pt);
176     inchain->SetBranchAddress( "eta", &eta);
177     inchain->SetBranchAddress( "phi", &phi);
178     inchain->SetBranchAddress( "pass", &pass);
179     inchain->SetBranchAddress( "jpt", &jpt);
180    
181     for(UInt_t ientry=0; ientry<inchain->GetEntries(); ientry++) {
182     inchain->GetEntry(ientry);
183    
184     if(pt < ptBinEdgesv.front() || pt > ptBinEdgesv.back()) continue;
185     if(doAbsEta) {
186     if(fabs(eta) < etaBinEdgesv.front() || fabs(eta) > etaBinEdgesv.back()) continue;
187     } else {
188     if(eta < etaBinEdgesv.front() || eta > etaBinEdgesv.back()) continue;
189     }
190    
191     double weight = 1;
192    
193     hDenomPt0 ->Fill(pt,weight);
194     hDenomEta0->Fill(doAbsEta ? fabs(eta) : eta,weight);
195    
196     hDenomPtv[0] ->Fill(pt,weight);
197     hDenomEtav[0]->Fill(doAbsEta ? fabs(eta) : eta,weight);
198     hDenomEtaPtv[0]->Fill(doAbsEta ? fabs(eta) : eta,pt,weight);
199    
200     if(pass) {
201     hNumerPt0 ->Fill(pt,weight);
202     hNumerEta0->Fill(doAbsEta ? fabs(eta) : eta,weight);
203    
204     hNumerPtv[0] ->Fill(pt,weight);
205     hNumerEtav[0]->Fill(doAbsEta ? fabs(eta) : eta,weight);
206     hNumerEtaPtv[0]->Fill(doAbsEta ? fabs(eta) : eta,pt,weight);
207     }
208    
209     }
210    
211     TGraphAsymmErrors *frPt = computeFakeRate1D(hNumerPtv[0],hDenomPtv[0]);
212     TGraphAsymmErrors *frEta = computeFakeRate1D(hNumerEtav[0],hDenomEtav[0]);
213    
214     computeFakeRate2D(hNumerEtaPtv[0],hDenomEtaPtv[0],hEffEtaPtv[0],hErrlEtaPtv[0],hErrhEtaPtv[0]);
215    
216     TH2D *frEtaPt = (TH2D*)hEffEtaPtv[0]->Clone("frEtaPt");
217     TH2D *errlEtaPt = (TH2D*)hErrlEtaPtv[0]->Clone("errlEtaPt");
218     TH2D *errhEtaPt = (TH2D*)hErrhEtaPtv[0]->Clone("errhEtaPt");
219    
220     //--------------------------------------------------------------------------------------------------------------
221     // Make plots
222     //==============================================================================================================
223     TCanvas *c = new TCanvas("c","c",800,600);
224     char ylabel[100];
225     TString etalabel = (doAbsEta) ? "#scale[1.3]{|#eta|}" : "#scale[1.3]{#eta}";
226    
227     TString outputdirectory(ctrl.inputdir + "/plots");
228    
229     //
230     // Denominator distributions
231     //
232     sprintf(ylabel,"Events / %.1f GeV/c",hDenomPtv[0]->GetBinWidth(1));
233     CPlot plotDenomPt("denompt","","denominator p_{T} [GeV/c]",ylabel,outputdirectory);
234     for(UInt_t ifile=0; ifile<1; ifile++) {
235     plotDenomPt.AddToStack(hDenomPtv[ifile],labelv[ifile],colorv[ifile]);
236     }
237     plotDenomPt.TransLegend(0.1,0);
238     plotDenomPt.Draw(c,kTRUE,format);
239    
240     plotDenomPt.SetName("denomptlog");
241     // plotDenomPt.SetLogy();
242     plotDenomPt.Draw(c,kTRUE,format);
243    
244     sprintf(ylabel,"Events / %.1f",hDenomEtav[0]->GetBinWidth(1));
245     CPlot plotDenomEta("denometa","","denominator #eta",ylabel,outputdirectory);
246     for(UInt_t ifile=0; ifile<1; ifile++) {
247     plotDenomEta.AddToStack(hDenomEtav[ifile],labelv[ifile],colorv[ifile]);
248     }
249     plotDenomEta.SetYRange(0,2.0*(plotDenomEta.GetStack()->GetMaximum()));
250     plotDenomEta.Draw(c,kTRUE,format);
251    
252     //
253     // Numerator distributions
254     //
255     sprintf(ylabel,"Events / %.1f GeV/c",hNumerPtv[0]->GetBinWidth(1));
256     CPlot plotNumerPt("numerpt","","numerator p_{T} [GeV/c]",ylabel,outputdirectory);
257     for(UInt_t ifile=0; ifile<1; ifile++) {
258     plotNumerPt.AddToStack(hNumerPtv[ifile],labelv[ifile],colorv[ifile]);
259     }
260     plotNumerPt.TransLegend(0.1,0);
261     plotNumerPt.Draw(c,kTRUE,format);
262    
263     plotNumerPt.SetName("numerptlog");
264     // plotNumerPt.SetLogy();
265     plotNumerPt.Draw(c,kTRUE,format);
266    
267     sprintf(ylabel,"Events / %.1f",hNumerEtav[0]->GetBinWidth(1));
268     CPlot plotNumerEta("numereta","","numerator #eta",ylabel,outputdirectory);
269     for(UInt_t ifile=0; ifile<1; ifile++) {
270     plotNumerEta.AddToStack(hNumerEtav[ifile],labelv[ifile],colorv[ifile]);
271     }
272     plotNumerEta.SetYRange(0,2.0*(plotNumerEta.GetStack()->GetMaximum()));
273     plotNumerEta.Draw(c,kTRUE,format);
274    
275     //
276     // Fakeable object kinematic distributions
277     //
278     sprintf(ylabel,"Events / %.1f GeV/c",hDenomPt0->GetBinWidth(1));
279     CPlot plotPt("pt","","p_{T} [GeV/c]",ylabel,outputdirectory);
280     plotPt.AddHist1D(hDenomPt0,"loose","hist",kBlue,7);
281     plotPt.AddHist1D(hNumerPt0,"tight","hist",kRed);
282     plotPt.TransLegend(0.1,0);
283     plotPt.Draw(c,kTRUE,format);
284    
285     plotPt.SetName("ptlog");
286     plotPt.SetYRange(1e-4*(hDenomPt0->GetMaximum()),10*(hDenomPt0->GetMaximum()));
287     // plotPt.SetLogy();
288     plotPt.Draw(c,kTRUE,format);
289    
290     sprintf(ylabel,"Events / %.1f",hDenomEta0->GetBinWidth(1));
291     CPlot plotEta("eta","","#eta",ylabel,outputdirectory);
292     plotEta.AddHist1D(hDenomEta0,"loose","hist",kBlue,7);
293     plotEta.AddHist1D(hNumerEta0,"tight","hist",kRed);
294     plotEta.SetYRange(0,2.0*(hDenomEta0->GetMaximum()));
295     plotEta.Draw(c,kTRUE,format);
296    
297     //
298     // Fake rate plots
299     //
300     CPlot plotFRPt("frpt","","#scale[1.3]{p_{T} [GeV/c]}","#scale[1.5]{#varepsilon_{fake}}",outputdirectory);
301     plotFRPt.AddGraph(frPt,"");
302     plotFRPt.SetYRange(0,yhigh1);
303     plotFRPt.AddTextBox(seletype+" "+tightness,0.25,0.75,0.45,0.85);
304     plotFRPt.Draw(c,kTRUE,format);
305    
306     CPlot plotFREta("freta","",etalabel,"#scale[1.5]{#varepsilon_{fake}}",outputdirectory);
307     plotFREta.AddGraph(frEta,"");
308     plotFREta.SetYRange(0,yhigh1);
309     plotFREta.AddTextBox(seletype+" "+tightness,0.25,0.75,0.45,0.85);
310     plotFREta.Draw(c,kTRUE,format);
311    
312     // gStyle->SetPalette(1);
313     c->SetRightMargin(0.15);
314     c->SetLeftMargin(0.15);
315     frEtaPt->SetTitleOffset(1.2,"Y");
316     // TPaletteAxis *paxis = (TPaletteAxis*)frEtaPt->GetListOfFunctions()->FindObject("palette");
317     // paxis->SetX1NDC(0.87);
318     // paxis->SetX2NDC(0.92);
319     CPlot plotFRPtEta("frpteta","",etalabel,"p_{T} [GeV/c]",outputdirectory);
320     plotFRPtEta.AddHist2D(frEtaPt,"COLZ");
321     plotFRPtEta.Draw(c,kTRUE,format);
322    
323     //--------------------------------------------------------------------------------------------------------------
324     // Summary print out
325     //==============================================================================================================
326    
327     TFile outfile(outputDir + TString("/fr.root"),"RECREATE");
328     frPt->Write();
329     frEta->Write();
330     frEtaPt->Write();
331     errlEtaPt->Write();
332     errhEtaPt->Write();
333     outfile.Close();
334    
335     makeHTML(outputDir);
336    
337     cout << " <> Output saved in " << outputDir << "/" << endl;
338     cout << endl;
339     }
340    
341    
342     //=== FUNCTION DEFINITIONS ======================================================================================
343    
344     //--------------------------------------------------------------------------------------------------
345     TGraphAsymmErrors* computeFakeRate1D(const TH1F* hpass, const TH1F* htotal)
346     {
347     const Int_t nbins = htotal->GetNbinsX();
348     Double_t xval[nbins], xerr[nbins], yval[nbins], yerrl[nbins], yerrh[nbins];
349     for(Int_t ibin=1; ibin<=nbins; ibin++) {
350     xval[ibin-1] = htotal->GetBinCenter(ibin);
351     xerr[ibin-1] = 0.5*htotal->GetBinWidth(ibin);
352    
353     Int_t total = htotal->GetBinContent(ibin);
354     Int_t passed = hpass->GetBinContent(ibin);
355     yval[ibin-1] = (total>0) ? (Double_t)passed/(Double_t)total : 0;
356     yerrl[ibin-1] = (total>0) ? yval[ibin-1] - TEfficiency::ClopperPearson(total,passed,0.68269,kFALSE) : 0;
357     yerrh[ibin-1] = (total>0) ? TEfficiency::ClopperPearson(total,passed,0.68269,kTRUE) - yval[ibin-1] : 0;
358     }
359    
360     return new TGraphAsymmErrors(nbins,xval,yval,xerr,xerr,yerrl,yerrh);
361     }
362    
363     //--------------------------------------------------------------------------------------------------
364     void computeFakeRate2D(const TH2D *hpass, const TH2D* htotal,
365     TH2D *hresult, TH2D* herrl, TH2D* herrh)
366     {
367     assert(hresult);
368     assert(herrl);
369     assert(herrh);
370    
371     const Int_t nbinsx = htotal->GetNbinsX();
372     const Int_t nbinsy = htotal->GetNbinsY();
373     for(Int_t ix=1; ix<=nbinsx; ix++) {
374     for(Int_t iy=1; iy<=nbinsy; iy++) {
375     Int_t total = htotal->GetCellContent(ix,iy);
376     Int_t passed = hpass->GetCellContent(ix,iy);
377     Double_t eff = (total>0) ? (Double_t)passed/(Double_t)total : 0;
378     Double_t errl = (total>0) ? eff - TEfficiency::ClopperPearson(total,passed,0.68269,kFALSE) : 0;
379     Double_t errh = (total>0) ? TEfficiency::ClopperPearson(total,passed,0.68269,kTRUE) - eff : 0;
380     hresult->SetCellContent(ix,iy,eff);
381     herrl ->SetCellContent(ix,iy,errl);
382     herrh ->SetCellContent(ix,iy,errh);
383     }
384     }
385     }
386    
387     //--------------------------------------------------------------------------------------------------
388     void makeHTML(const TString outDir)
389     {
390     ofstream htmlfile;
391     char htmlfname[100];
392     sprintf(htmlfname,"%s/fr.html",outDir.Data());
393     htmlfile.open(htmlfname);
394     htmlfile << "<!DOCTYPE html" << endl;
395     htmlfile << " PUBLIC \"-//W3C//DTD HTML 3.2//EN\">" << endl;
396     htmlfile << "<html>" << endl;
397    
398     htmlfile << "<body bgcolor=\"EEEEEE\">" << endl;
399    
400     htmlfile << "<table border=\"0\" cellspacing=\"5\" width=\"100%\">" << endl;
401     htmlfile << "<tr>" << endl;
402     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/frpteta.png\"><img src=\"plots/frpteta.png\" alt=\"plots/frpteta.png\" width=\"100%\"></a></td>" << endl;
403     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/frpt.png\"><img src=\"plots/frpt.png\" alt=\"plots/frpt.png\" width=\"100%\"></a></td>" << endl;
404     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/freta.png\"><img src=\"plots/freta.png\" alt=\"plots/freta.png\" width=\"100%\"></a></td>" << endl;
405     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/frphi.png\"><img src=\"plots/frphi.png\" alt=\"plots/frphi.png\" width=\"100%\"></a></td>" << endl;
406     htmlfile << "</tr>" << endl;
407     htmlfile << "<tr>" << endl;
408     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/frnpv.png\"><img src=\"plots/frnpv.png\" alt=\"plots/frnpv.png\" width=\"100%\"></a></td>" << endl;
409     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/frptnpv.png\"><img src=\"plots/frptnpv.png\" alt=\"plots/frptnpv.png\" width=\"100%\"></a></td>" << endl;
410     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/fretanpv.png\"><img src=\"plots/fretanpv.png\" alt=\"plots/fretanpv.png\" width=\"100%\"></a></td>" << endl;
411     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/frphinpv.png\"><img src=\"plots/frphinpv.png\" alt=\"plots/frphinpv.png\" width=\"100%\"></a></td>" << endl;
412     htmlfile << "</tr>" << endl;
413     htmlfile << "</table>" << endl;
414     htmlfile << "<hr />" << endl;
415    
416     htmlfile << "<table border=\"0\" cellspacing=\"5\" width=\"100%\">" << endl;
417     htmlfile << "<tr>" << endl;
418     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/denompt.png\"><img src=\"plots/denompt.png\" alt=\"plots/denompt.png\" width=\"100%\"></a></td>" << endl;
419     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/denomptlog.png\"><img src=\"plots/denomptlog.png\" alt=\"plots/denomptlog.png\" width=\"100%\"></a></td>" << endl;
420     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/denometa.png\"><img src=\"plots/denometa.png\" alt=\"plots/denometa.png\" width=\"100%\"></a></td>" << endl;
421     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/denomphi.png\"><img src=\"plots/denomphi.png\" alt=\"plots/denomphi.png\" width=\"100%\"></a></td>" << endl;
422     htmlfile << "</tr>" << endl;
423     htmlfile << "<tr>" << endl;
424     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/numerpt.png\"><img src=\"plots/numerpt.png\" alt=\"plots/numerpt.png\" width=\"100%\"></a></td>" << endl;
425     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/numerptlog.png\"><img src=\"plots/numerptlog.png\" alt=\"plots/numerptlog.png\" width=\"100%\"></a></td>" << endl;
426     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/numereta.png\"><img src=\"plots/numereta.png\" alt=\"plots/numereta.png\" width=\"100%\"></a></td>" << endl;
427     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/numerphi.png\"><img src=\"plots/numerphi.png\" alt=\"plots/numerphi.png\" width=\"100%\"></a></td>" << endl;
428     htmlfile << "</tr>" << endl;
429     htmlfile << "<tr>" << endl;
430     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/pt.png\"><img src=\"plots/pt.png\" alt=\"plots/pt.png\" width=\"100%\"></a></td>" << endl;
431     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/ptlog.png\"><img src=\"plots/ptlog.png\" alt=\"plots/ptlog.png\" width=\"100%\"></a></td>" << endl;
432     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/eta.png\"><img src=\"plots/eta.png\" alt=\"plots/eta.png\" width=\"100%\"></a></td>" << endl;
433     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/phi.png\"><img src=\"plots/phi.png\" alt=\"plots/phi.png\" width=\"100%\"></a></td>" << endl;
434     htmlfile << "</tr>" << endl;
435     htmlfile << "</table>" << endl;
436     htmlfile << "<hr />" << endl;
437    
438     htmlfile << "<table border=\"0\" cellspacing=\"5\" width=\"100%\">" << endl;
439     htmlfile << "<tr>" << endl;
440     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/jetpt.png\"><img src=\"plots/jetpt.png\" alt=\"plots/jetpt.png\" width=\"100%\"></a></td>" << endl;
441     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/jetptlog.png\"><img src=\"plots/jetptlog.png\" alt=\"plots/jetptlog.png\" width=\"100%\"></a></td>" << endl;
442     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/frjetpt.png\"><img src=\"plots/frjetpt.png\" alt=\"plots/frjetpt.png\" width=\"100%\"></a></td>" << endl;
443     htmlfile << "<td width=\"25%\"></td>" << endl;
444     htmlfile << "</tr>" << endl;
445     htmlfile << "<tr>" << endl;
446     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/fojetpt.png\"><img src=\"plots/fojetpt.png\" alt=\"plots/fojetpt.png\" width=\"100%\"></a></td>" << endl;
447     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/fojetptlog.png\"><img src=\"plots/fojetptlog.png\" alt=\"plots/fojetptlog.png\" width=\"100%\"></a></td>" << endl;
448     htmlfile << "<td width=\"25%\"><a target=\"_blank\" href=\"plots/frfojetpt.png\"><img src=\"plots/frfojetpt.png\" alt=\"plots/frfojetpt.png\" width=\"100%\"></a></td>" << endl;
449     htmlfile << "<td width=\"25%\"></td>" << endl;
450     htmlfile << "</tr>" << endl;
451     htmlfile << "</table>" << endl;
452     htmlfile << "<hr />" << endl;
453    
454     htmlfile << "</body>" << endl;
455     htmlfile << "</html>" << endl;
456     htmlfile.close();
457     }