4 const Int_t NMasses = 5;
5 const Double_t Masses[NMasses] = {0.93827231,
10 const Char_t *Names[NMasses] = {
"p",
"K",
"pi",
"e",
"d"};
12 const Char_t *FNames[5] = {
"Girrf",
"Sirrf",
"Bz",
"B70",
"B60"};
13 const Int_t Nlog2dx = 3;
15 const Double_t log2dx[3] = {0, 1, 2};
17 Double_t gfunc(Double_t *x,Double_t *par) {
19 Double_t poverm = pove/par[0];
28 return BetheBloch::Girrf(poverm,par[4],k);
31 Double_t sifunc(Double_t *x,Double_t *par) {
33 Double_t poverm = pove/par[0];
37 return BetheBloch::Sirrf(poverm,par[2],k);
47 Double_t bichselZ(Double_t *x,Double_t *par) {
49 Double_t poverm = pove/par[0];
55 return TMath::Exp(m_Bichsel->GetMostProbableZ(TMath::Log10(poverm),par[3]));
57 Double_t bichsel70(Double_t *x,Double_t *par) {
59 Double_t poverm = pove/par[0];
65 return m_Bichsel->GetI70(TMath::Log10(poverm),par[3]);
67 Double_t bichsel60(Double_t *x,Double_t *par) {
69 Double_t poverm = pove/par[0];
75 return m_Bichsel->GetI60(TMath::Log10(poverm),par[3]);
78 if (gClassTable->GetID(
"StBichsel") < 0) {
79 gSystem->Load(
"libTable");
80 gSystem->Load(
"St_base");
81 gSystem->Load(
"StarClassLibrary");
82 gSystem->Load(
"StBichsel");
84 if (!m_Bichsel) m_Bichsel = Bichsel::Instance();
85 TCanvas *c1 =
new TCanvas(
"c1");
91 TH1F *hr = c1->DrawFrame(1.e-1,1,1.e2,2.e2);
93 hr->SetTitle(
"dE/dx predictions");
94 hr->SetXTitle(
"#beta #gamma");
95 hr->SetYTitle(
"dE/dx (keV/cm)");
98 Double_t
params[5] = { 1.0, 0., 60., 1., 1e-3};
99 TLegend *leg =
new TLegend(0.4,0.7,0.9,0.9,
"");
101 for (Int_t h = 2; h < 3; h++) {
106 for (Int_t dx = 0; dx < Nlog2dx; dx++) {
107 params[3] = log2dx[dx];
108 Char_t *FunName = Form(
"%s%s%i",FNames[f],Names[h],(
int)log2dx[dx]);
111 if (TString(FNames[f]) ==
"Sirrf") {
112 func =
new TF1(FunName,sifunc,1.e-2,1.e3,5);
113 func->SetLineColor(2);
115 if (TString(FNames[f]) ==
"Girrf") {
116 func =
new TF1(FunName,gfunc,1.e-2,1.e3,5);
118 if (dx == 1) params[4] = 1.e-2;
119 if (dx == 2) params[4] = 1.e-3;
120 if (dx == 3) params[4] = 1.e-4;
121 func->SetLineColor(3);
123 else {
if (TString(FNames[f]) ==
"Bz") {
124 func =
new TF1(FunName,bichselZ,1.e-2,1.e3,5);
125 func->SetLineColor(4);
127 else {
if (TString(FNames[f]) ==
"B70") {
128 func =
new TF1(FunName,bichsel70,1.e-2,1.e3,5);
129 func->SetLineColor(6);
131 else {
if (TString(FNames[f]) ==
"B60") {
132 func =
new TF1(FunName,bichsel60,1.e-2,1.e3,5);
133 func->SetLineColor(7);
135 if (! func)
continue;
136 func->SetParameters(params);
137 func->SetLineColor(dx+1);
140 TString name(FNames[f]);
141 name +=
": Bichsel, 30% truncation";
142 name += Form(
" dx = %3.1f cm",TMath::Power(2.,log2dx[dx]));
143 cout << name << endl;
144 leg->AddEntry(func,name.Data(),
"L");