]>
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 | ||
16 | /* | |
17 | $Log$ | |
88cb7938 | 18 | Revision 1.1.2.1 2003/04/14 17:33:50 hristov |
19 | Merging with v3-09-08 (part1) | |
20 | ||
21 | Revision 1.1 2003/03/24 16:49:23 morsch | |
22 | Slow nucleon generator and model. | |
23 | ||
c9a8628a | 24 | */ |
25 | ||
26 | ||
27 | // Experimental data inspired Gray Particle Model for p-Pb collisions | |
28 | // | |
29 | // The number of gray nucleons is proportional to the number of collisions. | |
30 | // The number of black nucleons is proportional to the number of collisions | |
31 | // Fluctuations are calculated from a binomial distribution. | |
32 | // | |
33 | ||
34 | #include "AliSlowNucleonModelExp.h" | |
35 | #include "AliCollisionGeometry.h" | |
36 | #include <TRandom.h> | |
37 | ||
38 | ClassImp(AliSlowNucleonModelExp) | |
39 | ||
40 | AliSlowNucleonModelExp::AliSlowNucleonModelExp() | |
41 | { | |
42 | // Default constructor | |
43 | fP = 82; | |
44 | fN = 208 - 82; | |
45 | fAlphaGray = 2.; | |
46 | fAlphaBlack = 4.; | |
47 | } | |
48 | ||
49 | ||
50 | void AliSlowNucleonModelExp::GetNumberOfSlowNucleons(AliCollisionGeometry* geo, | |
51 | Int_t& ngp, Int_t& ngn, Int_t & nbp, Int_t & nbn) | |
52 | { | |
53 | // | |
54 | // Return the number of black and gray nucleons | |
55 | // | |
56 | // Number of collisions | |
57 | ||
58 | Int_t nu = geo->NwN() + geo->NNw(); | |
59 | ||
60 | // Mean number of gray nucleons | |
61 | ||
62 | Float_t nGray = fAlphaGray * nu; | |
63 | Float_t nGrayNeutrons = nGray * fN / (fN + fP); | |
64 | Float_t nGrayProtons = nGray - nGrayNeutrons; | |
65 | ||
66 | // Mean number of black nucleons | |
67 | Float_t nBlack = fAlphaBlack * nu; | |
68 | Float_t nBlackNeutrons = nBlack * fN / (fN + fP); | |
69 | Float_t nBlackProtons = nBlack - nBlackNeutrons; | |
70 | ||
71 | // Actual number (including fluctuations) from binomial distribution | |
72 | Double_t p; | |
73 | ||
74 | // gray neutrons | |
75 | p = nGrayNeutrons/fN; | |
76 | ngn = gRandom->Binomial((Int_t) fN, p); | |
77 | ||
78 | // gray protons | |
79 | p = nGrayProtons/fP; | |
80 | ngp = gRandom->Binomial((Int_t) fP, p); | |
81 | ||
82 | // black neutrons | |
83 | p = nBlackNeutrons/fN; | |
84 | nbn = gRandom->Binomial((Int_t) fN, p); | |
85 | ||
86 | // black protons | |
87 | p = nBlackProtons/fP; | |
88 | nbp = gRandom->Binomial((Int_t) fP, p); | |
89 | ||
90 | } | |
91 | ||
92 | void AliSlowNucleonModelExp::SetParameters(Float_t alpha1, Float_t alpha2) | |
93 | { | |
94 | // Set the model parameters | |
95 | fAlphaGray = alpha1; | |
96 | fAlphaBlack = alpha2; | |
97 | } |