4 void doVogelNew(
int trig,
const char *flag)
6 gSystem->Load(
"$HOME/gamma/analysis/lib/AnaCuts");
16 nbins=cuts->nPtBinsMB;
18 h=
new TH1F(
"h",
"h",nbins,bins.GetArray());
19 if(strcmp(flag,
"pp05")==0) gifout=
"mbbincorrPP.gif";
20 if(strcmp(flag,
"dAu")==0) gifout=
"mbbincorrDAU.gif";
23 nbins=cuts->nPtBinsHT1;
25 h=
new TH1F(
"h",
"h",nbins,bins.GetArray());
26 if(strcmp(flag,
"pp05")==0) gifout=
"ht1bincorrPP.gif";
27 if(strcmp(flag,
"dAu")==0) gifout=
"ht1bincorrDAU.gif";
30 nbins=cuts->nPtBinsHT2;
32 h=
new TH1F(
"h",
"h",nbins,bins.GetArray());
33 if(strcmp(flag,
"pp05")==0) gifout=
"ht2bincorrPP.gif";
34 if(strcmp(flag,
"dAu")==0) gifout=
"ht2bincorrDAU.gif";
40 for(Int_t b=1;b<=nbins;b++){
41 Float_t xmin=bins[b-1];
43 Float_t dpT=xmax-xmin;
44 Float_t pT=xmin + 0.5*dpT;
47 TF1 *fit=
new TF1(
"fit",
"[0]*pow(1.+x,[1])*pow(x,[2])",1.,15.);
48 if(strcmp(flag,
"pp05")==0) fit->SetParameters(1.,-9.3,0.);
49 if(strcmp(flag,
"dAu")==0) fit->SetParameters(1.,-9.5,0.);
51 cout<<
"using exponent: "<<fit->GetParameter(1)<<endl;
54 N->SetParameter(2,1.);
56 cout<<xmin<<
" "<<xmax<<
" at "<<pT<<
" and "<<dpT<<endl;
57 Float_t ratio=fit->Eval(pT)/(N->Integral(xmin,xmax)/(pT*dpT));
61 h->SetBinContent(1,0);
65 TCanvas *cc=
new TCanvas(
"cc",
"cc",300,300);
70 if(trig==1) hname=
"h4mb";
71 else if(trig==2) hname=
"h4ht1";
72 else if(trig==3) hname=
"h4ht2";
75 if(strcmp(flag,
"pp05")==0) outf=
new TFile(
"bincorrectionsPP.root",
"UPDATE");
76 if(strcmp(flag,
"dAu")==0) outf=
new TFile(
"bincorrectionsDAU.root",
"UPDATE");