6 gSystem->Load(
"gamma/analysis/lib/AnaCuts");
16 nbins=cuts->nPtBinsMB;
18 h=
new TH1F(
"h",
"h",nbins,bins.GetArray());
19 gifout=
"mbbincorr.gif";
22 nbins=cuts->nPtBinsHT1;
24 h=
new TH1F(
"h",
"h",nbins,bins.GetArray());
25 gifout=
"ht1bincorr.gif";
28 nbins=cuts->nPtBinsHT2;
30 h=
new TH1F(
"h",
"h",nbins,bins.GetArray());
31 gifout=
"ht2bincorr.gif";
37 for(Int_t b=1;b<=nbins;b++){
38 Float_t xmin=bins[b-1];
40 Float_t dpT=xmax-xmin;
41 Float_t pT=xmin + 0.5*dpT;
43 cout<<xmin<<
" "<<xmax<<
" "<<dpT<<
" "<<pT<<endl;
45 TF1 *fit=
new TF1(
"fit",
"[0]*pow(1.+x,[1])*pow(x,[2])",1.,7.);
46 if(trig==2) fit->SetRange(4.,10.);
47 if(trig==3) fit->SetRange(8.,15.);
48 fit->SetParameters(1.,-10.,0.0);
49 fit->FixParameter(2,0.);
51 ifstream in(
"./pQCD.dat");
61 TGraph *g=
new TGraph(i,x,y);
63 fit->SetRange(0.,15.);
65 N->FixParameter(2,1.);
68 Float_t ratio=fit->Eval(pT)/(N->Integral(xmin,xmax)/(pT*dpT));
72 h->SetBinContent(1,0);
75 TCanvas *c=
new TCanvas(
"c",
"c",800,400);
79 g->SetMaximum(10.e+10);
88 c->SaveAs(
"vogelsang.eps");
90 TCanvas *cc=
new TCanvas(
"cc",
"cc",300,300);
95 if(trig==1) hname=
"h4mb";
96 else if(trig==2) hname=
"h4ht1";
97 else if(trig==3) hname=
"h4ht2";
99 TFile *outf=
new TFile(
"bincorrections.root",
"UPDATE");