]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FASTSIM/AliFastGlauber.cxx
Now it is possible to select kPyCharmppMNRwmi
[u/mrichter/AliRoot.git] / FASTSIM / AliFastGlauber.cxx
index f9f52b4af83c9e29d62eb84b7b39e217607b3515..020b456d89202faf8f860ce426744918d998132c 100644 (file)
 // from AliRoot
 #include "AliFastGlauber.h"
 // from root
-#include <TStyle.h>
-#include <TH1F.h>
-#include <TH2F.h>
+#include <Riostream.h>
+#include <TCanvas.h>
 #include <TF1.h>
 #include <TF2.h>
-#include <TLegend.h>
-#include <TCanvas.h>
-#include <TRandom.h>
 #include <TFile.h>
+#include <TH1F.h>
+#include <TH2F.h>
+#include <TLegend.h>
+#include <TMath.h>
 #include <TROOT.h>
-#include <Riostream.h>
+#include <TRandom.h>
+#include <TStyle.h>
 
 ClassImp(AliFastGlauber)
 
@@ -86,12 +87,23 @@ TF2*    AliFastGlauber::fgWAlmondFixedB[40];
 const Int_t AliFastGlauber::fgkMCInts = 100000;
 Int_t AliFastGlauber::fgCounter = 0;       
 
-AliFastGlauber::AliFastGlauber() : fName()
+AliFastGlauber::AliFastGlauber(): 
+    fWSr0(0.),
+    fWSd(0.), 
+    fWSw(0.), 
+    fWSn(0.), 
+    fSigmaHard(0.),
+    fSigmaNN(0.),  
+    fA(0),         
+    fBmin(0.),     
+    fBmax(0.),     
+    fEllDef(0),    
+    fName()     
 {
   //  Default Constructor 
   fgCounter++;
   if(fgCounter>1)
-    Error("AliFastGlauber","More than more instance (%d) is not supported, check your code!",fgCounter);
+    Error("AliFastGlauber","More than one instance (%d) is not supported, check your code!",fgCounter);
 
   //  Defaults for Pb
   SetMaxImpact();
@@ -100,7 +112,18 @@ AliFastGlauber::AliFastGlauber() : fName()
 }
 
 AliFastGlauber::AliFastGlauber(const AliFastGlauber & gl)
-    :TObject(gl)
+    :TObject(gl),
+     fWSr0(0.),
+     fWSd(0.), 
+     fWSw(0.), 
+     fWSn(0.), 
+     fSigmaHard(0.),
+     fSigmaNN(0.),  
+     fA(0),         
+     fBmin(0.),     
+     fBmax(0.),     
+     fEllDef(0),    
+     fName()     
 {
 // Copy constructor
     gl.Copy(*this);
@@ -894,11 +917,11 @@ Double_t AliFastGlauber::WPathLength0(Double_t* x, Double_t* par)
   } // radial steps
 
   Double_t y=0.;
-  if (!kiopt)  // My length definition (is exact for hard disk)
-    if(w) y= 2. * rw / w; 
-  else {
-    const Double_t knorm=fgWSta->Eval(1e-4);
-    if(knorm) y =  TMath::Sqrt(2. * rw * kDr / knorm / knorm);
+  if (!kiopt) { // My length definition (is exact for hard disk)
+      if(w) y= 2. * rw / w; 
+  else {
+      const Double_t knorm=fgWSta->Eval(1e-4);
+      if(knorm) y =  TMath::Sqrt(2. * rw * kDr / knorm / knorm);
   }
   return y; //fm
 }