get tables from the aliroot directory if they are not in the current one
[u/mrichter/AliRoot.git] / MUON / dedx.C
CommitLineData
a9e2aefa 1void dedx(Int_t imate)
2{
3 TGeant3 *geant3 = (TGeant3*)gMC;
4 Float_t tkin[100], value[100], pcut[5];
5 Int_t ipart=5;
6 char chmeca[4];
7 strcpy(chmeca,"LOSS");
8 Int_t ixst, i;
9 Int_t kdim=100;
10
11 for (i=0; i< kdim; i++) {
12 tkin[i]=Float_t(i)*1.+1;
13 }
14 geant3->Gftmat(imate, ipart, chmeca, kdim, tkin, value, pcut, ixst);
15 for (i=0; i< kdim; i++) {
16 printf("\n Energy %f dE/dx %f", tkin[i], value[i]);
17 }
18 TGraph* dedx = new TGraph(kdim, tkin, value);
19 TCanvas *c1=new TCanvas("c1","dedx",400,10,600,700);
20 dedx->SetFillColor(42);
21 dedx->SetMarkerColor(4);
22 dedx->SetMarkerStyle(21);
23 dedx->Draw("AC");
24 dedx->GetHistogram()->SetXTitle("Kinetic Energy (GeV)");
25 dedx->GetHistogram()->SetYTitle("dE/dx ");
26 }
27
28
29
30
31
32
33
34
35
36