]>
Commit | Line | Data |
---|---|---|
c9a8628a | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
803d1ab0 | 16 | /* $Id$ */ |
c9a8628a | 17 | |
c9a8628a | 18 | // |
ac3faee4 | 19 | // Experimental data inspired Gray Particle Model for p-Pb collisions |
c9a8628a | 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. | |
ac3faee4 | 23 | // Author: A.Morsch |
c9a8628a | 24 | // |
25 | ||
26 | #include "AliSlowNucleonModelExp.h" | |
27 | #include "AliCollisionGeometry.h" | |
28 | #include <TRandom.h> | |
29 | ||
706938e6 | 30 | ClassImp(AliSlowNucleonModelExp) |
c9a8628a | 31 | |
1c56e311 | 32 | |
33 | AliSlowNucleonModelExp::AliSlowNucleonModelExp(): | |
34 | fP(82), | |
35 | fN (208 - 82), | |
1ffc7bfa | 36 | fAlphaGray(2.3), |
37 | fAlphaBlack(3.6), | |
230d85c6 | 38 | fApplySaturation(kTRUE), |
39 | fnGraySaturation(15), | |
40 | fnBlackSaturation(28) | |
c9a8628a | 41 | { |
ac3faee4 | 42 | // |
43 | // Default constructor | |
44 | // | |
1ffc7bfa | 45 | // |
46 | printf("\n\nInitializing slow nucleon model with parameters:\n"); | |
47 | printf(" \t alpha_{gray} %1.2f alpha_{black} %1.2f\n",fAlphaGray, fAlphaBlack); | |
48 | printf(" \t SATURATION %d w. %d (gray) %d (black) \n\n",fApplySaturation,fnGraySaturation,fnBlackSaturation); | |
c9a8628a | 49 | } |
50 | ||
51 | ||
52 | void AliSlowNucleonModelExp::GetNumberOfSlowNucleons(AliCollisionGeometry* geo, | |
ac3faee4 | 53 | Int_t& ngp, Int_t& ngn, Int_t & nbp, Int_t & nbn) const |
c9a8628a | 54 | { |
55 | // | |
56 | // Return the number of black and gray nucleons | |
57 | // | |
58 | // Number of collisions | |
59 | ||
993be958 | 60 | Int_t nu = geo->NN() + geo->NwN() + geo->NNw(); |
c9a8628a | 61 | |
62 | // Mean number of gray nucleons | |
63 | ||
64 | Float_t nGray = fAlphaGray * nu; | |
65 | Float_t nGrayNeutrons = nGray * fN / (fN + fP); | |
66 | Float_t nGrayProtons = nGray - nGrayNeutrons; | |
67 | ||
68 | // Mean number of black nucleons | |
230d85c6 | 69 | Float_t nBlack = 0.; |
70 | if(!fApplySaturation || (fApplySaturation && nGray<fnGraySaturation)) nBlack = fAlphaBlack * nu; | |
71 | else if(fApplySaturation && nGray>=fnGraySaturation) nBlack = fnBlackSaturation; | |
1ffc7bfa | 72 | Float_t nBlackNeutrons = nBlack * 0.84; |
c9a8628a | 73 | Float_t nBlackProtons = nBlack - nBlackNeutrons; |
74 | ||
75 | // Actual number (including fluctuations) from binomial distribution | |
76 | Double_t p; | |
77 | ||
78 | // gray neutrons | |
79 | p = nGrayNeutrons/fN; | |
80 | ngn = gRandom->Binomial((Int_t) fN, p); | |
81 | ||
82 | // gray protons | |
83 | p = nGrayProtons/fP; | |
84 | ngp = gRandom->Binomial((Int_t) fP, p); | |
85 | ||
86 | // black neutrons | |
87 | p = nBlackNeutrons/fN; | |
88 | nbn = gRandom->Binomial((Int_t) fN, p); | |
89 | ||
90 | // black protons | |
91 | p = nBlackProtons/fP; | |
92 | nbp = gRandom->Binomial((Int_t) fP, p); | |
93 | ||
94 | } | |
95 | ||
96 | void AliSlowNucleonModelExp::SetParameters(Float_t alpha1, Float_t alpha2) | |
97 | { | |
98 | // Set the model parameters | |
99 | fAlphaGray = alpha1; | |
100 | fAlphaBlack = alpha2; | |
101 | } | |
230d85c6 | 102 |