]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliSlowNucleonModelExp.cxx
Add event selection depending on high energy clusters existance in EMCal to speed...
[u/mrichter/AliRoot.git] / EVGEN / AliSlowNucleonModelExp.cxx
index a7f4f3c0e6aacd944679b5a0e95c523ec746ae75..d59789310aeed4c65c1503c76c42f5d44c6434e2 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-*/
+/* $Id$ */
 
-
-// Experimental data inspired Gray Particle Model for p-Pb collisions
 //
+// Experimental data inspired Gray Particle Model for p-Pb collisions
 // The number of gray nucleons  is proportional to the number of collisions.
 // The number of black nucleons is proportional to the number of collisions
 // Fluctuations are calculated from a binomial distribution.
+// Author: A.Morsch
 //
 
 #include "AliSlowNucleonModelExp.h"
@@ -31,18 +29,24 @@ $Log$
 
 ClassImp(AliSlowNucleonModelExp)
 
-AliSlowNucleonModelExp::AliSlowNucleonModelExp()
+
+AliSlowNucleonModelExp::AliSlowNucleonModelExp():
+    fP(82),
+    fN (208 - 82),
+    fAlphaGray(2.),
+    fAlphaBlack(4.),
+    fApplySaturation(kTRUE),
+    fnGraySaturation(15),
+    fnBlackSaturation(28)
 {
-// Default constructor
-    fP = 82;
-    fN = 208 - 82;
-    fAlphaGray  = 2.;
-    fAlphaBlack = 4.;
+  //
+  // Default constructor
+  //
 }
 
 
 void AliSlowNucleonModelExp::GetNumberOfSlowNucleons(AliCollisionGeometry* geo, 
-                                                     Int_t& ngp, Int_t& ngn, Int_t & nbp, Int_t & nbn)
+                                                     Int_t& ngp, Int_t& ngn, Int_t & nbp, Int_t & nbn) const
 {
 //
 // Return the number of black and gray nucleons
@@ -58,7 +62,9 @@ void AliSlowNucleonModelExp::GetNumberOfSlowNucleons(AliCollisionGeometry* geo,
     Float_t nGrayProtons  = nGray - nGrayNeutrons;
 
 // Mean number of black nucleons 
-    Float_t nBlack         = fAlphaBlack * nu;
+    Float_t nBlack  = 0.;
+    if(!fApplySaturation || (fApplySaturation && nGray<fnGraySaturation)) nBlack = fAlphaBlack * nu;
+    else if(fApplySaturation && nGray>=fnGraySaturation) nBlack = fnBlackSaturation;
     Float_t nBlackNeutrons = nBlack * fN / (fN + fP);
     Float_t nBlackProtons  = nBlack - nBlackNeutrons;
 
@@ -89,3 +95,4 @@ void AliSlowNucleonModelExp::SetParameters(Float_t alpha1, Float_t alpha2)
     fAlphaGray  = alpha1;
     fAlphaBlack = alpha2;
 }
+