FairRoot/PandaRoot
hist-t7.C
Go to the documentation of this file.
1 {
2  // ----- Load libraries ------------------------------------------------
3  gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C");
4  basiclibs();
5  gSystem->Load("libGeoBase");
6  gSystem->Load("libParBase");
7  gSystem->Load("libBase");
8  gSystem->Load("libPndData");
9  gSystem->Load("libField");
10  gSystem->Load("libGen");
11  gSystem->Load("libPassive");
12  gSystem->Load("libMvd");
13  // ----- Timer --------------------------------------------------------
14  TStopwatch timer;
15  timer.Start();
16  // ------------------------------------------------------------------------
17 
18  gStyle->SetHistFillColor(9);
19  gStyle->SetCanvasColor(0);
20  gStyle->SetLabelSize(0.025,"X");
21  gStyle->SetLabelSize(0.025,"Y");
22  gStyle->SetTitleSize(0.03,"Y");
23  gStyle->SetBarOffset(10);
24  gStyle->SetTitleOffset(1,"X");
25  gStyle->SetTitleOffset(1.55,"Y");
26  gStyle->SetTitleSize(0.03,"X");
27  gStyle->SetPalette(1,0);
28  gStyle->SetOptFit(1111);
29  //Creating canvas and diagramms
30  TCanvas* can1 = new TCanvas("test","Energy in MVD",200,200,1100,800);
31  TCanvas* can2 = new TCanvas("test2","Energy in MVD",200,200,1100,800);
32 
33  //TCanvas* can2 = new TCanvas("test1","Energy in MVD",200,200,1000,1000);
34 
35  TH2D * hist4 = new TH2D("EnergyLossVsP","dE(p) gemittelt ueber alle Hits pro Track",200,0.02,3,200,0,0.0005);
36  //hist4->SetFillColor(2);
37  TH2D * hist5 = new TH2D("EnergyLossVsP1","dE(p)",200,0.02,3,200,0,0.0005);
38  //hist5->SetFillColor(3);
39  TH2D * hist6 = new TH2D("EnergyLossVsP2","dE(p)",200,0.02,3,200,0,0.0005);
40  //hist6->SetFillColor(4);
41  TH2D * hist7 = new TH2D("specEnergyLossVsP1","dE/dx(p) gemittelt ueber alle Hits pro Track",200,0.02,1,200,0,0.0005);
42  //hist4->SetFillColor(2);
43  TH2D * hist8 = new TH2D("specEnergyLossVsP2","dE/dx(p)",200,0.02,1,200,0,0.0005);
44  //hist5->SetFillColor(3);
45  TH2D * hist9 = new TH2D("specEnergyLossVsP3","dE/dx(p)",200,0.02,1,200,0,0.0005);
46  //hist6->SetFillColor(4);
47  TH2D * hist10 = new TH2D("specEnergyLossVsP4","dE/dx(p)",200,0.0,1,200,0,0.0005);
48 
49  //Bethe Bloch fuer Kaonen
50  TF1 *bk = new TF1("bk","((x-0.05)*1000)/(sqrt(sq(439.71)+(sq((x-0.05)*1000))))",0,1);
51  TF1 *bk2 = new TF1("bk1","((x-0.08)*1000)/(sqrt(sq(439.71)+(sq((x-0.08)*1000))))",0,1);
52  TF1 *bk3 = new TF1("bk2","((x+0.0)*1000)/(sqrt(sq(439.71)+(sq((x+0.0)*1000))))",0,1);
53  TF1 *dEBBk = new TF1("dEBBk","((11*sq(14)*1.5)/(sq(bk)*10000000))*(log((2*1000000*0.511*sq(bk))/(13.5*14))-log(1-sq(bk))-sq(bk))",0,1);
54  dEBBk->SetFillColor(3);
55  TF1 *dEBBku = new TF1("dEBBku",".0008+((11*sq(14)*1.5)/(sq(bk1)*10000000))*(log((2*1000000*0.511*sq(bk1))/(13.5*14))-log(1-sq(bk1))-sq(bk1))",0,1);
56  dEBBk->SetFillColor(30);
57  TF1 *dEBBkl = new TF1("dEBBkl","-.00125+((11*sq(14)*1.5)/(sq(bk2)*10000000))*(log((2*1000000*0.511*sq(bk2))/(13.5*14))-log(1-sq(bk2))-sq(bk2))",0,1);
58  dEBBk->SetFillColor(30);
59 
60  //Bethe Bloch fuer Pionen
61  TF1 *bpi = new TF1("bpi","(x*1000)/(sqrt(sq(139.57)+(sq(x*1000))))",0,1);
62  TF1 *dEBBpi = new TF1("dEBBpi","((2.5*sq(14)*1.5)/(sq(bpi)*0.313*10000000))*(log((2*1000000*0.511*sq(bpi))/(13.5*14))-log(1-sq(bpi))-sq(bpi))",0,1);
63  TF1 *bpi = new TF1("bpiu","((x-0.05)*1000)/(sqrt(sq(139.57)+(sq((x-0.05)*1000))))",0,1);
64  TF1 *dEBBpiu = new TF1("dEBBpiu",".0012+((2.5*sq(14)*1.5)/(sq(bpiu)*0.313*10000000))*(log((2*1000000*0.511*sq(bpiu))/(13.5*14))-log(1-sq(bpiu))-sq(bpiu))",0.03,1);
65  TF1 *bpi = new TF1("bpil","((x)*1000)/(sqrt(sq(139.57)+(sq((x)*1000))))",0,1);
66  TF1 *dEBBpil = new TF1("dEBBpil","-.0005+((2.5*sq(14)*1.5)/(sq(bpil)*0.313*10000000))*(log((2*1000000*0.511*sq(bpil))/(13.5*14))-log(1-sq(bpil))-sq(bpil))",0,1);
67 
68  //Bethe Bloch fuer Protonen
69  TF1 *bp = new TF1("bp","((x-0.05)*1000)/(sqrt(sq(938.26)+(sq(0.05*1000))))",0,1);
70  TF1 *dEBBp = new TF1("dEBBp","((23*sq(14)*1.5)/(sq(bp)*2.133*10000000))*(log((2*1000000*0.511*sq(bp))/(13.5*14))-log(1-sq(bp))-sq(bp))",0,1);
71  TF1 *bp = new TF1("bpu","((x-0.1)*1000)/(sqrt(sq(938.26)+(sq((x-0.1)*1000))))",0,1);
72  TF1 *dEBBpu = new TF1("dEBBpu",".0005+((23*sq(14)*1.5)/(sq(bpu)*2.133*10000000))*(log((2*1000000*0.511*sq(bpu))/(13.5*14))-log(1-sq(bpu))-sq(bpu))",0.014,1);
73  TF1 *bp = new TF1("bpl","((x+0.0)*1000)/(sqrt(sq(938.26)+(sq((x+0.0)*1000))))",0,1);
74  TF1 *dEBBpl = new TF1("dEBBpl","-.0010+((22*sq(14)*1.5)/(sq(bpl)*2.133*10000000))*(log((2*1000000*0.511*sq(bpl))/(13.5*14))-log(1-sq(bpl))-sq(bpl))",0,3);
75 
76 
77  // Trick, um Maxima besser zu sehen: bei Null Impuls abschneiden
78  // TH2D * hist18 = new TH2D("specEnergyLoss","dE/dx(p)",200,0.05,3,200,0,0.01);
79 
80  TH1D* hist1 = new TH1D("specEnergyLoss","dE",100,0,0.0004);
81  hist1->SetFillColor(2);
82  TH1D* hist2 = new TH1D("specEnergyLoss","dE1",100,0,0.0004);
83  hist2->SetFillColor(3);
84  TH1D* hist3 = new TH1D("specEnergyLoss","dE2",100,0,0.00040);
85  hist3->SetFillColor(4);
86  //TF1 *fa = new TF1("p","x*TMath::C()/sqrt(sq(x)*sq(TMath::C()))",0,10);
87  //TF1 *fa = new TF1("p","x",0,10);
88  //TF1 *fa = new TF1("v","0.76706[0]*x*sin([1]*x)",-3,3);
89  //TF1 *fa = new TF1("fa","0.76706[0]*x*sin([1]*x)",-3,3);
90 
91 
92  //opening tree
93 // TFile* inFile = new TFile("../data/testMC.root","READ");
94  TFile* inFile = new TFile("/data_hilbert/PandaData/tbaldauf/MvdMC_PiKP2_50k.root","READ");
95  TTree* tree = (TTree *)inFile->Get("pndsim");
96  TClonesArray* pointlist=new TClonesArray("PndSdsMCPoint");
97  tree->SetBranchAddress("MVDPoint",&pointlist);
98  TClonesArray* mc_array=new TClonesArray("PndMCTrack");
99  tree->SetBranchAddress("MCTrack",&mc_array);
100 
101 
102  //variable
104  Int_t nEvents = 10000; //1000;
105  Int_t sEcur =0;
106  Int_t t0,t1,t2,t3,cnt;
107  Int_t a[25];
114 
115  //preparing canvas
116  TPad *p1=new TPad("1","1",0,0,0.7,1);
117  TPad *p2=new TPad("2","2",0.7,0,1,1);
118  can1->cd();
119  p1->Draw();
120  p2->Draw();
121 
122  p1->cd();
123  hist4->SetYTitle("dE/GeV");
124  hist4->SetXTitle("p/(GeV/c)");
125  hist7->SetYTitle("(dE/dx)/(GeV/cm)");
126  hist7->SetXTitle("p/(GeV/c)");
127  hist10->SetYTitle("(dE/dx)/(GeV/cm)");
128  hist10->SetXTitle("p/(GeV/c)");
129 
130  for(int w=0;w<25;w++)
131  {
132  a[w]=0;
133  }
134 
135  for(int j=0;j<nEvents && j<tree->GetEntriesFast();j++)
136  {
137  t0=0;t1=0;t2=0;dE0=0;dE1=0;dE2=0;dEX0=0;dEX1=0;dEX2=0;pF0=0;pF1=0;pF2=0;
138  //cout<<"Event"<<j<<endl;
139  tree->GetEntry(j);
140  for(int i=0;i<pointlist->GetEntriesFast();i++)
141  {
142  PndSdsMCPoint* point=(PndSdsMCPoint*)pointlist->At(i);//getting point
143  vecFront=(point->GetX(),point->GetY(),point->GetZ());
144  vecBack=(point->GetXOut(),point->GetYOut(),point->GetZOut());
145  vecPBack=(point->GetPxOut(),point->GetPyOut(),point->GetPzOut());
146  vecFront=(point->GetPxOut(),point->GetPyOut(),point->GetPzOut());
147  PndMCTrack* mct=(PndMCTrack*) mc_array->At(point->GetTrackID());
149  dx=(vecBack-vecFront).Mag();
150  cout<<"dx= "<<dx<<endl;
151  cout<<"P= "<<vecPBack.Mag()<<endl;
152  if(point->GetTrackID()==0)
153  {
154  cout<<pdcid<<endl;
155  t0++;
156  dE0=dE0+(point->GetEnergyLoss());
157  pF0=pF0+vecPFront.Mag();
158  if(dx!=0)
159  {
160  cout<<"0 "<<pdcid<<endl;
161  cout<<"Eloss "<<(point->GetEnergyLoss())<<endl;
162  hist7->Fill(vecPBack.Mag(),point->GetEnergyLoss()/dx);
163  dEX0=dEX0+((point->GetEnergyLoss())/dx);
164  }
165 
166  }
167  if(point->GetTrackID()==1)
168  {
169  t1++;
170  dE1=dE1+point->GetEnergyLoss();
171  pF1=pF1+vecPFront.Mag();
172  if(dx!=0)
173  {
174  cout<<"1 "<<pdcid<<endl;
175  cout<<"Eloss "<<(point->GetEnergyLoss())<<endl;
176  dEX1=dEX1+((point->GetEnergyLoss())/dx);
177  }
178  }
179  if(point->GetTrackID()==2)
180  {
181  cout<<pdcid<<endl;
182  t2++;
183  dE2=dE2+point->GetEnergyLoss();
184  pF2=pF2+vecPFront.Mag();
185  if(dx!=0)
186  {
187  dEX2=dEX2+((point->GetEnergyLoss())/dx);
188  }
189  }
190  if(point->GetTrackID()>5)
191  {
192  cout<<pdcid<<endl;
193  dE3=point->GetEnergyLoss();
194  pF3=vecPFront.Mag();
195  if(dx!=0)
196  {
197  dEX3=((point->GetEnergyLoss())/dx);
198  }
199  hist10->Fill(pF3,dEX3);
200  if(pF3<pnull)
201  {
202  a[21]++;
203  if((pF3>0.11)&&((dEX3)<(dEBBku->Eval(pF3,0,0)))&&((dEX3)>(dEBBkl->Eval(pF3,0,0)))) //K Schlauch
204  {
205  a[18]++;
206 
207  }
208  if((pF3>0.2)&&((dEX3)<(dEBBpu->Eval(pF3,0,0)))&&((dEX3>(dEBBpl->Eval(pF3,0,0))))) //P Schlauch
209  {
210  a[19]++;
211  hist10->Fill(pF3,dEX3);
212 
213  }
214  if((pF3>0.03)&&((dEX3)<(dEBBpiu->Eval(pF3,0,0)))&&((dEX3)>(dEBBpil->Eval(pF3,0,0)))) //PI Schlauch
215  {
216  a[20]++;
217  hist10->Fill(pF3,dEX3);
218  }
219  }
220  }
221  }
222 
223 
224 
225 
226 // //cout<<((1.0*j)/nEvents)<<endl;
227 // //cout<<t0<<endl;
228 // //cout<<dE0<<endl;
229 // if(t0>2) //Pionen
230 // {
231 // //hist1->Fill(dE0/t0);
232 // //hist4->Fill(pF0/t0,dE0/t0);
233 // //hist7->Fill(pF0/t0,dEX0/t0);
234 // if(pF0/t0<pnull)
235 // {
236 // a[15]++;
237 // if((pF0>0.11)&&((dEX0/t0)<(dEBBku->Eval(pF0/t0,0,0)))&&((dEX0/t0)>(dEBBkl->Eval(pF0/t0,0,0)))) //K Schlauch
238 // {
239 // if((pF0>0.03)&&((dEX0/t0)<(dEBBpiu->Eval(pF0/t0,0,0)))) //im Mischbereich
240 // {
241 // //a[6]++;
242 // }
243 // else //
244 // {
245 // a[2]++;
246 // }
247 // }
248 // if((pF0>0.03)&&((dEX0/t0)<(dEBBpiu->Eval(pF0/t0,0,0)))&&((dEX0/t0)>(dEBBpil->Eval(pF0/t0,0,0)))) //PI Schlauch
249 // {
250 //
251 // if(((dEX0/t0)>(dEBBkl->Eval(pF0/t0,0,0)))) //im Mischbereich
252 // {
253 // a[1]++;
254 // }
255 // else
256 // {
257 // a[0]++;
258 // }
259 // }
260 // if(pF0>0.2&&((dEX0/t0)<(dEBBpu->Eval(pF0/t0,0,0)))&&((dEX0/t0)>(dEBBpl->Eval(pF0/t0,0,0)))) //P Schlauch
261 // {
262 // a[3]++;
263 // }
264 // }
265 // }
266 // if(t1>2)
267 // {
268 // //hist2->Fill(dE1/t1);
269 // //hist5->Fill(pF1/t1,dE1/t1);
270 // //hist8->Fill(pF1/t1,dEX1/t1);
271 // if(pF1/t1<pnull)
272 // {
273 // a[16]++;
274 // if((pF1>0.11)&&((dEX1/t1)<(dEBBku->Eval(pF1/t1,0,0)))&&((dEX1/t1)>(dEBBkl->Eval(pF1/t1,0,0)))) //K Schlauch
275 // {
276 // if((pF1>0.03)&&((dEX1/t1)<(dEBBpiu->Eval(pF1/t1,0,0))))
277 // {
278 // a[6]++;
279 // }
280 // else
281 // {
282 // a[7]++;
283 // }
284 // }
285 // if((pF1>0.03)&&((dEX1/t1)<(dEBBpiu->Eval(pF1/t1,0,0)))&&((dEX1/t1)>(dEBBpil->Eval(pF1/t1,0,0)))) //PI Schlauch
286 // {
287 //
288 // if(((dEX1/t1)>(dEBBkl->Eval(pF1/t1,0,0))))
289 // {
290 // //a[1]++;
291 // }
292 // else
293 // {
294 // a[5]++;
295 // }
296 // }
297 // if(pF1>0.2&&((dEX1/t1)<(dEBBpu->Eval(pF1/t1,0,0)))&&((dEX1/t1)>(dEBBpl->Eval(pF1/t1,0,0)))) //P Schlauch
298 // {
299 // a[8]++;
300 // }
301 // }
302 // }
303 // if(t2>2)
304 // {
305 // //hist3->Fill(dE2/t2);
306 // //hist6->Fill(pF2/t2,dE2/t2);
307 // //hist9->Fill(pF2/t2,dEX2/t2);
308 // if(pF2/t2<pnull)
309 // {
310 // a[17]++;
311 // if((pF2>0.11)&&((dEX2/t2)<(dEBBku->Eval(pF2/t2,0,0)))&&((dEX2/t2)>(dEBBkl->Eval(pF2/t2,0,0)))) //K Schlauch
312 // {
313 // a[12]++;
314 // }
315 // if(pF2>0.2&&((dEX2/t2)<(dEBBpu->Eval(pF2/t2,0,0)))&&((dEX2/t2)>(dEBBpl->Eval(pF2/t2,0,0)))) //P Schaluch
316 // {
317 // a[13]++;
318 // }
319 // if((pF2>0.03)&&((dEX2/t2)<(dEBBpiu->Eval(pF2/t2,0,0)))&&((dEX2/t2)>(dEBBpil->Eval(pF2/t2,0,0)))) //PI Schlauch
320 // {
321 // a[10]++;
322 // }
323 // }
324 // }
325 // if(t3!=0)
326 // {
327 //
328 // }
329 // }
330 
331 
332 //gPad->SetLogz();
333 hist7->Add(hist8);
334 hist7->Add(hist9);
335 hist7->Add(hist10);
336 hist7->Draw("col");
337 //dEBBk->Draw("same C");
338 //dEBBku->Draw("same C");
339 //dE0BBkl->Draw("same C");
340 //dEBBp->Draw("same C");
341 //dEBBpu->Draw("same C");
342 //dEBBpl->Draw("same C");
343 //dEBBpi->Draw("same C");
344 //dEBBpiu->Draw("same C");
345 //dEBBpil->Draw("same C");
346 
347 can2->cd();
348 //gPad->SetLogz();
349 //hist7->Add(hist8);
350 //hist7->Add(hist9);
351 //hist7->Add(hist10);
352 hist7->Add(hist8);
353 hist7->Add(hist9);
354 //hist7->Add(hist10);
355 hist7->Draw("col");
356 //dEBBk->Draw("same C");
357 //dEBBku->Draw("same C");
358 //dEBBkl->Draw("same C");
359 //dEBBp->Draw("same C");
360 //dEBBpu->Draw("same C");
361 //dEBBpl->Draw("same C");
362 //dEBBpi->Draw("same C");
363 dEBBpiu->Draw("same C");
364 dEBBpil->Draw("same C");
365 
366 
367 /*
368 ltext+="";
369 
370 ltext+="Gesamtzahl Protonen: ";
371 ltext+=a[0];
372 ltext+="";
373 ltext+="davon als Protonen bestimmt "
374 cout<<"Erfolgsrate "<<(a[1]*100.0)/a[0]<<" %"<<endl;
375 cout<<"Gesamtzahl Kaonen "<<a[4]<<endl;
376 cout<<"davon als Kaonen bestimmt "<<a[5]<<endl;
377 cout<<"Erfolgsrate "<<(a[5]*100.0)/a[4]<<" %"<<endl;
378 cout<<"Gesamtzahl Pionen "<<a[8]<<endl;
379 cout<<"davon als Pionen bestimmt "<<a[9]<<endl;
380 cout<<"Erfolgsrate "<<(a[9]*100.0)/a[8]<<" %"<<endl;
381 cout<<"Gesamtzahl andere Teilchen "<<a[6]+a[10]+a[2]<<endl;
382 cout<<"davon als Protonen bestimmt "<<a[2]<<endl;
383 cout<<"davon als Kaonen bestimmt "<<a[6]<<endl;
384 cout<<"davon als Pionen bestimmt "<<a[10]<<endl;
385 */
386 /*
387 p2->cd();
388 TLatex *lat=new TLatex();
389  lat->SetTextAlign(1);
390  lat->SetTextSize(0.04);
391 TLatex *lat=new TLatex();
392  lat->SetTextAlign(1);
393  lat->SetTextSize(0.08);
394 ltext="Auswertung";
395 lat->DrawLatex(0.1,0.95,ltext);
396 pos=0.9;
397 abst=0.02;
398 lat->SetTextSize(0.045);
399 ltext="p_{max}=";
400 ltext+=pnull;
401 lat->DrawLatex(0.1,pos,ltext);
402 pos-=abst;
403 ltext="mit Untergrund, mit Track";
404 lat->DrawLatex(0.1,pos,ltext);
405 pos=0.85;
406 ltext="Gesamtzahl Protonen: ";
407 ltext+=a[17];
408 lat->DrawLatex(0.1,pos,ltext);
409 pos-=abst;
410 ltext="davon als Protonen bestimmt: ";
411 ltext+=a[13];
412 lat->DrawLatex(0.1,pos,ltext);
413 pos-=abst;
414 ltext="Erfolgsrate: ";
415 ltext+=(a[13]*100.0)/a[17];
416 lat->DrawLatex(0.1,pos,ltext);
417 pos-=abst;
418 ltext="Gesamtzahl Kaonen: ";
419 ltext+=a[16];
420 lat->DrawLatex(0.1,pos,ltext);
421 pos-=abst;
422 ltext="davon als Kaonen bestimmt: ";
423 ltext+=a[7]+a[6]/2;
424 lat->DrawLatex(0.1,pos,ltext);
425 pos-=abst;
426 ltext="Erfolgsrate: ";
427 ltext+=((a[7]+a[6]/2)*100.0)/a[16];
428 lat->DrawLatex(0.1,pos,ltext);
429 pos-=abst;
430 ltext="Gesamtzahl Pionen: ";
431 ltext+=a[15];
432 lat->DrawLatex(0.1,pos,ltext);
433 pos-=abst;
434 ltext="davon als Pionen bestimmt: ";
435 ltext+=a[0]+a[1]/2;
436 lat->DrawLatex(0.1,pos,ltext);
437 pos-=abst;
438 ltext="Erfolgsrate: ";
439 ltext+=((a[0]+a[1]/2)*100.0)/a[15];
440 lat->DrawLatex(0.1,pos,ltext);
441 pos-=abst;
442 ltext="Gesamtzahl sekundaerer Teilchen: ";
443 ltext+=a[21];
444 lat->DrawLatex(0.1,pos,ltext);
445 pos-=abst;
446 ltext="davon als Protonen bestimmt: ";
447 ltext+=a[19];
448 lat->DrawLatex(0.1,pos,ltext);
449 pos-=abst;
450 ltext="davon als Kaon bestimmt: ";
451 ltext+=a[18];
452 lat->DrawLatex(0.1,pos,ltext);
453 pos-=abst;
454 ltext="davon als Pion bestimmt: ";
455 ltext+=a[20];
456 lat->DrawLatex(0.1,pos,ltext);
457 pos-=abst;
458 ltext="Schnittmenge ";
459 ltext+=a[1]+a[6];
460 lat->DrawLatex(0.1,pos,ltext);
461 pos-=abst;
462 ltext="Falsche Protonen ";
463 ltext+=a[3]+a[8]+a[19];
464 lat->DrawLatex(0.1,pos,ltext);
465 pos-=abst;
466 ltext="Falsche Kaonen ";
467 ltext+=a[2]+a[12]+a[18];
468 lat->DrawLatex(0.1,pos,ltext);
469 pos-=abst;
470 ltext="Falsche Pionen ";
471 ltext+=a[5]+a[10]+a[20];
472 lat->DrawLatex(0.1,pos,ltext);
473 pos-=abst;
474 ltext="Falsch bestimmte Teilchen ";
475 ltext+=(a[3]+a[8]+a[19]+a[2]+a[12]+a[18]+a[5]+a[10]+a[20]);
476 lat->DrawLatex(0.1,pos,ltext);
477 pos-=abst;
478 ltext="Falsch als Proton bestimmte Teilchen ";
479 ltext+=(a[3]+a[8])*100.0/(a[15]+a[16]);
480 lat->DrawLatex(0.1,pos,ltext);
481 pos-=abst;
482 ltext="Falsch als Kaon bestimmte Teilchen ";
483 ltext+=(a[2]+a[12])*100.0/(a[15]+a[17]);
484 lat->DrawLatex(0.1,pos,ltext);
485 pos-=abst;
486 ltext="Falsch als Pion bestimmte Teilchen ";
487 ltext+=(a[5]+a[10])*100.0/(a[16]+a[17]);
488 lat->DrawLatex(0.1,pos,ltext);
489 pos-=abst;
490 ltext="Falsch bestimmte Teilchen ";
491 ltext+=(a[3]+a[8]+a[19]+a[2]+a[12]+a[18]+a[5]+a[10]+a[20])*100.0/(a[15]+a[16]+a[17]+a[21]);
492 lat->DrawLatex(0.1,pos,ltext);
493 pos-=abst;
494 ltext="Falsch als Proton bestimmte Teilchen ";
495 ltext+=(a[3]+a[8]+a[19])*100.0/(a[15]+a[16]+a[21]);
496 lat->DrawLatex(0.1,pos,ltext);
497 pos-=abst;
498 ltext="Falsch als Kaon bestimmte Teilchen ";
499 ltext+=(a[2]+a[12]+a[18])*100.0/(a[15]+a[17]+a[21]);
500 lat->DrawLatex(0.1,pos,ltext);
501 pos-=abst;
502 ltext="Falsch als Pion bestimmte Teilchen ";
503 ltext+=(a[5]+a[10]+a[20])*100.0/(a[16]+a[17]+a[21]);
504 lat->DrawLatex(0.1,pos,ltext);
505 
506 
507 
508 can1->cd(2);
509 gPad->SetLogz();
510 hist4->Add(hist5);
511 hist4->Add(hist6);
512 hist4->Draw("col");
513 
514 
515 cout<<"Gesamtzahl Protonen "<<a[0]<<endl;
516 cout<<"davon als Protonen bestimmt "<<a[1]<<endl;
517 //cout<<"Erfolgsrate "<<(a[1]*100.0)/a[0]<<" %"<<endl;
518 cout<<"Gesamtzahl Kaonen "<<a[4]<<endl;
519 cout<<"davon als Kaonen bestimmt "<<a[5]<<endl;
520 //cout<<"Erfolgsrate "<<(a[5]*100.0)/a[4]<<" %"<<endl;
521 cout<<"Gesamtzahl Pionen "<<a[8]<<endl;
522 cout<<"davon als Pionen bestimmt "<<a[9]<<endl;
523 //cout<<"Erfolgsrate "<<(a[9]*100.0)/a[8]<<" %"<<endl;
524 cout<<"Gesamtzahl andere Teilchen "<<a[6]+a[10]+a[2]<<endl;
525 cout<<"davon als Protonen bestimmt "<<a[19]<<endl;
526 cout<<"davon als Kaonen bestimmt "<<a[]<<endl;
527 cout<<"davon als Pionen bestimmt "<<a[10]<<endl;
528 //cout<<"Fehlerrate "<<((a[7])*100.0)/a[6]<<" %"<<endl;
529 */
530 
531 
532 
533 
534  // ----- Finish -------------------------------------------------------
535  timer.Stop();
536  Double_t rtime = timer.RealTime();
537  Double_t ctime = timer.CpuTime();
538  cout << endl << endl;
539  cout << "Macro finished succesfully." << endl;
540  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
541  cout << endl;
542  // ------------------------------------------------------------------------
543 }
TClonesArray * pointlist
Definition: anaMvdPid.C:19
TVector3 pos
Double_t dEX0
Definition: hist-t7.C:108
TF1 * bk2
Definition: hist-t7.C:51
Double_t GetXOut() const
Definition: PndSdsMCPoint.h:81
TH2D * hist7
Definition: hist-t7.C:41
Int_t sEcur
Definition: hist-t7.C:105
Double_t dE0
Definition: hist-t7.C:108
Int_t t2
Definition: hist-t7.C:106
basiclibs()
Int_t i
Definition: run_full.C:25
Double_t GetPyOut() const
Definition: PndSdsMCPoint.h:86
TF1 * dEBBkl
Definition: hist-t7.C:57
TH2D * hist5
Definition: hist-t7.C:37
TF1 * dEBBku
Definition: hist-t7.C:55
TTree * tree
Definition: plot_dirc.C:12
TVector3 vecPBack
Definition: hist-t7.C:103
Double_t GetZOut() const
Definition: PndSdsMCPoint.h:83
Int_t GetPdgCode() const
Definition: PndMCTrack.h:73
Double_t pnull
Definition: hist-t7.C:110
Double_t dEX3
Definition: hist-t7.C:108
TString ltext
Definition: hist-t7.C:112
TH2D * hist8
Definition: hist-t7.C:43
Double_t dEX2
Definition: hist-t7.C:108
Double_t GetPxOut() const
Definition: PndSdsMCPoint.h:85
TClonesArray * mc_array
Definition: anaLmdCluster.C:25
TF1 * bk
Definition: hist-t7.C:50
Double_t dE3
Definition: hist-t7.C:108
Double_t dEX1
Definition: hist-t7.C:108
TH1D * hist3
Definition: hist-t7.C:84
Double_t pF2
Definition: hist-t7.C:108
Int_t t1
Definition: hist-t7.C:106
TH2D * hist4
Definition: hist-t7.C:35
Double_t pF0
Definition: hist-t7.C:108
Double_t dE2
Definition: hist-t7.C:108
TString inFile
Definition: hit_dirc.C:8
Double_t GetPzOut() const
Definition: PndSdsMCPoint.h:87
Int_t a
Definition: anaLmdDigi.C:126
TF1 * bpi
Definition: hist-t7.C:61
Int_t t0
Definition: hist-t7.C:106
TH2D * hist9
Definition: hist-t7.C:45
TVector3 vecFront
Definition: anasim.C:57
Double_t
Int_t nEvents
Definition: hit_dirc.C:11
TStopwatch timer
Definition: hit_dirc.C:51
TH1D * hist2
Definition: hist-t7.C:82
TH2D * hist6
Definition: hist-t7.C:39
Double_t abst
Definition: hist-t7.C:113
Int_t t3
Definition: hist-t7.C:106
TF1 * bk3
Definition: hist-t7.C:52
Double_t ctime
Definition: hit_dirc.C:114
TPad * p2
Definition: hist-t7.C:117
TF1 * dEBBpil
Definition: hist-t7.C:66
double dx
TF1 * dEBBpi
Definition: hist-t7.C:62
TVector3 vecPFront
Definition: hist-t7.C:103
TCanvas * can2
Double_t dE1
Definition: hist-t7.C:108
Double_t GetYOut() const
Definition: PndSdsMCPoint.h:82
TF1 * dEBBpiu
Definition: hist-t7.C:64
Double_t pkt[2]
Definition: hist-t7.C:111
Int_t cnt
Definition: hist-t7.C:106
Double_t pF1
Definition: hist-t7.C:108
TPad * p1
Definition: hist-t7.C:116
Double_t pF3
Definition: hist-t7.C:108
TCanvas * can1
TF1 * bp
Definition: hist-t7.C:69
Double_t rtime
Definition: hit_dirc.C:113
pdcid
Definition: hist-t7.C:148
TF1 * dEBBp
Definition: hist-t7.C:70
TH2D * hist10
Definition: hist-t7.C:47
TF1 * dEBBk
Definition: hist-t7.C:53
TF1 * dEBBpl
Definition: hist-t7.C:74
PndMCTrack * mct
Definition: hist-t7.C:147
PndSdsMCPoint * point
Definition: anaLmdCluster.C:72
TF1 * dEBBpu
Definition: hist-t7.C:72
TVector3 vecBack
Definition: anasim.C:57
TH1D * hist1
Definition: hist-t7.C:80