]>
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 AliCFTrackIsPrimaryCut is designed to select reconstructed tracks | |
17 | // with a small impact parameter and tracks which are (not) daughters of kink | |
18 | // decays and to provide corresponding QA histograms. | |
19 | // This class inherits from the Analysis' Framework abstract base class | |
20 | // AliAnalysisCuts and is a part of the Correction Framework. | |
21 | // This class acts on single, reconstructed tracks, it is applicable on | |
22 | // ESD and AOD data. | |
23 | // It mainly consists of a IsSelected function that returns a boolean. | |
24 | // This function checks whether the considered track passes a set of cuts: | |
25 | // - distance to main vertex in units of sigma (resolution) | |
26 | // - require that the dca calculation doesn't fail | |
27 | // - accept or not accept daughter tracks of kink decays | |
28 | // | |
29 | // The cut values for these cuts are set with the corresponding set functions. | |
30 | // All cut classes provided by the correction framework are supposed to be | |
31 | // added in the Analysis Framwork's class AliAnalysisFilter and applied by | |
32 | // the filter via a loop. | |
33 | // | |
34 | // author: I. Kraus (Ingrid.Kraus@cern.ch) | |
35 | // idea taken form | |
36 | // AliESDtrackCuts writte by Jan Fiete Grosse-Oetringhaus and | |
37 | // AliRsnDaughterCut class written by A. Pulvirenti. | |
38 | ||
39 | #ifndef ALICFTRACKISPRIMARYCUTS_H | |
40 | #define ALICFTRACKISPRIMARYCUTS_H | |
41 | ||
42 | #include "AliCFCutBase.h" | |
43 | ||
045e6d86 | 44 | #include <TH2.h> |
45 | // class TH2 ; | |
563113d0 | 46 | class TBits; |
563113d0 | 47 | class AliESDtrack ; |
48 | ||
49 | class AliCFTrackIsPrimaryCuts : public AliCFCutBase | |
50 | { | |
51 | public : | |
52 | AliCFTrackIsPrimaryCuts() ; | |
53 | AliCFTrackIsPrimaryCuts(Char_t* name, Char_t* title) ; | |
54 | AliCFTrackIsPrimaryCuts(const AliCFTrackIsPrimaryCuts& c) ; | |
55 | AliCFTrackIsPrimaryCuts& operator=(const AliCFTrackIsPrimaryCuts& c) ; | |
56 | ~AliCFTrackIsPrimaryCuts(); | |
57 | void Copy(TObject &c) const; | |
58 | ||
59 | void GetBitMap(TObject* obj, TBits *bitmap); | |
60 | Bool_t IsSelected(TObject* obj); | |
61 | void Init(); | |
62 | Float_t GetSigmaToVertex(AliESDtrack* esdTrack) const; | |
63 | ||
64 | // cut value setter | |
65 | void SetMaxNSigmaToVertex(Double_t sigma=3) {fNSigmaToVertexMax = sigma;} | |
66 | void SetRequireSigmaToVertex(Bool_t b=kTRUE) {fRequireSigmaToVertex=b;} | |
67 | void SetAcceptKinkDaughters(Bool_t b=kTRUE) {fAcceptKinkDaughters=b;} | |
68 | ||
69 | // QA histograms | |
70 | void FillHistogramsBeforeCuts(TObject* obj) {return FillHistograms(obj,kFALSE);} | |
71 | void FillHistogramsAfterCuts(TObject* obj) {return FillHistograms(obj,kTRUE);} | |
72 | void DrawHistograms(); | |
73 | void SaveHistograms(const Char_t* dir = 0); | |
74 | void AddQAHistograms(TList *qaList) const; | |
75 | // QA histogram setter | |
76 | // please use indices from the enumeration below | |
77 | void SetHistogramBins(Int_t index, Int_t nbins, Double_t *bins); | |
78 | void SetHistogramBins(Int_t index, Int_t nbins, Double_t xmin, Double_t xmax); | |
79 | ||
80 | // indeces/counters for single selections | |
81 | enum { | |
82 | kCutNSigmaToVertex=0, // tracks's distance to main vertex in units of sigma | |
83 | kCutRequireSigmaToVertex, // calculation is successful | |
84 | kCutAcceptKinkDaughters, // do (not) accept secondaries | |
85 | kDcaXY, // controll histogram: dca in xy plane | |
86 | kDcaZ, // controll histogram: dca along z axis | |
87 | kDcaXYnorm, // controll histogram: normalised dca in xy plane | |
88 | kDcaZnorm, // controll histogram: normalised dca along z axis | |
89 | kNCuts=3, // number of single selections | |
90 | kNStepQA=2, // number of QA steps (before/after the cuts) | |
91 | kNHist=7 // number of QA histograms | |
92 | }; | |
93 | ||
94 | private: | |
95 | TBits* SelectionBitMap(TObject* obj); | |
96 | void DefineHistograms(); // books histograms and TList | |
97 | void Initialise(); // sets everything to 0 | |
98 | void FillHistograms(TObject* obj, Bool_t b); | |
99 | // Fills histograms before and after cuts | |
100 | Double_t fNSigmaToVertexMax; // max distance to main vertex in units of sigma | |
101 | Bool_t fRequireSigmaToVertex; // require calculable distance to main vertex | |
102 | ||
103 | TH2F* fhDcaXYvsDcaZ[2]; // Histogram: dca xy vs. z | |
104 | TH2F* fhDcaXYvsDcaZnorm[2]; // Histogram: (dca xy / sigma xy) vs. (dca z / simga z) | |
105 | Bool_t fAcceptKinkDaughters; // accepting kink daughters | |
106 | ||
045e6d86 | 107 | TH1F* fhCutStatistics; // Histogram: statistics of what cuts the tracks did not survive |
108 | TH2F* fhCutCorrelation; // Histogram: 2d statistics plot | |
563113d0 | 109 | |
110 | TH1F* fhQA[kNHist][kNStepQA]; // QA Histograms | |
045e6d86 | 111 | TBits *fBitmap ; // stores single selection decisions |
563113d0 | 112 | |
113 | // QA histogram setters | |
db6722a5 | 114 | Int_t fhNBinsNSigma; // number of bins+1: dca in units of sigma |
115 | Int_t fhNBinsRequireSigma; // number of bins+1: require successful calcuation | |
116 | Int_t fhNBinsAcceptKink; // number of bins+1: acceptkink daughters | |
117 | Int_t fhNBinsDcaXY; // number of bins+1: dca in transverse plane | |
118 | Int_t fhNBinsDcaZ; // number of bins+1: dca along beam axis | |
119 | Int_t fhNBinsDcaXYnorm; // number of bins+1: normalised dca in transverse plane | |
120 | Int_t fhNBinsDcaZnorm; // number of bins+1: normalised dca along beam axis | |
045e6d86 | 121 | |
122 | Double_t *fhBinLimNSigma; //[fhNBinsNSigma] bin limits: dca in units of sigma | |
123 | Double_t *fhBinLimRequireSigma;//[fhNBinsRequireSigma] bin limits: require successful calcuation | |
124 | Double_t *fhBinLimAcceptKink;//[fhNBinsAcceptKink] bin limits: acceptkink daughters | |
125 | Double_t *fhBinLimDcaXY;//[fhNBinsDcaXY] bin limits: dca in transverse plane | |
126 | Double_t *fhBinLimDcaZ; //[fhNBinsDcaZ] bin limits: dca along beam axis | |
127 | Double_t *fhBinLimDcaXYnorm; //[fhNBinsDcaXYnorm] bin limits: normalised dca in transverse plane | |
128 | Double_t *fhBinLimDcaZnorm;//[fhNBinsDcaZnorm] bin limits: normalised dca along beam axis | |
129 | ||
130 | ClassDef(AliCFTrackIsPrimaryCuts,2); | |
563113d0 | 131 | }; |
132 | ||
133 | #endif |