1 void testPDF(Double_t a = 208.)
4 gSystem->Load("liblhapdf.so");
5 StrucFunc_t pdf = kCTEQ6ll;
8 // Dynamically link some shared libs
17 printf("PDF initialized with: \n \n");
18 strncpy(parm[0], "DEFAULT ", 20);
19 val[0] = AliStructFuncType::PDFsetIndex(pdf);
20 AliStructFuncType::PdfSet(parm, val);
25 // ================================================================
28 TCanvas *c1 = new TCanvas("c1","Gluon PDF",400,10,600,700);
29 TF1* f_gl_2 = new TF1("f_gl_2", pdf_gl, -6., 0., 2);
30 f_gl_2->SetParameter(0,2);
31 f_gl_2->SetParameter(1,a);
32 f_gl_2->SetMaximum(1000.);
33 f_gl_2->SetLineColor(1);
36 TF1* f_gl_5 = new TF1("f_gl_5", pdf_gl, -6., 0., 2);
37 f_gl_5->SetParameter(0,5);
38 f_gl_5->SetParameter(1,a);
39 f_gl_5->SetLineColor(2);
42 TF1* f_gl_10 = new TF1("f_gl_10", pdf_gl, -6., 0., 2);
43 f_gl_10->SetParameter(0,10);
44 f_gl_10->SetParameter(1,a);
45 f_gl_10->SetLineColor(3);
46 f_gl_10->Draw("Same");
48 TF1* f_gl_50 = new TF1("f_gl_50", pdf_gl, -6., 0., 2);
49 f_gl_50->SetParameter(0,50);
50 f_gl_50->SetParameter(1,a);
51 f_gl_50->SetLineColor(4);
52 f_gl_50->Draw("Same");
54 // ================================================================
57 TCanvas *c2 = new TCanvas("c2","Gluon PDF Nucl. Mod.",400,10,600,700);
59 TF1* fmod_gl_2 = new TF1("fmod_gl_2", mod_gl, -6., 0., 2);
60 fmod_gl_2->SetParameter(0,2.);
61 fmod_gl_2->SetParameter(1,a);
62 fmod_gl_2->SetMaximum(1.5);
63 fmod_gl_2->SetLineColor(1);
65 fmod_gl_2->GetHistogram()->SetXTitle("log(x)");
66 fmod_gl_2->GetHistogram()->SetYTitle("F^{g}_{A}/F^{g}_{p}");
68 TF1* fmod_gl_5 = new TF1("fmod_gl_5", mod_gl, -6., 0., 2);
69 fmod_gl_5->SetParameter(0,5.);
70 fmod_gl_5->SetParameter(1,a);
71 fmod_gl_5->SetLineColor(2);
72 fmod_gl_5->Draw("Same");
74 TF1* fmod_gl_10 = new TF1("fmod_gl_10", mod_gl, -6., 0., 2);
75 fmod_gl_10->SetParameter(0,10.);
76 fmod_gl_10->SetParameter(1,a);
77 fmod_gl_10->SetLineColor(3);
78 fmod_gl_10->Draw("Same");
80 TF1* fmod_gl_50 = new TF1("fmod_gl_50", mod_gl, -6., 0., 2);
81 fmod_gl_50->SetParameter(0,50.);
82 fmod_gl_50->SetParameter(1,a);
83 fmod_gl_50->SetLineColor(4);
84 fmod_gl_50->Draw("Same");
88 // =================================================================
89 // Sea Quark Modification
91 TCanvas *c3 = new TCanvas("c3","Sea Quark PDF Nucl. Mod.",400,10,600,700);
92 TF1* fmod_sq_2 = new TF1("fmod_sq_2", mod_sq, -6., 0., 2);
93 fmod_sq_2->SetParameter(0,2.);
94 fmod_sq_2->SetParameter(1,a);
95 fmod_sq_2->SetMaximum(1.5);
96 fmod_sq_2->SetLineColor(1);
98 fmod_sq_2->GetHistogram()->SetXTitle("log(x)");
99 fmod_sq_2->GetHistogram()->SetYTitle("F^{sea q}_{A}/F^{sea q}_{p}");
101 TF1* fmod_sq_5 = new TF1("fmod_sq_5", mod_sq, -6., 0., 2);
102 fmod_sq_5->SetParameter(0,5.);
103 fmod_sq_5->SetParameter(1,a);
104 fmod_sq_5->SetLineColor(2);
105 fmod_sq_5->Draw("Same");
107 TF1* fmod_sq_10 = new TF1("fmod_sq_10", mod_sq, -6., 0., 2);
108 fmod_sq_10->SetParameter(0,10.);
109 fmod_sq_10->SetParameter(1,a);
110 fmod_sq_10->SetLineColor(3);
111 fmod_sq_10->Draw("Same");
113 TF1* fmod_sq_50 = new TF1("fmod_sq_50", mod_sq, -6., 0., 2);
114 fmod_sq_50->SetParameter(0,50.);
115 fmod_sq_50->SetParameter(1,a);
116 fmod_sq_50->SetLineColor(4);
117 fmod_sq_50->Draw("Same");
120 // =================================================================
121 // Valence Quark Modification
123 TCanvas *c4 = new TCanvas("c4","Valence Quark PDF Nucl. Mod.",
125 TF1* fmod_vq_2 = new TF1("fmod_vq_2", mod_vq, -6., 0., 2);
126 fmod_vq_2->SetParameter(0,2.);
127 fmod_vq_2->SetParameter(1,a);
128 fmod_vq_2->SetMaximum(1.5);
129 fmod_vq_2->SetLineColor(1);
131 fmod_vq_2->GetHistogram()->SetXTitle("log(x)");
132 fmod_vq_2->GetHistogram()->SetYTitle("F^{val q}_{A}/F^{val q}_{p}");
134 TF1* fmod_vq_5 = new TF1("fmod_vq_5", mod_vq, -6., 0., 2);
135 fmod_vq_5->SetParameter(0,5.);
136 fmod_vq_5->SetParameter(1,a);
137 fmod_vq_5->SetLineColor(2);
138 fmod_vq_5->SetMaximum(1.5);
139 fmod_vq_5->Draw("Same");
141 TF1* fmod_vq_10 = new TF1("fmod_vq_10", mod_vq, -6., 0., 2);
142 fmod_vq_10->SetParameter(0,10.);
143 fmod_vq_10->SetParameter(1,a);
144 fmod_vq_10->SetLineColor(3);
145 fmod_vq_10->SetMaximum(1.5);
146 fmod_vq_10->Draw("Same");
148 TF1* fmod_vq_50 = new TF1("fmod_vq_50", mod_vq, -6., 0., 2);
149 fmod_vq_50->SetParameter(0,50.);
150 fmod_vq_50->SetParameter(1,a);
151 fmod_vq_50->SetLineColor(4);
152 fmod_vq_50->SetMaximum(1.5);
153 fmod_vq_50->Draw("Same");
159 Double_t pdf_gl(Double_t* x, Double_t* par)
161 Double_t xx = TMath::Power(10.,x[0]);
163 Double_t upv, dnv, usea, dsea, str, chm, bot, top, gl;
167 AliStructFuncType::StructA(xx, q, a, upv, dnv, usea,
168 dsea, str, chm, bot, top, gl);
175 Double_t mod_gl(Double_t* x, Double_t* par)
177 Double_t xx = TMath::Power(10.,x[0]);
179 Double_t upv, dnv, usea, dsea, str, chm, bot, top, gl;
183 AliStructFuncType::StructA(xx, q, a, upv, dnv, usea,
184 dsea, str, chm, bot, top, gl);
188 AliStructFuncType::StructA(xx, q, 1., upv, dnv, usea,
189 dsea, str, chm, bot, top, gl);
194 Double_t mod_sq(Double_t* x, Double_t* par)
196 Double_t xx = TMath::Power(10.,x[0]);
198 Double_t upv, dnv, usea, dsea, str, chm, bot, top, gl;
202 AliStructFuncType::StructA(xx, q, a, upv, dnv, usea,
203 dsea, str, chm, bot, top, gl);
205 Double_t y1 = usea+dsea;
207 AliStructFuncType::StructA(xx, q, 1., upv, dnv, usea,
208 dsea, str, chm, bot, top, gl);
210 return y1/(usea+dsea);
214 Double_t mod_vq(Double_t* x, Double_t* par)
216 Double_t xx = TMath::Power(10.,x[0]);
218 Double_t upv, dnv, usea, dsea, str, chm, bot, top, gl;
222 AliStructFuncType::StructA(xx, q, a, upv, dnv, usea,
223 dsea, str, chm, bot, top, gl);
225 Double_t y1 = upv+dnv;
227 AliStructFuncType::StructA(xx, q, 1., upv, dnv, usea,
228 dsea, str, chm, bot, top, gl);
236 TLine *line = new TLine(-5.7,1.4,-5.2,1.4);
237 line->SetLineColor(1);
238 line->SetLineWidth(3);
240 tex = new TLatex(-5.1, 1.38,"Q = 2 GeV");
241 tex->SetTextSize(0.04);
242 tex->SetLineWidth(2);
245 TLine *line = new TLine(-5.7,1.3,-5.2,1.3);
246 line->SetLineColor(2);
247 line->SetLineWidth(3);
249 tex = new TLatex(-5.1, 1.28,"Q = 5 GeV");
250 tex->SetTextSize(0.04);
251 tex->SetLineWidth(2);
255 TLine *line = new TLine(-5.7,1.2,-5.2,1.2);
256 line->SetLineColor(3);
257 line->SetLineWidth(3);
259 tex = new TLatex(-5.1, 1.18,"Q = 10 GeV");
260 tex->SetTextSize(0.04);
261 tex->SetLineWidth(2);
265 TLine *line = new TLine(-5.7,1.1,-5.2,1.1);
266 line->SetLineColor(4);
267 line->SetLineWidth(3);
269 tex = new TLatex(-5.1, 1.08,"Q = 50 GeV");
270 tex->SetTextSize(0.04);
271 tex->SetLineWidth(2);