]>
Commit | Line | Data |
---|---|---|
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 | |
28 | // - successful TPC refit | |
29 | // - successful ITS refit | |
30 | // - covariance matrix diagonal elements | |
31 | // | |
32 | // The cut values for these cuts are set with the corresponding set functions. | |
33 | // All cut classes provided by the correction framework are supposed to be | |
34 | // added in the Analysis Framwork's class AliAnalysisFilter and applied by | |
35 | // the filter via a loop. | |
36 | // | |
37 | // author: I. Kraus (Ingrid.Kraus@cern.ch) | |
38 | // idea taken form | |
39 | // AliESDtrackCuts writte by Jan Fiete Grosse-Oetringhaus and | |
40 | // AliRsnDaughterCut class written by A. Pulvirenti. | |
41 | ||
42 | #ifndef ALICFTRACKQUALITYCUTS_H | |
43 | #define ALICFTRACKQUALITYCUTS_H | |
44 | ||
45 | #include "AliCFCutBase.h" | |
46 | ||
47 | class TH2; | |
48 | class TBits; | |
49 | class AliESDtrack ; | |
50 | ||
51 | class 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 | ||
61 | void GetBitMap(TObject* obj, TBits *bitmap) ; | |
62 | Bool_t IsSelected(TObject* obj); | |
63 | void Init(); | |
64 | ||
65 | // cut value setter | |
66 | void SetMinNClusterTPC(Int_t cluster=-1) {fMinNClusterTPC = cluster;} | |
67 | void SetMinNClusterITS(Int_t cluster=-1) {fMinNClusterITS = cluster;} | |
68 | void SetMaxChi2PerClusterTPC(Double_t chi=1e99) {fMaxChi2PerClusterTPC = chi;} | |
69 | void SetMaxChi2PerClusterITS(Double_t chi=1e99) {fMaxChi2PerClusterITS = chi;} | |
70 | void SetRequireTPCRefit(Bool_t b=kFALSE) {fRequireTPCRefit = b;} | |
71 | void SetRequireITSRefit(Bool_t b=kFALSE) {fRequireITSRefit = b;} | |
72 | void SetMaxCovDiagonalElements(Float_t c1=1e99, Float_t c2=1e99, Float_t c3=1e99, Float_t c4=1e99, Float_t c5=1e99) | |
73 | {fCovariance11Max=c1;fCovariance22Max=c2;fCovariance33Max=c3;fCovariance44Max=c4;fCovariance55Max=c5;} | |
74 | ||
75 | // QA histograms | |
76 | void FillHistogramsBeforeCuts(TObject* obj) {return FillHistograms(obj,kFALSE);} | |
77 | void FillHistogramsAfterCuts(TObject* obj) {return FillHistograms(obj,kTRUE);} | |
78 | void DrawHistograms(Bool_t drawLogScale=kTRUE); | |
79 | void SaveHistograms(const Char_t* dir = 0); | |
80 | void AddQAHistograms(TList *qaList) const; | |
81 | // QA histogram setter | |
82 | // please use indices from the enumeration below | |
83 | void SetHistogramBins(Int_t index, Int_t nbins, Double_t *bins); | |
84 | void SetHistogramBins(Int_t index, Int_t nbins, Double_t xmin, Double_t xmax); | |
85 | ||
86 | // indeces/counters for single selections | |
87 | enum { | |
88 | kCutClusterTPC=0, // number of clusters in TPC | |
89 | kCutClusterITS, // number of clusters in ITS | |
90 | kCutChi2TPC, // chi2 per cluster in TPC | |
91 | kCutChi2ITS, // chi2 per cluster in ITS | |
92 | kCutRefitTPC, // require TPC refit | |
93 | kCutRefitITS, // require ITS refit | |
94 | kCutCovElement11, // diagonal element 11 of covariance matrix | |
95 | kCutCovElement22, // diagonal element 22 of covariance matrix | |
96 | kCutCovElement33, // diagonal element 33 of covariance matrix | |
97 | kCutCovElement44, // diagonal element 44 of covariance matrix | |
98 | kCutCovElement55, // diagonal element 55 of covariance matrix | |
99 | kNCuts=11, // number of single selections | |
100 | kNStepQA=2, // number of QA steps (before/after the cuts) | |
101 | kNHist=11 // number of QA histograms | |
102 | }; | |
103 | ||
104 | private: | |
105 | TBits* SelectionBitMap(TObject* obj); | |
106 | void DefineHistograms(); // books histograms and TList | |
107 | void Initialise(); // sets everything to 0 | |
108 | void FillHistograms(TObject* obj, Bool_t b); | |
109 | // Fills histograms before and after cuts | |
110 | Double_t fMinNClusterTPC; // min number of clusters in TPC | |
111 | Double_t fMinNClusterITS; // min number of clusters in ITS | |
112 | Double_t fMaxChi2PerClusterTPC; // max chi2 per clusters in TPC | |
113 | Double_t fMaxChi2PerClusterITS; // max chi2 per clusters in ITS | |
114 | Bool_t fRequireTPCRefit; // require TPC refit | |
115 | Bool_t fRequireITSRefit; // require ITS refit | |
116 | ||
117 | Double_t fCovariance11Max ; // max covariance matrix element 11 | |
118 | Double_t fCovariance22Max ; // max covariance matrix element 22 | |
119 | Double_t fCovariance33Max ; // max covariance matrix element 33 | |
120 | Double_t fCovariance44Max ; // max covariance matrix element 44 | |
121 | Double_t fCovariance55Max ; // max covariance matrix element 55 | |
122 | ||
123 | TH1F* fhCutStatistics; // Histogram: statistics of what cuts the tracks did not survive | |
124 | TH2F* fhCutCorrelation; // Histogram: 2d statistics plot | |
125 | ||
126 | TH1F* fhQA[kNHist][kNStepQA]; // QA Histograms | |
127 | TBits *fBitmap ; // stores single selection decisions | |
128 | ||
129 | // QA histogram setters | |
130 | Int_t fhNBinsClusterTPC; // number of bins: cluster TPC | |
131 | Int_t fhNBinsClusterITS; // number of bins: cluster ITS | |
132 | Int_t fhNBinsChi2TPC; // number of bins: chi2 per cluster TPC | |
133 | Int_t fhNBinsChi2ITS; // number of bins: chi2 per cluster ITS | |
134 | Int_t fhNBinsRefitTPC; // number of bins: require refit TPC | |
135 | Int_t fhNBinsRefitITS; // number of bins: require refit ITS | |
136 | Int_t fhNBinsCovariance11; // number of bins: covariance matrix element 11 | |
137 | Int_t fhNBinsCovariance22; // number of bins: covariance matrix element 22 | |
138 | Int_t fhNBinsCovariance33; // number of bins: covariance matrix element 33 | |
139 | Int_t fhNBinsCovariance44; // number of bins: covariance matrix element 44 | |
140 | Int_t fhNBinsCovariance55; // number of bins: covariance matrix element 55 | |
141 | ||
142 | Double_t *fhBinLimClusterTPC; // bin limits: cluster TPC | |
143 | Double_t *fhBinLimClusterITS; // bin limits: cluster ITS | |
144 | Double_t *fhBinLimChi2TPC; // bin limits: chi2 per cluster TPC | |
145 | Double_t *fhBinLimChi2ITS; // bin limits: chi2 per cluster ITS | |
146 | Double_t *fhBinLimRefitTPC; // bin limits: require refit TPC | |
147 | Double_t *fhBinLimRefitITS; // bin limits: require refit ITS | |
148 | Double_t *fhBinLimCovariance11; // bin limits: covariance matrix element 11 | |
149 | Double_t *fhBinLimCovariance22; // bin limits: covariance matrix element 22 | |
150 | Double_t *fhBinLimCovariance33; // bin limits: covariance matrix element 33 | |
151 | Double_t *fhBinLimCovariance44; // bin limits: covariance matrix element 44 | |
152 | Double_t *fhBinLimCovariance55; // bin limits: covariance matrix element 55 | |
153 | ||
154 | ClassDef(AliCFTrackQualityCuts,1); | |
155 | }; | |
156 | ||
157 | #endif |