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[3] = {
"Bz",
"B70",
"B60"};
13 const Int_t Nlog2dx = 3;
14 const Double_t log2dx[3] = {0,1,2};
16 Double_t bichselZ(Double_t *x,Double_t *par) {
18 Double_t poverm = pove/par[0];
19 return par[1]*TMath::Exp(m_Bichsel->GetMostProbableZ(TMath::Log10(poverm),par[3]));
22 Double_t bichsel70(Double_t *x,Double_t *par) {
24 Double_t poverm = pove/par[0];
25 return par[1]*m_Bichsel->GetI70M(TMath::Log10(poverm),par[3]);
28 Double_t bichsel60(Double_t *x,Double_t *par) {
30 Double_t poverm = pove/par[0];
31 return par[1]*m_Bichsel->GetI60(TMath::Log10(poverm),par[3]);
34 if (gClassTable->GetID(
"StBichsel") < 0) {
35 gSystem->Load(
"libTable");
36 gSystem->Load(
"St_base");
37 gSystem->Load(
"StarClassLibrary");
38 gSystem->Load(
"StBichsel");
40 if (!m_Bichsel) m_Bichsel = Bichsel::Instance();
41 TCanvas *c1 =
new TCanvas(
"c1");
47 TH1F *hr = c1->DrawFrame(1.e-2,1,1.e4,1.e3);
49 hr->SetTitle(
"dE/dx predictions");
50 hr->SetXTitle(
"#beta #gamma");
51 hr->SetYTitle(
"dE/dx (keV/cm)");
54 Double_t
params[5] = { 1.0, 1.21773e+01, 60., 1., 1e-3};
55 TLegend *leg =
new TLegend(0.4,0.7,0.9,0.9,
"");
59 for (Int_t f = 1; f < 2; f++) {
60 for (Int_t dx = 1; dx < 2; dx++) {
61 params[3] = log2dx[dx];
62 Char_t *FunName = Form(
"%s%s%i",FNames[f],Names[h],(
int)log2dx[dx]);
63 cout <<
"Make " << FunName << endl;
64 if (TString(FNames[f]) ==
"Bz") {
65 func =
new TF1(FunName,bichselZ,1.e-2,1.e4,5);
66 func->SetLineColor(4);
67 }
else {
if (TString(FNames[f]) ==
"B70") {
68 func =
new TF1(FunName,bichsel70,1.e-2,1.e4,5);
69 func->SetLineColor(6);
70 }
else {
if (TString(FNames[f]) ==
"B60") {
71 func =
new TF1(FunName,bichsel60,1.e-2,1.e4,5);
72 func->SetLineColor(7);
76 for (Int_t j = 0; j < 5; j++) {
77 if (j == 1) func->SetParameter(j,params[j]);
78 else func->FixParameter(j,params[j]);
81 TString name(FNames[f]);
82 if (name ==
"Bz") name +=
": Bichsel most probable";
83 else if (name ==
"B70") name +=
": Bichsel, 30 % truncation";
84 else if (name ==
"B60") name +=
": Bichsel, 40 % truncation";
85 leg->AddEntry(func,name.Data(),
"L");