]> git.uio.no Git - u/mrichter/AliRoot.git/blame - CORRFW/AliCFTrackQualityCuts.h
Added TRD for the most basic operations (# of clusters, chi2/cluster)
[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:
24// - number of clusters in the TPC
25// - number of clusters in the ITS
26// - chi2 / cluster in the TPC
27// - chi2 / cluster in the ITS
563113d0 28// - covariance matrix diagonal elements
8edd0c2c 29// - track status (cf AliESDtrack.h)
563113d0 30//
31// The cut values for these cuts are set with the corresponding set functions.
32// All cut classes provided by the correction framework are supposed to be
33// added in the Analysis Framwork's class AliAnalysisFilter and applied by
34// the filter via a loop.
35//
36// author: I. Kraus (Ingrid.Kraus@cern.ch)
37// idea taken form
38// AliESDtrackCuts writte by Jan Fiete Grosse-Oetringhaus and
39// AliRsnDaughterCut class written by A. Pulvirenti.
40
41#ifndef ALICFTRACKQUALITYCUTS_H
42#define ALICFTRACKQUALITYCUTS_H
43
44#include "AliCFCutBase.h"
45
2fbc0b17 46class TH2F ;
47class TH1F ;
563113d0 48class TBits;
49class AliESDtrack ;
50
51class AliCFTrackQualityCuts : public AliCFCutBase
52{
53 public :
54 AliCFTrackQualityCuts() ;
55 AliCFTrackQualityCuts(Char_t* name, Char_t* title) ;
56 AliCFTrackQualityCuts(const AliCFTrackQualityCuts& c) ;
57 AliCFTrackQualityCuts& operator=(const AliCFTrackQualityCuts& c) ;
58 ~AliCFTrackQualityCuts();
59 void Copy(TObject &c) const;
60
563113d0 61 Bool_t IsSelected(TObject* obj);
264ebaac 62 Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
563113d0 63
64 // cut value setter
65 void SetMinNClusterTPC(Int_t cluster=-1) {fMinNClusterTPC = cluster;}
66 void SetMinNClusterITS(Int_t cluster=-1) {fMinNClusterITS = cluster;}
18274103 67 void SetMinNClusterTRD(Int_t cluster=-1) {fMinNClusterTRD = cluster;}
563113d0 68 void SetMaxChi2PerClusterTPC(Double_t chi=1e99) {fMaxChi2PerClusterTPC = chi;}
69 void SetMaxChi2PerClusterITS(Double_t chi=1e99) {fMaxChi2PerClusterITS = chi;}
18274103 70 void SetMaxChi2PerClusterTRD(Double_t chi=1e99) {fMaxChi2PerClusterTRD = chi;}
563113d0 71 void SetMaxCovDiagonalElements(Float_t c1=1e99, Float_t c2=1e99, Float_t c3=1e99, Float_t c4=1e99, Float_t c5=1e99)
72{fCovariance11Max=c1;fCovariance22Max=c2;fCovariance33Max=c3;fCovariance44Max=c4;fCovariance55Max=c5;}
8edd0c2c 73 void SetStatus(ULong_t status=0) {fStatus = status ;}
563113d0 74
75 // QA histograms
563113d0 76 void DrawHistograms(Bool_t drawLogScale=kTRUE);
77 void SaveHistograms(const Char_t* dir = 0);
107a3100 78 void AddQAHistograms(TList *qaList);
563113d0 79 // QA histogram setter
80 // please use indices from the enumeration below
81 void SetHistogramBins(Int_t index, Int_t nbins, Double_t *bins);
82 void SetHistogramBins(Int_t index, Int_t nbins, Double_t xmin, Double_t xmax);
83
84 // indeces/counters for single selections
85 enum {
86 kCutClusterTPC=0, // number of clusters in TPC
87 kCutClusterITS, // number of clusters in ITS
18274103 88 kCutClusterTRD, // number of clusters in TRD
563113d0 89 kCutChi2TPC, // chi2 per cluster in TPC
90 kCutChi2ITS, // chi2 per cluster in ITS
18274103 91 kCutChi2TRD, // chi2 per cluster in TRD
563113d0 92 kCutCovElement11, // diagonal element 11 of covariance matrix
93 kCutCovElement22, // diagonal element 22 of covariance matrix
94 kCutCovElement33, // diagonal element 33 of covariance matrix
95 kCutCovElement44, // diagonal element 44 of covariance matrix
96 kCutCovElement55, // diagonal element 55 of covariance matrix
8edd0c2c 97 kCutStatus, // track status
18274103 98 kNCuts, // number of single selections
563113d0 99 kNStepQA=2, // number of QA steps (before/after the cuts)
18274103 100 kNHist=11 // number of QA histograms
563113d0 101 };
102
103 private:
107a3100 104 void SelectionBitMap(TObject* obj);
563113d0 105 void DefineHistograms(); // books histograms and TList
106 void Initialise(); // sets everything to 0
107 void FillHistograms(TObject* obj, Bool_t b);
108 // Fills histograms before and after cuts
109 Double_t fMinNClusterTPC; // min number of clusters in TPC
110 Double_t fMinNClusterITS; // min number of clusters in ITS
18274103 111 Double_t fMinNClusterTRD; // min number of clusters in TRD
563113d0 112 Double_t fMaxChi2PerClusterTPC; // max chi2 per clusters in TPC
113 Double_t fMaxChi2PerClusterITS; // max chi2 per clusters in ITS
18274103 114 Double_t fMaxChi2PerClusterTRD; // max chi2 per clusters in TRD
563113d0 115
116 Double_t fCovariance11Max ; // max covariance matrix element 11
117 Double_t fCovariance22Max ; // max covariance matrix element 22
118 Double_t fCovariance33Max ; // max covariance matrix element 33
119 Double_t fCovariance44Max ; // max covariance matrix element 44
120 Double_t fCovariance55Max ; // max covariance matrix element 55
121
8edd0c2c 122 ULong_t fStatus; // track status
123
666c7408 124 TH1F* fhCutStatistics; // Histogram: statistics of what cuts the tracks did not survive
125 TH2F* fhCutCorrelation; // Histogram: 2d statistics plot
563113d0 126
127 TH1F* fhQA[kNHist][kNStepQA]; // QA Histograms
666c7408 128 TBits *fBitmap ; // stores single selection decisions
563113d0 129
130 // QA histogram setters
db6722a5 131 Int_t fhNBinsClusterTPC; // number of bins+1: cluster TPC
132 Int_t fhNBinsClusterITS; // number of bins+1: cluster ITS
18274103 133 Int_t fhNBinsClusterTRD; // number of bins+1: cluster TRD
db6722a5 134 Int_t fhNBinsChi2TPC; // number of bins+1: chi2 per cluster TPC
135 Int_t fhNBinsChi2ITS; // number of bins+1: chi2 per cluster ITS
18274103 136 Int_t fhNBinsChi2TRD; // number of bins+1: chi2 per cluster TRD
db6722a5 137 Int_t fhNBinsCovariance11; // number of bins+1: covariance matrix element 11
138 Int_t fhNBinsCovariance22; // number of bins+1: covariance matrix element 22
139 Int_t fhNBinsCovariance33; // number of bins+1: covariance matrix element 33
140 Int_t fhNBinsCovariance44; // number of bins+1: covariance matrix element 44
141 Int_t fhNBinsCovariance55; // number of bins+1: covariance matrix element 55
666c7408 142
143 Double_t *fhBinLimClusterTPC; //[fhNBinsClusterTPC] bin limits: cluster TPC
144 Double_t *fhBinLimClusterITS; //[fhNBinsClusterITS] bin limits: cluster ITS
18274103 145 Double_t *fhBinLimClusterTRD; //[fhNBinsClusterTRD] bin limits: cluster TRD
666c7408 146 Double_t *fhBinLimChi2TPC; //[fhNBinsChi2TPC] bin limits: chi2 per cluster TPC
147 Double_t *fhBinLimChi2ITS; //[fhNBinsChi2ITS] bin limits: chi2 per cluster ITS
18274103 148 Double_t *fhBinLimChi2TRD; //[fhNBinsChi2TRD] bin limits: chi2 per cluster TRD
666c7408 149 Double_t *fhBinLimCovariance11;//[fhNBinsCovariance11] bin limits: covariance matrix element 11
150 Double_t *fhBinLimCovariance22;//[fhNBinsCovariance22] bin limits: covariance matrix element 22
151 Double_t *fhBinLimCovariance33;//[fhNBinsCovariance33] bin limits: covariance matrix element 33
152 Double_t *fhBinLimCovariance44;//[fhNBinsCovariance44] bin limits: covariance matrix element 44
153 Double_t *fhBinLimCovariance55;//[fhNBinsCovariance55] bin limits: covariance matrix element 55
154
18274103 155 ClassDef(AliCFTrackQualityCuts,4);
563113d0 156};
157
158#endif