ROOT logo
void PathLengthTest() {
  //
  // It's a test macro for path length calculation in AliFastGlauber
  //
  // Andrea Dainese
  //

  AliFastGlauber g;

  g.Init(2);

  // centrality (fraction of geometrical cross section
  g.SetCentralityClass(0.00,0.10); 

  // plot b,ell, and ell1 vs ell2 (back-to-back partons) in that centrality 
  // class
  Int_t nEntries = 100;
  g.PlotBDistr(nEntries);
  g.PlotLengthDistr(nEntries);
  g.PlotLengthB2BDistr(nEntries);


  // examples on getting stuff out of it
  Double_t b,ell,ell1,ell2;

  g.GetRandomBHard(b);
  printf(" Random b in cetrality class (according to hard cross section):\n %f fm\n",b);

  printf(" Length:\n");
  g.GetLength(ell,b);
  printf("   for this b: %f fm\n",ell);
  g.GetLength(ell);
  printf("   for random b : %f fm\n",ell);

  printf(" Lengths for two partons back-to-back:\n");
  g.GetLengthsBackToBack(b,ell1,ell2);
  printf("   for this b: %f fm and %f fm\n",ell1,ell2);
  g.GetLengthsBackToBack(ell1,ell2);
  printf("   for random b: %f fm and %f fm\n",ell1,ell2);


  Double_t phis[3]={2.,4.,6.};
  Double_t ells[3];
  printf(" Lengths for N partons from PYTHIA:\n");
  g.GetLengthsForPythia(3,phis,ells,b);
  printf("   for this b: %f fm, %f fm and %f fm\n",ells[0],ells[1],ells[2]);
  g.GetLengthsForPythia(3,phis,ells);
  printf("   for random b: %f fm, %f fm and %f fm\n",ells[0],ells[1],ells[2]);

  return;
}
 PathLengthTest.C:1
 PathLengthTest.C:2
 PathLengthTest.C:3
 PathLengthTest.C:4
 PathLengthTest.C:5
 PathLengthTest.C:6
 PathLengthTest.C:7
 PathLengthTest.C:8
 PathLengthTest.C:9
 PathLengthTest.C:10
 PathLengthTest.C:11
 PathLengthTest.C:12
 PathLengthTest.C:13
 PathLengthTest.C:14
 PathLengthTest.C:15
 PathLengthTest.C:16
 PathLengthTest.C:17
 PathLengthTest.C:18
 PathLengthTest.C:19
 PathLengthTest.C:20
 PathLengthTest.C:21
 PathLengthTest.C:22
 PathLengthTest.C:23
 PathLengthTest.C:24
 PathLengthTest.C:25
 PathLengthTest.C:26
 PathLengthTest.C:27
 PathLengthTest.C:28
 PathLengthTest.C:29
 PathLengthTest.C:30
 PathLengthTest.C:31
 PathLengthTest.C:32
 PathLengthTest.C:33
 PathLengthTest.C:34
 PathLengthTest.C:35
 PathLengthTest.C:36
 PathLengthTest.C:37
 PathLengthTest.C:38
 PathLengthTest.C:39
 PathLengthTest.C:40
 PathLengthTest.C:41
 PathLengthTest.C:42
 PathLengthTest.C:43
 PathLengthTest.C:44
 PathLengthTest.C:45
 PathLengthTest.C:46
 PathLengthTest.C:47
 PathLengthTest.C:48
 PathLengthTest.C:49
 PathLengthTest.C:50
 PathLengthTest.C:51
 PathLengthTest.C:52