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 kSigma2vs3TPC = kFALSE;
37 require5sigma = kFALSE;
41 kOverAllTOFmatch = kFALSE;
42 kOverAll2Sigma = kFALSE;
47 if(! LoadLib()) return;
49 // matching and PID eff.
50 doeffPi(1,0.1,etamin,etamax);
51 doeffPi(0,0.1,etamin,etamax);
52 doeffPi(1,0.2,etamin,etamax);
53 doeffPi(1,0.4,etamin,etamax);
54 doeffPi(1,0.6,etamin,etamax);
55 doeffPi(1,0.8,etamin,etamax);
56 doeffPi(0,0.2,etamin,etamax);
57 doeffPi(0,0.4,etamin,etamax);
58 doeffPi(0,0.6,etamin,etamax);
59 doeffPi(0,0.8,etamin,etamax);
61 // Good matching eff (1 - TOF mism)
63 doeffPi(1,0.1,etamin,etamax);
64 doeffPi(0,0.1,etamin,etamax);
67 // eff 2 sigma / eff 3 sigma
69 doeffPi(1,0.1,etamin,etamax);
70 doeffPi(0,0.1,etamin,etamax);
73 // eff 2 sigma / eff 3 sigma TPC
75 doeffPi(1,0.1,etamin,etamax);
76 doeffPi(0,0.1,etamin,etamax);
80 // TPC|TOF overall eff
81 doeffPi(1,0.2,etamin,etamax);
82 doeffPi(1,0.4,etamin,etamax);
83 doeffPi(1,0.6,etamin,etamax);
84 doeffPi(1,0.8,etamin,etamax);
85 doeffPi(0,0.2,etamin,etamax);
86 doeffPi(0,0.4,etamin,etamax);
87 doeffPi(0,0.6,etamin,etamax);
88 doeffPi(0,0.8,etamin,etamax);
90 kOverAllTOFmatch=kTRUE;
91 // TPC&TOF overall eff
92 doeffPi(1,0.2,etamin,etamax);
93 doeffPi(1,0.4,etamin,etamax);
94 doeffPi(1,0.6,etamin,etamax);
95 doeffPi(1,0.8,etamin,etamax);
96 doeffPi(0,0.2,etamin,etamax);
97 doeffPi(0,0.4,etamin,etamax);
98 doeffPi(0,0.6,etamin,etamax);
99 doeffPi(0,0.8,etamin,etamax);
100 kOverAllTOFmatch=kFALSE;
102 kOverAll2Sigma=kTRUE;
103 // TPC&TOF 2 TOF sigma cut
104 doeffPi(1,0.1,etamin,etamax);
105 doeffPi(0,0.1,etamin,etamax);
106 kOverAll2Sigma=kFALSE;
108 gSystem->Unload("$ALICE_ROOT/PWGPP/pid/doeffPi_C.so");
112 gSystem->Load("libVMC.so");
113 gSystem->Load("libPhysics.so");
114 gSystem->Load("libTree.so");
115 gSystem->Load("libMinuit.so");
116 gSystem->Load("libSTEERBase.so");
117 gSystem->Load("libANALYSIS.so");
118 gSystem->Load("libAOD.so");
119 gSystem->Load("libESD.so");
120 gSystem->Load("libANALYSIS.so");
121 gSystem->Load("libANALYSISalice.so");
122 gSystem->Load("libCORRFW.so");
123 gSystem->Load("libNetx.so");
124 gSystem->Load("libPWGPPpid.so");
126 gSystem->AddIncludePath("-I$ALICE_ROOT/PWGPP/pid");
128 gROOT->LoadMacro("$ALICE_ROOT/PWGPP/pid/doeffPr.C++");
130 // tune these parameters
131 cmin = 1; // centrality min 1
132 cmax = 10;// centrality max 10
133 Float_t etamin = -0.8;
134 Float_t etamax = 0.8;
137 rebinsize = 1; // don't change this, not choice here!!!
140 kSigma2vs3TPC = kFALSE;
141 require5sigma = kFALSE;
142 bayesVsigma = kFALSE;
145 kOverAllTOFmatch = kFALSE;
146 kOverAll2Sigma = kFALSE;
151 if(! LoadLib()) return;
153 // matching and PID eff.
154 doeffPr(1,0.1,etamin,etamax);
155 doeffPr(0,0.1,etamin,etamax);
156 doeffPr(1,0.2,etamin,etamax);
157 doeffPr(1,0.4,etamin,etamax);
158 doeffPr(1,0.6,etamin,etamax);
159 doeffPr(1,0.8,etamin,etamax);
160 doeffPr(0,0.2,etamin,etamax);
161 doeffPr(0,0.4,etamin,etamax);
162 doeffPr(0,0.6,etamin,etamax);
163 doeffPr(0,0.8,etamin,etamax);
165 // Good matching eff (1 - TOF mism)
167 doeffPr(1,0.1,etamin,etamax);
168 doeffPr(0,0.1,etamin,etamax);
171 // eff 2 sigma / eff 3 sigma
173 doeffPr(1,0.1,etamin,etamax);
174 doeffPr(0,0.1,etamin,etamax);
177 // eff 2 sigma / eff 3 sigma TPC
179 doeffPr(1,0.1,etamin,etamax);
180 doeffPr(0,0.1,etamin,etamax);
181 kSigma2vs3TPC=kFALSE;
184 // TPC|TOF overall eff
185 doeffPr(1,0.2,etamin,etamax);
186 doeffPr(1,0.4,etamin,etamax);
187 doeffPr(1,0.6,etamin,etamax);
188 doeffPr(1,0.8,etamin,etamax);
189 doeffPr(0,0.2,etamin,etamax);
190 doeffPr(0,0.4,etamin,etamax);
191 doeffPr(0,0.6,etamin,etamax);
192 doeffPr(0,0.8,etamin,etamax);
194 kOverAllTOFmatch=kTRUE;
195 // TPC&TOF overall eff
196 doeffPr(1,0.2,etamin,etamax);
197 doeffPr(1,0.4,etamin,etamax);
198 doeffPr(1,0.6,etamin,etamax);
199 doeffPr(1,0.8,etamin,etamax);
200 doeffPr(0,0.2,etamin,etamax);
201 doeffPr(0,0.4,etamin,etamax);
202 doeffPr(0,0.6,etamin,etamax);
203 doeffPr(0,0.8,etamin,etamax);
204 kOverAllTOFmatch=kFALSE;
206 kOverAll2Sigma=kTRUE;
207 // TPC&TOF 2 TOF sigma cut
208 doeffPr(1,0.1,etamin,etamax);
209 doeffPr(0,0.1,etamin,etamax);
210 kOverAll2Sigma=kFALSE;
212 gSystem->Unload("$ALICE_ROOT/PWGPP/pid/doeffPr_C.so");
216 gSystem->Load("libVMC.so");
217 gSystem->Load("libPhysics.so");
218 gSystem->Load("libTree.so");
219 gSystem->Load("libMinuit.so");
220 gSystem->Load("libSTEERBase.so");
221 gSystem->Load("libANALYSIS.so");
222 gSystem->Load("libAOD.so");
223 gSystem->Load("libESD.so");
224 gSystem->Load("libANALYSIS.so");
225 gSystem->Load("libANALYSISalice.so");
226 gSystem->Load("libCORRFW.so");
227 gSystem->Load("libNetx.so");
228 gSystem->Load("libPWGPPpid.so");
230 gSystem->AddIncludePath("-I$ALICE_ROOT/PWGPP/pid");
232 gROOT->LoadMacro("$ALICE_ROOT/PWGPP/pid/doeffKa.C++");
234 // tune these parameters
235 cmin = 1; // centrality min 1
236 cmax = 10;// centrality max 10
237 Float_t etamin = -0.8;
238 Float_t etamax = 0.8;
241 rebinsize = 1; // don't change this, not choice here!!!
244 kSigma2vs3TPC = kFALSE;
245 require5sigma = kFALSE;
246 bayesVsigma = kFALSE;
249 kOverAllTOFmatch = kFALSE;
250 kOverAll2Sigma = kFALSE;
255 if(! LoadLib()) return;
257 // matching and PID eff.
258 doeffKa(1,0.1,etamin,etamax);
259 doeffKa(0,0.1,etamin,etamax);
260 doeffKa(1,0.2,etamin,etamax);
261 doeffKa(1,0.4,etamin,etamax);
262 doeffKa(1,0.6,etamin,etamax);
263 doeffKa(1,0.8,etamin,etamax);
264 doeffKa(0,0.2,etamin,etamax);
265 doeffKa(0,0.4,etamin,etamax);
266 doeffKa(0,0.6,etamin,etamax);
267 doeffKa(0,0.8,etamin,etamax);
269 // Good matching eff (1 - TOF mism)
271 doeffKa(1,0.1,etamin,etamax);
272 doeffKa(0,0.1,etamin,etamax);
275 // eff 2 sigma / eff 3 sigma
277 doeffKa(1,0.1,etamin,etamax);
278 doeffKa(0,0.1,etamin,etamax);
281 // eff 2 sigma / eff 3 sigma TPC
283 doeffKa(1,0.1,etamin,etamax);
284 doeffKa(0,0.1,etamin,etamax);
285 kSigma2vs3TPC=kFALSE;
288 // TPC|TOF overall eff
289 doeffKa(1,0.2,etamin,etamax);
290 doeffKa(1,0.4,etamin,etamax);
291 doeffKa(1,0.6,etamin,etamax);
292 doeffKa(1,0.8,etamin,etamax);
293 doeffKa(0,0.2,etamin,etamax);
294 doeffKa(0,0.4,etamin,etamax);
295 doeffKa(0,0.6,etamin,etamax);
296 doeffKa(0,0.8,etamin,etamax);
298 kOverAllTOFmatch=kTRUE;
299 // TPC&TOF overall eff
300 doeffKa(1,0.2,etamin,etamax);
301 doeffKa(1,0.4,etamin,etamax);
302 doeffKa(1,0.6,etamin,etamax);
303 doeffKa(1,0.8,etamin,etamax);
304 doeffKa(0,0.2,etamin,etamax);
305 doeffKa(0,0.4,etamin,etamax);
306 doeffKa(0,0.6,etamin,etamax);
307 doeffKa(0,0.8,etamin,etamax);
308 kOverAllTOFmatch=kFALSE;
310 kOverAll2Sigma=kTRUE;
311 // TPC&TOF 2 TOF sigma cut
312 doeffKa(1,0.1,etamin,etamax);
313 doeffKa(0,0.1,etamin,etamax);
314 kOverAll2Sigma=kFALSE;
316 gSystem->Unload("$ALICE_ROOT/PWGPP/pid/doeffKa_C.so");
319 TGraphErrors *MakeRatio(const char *nf1,const char *nf2,const char *nfo=""/*output file*/,const char *title=""/*title*/){
320 TFile *f1 = new TFile(nf1);
321 TFile *f2 = new TFile(nf2);
323 TGraphErrors *g1 = (TGraphErrors *) f1->Get("Graph");
324 TGraphErrors *g2 = (TGraphErrors *) f2->Get("Graph");
325 if(!(g1 && g2)) return NULL;
326 if(!(g1 && g2)) return NULL;
328 Int_t n1= g1->GetN();
329 Int_t n2= g2->GetN();
331 if(n1 != n2) return NULL;
333 if(n1 > 100) n1 = 100;
335 Float_t x[100],y[100],ex[100],ey[100];
337 for(Int_t i=0;i < n1;i++){
338 x[i] = g1->GetX()[i];
339 ex[i] = g1->GetEX()[i];
340 if(g1->GetY()[i] > 0 && g2->GetY()[i] > 0){
341 y[i] = g1->GetY()[i] / g2->GetY()[i];
342 ey[i] = (g1->GetEY()[i] / g1->GetY()[i])**2 + (g2->GetEY()[i] / g2->GetY()[i])**2;
343 ey[i] = sqrt(ey[i])*y[i];
350 TGraphErrors *gr = new TGraphErrors(n1,x,y,ex,ey);
353 if(nfo[0] != '\0'){ // write output
354 printf("written in %s\n",nfo);
355 TFile *fo = new TFile(nfo,"RECREATE");