Removing ; from CorrectionMatrix2D.cxx - compilation error
[u/mrichter/AliRoot.git] / PWG0 / esdTrackCuts / AliESDtrackCuts.h
CommitLineData
dc740de4 1/* $Id$ */
2
5c834ad5 3#ifndef ALIESDTRACKCUTS_H
4#define ALIESDTRACKCUTS_H
5
6//****************************************************************
7//
8// Class for handling of ESD track cuts
9//
10// TODO:
11// - add functionality to save and load cuts
12// - fix the n sigma cut so it is really a n sigma cut
13// - add different ways to make track to vertex cut
14// - add histograms for kinematic cut variables?
15// - upper and lower cuts for all (non-boolean) cuts
16// - update print method
17// - is there a smarter way to manage the cuts?
ebd60d8e 18// - put comment to each variable
19// - implement destructor !!!
49dc84d9 20//
21// NOTE:
22// -
23//
24
5c834ad5 25
5c834ad5 26#include "TObject.h"
aea6943b 27#include "TH1.h"
5c834ad5 28#include "TH2.h"
5c834ad5 29
30#include "AliESD.h"
31#include "AliESDtrack.h"
32#include "AliLog.h"
33
34class AliESDtrackCuts : public TObject
35{
ebd60d8e 36
37public:
38 AliESDtrackCuts();
39 virtual ~AliESDtrackCuts();
40 AliESDtrackCuts(const AliESDtrackCuts& pd); // Copy Constructor
41
42 Bool_t AcceptTrack(AliESDtrack* esdTrack);
43
44 TObjArray* GetAcceptedTracks(AliESD* esd);
45
46 AliESDtrackCuts &operator=(const AliESDtrackCuts &c);
47 virtual void Copy(TObject &c) const;
48
49 //######################################################
50 // track quality cut setters
51 void SetMinNClustersTPC(Int_t min=-1) {fCut_MinNClusterTPC=min;}
52 void SetMinNClustersITS(Int_t min=-1) {fCut_MinNClusterITS=min;}
53 void SetMaxChi2PerClusterTPC(Float_t max=1e99) {fCut_MaxChi2PerClusterTPC=max;}
54 void SetMaxChi2PerClusterITS(Float_t max=1e99) {fCut_MaxChi2PerClusterITS=max;}
55 void SetRequireTPCRefit(Bool_t b=kFALSE) {fCut_RequireTPCRefit=b;}
56 void SetRequireITSRefit(Bool_t b=kFALSE) {fCut_RequireITSRefit=b;}
57 void SetAcceptKingDaughters(Bool_t b=kFALSE) {fCut_AcceptKinkDaughters=b;}
58 void SetMaxCovDiagonalElements(Float_t c1=1e99, Float_t c2=1e99, Float_t c3=1e99, Float_t c4=1e99, Float_t c5=1e99)
59 {fCut_MaxC11=c1; fCut_MaxC22=c2; fCut_MaxC33=c3; fCut_MaxC44=c4; fCut_MaxC55=c5;}
60
61 // track to vertex cut setters
62 void SetMinNsigmaToVertex(Float_t sigma=1e99) {fCut_NsigmaToVertex = sigma;}
63 void SetRequireSigmaToVertex(Bool_t b=kTRUE ) {fCut_SigmaToVertexRequired = b;}
64
65 // track kinmatic cut setters
66 void SetPRange(Float_t r1=0, Float_t r2=1e99) {fPMin=r1; fPMax=r2;}
67 void SetPtRange(Float_t r1=0, Float_t r2=1e99) {fPtMin=r1; fPtMax=r2;}
68 void SetPxRange(Float_t r1=-1e99, Float_t r2=1e99) {fPxMin=r1; fPxMax=r2;}
69 void SetPyRange(Float_t r1=-1e99, Float_t r2=1e99) {fPyMin=r1; fPyMax=r2;}
70 void SetPzRange(Float_t r1=-1e99, Float_t r2=1e99) {fPzMin=r1; fPzMax=r2;}
71 void SetEtaRange(Float_t r1=-1e99, Float_t r2=1e99) {fEtaMin=r1; fEtaMax=r2;}
72 void SetRapRange(Float_t r1=-1e99, Float_t r2=1e99) {fRapMin=r1; fRapMax=r2;}
73
74 //######################################################
75 void SetHistogramsOn(Bool_t b=kFALSE) {fHistogramsOn = b;}
76 void DefineHistograms(Int_t color=1);
77 void SaveHistograms(Char_t* dir="track_selection");
78
79 virtual void Print(const Option_t* = "") const;
80
81 // void SaveQualityCuts(Char_t* file)
82 // void LoadQualityCuts(Char_t* file)
83
5c834ad5 84protected:
ebd60d8e 85 void Init(); // sets everything to 0
86
87 enum { kNCuts = 21 };
5c834ad5 88
89 //######################################################
90 // esd track quality cuts
ebd60d8e 91 static const Char_t* fCutNames[kNCuts];
5c834ad5 92
93 Int_t fCut_MinNClusterTPC; // min number of tpc clusters
94 Int_t fCut_MinNClusterITS; // min number of its clusters
95
96 Float_t fCut_MaxChi2PerClusterTPC; // max tpc fit chi2 per tpc cluster
97 Float_t fCut_MaxChi2PerClusterITS; // max its fit chi2 per its cluster
98
99 Float_t fCut_MaxC11; // max resolutions of covariance matrix diag. elements
100 Float_t fCut_MaxC22;
101 Float_t fCut_MaxC33;
102 Float_t fCut_MaxC44;
103 Float_t fCut_MaxC55;
104
105 Bool_t fCut_AcceptKinkDaughters; // accepting kink daughters?
106 Bool_t fCut_RequireTPCRefit; // require TPC refit
107 Bool_t fCut_RequireITSRefit; // require ITS refit
108
109 // track to vertex cut
110 Float_t fCut_NsigmaToVertex; // max number of estimated sigma from track-to-vertex
111 Bool_t fCut_SigmaToVertexRequired; // cut track if sigma from track-to-vertex could not be calculated
112
113 // esd kinematics cuts
114 Float_t fPMin, fPMax; // definition of the range of the P
115 Float_t fPtMin, fPtMax; // definition of the range of the Pt
116 Float_t fPxMin, fPxMax; // definition of the range of the Px
117 Float_t fPyMin, fPyMax; // definition of the range of the Py
118 Float_t fPzMin, fPzMax; // definition of the range of the Pz
119 Float_t fEtaMin, fEtaMax; // definition of the range of the eta
120 Float_t fRapMin, fRapMax; // definition of the range of the y
121
122 //######################################################
5c834ad5 123 // diagnostics histograms
124 Bool_t fHistogramsOn;
125
ebd60d8e 126 TH1F *fhNClustersITS[2]; //[2]
127 TH1F *fhNClustersTPC[2]; //[2]
5c834ad5 128
ebd60d8e 129 TH1F* fhChi2PerClusterITS[2]; //[2]
130 TH1F* fhChi2PerClusterTPC[2]; //[2]
5c834ad5 131
ebd60d8e 132 TH1F* fhC11[2]; //[2]
133 TH1F* fhC22[2]; //[2]
134 TH1F* fhC33[2]; //[2]
135 TH1F* fhC44[2]; //[2]
136 TH1F* fhC55[2]; //[2]
5c834ad5 137
ebd60d8e 138 TH1F* fhDXY[2]; //[2]
139 TH1F* fhDZ[2]; //[2]
140 TH2F* fhDXYvsDZ[2]; //[2]
5c834ad5 141
ebd60d8e 142 TH1F* fhDXYNormalized[2]; //[2]
143 TH1F* fhDZNormalized[2]; //[2]
144 TH2F* fhDXYvsDZNormalized[2]; //[2]
5c834ad5 145
86735596 146 TH1F* fhCutStatistics; //
147 TH2F* fhCutCorrelation; //
5c834ad5 148
5c834ad5 149 ClassDef(AliESDtrackCuts,0)
150};
151
152
153#endif