Several fixes in the histogram definition needed for compilation and coding conv.
[u/mrichter/AliRoot.git] / PWG0 / esdTrackCuts / ESDtrackQualityCuts.h
CommitLineData
539b6cb4 1#ifndef ESDTRACKQUALITYCUTS
2#define ESDTRACKQUALITYCUTS
3
4//****************************************************************
75ec0f41 5//
6// Class for handling of ESD track quality cuts
7//
8// TODO:
9// - add functionality to save and load cuts
10// - fix the n sigma cut so it is really a n sigma cut
11//
12
13#ifndef ROOT_TObject
14#include "TObject.h"
15#endif
16#ifndef ROOT_TTree
17#include "TTree.h"
18#endif
19#ifndef ROOT_TH2
20#include "TH2.h"
21#endif
22
23#include "AliESDtrack.h"
24#include "AliESDVertex.h"
25#include "AliLog.h"
26
27class ESDtrackQualityCuts : public TObject
28{
29protected:
30
31 //######################################################
32 // esd track quality cuts
33 static const Int_t fNCuts = 14;
34 Char_t* fCutNames[14];
35
36 Int_t fCut_MinNClusterTPC; // min number of tpc clusters
37 Int_t fCut_MinNClusterITS; // min number of its clusters
38
39 Float_t fCut_MaxChi2PerClusterTPC; // max tpc fit chi2 per tpc cluster
40 Float_t fCut_MaxChi2PerClusterITS; // max its fit chi2 per its cluster
41
42 Float_t fCut_MaxC11; // max resolutions of covariance matrix diag. elements
43 Float_t fCut_MaxC22;
44 Float_t fCut_MaxC33;
45 Float_t fCut_MaxC44;
46 Float_t fCut_MaxC55;
47
48 Float_t fCut_NsigmaToVertex; // max number of estimated sigma from track-to-vertex
49 Bool_t fCut_SigmaToVertexRequired; // cut track if sigma from track-to-vertex could not be calculated
50
51 Bool_t fCut_AcceptKinkDaughters; // accepting kink daughters?
52 Bool_t fCut_RequireTPCRefit; // require TPC refit
53 Bool_t fCut_RequireITSRefit; // require ITS refit
54
55 //######################################################
56 // diagnostics histograms
57 Bool_t fHistogramsOn;
58
59 TH1F** hNClustersITS;
60 TH1F** hNClustersTPC;
61
62 TH1F** hChi2PerClusterITS;
63 TH1F** hChi2PerClusterTPC;
64
65 TH1F** hC11;
66 TH1F** hC22;
67 TH1F** hC33;
68 TH1F** hC44;
69 TH1F** hC55;
70
71 TH1F** hDXY;
72 TH1F** hDZ;
73 TH2F** hDXYvsDZ;
74
75 TH1F** hDXYNormalized;
76 TH1F** hDZNormalized;
77 TH2F** hDXYvsDZNormalized;
78
79 TH1F* hCutStatistics;
80 TH2F* hCutCorrelation;
81
82
83 // dummy array
84 Int_t fIdxInt[200];
85
86public:
87 ESDtrackQualityCuts();
88
89 Bool_t AcceptTrack(AliESDtrack* esdTrack);
90 Bool_t AcceptTrack(AliESDtrack* esdTrack, AliESDVertex* esdVtx, Double_t field);
91 Bool_t AcceptTrack(AliESDtrack* esdTrack, Double_t* vtx, Double_t* vtx_res, Double_t field);
92 Bool_t AcceptTrack(AliESDtrack* esdTrack, AliESDVertex* esdVtx, Float_t field)
93 {return AcceptTrack(esdTrack,esdVtx, Double_t(field));}
94
95 //######################################################
96 // track quality cut setters
97 void SetMinNClustersTPC(Int_t min=-1) {fCut_MinNClusterTPC=min;}
98 void SetMinNClustersITS(Int_t min=-1) {fCut_MinNClusterITS=min;}
99 void SetMaxChi2PerClusterTPC(Float_t max=1e99) {fCut_MaxChi2PerClusterTPC=max;}
100 void SetMaxChi2PerClusterITS(Float_t max=1e99) {fCut_MaxChi2PerClusterITS=max;}
101 void SetMinNsigmaToVertex(Float_t sigma=3) {fCut_NsigmaToVertex=sigma;}
102 void SetRequireSigmaToVertex(Bool_t b=kTRUE) { fCut_SigmaToVertexRequired = b; }
103 void SetRequireTPCRefit(Bool_t b=kFALSE) {fCut_RequireTPCRefit=b;}
104 void SetRequireITSRefit(Bool_t b=kFALSE) {fCut_RequireITSRefit=b;}
105 void SetAcceptKingDaughters(Bool_t b=kFALSE) {fCut_AcceptKinkDaughters=b;}
106 void SetMaxCovDiagonalElements(Float_t c1=1e99, Float_t c2=1e99, Float_t c3=1e99, Float_t c4=1e99, Float_t c5=1e99)
107 {fCut_MaxC11=c1; fCut_MaxC22=c2; fCut_MaxC33=c3; fCut_MaxC44=c4; fCut_MaxC55=c5;}
108
109 //######################################################
110 void SetHistogramsOn(Bool_t b=kFALSE) {fHistogramsOn = b;}
111 void DefineHistograms(Int_t color=1);
112 void SaveHistograms(Char_t* dir="track_selection");
113
114 // void SaveQualityCuts(Char_t* file)
115 // void LoadQualityCuts(Char_t* file)
116
117 ClassDef(ESDtrackQualityCuts,0)
118};
119
539b6cb4 120#endif