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 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
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 // - min. and max. distance to main vertex in transverse plane (xy)
26 // - min. and max. longitudinal distance to main vertex (z)
27 // - min. and max. distance to main vertex as ellpise in xy - z plane
28 // - all above cuts on absolute values or in units of sigma (resolution)
29 // - min. and max. distance to main vertex in units of sigma (resolution)
30 // - max. transverse (xy) and longitudinal (z) impact parameter resolution
31 // - require that the dca calculation doesn't fail
32 // - accept or not accept daughter tracks of kink decays
34 // By default, the distance to 'vertex calculated from tracks' is used.
35 // Optionally the TPC (TPC only tracks based) vertex can be used.
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.
47 #ifndef ALICFTRACKISPRIMARYCUTS_H
48 #define ALICFTRACKISPRIMARYCUTS_H
50 #include "AliCFCutBase.h"
51 #include "AliAODTrack.h"
53 #include "AliESDtrackCuts.h"
57 class AliCFTrackIsPrimaryCuts : public AliCFCutBase
60 AliCFTrackIsPrimaryCuts() ;
61 AliCFTrackIsPrimaryCuts(Char_t* name, Char_t* title) ;
62 AliCFTrackIsPrimaryCuts(const AliCFTrackIsPrimaryCuts& c) ;
63 AliCFTrackIsPrimaryCuts& operator=(const AliCFTrackIsPrimaryCuts& c) ;
64 ~AliCFTrackIsPrimaryCuts();
65 void Copy(TObject &c) const;
67 Bool_t IsSelected(TObject* obj);
68 Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
71 void UseTPCvertex(Bool_t b=kFALSE) {fUseTPCvertex = b;}
72 void SetMinDCAToVertexXY(Float_t dist=0.) {fMinDCAToVertexXY = dist;}
73 void SetMinDCAToVertexZ(Float_t dist=0.) {fMinDCAToVertexZ = dist;}
74 void SetMaxDCAToVertexXY(Float_t dist=1e10) {fMaxDCAToVertexXY = dist;}
75 void SetMaxDCAToVertexZ(Float_t dist=1e10) {fMaxDCAToVertexZ = dist;}
76 void SetDCAToVertex2D(Bool_t b=kFALSE) {fDCAToVertex2D = b;}
77 void SetAbsDCAToVertex(Bool_t b=kTRUE) {fAbsDCAToVertex = b;}
78 void SetMinNSigmaToVertex(Double_t sigmaMin=0.) {fNSigmaToVertexMin = sigmaMin;}
79 void SetMaxNSigmaToVertex(Double_t sigmaMax=1.e+10) {fNSigmaToVertexMax = sigmaMax;}
80 void SetMaxSigmaDCAxy(Double_t sigmaMax=1.e+10) {fSigmaDCAxy = sigmaMax;}
81 void SetMaxSigmaDCAz(Double_t sigmaMax=1.e+10) {fSigmaDCAz = sigmaMax;}
82 void SetRequireSigmaToVertex(Bool_t b=kFALSE) {fRequireSigmaToVertex=b;}
83 void SetAcceptKinkDaughters(Bool_t b=kTRUE) {fAcceptKinkDaughters=b;}
84 void SetAODType(Char_t type=AliAODTrack::kUndef) {fAODType = type;}
87 void DrawHistograms();
88 void SaveHistograms(const Char_t* dir = 0);
89 void AddQAHistograms(TList *qaList);
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);
95 // indeces/counters for single selections
97 kCutNSigmaToVertex=0, // tracks's distance to main vertex in units of sigma
98 kCutRequireSigmaToVertex, // calculation is successful
99 kCutAcceptKinkDaughters, // do (not) accept secondaries
100 kDcaXY, // controll histogram: dca in xy plane
101 kDcaZ, // controll histogram: dca along z axis
102 kDcaXYnorm, // controll histogram: normalised dca in xy plane
103 kDcaZnorm, // controll histogram: normalised dca along z axis
104 kSigmaDcaXY, // controll histogram: impact parameter resolution in transverse plane
105 kSigmaDcaZ, // controll histogram: impact parameter resolution along z axis
106 kCutAODType, // cut on AliAODTrack::fType
107 kNCuts=9, // number of single selections
108 kNStepQA=2, // number of QA steps (before/after the cuts)
109 kNHist=9 // number of QA histograms
113 void SelectionBitMap(TObject* obj);
114 void GetDCA(AliESDtrack* esdTrack);
115 void DefineHistograms(); // books histograms and TList
116 void Initialise(); // sets everything to 0
117 void FillHistograms(TObject* obj, Bool_t b);
118 // Fills histograms before and after cuts
120 Bool_t fUseTPCvertex; // flag: calculate dca to TPC-vertex, off by default
121 Double_t fMinDCAToVertexXY; // cut value: min distance to main vertex in transverse plane
122 Double_t fMinDCAToVertexZ; // cut value: min longitudinal distance to main vertex
123 Double_t fMaxDCAToVertexXY; // cut value: max distance to main vertex in transverse plane
124 Double_t fMaxDCAToVertexZ; // cut value: max longitudinal distance to main vertex
125 Bool_t fDCAToVertex2D; // flag: cut on ellipse in xy - z plane
126 Bool_t fAbsDCAToVertex; // flag: cut on absolute values or in units of sigma
127 Double_t fNSigmaToVertexMin; // cut value: min distance to main vertex in units of sigma
128 Double_t fNSigmaToVertexMax; // cut value: max distance to main vertex in units of sigma
129 Double_t fSigmaDCAxy; // cut value: impact parameter resolution in xy plane
130 Double_t fSigmaDCAz; // cut value: impact parameter resolution in z direction
131 Double_t fDCA[6]; // impact parameters
132 Bool_t fRequireSigmaToVertex; // require calculable distance to main vertex
133 Char_t fAODType; // type of AOD track (undef, primary, secondary, orphan)
134 // applicable at AOD level only !
136 TH2F* fhDcaXYvsDcaZ[2]; // Histogram: dca xy vs. z
137 Bool_t fAcceptKinkDaughters; // accepting kink daughters
139 TH1F* fhCutStatistics; // Histogram: statistics of what cuts the tracks did not survive
140 TH2F* fhCutCorrelation; // Histogram: 2d statistics plot
142 TH1F* fhQA[kNHist][kNStepQA]; // QA Histograms
143 TBits *fBitmap ; // stores single selection decisions
145 // QA histogram setters
146 Int_t fhNBinsNSigma; // number of bins+1: dca in units of sigma
147 Int_t fhNBinsRequireSigma; // number of bins+1: require successful calcuation
148 Int_t fhNBinsAcceptKink; // number of bins+1: acceptkink daughters
149 Int_t fhNBinsDcaXY; // number of bins+1: dca in transverse plane
150 Int_t fhNBinsDcaZ; // number of bins+1: dca along beam axis
151 Int_t fhNBinsDcaXYnorm; // number of bins+1: normalised dca in transverse plane
152 Int_t fhNBinsDcaZnorm; // number of bins+1: normalised dca along beam axis
153 Int_t fhNBinsSigmaDcaXY; // number of bins+1: impact parameter resolution in transverse plane
154 Int_t fhNBinsSigmaDcaZ; // number of bins+1: impact parameter resolution along beam axis
156 Double_t *fhBinLimNSigma; //[fhNBinsNSigma] bin limits: dca in units of sigma
157 Double_t *fhBinLimRequireSigma;//[fhNBinsRequireSigma] bin limits: require successful calcuation
158 Double_t *fhBinLimAcceptKink;//[fhNBinsAcceptKink] bin limits: acceptkink daughters
159 Double_t *fhBinLimDcaXY;//[fhNBinsDcaXY] bin limits: dca in transverse plane
160 Double_t *fhBinLimDcaZ; //[fhNBinsDcaZ] bin limits: dca along beam axis
161 Double_t *fhBinLimDcaXYnorm; //[fhNBinsDcaXYnorm] bin limits: normalised dca in transverse plane
162 Double_t *fhBinLimDcaZnorm;//[fhNBinsDcaZnorm] bin limits: normalised dca along beam axis
163 Double_t *fhBinLimSigmaDcaXY; //[fhNBinsSigmaDcaXY] bin limits: impact parameter in transverse plane
164 Double_t *fhBinLimSigmaDcaZ; //[fhNBinsSigmaDcaZ] bin limits: impact parameter along beam axis
166 ClassDef(AliCFTrackIsPrimaryCuts,3);