Save in-medium pathlength for Q-Pythia
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 May 2009 15:34:15 +0000 (15:34 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 May 2009 15:34:15 +0000 (15:34 +0000)
PYTHIA6/AliGenPythia.cxx
PYTHIA6/QPYTHIA/AliQPythiaWrapper.cxx
PYTHIA6/QPYTHIA/q-pyshow.1.0.F

index e468289..43f03ec 100644 (file)
@@ -1236,9 +1236,12 @@ void AliGenPythia::MakeHeader()
        } else if (fQuench == 4) {
            // QPythia
            Double_t xy[2];
-           AliFastGlauber::Instance()->GetLastXY(xy);
+           Double_t i0i1[2];
+           AliFastGlauber::Instance()->GetSavedXY(xy);
+           AliFastGlauber::Instance()->GetSavedI0I1(i0i1);
            xp = xy[0];
            yp = xy[1];
+           ((AliGenPythiaEventHeader*) fHeader)->SetInMediumLength(2. * i0i1[1] / i0i1[0]);
        }
        
            ((AliGenPythiaEventHeader*) fHeader)->SetXYJet(xp, yp);
index 2a8e86e..f8614cb 100644 (file)
@@ -75,15 +75,23 @@ extern "C" {
 }
 
 
-
 //_______________________________________________________________________
-#define calculatelength calculatelength_
+#define savexy savexy_
 
 extern "C" {
- double calculatelength(Double_t& b,Double_t& x,Double_t& y,Double_t& phi)
+ void savexy(Double_t& x, Double_t& y)
     {
-       // Wrapper to method CalculateLength from AliGlauber
-       return (AliFastGlauber::Instance())->CalculateLength(b,x,y,phi);
+       // Wrapper to save current production point
+       return (AliFastGlauber::Instance())->SaveXY(x,y);
     }
 }
 
+#define savei0i1 savei0i1_
+
+extern "C" {
+ void savei0i1(Double_t& i0, Double_t i1)
+    {
+       // Wrapper to save current integrals I0 and I1
+       return (AliFastGlauber::Instance())->SaveI0I1(i0, i1);
+    }
+}
index 9198a50..79ad22c 100644 (file)
@@ -2441,6 +2441,7 @@ c     glauber geometry.
       call GetRandomXY(xrang,yrang) 
       xin=xrang ! fm
       yin=yrang ! fm
+      call savexy(xin, yin)
 cforalice-
       zin=0.d0 ! fm
       tin=0.d0 ! fm
@@ -2515,6 +2516,7 @@ c$$$     The set value is passed here through the pythia free parameter parj(198
       else
       xlp=2.d0*xlone/xlcero
       qhl=0.1973d0*0.1973d0*xlcero*xkscale 
+      call savei0i1(xlcero, xlone)
       endif