1 doeffAllSpecies(Int_t isp=1){
2 if(isp==1) performAllPi();
3 else if(isp==2) performAllKa();
4 else if(isp == 3) performAllPr();
8 gSystem->Load("libVMC.so");
9 gSystem->Load("libPhysics.so");
10 gSystem->Load("libTree.so");
11 gSystem->Load("libMinuit.so");
12 gSystem->Load("libSTEERBase.so");
13 gSystem->Load("libANALYSIS.so");
14 gSystem->Load("libAOD.so");
15 gSystem->Load("libESD.so");
16 gSystem->Load("libANALYSIS.so");
17 gSystem->Load("libANALYSISalice.so");
18 gSystem->Load("libCORRFW.so");
19 gSystem->Load("libNetx.so");
20 gSystem->Load("libPWGPPpid.so");
22 gSystem->AddIncludePath("-I$ALICE_ROOT/PWGPP/pid");
24 gROOT->LoadMacro("$ALICE_ROOT/PWGPP/pid/doeffPi.C++");
26 // tune these parameters
27 cmin = 1; // centrality min 1
28 cmax = 10;// centrality max 10
29 Float_t etamin = -0.8;
33 rebinsize = 1; // don't change this, not choice here!!!
36 require5sigma = kFALSE;
40 kOverAllTOFmatch = kFALSE;
41 kOverAll2Sigma = kFALSE;
48 if(! LoadLib()) return;
51 doeffPi(1,0.,etamin,etamax);
52 doeffPi(0,0.,etamin,etamax);
55 doeffPi(1,0.,etamin,etamax);
56 doeffPi(0,0.,etamin,etamax);
59 // matching and PID eff.
60 doeffPi(1,0.1,etamin,etamax);
61 doeffPi(0,0.1,etamin,etamax);
62 doeffPi(1,0.2,etamin,etamax);
63 doeffPi(1,0.4,etamin,etamax);
64 doeffPi(1,0.6,etamin,etamax);
65 doeffPi(1,0.8,etamin,etamax);
66 doeffPi(0,0.2,etamin,etamax);
67 doeffPi(0,0.4,etamin,etamax);
68 doeffPi(0,0.6,etamin,etamax);
69 doeffPi(0,0.8,etamin,etamax);
71 // Good matching eff (1 - TOF mism)
73 doeffPi(1,0.1,etamin,etamax);
74 doeffPi(0,0.1,etamin,etamax);
77 // eff 2 sigma / eff 3 sigma
79 doeffPi(1,0.1,etamin,etamax);
80 doeffPi(0,0.1,etamin,etamax);
84 // TPC|TOF overall eff
85 doeffPi(1,0.2,etamin,etamax);
86 doeffPi(1,0.4,etamin,etamax);
87 doeffPi(1,0.6,etamin,etamax);
88 doeffPi(1,0.8,etamin,etamax);
89 doeffPi(0,0.2,etamin,etamax);
90 doeffPi(0,0.4,etamin,etamax);
91 doeffPi(0,0.6,etamin,etamax);
92 doeffPi(0,0.8,etamin,etamax);
94 kOverAllTOFmatch=kTRUE;
95 // TPC&TOF overall eff
96 doeffPi(1,0.2,etamin,etamax);
97 doeffPi(1,0.4,etamin,etamax);
98 doeffPi(1,0.6,etamin,etamax);
99 doeffPi(1,0.8,etamin,etamax);
100 doeffPi(0,0.2,etamin,etamax);
101 doeffPi(0,0.4,etamin,etamax);
102 doeffPi(0,0.6,etamin,etamax);
103 doeffPi(0,0.8,etamin,etamax);
104 kOverAllTOFmatch=kFALSE;
106 kOverAll2Sigma=kTRUE;
107 // TPC&TOF 2 TOF sigma cut
108 doeffPi(1,0.1,etamin,etamax);
109 doeffPi(0,0.1,etamin,etamax);
110 kOverAll2Sigma=kFALSE;
112 gSystem->Unload("$ALICE_ROOT/PWGPP/pid/doeffPi_C.so");
116 gSystem->Load("libVMC.so");
117 gSystem->Load("libPhysics.so");
118 gSystem->Load("libTree.so");
119 gSystem->Load("libMinuit.so");
120 gSystem->Load("libSTEERBase.so");
121 gSystem->Load("libANALYSIS.so");
122 gSystem->Load("libAOD.so");
123 gSystem->Load("libESD.so");
124 gSystem->Load("libANALYSIS.so");
125 gSystem->Load("libANALYSISalice.so");
126 gSystem->Load("libCORRFW.so");
127 gSystem->Load("libNetx.so");
128 gSystem->Load("libPWGPPpid.so");
130 gSystem->AddIncludePath("-I$ALICE_ROOT/PWGPP/pid");
132 gROOT->LoadMacro("$ALICE_ROOT/PWGPP/pid/doeffPr.C++");
134 // tune these parameters
135 cmin = 1; // centrality min 1
136 cmax = 10;// centrality max 10
137 Float_t etamin = -0.8;
138 Float_t etamax = 0.8;
141 rebinsize = 1; // don't change this, not choice here!!!
144 require5sigma = kFALSE;
145 bayesVsigma = kFALSE;
148 kOverAllTOFmatch = kFALSE;
149 kOverAll2Sigma = kFALSE;
156 if(! LoadLib()) return;
159 doeffPr(1,0.,etamin,etamax);
160 doeffPr(0,0.,etamin,etamax);
163 doeffPr(1,0.,etamin,etamax);
164 doeffPr(0,0.,etamin,etamax);
167 // matching and PID eff.
168 doeffPr(1,0.1,etamin,etamax);
169 doeffPr(0,0.1,etamin,etamax);
170 doeffPr(1,0.2,etamin,etamax);
171 doeffPr(1,0.4,etamin,etamax);
172 doeffPr(1,0.6,etamin,etamax);
173 doeffPr(1,0.8,etamin,etamax);
174 doeffPr(0,0.2,etamin,etamax);
175 doeffPr(0,0.4,etamin,etamax);
176 doeffPr(0,0.6,etamin,etamax);
177 doeffPr(0,0.8,etamin,etamax);
179 // Good matching eff (1 - TOF mism)
181 doeffPr(1,0.1,etamin,etamax);
182 doeffPr(0,0.1,etamin,etamax);
185 // eff 2 sigma / eff 3 sigma
187 doeffPr(1,0.1,etamin,etamax);
188 doeffPr(0,0.1,etamin,etamax);
192 // TPC|TOF overall eff
193 doeffPr(1,0.2,etamin,etamax);
194 doeffPr(1,0.4,etamin,etamax);
195 doeffPr(1,0.6,etamin,etamax);
196 doeffPr(1,0.8,etamin,etamax);
197 doeffPr(0,0.2,etamin,etamax);
198 doeffPr(0,0.4,etamin,etamax);
199 doeffPr(0,0.6,etamin,etamax);
200 doeffPr(0,0.8,etamin,etamax);
202 kOverAllTOFmatch=kTRUE;
203 // TPC&TOF overall eff
204 doeffPr(1,0.2,etamin,etamax);
205 doeffPr(1,0.4,etamin,etamax);
206 doeffPr(1,0.6,etamin,etamax);
207 doeffPr(1,0.8,etamin,etamax);
208 doeffPr(0,0.2,etamin,etamax);
209 doeffPr(0,0.4,etamin,etamax);
210 doeffPr(0,0.6,etamin,etamax);
211 doeffPr(0,0.8,etamin,etamax);
212 kOverAllTOFmatch=kFALSE;
214 kOverAll2Sigma=kTRUE;
215 // TPC&TOF 2 TOF sigma cut
216 doeffPr(1,0.1,etamin,etamax);
217 doeffPr(0,0.1,etamin,etamax);
218 kOverAll2Sigma=kFALSE;
220 gSystem->Unload("$ALICE_ROOT/PWGPP/pid/doeffPr_C.so");
224 gSystem->Load("libVMC.so");
225 gSystem->Load("libPhysics.so");
226 gSystem->Load("libTree.so");
227 gSystem->Load("libMinuit.so");
228 gSystem->Load("libSTEERBase.so");
229 gSystem->Load("libANALYSIS.so");
230 gSystem->Load("libAOD.so");
231 gSystem->Load("libESD.so");
232 gSystem->Load("libANALYSIS.so");
233 gSystem->Load("libANALYSISalice.so");
234 gSystem->Load("libCORRFW.so");
235 gSystem->Load("libNetx.so");
236 gSystem->Load("libPWGPPpid.so");
238 gSystem->AddIncludePath("-I$ALICE_ROOT/PWGPP/pid");
240 gROOT->LoadMacro("$ALICE_ROOT/PWGPP/pid/doeffKa.C++");
242 // tune these parameters
243 cmin = 4; // centrality min 1
244 cmax = 10;// centrality max 10
245 Float_t etamin = -0.8;
246 Float_t etamax = 0.8;
249 rebinsize = 1; // don't change this, not choice here!!!
252 require5sigma = kFALSE;
253 bayesVsigma = kFALSE;
256 kOverAllTOFmatch = kFALSE;
257 kOverAll2Sigma = kFALSE;
264 if(! LoadLib()) return;
267 doeffKa(1,0.,etamin,etamax);
268 doeffKa(0,0.,etamin,etamax);
271 doeffKa(1,0.,etamin,etamax);
272 doeffKa(0,0.,etamin,etamax);
275 // matching and PID eff.
276 doeffKa(1,0.1,etamin,etamax);
277 doeffKa(0,0.1,etamin,etamax);
278 doeffKa(1,0.2,etamin,etamax);
279 doeffKa(1,0.4,etamin,etamax);
280 doeffKa(1,0.6,etamin,etamax);
281 doeffKa(1,0.8,etamin,etamax);
282 doeffKa(0,0.2,etamin,etamax);
283 doeffKa(0,0.4,etamin,etamax);
284 doeffKa(0,0.6,etamin,etamax);
285 doeffKa(0,0.8,etamin,etamax);
287 // Good matching eff (1 - TOF mism)
289 doeffKa(1,0.1,etamin,etamax);
290 doeffKa(0,0.1,etamin,etamax);
293 // eff 2 sigma / eff 3 sigma
295 doeffKa(1,0.1,etamin,etamax);
296 doeffKa(0,0.1,etamin,etamax);
300 // TPC|TOF overall eff
301 doeffKa(1,0.2,etamin,etamax);
302 doeffKa(1,0.4,etamin,etamax);
303 doeffKa(1,0.6,etamin,etamax);
304 doeffKa(1,0.8,etamin,etamax);
305 doeffKa(0,0.2,etamin,etamax);
306 doeffKa(0,0.4,etamin,etamax);
307 doeffKa(0,0.6,etamin,etamax);
308 doeffKa(0,0.8,etamin,etamax);
310 kOverAllTOFmatch=kTRUE;
311 // TPC&TOF overall eff
312 doeffKa(1,0.2,etamin,etamax);
313 doeffKa(1,0.4,etamin,etamax);
314 doeffKa(1,0.6,etamin,etamax);
315 doeffKa(1,0.8,etamin,etamax);
316 doeffKa(0,0.2,etamin,etamax);
317 doeffKa(0,0.4,etamin,etamax);
318 doeffKa(0,0.6,etamin,etamax);
319 doeffKa(0,0.8,etamin,etamax);
320 kOverAllTOFmatch=kFALSE;
322 kOverAll2Sigma=kTRUE;
323 // TPC&TOF 2 TOF sigma cut
324 doeffKa(1,0.1,etamin,etamax);
325 doeffKa(0,0.1,etamin,etamax);
326 kOverAll2Sigma=kFALSE;
328 gSystem->Unload("$ALICE_ROOT/PWGPP/pid/doeffKa_C.so");
331 TGraphErrors *MakeRatio(const char *nf1,const char *nf2,const char *nfo=""/*output file*/,const char *title=""/*title*/){
332 TFile *f1 = new TFile(nf1);
333 TFile *f2 = new TFile(nf2);
335 TGraphErrors *g1 = (TGraphErrors *) f1->Get("Graph");
336 TGraphErrors *g2 = (TGraphErrors *) f2->Get("Graph");
337 if(!(g1 && g2)) return NULL;
338 if(!(g1 && g2)) return NULL;
340 Int_t n1= g1->GetN();
341 Int_t n2= g2->GetN();
343 if(n1 != n2) return NULL;
345 if(n1 > 100) n1 = 100;
347 Float_t x[100],y[100],ex[100],ey[100];
349 for(Int_t i=0;i < n1;i++){
350 x[i] = g1->GetX()[i];
351 ex[i] = g1->GetEX()[i];
352 if(g1->GetY()[i] > 0 && g2->GetY()[i] > 0){
353 y[i] = g1->GetY()[i] / g2->GetY()[i];
354 ey[i] = (g1->GetEY()[i] / g1->GetY()[i])**2 + (g2->GetEY()[i] / g2->GetY()[i])**2;
355 ey[i] = sqrt(ey[i])*y[i];
362 TGraphErrors *gr = new TGraphErrors(n1,x,y,ex,ey);
365 if(nfo[0] != '\0'){ // write output
366 printf("written in %s\n",nfo);
367 TFile *fo = new TFile(nfo,"RECREATE");