StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
BichselMostProbable.C
1 class Bichsel;
2 //Bichsel *m_Bichsel = Bichsel::instance();
3 Bichsel *m_Bichsel = Bichsel::Instance();
4 TF1 *sipi = 0, *sie = 0, *sip = 0, *siK = 0, *sid = 0, *sit = 0, *sihe3 = 0;
5 //________________________________________________________________________________
6 Double_t bichselZ(Double_t *x,Double_t *par) {
7  Double_t pove = pow(10.,x[0]);
8  Double_t ppion = pove;//*0.13956995;
9  Double_t poverm = ppion/par[0];
10  Int_t k = par[1];
11  Double_t charge2 = 1;
12  if (k == 1) {
13  charge2 = 4;
14  poverm *= 2;
15  }
16  Double_t val1 = m_Bichsel->GetMostProbableZ(TMath::Log10(poverm),1.);
17  // Double_t val2 = m_Bichsel->GetMostProbableZ(TMath::Log10(pove),1.);
18  Double_t val = val1;// - val2;
19  // cout << "pove\t" << pove << "\t" << val1 << "\tpoverm\t" << val2 << "\t" << val << endl;
20  return val;
21 }
22 //________________________________________________________________________________
23 
24 void BichselMostProbable() {
25  TCanvas *c1 = new TCanvas("c1","Bicksel Predictions for Most Probable log(dE/dx)");
26  TH1F *frame = c1->DrawFrame(-1,0,0,8);
27  frame->SetXTitle("log10(p) ");
28  frame->SetYTitle("log(dE/dx) ");
29  TLegend *leg = new TLegend(0.72,0.7,0.9,0.9,"");//TLegend(0.79,0.91,0.89,0.89,"");
30  sipi = new TF1("bipi",bichselZ,-1.,4.0,2);
31  sipi->SetParameter(0,0.13956995);
32  sipi->SetParameter(1,0);
33  sipi->Draw("same");
34 #if 0
35  sie = new TF1("bie",bichselZ,-1.,4.0,2);
36  sie->SetParameter(0,0.51099907e-3);
37  sie->SetParameter(1,3);
38  sie->SetLineColor(2);
39  leg->AddEntry(sie,"e-#pi","L");
40 // TF1 *sie1 = new TF1("bie1",bichselZ,-1.,4.0,2);
41 // sie1->SetParameter(0,0.51099907e-3);
42 // sie1->SetParameter(1,0);
43 // sie1->SetLineColor(2);
44 #endif
45  sip = new TF1("bi",bichselZ,-1.,4.0,2);
46  sip->SetParameter(0,0.93827231);
47  sip->SetParameter(1,0);
48  sip->SetLineColor(3);
49  sip->Draw("same");
50  leg->AddEntry(sip,"p","L");
51 #if 0
52  sim = new TF1("bim",bichselZ,-1.,4.0,2);
53  sim->SetParameter(0,0.1056584);
54  sim->SetParameter(1,0);
55  sim->SetLineColor(8);
56  leg->AddEntry(sim,"#mu","L");
57  siK = new TF1("biK",bichselZ,-1.,4.0,2);
58  siK->SetParameter(0,0.493677);
59  siK->SetParameter(1,0);
60  siK->SetLineColor(4);
61  leg->AddEntry(siK,"K","L");
62  sid = new TF1("bid",bichselZ,-1.,4.0,2);
63  sid->SetParameter(0,0.1876E+01);
64  sid->SetParameter(1,0);
65  sid->SetLineColor(6);
66  leg->AddEntry(sid,"d","L");
67  TF1 *sit = new TF1("bit",bichselZ,-1.,4.0,2);
68  sit->SetParameter(0,0.2809E+01);
69  sit->SetParameter(1,0);
70  sit->SetLineColor(7);
71  leg->AddEntry(sit,"t","L");
72 
73 // sihe3 = new TF1("bihe3",bichselZ,-1.,4.0,2);
74 // sihe3->SetParameter(0,0.2809E+01);
75 // sihe3->SetParameter(1,1);
76 // sihe3->SetLineColor(1);
77 // leg->AddEntry(sihe3,"He3","L");
78  sipi->Draw("same");
79  sim->Draw("same");
80  sie->Draw("same");
81  // sie1->Draw("same");
82  siK->Draw("same");
83  sip->Draw("same");
84  sid->Draw("same");
85  sit->Draw("same");
86 // sihe3->Draw("same");
87 #endif
88  leg->Draw();
89  c1->Update();
90 }
91