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 // The class AliCFTrackKineCuts is designed to select both generated
17 // and reconstructed tracks of a given range in momentum space,
18 // electric charge and azimuthal emission angle phi
19 // and to provide corresponding QA histograms.
20 // This class inherits from the Analysis' Framework abstract base class
21 // AliAnalysisCuts and is a part of the Correction Framework.
22 // This class acts on single, generated and reconstructed tracks, it is
23 // applicable on ESD and AOD data.
24 // It mainly consists of a IsSelected function that returns a boolean.
25 // This function checks whether the considered track passes a set of cuts:
37 // The cut values for these cuts are set with the corresponding set functions.
38 // All cut classes provided by the correction framework are supposed to be
39 // added in the Analysis Framwork's class AliAnalysisFilter and applied by
40 // the filter via a loop.
42 // author: I. Kraus (Ingrid.Kraus@cern.ch)
44 // AliESDtrackCuts writte by Jan Fiete Grosse-Oetringhaus and
45 // AliRsnDaughterCut class written by A. Pulvirenti.
48 #include <TDirectory.h>
52 #include <AliVParticle.h>
54 #include "AliCFTrackKineCuts.h"
56 ClassImp(AliCFTrackKineCuts)
58 //__________________________________________________________________________________
59 AliCFTrackKineCuts::AliCFTrackKineCuts() :
91 fhBinLimMomentum(0x0),
97 fhBinLimRapidity(0x0),
102 // Default constructor
106 //__________________________________________________________________________________
107 AliCFTrackKineCuts::AliCFTrackKineCuts(Char_t* name, Char_t* title) :
108 AliCFCutBase(name,title),
126 fRequireIsCharged(0),
139 fhBinLimMomentum(0x0),
145 fhBinLimRapidity(0x0),
154 //__________________________________________________________________________________
155 AliCFTrackKineCuts::AliCFTrackKineCuts(const AliCFTrackKineCuts& c) :
157 fMomentumMin(c.fMomentumMin),
158 fMomentumMax(c.fMomentumMax),
169 fRapidityMin(c.fRapidityMin),
170 fRapidityMax(c.fRapidityMax),
174 fRequireIsCharged(c.fRequireIsCharged),
175 fhCutStatistics(c.fhCutStatistics),
176 fhCutCorrelation(c.fhCutCorrelation),
178 fhNBinsMomentum(c.fhNBinsMomentum),
179 fhNBinsPt(c.fhNBinsPt),
180 fhNBinsPx(c.fhNBinsPx),
181 fhNBinsPy(c.fhNBinsPy),
182 fhNBinsPz(c.fhNBinsPz),
183 fhNBinsEta(c.fhNBinsEta),
184 fhNBinsRapidity(c.fhNBinsRapidity),
185 fhNBinsPhi(c.fhNBinsPhi),
186 fhNBinsCharge(c.fhNBinsCharge),
187 fhBinLimMomentum(c.fhBinLimMomentum),
188 fhBinLimPt(c.fhBinLimPt),
189 fhBinLimPx(c.fhBinLimPx),
190 fhBinLimPy(c.fhBinLimPy),
191 fhBinLimPz(c.fhBinLimPz),
192 fhBinLimEta(c.fhBinLimEta),
193 fhBinLimRapidity(c.fhBinLimRapidity),
194 fhBinLimPhi(c.fhBinLimPhi),
195 fhBinLimCharge(c.fhBinLimCharge)
200 ((AliCFTrackKineCuts &) c).Copy(*this);
202 //__________________________________________________________________________________
203 AliCFTrackKineCuts& AliCFTrackKineCuts::operator=(const AliCFTrackKineCuts& c)
206 // Assignment operator
209 AliCFCutBase::operator=(c) ;
210 fMomentumMin = c.fMomentumMin ;
211 fMomentumMax = c.fMomentumMax ;
220 fEtaMin = c.fEtaMin ;
221 fEtaMax = c.fEtaMax ;
222 fRapidityMin = c.fRapidityMin ;
223 fRapidityMax = c.fRapidityMax ;
224 fPhiMin = c.fPhiMin ;
225 fPhiMax = c.fPhiMax ;
226 fCharge = c.fCharge ;
227 fRequireIsCharged = c.fRequireIsCharged ;
228 fhCutStatistics = c.fhCutStatistics ;
229 fhCutCorrelation = c.fhCutCorrelation ;
231 fhNBinsMomentum = c.fhNBinsMomentum;
232 fhNBinsPt = c.fhNBinsPt;
233 fhNBinsPx = c.fhNBinsPx;
234 fhNBinsPy = c.fhNBinsPy;
235 fhNBinsPz = c.fhNBinsPz;
236 fhNBinsEta = c.fhNBinsEta;
237 fhNBinsRapidity = c.fhNBinsRapidity;
238 fhNBinsPhi = c.fhNBinsPhi;
239 fhNBinsCharge = c.fhNBinsCharge;
240 fhBinLimMomentum = c.fhBinLimMomentum;
241 fhBinLimPt = c.fhBinLimPt;
242 fhBinLimPx = c.fhBinLimPx;
243 fhBinLimPy = c.fhBinLimPy;
244 fhBinLimPz = c.fhBinLimPz;
245 fhBinLimEta = c.fhBinLimEta;
246 fhBinLimRapidity = c.fhBinLimRapidity;
247 fhBinLimPhi = c.fhBinLimPhi;
248 fhBinLimCharge = c.fhBinLimCharge;
250 for (Int_t i=0; i<c.kNHist; i++){
251 for (Int_t j=0; j<c.kNStepQA; j++){
252 if(c.fhQA[i][j]) fhQA[i][j] = (TH1F*)c.fhQA[i][j]->Clone();
255 ((AliCFTrackKineCuts &) c).Copy(*this);
259 //__________________________________________________________________________________
260 AliCFTrackKineCuts::~AliCFTrackKineCuts()
265 if (fhCutStatistics) delete fhCutStatistics;
266 if (fhCutCorrelation) delete fhCutCorrelation;
268 for (Int_t i=0; i<kNHist; i++){
269 for (Int_t j=0; j<kNStepQA; j++){
270 if(fhQA[i][j]) delete fhQA[i][j];
273 if(fBitmap) delete fBitmap;
274 if(fhBinLimMomentum) delete fhBinLimMomentum;
275 if(fhBinLimPt) delete fhBinLimPt;
276 if(fhBinLimPx) delete fhBinLimPx;
277 if(fhBinLimPy) delete fhBinLimPy;
278 if(fhBinLimPz) delete fhBinLimPz;
279 if(fhBinLimEta) delete fhBinLimEta;
280 if(fhBinLimRapidity) delete fhBinLimRapidity;
281 if(fhBinLimPhi) delete fhBinLimPhi;
282 if(fhBinLimCharge) delete fhBinLimCharge;
284 //__________________________________________________________________________________
285 void AliCFTrackKineCuts::Initialise()
288 // sets everything to zero
307 fRequireIsCharged = 0;
319 SetRequireIsCharged();
321 for (Int_t i=0; i<kNHist; i++){
322 for (Int_t j=0; j<kNStepQA; j++) {
328 fhCutCorrelation = 0;
329 fBitmap=new TBits(0);
331 //set default bining for QA histograms
332 SetHistogramBins(kCutP,200,0.,20.);
333 SetHistogramBins(kCutPt,200,0.,20.);
334 SetHistogramBins(kCutPx,400,-20.,20.);
335 SetHistogramBins(kCutPy,400,-20.,20.);
336 SetHistogramBins(kCutPz,400,-20.,20.);
337 SetHistogramBins(kCutRapidity,200,-10.,10.);
338 SetHistogramBins(kCutEta,200,-10.,10.);
339 SetHistogramBins(kCutPhi,38,-0.6,7.);
340 SetHistogramBins(kCutCharge,21,-10.5,10.5);
342 //__________________________________________________________________________________
343 void AliCFTrackKineCuts::Copy(TObject &c) const
348 AliCFTrackKineCuts& target = (AliCFTrackKineCuts &) c;
352 if (fhCutStatistics) target.fhCutStatistics = (TH1F*) fhCutStatistics->Clone();
353 if (fhCutCorrelation) target.fhCutCorrelation = (TH2F*) fhCutCorrelation->Clone();
355 for (Int_t i=0; i<kNHist; i++){
356 for (Int_t j=0; j<kNStepQA; j++){
357 if(fhQA[i][j]) target.fhQA[i][j] = (TH1F*)fhQA[i][j]->Clone();
362 //__________________________________________________________________________________
363 void AliCFTrackKineCuts::SelectionBitMap(TObject* obj) {
365 // test if the track passes the single cuts
366 // and store the information in a bitmap
369 // bitmap stores the decision of each single cut
370 for(Int_t i=0; i<kNCuts; i++)fBitmap->SetBitNumber(i,kFALSE);
372 // check TObject and cast into VParticle
374 if (!obj->InheritsFrom("AliVParticle")) AliError("object must derived from AliVParticle !");
375 AliVParticle* particle = dynamic_cast<AliVParticle *>(obj);
376 if ( !particle ) return;
379 if((particle->P() >= fMomentumMin) && (particle->P() <= fMomentumMax))
380 fBitmap->SetBitNumber(iCutBit,kTRUE);
382 if ((particle->Pt() >= fPtMin) && (particle->Pt() <= fPtMax))
383 fBitmap->SetBitNumber(iCutBit,kTRUE);
385 if ((particle->Px() >= fPxMin) && (particle->Px() <= fPxMax))
386 fBitmap->SetBitNumber(iCutBit,kTRUE);
388 if ((particle->Py() >= fPyMin) && (particle->Py() <= fPyMax))
389 fBitmap->SetBitNumber(iCutBit,kTRUE);
391 if ((particle->Pz() >= fPzMin) && (particle->Pz() <= fPzMax))
392 fBitmap->SetBitNumber(iCutBit,kTRUE);
394 if ((particle->Eta() >= fEtaMin) && (particle->Eta() <= fEtaMax))
395 fBitmap->SetBitNumber(iCutBit,kTRUE);
397 if ((particle->Y() >= fRapidityMin) && (particle->Y() <= fRapidityMax))
398 fBitmap->SetBitNumber(iCutBit,kTRUE);
400 if ((particle->Phi() >= fPhiMin) && (particle->Phi() <= fPhiMax))
401 fBitmap->SetBitNumber(iCutBit,kTRUE);
403 if (fCharge >= 10 || (particle->Charge() == fCharge))
404 fBitmap->SetBitNumber(iCutBit,kTRUE);
406 if (fRequireIsCharged && particle->Charge()!=0)
407 fBitmap->SetBitNumber(iCutBit,kTRUE);
408 if (!fRequireIsCharged)
409 fBitmap->SetBitNumber(iCutBit,kTRUE);
413 //__________________________________________________________________________________
414 Bool_t AliCFTrackKineCuts::IsSelected(TObject* obj) {
416 // loops over decisions of single cuts and returns if the track is accepted
418 SelectionBitMap(obj);
420 if (fIsQAOn) FillHistograms(obj,0);
421 Bool_t isSelected = kTRUE;
423 for (UInt_t icut=0; icut<fBitmap->GetNbits();icut++) {
424 if(!fBitmap->TestBitNumber(icut)) {
429 if (!isSelected) return kFALSE ;
430 if (fIsQAOn) FillHistograms(obj,1);
433 //__________________________________________________________________________________
434 void AliCFTrackKineCuts::SetHistogramBins(Int_t index, Int_t nbins, Double_t *bins)
443 fhNBinsMomentum=nbins+1;
444 fhBinLimMomentum=new Double_t[nbins+1];
445 for(Int_t i=0;i<nbins+1;i++)fhBinLimMomentum[i]=bins[i];
450 fhBinLimPt=new Double_t[nbins+1];
451 for(Int_t i=0;i<nbins+1;i++)fhBinLimPt[i]=bins[i];
456 fhBinLimPx=new Double_t[nbins+1];
457 for(Int_t i=0;i<nbins+1;i++)fhBinLimPx[i]=bins[i];
462 fhBinLimPy=new Double_t[nbins+1];
463 for(Int_t i=0;i<nbins+1;i++)fhBinLimPy[i]=bins[i];
468 fhBinLimPz=new Double_t[nbins+1];
469 for(Int_t i=0;i<nbins+1;i++)fhBinLimPz[i]=bins[i];
473 fhNBinsRapidity=nbins+1;
474 fhBinLimRapidity=new Double_t[nbins+1];
475 for(Int_t i=0;i<nbins+1;i++)fhBinLimRapidity[i]=bins[i];
480 fhBinLimEta=new Double_t[nbins+1];
481 for(Int_t i=0;i<nbins+1;i++)fhBinLimEta[i]=bins[i];
486 fhBinLimPhi=new Double_t[nbins+1];
487 for(Int_t i=0;i<nbins+1;i++)fhBinLimPhi[i]=bins[i];
491 fhNBinsCharge=nbins+1;
492 fhBinLimCharge=new Double_t[nbins+1];
493 for(Int_t i=0;i<nbins+1;i++)fhBinLimCharge[i]=bins[i];
497 //__________________________________________________________________________________
498 void AliCFTrackKineCuts::SetHistogramBins(Int_t index, Int_t nbins, Double_t xmin, Double_t xmax)
505 fhNBinsMomentum=nbins+1;
506 fhBinLimMomentum=new Double_t[nbins+1];
507 for(Int_t i=0;i<nbins+1;i++)fhBinLimMomentum[i]=xmin+i*(xmax-xmin)/Double_t(nbins);
512 fhBinLimPt=new Double_t[nbins+1];
513 for(Int_t i=0;i<nbins+1;i++)fhBinLimPt[i]=xmin+i*(xmax-xmin)/Double_t(nbins);
518 fhBinLimPx=new Double_t[nbins+1];
519 for(Int_t i=0;i<nbins+1;i++)fhBinLimPx[i]=xmin+i*(xmax-xmin)/Double_t(nbins);
524 fhBinLimPy=new Double_t[nbins+1];
525 for(Int_t i=0;i<nbins+1;i++)fhBinLimPy[i]=xmin+i*(xmax-xmin)/Double_t(nbins);
530 fhBinLimPz=new Double_t[nbins+1];
531 for(Int_t i=0;i<nbins+1;i++)fhBinLimPz[i]=xmin+i*(xmax-xmin)/Double_t(nbins);
535 fhNBinsRapidity=nbins+1;
536 fhBinLimRapidity=new Double_t[nbins+1];
537 for(Int_t i=0;i<nbins+1;i++)fhBinLimRapidity[i]=xmin+i*(xmax-xmin)/Double_t(nbins);
542 fhBinLimEta=new Double_t[nbins+1];
543 for(Int_t i=0;i<nbins+1;i++)fhBinLimEta[i]=xmin+i*(xmax-xmin)/Double_t(nbins);
548 fhBinLimPhi=new Double_t[nbins+1];
549 for(Int_t i=0;i<nbins+1;i++)fhBinLimPhi[i]=xmin+i*(xmax-xmin)/Double_t(nbins);
553 fhNBinsCharge=nbins+1;
554 fhBinLimCharge=new Double_t[nbins+1];
555 for(Int_t i=0;i<nbins+1;i++)fhBinLimCharge[i]=xmin+i*(xmax-xmin)/Double_t(nbins);
559 //__________________________________________________________________________________
560 void AliCFTrackKineCuts::DefineHistograms() {
562 // histograms for cut variables, cut statistics and cut correlations
566 // book cut statistics and cut correlation histograms
567 fhCutStatistics = new TH1F(Form("%s_cut_statistics",GetName()), Form("%s cut statistics",GetName()), kNCuts,0.5,kNCuts+0.5);
568 fhCutStatistics->SetLineWidth(2);
569 fhCutStatistics->GetXaxis()->SetBinLabel(1,"p");
570 fhCutStatistics->GetXaxis()->SetBinLabel(2,"pt");
571 fhCutStatistics->GetXaxis()->SetBinLabel(3,"px");
572 fhCutStatistics->GetXaxis()->SetBinLabel(4,"py");
573 fhCutStatistics->GetXaxis()->SetBinLabel(5,"pz");
574 fhCutStatistics->GetXaxis()->SetBinLabel(6,"eta");
575 fhCutStatistics->GetXaxis()->SetBinLabel(7,"y");
576 fhCutStatistics->GetXaxis()->SetBinLabel(8,"phi");
577 fhCutStatistics->GetXaxis()->SetBinLabel(9,"charge");
578 fhCutStatistics->GetXaxis()->SetBinLabel(10,"is charged");
580 fhCutCorrelation = new TH2F(Form("%s_cut_correlation",GetName()), Form("%s cut correlation",GetName()), kNCuts,0.5,kNCuts+0.5,kNCuts,0.5,kNCuts+0.5);
581 fhCutCorrelation->SetLineWidth(2);
582 fhCutCorrelation->GetXaxis()->SetBinLabel(1,"p");
583 fhCutCorrelation->GetXaxis()->SetBinLabel(2,"pt");
584 fhCutCorrelation->GetXaxis()->SetBinLabel(3,"px");
585 fhCutCorrelation->GetXaxis()->SetBinLabel(4,"py");
586 fhCutCorrelation->GetXaxis()->SetBinLabel(5,"pz");
587 fhCutCorrelation->GetXaxis()->SetBinLabel(6,"eta");
588 fhCutCorrelation->GetXaxis()->SetBinLabel(7,"y");
589 fhCutCorrelation->GetXaxis()->SetBinLabel(8,"phi");
590 fhCutCorrelation->GetXaxis()->SetBinLabel(9,"charge");
591 fhCutCorrelation->GetXaxis()->SetBinLabel(10,"is charged");
593 fhCutCorrelation->GetYaxis()->SetBinLabel(1,"p");
594 fhCutCorrelation->GetYaxis()->SetBinLabel(2,"pt");
595 fhCutCorrelation->GetYaxis()->SetBinLabel(3,"px");
596 fhCutCorrelation->GetYaxis()->SetBinLabel(4,"py");
597 fhCutCorrelation->GetYaxis()->SetBinLabel(5,"pz");
598 fhCutCorrelation->GetYaxis()->SetBinLabel(6,"eta");
599 fhCutCorrelation->GetYaxis()->SetBinLabel(7,"y");
600 fhCutCorrelation->GetYaxis()->SetBinLabel(8,"phi");
601 fhCutCorrelation->GetYaxis()->SetBinLabel(9,"charge");
602 fhCutCorrelation->GetYaxis()->SetBinLabel(10,"is charged");
605 // book QA histograms
607 for (Int_t i=0; i<kNStepQA; i++) {
608 if (i==0) sprintf(str," ");
609 else sprintf(str,"_cut");
611 fhQA[kCutP][i] = new TH1F(Form("%s_momentum%s",GetName(),str), "",fhNBinsMomentum-1,fhBinLimMomentum);
612 fhQA[kCutPt][i] = new TH1F(Form("%s_transverse_momentum%s",GetName(),str),"",fhNBinsPt-1,fhBinLimPt);
613 fhQA[kCutPx][i] = new TH1F(Form("%s_px%s",GetName(),str), "",fhNBinsPx-1,fhBinLimPx);
614 fhQA[kCutPy][i] = new TH1F(Form("%s_py%s",GetName(),str), "",fhNBinsPy-1,fhBinLimPy);
615 fhQA[kCutPz][i] = new TH1F(Form("%s_pz%s",GetName(),str), "",fhNBinsPz-1,fhBinLimPz);
616 fhQA[kCutRapidity][i]=new TH1F(Form("%s_rapidity%s",GetName(),str), "",fhNBinsRapidity-1,fhBinLimRapidity);
617 fhQA[kCutEta][i] = new TH1F(Form("%s_eta%s",GetName(),str), "",fhNBinsEta-1,fhBinLimEta);
618 fhQA[kCutPhi][i] = new TH1F(Form("%s_phi%s",GetName(),str), "",fhNBinsPhi-1,fhBinLimPhi);
619 fhQA[kCutCharge][i] = new TH1F(Form("%s_charge%s",GetName(),str), "",fhNBinsCharge-1,fhBinLimCharge);
621 fhQA[kCutP][i] ->SetXTitle("momentum p (GeV/c)");
622 fhQA[kCutPt][i] ->SetXTitle("p_{T} (GeV/c)");
623 fhQA[kCutPx][i] ->SetXTitle("p_{x} (GeV/c)");
624 fhQA[kCutPy][i] ->SetXTitle("p_{y} (GeV/c)");
625 fhQA[kCutPz][i] ->SetXTitle("p_{z} (GeV/c)");
626 fhQA[kCutRapidity][i]->SetXTitle("rapidity y");
627 fhQA[kCutEta][i] ->SetXTitle("pseudo rapidity #eta");
628 fhQA[kCutPhi][i] ->SetXTitle("azimuth #phi (rad)");
629 fhQA[kCutCharge][i] ->SetXTitle("charge");
631 for(Int_t i=0; i<kNHist; i++) fhQA[i][1]->SetLineColor(color);
633 //__________________________________________________________________________________
634 void AliCFTrackKineCuts::FillHistograms(TObject* obj, Bool_t b)
637 // fill the QA histograms
640 // cast TObject into VParticle
642 AliVParticle* particle = dynamic_cast<AliVParticle *>(obj);
643 if ( !particle ) return;
645 // b = 0: fill histograms before cuts
646 // b = 1: fill histograms after cuts
647 fhQA[kCutP][b]->Fill(particle->P());
648 fhQA[kCutPt][b]->Fill(particle->Pt());
649 fhQA[kCutPx][b]->Fill(particle->Px());
650 fhQA[kCutPy][b]->Fill(particle->Py());
651 fhQA[kCutPz][b]->Fill(particle->Pz());
652 fhQA[kCutRapidity][b]->Fill(particle->Y());
653 fhQA[kCutEta][b]->Fill(particle->Eta());
654 fhQA[kCutPhi][b]->Fill(particle->Phi());
655 fhQA[kCutCharge][b]->Fill((float)particle->Charge());
657 // fill cut statistics and cut correlation histograms with information from the bitmap
660 // Number of single cuts in this class
661 UInt_t ncuts = fBitmap->GetNbits();
662 for(UInt_t bit=0; bit<ncuts;bit++) {
663 if (!fBitmap->TestBitNumber(bit)) {
664 fhCutStatistics->Fill(bit+1);
665 for (UInt_t bit2=bit; bit2<ncuts;bit2++) {
666 if (!fBitmap->TestBitNumber(bit2))
667 fhCutCorrelation->Fill(bit+1,bit2+1);
672 //__________________________________________________________________________________
673 void AliCFTrackKineCuts::SaveHistograms(const Char_t* dir) {
675 // saves the histograms in a directory (dir)
682 gDirectory->mkdir(dir);
685 gDirectory->mkdir("before_cuts");
686 gDirectory->mkdir("after_cuts");
688 fhCutStatistics->Write();
689 fhCutCorrelation->Write();
691 for (Int_t j=0; j<kNStepQA; j++) {
693 gDirectory->cd("before_cuts");
695 gDirectory->cd("after_cuts");
697 for(Int_t i=0; i<kNHist; i++) fhQA[i][j]->Write();
699 gDirectory->cd("../");
701 gDirectory->cd("../");
703 //__________________________________________________________________________________
704 void AliCFTrackKineCuts::DrawHistograms(Bool_t drawLogScale)
707 // draws some histograms
712 Float_t right = 0.03;
713 Float_t left = 0.175;
715 Float_t bottom = 0.175;
717 TCanvas* canvas1 = new TCanvas("Track_QA_Kinematics_1", "Track QA Kinematics 1", 800, 500);
718 canvas1->Divide(2, 1);
721 fhCutStatistics->SetStats(kFALSE);
722 fhCutStatistics->LabelsOption("v");
723 gPad->SetLeftMargin(left);
724 gPad->SetBottomMargin(0.25);
725 gPad->SetRightMargin(right);
726 gPad->SetTopMargin(0.1);
727 fhCutStatistics->Draw();
730 fhCutCorrelation->SetStats(kFALSE);
731 fhCutCorrelation->LabelsOption("v");
732 gPad->SetLeftMargin(0.30);
733 gPad->SetRightMargin(bottom);
734 gPad->SetTopMargin(0.1);
735 gPad->SetBottomMargin(0.25);
736 fhCutCorrelation->Draw("COLZ");
738 canvas1->SaveAs(Form("%s.eps", canvas1->GetName()));
739 canvas1->SaveAs(Form("%s.ps", canvas1->GetName()));
743 TCanvas* canvas2 = new TCanvas("Track_QA_Kinematics_2", "Track QA Kinematics 2", 1600, 800);
744 canvas2->Divide(4, 2);
747 fhQA[kCutP][0]->SetStats(kFALSE);
748 if(drawLogScale) gPad->SetLogy();
749 gPad->SetRightMargin(right);
750 gPad->SetLeftMargin(left);
751 gPad->SetTopMargin(top);
752 gPad->SetBottomMargin(bottom);
753 fhQA[kCutP][0]->Draw();
754 fhQA[kCutP][1]->Draw("same");
757 fhQA[kCutPt][0]->SetStats(kFALSE);
758 if(drawLogScale) gPad->SetLogy();
759 gPad->SetRightMargin(right);
760 gPad->SetLeftMargin(left);
761 gPad->SetTopMargin(top);
762 gPad->SetBottomMargin(bottom);
763 fhQA[kCutPt][0]->Draw();
764 fhQA[kCutPt][1]->Draw("same");
767 fhQA[kCutRapidity][0]->SetStats(kFALSE);
768 if(drawLogScale) gPad->SetLogy();
769 gPad->SetRightMargin(right);
770 gPad->SetLeftMargin(left);
771 gPad->SetTopMargin(top);
772 gPad->SetBottomMargin(bottom);
773 fhQA[kCutRapidity][0]->Draw();
774 fhQA[kCutRapidity][1]->Draw("same");
777 fhQA[kCutEta][0]->SetStats(kFALSE);
778 if(drawLogScale) gPad->SetLogy();
779 gPad->SetRightMargin(right);
780 gPad->SetLeftMargin(left);
781 gPad->SetTopMargin(top);
782 gPad->SetBottomMargin(bottom);
783 fhQA[kCutEta][0]->Draw();
784 fhQA[kCutEta][1]->Draw("same");
787 fhQA[kCutPx][0]->SetStats(kFALSE);
788 if(drawLogScale) gPad->SetLogy();
789 gPad->SetRightMargin(right);
790 gPad->SetLeftMargin(left);
791 gPad->SetTopMargin(top);
792 gPad->SetBottomMargin(bottom);
793 fhQA[kCutPx][0]->Draw();
794 fhQA[kCutPx][1]->Draw("same");
797 fhQA[kCutPy][0]->SetStats(kFALSE);
798 if(drawLogScale) gPad->SetLogy();
799 gPad->SetRightMargin(right);
800 gPad->SetLeftMargin(left);
801 gPad->SetTopMargin(top);
802 gPad->SetBottomMargin(bottom);
803 fhQA[kCutPy][0]->Draw();
804 fhQA[kCutPy][1]->Draw("same");
807 fhQA[kCutPz][0]->SetStats(kFALSE);
808 if(drawLogScale) gPad->SetLogy();
809 gPad->SetRightMargin(right);
810 gPad->SetLeftMargin(left);
811 gPad->SetTopMargin(top);
812 gPad->SetBottomMargin(bottom);
813 fhQA[kCutPz][0]->Draw();
814 fhQA[kCutPz][1]->Draw("same");
816 canvas2->SaveAs(Form("%s.eps", canvas2->GetName()));
817 canvas2->SaveAs(Form("%s.ps", canvas2->GetName()));
821 TCanvas* canvas3 = new TCanvas("Track_QA_Kinematics_3", "Track QA Kinematics 3", 800, 400);
822 canvas3->Divide(2, 1);
825 gPad->SetRightMargin(right);
826 gPad->SetLeftMargin(left);
827 gPad->SetTopMargin(top);
828 gPad->SetBottomMargin(bottom);
829 fhQA[kCutPhi][0]->SetStats(kFALSE);
830 fhQA[kCutPhi][0]->Draw();
831 fhQA[kCutPhi][1]->Draw("same");
834 gPad->SetRightMargin(right);
835 gPad->SetLeftMargin(left);
836 gPad->SetTopMargin(top);
837 gPad->SetBottomMargin(bottom);
838 fhQA[kCutCharge][0]->SetStats(kFALSE);
839 fhQA[kCutCharge][0]->Draw();
840 fhQA[kCutCharge][1]->Draw("same");
842 canvas3->SaveAs(Form("%s.eps", canvas3->GetName()));
843 canvas3->SaveAs(Form("%s.ps", canvas3->GetName()));
845 //__________________________________________________________________________________
846 void AliCFTrackKineCuts::AddQAHistograms(TList *qaList) {
848 // saves the histograms in a TList
852 qaList->Add(fhCutStatistics);
853 qaList->Add(fhCutCorrelation);
855 for (Int_t j=0; j<kNStepQA; j++) {
856 for(Int_t i=0; i<kNHist; i++)
857 qaList->Add(fhQA[i][j]);