]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/GammaConv/AliConversionTrackCuts.h
Small update by Raphaelle
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliConversionTrackCuts.h
CommitLineData
2dd6ec26 1#ifndef ALICONVERSIONTRACKCUTS_H
2#define ALICONVERSIONTRACKCUTS_H
3
4// Class handling all kinds of selection cuts for Gamma Conversion analysis
5// Authors: (this code is mostly copied from AliRsnTrackQuality) adapted by Svein Lindal *
6
5c76942e 7class TH2F;
8class TList;
2dd6ec26 9#include "AliAODTrack.h"
10#include "AliESDtrack.h"
11#include "AliAnalysisCuts.h"
12
13using namespace std;
14
15class AliConversionTrackCuts : public AliAnalysisCuts {
16
17public:
4267afec 18
19 enum CTCuts_t {
20 kPreCut = -1,
21 kCutNcls,
22 kCutNclsFrac,
23 kCutNDF,
24 kCutKinc,
25 kCutDCAZ,
26 kCutDCAXY,
27 kCutTPCRefit,
28 kNCuts
29 };
30
92efd725 31// enum trackVal {
32// kPt = 0,
33// kPhi,
34// kEta,
35// kNVar
36// };
4267afec 37 static const char * fgkCutNames[kNCuts];
38
92efd725 39 Bool_t IsSelected(TObject * object ) { return AcceptTrack(dynamic_cast<AliAODTrack*>(object)); }
4267afec 40 Bool_t IsSelected(TList * /*list*/) { return kFALSE; }
41 Bool_t AcceptTrack(AliAODTrack * track);
2dd6ec26 42
43 AliConversionTrackCuts();
44 AliConversionTrackCuts(TString name, TString title);
5c76942e 45 ~AliConversionTrackCuts();
2dd6ec26 46
47 void AddStatusFlag(ULong_t f, Bool_t on) {if (on) fFlagsOn = fFlagsOn | f; else fFlagsOff = fFlagsOff | f;}
48 void SetStatusFlags(ULong_t f, Bool_t on) {if (on) fFlagsOn = f; else fFlagsOff = f;}
49 void SetPtRange(Double_t a, Double_t b) {fPt[0] = TMath::Min(a, b); fPt[1] = TMath::Max(a, b);}
50 void SetEtaRange(Double_t a, Double_t b) {fEta[0] = TMath::Min(a, b); fEta[1] = TMath::Max(a, b);}
51
52 void SetDCARPtFormula(const char *formula) {fDCARptFormula = formula; fDCARfixed = kFALSE;}
53 void SetDCARmax(Double_t value) {fDCARmax = value; fDCARptFormula = ""; fDCARfixed = kTRUE;}
54 void SetDCAZPtFormula(const char *formula) {fDCAZptFormula = formula; fDCAZfixed = kFALSE;}
55 void SetDCAZmax(Double_t value) {fDCAZmax = value; fDCAZptFormula = ""; fDCAZfixed = kTRUE;}
27573262 56 void SetDCAXYmax(Double_t value) {fDCAXYmax = value*value;}
2dd6ec26 57
58 void SetSPDminNClusters(Int_t value) {fSPDminNClusters = value;}
59 void SetITSminNClusters(Int_t value) {fITSminNClusters = value;}
60 void SetITSmaxChi2(Double_t value) {fITSmaxChi2 = value;}
61
62 void SetTPCminNClusters(Int_t value) {fTPCminNClusters = value;}
4267afec 63 void SetTPCCFoundClusters(Double_t value) {fTPCClusOverFindable = value;}
2dd6ec26 64 void SetTPCmaxChi2(Double_t value) {fTPCmaxChi2 = value;}
65
66 void SetRejectKinkDaughters(Bool_t yn = kTRUE) {fRejectKinkDaughters = yn;}
67 void SetAODTestFilterBit(Int_t value) {fAODTestFilterBit = value;}
4267afec 68
69 void SetRequireTPCRefit(Bool_t require) { fRequireTPCRefit = require; }
2dd6ec26 70 void SetDefaults2010();
71
5c76942e 72 TList * CreateHistograms();
4267afec 73 void FillHistograms(Int_t cutIndex, AliVTrack * track, Bool_t passed);
2dd6ec26 74 virtual void Print(const Option_t *option = "") const;
75
76protected :
77
78 ULong_t fFlagsOn; // status flags which must be ON (used AliESDtrack ones, connected with '|')
79 ULong_t fFlagsOff; // status flags which must be OFF (used AliESDtrack ones, connected with '|')
80 Double_t fPt[2]; // pt range
81 Double_t fEta[2]; // eta range
82 Bool_t fRejectKinkDaughters; // switch to kTRUE if daughters of kinks must be rejected
83
84 Bool_t fDCARfixed; // flag to switch between fixed and pt-dependent DCA cut
85 TString fDCARptFormula; // expression to compute transverse DCA sigma w.r. to pt
86 Double_t fDCARmax; // maximum value for transverse DCA
87
88 Bool_t fDCAZfixed; // flag to switch between fixed and pt-dependent DCA cut
89 TString fDCAZptFormula; // expression to compute longitudinal DCA sigma w.r. to pt
90 Double_t fDCAZmax; // maximum value for longitudinal DCA
91
4267afec 92 Double_t fDCAXYmax; // maximum xy value for dca
27573262 93
2dd6ec26 94 Int_t fSPDminNClusters; // minimum number of required clusters in SPD
95 Int_t fITSminNClusters; // minimum number of required clusters in ITS
96 Double_t fITSmaxChi2; // maximum chi2 / number of clusters in ITS
97
98 Int_t fTPCminNClusters; // minimum number of required clusters in TPC
4267afec 99 Double_t fTPCClusOverFindable; // minimum number of required clusters in TPC
2dd6ec26 100 Double_t fTPCmaxChi2; // maximum chi2 / number of clusters in TPC
101 Int_t fAODTestFilterBit; // test filter bit for AOD tracks
4267afec 102 Bool_t fRequireTPCRefit; // Require TPC refit
103
92efd725 104 TH2F * fhPhi;
105 TH2F * fhPt;
106 TH2F * fhPhiPt;
107 TH2F * fhdcaxyPt;
108 TH2F * fhdcazPt;
109 TH2F * fhnclpt;
110 TH2F * fhnclsfpt;
4267afec 111
112 // TAxis fCutAxis;
113 // TAxisArr fCutVarAxes[kNCuts];
114 // TAxisArr fVarAxes[kNVar];
2dd6ec26 115
5c76942e 116 TList * fHistograms;
2dd6ec26 117
118 AliConversionTrackCuts(const AliConversionTrackCuts&); // not implemented
119 AliConversionTrackCuts& operator=(const AliConversionTrackCuts&); // not implemented
120
121 ClassDef(AliConversionTrackCuts,1)
122
123
124};
125
126
127//__________________________________________________________________________________________________
128inline void AliConversionTrackCuts::SetDefaults2010()
129{
130//
131// Default settings for cuts used in 2010
132//
133
27573262 134 SetDCAZmax(3.0);
135 SetDCAXYmax(2.5);
2dd6ec26 136 SetTPCminNClusters(70);
4267afec 137 SetTPCmaxChi2(12.0);
2dd6ec26 138 SetRejectKinkDaughters();
2dd6ec26 139}
140
141#endif