]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Possibility to save values of integrals I0, I1
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 May 2009 15:33:08 +0000 (15:33 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 May 2009 15:33:08 +0000 (15:33 +0000)
FASTSIM/AliFastGlauber.cxx
FASTSIM/AliFastGlauber.h

index f8a617941182ec02c718ebd35e6a8b3d8aacff4d..357eae98074265a9cd45eca5e896592aae1fb076 100644 (file)
@@ -107,6 +107,7 @@ AliFastGlauber::AliFastGlauber():
   SetLengthDefinition();
   SetPbPbLHC();
   fXY[0] = fXY[1] = 0;
+  fI0I1[0] = fI0I1[1] = 0;
 }
 
 AliFastGlauber::AliFastGlauber(const AliFastGlauber & gl)
@@ -126,6 +127,7 @@ AliFastGlauber::AliFastGlauber(const AliFastGlauber & gl)
 // Copy constructor
     gl.Copy(*this);
     fXY[0] = fXY[1] = 0;
+    fI0I1[0] = fI0I1[1] = 0;
 }
 
 AliFastGlauber* AliFastGlauber::Instance()
@@ -1308,8 +1310,6 @@ void AliFastGlauber::GetRandomXY(Double_t& x,Double_t& y)
   // product of thickness functions
   //
   fgWAlmondCurrent->GetRandom2(x,y);
-  fXY[0] = x;
-  fXY[1] = y;
   return;
 }
 
index 08e1fea2a818c9e8f626a3e974724eb1c76da73e..3e936865fbba1c4d3f41fceed389750bce34e7c4 100644 (file)
@@ -107,7 +107,11 @@ class AliFastGlauber : public TObject {
     void SetCentralityClass(Double_t xsecFrLow=0.0,Double_t xsecFrUp=0.1);    
     void GetRandomBHard(Double_t& b);
     void GetRandomXY(Double_t& x,Double_t& y);
-    void GetLastXY(Double_t xy[2]) {xy[0] = fXY[0]; xy[1] = fXY[1];}
+    void GetSavedXY(Double_t xy[2]) {xy[0] = fXY[0]; xy[1] = fXY[1];}
+    void GetSavedI0I1(Double_t i0i1[2]) {i0i1[0] = fI0I1[0]; i0i1[1] = fI0I1[1];}
+    void SaveXY(Double_t x, Double_t y) {fXY[0] = x; fXY[1] = y;}
+    void SaveI0I1(Double_t i0, Double_t i1) {fI0I1[0] = i0; fI0I1[1] = i1;}
+
     void GetRandomPhi(Double_t& phi);
     Double_t CalculateLength(Double_t b=0.,Double_t x0=0.,Double_t y0=0.,
                              Double_t phi0=0.);
@@ -217,7 +221,8 @@ class AliFastGlauber : public TObject {
 
     Float_t fBmin;      // Minimum b (set through centrality selection)
     Float_t fBmax;      // Coresponding maximum b
-    Double_t fXY[2];    // Last generated production point 
+    Double_t fXY[2];    // Current generated production point
+    Double_t fI0I1[2];  // Current integrals I0 and I1
     Int_t fEllDef;      // definition of length (see CalculateLength())
     TString fName;      // filename of stored distributions
     ClassDef(AliFastGlauber,2) // Event geometry simulation in the Glauber Model