9 TH1F *hPi =
new TH1F(
"hPi",
";#Delta Ln;entries", 200, -50, 50);
10 TH1F *hK =
new TH1F(
"hK",
";#Delta Ln;entries", 200, -50, 50);
11 TGraphAsymmErrors *gmom =
new TGraphAsymmErrors();
16 for (
double m = 0.5;
m <= 3.1;
m += 0.1) {
18 momentum.RotateX(30 / 180. * TMath::Pi());
20 for (
int i = 0; i < 1000; i++) {
22 hPi->Fill(info.
sigma[2]);
23 hK->Fill(info.
sigma[0]);
26 auto r1 = hPi->Fit(
"gaus",
"SQ0");
27 double m1 =
r1->Parameter(1);
28 double s1 =
r1->Parameter(2);
29 double dm1 =
r1->ParError(1);
30 double ds1 =
r1->ParError(2);
32 auto r2 = hK->Fit(
"gaus",
"SQ0");
33 double m2 =
r2->Parameter(1);
34 double s2 =
r2->Parameter(2);
35 double dm2 =
r2->ParError(1);
36 double ds2 =
r2->ParError(2);
38 double sep = (fabs(m1 - m2)) / (0.5 * (s1 + s2));
40 e1 = 2 / (s1 + s2) * dm1;
41 e2 = -2 / (s1 + s2) * dm2;
42 e3 = -2 * (m1 -
m2) / ((s1 + s2) * (s1 + s2)) * ds1;
43 e4 = -2 * (m1 -
m2) / ((s1 + s2) * (s1 + s2)) * ds2;
44 double esep = sqrt(e1 * e1 + e2 * e2 + e3 * e3 + e4 * e4) + 0.1;
46 gmom->SetPoint(
id,
m, sep);
47 gmom->SetPointEYhigh(
id, esep);
48 gmom->SetPointEYlow(
id, esep);
51 std::cout <<
"separation " << sep <<
" +/- " << esep << std::endl;
57 gmom->SetMarkerStyle(20);
58 gmom->SetMarkerSize(0.75);
59 gmom->GetXaxis()->SetTitle(
"momentum [GeV/c]");
60 gmom->GetYaxis()->SetTitle(
"separation [s.d.]");
61 gmom->GetXaxis()->SetLimits(0.3, 3.2);
62 gmom->GetXaxis()->SetRangeUser(0.3, 3.2);
63 gmom->GetYaxis()->SetRangeUser(0, 14);