]> git.uio.no Git - u/mrichter/AliRoot.git/blame - CORRFW/AliCFTrackIsPrimaryCuts.h
Ensure that the ADC array is only called for valid entries (AliTRDmcmSim) and bug...
[u/mrichter/AliRoot.git] / CORRFW / AliCFTrackIsPrimaryCuts.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 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:
89d7d478 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
563113d0 31// - require that the dca calculation doesn't fail
32// - accept or not accept daughter tracks of kink decays
33//
34// The cut values for these cuts are set with the corresponding set functions.
35// All cut classes provided by the correction framework are supposed to be
36// added in the Analysis Framwork's class AliAnalysisFilter and applied by
37// the filter via a loop.
38//
39// author: I. Kraus (Ingrid.Kraus@cern.ch)
40// idea taken form
41// AliESDtrackCuts writte by Jan Fiete Grosse-Oetringhaus and
42// AliRsnDaughterCut class written by A. Pulvirenti.
43
44#ifndef ALICFTRACKISPRIMARYCUTS_H
45#define ALICFTRACKISPRIMARYCUTS_H
46
47#include "AliCFCutBase.h"
8edd0c2c 48#include "AliAODTrack.h"
045e6d86 49#include <TH2.h>
89d7d478 50#include "AliESDtrackCuts.h"
563113d0 51class TBits;
563113d0 52class AliESDtrack ;
53
54class AliCFTrackIsPrimaryCuts : public AliCFCutBase
55{
56 public :
57 AliCFTrackIsPrimaryCuts() ;
58 AliCFTrackIsPrimaryCuts(Char_t* name, Char_t* title) ;
59 AliCFTrackIsPrimaryCuts(const AliCFTrackIsPrimaryCuts& c) ;
60 AliCFTrackIsPrimaryCuts& operator=(const AliCFTrackIsPrimaryCuts& c) ;
61 ~AliCFTrackIsPrimaryCuts();
62 void Copy(TObject &c) const;
63
563113d0 64 Bool_t IsSelected(TObject* obj);
264ebaac 65 Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
563113d0 66
67 // cut value setter
89d7d478 68 void SetMinDCAToVertexXY(Float_t dist=0.) {fMinDCAToVertexXY = dist;}
69 void SetMinDCAToVertexZ(Float_t dist=0.) {fMinDCAToVertexZ = dist;}
70 void SetMaxDCAToVertexXY(Float_t dist=1e10) {fMaxDCAToVertexXY = dist;}
71 void SetMaxDCAToVertexZ(Float_t dist=1e10) {fMaxDCAToVertexZ = dist;}
72 void SetDCAToVertex2D(Bool_t b=kFALSE) {fDCAToVertex2D = b;}
73 void SetAbsDCAToVertex(Bool_t b=kTRUE) {fAbsDCAToVertex = b;}
74 void SetMinNSigmaToVertex(Double_t sigmaMin=0.) {fNSigmaToVertexMin = sigmaMin;}
75 void SetMaxNSigmaToVertex(Double_t sigmaMax=1.e+10) {fNSigmaToVertexMax = sigmaMax;}
76 void SetMaxSigmaDCAxy(Double_t sigmaMax=1.e+10) {fSigmaDCAxy = sigmaMax;}
77 void SetMaxSigmaDCAz(Double_t sigmaMax=1.e+10) {fSigmaDCAz = sigmaMax;}
78 void SetRequireSigmaToVertex(Bool_t b=kFALSE) {fRequireSigmaToVertex=b;}
79 void SetAcceptKinkDaughters(Bool_t b=kTRUE) {fAcceptKinkDaughters=b;}
80 void SetAODType(Char_t type=AliAODTrack::kUndef) {fAODType = type;}
563113d0 81
82 // QA histograms
563113d0 83 void DrawHistograms();
84 void SaveHistograms(const Char_t* dir = 0);
107a3100 85 void AddQAHistograms(TList *qaList);
563113d0 86 // QA histogram setter
87 // please use indices from the enumeration below
88 void SetHistogramBins(Int_t index, Int_t nbins, Double_t *bins);
89 void SetHistogramBins(Int_t index, Int_t nbins, Double_t xmin, Double_t xmax);
90
91 // indeces/counters for single selections
92 enum {
93 kCutNSigmaToVertex=0, // tracks's distance to main vertex in units of sigma
94 kCutRequireSigmaToVertex, // calculation is successful
95 kCutAcceptKinkDaughters, // do (not) accept secondaries
96 kDcaXY, // controll histogram: dca in xy plane
97 kDcaZ, // controll histogram: dca along z axis
98 kDcaXYnorm, // controll histogram: normalised dca in xy plane
99 kDcaZnorm, // controll histogram: normalised dca along z axis
89d7d478 100 kSigmaDcaXY, // controll histogram: impact parameter resolution in transverse plane
101 kSigmaDcaZ, // controll histogram: impact parameter resolution along z axis
8edd0c2c 102 kCutAODType, // cut on AliAODTrack::fType
89d7d478 103 kNCuts=9, // number of single selections
563113d0 104 kNStepQA=2, // number of QA steps (before/after the cuts)
89d7d478 105 kNHist=9 // number of QA histograms
563113d0 106 };
107
108 private:
107a3100 109 void SelectionBitMap(TObject* obj);
563113d0 110 void DefineHistograms(); // books histograms and TList
111 void Initialise(); // sets everything to 0
112 void FillHistograms(TObject* obj, Bool_t b);
113 // Fills histograms before and after cuts
89d7d478 114
115 Double_t fMinDCAToVertexXY; // cut value: min distance to main vertex in transverse plane
116 Double_t fMinDCAToVertexZ; // cut value: min longitudinal distance to main vertex
117 Double_t fMaxDCAToVertexXY; // cut value: max distance to main vertex in transverse plane
118 Double_t fMaxDCAToVertexZ; // cut value: max longitudinal distance to main vertex
119 Bool_t fDCAToVertex2D; // flag: cut on ellipse in xy - z plane
120 Bool_t fAbsDCAToVertex; // flag: cut on absolute values or in units of sigma
121 Double_t fNSigmaToVertexMin; // cut value: min distance to main vertex in units of sigma
107a3100 122 Double_t fNSigmaToVertexMax; // cut value: max distance to main vertex in units of sigma
89d7d478 123 Double_t fSigmaDCAxy; // cut value: impact parameter resolution in xy plane
124 Double_t fSigmaDCAz; // cut value: impact parameter resolution in z direction
8edd0c2c 125 Bool_t fRequireSigmaToVertex; // require calculable distance to main vertex
126 Char_t fAODType; // type of AOD track (undef, primary, secondary, orphan)
127 // applicable at AOD level only !
563113d0 128
129 TH2F* fhDcaXYvsDcaZ[2]; // Histogram: dca xy vs. z
130 TH2F* fhDcaXYvsDcaZnorm[2]; // Histogram: (dca xy / sigma xy) vs. (dca z / simga z)
131 Bool_t fAcceptKinkDaughters; // accepting kink daughters
132
045e6d86 133 TH1F* fhCutStatistics; // Histogram: statistics of what cuts the tracks did not survive
134 TH2F* fhCutCorrelation; // Histogram: 2d statistics plot
563113d0 135
136 TH1F* fhQA[kNHist][kNStepQA]; // QA Histograms
045e6d86 137 TBits *fBitmap ; // stores single selection decisions
563113d0 138
139 // QA histogram setters
db6722a5 140 Int_t fhNBinsNSigma; // number of bins+1: dca in units of sigma
141 Int_t fhNBinsRequireSigma; // number of bins+1: require successful calcuation
142 Int_t fhNBinsAcceptKink; // number of bins+1: acceptkink daughters
143 Int_t fhNBinsDcaXY; // number of bins+1: dca in transverse plane
144 Int_t fhNBinsDcaZ; // number of bins+1: dca along beam axis
145 Int_t fhNBinsDcaXYnorm; // number of bins+1: normalised dca in transverse plane
146 Int_t fhNBinsDcaZnorm; // number of bins+1: normalised dca along beam axis
89d7d478 147 Int_t fhNBinsSigmaDcaXY; // number of bins+1: impact parameter resolution in transverse plane
148 Int_t fhNBinsSigmaDcaZ; // number of bins+1: impact parameter resolution along beam axis
045e6d86 149
150 Double_t *fhBinLimNSigma; //[fhNBinsNSigma] bin limits: dca in units of sigma
151 Double_t *fhBinLimRequireSigma;//[fhNBinsRequireSigma] bin limits: require successful calcuation
152 Double_t *fhBinLimAcceptKink;//[fhNBinsAcceptKink] bin limits: acceptkink daughters
153 Double_t *fhBinLimDcaXY;//[fhNBinsDcaXY] bin limits: dca in transverse plane
154 Double_t *fhBinLimDcaZ; //[fhNBinsDcaZ] bin limits: dca along beam axis
155 Double_t *fhBinLimDcaXYnorm; //[fhNBinsDcaXYnorm] bin limits: normalised dca in transverse plane
156 Double_t *fhBinLimDcaZnorm;//[fhNBinsDcaZnorm] bin limits: normalised dca along beam axis
89d7d478 157 Double_t *fhBinLimSigmaDcaXY; //[fhNBinsSigmaDcaXY] bin limits: impact parameter in transverse plane
158 Double_t *fhBinLimSigmaDcaZ; //[fhNBinsSigmaDcaZ] bin limits: impact parameter along beam axis
045e6d86 159
8edd0c2c 160 ClassDef(AliCFTrackIsPrimaryCuts,3);
563113d0 161};
162
163#endif