-
Notifications
You must be signed in to change notification settings - Fork 0
/
ComboFollowPlot.cxx
256 lines (214 loc) · 12.5 KB
/
ComboFollowPlot.cxx
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
#include "TH1.h"
#include "TFile.h"
#include "TStyle.h"
#include "TColor.h"
#include "TCanvas.h"
#include <TObjArray.h>
#include <iostream>
using namespace std;
void ComboFollowPlot() {
gStyle->SetOptStat(0);
TCanvas* cLo = new TCanvas("cLo");
gPad->SetGridx(0); gPad->SetGridy(0);
TCanvas* cHi = new TCanvas("cHi");
gPad->SetGridx(0); gPad->SetGridy(0);
TLegend* legLo = new TLegend( 0.55, 0.55, 0.88, 0.88, " p_{T}^{C}>0.2 GeV/c" );
TLegend* legHi = new TLegend( 0.55, 0.55, 0.88, 0.88, " p_{T}^{C}>2 GeV/c" );
legLo->SetMargin(0.2);
legHi->SetMargin(0.2);
TFile *fppLarge = TFile::Open("AjResults/ppAj.root");
TFile *fppFollow = TFile::Open("AjResults/ppFollowAj.root");
TFile *fAuAuLarge = TFile::Open("AjResults/AuAuAj.root");
TFile *fAuAuFollow = TFile::Open("AjResults/FollowAuAuAj.root");
TFile *fPpInAuAuLarge = TFile::Open("AjResults/PpInAuAuAj.root");
TFile *fPpInAuAuFollow = TFile::Open("AjResults/PpInAuAuFollowAj.root");
// --------------------------------------------------
// == pp ==
TH1D* origPpHi=(TH1D*) fppLarge->Get( "UnmatchedAJ_hi");
TH1D* SmallPpHi=(TH1D*) fppFollow->Get( "SmallUnmatchedAJ_hi");
TH1D* LargePpHi=(TH1D*) fppFollow->Get( "LargeUnmatchedAJ_hi");
origPpHi->Rebin(2);
origPpHi->SetLineColor( kGray+2 ); origPpHi->SetLineWidth( 2 ); origPpHi->SetTitle( ";A_{J};fraction" ); origPpHi->Scale(1./origPpHi->Integral());
SmallPpHi->Rebin(2);
SmallPpHi->SetLineColor( kRed ); SmallPpHi->SetLineWidth( 2 ); SmallPpHi->SetTitle( ";A_{J};fraction" ); SmallPpHi->Scale(1./SmallPpHi->Integral());
LargePpHi->Rebin(2);
LargePpHi->SetLineColor( kGreen+1 ); LargePpHi->SetLineWidth( 2 ); LargePpHi->SetTitle( ";A_{J};fraction" ); LargePpHi->Scale(1./LargePpHi->Integral());
origPpHi->SetAxisRange( -0.02, 0.22, "y");
origPpHi->SetAxisRange( -0.1, 0.75, "x");
// --------------------------------------------------
// == AuAu ==
TH1D* origAuAuHi=(TH1D*) fAuAuLarge->Get( "UnmatchedAJ_hi");
TH1D* SmallAuAuHi=(TH1D*) fAuAuFollow->Get( "SmallUnmatchedAJ_hi");
TH1D* LargeAuAuHi=(TH1D*) fAuAuFollow->Get( "LargeUnmatchedAJ_hi");
origAuAuHi->Rebin(2);
origAuAuHi->SetLineColor( kRed ); origAuAuHi->SetLineWidth( 1 ); origAuAuHi->SetTitle( ";A_{J};fraction" ); origAuAuHi->Scale(1./origAuAuHi->Integral());
origAuAuHi->SetMarkerColor( kRed ); origAuAuHi->SetMarkerStyle( 20 );
SmallAuAuHi->Rebin(2);
SmallAuAuHi->SetLineColor( kMagenta+1 ); SmallAuAuHi->SetLineWidth( 1 ); SmallAuAuHi->SetTitle( ";A_{J};fraction" ); SmallAuAuHi->Scale(1./SmallAuAuHi->Integral());
SmallAuAuHi->SetMarkerColor( kMagenta+1 ); SmallAuAuHi->SetMarkerStyle( 20 );
LargeAuAuHi->Rebin(2);
LargeAuAuHi->SetLineColor( kBlue ); LargeAuAuHi->SetLineWidth( 1 ); LargeAuAuHi->SetTitle( ";A_{J};fraction" ); LargeAuAuHi->Scale(1./LargeAuAuHi->Integral());
LargeAuAuHi->SetMarkerColor( kBlue ); LargeAuAuHi->SetMarkerStyle( 20 );
origAuAuHi->SetAxisRange( -0.02, 0.22, "y");
origAuAuHi->SetAxisRange( -0.1, 0.75, "x");
// --------------------------------------------------
// == PpInAuAu ==
TH1D* origPpInAuAuHi=(TH1D*) fPpInAuAuLarge->Get( "UnmatchedAJ_hi");
TH1D* SmallPpInAuAuHi=(TH1D*) fPpInAuAuFollow->Get( "SmallUnmatchedAJ_hi");
TH1D* LargePpInAuAuHi=(TH1D*) fPpInAuAuFollow->Get( "LargeUnmatchedAJ_hi");
origPpInAuAuHi->Rebin(2);
origPpInAuAuHi->SetLineColor( kRed ); origPpInAuAuHi->SetLineWidth( 1 ); origPpInAuAuHi->SetTitle( ";A_{J};fraction" ); origPpInAuAuHi->Scale(1./origPpInAuAuHi->Integral());
origPpInAuAuHi->SetMarkerColor( kRed ); origPpInAuAuHi->SetMarkerStyle( 24 );
SmallPpInAuAuHi->Rebin(2);
SmallPpInAuAuHi->SetLineColor( kMagenta+1 ); SmallPpInAuAuHi->SetLineWidth( 1 ); SmallPpInAuAuHi->SetTitle( ";A_{J};fraction" ); SmallPpInAuAuHi->Scale(1./SmallPpInAuAuHi->Integral());
SmallPpInAuAuHi->SetMarkerColor( kMagenta+1 ); SmallPpInAuAuHi->SetMarkerStyle( 24 );
LargePpInAuAuHi->Rebin(2);
LargePpInAuAuHi->SetLineColor( kBlue ); LargePpInAuAuHi->SetLineWidth( 1 ); LargePpInAuAuHi->SetTitle( ";A_{J};fraction" ); LargePpInAuAuHi->Scale(1./LargePpInAuAuHi->Integral());
LargePpInAuAuHi->SetMarkerColor( kBlue ); LargePpInAuAuHi->SetMarkerStyle( 24 );
origPpInAuAuHi->SetAxisRange( -0.02, 0.22, "y");
origPpInAuAuHi->SetAxisRange( -0.1, 0.75, "x");
// --------------------------------------------------
// == pp ==
TH1D* origPpLo=(TH1D*) fppLarge->Get( "AJ_lo");
TH1D* SmallPpLo=(TH1D*) fppFollow->Get( "SmallAJ_lo");
TH1D* LargePpLo=(TH1D*) fppFollow->Get( "LargeAJ_lo");
origPpLo->Rebin(2);
origPpLo->SetLineColor( kGray+2 ); origPpLo->SetLineWidth( 2 ); origPpLo->SetTitle( ";A_{J};fraction" ); origPpLo->Scale(1./origPpLo->Integral());
SmallPpLo->Rebin(2);
SmallPpLo->SetLineColor( kRed ); SmallPpLo->SetLineWidth( 2 ); SmallPpLo->SetTitle( ";A_{J};fraction" ); SmallPpLo->Scale(1./SmallPpLo->Integral());
LargePpLo->Rebin(2);
LargePpLo->SetLineColor( kGreen+1 ); LargePpLo->SetLineWidth( 2 ); LargePpLo->SetTitle( ";A_{J};fraction" ); LargePpLo->Scale(1./LargePpLo->Integral());
origPpLo->SetAxisRange( -0.02, 0.27, "y");
origPpLo->SetAxisRange( -0.1, 0.75, "x");
// --------------------------------------------------
// == AuAu ==
TH1D* origAuAuLo=(TH1D*) fAuAuLarge->Get( "AJ_lo");
TH1D* SmallAuAuLo=(TH1D*) fAuAuFollow->Get( "SmallAJ_lo");
TH1D* LargeAuAuLo=(TH1D*) fAuAuFollow->Get( "LargeAJ_lo");
origAuAuLo->Rebin(2);
origAuAuLo->SetLineColor( kBlack ); origAuAuLo->SetLineWidth( 1 ); origAuAuLo->SetTitle( ";A_{J};fraction" ); origAuAuLo->Scale(1./origAuAuLo->Integral());
origAuAuLo->SetMarkerColor( kBlack ); origAuAuLo->SetMarkerStyle( 20 );
SmallAuAuLo->Rebin(2);
SmallAuAuLo->SetLineColor( kGray+1 ); SmallAuAuLo->SetLineWidth( 1 ); SmallAuAuLo->SetTitle( ";A_{J};fraction" ); SmallAuAuLo->Scale(1./SmallAuAuLo->Integral());
SmallAuAuLo->SetMarkerColor( kGray+1 ); SmallAuAuLo->SetMarkerStyle( 20 );
LargeAuAuLo->Rebin(2);
LargeAuAuLo->SetLineColor( kGreen+1 ); LargeAuAuLo->SetLineWidth( 1 ); LargeAuAuLo->SetTitle( ";A_{J};fraction" ); LargeAuAuLo->Scale(1./LargeAuAuLo->Integral());
LargeAuAuLo->SetMarkerColor( kGreen+1 ); LargeAuAuLo->SetMarkerStyle( 20 );
origAuAuLo->SetAxisRange( -0.02, 0.27, "y");
origAuAuLo->SetAxisRange( -0.1, 0.75, "x");
// --------------------------------------------------
// == PpInAuAu ==
TH1D* origPpInAuAuLo=(TH1D*) fPpInAuAuLarge->Get( "AJ_lo");
TH1D* SmallPpInAuAuLo=(TH1D*) fPpInAuAuFollow->Get( "SmallAJ_lo");
TH1D* LargePpInAuAuLo=(TH1D*) fPpInAuAuFollow->Get( "LargeAJ_lo");
origPpInAuAuLo->Rebin(2);
origPpInAuAuLo->SetLineColor( kBlack ); origPpInAuAuLo->SetLineWidth( 1 ); origPpInAuAuLo->SetTitle( ";A_{J};fraction" ); origPpInAuAuLo->Scale(1./origPpInAuAuLo->Integral());
origPpInAuAuLo->SetMarkerColor( kBlack ); origPpInAuAuLo->SetMarkerStyle( 24 );
SmallPpInAuAuLo->Rebin(2);
SmallPpInAuAuLo->SetLineColor( kGray+1 ); SmallPpInAuAuLo->SetLineWidth( 1 ); SmallPpInAuAuLo->SetTitle( ";A_{J};fraction" ); SmallPpInAuAuLo->Scale(1./SmallPpInAuAuLo->Integral());
SmallPpInAuAuLo->SetMarkerColor( kGray+1 ); SmallPpInAuAuLo->SetMarkerStyle( 24 );
LargePpInAuAuLo->Rebin(2);
LargePpInAuAuLo->SetLineColor( kGreen+1 ); LargePpInAuAuLo->SetLineWidth( 1 ); LargePpInAuAuLo->SetTitle( ";A_{J};fraction" ); LargePpInAuAuLo->Scale(1./LargePpInAuAuLo->Integral());
LargePpInAuAuLo->SetMarkerColor( kGreen+1 ); LargePpInAuAuLo->SetMarkerStyle( 24 );
origPpInAuAuLo->SetAxisRange( -0.02, 0.27, "y");
origPpInAuAuLo->SetAxisRange( -0.1, 0.75, "x");
// --------------------------------------------------
// -------- Draw ------------------------------------
// --------------------------------------------------
cHi->cd();
// origPpHi->Draw();
// SmallPpHi->Draw("same");
// LargePpHi->Draw("same");
origPpInAuAuHi->Draw();
SmallPpInAuAuHi->Draw("same");
LargePpInAuAuHi->Draw("same");
origAuAuHi->Draw("same");
SmallAuAuHi->Draw("same");
LargeAuAuHi->Draw("same");
// legHi->AddEntry( origPpHi, "pp, R=0.4","lp");
// legHi->AddEntry( SmallPpHi, "pp, R=0.2","lp");
// legHi->AddEntry( LargePpHi, "pp, R=0.4, matched to 0.2","lp");
legHi->AddEntry( origPpInAuAuHi, "pp #otimes Au+Au, R=0.4","lp");
legHi->AddEntry( SmallPpInAuAuHi, "pp #otimes Au+Au, R=0.2","lp");
legHi->AddEntry( LargePpInAuAuHi, "pp #otimes Au+Au, R=0.4 #cbar R=0.2","lp");
legHi->AddEntry( origAuAuHi, "Au+Au, R=0.4","lp");
legHi->AddEntry( SmallAuAuHi, "Au+Au, R=0.2","lp");
legHi->AddEntry( LargeAuAuHi, "Au+Au, R=0.4 #cbar R=0.2","lp");
legHi->Draw();
gPad->SaveAs("plots/ppFollowHi.png");
// --------------------------------------------------
cLo->cd();
// origPpLo->Draw();
// SmallPpLo->Draw("same");
// LargePpLo->Draw("same");
origPpInAuAuLo->Draw();
SmallPpInAuAuLo->Draw("same");
LargePpInAuAuLo->Draw("same");
origAuAuLo->Draw("same");
SmallAuAuLo->Draw("same");
LargeAuAuLo->Draw("same");
// legLo->AddEntry( origPpLo, "pp, R=0.4","lp");
// legLo->AddEntry( SmallPpLo, "pp, R=0.2","lp");
// legLo->AddEntry( LargePpLo, "pp, R=0.4, matched to 0.2","lp");
legLo->AddEntry( origPpInAuAuLo, "pp #otimes Au+Au, R=0.4","lp");
legLo->AddEntry( SmallPpInAuAuLo, "pp #otimes Au+Au, R=0.2","lp");
legLo->AddEntry( LargePpInAuAuLo, "pp #otimes Au+Au, R=0.4 #cbar R=0.2","lp");
legLo->AddEntry( origAuAuLo, "Au+Au, R=0.4","lp");
legLo->AddEntry( SmallAuAuLo, "Au+Au, R=0.2","lp");
legLo->AddEntry( LargeAuAuLo, "Au+Au, R=0.4 #cbar R=0.2","lp");
legLo->Draw();
gPad->SaveAs("plots/ppFollowLo.png");
return 0;
// --------------------------------------------------
// --------------------------------------------------
// --------------------------------------------------
TCanvas* cdPtLo = new TCanvas("cdPtLo");
gPad->SetGridx(0); gPad->SetGridy(0);
TCanvas* cdPtHi = new TCanvas("cdPtHi");
gPad->SetGridx(0); gPad->SetGridy(0);
TLegend* legdPtLo = new TLegend( 0.55, 0.7, 0.88, 0.88, " p_{T}^{C}>0.2 GeV/c" );
TLegend* legdPtHi = new TLegend( 0.55, 0.7, 0.88, 0.88, " p_{T}^{C}>2 GeV/c" );
TH1D* origdPtPpHi=(TH1D*) fppLarge->Get( "UnmatchedhdPtHi");
TH1D* SmalldPtPpHi=(TH1D*) fppFollow->Get( "SmallUnmatchedhdPtHi");
TH1D* LargedPtPpHi=(TH1D*) fppFollow->Get( "LargeUnmatchedhdPtHi");
origdPtPpHi->Rebin(4);
origdPtPpHi->SetLineColor( kGray+2 ); origdPtPpHi->SetLineWidth( 2 ); origdPtPpHi->SetTitle( ";#Delta p_{T};fraction" ); origdPtPpHi->Scale(1./origdPtPpHi->Integral());
SmalldPtPpHi->Rebin(4);
SmalldPtPpHi->SetLineColor( kRed ); SmalldPtPpHi->SetLineWidth( 2 ); SmalldPtPpHi->SetTitle( ";#Delta p_{T};fraction" ); SmalldPtPpHi->Scale(1./SmalldPtPpHi->Integral());
LargedPtPpHi->Rebin(4);
LargedPtPpHi->SetLineColor( kGray+1 ); LargedPtPpHi->SetLineWidth( 2 ); LargedPtPpHi->SetTitle( ";#Delta p_{T};fraction" ); LargedPtPpHi->Scale(1./LargedPtPpHi->Integral());
origdPtPpHi->SetAxisRange( -0.02, 0.2, "y");
// origdPtPpHi->SetAxisRange( -0.1, 0.75, "x");
// --------------------------------------------------
TH1D* origdPtPpLo=(TH1D*) fppLarge->Get( "hdPtLo");
TH1D* SmalldPtPpLo=(TH1D*) fppFollow->Get( "SmallhdPtLo");
TH1D* LargedPtPpLo=(TH1D*) fppFollow->Get( "LargehdPtLo");
origdPtPpLo->Rebin(4);
origdPtPpLo->SetLineColor( kGray+2 ); origdPtPpLo->SetLineWidth( 2 ); origdPtPpLo->SetTitle( ";#Delta p_{T};fraction" ); origdPtPpLo->Scale(1./origdPtPpLo->Integral());
SmalldPtPpLo->Rebin(4);
SmalldPtPpLo->SetLineColor( kRed ); SmalldPtPpLo->SetLineWidth( 2 ); SmalldPtPpLo->SetTitle( ";#Delta p_{T};fraction" ); SmalldPtPpLo->Scale(1./SmalldPtPpLo->Integral());
LargedPtPpLo->Rebin(4);
LargedPtPpLo->SetLineColor( kGray+1 ); LargedPtPpLo->SetLineWidth( 2 ); LargedPtPpLo->SetTitle( ";#Delta p_{T};fraction" ); LargedPtPpLo->Scale(1./LargedPtPpLo->Integral());
origdPtPpLo->SetAxisRange( -0.02, 0.2, "y");
// origdPtPpLo->SetAxisRange( -0.1, 0.75, "x");
// --------------------------------------------------
cdPtHi->cd();
origdPtPpHi->Draw();
SmalldPtPpHi->Draw("same");
LargedPtPpHi->Draw("same");
legdPtHi->AddEntry( origdPtPpHi, "pp, R=0.4","lp");
legdPtHi->AddEntry( SmalldPtPpHi, "pp, R=0.2","lp");
legdPtHi->AddEntry( LargedPtPpHi, "pp, R=0.4, matched to 0.2","lp");
legdPtHi->Draw();
gPad->SaveAs("plots/ppFollowdPtHi.png");
// --------------------------------------------------
cdPtLo->cd();
origdPtPpLo->Draw();
SmalldPtPpLo->Draw("same");
LargedPtPpLo->Draw("same");
legdPtLo->AddEntry( origdPtPpLo, "pp, R=0.4","lp");
legdPtLo->AddEntry( SmalldPtPpLo, "pp, R=0.2","lp");
legdPtLo->AddEntry( LargedPtPpLo, "pp, R=0.4, matched to 0.2","lp");
legdPtLo->Draw();
gPad->SaveAs("plots/ppFollowdPtLo.png");
}