7 const Char_t *FNames[5] = {
"BetheBloch",
"Girrf",
"Sirrf",
"B70M",
"B70"};
9 Double_t bfunc(Double_t *x,Double_t *par) {
10 if (! m_BetheBloch) m_BetheBloch =
new BetheBloch();
11 return m_BetheBloch->operator()(x[0]);
14 Double_t gfunc(Double_t *x,Double_t *par) {
18 return 1e-6*BetheBloch::Girrf(x[0],par[4],k);
21 Double_t sifunc(Double_t *x,Double_t *par) {
25 return 1e-6*BetheBloch::Sirrf(x[0],par[2],k);
28 Double_t bichselZ(Double_t *x,Double_t *par) {
32 return 1e-6*TMath::Exp(m_Bichsel->GetMostProbableZ(TMath::Log10(x[0]),par[3]));
35 Double_t bichsel70(Double_t *x,Double_t *par) {
37 Double_t poverm = pove/par[0];
43 return 1e-6*m_Bichsel->GetI70(TMath::Log10(poverm),par[3]);
46 Double_t bichsel70M(Double_t *x,Double_t *par) {
48 Double_t poverm = pove/par[0];
54 return 1e-6*m_Bichsel->GetI70M(TMath::Log10(poverm),par[3]);
57 Double_t bichsel60(Double_t *x,Double_t *par) {
61 return m_Bichsel->GetI60(TMath::Log10(x[0]),par[3]);
64 if (gClassTable->GetID(
"StBichsel") < 0) {
65 gSystem->Load(
"libTable");
66 gSystem->Load(
"St_base");
67 gSystem->Load(
"StarClassLibrary");
68 gSystem->Load(
"StBichsel");
70 if (!m_Bichsel) m_Bichsel =
new Bichsel();
71 TCanvas *c1 =
new TCanvas(
"c1");
77 TH1F *hr = c1->DrawFrame(1.e-1,1e-6,1.e3,2.e-4);
79 hr->SetTitle(
"dE/dx predictions (GeV/cm) versus #beta#gamma = p/m");
80 hr->SetXTitle(
"#beta#gamma ");
81 hr->SetYTitle(
"dE/dx (GeV/cm)");
84 Double_t
params[5] = { 1.0, 0., 60., 1., 1e-3};
85 TLegend *leg =
new TLegend(0.2,0.7,1,0.9,
"");
86 for (Int_t f = 0; f < NF; f++) {
88 Char_t *FunName = FNames[f];
90 if (TString(FNames[f]) ==
"BetheBloch") {
91 func =
new TF1(FunName,bfunc,1.e-2,1.e3,5);
92 func->SetLineColor(1);
94 if (TString(FNames[f]) ==
"Sirrf") {
95 func =
new TF1(FunName,sifunc,1.e-2,1.e3,5);
96 func->SetLineColor(2);
98 if (TString(FNames[f]) ==
"Girrf") {
99 func =
new TF1(FunName,gfunc,1.e-2,1.e3,5);
101 if (dx == 1) params[4] = 1.e-2;
102 if (dx == 2) params[4] = 1.e-3;
103 if (dx == 3) params[4] = 1.e-4;
104 func->SetLineColor(3);
106 else {
if (TString(FNames[f]) ==
"Bz") {
107 func =
new TF1(FunName,bichselZ,1.e-2,1.e3,5);
108 func->SetLineColor(4);
110 else {
if (TString(FNames[f]) ==
"B70") {
111 func =
new TF1(FunName,bichsel70,1.e-2,1.e3,5);
112 func->SetLineColor(6);
114 else {
if (TString(FNames[f]) ==
"B70M") {
115 func =
new TF1(FunName,bichsel70M,1.e-2,1.e3,5);
116 func->SetLineColor(7);
118 if (! func)
continue;
119 func->SetParameters(params);
121 TString name(FNames[f]);
122 if (name ==
"BetheBloch") name +=
": Fitted from Year 0 data (P00hm production only)";
123 else if (name ==
"Sirrf") name +=
": Fitted from Year 1 data (for production before P03h)";
124 else if (name ==
"Girrf") name +=
": Geant3 prediction (for simulated data only)";
125 else if (name ==
"Bz") name +=
": Bichsel most probable";
126 else if (name ==
"B70") name +=
": Bichsel, 30 % truncation (for production P03h and after)";
127 else if (name ==
"B70M") name +=
": Bichsel, 30 % truncation, with correction for saturation";
128 leg->AddEntry(func,name.Data(),
"L");