]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGDQ/dielectron/macros/MakeDataReport.C
including switch to set on/off iso-track core removal, cleaning and bug fix
[u/mrichter/AliRoot.git] / PWGDQ / dielectron / macros / MakeDataReport.C
CommitLineData
8df8e382 1void SetupStyle();
2
3void 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
54void 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
86void 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
329Int_t baseColors[5]={kRed, kGreen+1, kAzure-4, kMagenta, kCyan+1};
330 Int_t sigmaColorOffset=0;
2a14a7b1 331Int_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
357TF1 *fBethe[5];
358TF1 *fBetheP[5];
359TF1 *fBetheM[5];
360
361for (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
386for (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);
402fPPio->Draw("same");
8df8e382 403
554e40f8 404 TF1 f("fP","-8*exp(-0.6*x)",0,40);
405f.Draw("same")
8df8e382 406
0c09cae4 407//Unbinned fit
408
409RooWorkspace w("w",kTRUE);
410w.factory("CBShape::cb(M[0,5],x0[0],sigma[.04],alpha[1],n[1])")
411RooRealVar cut("cut","cut")
412RooDataSet data("data","data",c,w::M,"cut")
413
414
415
416abs(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/*
420c=Pair
421c->SetAlias("cutE","abs(Leg1_TPC_nSigma_Electrons)<3&&abs(Leg2_TPC_nSigma_Electrons)<3");
422c->SetAlias("cutPi","(Leg1_TPC_nSigma_Pions)>=3.5&&(Leg2_TPC_nSigma_Pions)>=3.5");
423c->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.");
425c->SetAlias("pidSig","cutE&&cutPi&&cutP");
426
427c->SetAlias("LegEta","abs(Leg1_Eta)<0.9&&abs(Leg2_Eta)<0.9");
428c->SetAlias("LegNcl","Leg1_NclsTPC>=70&&Leg2_NclsTPC>=70");
429c->SetAlias("LegPt","Leg1_Pt>=.6&&Leg2_Pt>=.6");
430c->SetAlias("Rap","abs(Y)<0.9");
431c->SetAlias("QA","LegNcl&&LegEta&&Rap&&LegPt&&Rap");
432
433c->SetAlias("ITS1","Leg1_ITSLayerFirstCls<1&&Leg2_ITSLayerFirstCls<1")
434c->SetAlias("ITS2","Leg1_ITSLayerFirstCls<2&&Leg2_ITSLayerFirstCls<2")
435c->SetAlias("ITS3","Leg1_ITSLayerFirstCls<3&&Leg2_ITSLayerFirstCls<3")
436c->SetAlias("ITS4","Leg1_ITSLayerFirstCls<4&&Leg2_ITSLayerFirstCls<4")
437c->SetAlias("ITS5","Leg1_ITSLayerFirstCls<5&&Leg2_ITSLayerFirstCls<5")
438c->SetAlias("ITS6","Leg1_ITSLayerFirstCls<6&&Leg2_ITSLayerFirstCls<6")
439
440c->SetAlias("cut","PairType==1 && QA && pidSig && ITS5");
441
442TFile f("/data/Work/data/pp2.76/m.root","recreate")
443TTree *tnew=c->CopyTree("cut")
444tnew->Write("Pair");
445f.Save()
446f.Close()
447
448c->SetMarkerStyle(20);
449c->SetMarkerSize(1);
450c->Draw("M>>hM(250,0.,5.)","cut","e");
451hM=hM
452hM->SetMarkerColor(kRed)
453hM->SetLineColor(kRed)
454
455c->SetAlias("cutLS","(PairType==0||PairType==2) && QA && pidSig && ITS5");
456
457c->Draw("M>>hMLS(250,0.,5.)","cutLS","esame");
458hMLS=hMLS
459hMLS->SetLineColor(kBlue);
460hMLS->SetMarkerStyle(27)
461Double_t factor=hM->Integral(hM->FindBin(3.201),hM->FindBin(4.9))/hMLS->Integral(hMLS->FindBin(3.201),hMLS->FindBin(4.9));
462printf("scale factor: %.2f\n",factor)
463hMLS->Scale(factor);
464
465hSub=(TH1*)hM->Clone("hSub");
466hSub->Add(hMLS,-1);
467hSub->SetLineColor(kBlack);
468hSub->SetMarkerColor(kBlack);
469hSub->Draw("same")
470
471hSub->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//
481c->SetAlias("cutE","abs(Leg1_TPC_nSigma_Electrons)<3&&abs(Leg2_TPC_nSigma_Electrons)<3");
0c09cae4 482c->SetAlias("cutPi","(Leg1_TPC_nSigma_Pions)>=3.5&&(Leg2_TPC_nSigma_Pions)>=3.5");
483c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>=3&&(Leg2_TPC_nSigma_Protons)>=3");
fb7d2d99 484c->SetAlias("pidSig","cutE&&cutPi&&cutP");
485
486c->SetAlias("LegEta","abs(Leg1_Eta)<0.9&&abs(Leg2_Eta)<0.9");
0c09cae4 487c->SetAlias("LegNcl","Leg1_NclsTPC>=70&&Leg2_NclsTPC>=70");
488c->SetAlias("LegPt","Leg1_Pt>=.6&&Leg2_Pt>=0.6");
fb7d2d99 489c->SetAlias("Rap","abs(Y)<0.9");
0c09cae4 490c->SetAlias("QA","LegNcl&&LegEta&&Rap&&LegPt&&Rap");
fb7d2d99 491
0c09cae4 492c->SetAlias("cutSigN","Leg2_TPCsignalN>=Leg2_NclsTPC&&Leg1_TPCsignalN>=Leg1_NclsTPC");
493c->SetAlias("etaAdd","Leg1_Eta<0&&Leg2_Eta<0")
494c->SetAlias("ITS1","Leg1_ITSLayerFirstCls<1&&Leg2_ITSLayerFirstCls<1")
495c->SetAlias("ITS2","Leg1_ITSLayerFirstCls<2&&Leg2_ITSLayerFirstCls<2")
496c->SetAlias("ITS3","Leg1_ITSLayerFirstCls<3&&Leg2_ITSLayerFirstCls<3")
497c->SetAlias("ITS4","Leg1_ITSLayerFirstCls<4&&Leg2_ITSLayerFirstCls<4")
498c->SetAlias("ITS5","Leg1_ITSLayerFirstCls<5&&Leg2_ITSLayerFirstCls<5")
499c->SetAlias("ITS6","Leg1_ITSLayerFirstCls<6&&Leg2_ITSLayerFirstCls<6")
fb7d2d99 500
0c09cae4 501c->SetAlias("cut","PairType==1 && QA && pidSig");
fb7d2d99 502
0c09cae4 503c->SetMarkerStyle(20);
504c->SetMarkerSize(.5);
fb7d2d99 505c->Draw("M>>hM(125,0.,5.)","cut","e");
0c09cae4 506c->Draw("M>>hM1(125,0.,5.)","cut&&ITS1","esame"); hM1->SetLineColor(kRed); hM1->SetMarkerColor(kRed);
507c->Draw("M>>hM2(125,0.,5.)","cut&&ITS2","esame"); hM2->SetLineColor(kBlue); hM2->SetMarkerColor(kBlue);
508c->Draw("M>>hM3(125,0.,5.)","cut&&ITS3","esame"); hM3->SetLineColor(kGreen); hM3->SetMarkerColor(kGreen);
509c->Draw("M>>hM4(125,0.,5.)","cut&&ITS4","esame"); hM4->SetLineColor(kMagenta); hM4->SetMarkerColor(kMagenta);
510c->Draw("M>>hM5(125,0.,5.)","cut&&ITS5","esame"); hM5->SetLineColor(kYellow); hM5->SetMarkerColor(kYellow);
511c->Draw("M>>hM6(125,0.,5.)","cut&&ITS6","esame"); hM6->SetLineColor(kAzure); hM6->SetMarkerColor(kAzure);
512
513c->SetAlias("cut","PairType==1&&QA&&pidSig&&Leg1_ITSLayerFirstCls<1&&Leg2_ITSLayerFirstCls<1");
514c->Draw("M>>hM1(125,0.,5.)","cut","esame");
515hM1->SetMarkerColor(kBlue); hM1->SetLineColor(kBlue)
516
517c->SetAlias("cut","PairType==1&&QA&&pidSig&&Leg1_ITSLayerFirstCls<2&&Leg2_ITSLayerFirstCls<2&&Run!=146805");
518c->Draw("M>>hM2(125,0.,5.)","cut","esame");
519hM2->SetMarkerColor(kMagenta); hM2->SetLineColor(kMagenta); hM2->SetMarkerStyle(20);
520
521c->SetAlias("cut","PairType==1&&QA&&pidSig&&Leg1_ITSLayerFirstCls<5&&Leg2_ITSLayerFirstCls<5");
522c->Draw("M>>hM3(125,0.,5.)","cut","esame");
523hM3->SetMarkerColor(kGreen); hM3->SetLineColor(kGreen)
524
525//
526c->SetMarkerColor(kBlack); c->SetLineColor(kBlack); c->Draw("M>>hM(125,0.,5.)","cut","e");
527new TCanvas; c->SetMarkerColor(kBlue); c->SetLineColor(kBlue); c->Draw("M>>hM2(125,0.01,5.01)","cut","e");
528new TCanvas; c->SetMarkerColor(kRed); c->SetLineColor(kRed); c->Draw("M>>hM3(125,0.02,5.02)","cut","e");
529new 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
535c->SetAlias("stp","1./9.*TMath::Pi()")
536c->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
539c->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
542c->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 544c->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 546c1->Divide(2,2)
547c1->cd(1)
548c->Draw("M>>hM1(125,0.,5.)","cut&&trdcut","e");
549c1->cd(2)
550c->Draw("M>>hM2(125,0.,5.)","cut&&trdcutn","e");
551c1->cd(3)
552c->Draw("M>>hM3(125,0.,5.)","cut&&trdcutn2","e");
553c1->cd(4)
554c->Draw("M>>hM4(125,0.,5.)","cut&&trdcutn3","e");
fb7d2d99 555
556
0c09cae4 557c->SetAlias("notrd","((Leg1_TrackStatus&512)==0 && (Leg2_TrackStatus&512)==0)")
558c->SetAlias("withtrd","((Leg1_TrackStatus&512)==512 && (Leg2_TrackStatus&512)==512)")
559
560c->SetAlias("notrd2","((Leg1_TrackStatus&512)==0 && (Leg2_TrackStatus&512)==512)")
561c->SetAlias("notrd3","((Leg1_TrackStatus&512)==512 && (Leg2_TrackStatus&512)==0)")
562
563c3->Divide(2,2)
564c3->cd(1)
565c->Draw("M>>hM5(125,0.,5.)","cut&&notrd","e");
566c3->cd(2)
567c->Draw("M>>hM6(125,0.,5.)","cut&&withtrd","e");
568c3->cd(3)
569c->Draw("M>>hM7(125,0.,5.)","cut&&notrd2","e");
570c3->cd(4)
571c->Draw("M>>hM8(125,0.,5.)","cut&&notrd3","e");
572
573//pt ele only pid
574c->SetAlias("cutE","Leg1_TPC_nSigma_Electrons>-2.&&Leg1_TPC_nSigma_Electrons<3&&Leg2_TPC_nSigma_Electrons>-2.&&Leg2_TPC_nSigma_Electrons<3");
575c->SetAlias("pidSig","cutE");
576c->SetAlias("LegPt","Leg1_Pt>1.2&&Leg2_Pt>1.2");
577
578c->SetAlias("LegEta","abs(Leg1_Eta)<0.9&&abs(Leg2_Eta)<0.9");
579c->SetAlias("LegNcl","Leg1_NclsTPC>70&&Leg2_NclsTPC>70");
580c->Draw("M>>hM(125,0.,5.)","cut","e");
581
fb7d2d99 582//---------------------
583
0c09cae4 584c->SetAlias("cut","PairType==1&&QA")
8df8e382 585
8df8e382 586
554e40f8 587c->SetAlias("nCls","Leg1_NclsTPC>90&&Leg2_NclsTPC>90");
8df8e382 588
fb7d2d99 589
590c->SetAlias("cutE","Leg1_TPC_nSigma_Electrons>-1 && Leg2_TPC_nSigma_Electrons>-1");
0c09cae4 591c->SetAlias("LegPt","Leg1_Pt>1.5&&Leg2_Pt>1.5");
592
593//distance to chamber edge
594c->SetAlias("tgs","pi/180.*20");
595c->SetAlias("ed1","Leg1_Phi-int(Leg1_Phi/tgs+.5)*tgs");
596c->SetAlias("ed2","Leg2_Phi-int(Leg2_Phi/tgs+.5)*tgs");
fb7d2d99 597
0c09cae4 598c->Draw("M:abs(ed1)>>hMd(15,0.,.18,65,0.,5.2)","cut","colz");
fb7d2d99 599
600
554e40f8 601//--------PID
45b2b1b8 602//-Param dEdx
603c->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 615c->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 617c->SetAlias("cutP","(Leg1_Pt>1.2||TOFe1r)) && (Leg2_Pt>1.2 || TOFe2r)")
618
554e40f8 619//-- nsigma
620c->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 622c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>3&&abs(Leg2_TPC_nSigma_Pions)>3");
fb7d2d99 623c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>3.&&(Leg2_TPC_nSigma_Protons)>3.3");
554e40f8 624c->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)");
627c->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 628c->SetAlias("pidParam","eleParam&&cutP");
8df8e382 629
630
631
554e40f8 632c->SetAlias("LegEta","abs(Leg1_Eta)<0.9&&abs(Leg2_Eta<0.9)");
ffbede40 633c->SetAlias("LegNcl","Leg1_NclsTPC>90&&Leg2_NclsTPC>90");
45b2b1b8 634c->SetAlias("LegPt","Leg1_Pt>1&&Leg2_Pt>1");
554e40f8 635c->SetAlias("Rap","abs(Y)<0.9");
636c->SetAlias("QA","LegNcl&&LegEta&&Rap");
637c->SetAlias("spdFirst","(Leg1_ITS_clusterMap&1)==1 && (Leg2_ITS_clusterMap&1)==1");
ffbede40 638c->SetAlias("LegNclDiffIter1","abs(Leg1_NclsTPC-Leg1_NclsTPCiter1)<10&&abs(Leg2_NclsTPC-Leg2_NclsTPCiter1)<10")
639c->SetAlias("LegNclPID","(Leg1_NclsTPC-Leg1_TPCsignalN)<20&&(Leg2_NclsTPC-Leg2_TPCsignalN)<20")
8df8e382 640
fb7d2d99 641c->SetAlias("LegNcl","Leg1_NFclsTPCrobust&&Leg2_NFclsTPCrobust");
642c->SetAlias("cut","PairType==1&&QA&&pidSig&&LegPt");
643
45b2b1b8 644c->SetAlias("cut","PairType==1&&QA&&cutPipardEdx&&cutPspecial")
645c->SetAlias("cut","PairType==1&&QA&&pidSig&&LegPt")
8df8e382 646
fb7d2d99 647c->SetMarkerStyle(22);
554e40f8 648c->SetMarkerSize(.8);
fb7d2d99 649
650//-------- nsigma
651
554e40f8 652c->SetMarkerColor(kBlack);
8df8e382 653c->SetLineColor(kBlack);
8df8e382 654
fb7d2d99 655c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>3&&abs(Leg2_TPC_nSigma_Pions)>3");
656c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>3&&(Leg2_TPC_nSigma_Protons)>3");
657
658c->Draw("M>>hM(301,-.01,6.01)","cut","e");
659c->GetHistogram()->GetXaxis()->SetRangeUser(2,4);
660
661//--------
8df8e382 662
554e40f8 663c->SetMarkerColor(kBlue);
8df8e382 664c->SetLineColor(kBlue);
fb7d2d99 665
1201a1a9 666c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>3&&abs(Leg2_TPC_nSigma_Pions)>3");
667c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>3&&(Leg2_TPC_nSigma_Protons)>3");
8df8e382 668
fb7d2d99 669c->Draw("M>>hM2(301,-.01,6.01)","cut","esame");
670
671//--------
ffbede40 672
554e40f8 673c->SetMarkerColor(kGreen);
8df8e382 674c->SetLineColor(kGreen);
fb7d2d99 675
676c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>4&&abs(Leg2_TPC_nSigma_Pions)>4");
677c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>3.5&&(Leg2_TPC_nSigma_Protons)>3.5");
678
679c->Draw("M>>hM3(301,-.01,6.01)","cut","esame");
680
681//--------
682
683c->SetMarkerColor(kMagenta);
684c->SetLineColor(kMagenta);
685
45b2b1b8 686c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>3.5&&abs(Leg2_TPC_nSigma_Pions)>3.5");
fb7d2d99 687c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>4&&(Leg2_TPC_nSigma_Protons)>4");
688
689c->Draw("M>>hM4(301,-.01,6.01)","cut","esame");
690
691
692
693
694
695//
696//-------- rapidity
697//
698
699c->SetMarkerColor(kBlack);
700c->SetLineColor(kBlack);
701
702c->Draw("M>>hM(301,-.01,6.01)","cut&&Y<=0","e");
703
704//--------
705
706c->SetMarkerColor(kBlue);
707c->SetLineColor(kBlue);
708
709c->Draw("M>>hM2(301,-.01,6.01)","cut&&Y>0","esame");
710
711
712
713
714
715c->SetAlias("cutE","Leg1_TPC_nSigma_Electrons>-1 && Leg2_TPC_nSigma_Electrons>-1");
716c->SetAlias("LegPt","Leg1_Pt>1.2&&Leg2_Pt>1.2");
717
718c->SetAlias("cut","PairType==1&&QA&&pidSig");
719
720
721//-------- binning
722
723c->SetMarkerColor(kBlack);
724c->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 729c->Draw("M>>hM(601,-.015,6.005)","cut","e");
fb7d2d99 730
731TGraphErrors gr0;
732TH1 *h=c->GetHistogram();
733
734gr0->SetLineColor(h->GetLineColor());
735gr0->SetMarkerColor(h->GetMarkerColor());
736for (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
744c->SetMarkerColor(kBlue);
745c->SetLineColor(kBlue);
746
1201a1a9 747c->Draw("M>>hM2(601,-.01,6.01)","cut","egoff");
fb7d2d99 748
749TGraphErrors gr1;
750TH1 *h=c->GetHistogram();
751
752gr1->SetLineColor(h->GetLineColor());
753gr1->SetMarkerColor(h->GetMarkerColor());
754for (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
762c->SetMarkerColor(kGreen);
763c->SetLineColor(kGreen);
764
1201a1a9 765c->Draw("M>>hM3(601,-.005,6.015)","cut","egoff");
fb7d2d99 766c->GetHistogram()->GetXaxis()->SetRangeUser(2.,4);
767
768TGraphErrors gr2;
769TH1 *h=c->GetHistogram();
770
771gr2->SetLineColor(h->GetLineColor());
772gr2->SetMarkerColor(h->GetMarkerColor());
773for (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
781c->SetMarkerColor(kMagenta);
782c->SetLineColor(kMagenta);
783
1201a1a9 784c->Draw("M>>hM4(601,-.0,6.02)","cut","egoff");
fb7d2d99 785
786TGraphErrors gr3;
787TH1 *h=c->GetHistogram();
788
789gr3->SetLineColor(h->GetLineColor());
790gr3->SetMarkerColor(h->GetMarkerColor());
791for (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
797gr0->Draw("ap");
798gr0->GetHistogram()->GetXaxis()->SetRangeUser(2.,4);
799gr1->Draw("p");
800gr2->Draw("p");
801gr3->Draw("p");
8df8e382 802
803
804
805
ffbede40 806c->SetAlias("LegNclDiffIter1","(Leg1_NclsTPC-Leg1_NclsTPCiter1)>-1&&(Leg2_NclsTPC-Leg2_NclsTPCiter1)>-1")
807c->SetAlias("cut","PairType==1&&LegNclDiffIter1")
8df8e382 808// histos
809AliDielectronHistos h("h","h");
810h.AddClass("TPCsignal");
811h.UserHistogram("TPCsignal","sigTPC","TPC signal;P [GeV];TPC signal [arb. Units]",400,.3,40,400,0.,200.,0,0,kTRUE,kFALSE)
812h.GetHistogram("TPCsignal","sigTPC")->SetDirectory(gDirectory)
813
554e40f8 814h.UserHistogram("TPCsignal","nSigE","TPC n #sigma Electrons;P [GeV];TPC n #sigma Electrons",200,.3,40.,100,-10.,10.,0,0,kTRUE,kFALSE)
8df8e382 815h.GetHistogram("TPCsignal","nSigE")->SetDirectory(gDirectory)
554e40f8 816h.UserHistogram("TPCsignal","nSigMu","TPC n #sigma Muons;P [GeV];TPC n #sigma Muons",400,.3,40.,500,-10.,10.,0,0,kTRUE,kFALSE)
8df8e382 817h.GetHistogram("TPCsignal","nSigMu")->SetDirectory(gDirectory)
554e40f8 818h.UserHistogram("TPCsignal","nSigPi","TPC n #sigma Pions;P [GeV];TPC n #sigma Pions",400,.3,40.,500,-10.,10.,0,0,kTRUE,kFALSE)
8df8e382 819h.GetHistogram("TPCsignal","nSigPi")->SetDirectory(gDirectory)
554e40f8 820h.UserHistogram("TPCsignal","nSigK","TPC n #sigma Kaons;P [GeV];TPC n #sigma Kaons",400,.3,40,500,-10,10,0,0,kTRUE,kFALSE)
8df8e382 821h.GetHistogram("TPCsignal","nSigK")->SetDirectory(gDirectory)
554e40f8 822h.UserHistogram("TPCsignal","nSigP","TPC n #sigma Protons;P [GeV];TPC n #sigma Protons",400,.3,40.,500,-10,10.,0,0,kTRUE,kFALSE)
8df8e382 823h.GetHistogram("TPCsignal","nSigP")->SetDirectory(gDirectory)
824
ffbede40 825h.UserHistogram("TPCsignal","nSigDiffP","ncls-nclsXX;P [GeV];ncls-nclsXX",400,.3,40.,200,-40,160.,0,0,kTRUE,kFALSE)
826h.GetHistogram("TPCsignal","nSigDiffP")->SetDirectory(gDirectory)
827
8df8e382 828
829c->Draw("Leg1_TPC_signal:Leg1_P_InnerParam>>sigTPC","cut","colz")
830c->Draw("Leg2_TPC_signal:Leg2_P_InnerParam>>+sigTPC","cut","colz")
831
832
833c->Draw("Leg1_TPC_nSigma_Electrons:Leg1_P_InnerParam>>nSigE","cut","colz")
0c09cae4 834c->Draw("Leg2_TPC_nSigma_Electrons:Leg2_P_InnerParam>>+nSigE","cut","colzsame")
8df8e382 835
836c->Draw("Leg1_TPC_nSigma_Muos:Leg1_P_InnerParam>>nSigMu","cut","goff")
837c->Draw("Leg2_TPC_nSigma_Muons:Leg1_P_InnerParam>>nSigMu","cut","goff")
838c->Draw("Leg2_TPC_nSigma_Muons:Leg2_P_InnerParam>>+nSigMu","cut","colz")
839
840c->Draw("Leg1_TPC_nSigma_Pions:Leg1_P_InnerParam>>nSigPi","cut","goff")
841c->Draw("Leg2_TPC_nSigma_Pions:Leg2_P_InnerParam>>+nSigPi","cut","colz")
842
843c->Draw("Leg1_TPC_nSigma_Kaons:Leg1_P_InnerParam>>nSigK","cut","goff")
844c->Draw("Leg2_TPC_nSigma_Kaons:Leg2_P_InnerParam>>+nSigK","cut","colz")
845
0c09cae4 846c->Draw("Leg1_TPC_nSigma_Protons:Leg1_P_InnerParam>>nSigP","cut","goff")
847c->Draw("Leg2_TPC_nSigma_Protons:Leg2_P_InnerParam>>+nSigP","cut","colz")
8df8e382 848
849
850
61d106d3 851c->Draw("Leg1_TOF_nSigma_Electrons:Leg1_P_InnerParam>>nSigE","cut","colz")
852c->Draw("Leg2_TOF_nSigma_Electrons:Leg2_P_InnerParam>>+nSigE","cut","colz")
853
8df8e382 854
855c->Draw("Leg1_TOF_nSigma_Protons:Leg1_P_InnerParam>>nSigP","cut","goff")
856c->Draw("Leg2_TOF_nSigma_Protons:Leg2_P_InnerParam>>+nSigP","cut","colz")
857
0c09cae4 858c->SetScanField(0)
859c->Scan("M:EventInFile:Leg1_ID:Leg2_ID:File.GetString()","","colsize=1 col=.4f:6.d:5.d:5.d:130.s")
860
861c->Scan("1:Run:EventInFile:File.GetString()","","colsize=1 col=.2f:8.d:8.d:130.s");
8df8e382 862
8df8e382 863
864
865AliDielectronSignalFunc sig;
866sig.SetDefaults(1);
867
554e40f8 868
ffbede40 869//----------
870c->Draw("Leg1_NclsTPC>>hNcls(160,-0.5,159.5)","cut","goff");
871c->Draw("Leg2_NclsTPC>>+hNcls","cut","goff");
872hNclsPID->SetLineColor(kBlack)
873
874c->Draw("Leg1_TPCsignalN>>hNclsPID(160,-0.5,159.5)","cut","goff");
875c->Draw("Leg2_TPCsignalN>>+hNclsPID","cut","goff");
876hNclsPID->SetLineColor(kBlue)
877
878c->Draw("Leg1_NclsTPCiter1>>hNclsIter1(160,-0.5,159.5)","cut","goff");
879c->Draw("Leg2_NclsTPCiter1>>+hNclsIter1","cut","goff");
880hNclsIter1->SetLineColor(kGreen)
881
882hNcls->Draw();
883hNclsPID->Draw("same");
884hNclsIter1->Draw("same");
885//-----------
886
887
888
889c->Draw("Leg1_TPCsignalN:Leg1_NclsTPC>>hNclsPIDNcls(160,-0.5,159.5,160,-0.5,159.5)","cut","colz");
890c->Draw("Leg2_TPCsignalN:Leg2_NclsTPC>>+hNclsPIDNcls","cut","colz");
891
892
893c->Draw("Leg1_NclsTPC-Leg1_TPCsignalN:Leg1_P_InnerParam>>nSigDiffP","cut","colz");
894c->Draw("Leg2_NclsTPC-Leg2_TPCsignalN:Leg1_P_InnerParam>>+nSigDiffP","cut","colz");
895
896
897c->Draw("Leg1_NclsTPC-Leg1_NclsTPCiter1:Leg1_P_InnerParam>>nSigDiffP","cut","colz");
898c->Draw("Leg2_NclsTPC-Leg2_NclsTPCiter1:Leg1_P_InnerParam>>+nSigDiffP","cut","colz");
899
900
901
902
903
904
905
906
907
908c->Draw("Leg1_NclsTPC-Leg1_TPCsignalN:Leg1_TPC_nSigma_Electrons:Leg1_P_InnerParam>>hXX(100,0,10,20,-4,4)","cut","profcolz")
909c->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:
920c->SetAlias("cutE","abs(Leg1_TPC_nSigma_Electrons)<3&&abs(Leg2_TPC_nSigma_Electrons)<3");
554e40f8 921c->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 923c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>5&&(Leg2_TPC_nSigma_Protons)>5");
8df8e382 924c->SetAlias("cutK","abs(Leg1_TPC_nSigma_Kaons)>2&&abs(Leg2_TPC_nSigma_Kaons)>2");
554e40f8 925c->SetAlias("pid","cutE&&cutPi&&cutP");
926c->SetAlias("etaLeg","abs(Leg1_Eta)<.9&&abs(Leg2_Eta)<.9");
927c->SetAlias("rap","abs(Y)<.9");
8df8e382 928
929
930c->SetAlias("cutAdd","PairType==1&&abs(Leg1_ImpactParXY)<.02&&abs(Leg2_ImpactParXY)<.02&&Leg2_Pt>1.")
554e40f8 931c->Draw("M>>hM(50,2,4)","PairType==1&&pid","e");
8df8e382 932h.Rebin();
933h.Rebin();
934h.Rebin();
935sig.Process(hM);
936sig.Draw("samestat");
937
938
939
940
941//test
8df8e382 942c->SetAlias("cutAdd","PairType==1&&abs(Leg1_ImpactParXY)<.03&&abs(Leg2_ImpactParXY)<.03&&Leg2_Pt>1")
554e40f8 943c->SetAlias("cut","cutAdd&&pid&etaLeg&&rap")
8df8e382 944
945c->Draw("M>>hM(50,1.99,3.99)","cut","e");
946sig.Process(hM);
947sig.Draw("samestat");
948
949
950c->SetAlias("cut","PairType==1")
951c->Draw("Leg1_TPC_signal:Leg1_P_InnerParam>>sigTPC","cut","colz")
952c->Draw("Leg2_TPC_signal:Leg2_P_InnerParam>>+sigTPC","cut","colz")
953
954////
955c->SetAlias("cutE","abs(Leg1_TPC_nSigma_Electrons)<2&&abs(Leg2_TPC_nSigma_Electrons)<2");
956c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>2&&abs(Leg2_TPC_nSigma_Pions)>2");
957c->SetAlias("cutPi2","Leg1_TPC_signal>65&&Leg2_TPC_signal>65");
958c->SetAlias("cutPi3","abs(Leg1_TPC_nSigma_Pions)>2.5&&abs(Leg2_TPC_nSigma_Pions)>2.5");
959c->SetAlias("cutP","abs(Leg1_TPC_nSigma_Protons)>2&&abs(Leg2_TPC_nSigma_Protons)>2");
960c->SetAlias("cutP2","abs(Leg1_TPC_nSigma_Protons)>1.5&&abs(Leg2_TPC_nSigma_Protons)>1.5");
961c->SetAlias("cutK","abs(Leg1_TPC_nSigma_Kaons)>2&&abs(Leg2_TPC_nSigma_Kaons)>2");
962c->SetAlias("cutdXY","abs(Leg1_ImpactParXY)<.02&&abs(Leg2_ImpactParXY)<.02")
963c->SetAlias("cutPt","Leg2_Pt>1.")
964c->SetAlias("cutPt2","Leg2_Pt>1.2")
965
966//----
967c->SetMarkerSize(0.7);
968
969c->SetMarkerStyle(20);
970c->SetLineColor(kRed);
971c->SetMarkerColor(kRed);
972c->Draw("M>>hM(100,2,4)","cutPi&&cutPt","e");
973
974c->SetMarkerStyle(21);
975c->SetLineColor(kRed-1);
976c->SetMarkerColor(kRed-2);
977c->Draw("M>>hM2(100,2,4)","cutPi2&&cutPt","esame");
978
979c->SetMarkerStyle(22);
980c->SetLineColor(kRed-2);
981c->SetMarkerColor(kRed-2);
982c->Draw("M>>hM3(100,2,4)","cutPi3&&cutPt","esame");
983
984//----
985c->SetMarkerStyle(20);
986c->SetLineColor(kBlue);
987c->SetMarkerColor(kBlue);
988c->Draw("M>>hM4(100,2,4)","cutPi&&cutPt&&cutP","esame");
989
990c->SetMarkerStyle(21);
991c->SetLineColor(kBlue-1);
992c->SetMarkerColor(kBlue-1);
993c->Draw("M>>hM5(100,2,4)","cutPi2&&cutPt&&cutP","esame");
994
995c->SetMarkerStyle(22);
996c->SetLineColor(kBlue-2);
997c->SetMarkerColor(kBlue-2);
998c->Draw("M>>hM6(100,2,4)","cutPi3&&cutPt&&cutP","esame");
999
1000//----
1001
1002c->SetMarkerStyle(20);
1003c->SetLineColor(kGreen);
1004c->SetMarkerColor(kGreen);
1005c->Draw("M>>hM7(100,2,4)","cutPi&&cutPt&&cutP2","esame");
1006
1007c->SetMarkerStyle(21);
1008c->SetLineColor(kGreen-1);
1009c->SetMarkerColor(kGreen-1);
1010c->Draw("M>>hM8(100,2,4)","cutPi2&&cutPt&&cutP2","esame");
1011
1012c->SetMarkerStyle(22);
1013c->SetLineColor(kGreen-2);
1014c->SetMarkerColor(kGreen-2);
1015c->Draw("M>>hM9(100,2,4)","cutPi3&&cutPt&&cutP2","esame");
1016
1017//----
1018
1019
1020c->SetMarkerStyle(20);
1021c->SetLineColor(kMagentha);
1022c->SetMarkerColor(kMagentha);
1023c->Draw("M>>hM7(100,2,4)","cutPi&&cutPt&&cutP2","esame");
1024
1025c->SetMarkerStyle(21);
1026c->SetLineColor(kMagentha-1);
1027c->SetMarkerColor(kMagentha-1);
1028c->Draw("M>>hM8(100,2,4)","cutPi2&&cutPt&&cutP2","esame");
1029
1030c->SetMarkerStyle(22);
1031c->SetLineColor(kMagentha-2);
1032c->SetMarkerColor(kMagentha-2);
1033c->Draw("M>>hM9(100,2,4)","cutPi3&&cutPt&&cutP2","esame");
1034
1035
1036c->SetLineColor(kBlack);
1037c->SetMarkerColor(kBlue);
1038c->Draw("M>>hM4(100,2,4)","cutE&&cutPi&&cutK&&cutP&&cutdXY&&cutPt","esame");
1039
1040
1041
1042
1043//
1044c->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");
1046c->SetAlias("cutP","abs(Leg1_TPC_nSigma_Protons)>3&&abs(Leg2_TPC_nSigma_Protons)>3")
1047
1048c->SetAlias("cutAdd","PairType==1&&abs(Leg1_ImpactParXY)<.03&&abs(Leg2_ImpactParXY)<.03&&Leg2_Pt>0")
1049c->SetAlias("cut","Leg2_Pt>1&&cutE&&cutP")
1050
1051c->Draw("M>>hM(50,1.99,3.99)","cut","e");
1052
1053c->SetAlias("cutAdd","PairType==1&&abs(Leg1_ImpactParXY)<.03&&abs(Leg2_ImpactParXY)<.03&&Leg2_Pt>.8")
1054c->Draw("M>>hM2(50,1.99,3.99)","cut","esame");
1055
1056c->SetAlias("cutAdd","PairType==1&&abs(Leg1_ImpactParXY)<.03&&abs(Leg2_ImpactParXY)<.03&&Leg2_Pt>1")
1057c->Draw("M>>hM3(50,1.99,3.99)","cut","esame");
1058
1059c->SetAlias("cutAdd","PairType==1&&abs(Leg1_ImpactParXY)<.03&&abs(Leg2_ImpactParXY)<.03&&Leg2_Pt>1.2")
1060c->Draw("M>>hM4(50,1.99,3.99)","cut","esame");
1061
1062
1063c->Draw("Leg1_TPC_signal:Leg1_P_InnerParam>>sigTPC","cut","goff")
1064c->Draw("Leg2_TPC_signal:Leg2_P_InnerParam>>+sigTPC","cut","goff")
1065c1->Modified();c1->Update()
1066
1067
1068c->SetAlias("cutE","Leg1_TPC_nSigma_Electrons>-1.5&&Leg2_TPC_nSigma_Electrons>-1.5");
1069c->SetAlias("cut","Leg2_P_InnerParam>1.5&&cutE")
1070c->SetMarkerStyle(21);
1071c->Draw("M>>hM(50,1.99,3.99)","cut","e");
1072
1073c->SetAlias("cutE","Leg1_TPC_nSigma_Electrons>-1.5+.8&&Leg2_TPC_nSigma_Electrons>-1.5+.8");
1074c->SetAlias("cut","Leg2_P_InnerParam>1.5&&cutE")
1075c->SetMarkerStyle(20);
1076c->SetMarkerColor(kRed);
61d106d3 1077c->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
1088c->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
1090c->SetAlias("Pcut","Leg1_P_InnerParam>1.3&&Leg2_P_InnerParam>1.3")
1091c->SetAlias("Ptcut","Leg1_Pt>1&&Leg2_Pt>1")
1092c->SetAlias("TOFcut","abs(Leg1_TOF_nSigma_Electrons)<3&&abs(Leg2_TOF_nSigma_Electrons)<3");
1093c->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)");
1094c->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 1095c->SetAlias("NClcut","Leg1_NclsTPC>90&&Leg2_NclsTPC>90");
61d106d3 1096
1097c->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 1098c->SetAlias("cut","PairType==1&&eleParam&&Run<127719")
61d106d3 1099c->SetAlias("cut","1==1")
1100c->SetAlias("cut","NClcut")
1101
1102c->SetAlias("cut","TOFcut&&TPCcut&&NClcut")
1103
1104c->SetAlias("cut","TOFcut2&&TPCcut&&NClcut")
1105
1106c->SetAlias("cut","cutPro&&TPCcut&&NClcut")
1107
1108c->SetAlias("cut","Pcut&&TPCcut&&NClcut")
1109
1110c->SetAlias("cut","Ptcut&&TPCcut&&NClcut")
1111
1112
1113
1114//------------ plots --------------
1115
1116//no cut
1117c->SetAlias("cut","1==1")
1118c1->SetLogx(0)
1119c1->SetLogz(0)
1120c->SetLineColor(kBlack);
1121c->Draw("M>>hM(50,1.99,3.99)","cut","e");
1122hM->SetTitle(";Inv. Mass [GeV]; Pair (e+e-) / 40GeV")
1123c1->Modified()
1124c1->Update();
1125c1->Print("pics/M_noCut.png");
1126
1127//=============
1128//ncl: No cut
1129//=============
1130c->SetAlias("cut","1==1")
1131c1->SetLogx(1)
1132c1->SetLogz(0)
1133gStyle->SetOptStat(0);
1134c->Draw("Leg1_NclsTPC:Leg1_TPC_signal:Leg1_P_InnerParam>>test(1000,0,40,200,60,100)","cut","profcolz")
1135c->Draw("Leg2_NclsTPC:Leg2_TPC_signal:Leg2_P_InnerParam>>+test","cut","profcolz")
1136test->SetMinimum(80)
1137test->SetTitle("mean TPC number of clusters;P_{TPC} [GeV]; TPC signal [arb. units]")
1138c1->Modified()
1139c1->Update();
1140c1->Print("pics/TPCnCl_P.png");
1141
1142//=============
1143//TPCsignal: ncl cut
1144//=============
1145c->SetAlias("cut","NClcut")
1146c->Draw("Leg1_NclsTPC:Leg1_TPC_signal:Leg1_P_InnerParam>>test(1000,0,40,200,60,100)","cut","profcolz")
1147c->Draw("Leg2_NclsTPC:Leg2_TPC_signal:Leg2_P_InnerParam>>+test","cut","profcolz")
1148test->SetMinimum(80)
1149test->SetTitle("mean TPC number of clusters;P_{TPC} [GeV]; TPC signal [arb. units]")
1150c1->Modified()
1151c1->Update();
1152c1->Print("pics/TPCnCl_P_cutNcl.png");
1153
1154
1155//=============
1156//tpc signal + signal cut
1157//=============
1158c1->SetLogx(1)
1159c1->SetLogy(0)
1160c1->SetLogz(1)
1161h.GetHistogram("TPCsignal","sigTPC")->GetYaxis()->SetRangeUser(60,100);
1162c->SetAlias("cut","NClcut")
1163c->Draw("Leg1_TPC_signal:Leg1_P_InnerParam>>sigTPC","cut","colz")
1164c->Draw("Leg2_TPC_signal:Leg2_P_InnerParam>>+sigTPC","cut","colz")
1165TF1 f("f1","[0]*(1-exp(-[1]*(x-[2])))",0.3,40);
1166f.SetParameters(70,1,-2);
1167f.Draw("same");
1168c1->Modified();
1169c1->Update();
1170c1->Print("pics/TPCsignal_P_cutNcl.png");
1171
1172//------- Mass
1173
1174c1->SetLogx(0)
1175c1->SetLogy(1)
1176c1->SetLogz(0)
1177c->SetAlias("cut","1==1")
1178c->SetLineColor(kBlack);
1179c->SetMarkerColor(kBlack);
1180c->Draw("M>>hM(50,1.99,3.99)","cut","e");
1181hM->SetTitle(";Inv. Mass [GeV]; Pair (e+e-) / 40GeV")
1182hM->SetMinimum(5e2);
1183c->SetAlias("cut","NClcut")
1184c->SetLineColor(kRed);
1185c->SetMarkerColor(kRed);
8df8e382 1186c->Draw("M>>hM2(50,1.99,3.99)","cut","esame");
61d106d3 1187c1->Modified();
1188c1->Update();
1189c1->Print("pics/M_nClCut.png");
1190
1191
1192//==========
1193//tpc signal: ncl + tpc cut
1194//==========
1195c1->SetLogx(1)
1196c1->SetLogy(0)
1197c1->SetLogz(1)
1198c->SetAlias("cut","TPCcut&&NClcut")
1199c->Draw("Leg1_TPC_signal:Leg1_P_InnerParam>>sigTPC","cut","colz")
1200c->Draw("Leg2_TPC_signal:Leg2_P_InnerParam>>+sigTPC","cut","colz")
1201c1->Modified();
1202c1->Update();
1203c1->Print("pics/TPCsignal_P_cutNcl_tpc.png");
1204
1205/--- Mass
1206
1207c1->SetLogx(0)
1208c1->SetLogy(1)
1209c1->SetLogz(0)
1210c->SetAlias("cut","1==1")
1211c->SetLineColor(kBlack);
1212c->SetMarkerColor(kBlack);
1213c->Draw("M>>hM(50,1.99,3.99)","cut","e");
1214hM->SetTitle(";Inv. Mass [GeV]; Pair (e+e-) / 40GeV")
1215hM->SetMinimum(5);
1216c->SetAlias("cut","NClcut")
1217c->SetLineColor(kRed);
1218c->SetMarkerColor(kRed);
1219c->Draw("M>>hM2(50,1.99,3.99)","cut","esame");
1220c->SetAlias("cut","TPCcut&&NClcut")
1221c->SetLineColor(kGreen);
1222c->SetMarkerColor(kGreen);
1223c->Draw("M>>hM3(50,1.99,3.99)","cut","esame");
1224c1->Modified();
1225c1->Update();
1226c1->Print("pics/M_nClCut_tpc.png");
1227
1228
1229//========
1230//TPC signal: ncl + tpc + tof cut
1231//=======
1232c1->SetLogx(1)
1233c1->SetLogy(0)
1234c1->SetLogz(1)
1235c->SetAlias("cut","TOFcut2&&TPCcut&&NClcut")
1236c->Draw("Leg1_TPC_signal:Leg1_P_InnerParam>>sigTPC","cut","colz")
1237c->Draw("Leg2_TPC_signal:Leg2_P_InnerParam>>+sigTPC","cut","colz")
1238c1->Modified();
1239c1->Update();
1240c1->Print("pics/TPCsignal_P_cutNcl_tpc.png");
1241
1242//--- Mass
1243
1244c1->SetLogx(0)
1245c1->SetLogy(0)
1246c1->SetLogz(0)
1247c->SetAlias("cut","1==1")
1248c->SetAlias("cut","TPCcut&&NClcut")
1249c->SetLineColor(kGreen);
1250c->Draw("M>>hM(50,1.99,3.99)","cut","e");
1251hM->SetTitle(";Inv. Mass [GeV]; Pair (e+e-) / 40GeV")
1252hM->SetMinimum(.1);
1253c->SetAlias("cut","TOFcut2&&TPCcut&&NClcut")
1254c->SetLineColor(kBlue);
1255c->Draw("M>>hM2(50,1.99,3.99)","cut","esame");
1256c1->Modified();
1257c1->Update();
1258c1->Print("pics/M_nClCut_tpc.png");
1259
1260//========
1261//Inv Mass: different cuts
1262//=======
1263
1264c1->SetLogx(0)
1265c1->SetLogy(0)
1266c1->SetLogz(0)
1267c->SetAlias("cut","Ptcut&&TPCcut&&NClcut")
1268c->SetLineColor(kMagenta);
1269c->SetMarkerColor(kMagenta);
1270c->SetMarkerStyle(22);
1271c->Draw("M>>hM(50,1.99,3.99)","cut","e");
1272
1273c->SetAlias("cut","Pcut&&TPCcut&&NClcut")
1274c->SetLineColor(kCyan+1);
1275c->SetMarkerColor(kCyan+1);
1276c->SetMarkerStyle(21);
1277c->Draw("M>>hM2(50,1.99,3.99)","cut","esame");
1278
1279c->SetAlias("cut","TOFcut2&&TPCcut&&NClcut")
1280c->SetMarkerStyle(20);
1281c->SetLineColor(kBlue);
1282c->SetMarkerColor(kBlue);
1283c->Draw("M>>hM3(50,1.99,3.99)","cut","esame");
1284
1285c1->Modified();
1286c1->Update();
1287c1->Print("pics/M_nClCut_tpc_tof.png");
1288
1289
1290
8df8e382 1291
2a14a7b1 1292c->SetAlias("NClcut","Leg1_NclsTPC>90&&Leg2_NclsTPC>90");
1293c->SetAlias("Ptcut","Leg1_Pt>1&&Leg2_Pt>1")
1294c->SetAlias("PairT","PairType==1");
1295c->SetAlias("cut","NClcut&&Ptcut&&PairT")
1296
1297
1298c->SetAlias("cutE","abs(Leg1_TPC_nSigma_Electrons)<3&&abs(Leg2_TPC_nSigma_Electrons)<3");
1299c->SetAlias("cutPi","abs(Leg1_TPC_nSigma_Pions)>3&&abs(Leg2_TPC_nSigma_Pions)>3");
1300c->SetAlias("cutP","(Leg1_TPC_nSigma_Protons)>3&&(Leg2_TPC_nSigma_Protons)>3");
1301c->SetAlias("cut","NClcut&&Ptcut&&PairT&&cutE&&cutPi&&cutP")
1302
1303c->SetAlias("eta","abs(Leg1_Eta)<0.88&&abs(Leg1_Eta)<0.88");
1304c->SetAlias("rap","abs(Y)<0.88");
1305c->SetAlias("spdFirst","(Leg1_ITS_clusterMap&1)==1&&(Leg2_ITS_clusterMap&1)==1")
1306c->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
1310c->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
1312c->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
1314c->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
1316c->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
1318c->SetAlias("cutPro","cutProL1&&cutProL2");
1319c->SetAlias("cutPio","cutPioL1&&cutPioL2");
0c09cae4 1320
1321
1322//
1323// track in or out of TRD
1324//
1325c->SetAlias("TRD11","(Leg1_TrackStatus&512)==512 && (Leg2_TrackStatus&512)==512");
1326c->SetAlias("TRD00","(Leg1_TrackStatus&512)== 0 && (Leg2_TrackStatus&512)== 0");
1327c->SetAlias("TRD01","(Leg1_TrackStatus&512)== 0 && (Leg2_TrackStatus&512)==512");
1328c->SetAlias("TRD10","(Leg1_TrackStatus&512)==512 && (Leg2_TrackStatus&512)== 0");
1329
1330TCanvas *c2=(TCanvas)gROOT->FindObject("c2");
1331if (!c2) c2=new TCanvas("c2","c2");
1332c2->Clear()
1333c2->Divide(2,2);
1334
1335c->SetAlias("cut","PairType==1 && QA && pidSig && ITS2");
1336
1337TLine l;
1338l.SetLineColor(kGray+2);
1339// l.SetLineWidth(2);
1340TBox b;
1341b.SetFillColor(kGray);
1342b.SetFillStyle(3004);
1343
1344c2->cd(1);
1345c->Draw("M>>hM11(125,0.,5.)","cut&TRD11","e");
1346b.DrawBox(2.92,0,3.16,gPad->GetUymax())
1347l.DrawLine(3.095,0,3.095,gPad->GetUymax());
1348c2->cd(2);
1349c->Draw("M>>hM10(125,0.,5.)","cut&TRD10","e");
1350b.DrawBox(2.92,0,3.16,gPad->GetUymax())
1351l.DrawLine(3.095,0,3.095,gPad->GetUymax());
1352c2->cd(3);
1353c->Draw("M>>hM01(125,0.,5.)","cut&TRD01","e");
1354b.DrawBox(2.92,0,3.16,gPad->GetUymax())
1355l.DrawLine(3.095,0,3.095,gPad->GetUymax());
1356c2->cd(4);
1357c->Draw("M>>hM00(125,0.,5.)","cut&TRD00","e");
1358b.DrawBox(2.92,0,3.16,gPad->GetUymax())
1359l.DrawLine(3.095,0,3.095,gPad->GetUymax());
1360
1361
1362//
1363// number of cluster in ITS
1364//
1365
1366TH1F h("hITS","hITS",10,0,10);
1367for (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
1371c->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
1373c->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