From 5373d3f7a14c341ae31c9fc10e6ff0ba03ca1030 Mon Sep 17 00:00:00 2001 From: morsch Date: Tue, 5 May 2009 09:05:31 +0000 Subject: [PATCH] Store the last production point. --- FASTSIM/AliFastGlauber.cxx | 4 ++++ FASTSIM/AliFastGlauber.h | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/FASTSIM/AliFastGlauber.cxx b/FASTSIM/AliFastGlauber.cxx index eed4aeb6b52..f8a61794118 100644 --- a/FASTSIM/AliFastGlauber.cxx +++ b/FASTSIM/AliFastGlauber.cxx @@ -106,6 +106,7 @@ AliFastGlauber::AliFastGlauber(): SetMaxImpact(); SetLengthDefinition(); SetPbPbLHC(); + fXY[0] = fXY[1] = 0; } AliFastGlauber::AliFastGlauber(const AliFastGlauber & gl) @@ -124,6 +125,7 @@ AliFastGlauber::AliFastGlauber(const AliFastGlauber & gl) { // Copy constructor gl.Copy(*this); + fXY[0] = fXY[1] = 0; } AliFastGlauber* AliFastGlauber::Instance() @@ -1306,6 +1308,8 @@ void AliFastGlauber::GetRandomXY(Double_t& x,Double_t& y) // product of thickness functions // fgWAlmondCurrent->GetRandom2(x,y); + fXY[0] = x; + fXY[1] = y; return; } diff --git a/FASTSIM/AliFastGlauber.h b/FASTSIM/AliFastGlauber.h index 479a6afd538..08e1fea2a81 100644 --- a/FASTSIM/AliFastGlauber.h +++ b/FASTSIM/AliFastGlauber.h @@ -107,6 +107,7 @@ 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 GetRandomPhi(Double_t& phi); Double_t CalculateLength(Double_t b=0.,Double_t x0=0.,Double_t y0=0., Double_t phi0=0.); @@ -216,9 +217,9 @@ 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 Int_t fEllDef; // definition of length (see CalculateLength()) - TString fName; // filename of stored distributions + TString fName; // filename of stored distributions ClassDef(AliFastGlauber,2) // Event geometry simulation in the Glauber Model }; -- 2.43.0