]>
Commit | Line | Data |
---|---|---|
597a5609 | 1 | #include "TLatex.h" |
2 | ||
a5ae7474 | 3 | void SetGraphStyle(TGraph* g, Color_t mcolor, Style_t mstyle, Size_t msize, Color_t lcolor, Style_t lstyle, Width_t lwidth); |
4 | TGraphErrors* read_jmrt(const char* fileName, const Int_t nPoints = 147); | |
5 | TGraph* read_bsat(const char* fileName, const Int_t nPoints=15, Bool_t skipLowEnergy=1); | |
6 | TGraphErrors* read_h1(const char* fileName); | |
7 | TGraphErrors* read_zeus_ee(); | |
8 | TGraphErrors* read_zeus_mm(); | |
597a5609 | 9 | TGraphAsymmErrors* read_alice(Bool_t statOnly=0,Int_t option=0); |
a5ae7474 | 10 | TGraphErrors* read_lhcb(const char* fileName, const int nPoints=20); |
11 | TGraphErrors* read_clark(); | |
12 | TGraphErrors* read_slac(); | |
13 | TGraphErrors* read_gittelman(); | |
14 | TGraphErrors* read_e814(); | |
15 | TGraphErrors* read_e516(); | |
16 | ||
17 | void draw(){ | |
597a5609 | 18 | gStyle->SetPadTickX(1); |
19 | gStyle->SetPadTickY(1); | |
20 | gStyle->SetTickLength(0.02,"X"); | |
21 | gStyle->SetTickLength(0.02,"Y"); | |
a5ae7474 | 22 | gStyle->SetLineScalePS(2); |
23 | TGraphErrors* gJMRT_LO = read_jmrt("JMRT-LO-JPSI.txt"); | |
24 | TGraphErrors* gJMRT_NLO = read_jmrt("JMRT-NLO-JPSI.txt"); | |
25 | TGraph* gBsat_eik = read_bsat("crossy_jpsi.dat.bSat_7TeV"); | |
26 | TGraph* gBsat_pom = read_bsat("crossy_jpsi.dat.bSat_7TeVnoeik"); | |
27 | TF1* fStarlight = new TF1("fStarlight","((1.0-( (4.035*4.035)/(x*x) ))**2.0)*4.1*exp(0.65*log(x))",4.1,2000); | |
28 | TGraphErrors* gH1 = read_h1("d13-058.table_w_allH1_v1.txt"); | |
29 | TGraphErrors* gZeus_ee = read_zeus_ee(); | |
30 | TGraphErrors* gZeus_mm = read_zeus_mm(); | |
31 | TGraphAsymmErrors* gALICEstat = read_alice(1); | |
32 | TGraphAsymmErrors* gALICEfull = read_alice(0); | |
597a5609 | 33 | TGraphAsymmErrors* gALICEpPb = read_alice(0,1); |
34 | TGraphAsymmErrors* gALICEPbp = read_alice(0,2); | |
a5ae7474 | 35 | TGraphErrors* gLHCb = read_lhcb("lhcb_data2.txt"); |
36 | TGraphErrors* gClark = read_clark(); | |
37 | TGraphErrors* gSLAC = read_slac(); | |
38 | TGraphErrors* gGittelman = read_gittelman(); | |
39 | TGraphErrors* gE814 = read_e814(); | |
40 | TGraphErrors* gE516 = read_e516(); | |
41 | fStarlight->SetLineWidth(2); | |
42 | fStarlight->SetLineColor(kBlack); | |
43 | SetGraphStyle(gJMRT_LO , 1,kDot , 1,kRed , 7,2); | |
44 | SetGraphStyle(gJMRT_NLO , 1,kDot , 1,kBlue , 5,2); | |
597a5609 | 45 | SetGraphStyle(gBsat_eik , 1,kDot , 1,kGreen+2, 9,2); |
46 | SetGraphStyle(gBsat_pom , 1,kDot , 1,kGreen+2,10,2); | |
a5ae7474 | 47 | SetGraphStyle(gH1 ,kBlack,kFullCircle ,1.4,kBlack , 1,1); |
48 | SetGraphStyle(gZeus_ee ,kBlack,kOpenSquare ,1.4,kBlack , 1,1); | |
49 | SetGraphStyle(gZeus_mm ,kBlack,kOpenSquare ,1.4,kBlack , 1,1); | |
50 | SetGraphStyle(gLHCb ,kBlack,kOpenCircle ,1.4,kBlack , 1,1); | |
51 | SetGraphStyle(gSLAC ,kBlack,kFullTriangleDown,1.2,kBlack , 1,1); | |
52 | SetGraphStyle(gClark ,kBlack,kFullTriangleDown,1.2,kBlack , 1,1); | |
53 | SetGraphStyle(gGittelman,kBlack,kFullTriangleDown,1.2,kBlack , 1,1); | |
54 | SetGraphStyle(gE814 ,kBlack,kFullTriangleDown,1.2,kBlack , 1,1); | |
55 | SetGraphStyle(gALICEfull,kRed ,kFullSquare ,1.4,kRed , 1,2); | |
56 | SetGraphStyle(gALICEstat,kRed ,kFullSquare ,1.4,kRed , 1,2); | |
597a5609 | 57 | SetGraphStyle(gALICEpPb ,kRed ,kFullSquare ,1.4,kRed , 1,2); |
58 | SetGraphStyle(gALICEPbp ,kRed ,kFullDiamond ,2.4,kRed , 1,2); | |
a5ae7474 | 59 | |
60 | TCanvas* c1 = new TCanvas("c1","c1",1000,700); | |
597a5609 | 61 | gPad->SetLeftMargin(0.09); |
a5ae7474 | 62 | gPad->SetRightMargin(0.003); |
63 | gPad->SetTopMargin(0.02); | |
597a5609 | 64 | gPad->SetBottomMargin(0.12); |
a5ae7474 | 65 | gPad->SetLogx(); |
66 | gPad->SetLogy(); | |
67 | TH1F* frame1 = gPad->DrawFrame(19.9999,9.99,1400,1000); | |
68 | frame1->SetTitle(";W_{#gammap} [GeV];#sigma(#gamma+p #rightarrow J/#psi+p) [nb]"); | |
597a5609 | 69 | frame1->GetXaxis()->SetTitleOffset(1.35); |
70 | frame1->GetXaxis()->SetLabelSize(0.045); | |
71 | frame1->GetYaxis()->SetLabelSize(0.045); | |
72 | frame1->GetXaxis()->SetTitleSize(0.045); | |
73 | frame1->GetYaxis()->SetTitleSize(0.045); | |
a5ae7474 | 74 | fStarlight->Draw("same"); |
75 | gJMRT_LO->Draw("cxsame"); | |
76 | gJMRT_NLO->Draw("cxsame"); | |
77 | gBsat_eik->Draw("lsame"); | |
78 | gBsat_pom->Draw("lsame"); | |
79 | gH1->Draw("pzsame"); | |
80 | gZeus_ee->Draw("pzsame"); | |
81 | gZeus_mm->Draw("pzsame"); | |
82 | gLHCb->Draw("pzsame"); | |
83 | // gE814->Draw("pzsame"); | |
84 | gClark->Draw("pzsame"); | |
597a5609 | 85 | gALICEpPb->Draw("pzsame"); |
86 | gALICEPbp->Draw("pzsame"); | |
87 | // gALICEfull->Draw("pzsame"); | |
a5ae7474 | 88 | TF1* fAliceFit = new TF1("fAliceFit","[0]*x^[1]",0,1000); |
89 | gALICEfull->Fit(fAliceFit,"0"); | |
90 | ||
597a5609 | 91 | TArrow* arrow = new TArrow(100,10,1000,10,0.013,"<|>"); |
92 | arrow->SetFillColor(kRed); | |
93 | arrow->SetLineColor(kRed); | |
94 | arrow->SetLineWidth(2); | |
95 | arrow->DrawArrow(21,11.2,45,11.2); | |
96 | arrow->DrawArrow(577,11.2,952,11.2); | |
97 | arrow->DrawArrow(25,700,32,700); | |
98 | ||
99 | TLegend* leg1 = new TLegend(0.10,0.60,0.6,0.93); | |
a5ae7474 | 100 | leg1->SetFillStyle(0); |
101 | leg1->SetBorderSize(0); | |
597a5609 | 102 | leg1->AddEntry(arrow,"W_{#gammap} interval probed by ALICE","<|>"); |
103 | leg1->AddEntry(gALICEpPb,"ALICE (p-Pb)","p"); | |
104 | leg1->AddEntry(gALICEPbp,"ALICE (Pb-p)","p"); | |
a5ae7474 | 105 | leg1->AddEntry(gLHCb,"LHCb solutions (pp)","p"); |
106 | leg1->AddEntry(gH1,"H1","p"); | |
107 | leg1->AddEntry(gZeus_ee,"ZEUS","p"); | |
108 | // leg1->AddEntry(gE814,"Fixed target experiments","p"); | |
109 | leg1->Draw("same"); | |
110 | ||
597a5609 | 111 | TLegend* leg2 = new TLegend(0.45,0.18,1.00,0.45); |
a5ae7474 | 112 | leg2->SetFillStyle(0); |
113 | leg2->SetBorderSize(0); | |
114 | leg2->AddEntry(gJMRT_LO,"JMRT LO","l"); | |
115 | leg2->AddEntry(gJMRT_NLO,"JMRT NLO","l"); | |
116 | leg2->AddEntry(gBsat_eik,"b-Sat (eikonalized)","l"); | |
117 | leg2->AddEntry(gBsat_pom,"b-Sat (1-Pomeron)","l"); | |
118 | leg2->AddEntry(fStarlight,"STARLIGHT parameterization","l"); | |
119 | leg2->Draw("same"); | |
120 | ||
597a5609 | 121 | // TLatex* l = new TLatex(); |
122 | // l->SetTextAlign(22); | |
123 | // l->SetTextFont(42); | |
124 | // l->DrawLatex(160,7,"W_{#gammap} interval probed by ALICE"); | |
125 | ||
126 | ||
a5ae7474 | 127 | c1->Print("fig3.eps"); |
128 | c1->Print("fig3.png"); | |
597a5609 | 129 | |
a5ae7474 | 130 | } |
131 | ||
132 | void SetGraphStyle(TGraph* g, Color_t mcolor, Style_t mstyle, Size_t msize, Color_t lcolor, Style_t lstyle, Width_t lwidth){ | |
133 | g->SetMarkerColor(mcolor); | |
134 | g->SetMarkerSize(msize); | |
135 | g->SetMarkerStyle(mstyle); | |
136 | g->SetLineColor(lcolor); | |
137 | g->SetLineStyle(lstyle); | |
138 | g->SetLineWidth(lwidth); | |
139 | } | |
140 | ||
141 | TGraphErrors* read_jmrt(const char* fileName, const Int_t nPoints){ | |
142 | ifstream f; | |
143 | f.open(fileName); | |
144 | char b[1000]; | |
145 | getline(f,b); | |
146 | getline(f,b); | |
147 | Double_t q,w[nPoints],cs[nPoints],dcs[nPoints]; | |
148 | for (Int_t i=0;i<nPoints;i++) f >> q >> w[i] >> cs[i] >> dcs[i]; | |
149 | f.close(); | |
150 | return new TGraphErrors(nPoints,w,cs,NULL,dcs); | |
151 | } | |
152 | ||
153 | TGraph* read_bsat(const char* fileName, const Int_t nPoints, Bool_t skipLowEnergy){ | |
154 | ifstream f; | |
155 | f.open(fileName); | |
156 | char b[1000]; | |
157 | Double_t y,w[nPoints],q,cs[nPoints]; | |
158 | if (skipLowEnergy) for (Int_t i=0;i<6;i++) getline(f,b); | |
159 | for (Int_t i=0;i<nPoints;i++) f >> y >> w[i] >> q >> cs[i]; | |
160 | f.close(); | |
161 | return new TGraph(nPoints,w,cs); | |
162 | } | |
163 | ||
164 | TGraphErrors* read_h1(const char* fileName){ | |
165 | // read H1 data from http://www-h1.desy.de/psfiles/figures/d13-058.table_w_allH1_v1.txt | |
166 | ifstream f; | |
167 | f.open(fileName); | |
168 | char b[1000]; | |
169 | Double_t sigm[29]; | |
170 | Double_t dsig[29]; | |
171 | Double_t wavg[29]; | |
172 | Double_t n,pd,wmin,wmax,PhiT; | |
173 | // header | |
174 | for (Int_t i=0;i<65;i++) getline(f,b); | |
175 | Int_t nExclusive=0; | |
176 | for (Int_t i=0;i<40;i++){ | |
177 | f >> n >> pd; | |
178 | if (pd==1) { getline(f,b); continue; } | |
179 | f >> wmin >> wmax >> wavg[nExclusive] >> PhiT >> sigm[nExclusive] >> dsig[nExclusive]; | |
180 | getline(f,b); | |
181 | nExclusive++; | |
182 | } | |
183 | return new TGraphErrors(nExclusive,wavg,sigm,NULL,dsig); | |
184 | } | |
185 | ||
186 | ||
187 | TGraphErrors* read_zeus_mm(){ | |
188 | // ZEUS points | |
189 | const int nZEUSmm=8; | |
190 | Double_t wavgZEUSmm[] = { 25.0, 40.0, 60.0, 80.0, 100.0, 120.0, 140.0, 160.0 }; | |
191 | Double_t sigmZEUSmm[] = { 32.6, 41.5, 55.8, 66.6, 73.4, 86.7, 104.0, 110.0 }; | |
192 | Double_t statZEUSmm[] = { 5.4, 1.1, 1.5, 2.0, 2.3, 3.2, 5.0, 11.0 }; | |
193 | Double_t systZEUSmm[] = { 5.2, 3.3, 4.6, 7.0, 6.0, 6.5,11.0, 12.0 }; | |
194 | Double_t dsigZEUSmm[nZEUSmm]; | |
195 | for (Int_t i=0;i<nZEUSmm;i++) dsigZEUSmm[i]=sqrt(pow(statZEUSmm[i],2.)+pow(systZEUSmm[i],2.)); | |
196 | return new TGraphErrors(nZEUSmm,wavgZEUSmm,sigmZEUSmm,NULL,dsigZEUSmm); | |
197 | } | |
198 | ||
199 | TGraphErrors* read_zeus_ee(){ | |
200 | const int nZEUSee=14; | |
201 | Double_t wavgZEUSee[] = { 27.5, 42.5, 55.0, 65.0, 75.0, 85.0, 100.0, 117.5, 132.5, 155.0, 185.0, 215.0, 245.0, 275.0 }; | |
202 | Double_t sigmZEUSee[] = { 33.6, 43.8, 57.2, 62.5, 68.9, 72.1, 81.9, 95.7, 103.9, 115.0, 129.1, 141.7, 140.3, 189.0 }; | |
203 | Double_t statZEUSee[] = { 1.6, 2.0, 1.8, 2.3, 2.6, 2.9, 2.3, 3.2, 3.6, 3.3, 4.7, 6.1, 7.4, 13.0 }; | |
204 | Double_t systZEUSee[] = { 2.4, 2.8, 3.5, 3.9, 4.5, 4.5, 4.8, 5.4, 5.8, 6.7, 7.7, 8.7, 9.9, 26.0 }; | |
205 | Double_t dsigZEUSee[nZEUSee]; | |
206 | for (Int_t i=0;i<nZEUSee;i++) dsigZEUSee[i]=sqrt(pow(statZEUSee[i],2.)+pow(systZEUSee[i],2.)); | |
207 | return new TGraphErrors(nZEUSee,wavgZEUSee,sigmZEUSee,NULL,dsigZEUSee); | |
208 | } | |
209 | ||
597a5609 | 210 | TGraphAsymmErrors* read_alice(Bool_t statOnly, Int_t option){ |
a5ae7474 | 211 | const int nALICE=4; |
212 | Double_t wavgALICE[] = { 24.1, 30.9, 39.6, 706}; | |
213 | Double_t sigmALICE[] = { 26.6, 33.6, 36.9, 275}; | |
214 | Double_t statALICE[] = { 3.5, 3.0, 5.3, 35}; | |
215 | Double_t systALICEl[] = { 2.7, 2.7, 3.9, 31}; | |
216 | Double_t systALICEh[] = { 2.7, 2.7, 4.0, 26}; | |
217 | Double_t fluxALICE[] = { 0.5, 0.7, 0.7, 25}; | |
597a5609 | 218 | if (statOnly) { |
219 | if (option==0) return new TGraphAsymmErrors(nALICE,wavgALICE,sigmALICE,NULL,NULL,statALICE,statALICE); | |
220 | if (option==1) return new TGraphAsymmErrors(3,wavgALICE,sigmALICE,NULL,NULL,statALICE,statALICE); | |
221 | if (option==2) return new TGraphAsymmErrors(1,&(wavgALICE[3]),&(sigmALICE[3]),NULL,NULL,&(statALICE[3]),&(statALICE[3])); | |
222 | } | |
a5ae7474 | 223 | Double_t dsigALICEl[nALICE]; |
224 | Double_t dsigALICEh[nALICE]; | |
225 | for (Int_t i=0;i<nALICE;i++) dsigALICEl[i] = sqrt(pow(statALICE[i],2)+pow(systALICEl[i],2)); | |
226 | for (Int_t i=0;i<nALICE;i++) dsigALICEh[i] = sqrt(pow(statALICE[i],2)+pow(systALICEh[i],2)); | |
597a5609 | 227 | |
228 | if (option==1) return new TGraphAsymmErrors(3,wavgALICE,sigmALICE,NULL,NULL,dsigALICEl,dsigALICEh); | |
229 | if (option==2) return new TGraphAsymmErrors(1,&(wavgALICE[3]),&(sigmALICE[3]),NULL,NULL,&(dsigALICEl[3]),&(dsigALICEh[3])); | |
a5ae7474 | 230 | return new TGraphAsymmErrors(nALICE,wavgALICE,sigmALICE,NULL,NULL,dsigALICEl,dsigALICEh); |
231 | } | |
232 | ||
233 | TGraphErrors* read_lhcb(const char* fileName, const int nPoints){ | |
234 | ifstream f; | |
235 | f.open(fileName); | |
236 | Double_t w[nPoints],cs[nPoints],dcs[nPoints]; | |
237 | for (Int_t i=0;i<nPoints;i++) f >> w[i] >> cs[i] >> dcs[i]; | |
238 | f.close(); | |
239 | return new TGraphErrors(nPoints,w,cs,NULL,dcs); | |
240 | } | |
241 | ||
242 | TGraphErrors* read_clark(){ | |
243 | const int n=5; | |
244 | Double_t w[] = {8.04, 10.29, 12.06, 14.3, 16.23}; | |
245 | Double_t cs[] = {11.4, 14.4, 17.8, 19.6, 22.0}; | |
246 | Double_t dcs[] = { 2.2, 3.6, 3.4, 3.7, 6.3}; | |
247 | return new TGraphErrors(n,w,cs,NULL,dcs); | |
248 | } | |
249 | ||
250 | TGraphErrors* read_slac(){ | |
251 | const int n=5; | |
252 | Double_t w[] = {5.03, 5.56, 5.72, 6.04, 6.35}; | |
253 | Double_t cs[] = {1.31, 2.83, 3.72, 4.14, 5.03}; | |
254 | Double_t dcs[] = {0.31, 0.48, 0.52, 0.57, 0.66}; | |
255 | return new TGraphErrors(n,w,cs,NULL,dcs); | |
256 | } | |
257 | ||
258 | TGraphErrors* read_gittelman(){ | |
259 | const int n=1; | |
260 | Double_t w[] = {4.64}; | |
261 | Double_t cs[] = {0.484}; | |
262 | Double_t dcs[] = {0.123}; | |
263 | return new TGraphErrors(n,w,cs,NULL,dcs); | |
264 | } | |
265 | ||
266 | TGraphErrors* read_e814(){ | |
267 | const int n=4; | |
268 | Double_t w[] = {11.79, 15.36, 18.11, 20.48}; | |
269 | Double_t cs[] = { 17.7, 20.9, 26.6, 34.2}; | |
270 | Double_t dcs[] = { 2.6, 2.6, 4.8, 3.0}; | |
271 | return new TGraphErrors(n,w,cs,NULL,dcs); | |
272 | } | |
273 | ||
274 | TGraphErrors* read_e516(){ | |
275 | const int n=1; | |
276 | Double_t w[] = {14.1}; | |
277 | Double_t cs[] = { 9.8}; | |
278 | Double_t dcs[] = {2.05}; | |
279 | return new TGraphErrors(n,w,cs,NULL,dcs); | |
280 | } |