]>
Commit | Line | Data |
---|---|---|
807141ab | 1 | void PathLengthTest() { |
2 | // | |
3 | // It's a test macro for path length calculation in AliFastGlauber | |
4 | // | |
5 | // Andrea Dainese | |
6 | // | |
7 | ||
8 | AliFastGlauber g; | |
9 | ||
10 | g.Init(2); | |
11 | ||
12 | // centrality (fraction of geometrical cross section | |
13 | g.SetCentralityClass(0.00,0.10); | |
14 | ||
15 | // plot b,ell, and ell1 vs ell2 (back-to-back partons) in that centrality | |
16 | // class | |
17 | Int_t nEntries = 100; | |
18 | g.PlotBDistr(nEntries); | |
19 | g.PlotLengthDistr(nEntries); | |
20 | g.PlotLengthB2BDistr(nEntries); | |
21 | ||
22 | ||
23 | // examples on getting stuff out of it | |
24 | Double_t b,ell,ell1,ell2; | |
25 | ||
26 | g.GetRandomBHard(b); | |
27 | printf(" Random b in cetrality class (according to hard cross section):\n %f fm\n",b); | |
28 | ||
29 | printf(" Length:\n"); | |
30 | g.GetLength(ell,b); | |
31 | printf(" for this b: %f fm\n",ell); | |
32 | g.GetLength(ell); | |
33 | printf(" for random b : %f fm\n",ell); | |
34 | ||
35 | printf(" Lengths for two partons back-to-back:\n"); | |
36 | g.GetLengthsBackToBack(b,ell1,ell2); | |
37 | printf(" for this b: %f fm and %f fm\n",ell1,ell2); | |
38 | g.GetLengthsBackToBack(ell1,ell2); | |
39 | printf(" for random b: %f fm and %f fm\n",ell1,ell2); | |
40 | ||
41 | ||
42 | Double_t phis[3]={2.,4.,6.}; | |
43 | Double_t ells[3]; | |
44 | printf(" Lengths for N partons from PYTHIA:\n"); | |
45 | g.GetLengthsForPythia(3,phis,ells,b); | |
46 | printf(" for this b: %f fm, %f fm and %f fm\n",ells[0],ells[1],ells[2]); | |
47 | g.GetLengthsForPythia(3,phis,ells); | |
48 | printf(" for random b: %f fm, %f fm and %f fm\n",ells[0],ells[1],ells[2]); | |
49 | ||
50 | return; | |
51 | } |