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"
31 ClassImp(AliSlowNucleonModelExp)
34 AliSlowNucleonModelExp::AliSlowNucleonModelExp():
39 fApplySaturation(kTRUE),
41 fnBlackSaturation(28),
46 // Default constructor
50 fSlownparam[1] = 469.2;
51 fSlownparam[2] = 8.762;
52 /*printf("\n\n ******** Initializing slow nucleon model with parameters:\n");
53 printf(" \t alpha_{gray} %1.2f alpha_{black} %1.2f\n",fAlphaGray, fAlphaBlack);
54 printf(" \t SATURATION %d w. %d (gray) %d (black) \n\n",fApplySaturation,fnGraySaturation,fnBlackSaturation);
55 printf(" \t LCP parameter %f Slown parameters = {%f, %f,
56 %f}\n\n",fLCPparam,fSlownparam[0],fSlownparam[1],fSlownparam[2]); */
60 void AliSlowNucleonModelExp::GetNumberOfSlowNucleons(AliCollisionGeometry* geo,
61 Int_t& ngp, Int_t& ngn, Int_t & nbp, Int_t & nbn) const
64 // Return the number of black and gray nucleons
66 // Number of collisions
68 Float_t nu = geo->NN() + geo->NwN() + geo->NNw();
70 // Mean number of gray nucleons
72 Float_t nGray = fAlphaGray * nu;
73 Float_t nGrayNeutrons = nGray * fN / (fN + fP);
74 Float_t nGrayProtons = nGray - nGrayNeutrons;
76 // Mean number of black nucleons
78 if(!fApplySaturation || (fApplySaturation && nGray<fnGraySaturation)) nBlack = fAlphaBlack * nu;
79 else if(fApplySaturation && nGray>=fnGraySaturation) nBlack = fnBlackSaturation;
80 Float_t nBlackNeutrons = nBlack * 0.84;
81 Float_t nBlackProtons = nBlack - nBlackNeutrons;
83 // Actual number (including fluctuations) from binomial distribution
88 ngn = gRandom->Binomial((Int_t) fN, p);
92 ngp = gRandom->Binomial((Int_t) fP, p);
95 p = nBlackNeutrons/fN;
96 nbn = gRandom->Binomial((Int_t) fN, p);
100 nbp = gRandom->Binomial((Int_t) fP, p);
104 void AliSlowNucleonModelExp::GetNumberOfSlowNucleons2(AliCollisionGeometry* geo,
105 Int_t& ngp, Int_t& ngn, Int_t & nbp, Int_t & nbn) const
108 // Return the number of black and gray nucleons
110 // Number of collisions
112 // based on E910 model ================================================================
114 Float_t nu = (Float_t) (geo->NN() + geo->NwN() + geo->NNw());
116 //nu = nu+1.*gRandom->Rndm();
117 nu = gRandom->Gaus(nu, 0.5);
120 Float_t poverpd = 0.843;
121 Float_t zAu2zPb = 82./79.;
122 Float_t nGrayp = (-0.27 + 0.63 * nu - 0.0008 *nu *nu)*poverpd*zAu2zPb;
127 ngp = gRandom->Binomial((Int_t) fP, p);
128 //ngp = gRandom->Gaus(nGrayp, TMath::Sqrt(fP*p*(1-p)));
131 //Float_t blackovergray = 3./7.;// from spallation
132 Float_t blackovergray = 0.65; // from COSY
133 Float_t nBlackp = blackovergray*nGrayp;
137 nbp = gRandom->Binomial((Int_t) fP, p);
138 //nbp = gRandom->Gaus(nBlackp, TMath::Sqrt(fP*p*(1-p)));
139 if(nBlackp<0.) nbp=0;
142 nGrayp = -0.836 + 0.9112 *nu - 0.05381 *nu *nu;
143 nBlackp = blackovergray*nGrayp;
146 //printf(" \t Using LCP parameter %f Slown parameters = {%f, %f, %f}\n\n",fLCPparam,fSlownparam[0],fSlownparam[1],fSlownparam[2]);
147 Float_t nGrayNeutrons = 0.;
148 Float_t nBlackNeutrons = 0.;
149 Float_t cp = (nGrayp+nBlackp)/fLCPparam;
152 Float_t nSlow = fSlownparam[0]+fSlownparam[1]/(-fSlownparam[2]-cp);
153 Float_t paramRetta = fSlownparam[0]+fSlownparam[1]/(-fSlownparam[2]-3);
154 if(cp<3.) nSlow = 0.+(paramRetta-0.)/(3.-0.)*(cp-0.);
156 nGrayNeutrons = nSlow * 0.1;
157 nBlackNeutrons = nSlow - nGrayNeutrons;
160 // Sikler "pasturato" (qui non entra mai!!!!)
161 nGrayNeutrons = 0.47 * fAlphaGray * nu;
162 nBlackNeutrons = 0.88 * fAlphaBlack * nu;
163 //printf("nslowp=0 -> ncoll = %1.0f -> ngrayn = %1.0f nblackn = %1.0f \n", nu, nGrayNeutrons, nBlackNeutrons);
167 p = nGrayNeutrons/fN;
168 // ngn = gRandom->Binomial((Int_t) fN, p);
169 ngn = gRandom->Gaus(nGrayNeutrons, TMath::Sqrt(fN*p*(1-p)));
172 p = nBlackNeutrons/fN;
173 // nbn = gRandom->Binomial((Int_t) fN, p);
174 nbn = gRandom->Gaus(nBlackNeutrons, TMath::Sqrt(fN*p*(1-p)));
179 void AliSlowNucleonModelExp::GetNumberOfSlowNucleons2s(AliCollisionGeometry* geo,
180 Int_t& ngp, Int_t& ngn, Int_t & nbp, Int_t & nbn) const
183 // Return the number of black and gray nucleons
185 // Number of collisions
187 // based on E910 model ================================================================
189 Float_t nu = (Float_t) (geo->NN() + geo->NwN() + geo->NNw());
191 Float_t poverpd = 0.843;
192 Float_t zAu2zPb = 82./79.;
193 Float_t grayp = (-0.27 + 0.63 * nu - 0.0008 *nu *nu)*poverpd*zAu2zPb;
194 Float_t nGrayp = gRandom->Gaus(grayp, fSigmaSmear);
195 if(nGrayp<0.) nGrayp=0.;
200 ngp = gRandom->Binomial((Int_t) fP, p);
201 //ngp = gRandom->Gaus(nGrayp, TMath::Sqrt(fP*p*(1-p)));
204 //Float_t blackovergray = 3./7.;// from spallation
205 Float_t blackovergray = 0.65; // from COSY
206 //Float_t blackp = blackovergray*grayp;
207 //Float_t nBlackp = gRandom->Gaus(nblackp, fSigmaSmear);
208 Float_t nBlackp = blackovergray*nGrayp;
209 if(nBlackp<0.) nBlackp=0.;
213 nbp = gRandom->Binomial((Int_t) fP, p);
214 //nbp = gRandom->Gaus(nBlackp, TMath::Sqrt(fP*p*(1-p)));
215 if(nBlackp<0.) nbp=0;
217 Float_t nGrayNeutrons = 0.;
218 Float_t nBlackNeutrons = 0.;
219 Float_t cp = (nGrayp+nBlackp)/fLCPparam;
222 Float_t nSlow = fSlownparam[0]+fSlownparam[1]/(-fSlownparam[2]-cp);
224 nGrayNeutrons = nSlow * 0.1;
225 nBlackNeutrons = nSlow - nGrayNeutrons;
228 // Sikler "pasturato" (qui non entra mai!!!!)
229 nGrayNeutrons = 0.47 * fAlphaGray * nu;
230 nBlackNeutrons = 0.88 * fAlphaBlack * nu;
231 //printf("nslowp=0 -> ncoll = %1.0f -> ngrayn = %1.0f nblackn = %1.0f \n", nu, nGrayNeutrons, nBlackNeutrons);
234 if(nGrayNeutrons<0.) nGrayNeutrons=0.;
235 if(nBlackNeutrons<0.) nBlackNeutrons=0.;
238 p = nGrayNeutrons/fN;
239 // ngn = gRandom->Binomial((Int_t) fN, p);
240 ngn = gRandom->Gaus(nGrayNeutrons, TMath::Sqrt(fN*p*(1-p)));
241 if(nGrayNeutrons<0.) ngn=0;
244 p = nBlackNeutrons/fN;
245 // nbn = gRandom->Binomial((Int_t) fN, p);
246 nbn = gRandom->Gaus(nBlackNeutrons, TMath::Sqrt(fN*p*(1-p)));
247 if(nBlackNeutrons<0.) nbn=0;
251 void AliSlowNucleonModelExp::SetParameters(Float_t alpha1, Float_t alpha2)
253 // Set the model parameters
255 fAlphaBlack = alpha2;