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;
14 const Double_t log2dx[3] = {0,1,2};
16 Double_t gfunc(Double_t *x,Double_t *par) {
18 Double_t poverm = pove/par[0];
27 return BetheBloch::Girrf(poverm,par[4],k);
30 Double_t sifunc(Double_t *x,Double_t *par) {
32 Double_t poverm = pove/par[0];
36 return BetheBloch::Sirrf(poverm,par[2],k);
46 Double_t bichselZ(Double_t *x,Double_t *par) {
48 Double_t poverm = pove/par[0];
54 return TMath::Exp(m_Bichsel->GetMostProbableZ(TMath::Log10(poverm),par[3]));
56 Double_t bichsel70(Double_t *x,Double_t *par) {
58 Double_t poverm = pove/par[0];
64 return m_Bichsel->GetI70(TMath::Log10(poverm),par[3]);
66 Double_t bichsel60(Double_t *x,Double_t *par) {
68 Double_t poverm = pove/par[0];
74 return m_Bichsel->GetI60(TMath::Log10(poverm),par[3]);
77 if (gClassTable->GetID(
"StBichsel") < 0) {
78 gSystem->Load(
"libTable");
79 gSystem->Load(
"St_base");
80 gSystem->Load(
"StarClassLibrary");
81 gSystem->Load(
"StBichsel");
83 if (!m_Bichsel) m_Bichsel = Bichsel::Instance();
84 TCanvas *c1 =
new TCanvas(
"c1");
90 TH1F *hr = c1->DrawFrame(1.e-1,1,1.e4,2.e2);
92 hr->SetTitle(
"dE/dx predictions");
93 hr->SetXTitle(
"#beta #gamma");
94 hr->SetYTitle(
"dE/dx (keV/cm)");
97 Double_t
params[5] = { 1.0, 0., 60., 1., 1e-3};
98 TLegend *leg =
new TLegend(0.4,0.7,0.9,0.9,
"");
100 for (Int_t h = 2; h < 4; h++) {
104 for (Int_t f = 3; f < 4; f++) {
105 if (f == 2)
continue;
107 for (Int_t dx = 1; dx < 2; dx++) {
108 params[3] = log2dx[dx];
109 Char_t *FunName = Form(
"%s%s%i",FNames[f],Names[h],(
int)log2dx[dx]);
112 if (TString(FNames[f]) ==
"Sirrf") {
113 func =
new TF1(FunName,sifunc,1.e-2,1.e4,5);
114 func->SetLineColor(2);
116 if (TString(FNames[f]) ==
"Girrf") {
117 func =
new TF1(FunName,gfunc,1.e-2,1.e4,5);
119 if (dx == 1) params[4] = 1.e-2;
120 if (dx == 2) params[4] = 1.e-3;
121 if (dx == 3) params[4] = 1.e-4;
123 func->SetLineColor(dx+1);
125 else {
if (TString(FNames[f]) ==
"Bz") {
126 func =
new TF1(FunName,bichselZ,1.e-2,1.e4,5);
127 func->SetLineColor(4);
129 else {
if (TString(FNames[f]) ==
"B70") {
130 func =
new TF1(FunName,bichsel70,1.e-2,1.e4,5);
131 func->SetLineColor(6);
133 else {
if (TString(FNames[f]) ==
"B60") {
134 func =
new TF1(FunName,bichsel60,1.e-2,1.e4,5);
135 func->SetLineColor(7);
137 if (! func)
continue;
138 func->SetParameters(params);
140 if (dx == 0 && h == 2) {
141 TString name(FNames[f]);
142 if (name ==
"Sirrf") name +=
": Fitted from Year 1 data";
143 else if (name ==
"Girrf") {
144 name +=
": Geant3 prediction";
145 name += Form(
" T_{max} = %7f keV",1e6*params[4]);
147 else if (name ==
"Bz") name +=
": Bichsel most probable";
148 else if (name ==
"B70") name +=
": Bichsel, 30 % truncation";
149 else if (name ==
"B60") name +=
": Bichsel, 40 % truncation";
150 leg->AddEntry(func,name.Data(),
"L");