forked from alisw/AliRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
glauber.C
177 lines (148 loc) · 3.87 KB
/
glauber.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
static TF1* f_wdsx_z;
static TF1* f_ta;
static TF2* f_ta_rfi;
void glauber()
{
//
// Calculates some geometrical properties of PbPb collisions
// in the Glauber Model
//
// Wood-Saxon nuclear density function
//
TCanvas *c1 = new TCanvas("c1","Wood Saxon",400,10,600,700);
TF1* f_wdsx = new TF1("f_wdsx", wdsx, 0, 15., 4);
f_wdsx->SetParameter(0,6.624);
f_wdsx->SetParameter(1,0.549);
f_wdsx->SetParameter(2,0.000);
f_wdsx->SetParameter(3,7.69e-4);
f_wdsx->Draw();
//
// Wood Saxon-nuclear density (b-z)
//
TCanvas *c2 = new TCanvas("c2","Wood Saxon",400,10,600,700);
TF2* f_wdsx_bz = new TF2("f_wdsx_bz", wdsx_bz, 0, 15., 0., 15., 4);
f_wdsx_bz->SetParameter(0,6.624);
f_wdsx_bz->SetParameter(1,0.549);
f_wdsx_bz->SetParameter(2,0.000);
f_wdsx_bz->SetParameter(3,7.69e-4);
f_wdsx_bz->Draw();
//
// Wood Saxon-nuclear density (z, for fixed b)
//
TCanvas *c3 = new TCanvas("c3","Wood Saxon",400,10,600,700);
f_wdsx_z = new TF1("f_wdsx_z", wdsx_z, 0, 15., 5);
f_wdsx_z->SetParameter(0,6.624);
f_wdsx_z->SetParameter(1,0.549);
f_wdsx_z->SetParameter(2,0.000);
f_wdsx_z->SetParameter(3,7.69e-4);
f_wdsx_z->SetParameter(4,0.);
f_wdsx_z->Draw();
//
// Thickness function
//
TCanvas *c4 = new TCanvas("c4","T_A",400,10,600,700);
f_ta = new TF1("f_ta", ta, 0, 15., 0);
f_ta->Draw();
//
// Kernel of overlap function
//
TCanvas *c5 = new TCanvas("c5","T_A",400,10,600,700);
f_ta_rfi = new TF2("f_ta_rfi", ta_rfi, 0, 15., 0., TMath::Pi(), 1);
f_ta_rfi->SetParameter(0,0.);
f_ta_rfi->Draw();
//
// Overlap Function
//
TCanvas *c6 = new TCanvas("c6","T_AA",400,10,600,700);
TF1* f_taa = new TF1("f_taa", taa,0.,15., 0);
f_taa->Draw();
}
Double_t taa(Double_t* x, Double_t* dum)
{
printf("taa %f\n", x[0]);
Double_t b = x[0];
Double_t y = 10./(208*208)*hijing->Profile((Float_t)b);
return y;
}
Double_t wdsx(Double_t* x, Double_t* par)
{
//
// Wood Saxon Parameterisation
// as a function of radius
//
Double_t xx = x[0];
Double_t r0 = par[0];
Double_t d = par[1];
Double_t w = par[2];
Double_t n = par[3];
Double_t y = n * (1.+w*(xx/r0)*(xx/r0))/(1.+TMath::Exp((xx-r0)/d));
return y;
}
Double_t wdsx_bz(Double_t* x, Double_t* par)
{
//
// Wood Saxon Parameterisation
// as a function of z and b
//
Double_t bb = x[0];
Double_t zz = x[1];
Double_t r0 = par[0];
Double_t d = par[1];
Double_t w = par[2];
Double_t n = par[3];
Double_t xx = TMath::Sqrt(bb*bb+zz*zz);
Double_t y = n * (1.+w*(xx/r0)*(xx/r0))/(1.+TMath::Exp((xx-r0)/d));
return y;
}
Double_t wdsx_z(Double_t* x, Double_t* par)
{
//
// Wood Saxon Parameterisation
// as a function of z for fixed b
//
Double_t bb = par[4];
Double_t zz = x[0];
Double_t r0 = par[0];
Double_t d = par[1];
Double_t w = par[2];
Double_t n = par[3];
Double_t xx = TMath::Sqrt(bb*bb+zz*zz);
Double_t y = n * (1.+w*(xx/r0)*(xx/r0))/(1.+TMath::Exp((xx-r0)/d));
return y;
}
Double_t ta(Double_t* x, Double_t* par)
{
//
// Thickness function
//
Double_t b = x[0];
f_wdsx_z->SetParameter(4,b);
Double_t y = 2.*f_wdsx_z->Integral(0.,15.);
return y;
}
Double_t ta_rfi(Double_t* x, Double_t* par)
{
//
// Kernel for overlap function
//
Double_t b = par[0];
Double_t r1 = x[0];
Double_t phi = x[1];
Double_t r2 = TMath::Sqrt(r1*r1+b*b-2.*r1*b*TMath::Cos(phi));
Double_t y = r1*f_ta->Eval(r1)*f_ta->Eval(r2);
// Double_t y = r1*f_ta->Eval(r1);
return y;
}
Double_t taa(Double_t* x, Double_t* par)
{
//
// Overlap function
//
Double_t b = x[0];
f_ta_rfi->SetParameter(0,b);
f_ta_rfi->Update();
Double_t y = 2.*
f_ta_rfi->Integral(0.,15., 0., TMath::Pi(), 0.001);
printf("taa %f %f\n", x[0], y);
return y;
}