1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
19 // Experimental data inspired Gray Particle Model for p-Pb collisions
20 // The number of gray nucleons is proportional to the number of collisions.
21 // The number of black nucleons is proportional to the number of collisions
22 // Fluctuations are calculated from a binomial distribution.
26 #include "AliSlowNucleonModelExp.h"
27 #include "AliCollisionGeometry.h"
30 ClassImp(AliSlowNucleonModelExp)
33 AliSlowNucleonModelExp::AliSlowNucleonModelExp():
40 // Default constructor
45 void AliSlowNucleonModelExp::GetNumberOfSlowNucleons(AliCollisionGeometry* geo,
46 Int_t& ngp, Int_t& ngn, Int_t & nbp, Int_t & nbn) const
49 // Return the number of black and gray nucleons
51 // Number of collisions
53 Int_t nu = geo->NwN() + geo->NNw();
55 // Mean number of gray nucleons
57 Float_t nGray = fAlphaGray * nu;
58 Float_t nGrayNeutrons = nGray * fN / (fN + fP);
59 Float_t nGrayProtons = nGray - nGrayNeutrons;
61 // Mean number of black nucleons
62 Float_t nBlack = fAlphaBlack * nu;
63 Float_t nBlackNeutrons = nBlack * fN / (fN + fP);
64 Float_t nBlackProtons = nBlack - nBlackNeutrons;
66 // Actual number (including fluctuations) from binomial distribution
71 ngn = gRandom->Binomial((Int_t) fN, p);
75 ngp = gRandom->Binomial((Int_t) fP, p);
78 p = nBlackNeutrons/fN;
79 nbn = gRandom->Binomial((Int_t) fN, p);
83 nbp = gRandom->Binomial((Int_t) fP, p);
87 void AliSlowNucleonModelExp::SetParameters(Float_t alpha1, Float_t alpha2)
89 // Set the model parameters