Macro to plot pathlengths of back-to-back jets. (A. Dainese)
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Feb 2004 08:14:59 +0000 (08:14 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Feb 2004 08:14:59 +0000 (08:14 +0000)
FASTSIM/PathLengthTest.C [new file with mode: 0644]

diff --git a/FASTSIM/PathLengthTest.C b/FASTSIM/PathLengthTest.C
new file mode 100644 (file)
index 0000000..20b20eb
--- /dev/null
@@ -0,0 +1,51 @@
+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;
+}