5 g->GetHistogram()->SetTitle(tit);
6 g->GetHistogram()->SetMinimum(0);
8 g->SetMarkerColor(
col);
9 g->SetMarkerStyle(marker);
18 h->GetXaxis()->SetLabelSize(0.05);
19 h->GetXaxis()->SetTitleSize(0.05);
20 h->GetYaxis()->SetLabelSize(0.05);
21 h->GetYaxis()->SetTitleSize(0.05);
22 h->GetYaxis()->SetTitleOffset(1.4);
24 h->GetXaxis()->SetNdivisions(505);
34 if (tit==
"") tit=g->GetTitle();
36 double ymax = TMath::MaxElement(g->GetN(), g->GetY());
37 double dymax = g->GetErrorY(TMath::LocMax(g->GetN(), g->GetEY()));
41 xmin = TMath::MinElement(g->GetN(), g->GetX());
42 xmax = TMath::MaxElement(g->GetN(), g->GetX());
57 h->SetMaximum((ymax+dymax)*ymaxf);
65 void analyse_phi2(
double t=2,
double sigsmin=500,
double sigsmax=500,
int Nrep=1000,
int steps = 25,
double emin = 2.25,
double emax = 2.35,
double m=2.3,
double G=0.015)
69 gStyle->SetStatW(0.20);
70 gStyle->SetStatH(0.12);
72 double sigs=(sigsmax+sigsmin)*0.5;
75 double x[25] = {2.219, 2.221, 2.221, 2.222, 2.224, 2.226, 2.226, 2.228, 2.229, 2.231, 2.231, 2.233, 2.235, 2.236, 2.242, 2.247, 2.254, 2.255, 2.272, 2.289, 2.307, 2.333, 2.360, 2.404, 2.430};
76 double dx[25] = {0.0};
78 double y[25] = {4.15, 4.16, 3.87, 3.94, 4.40, 3.90, 3.68, 3.00, 3.20, 3.73, 2.97, 4.20, 3.52, 2.48, 3.38, 2.68, 2.63, 3.01, 2.25, 2.15, 1.97, 2.04, 2.04, 1.61, 1.93 };
79 double dy[25] = {0.34, 0.36, 0.54, 0.35, 0.36, 0.34, 0.34, 0.30, 0.32, 0.35, 0.33, 0.35, 0.34, 0.30, 0.45, 0.39, 0.35, 0.16, 0.17, 0.21, 0.24, 0.14, 0.12, 0.18, 0.11 };
82 TGraphErrors *gphi =
new TGraphErrors(25,x,y,dx,dy);
84 confgraph(gphi,
"#phi#phi cross section [JetSet];E_{cm} [GeV];#sigma [#mub]");
85 TH1F *hphi =
createHistoGraph(gphi,
"#phi#phi cross section [JetSet];E_{cm} [GeV];#sigma [#mub]",2.21,2.435);
88 TF1 *
f1=
new TF1(
"f1",
"0.5*[0]*(1.0-TMath::Erf((x-[1])/[2]))+[3]",2.21,2.435);
89 f1->SetParameters(3,2.23,0.01,1);
92 TF1 *finel=
new TF1(
"finel",
"[0]+[1]/x^[2]-[3]/x^[4]");
93 finel->SetParameters(32,82,0.67,45,0.85);
94 finel->SetRange(1.,100.);
96 TCanvas *
c1=
new TCanvas(
"c1",
"c1",20,20,1000,1000);
97 c1->Divide(2,2,0.0001,0.0001);
108 l.DrawLine(emin,0,emin,hphi->GetMaximum()*0.5);
109 l.DrawLine(emax,0,emax,hphi->GetMaximum()*0.5);
112 double effs = 22463./100000.;
114 double fBR = 0.489*0.489;
116 double effg = 77./840.5e6;
118 double sigphi = f1->Eval(2.3)*1000;
124 double S = sigs*effs*fBR*
t*Lint;
125 double Bphi = sigphi*effs*fBR*
t*Lint;
126 double Bg = sigg*effg*
t*Lint;
128 cout <<
"S="<<S<<
" B_phi(sig ="<<sigphi<<
" nb)="<<Bphi<<
" B_g="<<Bg<<endl;
132 TF1 *fbw =
new TF1(
"fbw",
"[0]*[3]*TMath::BreitWigner(x,[1],[2])");
133 fbw->SetParNames(
"#sigma_{S}",
"m",
"#Gamma",
"f_{scale}");
136 TF1 *fbg=
new TF1(
"fbg",
"pol3",2.21,2.435);
139 TF1 *ffit =
new TF1(
"ffit",
"[0]*TMath::BreitWigner(x,[1],[2]) + pol3(3)");
140 ffit->SetParNames(
"A",
"m",
"#Gamma",
"a_{0}",
"a_{1}",
"a_{2}",
"a_{3}");
145 double stsize = (emax-emin)/(steps-1);
147 TGraphErrors *gscan =
new TGraphErrors(steps);
148 TGraphErrors *gscansig =
new TGraphErrors(steps);
149 TGraphErrors *gscanbg =
new TGraphErrors(steps);
150 confgraph(gscan,Form(
"#phi#phi scan (t=%.2fd);E_{cm} [GeV];counts",
t));
151 confgraph(gscanbg,Form(
"#phi#phi scan (t=%.2fd);E_{cm} [GeV];counts",
t),16);
152 confgraph(gscansig,Form(
"#phi#phi scan (t=%.2fd);E_{cm} [GeV];counts",
t));
154 double st_t =
t/steps;
156 TH1F *hsigs =
new TH1F(
"hsigs",Form(
"#sigma_{S}, %d fits",Nrep),100,0,sigs*3);
158 hsigs->SetLineWidth(2);
160 TH1F *hscan=0, *hscansig=0;
162 for (
int j=0;j<Nrep;++j)
164 fbw->SetParameters(1,
m,G,1);
165 fbw->FixParameter(3,1);
167 for (
int i=0;
i<steps;++
i)
169 double ecm = emin +
i*stsize;
171 double st_sigs = fbw->Eval(ecm)/fbw->Eval(
m)*sigs;
172 double st_sigphi = f1->Eval(ecm)*1000;
173 double st_sigg = finel->Eval(ecm)*1e6;
175 double yieldS = gRandom->Poisson(st_sigs * effs * fBR * st_t * Lint);
176 double yieldBphi = gRandom->Poisson(st_sigphi * effs * fBR * st_t * Lint);
177 double yieldBg = gRandom->Poisson(st_sigg * effg * st_t * Lint);
181 double yield = (yieldS + yieldBg + yieldBphi);
183 gscan->SetPoint(
i,ecm, yield);
184 gscan->SetPointError(
i, 0,
sqrt(yield));
186 gscanbg->SetPoint(
i,ecm, gRandom->Poisson(yieldBg));
187 gscanbg->SetPointError(
i, 0,
sqrt(yieldBg));
190 ffit->SetParameters(sigs,
m,G,1,1,1);
191 ffit->FixParameter(1,
m);
192 ffit->FixParameter(2,G);
194 gscan->Fit(
"ffit",
"0q");
195 ffit->SetParLimits(1,
m*0.7,
m*1.3);
196 ffit->SetParLimits(2,G*0.5,G*1.5);
197 gscan->Fit(
"ffit",
"qm");
200 if (hscan==0) hscan =
createHistoGraph(gscan,Form(
"#phi#phi scan (t = %.2fd, #sigma = %.0fnb);E_{cm} [GeV];counts",
t,sigs),0,0,1.3);
202 gscan->Draw(
"Psame");
203 gscanbg->Draw(
"Psame");
205 fbg->SetParameters(ffit->GetParameter(3),ffit->GetParameter(4),ffit->GetParameter(5),ffit->GetParameter(6));
208 for (
int i=0;
i<steps;++
i)
211 gscan->GetPoint(
i,x,y);
212 gscansig->SetPoint(
i,x,y-fbg->Eval(x));
213 gscansig->SetPointError(
i,gscan->GetErrorX(
i),gscan->GetErrorY(
i));
218 fbw->FixParameter(3,1);
219 fbw->SetParLimits(1,
m*0.7,
m*1.3);
220 fbw->SetParLimits(2,G*0.6,G*1.5);
221 gscansig->Fit(
"fbw",
"q");
222 fbw->SetParameter(0,1);
224 fbw->FixParameter(3, 1./fbw->Eval(fbw->GetParameter(1))*(effs*fBR*st_t*Lint) );
225 fbw->SetParameter(0,TMath::MaxElement(gscansig->GetN(),gscansig->GetY())/(effs*fBR*st_t*Lint));
226 gscansig->Fit(
"fbw",
"q");
229 if (hscansig==0) hscansig =
createHistoGraph(gscansig,Form(
"#phi#phi scan (t = %.2fd, #sigma = %.0fnb);E_{cm} [GeV];counts",
t,sigs),0,0,1.3);
230 hscansig->SetMinimum(-100);
232 gscansig->Draw(
"Psame");
235 double ss = fbw->GetParameter(0);
244 if (j%100==0) c1->Update();
278 TPaveStats *st = (TPaveStats *)gscan->GetListOfFunctions()->FindObject(
"stats");
287 else cout <<
"***"<<endl;
friend F32vec4 sqrt(const F32vec4 &a)
TH1F * createHistoGraph(TGraph *g, TString tit="", double xmin=0, double xmax=0)
void confgraph(TGraph *g, TString tit, int col=1, int marker=20)
void analyse_phi2(double t=2, double sigsmin=500, double sigsmax=500, int Nrep=1000, int steps=25, double emin=2.25, double emax=2.35, double m=2.3, double G=0.015)
std::map< int, double > effs