]> git.uio.no Git - u/mrichter/AliRoot.git/blame - CORRFW/AliCFTrackQualityCuts.h
Script to draw occupancies
[u/mrichter/AliRoot.git] / CORRFW / AliCFTrackQualityCuts.h
CommitLineData
563113d0 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16// The class AliCFTrackQualityCuts is designed to select reconstructed tracks
17// of high quality and to provide corresponding QA histograms.
18// This class inherits from the Analysis' Framework abstract base class
19// AliAnalysisCuts and is a part of the Correction Framework.
20// This class acts on single, reconstructed tracks, it is applicable on
21// ESD and AOD data.
22// It mainly consists of a IsSelected function that returns a boolean.
23// This function checks whether the considered track passes a set of cuts:
563113d0 24// - number of clusters in the ITS
65e7777d 25// - number of clusters in the TPC
26// - number of clusters in the TRD
27// - ratio of found / finable number of clusters in the TPC
28// - number of tracklets in the TRD
29// - number TRD tracklets used for pid
563113d0 30// - chi2 / cluster in the ITS
65e7777d 31// - chi2 / cluster in the TPC
32// - chi2 / tracklet in the TRD
c2c45ca4 33// - number of clusters in the TPC used for dEdx calculation
563113d0 34// - covariance matrix diagonal elements
8edd0c2c 35// - track status (cf AliESDtrack.h)
563113d0 36//
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.
41//
42// author: I. Kraus (Ingrid.Kraus@cern.ch)
43// idea taken form
44// AliESDtrackCuts writte by Jan Fiete Grosse-Oetringhaus and
45// AliRsnDaughterCut class written by A. Pulvirenti.
46
47#ifndef ALICFTRACKQUALITYCUTS_H
48#define ALICFTRACKQUALITYCUTS_H
49
50#include "AliCFCutBase.h"
51
c2c45ca4 52class TH2F;
53class TH1F;
563113d0 54class TBits;
c2c45ca4 55class AliESDtrack;
56class AliESDtrackCuts;
563113d0 57
58class AliCFTrackQualityCuts : public AliCFCutBase
59{
60 public :
61 AliCFTrackQualityCuts() ;
62 AliCFTrackQualityCuts(Char_t* name, Char_t* title) ;
63 AliCFTrackQualityCuts(const AliCFTrackQualityCuts& c) ;
64 AliCFTrackQualityCuts& operator=(const AliCFTrackQualityCuts& c) ;
65 ~AliCFTrackQualityCuts();
66 void Copy(TObject &c) const;
67
9eeae5d5 68 Bool_t IsSelected(TObject* obj);
69 Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
563113d0 70
71 // cut value setter
72 void SetMinNClusterTPC(Int_t cluster=-1) {fMinNClusterTPC = cluster;}
73 void SetMinNClusterITS(Int_t cluster=-1) {fMinNClusterITS = cluster;}
18274103 74 void SetMinNClusterTRD(Int_t cluster=-1) {fMinNClusterTRD = cluster;}
65e7777d 75 void SetMinFoundClusterTPC(Double_t fraction=-1) {fMinFoundClusterTPC = fraction;}
76 void SetMinNTrackletTRD(Int_t tracklet=-1) {fMinNTrackletTRD = tracklet;}
77 void SetMinNTrackletTRDpid(Int_t tracklet=-1) {fMinNTrackletTRDpid = tracklet;}
78 void SetMaxChi2PerClusterTPC(Double_t chi=1.e+09) {fMaxChi2PerClusterTPC = chi;}
79 void SetMaxChi2PerClusterITS(Double_t chi=1.e+09) {fMaxChi2PerClusterITS = chi;}
80 void SetMaxChi2PerTrackletTRD(Double_t chi=1.e+09) {fMaxChi2PerTrackletTRD = chi;}
c2c45ca4 81 void SetMinNdEdxClusterTPC(UShort_t cluster=0) {fMinNdEdxClusterTPC = cluster;}
65e7777d 82 void SetMaxCovDiagonalElements(Float_t c1=1.e+09, Float_t c2=1.e+09, Float_t c3=1.e+09, Float_t c4=1.e+09, Float_t c5=1.e+09)
563113d0 83{fCovariance11Max=c1;fCovariance22Max=c2;fCovariance33Max=c3;fCovariance44Max=c4;fCovariance55Max=c5;}
8edd0c2c 84 void SetStatus(ULong_t status=0) {fStatus = status ;}
563113d0 85
86 // QA histograms
563113d0 87 void DrawHistograms(Bool_t drawLogScale=kTRUE);
88 void SaveHistograms(const Char_t* dir = 0);
107a3100 89 void AddQAHistograms(TList *qaList);
563113d0 90 // QA histogram setter
91 // please use indices from the enumeration below
92 void SetHistogramBins(Int_t index, Int_t nbins, Double_t *bins);
93 void SetHistogramBins(Int_t index, Int_t nbins, Double_t xmin, Double_t xmax);
94
95 // indeces/counters for single selections
96 enum {
97 kCutClusterTPC=0, // number of clusters in TPC
98 kCutClusterITS, // number of clusters in ITS
18274103 99 kCutClusterTRD, // number of clusters in TRD
65e7777d 100 kCutMinFoundClusterTPC, // ratio found / findable number of clusters in TPC
101 kCutTrackletTRD, // number of tracklets in TRD
102 kCutTrackletTRDpid, // tracklets for TRD pid
563113d0 103 kCutChi2TPC, // chi2 per cluster in TPC
104 kCutChi2ITS, // chi2 per cluster in ITS
18274103 105 kCutChi2TRD, // chi2 per cluster in TRD
c2c45ca4 106 kCutdEdxClusterTPC, // number of points used for dEdx
563113d0 107 kCutCovElement11, // diagonal element 11 of covariance matrix
108 kCutCovElement22, // diagonal element 22 of covariance matrix
109 kCutCovElement33, // diagonal element 33 of covariance matrix
110 kCutCovElement44, // diagonal element 44 of covariance matrix
111 kCutCovElement55, // diagonal element 55 of covariance matrix
8edd0c2c 112 kCutStatus, // track status
18274103 113 kNCuts, // number of single selections
563113d0 114 kNStepQA=2, // number of QA steps (before/after the cuts)
c2c45ca4 115 kNHist=15 // number of QA histograms
563113d0 116 };
117
118 private:
107a3100 119 void SelectionBitMap(TObject* obj);
563113d0 120 void DefineHistograms(); // books histograms and TList
121 void Initialise(); // sets everything to 0
122 void FillHistograms(TObject* obj, Bool_t b);
123 // Fills histograms before and after cuts
c2c45ca4 124 Int_t fMinNClusterTPC; // min number of clusters in TPC
125 Int_t fMinNClusterITS; // min number of clusters in ITS
18274103 126 Double_t fMinNClusterTRD; // min number of clusters in TRD
65e7777d 127 Double_t fMinFoundClusterTPC; // min ratio found / findable number of clusters in TPC
128 Double_t fMinNTrackletTRD; // min number of tracklets in TRD
129 Double_t fMinNTrackletTRDpid; // min number of tracklets for TRD pid
563113d0 130 Double_t fMaxChi2PerClusterTPC; // max chi2 per clusters in TPC
131 Double_t fMaxChi2PerClusterITS; // max chi2 per clusters in ITS
65e7777d 132 Double_t fMaxChi2PerTrackletTRD; // max chi2 per clusters in TRD
c2c45ca4 133 UShort_t fMinNdEdxClusterTPC; // number of points used for dEdx
563113d0 134 Double_t fCovariance11Max ; // max covariance matrix element 11
135 Double_t fCovariance22Max ; // max covariance matrix element 22
136 Double_t fCovariance33Max ; // max covariance matrix element 33
137 Double_t fCovariance44Max ; // max covariance matrix element 44
138 Double_t fCovariance55Max ; // max covariance matrix element 55
139
8edd0c2c 140 ULong_t fStatus; // track status
141
666c7408 142 TH1F* fhCutStatistics; // Histogram: statistics of what cuts the tracks did not survive
143 TH2F* fhCutCorrelation; // Histogram: 2d statistics plot
563113d0 144
145 TH1F* fhQA[kNHist][kNStepQA]; // QA Histograms
666c7408 146 TBits *fBitmap ; // stores single selection decisions
c2c45ca4 147 AliESDtrackCuts *fTrackCuts; // use some functionality from this class
563113d0 148
149 // QA histogram setters
db6722a5 150 Int_t fhNBinsClusterTPC; // number of bins+1: cluster TPC
151 Int_t fhNBinsClusterITS; // number of bins+1: cluster ITS
18274103 152 Int_t fhNBinsClusterTRD; // number of bins+1: cluster TRD
65e7777d 153 Int_t fhNBinsFoundClusterTPC; // number of bins+1: ratio found / findable number of clusters in TPC
154 Int_t fhNBinsTrackletTRD; // number of bins+1: number of tracklets in TRD
155 Int_t fhNBinsTrackletTRDpid; // number of bins+1: number of tracklets for TRD pid
db6722a5 156 Int_t fhNBinsChi2TPC; // number of bins+1: chi2 per cluster TPC
157 Int_t fhNBinsChi2ITS; // number of bins+1: chi2 per cluster ITS
18274103 158 Int_t fhNBinsChi2TRD; // number of bins+1: chi2 per cluster TRD
c2c45ca4 159 Int_t fhNBinsdEdxClusterTPC; // number of bins+1: cluster TPC used for dEdx
db6722a5 160 Int_t fhNBinsCovariance11; // number of bins+1: covariance matrix element 11
161 Int_t fhNBinsCovariance22; // number of bins+1: covariance matrix element 22
162 Int_t fhNBinsCovariance33; // number of bins+1: covariance matrix element 33
163 Int_t fhNBinsCovariance44; // number of bins+1: covariance matrix element 44
164 Int_t fhNBinsCovariance55; // number of bins+1: covariance matrix element 55
666c7408 165
166 Double_t *fhBinLimClusterTPC; //[fhNBinsClusterTPC] bin limits: cluster TPC
167 Double_t *fhBinLimClusterITS; //[fhNBinsClusterITS] bin limits: cluster ITS
18274103 168 Double_t *fhBinLimClusterTRD; //[fhNBinsClusterTRD] bin limits: cluster TRD
65e7777d 169 Double_t *fhBinLimFoundClusterTPC;//[fhNBinsFoundClusterTPC] bin limits: ratio found / findable number of clusters in TPC
d257cc38 170 Double_t *fhBinLimTrackletTRD; //[fhNBinsTrackletTRD] bin limits: number of tracklets in TRD
171 Double_t *fhBinLimTrackletTRDpid; //[fhNBinsTrackletTRDpid] bin limits: number of tracklets for TRD pid
666c7408 172 Double_t *fhBinLimChi2TPC; //[fhNBinsChi2TPC] bin limits: chi2 per cluster TPC
173 Double_t *fhBinLimChi2ITS; //[fhNBinsChi2ITS] bin limits: chi2 per cluster ITS
18274103 174 Double_t *fhBinLimChi2TRD; //[fhNBinsChi2TRD] bin limits: chi2 per cluster TRD
c2c45ca4 175 Double_t *fhBinLimdEdxClusterTPC; //[fhNBinsdEdxClusterTPC] bin limits: cluster TPC used for dEdx
666c7408 176 Double_t *fhBinLimCovariance11;//[fhNBinsCovariance11] bin limits: covariance matrix element 11
177 Double_t *fhBinLimCovariance22;//[fhNBinsCovariance22] bin limits: covariance matrix element 22
178 Double_t *fhBinLimCovariance33;//[fhNBinsCovariance33] bin limits: covariance matrix element 33
179 Double_t *fhBinLimCovariance44;//[fhNBinsCovariance44] bin limits: covariance matrix element 44
180 Double_t *fhBinLimCovariance55;//[fhNBinsCovariance55] bin limits: covariance matrix element 55
181
18274103 182 ClassDef(AliCFTrackQualityCuts,4);
563113d0 183};
184
185#endif