1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 //_________________________________________________________________________
17 // TTask class for TOF PID.
18 // Use case: start root and execute the following macro
21 // Dynamically link some shared libs
22 if (gClassTable->GetID("AliRun") < 0) {
23 gROOT->LoadMacro("loadlibs.C");
26 // create an instance of the AliTOFPID class
27 // You have to pass the ntuple and cuts filenames
28 AliTOFPID* tofpid=new AliTOFPID("ntuple.root","cuts.root");
30 // option "pp" for pp events (it includes also electron in the analysis)
31 // option "visual" to shows interactively histos
32 // option "asC" or "asEPS" to save canvas in the current dir in .C or .eps format
34 // make a choice: uncomment one of these lines
35 // tofpid->Exec("pp","visual","asC");
36 // tofpid->Exec("pp","novisual","asC");
37 // tofpid->Exec("Pb-Pb","visual","asC");
38 // tofpid->Exec("pp","visual","asC");
39 // tofpid->Exec("pp","novisual","asEPS");
50 //-- Authors: B. Zagreev , F. Pierella
51 //////////////////////////////////////////////////////////////////////////////
62 #include "TPaveLabel.h"
63 #include "TPaveText.h"
76 #include "AliTOFConstants.h"
77 #include "AliTOFPID.h"
80 #include <Riostream.h>
81 #include <Riostream.h>
85 //____________________________________________________________________________
86 AliTOFPID::AliTOFPID():TTask("AliTOFPID","")
88 // default ctor - set the pointer member vars to zero
100 //____________________________________________________________________________
101 AliTOFPID::AliTOFPID(char* headerFile, char *cutsFile, const Option_t* opt):TTask("AliTOFPID","")
107 fhfile = TFile::Open(headerFile); // connect file with ntuple
108 fcut = TFile::Open(cutsFile); // connect file for cuts
109 foutfileName=headerFile;
114 // add Task to //root/Tasks folder
115 TTask * roottasks = (TTask*)gROOT->GetRootFolder()->FindObject("Tasks") ;
116 roottasks->Add(this) ;
118 //____________________________________________________________________________
119 void AliTOFPID::Init(const Option_t* opt)
121 if(strstr(opt,"pp")){
122 if(fcut->GetKey("electron")) felectron = (TCutG*)fcut->Get("electron");
124 if(fcut->GetKey("pion")) fpion = (TCutG*)fcut->Get("pion");
127 if(fcut->GetKey("kaon")) fkaon = (TCutG*)fcut->Get("kaon");
129 if(fcut->GetKey("proton")) fproton = (TCutG*)fcut->Get("proton");
132 fNtuple= (TNtuple*)fhfile->Get("Ntuple"); // get ntuple from file
133 Int_t nvar = fNtuple->GetNvar(); cout <<"N of var.="<< nvar << endl;
134 fNtuple->GetEvent(0);
138 //____________________________________________________________________________
139 AliTOFPID::~AliTOFPID()
142 // dtor (free used memory)
203 //____________________________________________________________________________
204 void AliTOFPID::Exec(const Option_t *eventType, const Option_t *outputmode, const Option_t *outputsavemode)
207 // Performs PID for TOF detector
212 ////////// Create histograms /////////////////
213 // for electron only in pp case
221 if(strstr(eventType,"pp")){
222 eleff = new TH1F("eleff","",10,0,0.6);
223 xaxis=eleff->GetYaxis();
224 xaxis->SetLabelSize(.08);
225 eleffls = new TH1F("eleffls","",10,0,0.6);
226 xaxis=eleffls->GetYaxis();
227 xaxis->SetLabelSize(.08);
228 elcon = new TH1F("elcon","",10,0,0.6);
229 xaxis=elcon->GetXaxis();
230 xaxis->SetLabelSize(.09);
231 xaxis=elcon->GetYaxis();
232 xaxis->SetLabelSize(.08);
233 elid = new TH1F("elid","Identified electrons",10,0,0.6);
234 elmatch = new TH1F("elmatch","N(e)",10,0,0.6);
235 elall = new TH1F("elall","Electrons",10,0,0.6);
239 TH1F *pit = new TH1F("pit","",15,0,2.5); //part. with tracks
240 TH1F *pig = new TH1F("pig","",15,0,2.5); //part. in geometry acceptance
241 TH1F *pieff = new TH1F("pieff","",15,0,2.5); //efficiency
242 TH1F *pieffls = new TH1F("pieffls","",15,0,2.5); //efficiency (last step)
243 xaxis=pieff->GetYaxis();
244 xaxis->SetLabelSize(.08);
245 xaxis=pieffls->GetYaxis();
246 xaxis->SetLabelSize(.08);
247 TH1F *picon = new TH1F("picon","",15,0,2.5); //contamination
248 xaxis=picon->GetXaxis();
249 xaxis->SetLabelSize(.09);
250 xaxis=picon->GetYaxis();
251 xaxis->SetLabelSize(.08);
252 TH1F *piid = new TH1F("piid","Identified pions",15,0,2.5);
253 TH1F *piall = new TH1F("piall","Pions",15,0,2.5);
254 TH1F *pimatch = new TH1F("pimatch","N(Pions)",15,0,2.5);
255 TH1F *pigen = new TH1F("pigen","Pions",15,0,2.5);
256 xaxis=pigen->GetXaxis();
257 xaxis->SetLabelSize(.09);
258 pigen->SetXTitle("P?t! (GeV/c)");
259 xaxis->SetTitleSize(.09);
260 xaxis=pigen->GetYaxis();
261 xaxis->SetLabelSize(.08);
262 //pigen->SetYTitle("1/P?t!dN/dP?t! (GeV/c)^-2!");
263 xaxis->SetTitleSize(.09);
266 TH1F *kat = new TH1F("kat","",15,0,2.5);
267 TH1F *kag = new TH1F("kag","",15,0,2.5);
268 TH1F *kaeff = new TH1F("kaeff","",15,0,2.5);
269 xaxis=kaeff->GetYaxis();
270 xaxis->SetLabelSize(.08);
271 TH1F *kaeffls = new TH1F("kaeffls","",15,0,2.5);
272 xaxis=kaeffls->GetYaxis();
273 xaxis->SetLabelSize(.08);
274 TH1F *kacon = new TH1F("kacon","",15,0,2.5);
275 xaxis=kacon->GetXaxis();
276 xaxis->SetLabelSize(.09);
277 xaxis=kacon->GetYaxis();
278 xaxis->SetLabelSize(.08);
279 TH1F *kaid = new TH1F("kaid","Identified kaons",15,0,2.5);
280 TH1F *kamatch = new TH1F("kamatch","N(K)",15,0,2.5);
281 TH1F *kaall = new TH1F("kaall","Kaons",15,0,2.5);
282 TH1F *kagen = new TH1F("kagen","Kaons",15,0,2.5);
283 xaxis=kagen->GetXaxis();
284 xaxis->SetLabelSize(.09);
285 kagen->SetXTitle("P?t! (GeV/c)");
286 xaxis->SetTitleSize(.09);
287 xaxis=kagen->GetYaxis();
288 xaxis->SetLabelSize(.08);
289 //kagen->SetYTitle("1/P?t!dN/dP?t! (GeV/c)^-2!");
290 xaxis->SetTitleSize(.09);
293 TH1F *prt = new TH1F("prt","",15,0,4.4);
294 TH1F *prg = new TH1F("prg","",15,0,4.4);
295 TH1F *preff = new TH1F("preff","",15,0,4.4);
296 xaxis=preff->GetYaxis();
297 xaxis->SetLabelSize(.08);
298 TH1F *preffls = new TH1F("preffls","",15,0,4.4);
299 xaxis=preffls->GetYaxis();
300 xaxis->SetLabelSize(.08);
301 TH1F *prcon = new TH1F("prcon","",15,0,4.4);
302 xaxis=prcon->GetXaxis();
303 xaxis->SetLabelSize(.09);
304 xaxis=prcon->GetYaxis();
305 xaxis->SetLabelSize(.08);
306 TH1F *prid = new TH1F("prid","Identified protons",15,0,4.4);
307 TH1F *prmatch = new TH1F("prmatch","N(p)",15,0,4.4);
308 TH1F *prall = new TH1F("prall","Protons",15,0,4.4);
309 TH1F *prgen = new TH1F("prgen","Protons",15,0,4.4);
310 xaxis=prgen->GetXaxis();
311 xaxis->SetLabelSize(.09);
312 prgen->SetXTitle("P?t! (GeV/c)");
313 xaxis->SetTitleSize(.09);
314 xaxis=prgen->GetYaxis();
315 xaxis->SetLabelSize(.08);
316 //prgen->SetYTitle("1/P?t!dN/dP?t! (GeV/c)^-2!");
317 xaxis->SetTitleSize(.09);
319 // 2-D histos (extrapolated mass vs momentum)
321 if(strstr(eventType,"pp")){
322 hel = new TH2F("hel","",1000,-.2,1.2,1000,-4.2,0.);
323 hel->SetXTitle("Mass (GeV/c^{2})");
324 hel->SetYTitle("Momentum (GeV/c)");
326 TH2F *hpi = new TH2F("hpi","",1000,-.2,1.2,1000,-4.2,0.);
327 hpi->SetXTitle("Mass (GeV/c^{2})");
328 hpi->SetYTitle("Momentum (GeV/c)");
329 TH2F *hka = new TH2F("hka","",1000,-.2,1.2,1000,-4.2,0.);
330 hka->SetXTitle("Mass (GeV/c^{2})");
331 hka->SetYTitle("Momentum (GeV/c)");
332 TH2F *hpr = new TH2F("hpr","",1000,-.2,1.2,1000,-4.2,0.);
333 hpr->SetXTitle("Mass (GeV/c^{2})");
334 hpr->SetYTitle("Momentum (GeV/c)");
338 Int_t nparticles = (Int_t)fNtuple->GetEntries();
339 cout << " Number of nparticles =" << nparticles << endl;
340 if (nparticles <= 0) return;
342 Float_t ka=0, pi=0, pr=0, kaal=0, pial=0, pral=0;
343 Float_t pitrack=0, pimag=0, pigeom=0;
344 Float_t katrack=0, kamag=0, kageom=0;
345 Float_t prtrack=0, prmag=0, prgeom=0;
346 Float_t pif=0, kaf=0, prf=0, pin=0, kan=0, prn=0;
347 Float_t px, py, pz, x, y, z, mass;
348 Int_t event, matc, imam, pdgcode;
349 Int_t indexOfFile=0, numfile=0;
350 //////// Loop over tracks (particles)///////////////////////
352 for (Int_t i=0; i < nparticles; i++) {
353 fNtuple->GetEvent(i);
354 event=(Int_t)(fNtuple->GetLeaf("event")->GetValue());
355 pdgcode=(Int_t)(fNtuple->GetLeaf("ipart")->GetValue());
356 mass=fNtuple->GetLeaf("mext")->GetValue(0);
357 matc=(Int_t)(fNtuple->GetLeaf("matc")->GetValue(0));
358 imam=(Int_t)(fNtuple->GetLeaf("imam")->GetValue(0));
359 px=fNtuple->GetLeaf("pxvtx")->GetValue(0);
360 py=fNtuple->GetLeaf("pyvtx")->GetValue(0);
361 pz=fNtuple->GetLeaf("pzvtx")->GetValue(0);
362 x=fNtuple->GetLeaf("xvtx")->GetValue(0);
363 y=fNtuple->GetLeaf("yvtx")->GetValue(0);
364 z=fNtuple->GetLeaf("zvtx")->GetValue(0);
365 Float_t pvtx=TMath::Sqrt(px*px+py*py+pz*pz);
366 Float_t ptvtx=TMath::Sqrt(px*px+py*py);
368 Bool_t isSelected=(imam == 0 && pz !=0 && TMath::ATan(TMath::Abs(ptvtx/pz))>TMath::Pi()*45./180.);
369 Int_t abspdgcode=TMath::Abs(pdgcode);
372 if(isSelected && (matc==3 || matc==4)) kamatch->Fill(pvtx);
373 mt=TMath::Sqrt(AliTOFConstants::fgkKaonMass*AliTOFConstants::fgkKaonMass+px*px+py*py);
376 if(isSelected && (matc==2 || matc==3 || matc==4)) prmatch->Fill(pvtx);
377 mt=TMath::Sqrt(AliTOFConstants::fgkProtonMass*AliTOFConstants::fgkProtonMass+px*px+py*py);
380 if(strstr(eventType,"pp") && (matc==3 || matc==4)) elmatch->Fill(pvtx); // as in kaon case
381 mt=TMath::Sqrt(AliTOFConstants::fgkElectronMass*AliTOFConstants::fgkElectronMass+px*px+py*py);
384 if(isSelected && matc>0) pimatch->Fill(pvtx);
385 mt=TMath::Sqrt(AliTOFConstants::fgkPionMass*AliTOFConstants::fgkPionMass+px*px+py*py);
390 {//only primary +/-45
391 if (fkaon->IsInside(mass,-pvtx) && matc>2) {
393 if (fTask!=2) kaid->Fill(pvtx); else {kaid->Fill(ptvtx);}
394 if (TMath::Abs(pdgcode)==321) {kaf++; kaeff->Fill(pvtx); kaeffls->Fill(pvtx);} else {kan++; kacon->Fill(pvtx);}
395 } else if (fproton->IsInside(mass,-pvtx) && matc>1) {
397 if (fTask!=2) prid->Fill(pvtx); else
399 if (TMath::Abs(pdgcode)==2212) {prf++; preff->Fill(pvtx); preffls->Fill(pvtx);} else {prn++; prcon->Fill(pvtx);}
400 } else if (strstr(eventType,"pp") && felectron->IsInside(mass,-pvtx) && matc>2) {elid->Fill(pvtx);
401 if (strstr(eventType,"pp") && TMath::Abs(pdgcode)==11) {eleff->Fill(pvtx); eleffls->Fill(pvtx);} else {elcon->Fill(pvtx);}
403 //||matc==-4&&fpion->IsInside(mass,-pvtx)
405 if (fTask!=2) piid->Fill(pvtx); else {piid->Fill(ptvtx);}
406 if (TMath::Abs(pdgcode)==211) {pif++; pieff->Fill(pvtx); pieffls->Fill(pvtx);} else {pin++; picon->Fill(pvtx);}
409 //////////////// Normalization histograms ////////////////////
410 if (strstr(eventType,"pp") && TMath::Abs(pdgcode)==11) {
411 if (fTask!=2) elall->Fill(pvtx); else elall->Fill(ptvtx);
412 if (fTask==1) hel->Fill(mass,-pvtx);
414 } else if (TMath::Abs(pdgcode)==211) {
421 if (matc>-2 || matc==-4) {
427 if (fTask!=2) piall->Fill(pvtx);
429 piall->Fill(ptvtx,1/ptvtx);
431 if (fTask==1) hpi->Fill(mass,-pvtx);
433 } else if (TMath::Abs(pdgcode)==321) {
440 if (matc>-2 || matc==-4) {
446 if (fTask!=2) kaall->Fill(pvtx);
448 kaall->Fill(ptvtx,1/ptvtx);
450 if (fTask==1) hka->Fill(mass,-pvtx);
452 } else if (TMath::Abs(pdgcode)==2212) {
459 if (matc>-2 || matc==-4) {
465 if (fTask!=2) prall->Fill(pvtx);
467 prall->Fill(ptvtx,1/ptvtx);
469 if (fTask==1) hpr->Fill(mass,-pvtx);}
471 }// End of cuts appling
472 }// End of loop over particles
475 cout<< "Pions in 45-135 deg. "<< pial <<" (100%)"<< endl;
476 cout<< "Pions that have track "<< pitrack/pial*100 <<" %"<<endl;
477 cout<< "Magnetic field "<< pimag/pial*100 <<" %"<<endl;
478 cout<< "Geometry efficiency "<< pigeom/pial*100 <<" %"<<endl;
479 cout<< "PID procedure "<< pif/pial*100 <<" %"<<endl;
480 cout<< "Contamination "<< pin/pi*100 <<" %"<<endl;
482 cout<< "Kaons in 45-135 deg. "<< kaal <<" (100%)"<< endl;
483 cout<< "Kaons that have track "<< katrack/kaal*100 <<" %"<<endl;
484 cout<< "Magnetic field "<< kamag/kaal*100 <<" %"<<endl;
485 cout<< "Geometry efficiency "<< kageom/kaal*100 <<" %"<<endl;
486 cout<< "PID procedure(+decays) "<< kaf/kaal*100 <<" %"<<endl;
487 cout<< "Contamination "<< kan/ka*100 <<" %"<<endl;
489 cout<< "Protons in 45-135 deg. "<< pral <<" (100%)"<< endl;
490 cout<< "Protons that have track "<< prtrack/pral*100 <<" %"<<endl;
491 cout<< "Magnetic field "<< prmag/pral*100 <<" %"<<endl;
492 cout<< "Geometry efficiency "<< prgeom/pral*100 <<" %"<<endl;
493 cout<< "PID procedure "<< prf/pral*100 <<" %"<<endl;
494 cout<< "Contamination "<< prn/pr*100 <<" %"<<endl;
496 cout<< "All part. in 45-135 deg. "<< pial+kaal+pral <<" (100%)"<< endl;
497 cout<< "All part. that have track "<< (pitrack+katrack+prtrack)/(pial+kaal+pral)*100 <<" %"<<endl;
498 cout<< "Magnetic field "<< (pimag+kamag+prmag)/(pial+kaal+pral)*100 <<" %"<<endl;
499 cout<< "Geometry efficiency "<< (pigeom+kageom+prgeom)/(pial+kaal+pral)*100 <<" %"<<endl;
500 cout<< "PID procedure "<< (pif+kaf+prf)/(pial+kaal+pral)*100 <<" %"<<endl;
501 cout<< "Contamination "<< (pin+kan+prn)/(pi+ka+pr)*100 <<" %"<<endl;
504 TCanvas *pidCanvas=0; // overall
505 TCanvas *pidCanvasls=0; // last step of PID
506 TCanvas *momvsmassCanvas=0;
507 // overall Efficiency
518 // last step Efficiency
529 //////////////////////// For fTask 1 ///////////////////////////
531 if (strstr(eventType,"pp")){
532 eleff->Divide(elall);
533 eleffls->Divide(elmatch);
535 // overall efficiency
536 pieff->Divide(piall);
537 kaeff->Divide(kaall);
538 preff->Divide(prall);
540 // last step efficiency
541 pieffls->Divide(pimatch);
542 kaeffls->Divide(kamatch);
543 preffls->Divide(prmatch);
551 if (strstr(eventType,"pp")){
559 //Create a canvas, set the view range, show histograms
561 if (indexOfFile==0) {
562 // overall Efficiency canvas
563 pidCanvas = new TCanvas("pidCanvas","PID (Overall)",10,100,800,500);
564 pidCanvas->SetBorderMode(0);
565 pidCanvas->SetBorderSize(0);
566 pidCanvas->SetFillColor(0);
567 pidCanvas->SetFillStyle(0);
569 // last step Efficiency canvas
570 pidCanvasls = new TCanvas("pidCanvasls","PID (Last Step)",10,100,800,500);
571 pidCanvasls->SetBorderMode(0);
572 pidCanvasls->SetBorderSize(0);
573 pidCanvasls->SetFillColor(0);
574 pidCanvasls->SetFillStyle(0);
576 if (strstr(outputmode,"visual")) {
581 Float_t pxs=0.25+0.125; //X size of pad
582 Float_t pys=0.5+0.055; //y size of pad
584 tp = new TPad("histo","Histograms",.1,.1,.9,.9);
586 tpls = new TPad("histo","Histograms",.1,.1,.9,.9);
588 if (strstr(eventType,"Pb-Pb")){
589 // overall efficiency
590 //pad1 = new TPad("pad1","electron efficiency",0.,.5-.055,0.+pxs,.5-.055+pys-.00001,0,0,0);
591 pad2 = new TPad("pad2","pion efficiency",0.,0.5-.055,0.+pxs,0.5-.055+pys-.00001,0,0,0);
592 pad3 = new TPad("pad3","kaon efficiency",0.3,0.5-.055,0.3+pxs,0.5-.055+pys-.00001,0,0,0);
593 pad4 = new TPad("pad4","proton efficiency",0.6,0.5-.055,0.6+pxs,0.5-.055+pys-.00001,0,0,0);
596 //pad5 = new TPad("pad5","electron contamination",0.,0.,0.+pxs,0.+pys,0,0,0);
597 pad6 = new TPad("pad6","pion contamination",0.,0.,0.+pxs,0.+pys,0,0,0);
598 pad7 = new TPad("pad7","kaon contamination",.3,0.,0.3+pxs,0.+pys,0,0,0);
599 pad8 = new TPad("pad8","proton contamination",.6,0.,0.6+pxs,0.+pys,0,0,0);
601 // we repeat the same for the last step of PID
602 //pad1ls = new TPad("pad1ls","electron efficiency",0.,.5-.055,0.+pxs,.5-.055+pys-.00001,0,0,0);
603 pad2ls = new TPad("pad2ls","pion efficiency",0.,0.5-.055,0.+pxs,0.5-.055+pys-.00001,0,0,0);
604 pad3ls = new TPad("pad3ls","kaon efficiency",0.3,0.5-.055,0.3+pxs,0.5-.055+pys-.00001,0,0,0);
605 pad4ls = new TPad("pad4ls","proton efficiency",0.6,0.5-.055,0.6+pxs,0.5-.055+pys-.00001,0,0,0);
608 //pad5 = new TPad("pad5","electron contamination",0.,0.,0.+pxs,0.+pys,0,0,0);
609 pad6ls = new TPad("pad6ls","pion contamination",0.,0.,0.+pxs,0.+pys,0,0,0);
610 pad7ls = new TPad("pad7ls","kaon contamination",.3,0.,0.3+pxs,0.+pys,0,0,0);
611 pad8ls = new TPad("pad8ls","proton contamination",.6,0.,0.6+pxs,0.+pys,0,0,0);
615 if (strstr(eventType,"pp")){
616 // overall Efficiency
617 pad1 = new TPad("pad1","electron efficiency",0.,.5-.055,0.25+0.045,1.,0,0,0);
618 pad2 = new TPad("pad2","pion efficiency",0.25-0.015,0.5-.055,0.5+0.03,1.,0,0,0);
619 pad3 = new TPad("pad3","kaon efficiency",0.5-0.03,0.5-.055,0.75+0.015,1.,0,0,0);
620 pad4 = new TPad("pad4","proton efficiency",0.75-0.045,0.5-.055,1.,1.,0,0,0);
623 pad5 = new TPad("pad5","electron contamination",0.,0.,.25+.045,.5+.055,0,0,0);
624 pad6 = new TPad("pad6","pion contamination",.25-.015,0.,.5+.03,.5+.055,0,0,0);
625 pad7 = new TPad("pad7","kaon contamination",.5-.03,0.,.75+.015,.5+.055,0,0,0);
626 pad8 = new TPad("pad8","proton contamination",.75-.045,0.,1.,.5+.055,0,0,0);
629 // we repeat the same for the last step of PID
630 pad1ls = new TPad("pad1ls","electron efficiency",0.,.5-.055,0.25+0.045,1.,0,0,0);
631 pad2ls = new TPad("pad2ls","pion efficiency",0.25-0.015,0.5-.055,0.5+0.03,1.,0,0,0);
632 pad3ls = new TPad("pad3ls","kaon efficiency",0.5-0.03,0.5-.055,0.75+0.015,1.,0,0,0);
633 pad4ls = new TPad("pad4ls","proton efficiency",0.75-0.045,0.5-.055,1.,1.,0,0,0);
636 pad5ls = new TPad("pad5ls","electron contamination",0.,0.,.25+.045,.5+.055,0,0,0);
637 pad6ls = new TPad("pad6ls","pion contamination",.25-.015,0.,.5+.03,.5+.055,0,0,0);
638 pad7ls = new TPad("pad7ls","kaon contamination",.5-.03,0.,.75+.015,.5+.055,0,0,0);
639 pad8ls = new TPad("pad8ls","proton contamination",.75-.045,0.,1.,.5+.055,0,0,0);
645 gStyle->SetOptStat(0);
646 tpls->SetFillStyle(0);
647 tpls->SetFillColor(0);
648 tpls->SetBorderSize(0);
650 TText *text1ls= new TText(.1,.2,"Contamination Efficiency");
651 text1ls->SetTextAngle(90);
652 if (strstr(outputmode,"visual")) text1ls->Draw();
653 //tp->DrawText(.3,.0,"p (GeV/c");
655 TText *text2ls= new TText(.8,.0,"p (GeV/c)");
656 if (strstr(outputmode,"visual")) {
662 gStyle->SetOptStat(0);
665 tp->SetBorderSize(0);
667 TText *text1= new TText(.1,.2,"Contamination Efficiency");
668 text1->SetTextAngle(90);
669 if (strstr(outputmode,"visual")) text1->Draw();
670 //tp->DrawText(.3,.0,"p (GeV/c");
672 TText *text2= new TText(.8,.0,"p (GeV/c)");
673 if (strstr(outputmode,"visual")) {
681 // drawing histos for overall case
682 if (strstr(eventType,"pp")){
683 pad1->SetFillStyle(0);
684 pad1->SetFillColor(10);
686 if (strstr(outputmode,"visual")) pad1->Draw();
688 //eleff->SetLineWidth(15);
689 eleff->SetLineWidth(3);
690 eleff->SetMaximum(1.);
691 if (indexOfFile==0) {
692 //eleff->SetFillColor(33);
693 //eleff->SetFillColor(30);
694 //eleff->SetFillColor(0);
695 //eleff->SetLineColor(4);
696 eleff->SetLineColor(1);
697 if (strstr(outputmode,"visual")) eleff->Draw();
699 eleff->SetFillStyle(0);
700 eleff->SetFillColor(30);
701 if (indexOfFile==2) {
702 eleff->SetLineColor(3);
703 eleff->SetLineWidth(3);
705 //eleff->SetLineColor(2);
706 eleff->SetLineColor(1);
707 eleff->SetLineStyle(2);}
708 if (strstr(outputmode,"visual")) eleff->Draw("same");
710 // eleff->Fit("pol1");
711 TPaveLabel *ellab = new TPaveLabel(.42,.85,.52,1.05,"e");
712 if (strstr(outputmode,"visual")) ellab->Draw();
715 pad2->SetFillStyle(0);
716 pad2->SetFillColor(10);
718 if (strstr(outputmode,"visual")) pad2->Draw();
720 pieff->SetLineWidth(3);
721 pieff->SetMaximum(1.);
722 if (indexOfFile==0) {
723 pieff->SetLineColor(1);
724 if (strstr(outputmode,"visual")) pieff->Draw();
726 pieff->SetFillStyle(0);
727 pieff->SetFillColor(30);
728 if (indexOfFile==1) {
729 pieff->SetLineStyle(2);
730 } else if (indexOfFile==2) {
731 pieff->SetLineStyle(3);
733 pieff->SetLineStyle(4);}
734 if (strstr(outputmode,"visual")) pieff->Draw("same");
736 TPaveLabel *pilab = new TPaveLabel(1.7,.85,2.2,1.05,"#pi");
737 if (strstr(outputmode,"visual")) pilab->Draw();
739 pad3->SetFillStyle(0);
740 pad3->SetFillColor(10);
742 if (strstr(outputmode,"visual")) pad3->Draw();
744 kaeff->SetLineWidth(3);
745 kaeff->SetMaximum(1.);
746 if (indexOfFile==0) {
747 kaeff->SetLineColor(1);
748 if (strstr(outputmode,"visual")) kaeff->Draw();
750 kaeff->SetFillStyle(0);
751 kaeff->SetFillColor(30);
752 if (indexOfFile==1) {
753 kaeff->SetLineStyle(2);
754 } else if (indexOfFile==2) {
755 kaeff->SetLineStyle(3);
757 kaeff->SetLineStyle(4);}
758 if (strstr(outputmode,"visual")) kaeff->Draw("same");
760 TPaveLabel *kalab = new TPaveLabel(1.7,.85,2.2,1.05,"K");
761 if (strstr(outputmode,"visual")) kalab->Draw();
763 pad4->SetFillStyle(0);
764 pad4->SetFillColor(10);
766 if (strstr(outputmode,"visual")) pad4->Draw();
768 preff->SetLineWidth(3);
769 preff->SetMaximum(1.);
770 if (indexOfFile==0) {
771 preff->SetLineColor(1);
772 if (strstr(outputmode,"visual")) preff->Draw();
774 preff->SetFillStyle(0);
775 preff->SetFillColor(30);
776 if (indexOfFile==1) {
777 preff->SetLineStyle(2);
778 } else if (indexOfFile==2) {
779 preff->SetLineStyle(3);
781 preff->SetLineStyle(4);}
782 if (strstr(outputmode,"visual")) preff->Draw("same");
784 TPaveLabel *prlab = new TPaveLabel(3.2,.85,4.1,1.05,"p");
785 if (strstr(outputmode,"visual")) prlab->Draw();
787 if (strstr(eventType,"pp")){
788 pad5->SetFillStyle(0);
789 pad5->SetFillColor(10);
791 if (strstr(outputmode,"visual")) pad5->Draw();
793 //elcon->SetLineWidth(5);
794 elcon->SetLineWidth(3);
795 elcon->SetMaximum(1.);
796 if (indexOfFile==0) {
797 //elcon->SetFillColor(33);
798 //elcon->SetFillColor(30);
799 //elcon->SetLineColor(4);
800 elcon->SetLineColor(1);
801 if (strstr(outputmode,"visual")) elcon->Draw();
803 elcon->SetFillStyle(4000);
804 elcon->SetFillColor(30);
805 if (indexOfFile==2) {
806 elcon->SetLineColor(3);
807 elcon->SetLineWidth(3);
809 elcon->SetLineColor(2);
810 elcon->SetLineStyle(2);}
811 if (strstr(outputmode,"visual")) elcon->Draw("same");
816 pad6->SetFillStyle(0);
817 pad6->SetFillColor(10);
819 if (strstr(outputmode,"visual")) pad6->Draw();
821 picon->SetLineWidth(3);
822 picon->SetMaximum(1.);
823 if (indexOfFile==0) {
824 picon->SetLineColor(1);
825 if (strstr(outputmode,"visual")) picon->Draw();
827 picon->SetFillStyle(0);
828 picon->SetFillColor(30);
829 if (indexOfFile==1) {
830 picon->SetLineStyle(2);
831 } else if (indexOfFile==2) {
832 picon->SetLineStyle(3);
834 picon->SetLineStyle(4);
836 line = new TLine(0.2,0.85,0.9,0.85);
837 line->SetLineStyle(2);
838 line->SetLineWidth(1);
839 if (strstr(outputmode,"visual")) line->Draw();
840 line = new TLine(0.2,0.65,0.9,0.65);
841 line->SetLineWidth(2);
842 if (strstr(outputmode,"visual")) line->Draw();
843 line = new TLine(0.2,0.45,0.9,0.45);
844 line->SetLineStyle(3);
845 line->SetLineWidth(1);
846 if (strstr(outputmode,"visual")) line->Draw();
847 line = new TLine(0.2,0.25,0.9,0.25);
848 line->SetLineStyle(4);
849 line->SetLineWidth(1);
850 if (strstr(outputmode,"visual")) line->Draw();
851 TPaveLabel *pl = new TPaveLabel(1.1,0.8,1.9,0.9,"100 ps","br");
852 pl->SetFillColor(18);
853 pl->SetTextSize(0.99);
854 if (strstr(outputmode,"visual")) pl->Draw();
855 pl = new TPaveLabel(1.1,0.6,1.9,0.7,"150 ps","br");
856 pl->SetFillColor(18);
857 pl->SetTextSize(0.99);
858 if (strstr(outputmode,"visual")) pl->Draw();
859 pl = new TPaveLabel(1.1,0.4,1.9,0.5,"200 ps","br");
860 pl->SetFillColor(18);
861 pl->SetTextSize(0.99);
862 if (strstr(outputmode,"visual")) pl->Draw();
863 pl = new TPaveLabel(1.1,0.2,1.9,0.3,"300 ps","br");
864 pl->SetFillColor(18);
865 pl->SetTextSize(0.99);
866 if (strstr(outputmode,"visual")) pl->Draw();
868 if (strstr(outputmode,"visual")) picon->Draw("same");
871 pad7->SetFillStyle(0);
872 pad7->SetFillColor(10);
874 if (strstr(outputmode,"visual")) pad7->Draw();
876 kacon->SetLineWidth(3);
877 kacon->SetMaximum(1.);
878 if (indexOfFile==0) {
879 kacon->SetLineColor(1);
880 if (strstr(outputmode,"visual")) kacon->Draw();
882 kacon->SetFillStyle(0);
883 kacon->SetFillColor(30);
884 if (indexOfFile==1) {
885 kacon->SetLineStyle(2);
886 } else if (indexOfFile==2) {
887 kacon->SetLineStyle(3);
889 kacon->SetLineStyle(4);}
890 if (strstr(outputmode,"visual")) kacon->Draw("same");
893 pad8->SetFillStyle(0);
894 pad8->SetFillColor(10);
896 if (strstr(outputmode,"visual")) pad8->Draw();
898 prcon->SetLineWidth(3);
899 prcon->SetMaximum(1.);
900 if (indexOfFile==0) {
901 prcon->SetLineColor(1);
902 if (strstr(outputmode,"visual")) prcon->Draw();
904 prcon->SetFillStyle(0);
905 prcon->SetFillColor(30);
906 if (indexOfFile==1) {
907 prcon->SetLineStyle(2);
908 } else if (indexOfFile==2) {
909 prcon->SetLineStyle(3);
911 prcon->SetLineStyle(4);}
912 if (strstr(outputmode,"visual")) prcon->Draw("same");
917 // last step case (it is just a copy of the previous lines)
918 // moving to pidCanvasls canvas
920 // drawing histos for overall case
921 if (strstr(eventType,"pp")){
922 pad1ls->SetFillStyle(0);
923 pad1ls->SetFillColor(10);
925 if (strstr(outputmode,"visual")) pad1ls->Draw();
927 //eleff->SetLineWidth(15);
928 eleffls->SetLineWidth(3);
929 eleffls->SetMaximum(1.);
930 if (indexOfFile==0) {
931 //eleff->SetFillColor(33);
932 //eleff->SetFillColor(30);
933 //eleff->SetFillColor(0);
934 //eleff->SetLineColor(4);
935 eleffls->SetLineColor(1);
936 if (strstr(outputmode,"visual")) eleffls->Draw();
938 eleffls->SetFillStyle(0);
939 eleffls->SetFillColor(30);
940 if (indexOfFile==2) {
941 eleffls->SetLineColor(3);
942 eleffls->SetLineWidth(3);
944 //eleff->SetLineColor(2);
945 eleffls->SetLineColor(1);
946 eleffls->SetLineStyle(2);}
947 if (strstr(outputmode,"visual")) eleffls->Draw("same");
949 // eleff->Fit("pol1");
950 TPaveLabel *ellabls = new TPaveLabel(.42,.85,.52,1.05,"e");
951 if (strstr(outputmode,"visual")) ellabls->Draw();
954 pad2ls->SetFillStyle(0);
955 pad2ls->SetFillColor(10);
957 if (strstr(outputmode,"visual")) pad2ls->Draw();
959 pieffls->SetLineWidth(3);
960 pieffls->SetMaximum(1.);
961 if (indexOfFile==0) {
962 pieffls->SetLineColor(1);
963 if (strstr(outputmode,"visual")) pieffls->Draw();
965 pieffls->SetFillStyle(0);
966 pieffls->SetFillColor(30);
967 if (indexOfFile==1) {
968 pieffls->SetLineStyle(2);
969 } else if (indexOfFile==2) {
970 pieffls->SetLineStyle(3);
972 pieffls->SetLineStyle(4);}
973 if (strstr(outputmode,"visual")) pieffls->Draw("same");
975 TPaveLabel *pilabls = new TPaveLabel(1.7,.85,2.2,1.05,"#pi");
976 if (strstr(outputmode,"visual")) pilabls->Draw();
978 pad3ls->SetFillStyle(0);
979 pad3ls->SetFillColor(10);
981 if (strstr(outputmode,"visual")) pad3ls->Draw();
983 kaeffls->SetLineWidth(3);
984 kaeffls->SetMaximum(1.);
985 if (indexOfFile==0) {
986 kaeffls->SetLineColor(1);
987 if (strstr(outputmode,"visual")) kaeffls->Draw();
989 kaeffls->SetFillStyle(0);
990 kaeffls->SetFillColor(30);
991 if (indexOfFile==1) {
992 kaeffls->SetLineStyle(2);
993 } else if (indexOfFile==2) {
994 kaeffls->SetLineStyle(3);
996 kaeffls->SetLineStyle(4);}
997 if (strstr(outputmode,"visual")) kaeffls->Draw("same");
999 TPaveLabel *kalabls = new TPaveLabel(1.7,.85,2.2,1.05,"K");
1000 if (strstr(outputmode,"visual")) kalabls->Draw();
1002 pad4ls->SetFillStyle(0);
1003 pad4ls->SetFillColor(10);
1005 if (strstr(outputmode,"visual")) pad4ls->Draw();
1007 preffls->SetLineWidth(3);
1008 preffls->SetMaximum(1.);
1009 if (indexOfFile==0) {
1010 preffls->SetLineColor(1);
1011 if (strstr(outputmode,"visual")) preffls->Draw();
1013 preffls->SetFillStyle(0);
1014 preffls->SetFillColor(30);
1015 if (indexOfFile==1) {
1016 preffls->SetLineStyle(2);
1017 } else if (indexOfFile==2) {
1018 preffls->SetLineStyle(3);
1020 preffls->SetLineStyle(4);}
1021 if (strstr(outputmode,"visual")) preffls->Draw("same");
1023 TPaveLabel *prlabls = new TPaveLabel(3.2,.85,4.1,1.05,"p");
1024 if (strstr(outputmode,"visual")) prlabls->Draw();
1026 if (strstr(eventType,"pp")){
1027 pad5ls->SetFillStyle(0);
1028 pad5ls->SetFillColor(10);
1030 if (strstr(outputmode,"visual")) pad5ls->Draw();
1032 //elcon->SetLineWidth(5);
1033 elcon->SetLineWidth(3);
1034 elcon->SetMaximum(1.);
1035 if (indexOfFile==0) {
1036 //elcon->SetFillColor(33);
1037 //elcon->SetFillColor(30);
1038 //elcon->SetLineColor(4);
1039 elcon->SetLineColor(1);
1040 if (strstr(outputmode,"visual")) elcon->Draw();
1042 elcon->SetFillStyle(4000);
1043 elcon->SetFillColor(30);
1044 if (indexOfFile==2) {
1045 elcon->SetLineColor(3);
1046 elcon->SetLineWidth(3);
1048 elcon->SetLineColor(2);
1049 elcon->SetLineStyle(2);}
1050 if (strstr(outputmode,"visual")) elcon->Draw("same");
1055 pad6ls->SetFillStyle(0);
1056 pad6ls->SetFillColor(10);
1058 if (strstr(outputmode,"visual")) pad6ls->Draw();
1060 picon->SetLineWidth(3);
1061 picon->SetMaximum(1.);
1062 if (indexOfFile==0) {
1063 picon->SetLineColor(1);
1064 if (strstr(outputmode,"visual")) picon->Draw();
1066 picon->SetFillStyle(0);
1067 picon->SetFillColor(30);
1068 if (indexOfFile==1) {
1069 picon->SetLineStyle(2);
1070 } else if (indexOfFile==2) {
1071 picon->SetLineStyle(3);
1073 picon->SetLineStyle(4);
1075 line = new TLine(0.2,0.85,0.9,0.85);
1076 line->SetLineStyle(2);
1077 line->SetLineWidth(1);
1078 if (strstr(outputmode,"visual")) line->Draw();
1079 line = new TLine(0.2,0.65,0.9,0.65);
1080 line->SetLineWidth(2);
1081 if (strstr(outputmode,"visual")) line->Draw();
1082 line = new TLine(0.2,0.45,0.9,0.45);
1083 line->SetLineStyle(3);
1084 line->SetLineWidth(1);
1085 if (strstr(outputmode,"visual")) line->Draw();
1086 line = new TLine(0.2,0.25,0.9,0.25);
1087 line->SetLineStyle(4);
1088 line->SetLineWidth(1);
1089 if (strstr(outputmode,"visual")) line->Draw();
1090 TPaveLabel *pl = new TPaveLabel(1.1,0.8,1.9,0.9,"100 ps","br");
1091 pl->SetFillColor(18);
1092 pl->SetTextSize(0.99);
1093 if (strstr(outputmode,"visual")) pl->Draw();
1094 pl = new TPaveLabel(1.1,0.6,1.9,0.7,"150 ps","br");
1095 pl->SetFillColor(18);
1096 pl->SetTextSize(0.99);
1097 if (strstr(outputmode,"visual")) pl->Draw();
1098 pl = new TPaveLabel(1.1,0.4,1.9,0.5,"200 ps","br");
1099 pl->SetFillColor(18);
1100 pl->SetTextSize(0.99);
1101 if (strstr(outputmode,"visual")) pl->Draw();
1102 pl = new TPaveLabel(1.1,0.2,1.9,0.3,"300 ps","br");
1103 pl->SetFillColor(18);
1104 pl->SetTextSize(0.99);
1105 if (strstr(outputmode,"visual")) pl->Draw();
1107 if (strstr(outputmode,"visual")) picon->Draw("same");
1110 pad7ls->SetFillStyle(0);
1111 pad7ls->SetFillColor(10);
1113 if (strstr(outputmode,"visual")) pad7ls->Draw();
1115 kacon->SetLineWidth(3);
1116 kacon->SetMaximum(1.);
1117 if (indexOfFile==0) {
1118 kacon->SetLineColor(1);
1119 if (strstr(outputmode,"visual")) kacon->Draw();
1121 kacon->SetFillStyle(0);
1122 kacon->SetFillColor(30);
1123 if (indexOfFile==1) {
1124 kacon->SetLineStyle(2);
1125 } else if (indexOfFile==2) {
1126 kacon->SetLineStyle(3);
1128 kacon->SetLineStyle(4);}
1129 if (strstr(outputmode,"visual")) kacon->Draw("same");
1132 pad8ls->SetFillStyle(0);
1133 pad8ls->SetFillColor(10);
1135 if (strstr(outputmode,"visual")) pad8ls->Draw();
1137 prcon->SetLineWidth(3);
1138 prcon->SetMaximum(1.);
1139 if (indexOfFile==0) {
1140 prcon->SetLineColor(1);
1141 if (strstr(outputmode,"visual")) prcon->Draw();
1143 prcon->SetFillStyle(0);
1144 prcon->SetFillColor(30);
1145 if (indexOfFile==1) {
1146 prcon->SetLineStyle(2);
1147 } else if (indexOfFile==2) {
1148 prcon->SetLineStyle(3);
1150 prcon->SetLineStyle(4);}
1151 if (strstr(outputmode,"visual")) prcon->Draw("same");
1160 // momentum vs mass 2-D histos
1162 if (indexOfFile==0) {
1163 momvsmassCanvas = new TCanvas("momvsmassCanvas","Momentum vs mass disribution",500,10,700,700);
1164 momvsmassCanvas->SetFillColor(0);
1165 momvsmassCanvas->SetBorderMode(0);
1166 gPad->SetFillStyle(0);
1167 gPad->SetBorderMode(0);
1168 gPad->SetFillColor(0);
1169 // gStyle->SetOptStat(11);
1170 if (numfile==4) momvsmassCanvas->Divide(1,2,0,0);
1171 } else if (indexOfFile==1 && numfile == 4) {
1172 momvsmassCanvas->cd(1);
1173 TPaveLabel *pl = new TPaveLabel(-0.0376218,-3.03586,0.0979277,-2.70158,"100 ps","br");
1174 pl->SetFillColor(18);
1175 pl->SetTextSize(0.99);
1176 if (strstr(outputmode,"visual")) pl->Draw();
1177 } else if (indexOfFile==3 && numfile == 4) {
1178 momvsmassCanvas->cd(2);
1179 TPaveLabel *pl = new TPaveLabel(-0.0591866,-3.17077,0.076363,-2.86857,"300 ps","br");
1180 pl->SetFillColor(18);
1181 pl->SetTextSize(0.99);
1182 if (strstr(outputmode,"visual")) pl->Draw();
1184 if (numfile !=4) momvsmassCanvas->cd();
1185 if (numfile !=4 || indexOfFile==1 || indexOfFile==3) {
1186 // hpi->PaintStat2(01);
1187 hpi->SetMarkerColor(5);
1188 if (strstr(outputmode,"visual")) hpi->Draw();
1189 if(strstr(eventType,"pp")){
1190 hel->SetMarkerColor(2);
1191 if (strstr(outputmode,"visual")) hel->Draw("same");
1193 hka->SetMarkerColor(4);
1194 if (strstr(outputmode,"visual")) hka->Draw("same");
1195 hpr->SetMarkerColor(3);
1196 if (strstr(outputmode,"visual")) hpr->Draw("same");
1197 if (strstr(outputmode,"visual")) {
1200 if(strstr(eventType,"pp")){
1205 if(strstr(eventType,"pp")){
1206 //TPaveText *ep = new TPaveText(-0.05,-0.5,0.05,-0.3);
1208 TPaveLabel *ep = new TPaveLabel(.42,.85,.52,1.05,"e");
1209 if (strstr(outputmode,"visual")) ep->Draw();
1212 TPaveText *pip = new TPaveText(0.15,-1.0,0.25,-0.8);
1213 pip->AddText("#pi");
1214 if (strstr(outputmode,"visual")) pip->Draw();
1215 TPaveText *kp = new TPaveText(0.5,-2.0,0.6,-1.8);
1217 if (strstr(outputmode,"visual")) kp->Draw();
1218 TPaveText *prp = new TPaveText(0.9,-2.7,1.0,-2.5);
1220 if (strstr(outputmode,"visual")) prp->Draw();
1221 // TText *text2= new TText(.59,.06,"Momentum");
1222 // text1->SetTextAngle(90);
1224 //pidCanvas->DrawText(.1,.2,"Contamination Efficiency");
1225 momvsmassCanvas->Update();
1226 if(strstr(outputsavemode,"asC")) momvsmassCanvas->Print("momvsmassCanvas.C");
1227 if(strstr(outputsavemode,"asEPS")) momvsmassCanvas->Print("momvsmassCanvas.eps");
1229 pidCanvas->Update();
1230 if(strstr(outputsavemode,"asC")) pidCanvas->Print("pidCanvas.C");
1231 if(strstr(outputsavemode,"asEPS")) pidCanvas->Print("pidCanvas.eps");
1232 char outFileName[100];
1233 strcpy(outFileName,"histos");
1234 strcat(outFileName,foutfileName);
1235 TFile *houtfile = new TFile(outFileName,"recreate");
1238 pidCanvas->Write(0,TObject::kOverwrite);
1239 momvsmassCanvas->Write(0,TObject::kOverwrite);
1240 // saving 1-D histos
1241 pit->Write(0,TObject::kOverwrite);
1242 pig->Write(0,TObject::kOverwrite);
1243 pieff->Write(0,TObject::kOverwrite);
1244 pieffls->Write(0,TObject::kOverwrite);
1245 picon->Write(0,TObject::kOverwrite);
1246 piid->Write(0,TObject::kOverwrite);
1247 pimatch->Write(0,TObject::kOverwrite);
1248 piall->Write(0,TObject::kOverwrite);
1249 pigen->Write(0,TObject::kOverwrite);
1250 kat->Write(0,TObject::kOverwrite);
1251 kag->Write(0,TObject::kOverwrite);
1252 kaeff->Write(0,TObject::kOverwrite);
1253 kaeffls->Write(0,TObject::kOverwrite);
1254 kaid->Write(0,TObject::kOverwrite);
1255 kamatch->Write(0,TObject::kOverwrite);
1256 kaall->Write(0,TObject::kOverwrite);
1257 kagen->Write(0,TObject::kOverwrite);
1258 kacon->Write(0,TObject::kOverwrite);
1259 prt->Write(0,TObject::kOverwrite);
1260 prg->Write(0,TObject::kOverwrite);
1261 preff->Write(0,TObject::kOverwrite);
1262 preffls->Write(0,TObject::kOverwrite);
1263 prcon->Write(0,TObject::kOverwrite);
1264 prid->Write(0,TObject::kOverwrite);
1265 prmatch->Write(0,TObject::kOverwrite);
1266 prall->Write(0,TObject::kOverwrite);
1267 prgen->Write(0,TObject::kOverwrite);
1268 // saving 2-D histos
1269 hpi->Write(0,TObject::kOverwrite);
1270 hka->Write(0,TObject::kOverwrite);
1271 hpr->Write(0,TObject::kOverwrite);
1273 if (hel && eleff && elcon && elid && elall){
1274 hel->Write(0,TObject::kOverwrite);
1275 eleff->Write(0,TObject::kOverwrite);
1276 elcon->Write(0,TObject::kOverwrite);
1277 elid->Write(0,TObject::kOverwrite);
1278 elmatch->Write(0,TObject::kOverwrite);
1279 elall->Write(0,TObject::kOverwrite);
1281 cout << "file " << houtfile << " has been created" << endl;
1282 cout << "it contains PID histos and canvas" << endl;
1284 houtfile->Write(0,TObject::kOverwrite);
1288 if (strstr(outputmode,"novisual")){
1292 delete pieff; pieff=0;
1293 delete pieffls; pieffls=0;
1294 delete picon; picon=0;
1295 delete piid ; piid=0;
1296 delete pimatch; pimatch=0;
1297 delete piall; piall=0;
1298 delete pigen; pigen=0;
1301 delete kaeff; kaeff=0;
1302 delete kaeffls; kaeffls=0;
1303 delete kaid; kaid=0;
1304 delete kamatch; kamatch=0;
1305 delete kaall; kaall=0;
1306 delete kagen; kagen=0;
1307 delete kacon; kacon=0;
1310 delete preff; preff=0;
1311 delete preffls; preffls=0;
1312 delete prcon; prcon=0;
1313 delete prid; prid=0;
1314 delete prmatch; prmatch=0;
1315 delete prall; prall=0;
1316 delete prgen; prgen=0;
1353 //__________________________________________________________________
1354 Bool_t AliTOFPID::operator==( AliTOFPID const & tofrec)const
1356 // dummy version of Equal operator.
1357 // requested by coding conventions