]>
Commit | Line | Data |
---|---|---|
8df8e382 | 1 | void SetupStyle(); |
2 | ||
3 | void MakeDataReport(const char* outputFile="JpsiDataReport.pdf", | |
4 | const char* histos="jpsi_HistosSE.root", | |
5 | const char* cf="jpsi_CF.root") | |
6 | { | |
7 | // | |
8 | // Make a pdf file with the efficiency report | |
9 | // | |
10 | ||
11 | SetupStyle(); | |
12 | ||
13 | AliDielectronCFdraw d(cf); | |
14 | d.SetRangeUser("PairType",1,1); | |
15 | d.SetRangeUser("Y",-.89,.9,"0"); | |
16 | ||
17 | ||
18 | TFile f("jpsi_HistosSE.root"); | |
19 | ||
20 | AliDielectronHistos h; | |
21 | TIter nextHists((TList*)f.Get("Dielectron_Histos")); | |
22 | ||
23 | TPaveText pt(.02,.6,.98,.8); | |
24 | TText *t1=pt.AddText(""); | |
25 | TText *t2=pt.AddText(""); | |
26 | ||
27 | TCanvas *c1=new TCanvas; | |
28 | ||
29 | TPDF p(outputFile); | |
30 | ||
31 | // | |
32 | // Invariant mass plots | |
33 | // | |
34 | ||
35 | ||
36 | // | |
37 | // Make QA info | |
38 | // | |
39 | ||
40 | t1->SetTitle("QA summary plots for"); | |
41 | THashList *list=0x0; | |
42 | while ( (list=(THashList*)nextHists()) ){ | |
43 | h.SetHistogramList(*list); | |
44 | t2->SetTitle(list->GetName()); | |
45 | pt.Draw(); | |
46 | c1->Update(); | |
47 | h.Draw(); | |
48 | c1->Clear(); | |
49 | } | |
50 | p.Close(); | |
51 | delete c1; | |
52 | } | |
53 | ||
54 | void SetupStyle() | |
55 | { | |
56 | const Int_t NCont=255; | |
57 | ||
58 | TStyle *st = new TStyle("mystyle","mystyle"); | |
59 | gROOT->GetStyle("Plain")->Copy((*st)); | |
60 | st->SetTitleX(0.1); | |
61 | st->SetTitleW(0.8); | |
62 | st->SetTitleH(0.08); | |
63 | st->SetStatX(.9); | |
64 | st->SetStatY(.9); | |
65 | st->SetNumberContours(NCont); | |
66 | st->SetPalette(1,0); | |
67 | st->SetOptStat("erm"); | |
68 | st->SetOptFit(0); | |
69 | st->SetGridColor(kGray+1); | |
70 | st->SetPadGridX(kTRUE); | |
71 | st->SetPadGridY(kTRUE); | |
72 | st->SetPadTickX(kTRUE); | |
73 | st->SetPadTickY(kTRUE); | |
74 | st->cd(); | |
75 | ||
76 | const Int_t NRGBs = 5; | |
77 | Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 }; | |
78 | Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 }; | |
79 | Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 }; | |
80 | Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 }; | |
81 | ||
82 | TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); | |
83 | ||
84 | } | |
85 | ||
86 | void DrawUnbinned(){ | |
87 | TFile f("jpsi_debug.root"); | |
88 | // if (!f.IsOpen()) return; | |
89 | ||
90 | TTree *t=(TTree*)f.Get("Pair"); | |
91 | // if (!t) return; | |
92 | ||
93 | TCanvas c1; | |
94 | gPad->SetLogy(); | |
95 | gStyle->SetOptStat(0); | |
96 | ||
97 | TLegend *leg=new TLegend(0.59,.79,.99,.99); | |
98 | TLine l; | |
99 | ||
100 | l.SetLineColor(kGreen-5); | |
101 | l.SetLineWidth(2); | |
102 | l.SetLineStyle(2); | |
103 | leg->SetFillColor(10); | |
104 | ||
105 | leg->Clear(); | |
106 | ||
107 | ||
108 | t->SetLineColor(kBlack); | |
109 | t->Draw("M>>hAll(200,-.01,3.99)","","histe"); | |
110 | TH1 *hAll=(TH1*)gROOT->FindObject("hAll"); | |
111 | hAll->SetMinimum(0.1); | |
112 | hAll->SetTitle(";M [GeV]; yield"); | |
113 | leg->AddEntry(hAll,"|n#sigma e|<2 + pt>0.3 GeV","l"); | |
114 | ||
115 | l.DrawLine(3.097,1,3.097,1e4); | |
116 | ||
117 | t->SetLineColor(kOrange-5); | |
118 | t->Draw("M>>hC11(200,-.01,3.99)","abs(Leg1_ImpactParXY)<.004&&abs(Leg2_ImpactParXY)<.004","histesame"); | |
119 | hAll=(TH1*)gROOT->FindObject("hC11"); | |
120 | leg->AddEntry(hAll,"|n#sigma e|<2 + pt>0.3 GeV + |dXY|<40#mum","l"); | |
121 | ||
122 | TCut d1_1="abs(Leg1_TPC_nSigma_Electrons)<1"; | |
123 | TCut d2_1="abs(Leg2_TPC_nSigma_Electrons)<1"; | |
124 | TCut d_1=d1_1+d2_1; | |
125 | ||
126 | t->SetLineColor(kRed); | |
127 | t->Draw("M>>hC1(200,-.01,3.99)","Leg2_Pt>1&&Leg1_Pt>1","histesame"); | |
128 | hAll=(TH1*)gROOT->FindObject("hC1"); | |
129 | leg->AddEntry(hAll,"|n#sigma e|<2 + pt>1 GeV","l"); | |
130 | ||
131 | ||
132 | t->SetLineColor(kGreen); | |
133 | t->Draw("M>>hC2(200,-.01,3.99)",d_1+"Leg2_Pt>1&&Leg1_Pt>1","histesame"); | |
134 | hAll=(TH1*)gROOT->FindObject("hC2"); | |
135 | leg->AddEntry(hAll,"|n#sigma e|<1 + pt>1 GeV","l"); | |
136 | ||
137 | t->SetLineColor(kMagenta); | |
138 | t->Draw("M>>hC3(200,-.01,3.99)","Leg1_Pt>2&&Leg2_Pt>2","histesame"); | |
139 | hAll=(TH1*)gROOT->FindObject("hC3"); | |
140 | leg->AddEntry(hAll,"|n#sigma e|<2 + pt>2 GeV","l"); | |
141 | ||
142 | t->SetLineColor(kBlue); | |
143 | t->Draw("M>>hC4(200,-.01,3.99)","Leg1_Pt>3&&Leg2_Pt>3","histesame"); | |
144 | hAll=(TH1*)gROOT->FindObject("hC4"); | |
145 | leg->AddEntry(hAll,"|n#sigma e|<2 + pt>3 GeV","l"); | |
146 | ||
147 | leg->Draw(); | |
148 | } | |
149 | ||
150 | /* | |
151 | Double_t alephParameters[5]; | |
152 | // simulation | |
153 | alephParameters[0] = 2.15898e+00/50.; | |
154 | alephParameters[1] = 1.75295e+01; | |
155 | alephParameters[2] = 3.40030e-09; | |
156 | alephParameters[3] = 1.96178e+00; | |
157 | alephParameters[4] = 3.91720e+00; | |
158 | Color_t color=kRed; | |
159 | ||
160 | TF1 *foProton = new TF1("foProton", "50*AliExternalTrackParam::BetheBlochAleph(x/0.93827,[0],[1],[2],[3],[4])",0.05,20); | |
161 | TF1 *foPion = new TF1("foPion", "50*AliExternalTrackParam::BetheBlochAleph(x/0.13957,[0],[1],[2],[3],[4])",0.05,20); | |
162 | TF1 *foElec = new TF1("foElec", "50*AliExternalTrackParam::BetheBlochAleph(x/0.000511,[0],[1],[2],[3],[4])",0.05,20); | |
163 | TF1 *foKaon = new TF1("foKaon", "50*AliExternalTrackParam::BetheBlochAleph(x/0.493677,[0],[1],[2],[3],[4])",0.05,20); | |
164 | TF1 *foMuon = new TF1("foMuon", "50*AliExternalTrackParam::BetheBlochAleph(x/0.105658,[0],[1],[2],[3],[4])",0.05,20); | |
165 | // | |
166 | foProton->SetParameters(alephParameters); | |
167 | foPion->SetParameters(alephParameters); | |
168 | foElec->SetParameters(alephParameters); | |
169 | foKaon->SetParameters(alephParameters); | |
170 | foMuon->SetParameters(alephParameters); | |
171 | // | |
172 | foProton->SetLineColor(color); | |
173 | foPion->SetLineColor(color); | |
174 | foElec->SetLineColor(color); | |
175 | foKaon->SetLineColor(color); | |
176 | foMuon->SetLineColor(color); | |
177 | // | |
178 | Int_t lineWidth=1; | |
179 | foProton->SetLineWidth(lineWidth); | |
180 | foPion->SetLineWidth(lineWidth); | |
181 | foElec->SetLineWidth(lineWidth); | |
182 | foKaon->SetLineWidth(lineWidth); | |
183 | foMuon->SetLineWidth(lineWidth); | |
184 | ||
185 | // | |
186 | foProton->SetNpx(200); | |
187 | foPion->SetNpx(200); | |
188 | foElec->SetNpx(200); | |
189 | foKaon->SetNpx(200); | |
190 | foMuon->SetNpx(200); | |
191 | // | |
192 | foProton->Draw("same"); | |
193 | foPion->Draw("same"); | |
194 | foElec->Draw("same"); | |
195 | foKaon->Draw("same"); | |
196 | foMuon->Draw("same"); | |
197 | ||
198 | ||
199 | ||
200 | ||
201 | ||
202 | // data | |
554e40f8 | 203 | Double_t res=5.2e-2; |
8df8e382 | 204 | alephParameters[0] = 0.0283086; |
205 | alephParameters[1] = 2.63394e+01; | |
206 | alephParameters[2] = 5.04114e-11; | |
207 | alephParameters[3] = 2.12543e+00; | |
208 | alephParameters[4] = 4.88663e+00; | |
209 | Color_t color=kRed; | |
210 | ||
554e40f8 | 211 | alephParameters[0] = 0.0283086/0.97; |
212 | //alephParameters[0] = 0.0283086; | |
213 | alephParameters[1] = 2.63394e+01; | |
214 | alephParameters[2] = 5.04114e-11; | |
215 | alephParameters[3] = 2.12543e+00; | |
216 | alephParameters[4] = 4.88663e+00; | |
8df8e382 | 217 | |
218 | ||
219 | TF1 *foDataProton = new TF1("foDataProton", "50*AliExternalTrackParam::BetheBlochAleph(x/0.93827,[0],[1],[2],[3],[4])",0.05,20); | |
554e40f8 | 220 | TF1 *foDataProtonP = new TF1("foDataProtonP",Form( "50*AliExternalTrackParam::BetheBlochAleph(x/0.93827,[0],[1],[2],[3],[4])*(1+%f)",3*res),0.05,20); |
8df8e382 | 221 | TF1 *foDataProtonM = new TF1("foDataProtonM", Form("50*AliExternalTrackParam::BetheBlochAleph(x/0.93827,[0],[1],[2],[3],[4])*(1-%f)",res),0.05,20); |
222 | ||
223 | TF1 *foDataPion = new TF1("foDataPion", "50*AliExternalTrackParam::BetheBlochAleph(x/0.13957,[0],[1],[2],[3],[4])",0.05,20); | |
554e40f8 | 224 | TF1 *foDataPionP = new TF1("foDataPionP",Form( "50*AliExternalTrackParam::BetheBlochAleph(x/0.13957,[0],[1],[2],[3],[4])*(1+%f)",res),0.05,20); |
8df8e382 | 225 | TF1 *foDataPionM = new TF1("foDataPionM", Form("50*AliExternalTrackParam::BetheBlochAleph(x/0.93827,[0],[1],[2],[3],[4])*(1-%f)",res),0.05,20); |
226 | ||
227 | TF1 *foDataElec = new TF1("foDataElec", "50*AliExternalTrackParam::BetheBlochAleph(x/0.000511,[0],[1],[2],[3],[4])",0.05,20); | |
228 | TF1 *foDataElecP = new TF1("foDataElecP",Form( "50*AliExternalTrackParam::BetheBlochAleph(x/0.93827,[0],[1],[2],[3],[4])*(1+%f)",res),0.05,20); | |
229 | TF1 *foDataElecM = new TF1("foDataElecM", Form("50*AliExternalTrackParam::BetheBlochAleph(x/0.93827,[0],[1],[2],[3],[4])*(1-%f)",res),0.05,20); | |
230 | ||
231 | TF1 *foDataKaon = new TF1("foDataKaon", "50*AliExternalTrackParam::BetheBlochAleph(x/0.493677,[0],[1],[2],[3],[4])",0.05,20); | |
232 | TF1 *foDataKaonP = new TF1("foDataKaonP",Form( "50*AliExternalTrackParam::BetheBlochAleph(x/0.93827,[0],[1],[2],[3],[4])*(1+%f)",res),0.05,20); | |
233 | TF1 *foDataKaonM = new TF1("foDataKaonM", Form("50*AliExternalTrackParam::BetheBlochAleph(x/0.93827,[0],[1],[2],[3],[4])*(1-%f)",res),0.05,20); | |
234 | ||
235 | TF1 *foDataMuon = new TF1("foDataMuon", "50*AliExternalTrackParam::BetheBlochAleph(x/0.105658,[0],[1],[2],[3],[4])",0.05,20); | |
236 | TF1 *foDataMuonP = new TF1("foDataMuonP",Form( "50*AliExternalTrackParam::BetheBlochAleph(x/0.93827,[0],[1],[2],[3],[4])*(1+%f)",res),0.05,20); | |
237 | TF1 *foDataMuonM = new TF1("foDataMuonM", Form("50*AliExternalTrackParam::BetheBlochAleph(x/0.93827,[0],[1],[2],[3],[4])*(1-%f)",res),0.05,20); | |
238 | ||
239 | // | |
240 | foDataProton->SetParameters(alephParameters); | |
241 | foDataProtonP->SetParameters(alephParameters); | |
242 | foDataProtonM->SetParameters(alephParameters); | |
243 | foDataPion->SetParameters(alephParameters); | |
244 | foDataPionP->SetParameters(alephParameters); | |
245 | foDataPionM->SetParameters(alephParameters); | |
246 | foDataElec->SetParameters(alephParameters); | |
247 | foDataElecP->SetParameters(alephParameters); | |
248 | foDataElecM->SetParameters(alephParameters); | |
249 | foDataKaon->SetParameters(alephParameters); | |
250 | foDataKaonP->SetParameters(alephParameters); | |
251 | foDataKaonM->SetParameters(alephParameters); | |
252 | foDataMuon->SetParameters(alephParameters); | |
253 | foDataMuonP->SetParameters(alephParameters); | |
254 | foDataMuonM->SetParameters(alephParameters); | |
255 | // | |
256 | foDataProton->SetLineColor(color); | |
257 | foDataProtonP->SetLineColor(color-4); | |
258 | foDataProtonM->SetLineColor(color-4); | |
259 | foDataPion->SetLineColor(color); | |
260 | foDataPionP->SetLineColor(color-4); | |
261 | foDataPionM->SetLineColor(color-4); | |
262 | foDataElec->SetLineColor(color); | |
263 | foDataElecP->SetLineColor(color-4); | |
264 | foDataElecM->SetLineColor(color-4); | |
265 | foDataKaon->SetLineColor(color); | |
266 | foDataKaonP->SetLineColor(color-4); | |
267 | foDataKaonM->SetLineColor(color-4); | |
268 | foDataMuon->SetLineColor(color); | |
269 | foDataMuonP->SetLineColor(color-4); | |
270 | foDataMuonM->SetLineColor(color-4); | |
271 | // | |
272 | Int_t lineWidth=1; | |
273 | foDataProton->SetLineWidth(lineWidth); | |
274 | foDataProtonP->SetLineWidth(lineWidth); | |
275 | foDataProtonM->SetLineWidth(lineWidth); | |
276 | foDataPion->SetLineWidth(lineWidth); | |
277 | foDataPionP->SetLineWidth(lineWidth); | |
278 | foDataPionM->SetLineWidth(lineWidth); | |
279 | foDataElec->SetLineWidth(lineWidth); | |
280 | foDataElecP->SetLineWidth(lineWidth); | |
281 | foDataElecM->SetLineWidth(lineWidth); | |
282 | foDataKaon->SetLineWidth(lineWidth); | |
283 | foDataKaonP->SetLineWidth(lineWidth); | |
284 | foDataKaonM->SetLineWidth(lineWidth); | |
285 | foDataMuon->SetLineWidth(lineWidth); | |
286 | foDataMuonP->SetLineWidth(lineWidth); | |
287 | foDataMuonM->SetLineWidth(lineWidth); | |
288 | ||
289 | // | |
290 | foDataProtonP->SetLineStyle(2); | |
291 | foDataProtonM->SetLineStyle(2); | |
292 | foDataPionP->SetLineStyle(2); | |
293 | foDataPionM->SetLineStyle(2); | |
294 | foDataElecP->SetLineStyle(2); | |
295 | foDataElecM->SetLineStyle(2); | |
296 | foDataKaonP->SetLineStyle(2); | |
297 | foDataKaonM->SetLineStyle(2); | |
298 | foDataMuonP->SetLineStyle(2); | |
299 | foDataMuonM->SetLineStyle(2); | |
300 | ||
301 | // | |
302 | foDataProton->SetNpx(200); | |
303 | foDataProtonP->SetNpx(200); | |
304 | foDataProtonM->SetNpx(200); | |
305 | foDataPion->SetNpx(200); | |
306 | foDataPionP->SetNpx(200); | |
307 | foDataPionM->SetNpx(200); | |
308 | foDataElec->SetNpx(200); | |
309 | foDataKaon->SetNpx(200); | |
310 | foDataMuon->SetNpx(200); | |
311 | // | |
312 | foDataProton->Draw("same"); | |
313 | foDataProtonP->Draw("same"); | |
314 | foDataProtonM->Draw("same"); | |
315 | foDataPion->Draw("same"); | |
316 | foDataElec->Draw("same"); | |
317 | foDataKaon->Draw("same"); | |
318 | foDataMuon->Draw("same"); | |
319 | ||
320 | ||
321 | ||
322 | ||
323 | ||
324 | { | |
325 | ||
326 | Int_t baseColors[5]={kRed, kGreen+1, kAzure-4, kMagenta, kCyan+1}; | |
327 | Int_t sigmaColorOffset=1; | |
328 | ||
329 | Int_t baseColors[5]={kRed, kGreen+1, kAzure-4, kMagenta, kCyan+1}; | |
330 | Int_t sigmaColorOffset=0; | |
2a14a7b1 | 331 | Int_t baseColors[5]={kRed, kRed, kRed, kRed, kRed}; |
8df8e382 | 332 | |
48609e3d | 333 | Double_t sigmas[5]={3,3,3,3,3}; |
8df8e382 | 334 | Double_t masses[5]; |
335 | ||
336 | for (Int_t i=0; i<AliPID::kSPECIES; ++i) masses[i]=AliPID::ParticleMass(i); | |
337 | ||
338 | Double_t res=7.e-2; | |
339 | Double_t alephParameters[5]; | |
340 | ||
341 | alephParameters[0] = 0.0283086; | |
342 | alephParameters[1] = 2.63394e+01; | |
343 | alephParameters[2] = 5.04114e-11; | |
344 | alephParameters[3] = 2.12543e+00; | |
345 | alephParameters[4] = 4.88663e+00; | |
ffbede40 | 346 | alephParameters[0] = 1.25202/50.; //was 1.79571/55.; |
347 | alephParameters[1] = 2.74992e+01; //was 22.0028; | |
348 | alephParameters[2] = TMath::Exp(-3.31517e+01); //was1.55354e-11; | |
349 | alephParameters[3] = 2.46246; //was 2.39804; | |
350 | alephParameters[4] = 6.78938; //was 5.1209; | |
351 | ||
2a14a7b1 | 352 | Double_t mip=50; |
8df8e382 | 353 | |
354 | Color_t color=kRed; | |
355 | Int_t lineWidth=2; | |
356 | ||
357 | TF1 *fBethe[5]; | |
358 | TF1 *fBetheP[5]; | |
359 | TF1 *fBetheM[5]; | |
360 | ||
361 | for (Int_t i=0; i<5; ++i){ | |
362 | fBethe[i] = new TF1(Form("fBethe%d",i), Form("%f*AliExternalTrackParam::BetheBlochAleph(x/%f,[0],[1],[2],[3],[4])",mip,masses[i]),0.05,20); | |
363 | fBetheP[i] = new TF1(Form("fBethe%d",i), Form("%f*AliExternalTrackParam::BetheBlochAleph(x/%f,[0],[1],[2],[3],[4])*(1+%f*%f)",mip,masses[i],res,sigmas[i]),0.05,20); | |
364 | fBetheM[i] = new TF1(Form("fBethe%d",i), Form("%f*AliExternalTrackParam::BetheBlochAleph(x/%f,[0],[1],[2],[3],[4])*(1-%f*%f)",mip,masses[i],res,sigmas[i]),0.05,20); | |
365 | ||
366 | fBethe[i]->SetParameters(alephParameters); | |
367 | fBetheP[i]->SetParameters(alephParameters); | |
368 | fBetheM[i]->SetParameters(alephParameters); | |
369 | ||
370 | fBethe[i]->SetLineColor(baseColors[i]); | |
371 | fBetheP[i]->SetLineColor(baseColors[i]-sigmaColorOffset); | |
372 | fBetheM[i]->SetLineColor(baseColors[i]-sigmaColorOffset); | |
373 | ||
374 | fBethe[i]->SetLineWidth(lineWidth); | |
375 | fBetheP[i]->SetLineWidth(lineWidth); | |
376 | fBetheM[i]->SetLineWidth(lineWidth); | |
377 | ||
378 | fBetheP[i]->SetLineStyle(2); | |
379 | fBetheM[i]->SetLineStyle(2); | |
380 | ||
381 | fBethe[i]->SetNpx(200); | |
382 | fBetheP[i]->SetNpx(200); | |
383 | fBetheM[i]->SetNpx(200); | |
384 | } | |
385 | ||
386 | for (Int_t i=0; i<5; ++i){ | |
387 | fBethe[i]->Draw("same"); | |
48609e3d | 388 | // fBetheP[i]->Draw("same"); |
389 | // fBetheM[i]->Draw("same"); | |
8df8e382 | 390 | } |
391 | } | |
392 | ||
393 | */ | |
394 | ||
8df8e382 | 395 | |
554e40f8 | 396 | /* |
8df8e382 | 397 | |
554e40f8 | 398 | Double_t resolution=0.052; |
399 | Double_t nSigma=3.; | |
400 | TF1 *ffPio=new TF1(Form("fBethe%d",AliPID::kPion), Form("(%f*%f+(AliExternalTrackParam::BetheBlochAleph(x/%f,[0],[1],[2],[3],[4])-AliExternalTrackParam::BetheBlochAleph(x/%f,[0],[1],[2],[3],[4])))/%f", nSigma,resolution, AliPID::ParticleMass(AliPID::kPion), AliPID::ParticleMass(AliPID::kElectron), resolution), 0.05,200.); | |
401 | ffPio->SetParameters(0.0283086/0.97,2.63394e+01,5.04114e-11,2.12543e+00,4.88663e+00); | |
402 | fPPio->Draw("same"); | |
8df8e382 | 403 | |
554e40f8 | 404 | TF1 f("fP","-8*exp(-0.6*x)",0,40); |
405 | f.Draw("same") | |
8df8e382 | 406 | |
0c09cae4 | 407 | //Unbinned fit |
408 | ||
409 | RooWorkspace w("w",kTRUE); | |
410 | w.factory("CBShape::cb(M[0,5],x0[0],sigma[.04],alpha[1],n[1])") | |
411 | RooRealVar cut("cut","cut") | |
412 | RooDataSet data("data","data",c,w::M,"cut") | |
413 | ||
414 | ||
415 | ||
416 | abs(Leg1_TPC_nSigma_Electrons)<3&&abs(Leg2_TPC_nSigma_Electrons)<3&&(Leg1_TPC_nSigma_Pions)>=3.5&&(Leg2_TPC_nSigma_Pions)>=3.5&&(Leg1_TPC_nSigma_Protons)>=3.0&&(Leg2_TPC_nSigma_Protons)>=3.0&&abs(Leg1_Eta)<0.9&&abs(Leg2_Eta)<0.9&&Leg1_NclsTPC>=70&&Leg2_NclsTPC>=70&&Leg1_Pt>=1&&Leg2_Pt>=1&&abs(Y)<0.9&&Leg1_ITSLayerFirstCls<2&&Leg2_ITSLayerFirstCls<2 | |
417 | */ | |
418 | ||
419 | /* | |
420 | c=Pair | |
421 | c->SetAlias("cutE","abs(Leg1_TPC_nSigma_Electrons)<3&&abs(Leg2_TPC_nSigma_Electrons)<3"); | |
422 | c->SetAlias("cutPi","(Leg1_TPC_nSigma_Pions)>=3.5&&(Leg2_TPC_nSigma_Pions)>=3.5"); | |
423 | c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>=1.5&&(Leg2_TPC_nSigma_Protons)>=1.5"); | |
424 | // c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>=3.&&(Leg2_TPC_nSigma_Protons)>=3."); | |
425 | c->SetAlias("pidSig","cutE&&cutPi&&cutP"); | |
426 | ||
427 | c->SetAlias("LegEta","abs(Leg1_Eta)<0.9&&abs(Leg2_Eta)<0.9"); | |
428 | c->SetAlias("LegNcl","Leg1_NclsTPC>=70&&Leg2_NclsTPC>=70"); | |
429 | c->SetAlias("LegPt","Leg1_Pt>=.6&&Leg2_Pt>=.6"); | |
430 | c->SetAlias("Rap","abs(Y)<0.9"); | |
431 | c->SetAlias("QA","LegNcl&&LegEta&&Rap&&LegPt&&Rap"); | |
432 | ||
433 | c->SetAlias("ITS1","Leg1_ITSLayerFirstCls<1&&Leg2_ITSLayerFirstCls<1") | |
434 | c->SetAlias("ITS2","Leg1_ITSLayerFirstCls<2&&Leg2_ITSLayerFirstCls<2") | |
435 | c->SetAlias("ITS3","Leg1_ITSLayerFirstCls<3&&Leg2_ITSLayerFirstCls<3") | |
436 | c->SetAlias("ITS4","Leg1_ITSLayerFirstCls<4&&Leg2_ITSLayerFirstCls<4") | |
437 | c->SetAlias("ITS5","Leg1_ITSLayerFirstCls<5&&Leg2_ITSLayerFirstCls<5") | |
438 | c->SetAlias("ITS6","Leg1_ITSLayerFirstCls<6&&Leg2_ITSLayerFirstCls<6") | |
439 | ||
440 | c->SetAlias("cut","PairType==1 && QA && pidSig && ITS5"); | |
441 | ||
442 | TFile f("/data/Work/data/pp2.76/m.root","recreate") | |
443 | TTree *tnew=c->CopyTree("cut") | |
444 | tnew->Write("Pair"); | |
445 | f.Save() | |
446 | f.Close() | |
447 | ||
448 | c->SetMarkerStyle(20); | |
449 | c->SetMarkerSize(1); | |
450 | c->Draw("M>>hM(250,0.,5.)","cut","e"); | |
451 | hM=hM | |
452 | hM->SetMarkerColor(kRed) | |
453 | hM->SetLineColor(kRed) | |
454 | ||
455 | c->SetAlias("cutLS","(PairType==0||PairType==2) && QA && pidSig && ITS5"); | |
456 | ||
457 | c->Draw("M>>hMLS(250,0.,5.)","cutLS","esame"); | |
458 | hMLS=hMLS | |
459 | hMLS->SetLineColor(kBlue); | |
460 | hMLS->SetMarkerStyle(27) | |
461 | Double_t factor=hM->Integral(hM->FindBin(3.201),hM->FindBin(4.9))/hMLS->Integral(hMLS->FindBin(3.201),hMLS->FindBin(4.9)); | |
462 | printf("scale factor: %.2f\n",factor) | |
463 | hMLS->Scale(factor); | |
464 | ||
465 | hSub=(TH1*)hM->Clone("hSub"); | |
466 | hSub->Add(hMLS,-1); | |
467 | hSub->SetLineColor(kBlack); | |
468 | hSub->SetMarkerColor(kBlack); | |
469 | hSub->Draw("same") | |
470 | ||
471 | hSub->Integral(hSub->FindBin(2.961),hSub->FindBin(3.159)) | |
8df8e382 | 472 | |
554e40f8 | 473 | */ |
8df8e382 | 474 | |
475 | ||
0c09cae4 | 476 | |
554e40f8 | 477 | /* |
fb7d2d99 | 478 | // |
479 | // Default | |
480 | // | |
481 | c->SetAlias("cutE","abs(Leg1_TPC_nSigma_Electrons)<3&&abs(Leg2_TPC_nSigma_Electrons)<3"); | |
0c09cae4 | 482 | c->SetAlias("cutPi","(Leg1_TPC_nSigma_Pions)>=3.5&&(Leg2_TPC_nSigma_Pions)>=3.5"); |
483 | c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>=3&&(Leg2_TPC_nSigma_Protons)>=3"); | |
fb7d2d99 | 484 | c->SetAlias("pidSig","cutE&&cutPi&&cutP"); |
485 | ||
486 | c->SetAlias("LegEta","abs(Leg1_Eta)<0.9&&abs(Leg2_Eta)<0.9"); | |
0c09cae4 | 487 | c->SetAlias("LegNcl","Leg1_NclsTPC>=70&&Leg2_NclsTPC>=70"); |
488 | c->SetAlias("LegPt","Leg1_Pt>=.6&&Leg2_Pt>=0.6"); | |
fb7d2d99 | 489 | c->SetAlias("Rap","abs(Y)<0.9"); |
0c09cae4 | 490 | c->SetAlias("QA","LegNcl&&LegEta&&Rap&&LegPt&&Rap"); |
fb7d2d99 | 491 | |
0c09cae4 | 492 | c->SetAlias("cutSigN","Leg2_TPCsignalN>=Leg2_NclsTPC&&Leg1_TPCsignalN>=Leg1_NclsTPC"); |
493 | c->SetAlias("etaAdd","Leg1_Eta<0&&Leg2_Eta<0") | |
494 | c->SetAlias("ITS1","Leg1_ITSLayerFirstCls<1&&Leg2_ITSLayerFirstCls<1") | |
495 | c->SetAlias("ITS2","Leg1_ITSLayerFirstCls<2&&Leg2_ITSLayerFirstCls<2") | |
496 | c->SetAlias("ITS3","Leg1_ITSLayerFirstCls<3&&Leg2_ITSLayerFirstCls<3") | |
497 | c->SetAlias("ITS4","Leg1_ITSLayerFirstCls<4&&Leg2_ITSLayerFirstCls<4") | |
498 | c->SetAlias("ITS5","Leg1_ITSLayerFirstCls<5&&Leg2_ITSLayerFirstCls<5") | |
499 | c->SetAlias("ITS6","Leg1_ITSLayerFirstCls<6&&Leg2_ITSLayerFirstCls<6") | |
fb7d2d99 | 500 | |
0c09cae4 | 501 | c->SetAlias("cut","PairType==1 && QA && pidSig"); |
fb7d2d99 | 502 | |
0c09cae4 | 503 | c->SetMarkerStyle(20); |
504 | c->SetMarkerSize(.5); | |
fb7d2d99 | 505 | c->Draw("M>>hM(125,0.,5.)","cut","e"); |
0c09cae4 | 506 | c->Draw("M>>hM1(125,0.,5.)","cut&&ITS1","esame"); hM1->SetLineColor(kRed); hM1->SetMarkerColor(kRed); |
507 | c->Draw("M>>hM2(125,0.,5.)","cut&&ITS2","esame"); hM2->SetLineColor(kBlue); hM2->SetMarkerColor(kBlue); | |
508 | c->Draw("M>>hM3(125,0.,5.)","cut&&ITS3","esame"); hM3->SetLineColor(kGreen); hM3->SetMarkerColor(kGreen); | |
509 | c->Draw("M>>hM4(125,0.,5.)","cut&&ITS4","esame"); hM4->SetLineColor(kMagenta); hM4->SetMarkerColor(kMagenta); | |
510 | c->Draw("M>>hM5(125,0.,5.)","cut&&ITS5","esame"); hM5->SetLineColor(kYellow); hM5->SetMarkerColor(kYellow); | |
511 | c->Draw("M>>hM6(125,0.,5.)","cut&&ITS6","esame"); hM6->SetLineColor(kAzure); hM6->SetMarkerColor(kAzure); | |
512 | ||
513 | c->SetAlias("cut","PairType==1&&QA&&pidSig&&Leg1_ITSLayerFirstCls<1&&Leg2_ITSLayerFirstCls<1"); | |
514 | c->Draw("M>>hM1(125,0.,5.)","cut","esame"); | |
515 | hM1->SetMarkerColor(kBlue); hM1->SetLineColor(kBlue) | |
516 | ||
517 | c->SetAlias("cut","PairType==1&&QA&&pidSig&&Leg1_ITSLayerFirstCls<2&&Leg2_ITSLayerFirstCls<2&&Run!=146805"); | |
518 | c->Draw("M>>hM2(125,0.,5.)","cut","esame"); | |
519 | hM2->SetMarkerColor(kMagenta); hM2->SetLineColor(kMagenta); hM2->SetMarkerStyle(20); | |
520 | ||
521 | c->SetAlias("cut","PairType==1&&QA&&pidSig&&Leg1_ITSLayerFirstCls<5&&Leg2_ITSLayerFirstCls<5"); | |
522 | c->Draw("M>>hM3(125,0.,5.)","cut","esame"); | |
523 | hM3->SetMarkerColor(kGreen); hM3->SetLineColor(kGreen) | |
524 | ||
525 | // | |
526 | c->SetMarkerColor(kBlack); c->SetLineColor(kBlack); c->Draw("M>>hM(125,0.,5.)","cut","e"); | |
527 | new TCanvas; c->SetMarkerColor(kBlue); c->SetLineColor(kBlue); c->Draw("M>>hM2(125,0.01,5.01)","cut","e"); | |
528 | new TCanvas; c->SetMarkerColor(kRed); c->SetLineColor(kRed); c->Draw("M>>hM3(125,0.02,5.02)","cut","e"); | |
529 | new TCanvas; c->SetMarkerColor(kGreen); c->SetLineColor(kGreen); c->Draw("M>>hM4(125,0.03,5.03)","cut","e"); | |
530 | ||
531 | ||
532 | ||
533 | // trd cut | |
534 | ||
535 | c->SetAlias("stp","1./9.*TMath::Pi()") | |
536 | c->SetAlias("trdcut","((Leg1_Phi>1.5*stp&&Leg1_Phi<5.5*stp || Leg1_Phi>9.5*stp&&Leg1_Phi<16.5*stp) && (Leg2_Phi>1.5*stp&&Leg2_Phi<5.5*stp || Leg2_Phi>9.5*stp&&Leg2_Phi<16 | |
537 | .5*stp))") | |
538 | ||
539 | c->SetAlias("trdcutn","(!(Leg1_Phi>1.5*stp&&Leg1_Phi<5.5*stp || Leg1_Phi>9.5*stp&&Leg1_Phi<16.5*stp) && !(Leg2_Phi>1.5*stp&&Leg2_Phi<5.5*stp || Leg2_Phi>9.5*stp&&Leg2_Phi | |
540 | <16.5*stp))") | |
541 | ||
542 | c->SetAlias("trdcutn2","((Leg1_Phi>1.5*stp&&Leg1_Phi<5.5*stp || Leg1_Phi>9.5*stp&&Leg1_Phi<16.5*stp) && !(Leg2_Phi>1.5*stp&&Leg2_Phi<5.5*stp || Leg2_Phi>9.5*stp&&Leg2_Phi<16.5*stp))") | |
8df8e382 | 543 | |
0c09cae4 | 544 | c->SetAlias("trdcutn3","(!(Leg1_Phi>1.5*stp&&Leg1_Phi<5.5*stp || Leg1_Phi>9.5*stp&&Leg1_Phi<16.5*stp) && (Leg2_Phi>1.5*stp&&Leg2_Phi<5.5*stp || Leg2_Phi>9.5*stp&&Leg2_Phi<16.5*stp))") |
8df8e382 | 545 | |
0c09cae4 | 546 | c1->Divide(2,2) |
547 | c1->cd(1) | |
548 | c->Draw("M>>hM1(125,0.,5.)","cut&&trdcut","e"); | |
549 | c1->cd(2) | |
550 | c->Draw("M>>hM2(125,0.,5.)","cut&&trdcutn","e"); | |
551 | c1->cd(3) | |
552 | c->Draw("M>>hM3(125,0.,5.)","cut&&trdcutn2","e"); | |
553 | c1->cd(4) | |
554 | c->Draw("M>>hM4(125,0.,5.)","cut&&trdcutn3","e"); | |
fb7d2d99 | 555 | |
556 | ||
0c09cae4 | 557 | c->SetAlias("notrd","((Leg1_TrackStatus&512)==0 && (Leg2_TrackStatus&512)==0)") |
558 | c->SetAlias("withtrd","((Leg1_TrackStatus&512)==512 && (Leg2_TrackStatus&512)==512)") | |
559 | ||
560 | c->SetAlias("notrd2","((Leg1_TrackStatus&512)==0 && (Leg2_TrackStatus&512)==512)") | |
561 | c->SetAlias("notrd3","((Leg1_TrackStatus&512)==512 && (Leg2_TrackStatus&512)==0)") | |
562 | ||
563 | c3->Divide(2,2) | |
564 | c3->cd(1) | |
565 | c->Draw("M>>hM5(125,0.,5.)","cut&¬rd","e"); | |
566 | c3->cd(2) | |
567 | c->Draw("M>>hM6(125,0.,5.)","cut&&withtrd","e"); | |
568 | c3->cd(3) | |
569 | c->Draw("M>>hM7(125,0.,5.)","cut&¬rd2","e"); | |
570 | c3->cd(4) | |
571 | c->Draw("M>>hM8(125,0.,5.)","cut&¬rd3","e"); | |
572 | ||
573 | //pt ele only pid | |
574 | c->SetAlias("cutE","Leg1_TPC_nSigma_Electrons>-2.&&Leg1_TPC_nSigma_Electrons<3&&Leg2_TPC_nSigma_Electrons>-2.&&Leg2_TPC_nSigma_Electrons<3"); | |
575 | c->SetAlias("pidSig","cutE"); | |
576 | c->SetAlias("LegPt","Leg1_Pt>1.2&&Leg2_Pt>1.2"); | |
577 | ||
578 | c->SetAlias("LegEta","abs(Leg1_Eta)<0.9&&abs(Leg2_Eta)<0.9"); | |
579 | c->SetAlias("LegNcl","Leg1_NclsTPC>70&&Leg2_NclsTPC>70"); | |
580 | c->Draw("M>>hM(125,0.,5.)","cut","e"); | |
581 | ||
fb7d2d99 | 582 | //--------------------- |
583 | ||
0c09cae4 | 584 | c->SetAlias("cut","PairType==1&&QA") |
8df8e382 | 585 | |
8df8e382 | 586 | |
554e40f8 | 587 | c->SetAlias("nCls","Leg1_NclsTPC>90&&Leg2_NclsTPC>90"); |
8df8e382 | 588 | |
fb7d2d99 | 589 | |
590 | c->SetAlias("cutE","Leg1_TPC_nSigma_Electrons>-1 && Leg2_TPC_nSigma_Electrons>-1"); | |
0c09cae4 | 591 | c->SetAlias("LegPt","Leg1_Pt>1.5&&Leg2_Pt>1.5"); |
592 | ||
593 | //distance to chamber edge | |
594 | c->SetAlias("tgs","pi/180.*20"); | |
595 | c->SetAlias("ed1","Leg1_Phi-int(Leg1_Phi/tgs+.5)*tgs"); | |
596 | c->SetAlias("ed2","Leg2_Phi-int(Leg2_Phi/tgs+.5)*tgs"); | |
fb7d2d99 | 597 | |
0c09cae4 | 598 | c->Draw("M:abs(ed1)>>hMd(15,0.,.18,65,0.,5.2)","cut","colz"); |
fb7d2d99 | 599 | |
600 | ||
554e40f8 | 601 | //--------PID |
45b2b1b8 | 602 | //-Param dEdx |
603 | c->SetAlias("cutPipardEdx","Leg1_TPC_signal>75-20*exp(-.7*Leg1_P_InnerParam)&&Leg2_TPC_signal>75-20*exp(-.7*Leg2_P_InnerParam)") | |
0c09cae4 | 604 | |
605 | //require TOF PID | |
45b2b1b8 | 606 | c->SetAlias("TOFe1r","(((Leg1_TrackStatus&32768)==32768)&&abs(Leg1_TOF_nSigma_Electrons)<3)"); |
607 | c->SetAlias("TOFe2r","(((Leg2_TrackStatus&32768)==32768)&&abs(Leg2_TOF_nSigma_Electrons)<3)"); | |
608 | ||
0c09cae4 | 609 | //if avail TOF PID |
610 | c->SetAlias("TOFe1","((Leg1_TrackStatus&32768)==0)||(((Leg1_TrackStatus&32768)==32768)&&abs(Leg1_TOF_nSigma_Electrons)<3)"); | |
611 | c->SetAlias("TOFe2","((Leg2_TrackStatus&32768)==0)||(((Leg2_TrackStatus&32768)==32768)&&abs(Leg2_TOF_nSigma_Electrons)<3)"); | |
612 | c->SetAlias("TOFe","TOFe1&&TOFe2"); | |
613 | ||
614 | ||
45b2b1b8 | 615 | c->SetAlias("cutPspecial","(abs(Leg1_TPC_nSigma_Protons)>3||(abs(Leg1_TPC_nSigma_Protons)<=3&&TOFe1r))&&(abs(Leg2_TPC_nSigma_Protons)>3||(abs(Leg2_TPC_nSigma_Protons)<=3&&TOFe2r))") |
8df8e382 | 616 | |
0c09cae4 | 617 | c->SetAlias("cutP","(Leg1_Pt>1.2||TOFe1r)) && (Leg2_Pt>1.2 || TOFe2r)") |
618 | ||
554e40f8 | 619 | //-- nsigma |
620 | c->SetAlias("cutE","abs(Leg1_TPC_nSigma_Electrons)<3&&abs(Leg2_TPC_nSigma_Electrons)<3"); | |
ffbede40 | 621 | // c->SetAlias("cutE","Leg1_TPC_nSigma_Electrons>-1 && Leg2_TPC_nSigma_Electrons>-1"); |
554e40f8 | 622 | c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>3&&abs(Leg2_TPC_nSigma_Pions)>3"); |
fb7d2d99 | 623 | c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>3.&&(Leg2_TPC_nSigma_Protons)>3.3"); |
554e40f8 | 624 | c->SetAlias("pidSig","cutE&&cutPi&&cutP"); |
554e40f8 | 625 | //-- Pi param |
45b2b1b8 | 626 | // c->SetAlias("eleParam","Leg1_TPC_nSigma_Electrons<5&&Leg2_TPC_nSigma_Electrons<5&&Leg1_TPC_nSigma_Electrons>-2.65*exp(-0.9*Leg1_P_InnerParam)&&Leg2_TPC_nSigma_Electrons>-8*exp(-0.6*Leg2_P_InnerParam)"); |
627 | c->SetAlias("eleParam","Leg1_TPC_nSigma_Electrons<5&&Leg2_TPC_nSigma_Electrons<5&&Leg1_TPC_nSigma_Electrons>-3.7*exp(-0.9*Leg1_P_InnerParam)-0.1&&Leg2_TPC_nSigma_Electrons>-3.7*exp(-0.6*Leg2_P_InnerParam)-0.1"); | |
554e40f8 | 628 | c->SetAlias("pidParam","eleParam&&cutP"); |
8df8e382 | 629 | |
630 | ||
631 | ||
554e40f8 | 632 | c->SetAlias("LegEta","abs(Leg1_Eta)<0.9&&abs(Leg2_Eta<0.9)"); |
ffbede40 | 633 | c->SetAlias("LegNcl","Leg1_NclsTPC>90&&Leg2_NclsTPC>90"); |
45b2b1b8 | 634 | c->SetAlias("LegPt","Leg1_Pt>1&&Leg2_Pt>1"); |
554e40f8 | 635 | c->SetAlias("Rap","abs(Y)<0.9"); |
636 | c->SetAlias("QA","LegNcl&&LegEta&&Rap"); | |
637 | c->SetAlias("spdFirst","(Leg1_ITS_clusterMap&1)==1 && (Leg2_ITS_clusterMap&1)==1"); | |
ffbede40 | 638 | c->SetAlias("LegNclDiffIter1","abs(Leg1_NclsTPC-Leg1_NclsTPCiter1)<10&&abs(Leg2_NclsTPC-Leg2_NclsTPCiter1)<10") |
639 | c->SetAlias("LegNclPID","(Leg1_NclsTPC-Leg1_TPCsignalN)<20&&(Leg2_NclsTPC-Leg2_TPCsignalN)<20") | |
8df8e382 | 640 | |
fb7d2d99 | 641 | c->SetAlias("LegNcl","Leg1_NFclsTPCrobust&&Leg2_NFclsTPCrobust"); |
642 | c->SetAlias("cut","PairType==1&&QA&&pidSig&&LegPt"); | |
643 | ||
45b2b1b8 | 644 | c->SetAlias("cut","PairType==1&&QA&&cutPipardEdx&&cutPspecial") |
645 | c->SetAlias("cut","PairType==1&&QA&&pidSig&&LegPt") | |
8df8e382 | 646 | |
fb7d2d99 | 647 | c->SetMarkerStyle(22); |
554e40f8 | 648 | c->SetMarkerSize(.8); |
fb7d2d99 | 649 | |
650 | //-------- nsigma | |
651 | ||
554e40f8 | 652 | c->SetMarkerColor(kBlack); |
8df8e382 | 653 | c->SetLineColor(kBlack); |
8df8e382 | 654 | |
fb7d2d99 | 655 | c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>3&&abs(Leg2_TPC_nSigma_Pions)>3"); |
656 | c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>3&&(Leg2_TPC_nSigma_Protons)>3"); | |
657 | ||
658 | c->Draw("M>>hM(301,-.01,6.01)","cut","e"); | |
659 | c->GetHistogram()->GetXaxis()->SetRangeUser(2,4); | |
660 | ||
661 | //-------- | |
8df8e382 | 662 | |
554e40f8 | 663 | c->SetMarkerColor(kBlue); |
8df8e382 | 664 | c->SetLineColor(kBlue); |
fb7d2d99 | 665 | |
1201a1a9 | 666 | c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>3&&abs(Leg2_TPC_nSigma_Pions)>3"); |
667 | c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>3&&(Leg2_TPC_nSigma_Protons)>3"); | |
8df8e382 | 668 | |
fb7d2d99 | 669 | c->Draw("M>>hM2(301,-.01,6.01)","cut","esame"); |
670 | ||
671 | //-------- | |
ffbede40 | 672 | |
554e40f8 | 673 | c->SetMarkerColor(kGreen); |
8df8e382 | 674 | c->SetLineColor(kGreen); |
fb7d2d99 | 675 | |
676 | c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>4&&abs(Leg2_TPC_nSigma_Pions)>4"); | |
677 | c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>3.5&&(Leg2_TPC_nSigma_Protons)>3.5"); | |
678 | ||
679 | c->Draw("M>>hM3(301,-.01,6.01)","cut","esame"); | |
680 | ||
681 | //-------- | |
682 | ||
683 | c->SetMarkerColor(kMagenta); | |
684 | c->SetLineColor(kMagenta); | |
685 | ||
45b2b1b8 | 686 | c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>3.5&&abs(Leg2_TPC_nSigma_Pions)>3.5"); |
fb7d2d99 | 687 | c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>4&&(Leg2_TPC_nSigma_Protons)>4"); |
688 | ||
689 | c->Draw("M>>hM4(301,-.01,6.01)","cut","esame"); | |
690 | ||
691 | ||
692 | ||
693 | ||
694 | ||
695 | // | |
696 | //-------- rapidity | |
697 | // | |
698 | ||
699 | c->SetMarkerColor(kBlack); | |
700 | c->SetLineColor(kBlack); | |
701 | ||
702 | c->Draw("M>>hM(301,-.01,6.01)","cut&&Y<=0","e"); | |
703 | ||
704 | //-------- | |
705 | ||
706 | c->SetMarkerColor(kBlue); | |
707 | c->SetLineColor(kBlue); | |
708 | ||
709 | c->Draw("M>>hM2(301,-.01,6.01)","cut&&Y>0","esame"); | |
710 | ||
711 | ||
712 | ||
713 | ||
714 | ||
715 | c->SetAlias("cutE","Leg1_TPC_nSigma_Electrons>-1 && Leg2_TPC_nSigma_Electrons>-1"); | |
716 | c->SetAlias("LegPt","Leg1_Pt>1.2&&Leg2_Pt>1.2"); | |
717 | ||
718 | c->SetAlias("cut","PairType==1&&QA&&pidSig"); | |
719 | ||
720 | ||
721 | //-------- binning | |
722 | ||
723 | c->SetMarkerColor(kBlack); | |
724 | c->SetLineColor(kBlack); | |
725 | ||
0c09cae4 | 726 | // c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>3&&abs(Leg2_TPC_nSigma_Pions)>3"); |
727 | // c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>3&&(Leg2_TPC_nSigma_Protons)>3"); | |
fb7d2d99 | 728 | |
1201a1a9 | 729 | c->Draw("M>>hM(601,-.015,6.005)","cut","e"); |
fb7d2d99 | 730 | |
731 | TGraphErrors gr0; | |
732 | TH1 *h=c->GetHistogram(); | |
733 | ||
734 | gr0->SetLineColor(h->GetLineColor()); | |
735 | gr0->SetMarkerColor(h->GetMarkerColor()); | |
736 | for (Int_t i=0;i<h->GetNbinsX();++i){ | |
737 | gr0.SetPoint(i,h->GetXaxis()->GetBinCenter(i+1),h->GetBinContent(i+1)); | |
738 | // gr0.SetPointError(i,h->GetXaxis()->GetBinWidth(i+1)/2,h->GetBinError(i+1)); | |
739 | gr0.SetPointError(i,0,h->GetBinError(i+1)); | |
740 | } | |
741 | ||
742 | //-------- | |
743 | ||
744 | c->SetMarkerColor(kBlue); | |
745 | c->SetLineColor(kBlue); | |
746 | ||
1201a1a9 | 747 | c->Draw("M>>hM2(601,-.01,6.01)","cut","egoff"); |
fb7d2d99 | 748 | |
749 | TGraphErrors gr1; | |
750 | TH1 *h=c->GetHistogram(); | |
751 | ||
752 | gr1->SetLineColor(h->GetLineColor()); | |
753 | gr1->SetMarkerColor(h->GetMarkerColor()); | |
754 | for (Int_t i=0;i<h->GetNbinsX();++i){ | |
755 | gr1.SetPoint(i,h->GetXaxis()->GetBinCenter(i+1),h->GetBinContent(i+1)); | |
756 | // gr1.SetPointError(i,h->GetXaxis()->GetBinWidth(i+1)/2,h->GetBinError(i+1)); | |
757 | gr1.SetPointError(i,0,h->GetBinError(i+1)); | |
758 | } | |
759 | ||
760 | //-------- | |
761 | ||
762 | c->SetMarkerColor(kGreen); | |
763 | c->SetLineColor(kGreen); | |
764 | ||
1201a1a9 | 765 | c->Draw("M>>hM3(601,-.005,6.015)","cut","egoff"); |
fb7d2d99 | 766 | c->GetHistogram()->GetXaxis()->SetRangeUser(2.,4); |
767 | ||
768 | TGraphErrors gr2; | |
769 | TH1 *h=c->GetHistogram(); | |
770 | ||
771 | gr2->SetLineColor(h->GetLineColor()); | |
772 | gr2->SetMarkerColor(h->GetMarkerColor()); | |
773 | for (Int_t i=0;i<h->GetNbinsX();++i){ | |
774 | gr2.SetPoint(i,h->GetXaxis()->GetBinCenter(i+1),h->GetBinContent(i+1)); | |
775 | // gr2.SetPointError(i,h->GetXaxis()->GetBinWidth(i+1)/2,h->GetBinError(i+1)); | |
776 | gr2.SetPointError(i,0,h->GetBinError(i+1)); | |
777 | } | |
778 | ||
779 | //-------- | |
780 | ||
781 | c->SetMarkerColor(kMagenta); | |
782 | c->SetLineColor(kMagenta); | |
783 | ||
1201a1a9 | 784 | c->Draw("M>>hM4(601,-.0,6.02)","cut","egoff"); |
fb7d2d99 | 785 | |
786 | TGraphErrors gr3; | |
787 | TH1 *h=c->GetHistogram(); | |
788 | ||
789 | gr3->SetLineColor(h->GetLineColor()); | |
790 | gr3->SetMarkerColor(h->GetMarkerColor()); | |
791 | for (Int_t i=0;i<h->GetNbinsX();++i){ | |
792 | gr3.SetPoint(i,h->GetXaxis()->GetBinCenter(i+1),h->GetBinContent(i+1)); | |
793 | // gr3.SetPointError(i,h->GetXaxis()->GetBinWidth(i+1)/2,h->GetBinError(i+1)); | |
794 | gr3.SetPointError(i,0,h->GetBinError(i+1)); | |
795 | } | |
796 | ||
797 | gr0->Draw("ap"); | |
798 | gr0->GetHistogram()->GetXaxis()->SetRangeUser(2.,4); | |
799 | gr1->Draw("p"); | |
800 | gr2->Draw("p"); | |
801 | gr3->Draw("p"); | |
8df8e382 | 802 | |
803 | ||
804 | ||
805 | ||
ffbede40 | 806 | c->SetAlias("LegNclDiffIter1","(Leg1_NclsTPC-Leg1_NclsTPCiter1)>-1&&(Leg2_NclsTPC-Leg2_NclsTPCiter1)>-1") |
807 | c->SetAlias("cut","PairType==1&&LegNclDiffIter1") | |
8df8e382 | 808 | // histos |
809 | AliDielectronHistos h("h","h"); | |
810 | h.AddClass("TPCsignal"); | |
811 | h.UserHistogram("TPCsignal","sigTPC","TPC signal;P [GeV];TPC signal [arb. Units]",400,.3,40,400,0.,200.,0,0,kTRUE,kFALSE) | |
812 | h.GetHistogram("TPCsignal","sigTPC")->SetDirectory(gDirectory) | |
813 | ||
554e40f8 | 814 | h.UserHistogram("TPCsignal","nSigE","TPC n #sigma Electrons;P [GeV];TPC n #sigma Electrons",200,.3,40.,100,-10.,10.,0,0,kTRUE,kFALSE) |
8df8e382 | 815 | h.GetHistogram("TPCsignal","nSigE")->SetDirectory(gDirectory) |
554e40f8 | 816 | h.UserHistogram("TPCsignal","nSigMu","TPC n #sigma Muons;P [GeV];TPC n #sigma Muons",400,.3,40.,500,-10.,10.,0,0,kTRUE,kFALSE) |
8df8e382 | 817 | h.GetHistogram("TPCsignal","nSigMu")->SetDirectory(gDirectory) |
554e40f8 | 818 | h.UserHistogram("TPCsignal","nSigPi","TPC n #sigma Pions;P [GeV];TPC n #sigma Pions",400,.3,40.,500,-10.,10.,0,0,kTRUE,kFALSE) |
8df8e382 | 819 | h.GetHistogram("TPCsignal","nSigPi")->SetDirectory(gDirectory) |
554e40f8 | 820 | h.UserHistogram("TPCsignal","nSigK","TPC n #sigma Kaons;P [GeV];TPC n #sigma Kaons",400,.3,40,500,-10,10,0,0,kTRUE,kFALSE) |
8df8e382 | 821 | h.GetHistogram("TPCsignal","nSigK")->SetDirectory(gDirectory) |
554e40f8 | 822 | h.UserHistogram("TPCsignal","nSigP","TPC n #sigma Protons;P [GeV];TPC n #sigma Protons",400,.3,40.,500,-10,10.,0,0,kTRUE,kFALSE) |
8df8e382 | 823 | h.GetHistogram("TPCsignal","nSigP")->SetDirectory(gDirectory) |
824 | ||
ffbede40 | 825 | h.UserHistogram("TPCsignal","nSigDiffP","ncls-nclsXX;P [GeV];ncls-nclsXX",400,.3,40.,200,-40,160.,0,0,kTRUE,kFALSE) |
826 | h.GetHistogram("TPCsignal","nSigDiffP")->SetDirectory(gDirectory) | |
827 | ||
8df8e382 | 828 | |
829 | c->Draw("Leg1_TPC_signal:Leg1_P_InnerParam>>sigTPC","cut","colz") | |
830 | c->Draw("Leg2_TPC_signal:Leg2_P_InnerParam>>+sigTPC","cut","colz") | |
831 | ||
832 | ||
833 | c->Draw("Leg1_TPC_nSigma_Electrons:Leg1_P_InnerParam>>nSigE","cut","colz") | |
0c09cae4 | 834 | c->Draw("Leg2_TPC_nSigma_Electrons:Leg2_P_InnerParam>>+nSigE","cut","colzsame") |
8df8e382 | 835 | |
836 | c->Draw("Leg1_TPC_nSigma_Muos:Leg1_P_InnerParam>>nSigMu","cut","goff") | |
837 | c->Draw("Leg2_TPC_nSigma_Muons:Leg1_P_InnerParam>>nSigMu","cut","goff") | |
838 | c->Draw("Leg2_TPC_nSigma_Muons:Leg2_P_InnerParam>>+nSigMu","cut","colz") | |
839 | ||
840 | c->Draw("Leg1_TPC_nSigma_Pions:Leg1_P_InnerParam>>nSigPi","cut","goff") | |
841 | c->Draw("Leg2_TPC_nSigma_Pions:Leg2_P_InnerParam>>+nSigPi","cut","colz") | |
842 | ||
843 | c->Draw("Leg1_TPC_nSigma_Kaons:Leg1_P_InnerParam>>nSigK","cut","goff") | |
844 | c->Draw("Leg2_TPC_nSigma_Kaons:Leg2_P_InnerParam>>+nSigK","cut","colz") | |
845 | ||
0c09cae4 | 846 | c->Draw("Leg1_TPC_nSigma_Protons:Leg1_P_InnerParam>>nSigP","cut","goff") |
847 | c->Draw("Leg2_TPC_nSigma_Protons:Leg2_P_InnerParam>>+nSigP","cut","colz") | |
8df8e382 | 848 | |
849 | ||
850 | ||
61d106d3 | 851 | c->Draw("Leg1_TOF_nSigma_Electrons:Leg1_P_InnerParam>>nSigE","cut","colz") |
852 | c->Draw("Leg2_TOF_nSigma_Electrons:Leg2_P_InnerParam>>+nSigE","cut","colz") | |
853 | ||
8df8e382 | 854 | |
855 | c->Draw("Leg1_TOF_nSigma_Protons:Leg1_P_InnerParam>>nSigP","cut","goff") | |
856 | c->Draw("Leg2_TOF_nSigma_Protons:Leg2_P_InnerParam>>+nSigP","cut","colz") | |
857 | ||
0c09cae4 | 858 | c->SetScanField(0) |
859 | c->Scan("M:EventInFile:Leg1_ID:Leg2_ID:File.GetString()","","colsize=1 col=.4f:6.d:5.d:5.d:130.s") | |
860 | ||
861 | c->Scan("1:Run:EventInFile:File.GetString()","","colsize=1 col=.2f:8.d:8.d:130.s"); | |
8df8e382 | 862 | |
8df8e382 | 863 | |
864 | ||
865 | AliDielectronSignalFunc sig; | |
866 | sig.SetDefaults(1); | |
867 | ||
554e40f8 | 868 | |
ffbede40 | 869 | //---------- |
870 | c->Draw("Leg1_NclsTPC>>hNcls(160,-0.5,159.5)","cut","goff"); | |
871 | c->Draw("Leg2_NclsTPC>>+hNcls","cut","goff"); | |
872 | hNclsPID->SetLineColor(kBlack) | |
873 | ||
874 | c->Draw("Leg1_TPCsignalN>>hNclsPID(160,-0.5,159.5)","cut","goff"); | |
875 | c->Draw("Leg2_TPCsignalN>>+hNclsPID","cut","goff"); | |
876 | hNclsPID->SetLineColor(kBlue) | |
877 | ||
878 | c->Draw("Leg1_NclsTPCiter1>>hNclsIter1(160,-0.5,159.5)","cut","goff"); | |
879 | c->Draw("Leg2_NclsTPCiter1>>+hNclsIter1","cut","goff"); | |
880 | hNclsIter1->SetLineColor(kGreen) | |
881 | ||
882 | hNcls->Draw(); | |
883 | hNclsPID->Draw("same"); | |
884 | hNclsIter1->Draw("same"); | |
885 | //----------- | |
886 | ||
887 | ||
888 | ||
889 | c->Draw("Leg1_TPCsignalN:Leg1_NclsTPC>>hNclsPIDNcls(160,-0.5,159.5,160,-0.5,159.5)","cut","colz"); | |
890 | c->Draw("Leg2_TPCsignalN:Leg2_NclsTPC>>+hNclsPIDNcls","cut","colz"); | |
891 | ||
892 | ||
893 | c->Draw("Leg1_NclsTPC-Leg1_TPCsignalN:Leg1_P_InnerParam>>nSigDiffP","cut","colz"); | |
894 | c->Draw("Leg2_NclsTPC-Leg2_TPCsignalN:Leg1_P_InnerParam>>+nSigDiffP","cut","colz"); | |
895 | ||
896 | ||
897 | c->Draw("Leg1_NclsTPC-Leg1_NclsTPCiter1:Leg1_P_InnerParam>>nSigDiffP","cut","colz"); | |
898 | c->Draw("Leg2_NclsTPC-Leg2_NclsTPCiter1:Leg1_P_InnerParam>>+nSigDiffP","cut","colz"); | |
899 | ||
900 | ||
901 | ||
902 | ||
903 | ||
904 | ||
905 | ||
906 | ||
907 | ||
908 | c->Draw("Leg1_NclsTPC-Leg1_TPCsignalN:Leg1_TPC_nSigma_Electrons:Leg1_P_InnerParam>>hXX(100,0,10,20,-4,4)","cut","profcolz") | |
909 | c->Draw("Leg1_NclsTPC-Leg1_TPCsignalN:Leg2_TPC_nSigma_Electrons:Leg2_P_InnerParam>>+hXX","cut","profcolz") | |
910 | ||
911 | ||
912 | ||
913 | ||
914 | ||
915 | ||
916 | ||
917 | ||
554e40f8 | 918 | |
8df8e382 | 919 | //WooJins cuts: |
920 | c->SetAlias("cutE","abs(Leg1_TPC_nSigma_Electrons)<3&&abs(Leg2_TPC_nSigma_Electrons)<3"); | |
554e40f8 | 921 | c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>5&&abs(Leg2_TPC_nSigma_Pions)>5"); |
8df8e382 | 922 | // c->SetAlias("cutPi","Leg1_TPC_signal>65&&Leg2_TPC_signal>65"); |
554e40f8 | 923 | c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>5&&(Leg2_TPC_nSigma_Protons)>5"); |
8df8e382 | 924 | c->SetAlias("cutK","abs(Leg1_TPC_nSigma_Kaons)>2&&abs(Leg2_TPC_nSigma_Kaons)>2"); |
554e40f8 | 925 | c->SetAlias("pid","cutE&&cutPi&&cutP"); |
926 | c->SetAlias("etaLeg","abs(Leg1_Eta)<.9&&abs(Leg2_Eta)<.9"); | |
927 | c->SetAlias("rap","abs(Y)<.9"); | |
8df8e382 | 928 | |
929 | ||
930 | c->SetAlias("cutAdd","PairType==1&&abs(Leg1_ImpactParXY)<.02&&abs(Leg2_ImpactParXY)<.02&&Leg2_Pt>1.") | |
554e40f8 | 931 | c->Draw("M>>hM(50,2,4)","PairType==1&&pid","e"); |
8df8e382 | 932 | h.Rebin(); |
933 | h.Rebin(); | |
934 | h.Rebin(); | |
935 | sig.Process(hM); | |
936 | sig.Draw("samestat"); | |
937 | ||
938 | ||
939 | ||
940 | ||
941 | //test | |
8df8e382 | 942 | c->SetAlias("cutAdd","PairType==1&&abs(Leg1_ImpactParXY)<.03&&abs(Leg2_ImpactParXY)<.03&&Leg2_Pt>1") |
554e40f8 | 943 | c->SetAlias("cut","cutAdd&&pid&etaLeg&&rap") |
8df8e382 | 944 | |
945 | c->Draw("M>>hM(50,1.99,3.99)","cut","e"); | |
946 | sig.Process(hM); | |
947 | sig.Draw("samestat"); | |
948 | ||
949 | ||
950 | c->SetAlias("cut","PairType==1") | |
951 | c->Draw("Leg1_TPC_signal:Leg1_P_InnerParam>>sigTPC","cut","colz") | |
952 | c->Draw("Leg2_TPC_signal:Leg2_P_InnerParam>>+sigTPC","cut","colz") | |
953 | ||
954 | //// | |
955 | c->SetAlias("cutE","abs(Leg1_TPC_nSigma_Electrons)<2&&abs(Leg2_TPC_nSigma_Electrons)<2"); | |
956 | c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>2&&abs(Leg2_TPC_nSigma_Pions)>2"); | |
957 | c->SetAlias("cutPi2","Leg1_TPC_signal>65&&Leg2_TPC_signal>65"); | |
958 | c->SetAlias("cutPi3","abs(Leg1_TPC_nSigma_Pions)>2.5&&abs(Leg2_TPC_nSigma_Pions)>2.5"); | |
959 | c->SetAlias("cutP","abs(Leg1_TPC_nSigma_Protons)>2&&abs(Leg2_TPC_nSigma_Protons)>2"); | |
960 | c->SetAlias("cutP2","abs(Leg1_TPC_nSigma_Protons)>1.5&&abs(Leg2_TPC_nSigma_Protons)>1.5"); | |
961 | c->SetAlias("cutK","abs(Leg1_TPC_nSigma_Kaons)>2&&abs(Leg2_TPC_nSigma_Kaons)>2"); | |
962 | c->SetAlias("cutdXY","abs(Leg1_ImpactParXY)<.02&&abs(Leg2_ImpactParXY)<.02") | |
963 | c->SetAlias("cutPt","Leg2_Pt>1.") | |
964 | c->SetAlias("cutPt2","Leg2_Pt>1.2") | |
965 | ||
966 | //---- | |
967 | c->SetMarkerSize(0.7); | |
968 | ||
969 | c->SetMarkerStyle(20); | |
970 | c->SetLineColor(kRed); | |
971 | c->SetMarkerColor(kRed); | |
972 | c->Draw("M>>hM(100,2,4)","cutPi&&cutPt","e"); | |
973 | ||
974 | c->SetMarkerStyle(21); | |
975 | c->SetLineColor(kRed-1); | |
976 | c->SetMarkerColor(kRed-2); | |
977 | c->Draw("M>>hM2(100,2,4)","cutPi2&&cutPt","esame"); | |
978 | ||
979 | c->SetMarkerStyle(22); | |
980 | c->SetLineColor(kRed-2); | |
981 | c->SetMarkerColor(kRed-2); | |
982 | c->Draw("M>>hM3(100,2,4)","cutPi3&&cutPt","esame"); | |
983 | ||
984 | //---- | |
985 | c->SetMarkerStyle(20); | |
986 | c->SetLineColor(kBlue); | |
987 | c->SetMarkerColor(kBlue); | |
988 | c->Draw("M>>hM4(100,2,4)","cutPi&&cutPt&&cutP","esame"); | |
989 | ||
990 | c->SetMarkerStyle(21); | |
991 | c->SetLineColor(kBlue-1); | |
992 | c->SetMarkerColor(kBlue-1); | |
993 | c->Draw("M>>hM5(100,2,4)","cutPi2&&cutPt&&cutP","esame"); | |
994 | ||
995 | c->SetMarkerStyle(22); | |
996 | c->SetLineColor(kBlue-2); | |
997 | c->SetMarkerColor(kBlue-2); | |
998 | c->Draw("M>>hM6(100,2,4)","cutPi3&&cutPt&&cutP","esame"); | |
999 | ||
1000 | //---- | |
1001 | ||
1002 | c->SetMarkerStyle(20); | |
1003 | c->SetLineColor(kGreen); | |
1004 | c->SetMarkerColor(kGreen); | |
1005 | c->Draw("M>>hM7(100,2,4)","cutPi&&cutPt&&cutP2","esame"); | |
1006 | ||
1007 | c->SetMarkerStyle(21); | |
1008 | c->SetLineColor(kGreen-1); | |
1009 | c->SetMarkerColor(kGreen-1); | |
1010 | c->Draw("M>>hM8(100,2,4)","cutPi2&&cutPt&&cutP2","esame"); | |
1011 | ||
1012 | c->SetMarkerStyle(22); | |
1013 | c->SetLineColor(kGreen-2); | |
1014 | c->SetMarkerColor(kGreen-2); | |
1015 | c->Draw("M>>hM9(100,2,4)","cutPi3&&cutPt&&cutP2","esame"); | |
1016 | ||
1017 | //---- | |
1018 | ||
1019 | ||
1020 | c->SetMarkerStyle(20); | |
1021 | c->SetLineColor(kMagentha); | |
1022 | c->SetMarkerColor(kMagentha); | |
1023 | c->Draw("M>>hM7(100,2,4)","cutPi&&cutPt&&cutP2","esame"); | |
1024 | ||
1025 | c->SetMarkerStyle(21); | |
1026 | c->SetLineColor(kMagentha-1); | |
1027 | c->SetMarkerColor(kMagentha-1); | |
1028 | c->Draw("M>>hM8(100,2,4)","cutPi2&&cutPt&&cutP2","esame"); | |
1029 | ||
1030 | c->SetMarkerStyle(22); | |
1031 | c->SetLineColor(kMagentha-2); | |
1032 | c->SetMarkerColor(kMagentha-2); | |
1033 | c->Draw("M>>hM9(100,2,4)","cutPi3&&cutPt&&cutP2","esame"); | |
1034 | ||
1035 | ||
1036 | c->SetLineColor(kBlack); | |
1037 | c->SetMarkerColor(kBlue); | |
1038 | c->Draw("M>>hM4(100,2,4)","cutE&&cutPi&&cutK&&cutP&&cutdXY&&cutPt","esame"); | |
1039 | ||
1040 | ||
1041 | ||
1042 | ||
1043 | // | |
1044 | c->SetAlias("cutE","Leg1_TPC_nSigma_Electrons>-1.5&&Leg2_TPC_nSigma_Electrons>-1.5"); | |
1045 | // c->SetAlias("cutE","Leg1_TPC_signal>60&&Leg2_TPC_signal>60"); | |
1046 | c->SetAlias("cutP","abs(Leg1_TPC_nSigma_Protons)>3&&abs(Leg2_TPC_nSigma_Protons)>3") | |
1047 | ||
1048 | c->SetAlias("cutAdd","PairType==1&&abs(Leg1_ImpactParXY)<.03&&abs(Leg2_ImpactParXY)<.03&&Leg2_Pt>0") | |
1049 | c->SetAlias("cut","Leg2_Pt>1&&cutE&&cutP") | |
1050 | ||
1051 | c->Draw("M>>hM(50,1.99,3.99)","cut","e"); | |
1052 | ||
1053 | c->SetAlias("cutAdd","PairType==1&&abs(Leg1_ImpactParXY)<.03&&abs(Leg2_ImpactParXY)<.03&&Leg2_Pt>.8") | |
1054 | c->Draw("M>>hM2(50,1.99,3.99)","cut","esame"); | |
1055 | ||
1056 | c->SetAlias("cutAdd","PairType==1&&abs(Leg1_ImpactParXY)<.03&&abs(Leg2_ImpactParXY)<.03&&Leg2_Pt>1") | |
1057 | c->Draw("M>>hM3(50,1.99,3.99)","cut","esame"); | |
1058 | ||
1059 | c->SetAlias("cutAdd","PairType==1&&abs(Leg1_ImpactParXY)<.03&&abs(Leg2_ImpactParXY)<.03&&Leg2_Pt>1.2") | |
1060 | c->Draw("M>>hM4(50,1.99,3.99)","cut","esame"); | |
1061 | ||
1062 | ||
1063 | c->Draw("Leg1_TPC_signal:Leg1_P_InnerParam>>sigTPC","cut","goff") | |
1064 | c->Draw("Leg2_TPC_signal:Leg2_P_InnerParam>>+sigTPC","cut","goff") | |
1065 | c1->Modified();c1->Update() | |
1066 | ||
1067 | ||
1068 | c->SetAlias("cutE","Leg1_TPC_nSigma_Electrons>-1.5&&Leg2_TPC_nSigma_Electrons>-1.5"); | |
1069 | c->SetAlias("cut","Leg2_P_InnerParam>1.5&&cutE") | |
1070 | c->SetMarkerStyle(21); | |
1071 | c->Draw("M>>hM(50,1.99,3.99)","cut","e"); | |
1072 | ||
1073 | c->SetAlias("cutE","Leg1_TPC_nSigma_Electrons>-1.5+.8&&Leg2_TPC_nSigma_Electrons>-1.5+.8"); | |
1074 | c->SetAlias("cut","Leg2_P_InnerParam>1.5&&cutE") | |
1075 | c->SetMarkerStyle(20); | |
1076 | c->SetMarkerColor(kRed); | |
61d106d3 | 1077 | c->Draw("M>>hM3(50,1.99,3.99)","cut","esame"); |
1078 | ||
1079 | ||
1080 | ||
1081 | ||
1082 | //=================== pass 1 pass 2 comparison ======================= | |
1083 | ||
1084 | ||
1085 | //------ cuts ------------ | |
1086 | ||
1087 | ||
1088 | c->SetAlias("cutPro","Leg1_TPC_signal>50*exp(-.5*(Leg1_P_InnerParam-2))&&Leg2_TPC_signal>50*exp(-.5*(Leg2_P_InnerParam-2))&&Leg1_TPC_signal<85&&Leg2_TPC_signal<85"); | |
1089 | ||
1090 | c->SetAlias("Pcut","Leg1_P_InnerParam>1.3&&Leg2_P_InnerParam>1.3") | |
1091 | c->SetAlias("Ptcut","Leg1_Pt>1&&Leg2_Pt>1") | |
1092 | c->SetAlias("TOFcut","abs(Leg1_TOF_nSigma_Electrons)<3&&abs(Leg2_TOF_nSigma_Electrons)<3"); | |
1093 | c->SetAlias("TOFcut2","(Leg1_P_InnerParam<1.3&&abs(Leg1_TOF_nSigma_Electrons)<3||Leg1_P_InnerParam>=1.3)&&(Leg2_P_InnerParam<1.3&&abs(Leg2_TOF_nSigma_Electrons)<3||Leg2_P_InnerParam>=1.3)"); | |
1094 | c->SetAlias("TPCcut","(Leg1_TPC_signal>70*(1-exp(-1*(Leg1_P_InnerParam+2))))&&(Leg2_TPC_signal>70*(1-exp(-1*(Leg2_P_InnerParam+2))))") | |
2a14a7b1 | 1095 | c->SetAlias("NClcut","Leg1_NclsTPC>90&&Leg2_NclsTPC>90"); |
61d106d3 | 1096 | |
1097 | c->SetAlias("eleParam","Leg1_TPC_nSigma_Electrons<5&&Leg2_TPC_nSigma_Electrons<5&&Leg1_TPC_nSigma_Electrons>-2.65*exp(-0.6757*Leg1_P_InnerParam)&&Leg2_TPC_nSigma_Electrons>-2.65*exp(-0.6757*Leg2_P_InnerParam)") | |
164bfb53 | 1098 | c->SetAlias("cut","PairType==1&&eleParam&&Run<127719") |
61d106d3 | 1099 | c->SetAlias("cut","1==1") |
1100 | c->SetAlias("cut","NClcut") | |
1101 | ||
1102 | c->SetAlias("cut","TOFcut&&TPCcut&&NClcut") | |
1103 | ||
1104 | c->SetAlias("cut","TOFcut2&&TPCcut&&NClcut") | |
1105 | ||
1106 | c->SetAlias("cut","cutPro&&TPCcut&&NClcut") | |
1107 | ||
1108 | c->SetAlias("cut","Pcut&&TPCcut&&NClcut") | |
1109 | ||
1110 | c->SetAlias("cut","Ptcut&&TPCcut&&NClcut") | |
1111 | ||
1112 | ||
1113 | ||
1114 | //------------ plots -------------- | |
1115 | ||
1116 | //no cut | |
1117 | c->SetAlias("cut","1==1") | |
1118 | c1->SetLogx(0) | |
1119 | c1->SetLogz(0) | |
1120 | c->SetLineColor(kBlack); | |
1121 | c->Draw("M>>hM(50,1.99,3.99)","cut","e"); | |
1122 | hM->SetTitle(";Inv. Mass [GeV]; Pair (e+e-) / 40GeV") | |
1123 | c1->Modified() | |
1124 | c1->Update(); | |
1125 | c1->Print("pics/M_noCut.png"); | |
1126 | ||
1127 | //============= | |
1128 | //ncl: No cut | |
1129 | //============= | |
1130 | c->SetAlias("cut","1==1") | |
1131 | c1->SetLogx(1) | |
1132 | c1->SetLogz(0) | |
1133 | gStyle->SetOptStat(0); | |
1134 | c->Draw("Leg1_NclsTPC:Leg1_TPC_signal:Leg1_P_InnerParam>>test(1000,0,40,200,60,100)","cut","profcolz") | |
1135 | c->Draw("Leg2_NclsTPC:Leg2_TPC_signal:Leg2_P_InnerParam>>+test","cut","profcolz") | |
1136 | test->SetMinimum(80) | |
1137 | test->SetTitle("mean TPC number of clusters;P_{TPC} [GeV]; TPC signal [arb. units]") | |
1138 | c1->Modified() | |
1139 | c1->Update(); | |
1140 | c1->Print("pics/TPCnCl_P.png"); | |
1141 | ||
1142 | //============= | |
1143 | //TPCsignal: ncl cut | |
1144 | //============= | |
1145 | c->SetAlias("cut","NClcut") | |
1146 | c->Draw("Leg1_NclsTPC:Leg1_TPC_signal:Leg1_P_InnerParam>>test(1000,0,40,200,60,100)","cut","profcolz") | |
1147 | c->Draw("Leg2_NclsTPC:Leg2_TPC_signal:Leg2_P_InnerParam>>+test","cut","profcolz") | |
1148 | test->SetMinimum(80) | |
1149 | test->SetTitle("mean TPC number of clusters;P_{TPC} [GeV]; TPC signal [arb. units]") | |
1150 | c1->Modified() | |
1151 | c1->Update(); | |
1152 | c1->Print("pics/TPCnCl_P_cutNcl.png"); | |
1153 | ||
1154 | ||
1155 | //============= | |
1156 | //tpc signal + signal cut | |
1157 | //============= | |
1158 | c1->SetLogx(1) | |
1159 | c1->SetLogy(0) | |
1160 | c1->SetLogz(1) | |
1161 | h.GetHistogram("TPCsignal","sigTPC")->GetYaxis()->SetRangeUser(60,100); | |
1162 | c->SetAlias("cut","NClcut") | |
1163 | c->Draw("Leg1_TPC_signal:Leg1_P_InnerParam>>sigTPC","cut","colz") | |
1164 | c->Draw("Leg2_TPC_signal:Leg2_P_InnerParam>>+sigTPC","cut","colz") | |
1165 | TF1 f("f1","[0]*(1-exp(-[1]*(x-[2])))",0.3,40); | |
1166 | f.SetParameters(70,1,-2); | |
1167 | f.Draw("same"); | |
1168 | c1->Modified(); | |
1169 | c1->Update(); | |
1170 | c1->Print("pics/TPCsignal_P_cutNcl.png"); | |
1171 | ||
1172 | //------- Mass | |
1173 | ||
1174 | c1->SetLogx(0) | |
1175 | c1->SetLogy(1) | |
1176 | c1->SetLogz(0) | |
1177 | c->SetAlias("cut","1==1") | |
1178 | c->SetLineColor(kBlack); | |
1179 | c->SetMarkerColor(kBlack); | |
1180 | c->Draw("M>>hM(50,1.99,3.99)","cut","e"); | |
1181 | hM->SetTitle(";Inv. Mass [GeV]; Pair (e+e-) / 40GeV") | |
1182 | hM->SetMinimum(5e2); | |
1183 | c->SetAlias("cut","NClcut") | |
1184 | c->SetLineColor(kRed); | |
1185 | c->SetMarkerColor(kRed); | |
8df8e382 | 1186 | c->Draw("M>>hM2(50,1.99,3.99)","cut","esame"); |
61d106d3 | 1187 | c1->Modified(); |
1188 | c1->Update(); | |
1189 | c1->Print("pics/M_nClCut.png"); | |
1190 | ||
1191 | ||
1192 | //========== | |
1193 | //tpc signal: ncl + tpc cut | |
1194 | //========== | |
1195 | c1->SetLogx(1) | |
1196 | c1->SetLogy(0) | |
1197 | c1->SetLogz(1) | |
1198 | c->SetAlias("cut","TPCcut&&NClcut") | |
1199 | c->Draw("Leg1_TPC_signal:Leg1_P_InnerParam>>sigTPC","cut","colz") | |
1200 | c->Draw("Leg2_TPC_signal:Leg2_P_InnerParam>>+sigTPC","cut","colz") | |
1201 | c1->Modified(); | |
1202 | c1->Update(); | |
1203 | c1->Print("pics/TPCsignal_P_cutNcl_tpc.png"); | |
1204 | ||
1205 | /--- Mass | |
1206 | ||
1207 | c1->SetLogx(0) | |
1208 | c1->SetLogy(1) | |
1209 | c1->SetLogz(0) | |
1210 | c->SetAlias("cut","1==1") | |
1211 | c->SetLineColor(kBlack); | |
1212 | c->SetMarkerColor(kBlack); | |
1213 | c->Draw("M>>hM(50,1.99,3.99)","cut","e"); | |
1214 | hM->SetTitle(";Inv. Mass [GeV]; Pair (e+e-) / 40GeV") | |
1215 | hM->SetMinimum(5); | |
1216 | c->SetAlias("cut","NClcut") | |
1217 | c->SetLineColor(kRed); | |
1218 | c->SetMarkerColor(kRed); | |
1219 | c->Draw("M>>hM2(50,1.99,3.99)","cut","esame"); | |
1220 | c->SetAlias("cut","TPCcut&&NClcut") | |
1221 | c->SetLineColor(kGreen); | |
1222 | c->SetMarkerColor(kGreen); | |
1223 | c->Draw("M>>hM3(50,1.99,3.99)","cut","esame"); | |
1224 | c1->Modified(); | |
1225 | c1->Update(); | |
1226 | c1->Print("pics/M_nClCut_tpc.png"); | |
1227 | ||
1228 | ||
1229 | //======== | |
1230 | //TPC signal: ncl + tpc + tof cut | |
1231 | //======= | |
1232 | c1->SetLogx(1) | |
1233 | c1->SetLogy(0) | |
1234 | c1->SetLogz(1) | |
1235 | c->SetAlias("cut","TOFcut2&&TPCcut&&NClcut") | |
1236 | c->Draw("Leg1_TPC_signal:Leg1_P_InnerParam>>sigTPC","cut","colz") | |
1237 | c->Draw("Leg2_TPC_signal:Leg2_P_InnerParam>>+sigTPC","cut","colz") | |
1238 | c1->Modified(); | |
1239 | c1->Update(); | |
1240 | c1->Print("pics/TPCsignal_P_cutNcl_tpc.png"); | |
1241 | ||
1242 | //--- Mass | |
1243 | ||
1244 | c1->SetLogx(0) | |
1245 | c1->SetLogy(0) | |
1246 | c1->SetLogz(0) | |
1247 | c->SetAlias("cut","1==1") | |
1248 | c->SetAlias("cut","TPCcut&&NClcut") | |
1249 | c->SetLineColor(kGreen); | |
1250 | c->Draw("M>>hM(50,1.99,3.99)","cut","e"); | |
1251 | hM->SetTitle(";Inv. Mass [GeV]; Pair (e+e-) / 40GeV") | |
1252 | hM->SetMinimum(.1); | |
1253 | c->SetAlias("cut","TOFcut2&&TPCcut&&NClcut") | |
1254 | c->SetLineColor(kBlue); | |
1255 | c->Draw("M>>hM2(50,1.99,3.99)","cut","esame"); | |
1256 | c1->Modified(); | |
1257 | c1->Update(); | |
1258 | c1->Print("pics/M_nClCut_tpc.png"); | |
1259 | ||
1260 | //======== | |
1261 | //Inv Mass: different cuts | |
1262 | //======= | |
1263 | ||
1264 | c1->SetLogx(0) | |
1265 | c1->SetLogy(0) | |
1266 | c1->SetLogz(0) | |
1267 | c->SetAlias("cut","Ptcut&&TPCcut&&NClcut") | |
1268 | c->SetLineColor(kMagenta); | |
1269 | c->SetMarkerColor(kMagenta); | |
1270 | c->SetMarkerStyle(22); | |
1271 | c->Draw("M>>hM(50,1.99,3.99)","cut","e"); | |
1272 | ||
1273 | c->SetAlias("cut","Pcut&&TPCcut&&NClcut") | |
1274 | c->SetLineColor(kCyan+1); | |
1275 | c->SetMarkerColor(kCyan+1); | |
1276 | c->SetMarkerStyle(21); | |
1277 | c->Draw("M>>hM2(50,1.99,3.99)","cut","esame"); | |
1278 | ||
1279 | c->SetAlias("cut","TOFcut2&&TPCcut&&NClcut") | |
1280 | c->SetMarkerStyle(20); | |
1281 | c->SetLineColor(kBlue); | |
1282 | c->SetMarkerColor(kBlue); | |
1283 | c->Draw("M>>hM3(50,1.99,3.99)","cut","esame"); | |
1284 | ||
1285 | c1->Modified(); | |
1286 | c1->Update(); | |
1287 | c1->Print("pics/M_nClCut_tpc_tof.png"); | |
1288 | ||
1289 | ||
1290 | ||
8df8e382 | 1291 | |
2a14a7b1 | 1292 | c->SetAlias("NClcut","Leg1_NclsTPC>90&&Leg2_NclsTPC>90"); |
1293 | c->SetAlias("Ptcut","Leg1_Pt>1&&Leg2_Pt>1") | |
1294 | c->SetAlias("PairT","PairType==1"); | |
1295 | c->SetAlias("cut","NClcut&&Ptcut&&PairT") | |
1296 | ||
1297 | ||
1298 | c->SetAlias("cutE","abs(Leg1_TPC_nSigma_Electrons)<3&&abs(Leg2_TPC_nSigma_Electrons)<3"); | |
1299 | c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>3&&abs(Leg2_TPC_nSigma_Pions)>3"); | |
1300 | c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>3&&(Leg2_TPC_nSigma_Protons)>3"); | |
1301 | c->SetAlias("cut","NClcut&&Ptcut&&PairT&&cutE&&cutPi&&cutP") | |
1302 | ||
1303 | c->SetAlias("eta","abs(Leg1_Eta)<0.88&&abs(Leg1_Eta)<0.88"); | |
1304 | c->SetAlias("rap","abs(Y)<0.88"); | |
1305 | c->SetAlias("spdFirst","(Leg1_ITS_clusterMap&1)==1&&(Leg2_ITS_clusterMap&1)==1") | |
1306 | c->SetAlias("cut","NClcut&&Ptcut&&PairT&&cutE&&cutPi&&cutP&&eta&&rap&&spdFirst") | |
1307 | c->Draw("M>>hM(50,1.98,1.98+50*.04)","cut","e") | |
1308 | ||
1309 | ||
1310 | c->SetAlias("cutProL1",Form("Leg1_TPC_nSigma_Electrons>(%f*%f+(AliExternalTrackParam::BetheBlochAleph(Leg1_P_InnerParam/%f,0.0283086/0.97,2.63394e+01,5.04114e-11,2.12543e+00,4.88663e+00)-AliExternalTrackParam::BetheBlochAleph(Leg1_P_InnerParam/%f,0.0283086/0.97,2.63394e+01,5.04114e-11,2.12543e+00,4.88663e+00)))/%f",nSigma,resolution, AliPID::ParticleMass(AliPID::kProton), AliPID::ParticleMass(AliPID::kElectron), resolution)) | |
1311 | ||
1312 | c->SetAlias("cutProL2",Form("Leg2_TPC_nSigma_Electrons>(%f*%f+(AliExternalTrackParam::BetheBlochAleph(Leg2_P_InnerParam/%f,0.0283086/0.97,2.63394e+01,5.04114e-11,2.12543e+00,4.88663e+00)-AliExternalTrackParam::BetheBlochAleph(Leg2_P_InnerParam/%f,0.0283086/0.97,2.63394e+01,5.04114e-11,2.12543e+00,4.88663e+00)))/%f",nSigma,resolution, AliPID::ParticleMass(AliPID::kProton), AliPID::ParticleMass(AliPID::kElectron), resolution)) | |
1313 | ||
1314 | c->SetAlias("cutPioL1",Form("Leg1_TPC_nSigma_Electrons>(%f*%f+(AliExternalTrackParam::BetheBlochAleph(Leg1_P_InnerParam/%f,0.0283086/0.97,2.63394e+01,5.04114e-11,2.12543e+00,4.88663e+00)-AliExternalTrackParam::BetheBlochAleph(Leg1_P_InnerParam/%f,0.0283086/0.97,2.63394e+01,5.04114e-11,2.12543e+00,4.88663e+00)))/%f",nSigma,resolution, AliPID::ParticleMass(AliPID::kPion), AliPID::ParticleMass(AliPID::kElectron), resolution)) | |
1315 | ||
1316 | c->SetAlias("cutPioL2",Form("Leg2_TPC_nSigma_Electrons>(%f*%f+(AliExternalTrackParam::BetheBlochAleph(Leg2_P_InnerParam/%f,0.0283086/0.97,2.63394e+01,5.04114e-11,2.12543e+00,4.88663e+00)-AliExternalTrackParam::BetheBlochAleph(Leg2_P_InnerParam/%f,0.0283086/0.97,2.63394e+01,5.04114e-11,2.12543e+00,4.88663e+00)))/%f",nSigma,resolution, AliPID::ParticleMass(AliPID::kPion), AliPID::ParticleMass(AliPID::kElectron), resolution)) | |
1317 | ||
1318 | c->SetAlias("cutPro","cutProL1&&cutProL2"); | |
1319 | c->SetAlias("cutPio","cutPioL1&&cutPioL2"); | |
0c09cae4 | 1320 | |
1321 | ||
1322 | // | |
1323 | // track in or out of TRD | |
1324 | // | |
1325 | c->SetAlias("TRD11","(Leg1_TrackStatus&512)==512 && (Leg2_TrackStatus&512)==512"); | |
1326 | c->SetAlias("TRD00","(Leg1_TrackStatus&512)== 0 && (Leg2_TrackStatus&512)== 0"); | |
1327 | c->SetAlias("TRD01","(Leg1_TrackStatus&512)== 0 && (Leg2_TrackStatus&512)==512"); | |
1328 | c->SetAlias("TRD10","(Leg1_TrackStatus&512)==512 && (Leg2_TrackStatus&512)== 0"); | |
1329 | ||
1330 | TCanvas *c2=(TCanvas)gROOT->FindObject("c2"); | |
1331 | if (!c2) c2=new TCanvas("c2","c2"); | |
1332 | c2->Clear() | |
1333 | c2->Divide(2,2); | |
1334 | ||
1335 | c->SetAlias("cut","PairType==1 && QA && pidSig && ITS2"); | |
1336 | ||
1337 | TLine l; | |
1338 | l.SetLineColor(kGray+2); | |
1339 | // l.SetLineWidth(2); | |
1340 | TBox b; | |
1341 | b.SetFillColor(kGray); | |
1342 | b.SetFillStyle(3004); | |
1343 | ||
1344 | c2->cd(1); | |
1345 | c->Draw("M>>hM11(125,0.,5.)","cut&TRD11","e"); | |
1346 | b.DrawBox(2.92,0,3.16,gPad->GetUymax()) | |
1347 | l.DrawLine(3.095,0,3.095,gPad->GetUymax()); | |
1348 | c2->cd(2); | |
1349 | c->Draw("M>>hM10(125,0.,5.)","cut&TRD10","e"); | |
1350 | b.DrawBox(2.92,0,3.16,gPad->GetUymax()) | |
1351 | l.DrawLine(3.095,0,3.095,gPad->GetUymax()); | |
1352 | c2->cd(3); | |
1353 | c->Draw("M>>hM01(125,0.,5.)","cut&TRD01","e"); | |
1354 | b.DrawBox(2.92,0,3.16,gPad->GetUymax()) | |
1355 | l.DrawLine(3.095,0,3.095,gPad->GetUymax()); | |
1356 | c2->cd(4); | |
1357 | c->Draw("M>>hM00(125,0.,5.)","cut&TRD00","e"); | |
1358 | b.DrawBox(2.92,0,3.16,gPad->GetUymax()) | |
1359 | l.DrawLine(3.095,0,3.095,gPad->GetUymax()); | |
1360 | ||
1361 | ||
1362 | // | |
1363 | // number of cluster in ITS | |
1364 | // | |
1365 | ||
1366 | TH1F h("hITS","hITS",10,0,10); | |
1367 | for (Int_t i=0; i<6; ++i){ | |
1368 | c->Draw(Form("((Leg2_ITS_clusterMap&%d)==%d)*(%d+1)>>+hITS",i,i,i),"cut"); | |
1369 | } | |
1370 | ||
1371 | c->SetAlias("nclsITS1","((Leg2_ITS_clusterMap&1)==1) + ((Leg2_ITS_clusterMap&2)==2) + ((Leg2_ITS_clusterMap&4)==4) + ((Leg2_ITS_clusterMap&8)==8) + ((Leg2_ITS_clusterMap&16)==16) + ((Leg2_ITS_clusterMap&32)==32)") | |
1372 | ||
1373 | c->SetAlias("nclsITS2","((Leg1_ITS_clusterMap&1)==1) + ((Leg1_ITS_clusterMap&2)==2) + ((Leg1_ITS_clusterMap&4)==4) + ((Leg1_ITS_clusterMap&8)==8) + ((Leg1_ITS_clusterMap&16)==16) + ((Leg1_ITS_clusterMap&32)==32)") | |
1374 | ||
1375 | ||
1376 | ||
1377 | ||
8df8e382 | 1378 | */ |
1379 |