Reconstruction QA by Sylwester
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowSelection.h
CommitLineData
30a892e3 1//////////////////////////////////////////////////////////////////////
2//
3// $Id$
4//
5// Author: Emanuele Simili
6//
7//////////////////////////////////////////////////////////////////////
8//
327288af 9// Description: class for selections in flow study, adapted from STAR
10// it is applied to AliFlowEvent during the analysis loop .
11// ... I really hate the code checker !!!
30a892e3 12// Original Authors: Raimond Snellings & Art Poskanzer
13//
14//////////////////////////////////////////////////////////////////////
15
16#ifndef AliFlowSelection_h
17#define AliFlowSelection_h
18
30a892e3 19#include "TObject.h"
30a892e3 20#include "TMath.h"
30a892e3 21
30a892e3 22#include "AliFlowConstants.h"
23
24class AliFlowTrack ;
327288af 25class AliFlowV0 ;
30a892e3 26class AliFlowEvent ;
327288af 27class AliFlowConstants ;
30a892e3 28
29class AliFlowSelection : public TObject {
30
9777bfcb 31
30a892e3 32 public:
33
34 AliFlowSelection();
35 virtual ~AliFlowSelection();
36
37 // Selection Methods for ...
327288af 38 Bool_t Select(AliFlowEvent* pFlowEvent) const ; // (dummy)
39 Bool_t Select(AliFlowTrack* pFlowTrack) const ; // selection for R.P.[nSel][nHar]
40 Bool_t Select(AliFlowV0* pFlowV0) const ; // (dummy)
41 Bool_t SelectPart(AliFlowTrack* pFlowTrack) const ; // track selection for Correlation Analysis
42 Bool_t SelectPart(AliFlowV0* pFlowV0) const ; // v0 selection for Correlation Analysis (mass window + sidebands)
43 Bool_t SelectV0Part(AliFlowV0* pFlowV0) const ; // v0 mass window for Correlation Analysis
44 Bool_t SelectV0Side(AliFlowV0* pFlowV0) const ; // v0 sidebands for Correlation Analysis
45 Bool_t SelectV0sxSide(AliFlowV0* pFlowV0) const ; // selects v0s in the left hand sideband
46 Bool_t SelectV0dxSide(AliFlowV0* pFlowV0) const ; // selects v0s in the right hand sideband
30a892e3 47
48 // Gets (Harmonic, Selection, Sub-event)
9777bfcb 49 Int_t Sel() const { return fSelection; } // Returns the Harmonic
50 Int_t Har() const { return fHarmonic; } // Returns the Selection
51 Int_t Sub() const { return fSubevent; } // Returns the Sub-Event
52
92016a03 53 // Gets (R.P. cuts)
327288af 54 Float_t EtaCutLo(Int_t harN, Int_t selN) const { return fgEtaTpcCuts[0][harN][selN] ; } // Returns lower eta cut for R.P.[harN][selN] calculation (absolute values)
55 Float_t EtaCutHi(Int_t harN, Int_t selN) const { return fgEtaTpcCuts[1][harN][selN] ; } // Returns upper eta cut for R.P.[harN][selN] calculation (absolute values)
56 Float_t PtCutLo(Int_t harN, Int_t selN) const { return fgPtTpcCuts[0][harN][selN] ; } // Returns lower pT cut for R.P.[harN][selN] calculation
57 Float_t PtCutHi(Int_t harN, Int_t selN) const { return fgPtTpcCuts[1][harN][selN] ; } // Returns upper pT cut for R.P.[harN][selN] calculation
58 Float_t DcaGlobalCutLo() const { return fgDcaGlobalCuts[0] ; } // Returns lower DCA cut for R.P. calculation
59 Float_t DcaGlobalCutHi() const { return fgDcaGlobalCuts[1] ; } // Returns upper DCA cut for R.P. calculation
60 Bool_t ConstrainCut() const { return fgConstrainable ; } // Returns kTRUE/kFalse if the cut over un-constrainable tracks is enabled
61 Int_t NhitsCut(Int_t selN) const { return fgTPChits[selN] ; } // Returns the minimum number of TPC hits for R.P.[selN] calculation
62 Char_t* Pid() const { return fgPid; } // Returns particle specie used in R.P. calculation
30a892e3 63
64 // Gets (Event cuts)
9777bfcb 65 Int_t CentralityCut() const { return fCent ; } // Returns Event Centrality class
66 Int_t RunIdCut() const { return fRun ; } // Returns Run number
30a892e3 67
9777bfcb 68 // Gets (Correlation analysis cuts of tracks & V0s)
69 Char_t* PidPart() { return fPidPart; } // Returns selected particle species wrt Reaction Plane
70 Int_t PtBinsPart() const { return fPtBinsPart; } // Returns N. of pT binning
71 Float_t PtMaxPart() const ; // Returns the max pT for evt.plane calc.
72
73 // Cuts list
74 void PrintList() const ; // Prints the tracks cut-list (for correlation analysis)
75 void PrintSelectionList() const ; // Prints a summary of the selection criteria (for RP determination)
76 void PrintV0List() const ; // Prints the v0s cut-list (for correlation analysis)
30a892e3 77
92016a03 78 // Sets (Harmonic, Selection, Sub-event)
327288af 79 void SetHarmonic(const Int_t& harN); // Sets the Harmonic
80 void SetSelection(const Int_t& selN); // Sets the Selection
81 void SetSubevent(const Int_t& subN); // Sets the Sub-Event
30a892e3 82
92016a03 83 // Sets (R.P. cuts)
84 static void SetEtaCut(Float_t lo, Float_t hi, Int_t harN, Int_t selN) { fgEtaTpcCuts[0][harN][selN] = lo ; fgEtaTpcCuts[1][harN][selN] = hi ; } // Sets |eta| cut for R.P.[harN][selN] calculation
85 static void SetPtCut(Float_t lo, Float_t hi, Int_t harN, Int_t selN) { fgPtTpcCuts[0][harN][selN] = lo ; fgPtTpcCuts[1][harN][selN] = hi ; } // Sets pT cut for R.P.[harN][selN] calculation
86 static void SetDcaGlobalCut(Float_t lo, Float_t hi) { fgDcaGlobalCuts[0] = lo ; fgDcaGlobalCuts[1] = hi ; } // Sets DCA cut for R.P. calculation
87 static void SetPidCut(const Char_t* pid) { strncpy(fgPid, pid, 9) ; fgPid[9] = '\0' ; } // Sets the particle specie used in R.P. calculation
327288af 88 static void SetConstrainCut(Bool_t tf = kTRUE) { fgConstrainable = tf ; } // Sets the cut over un-constrainable tracks
89 static void SetNhitsCut(Int_t hits,Int_t selN) { fgTPChits[selN] = hits; } // Sets the minimum number of TPC hits for R.P.[selN] calculation
9777bfcb 90
91 // Sets (Event cuts)
92 void SetCentralityCut(Int_t cent) { fCent = cent ; } // Sets Event Centrality class
93 void SetRunIdCut(Int_t run) { fRun = run ; } // Sets Run number
94
92016a03 95 // Sets (Correlation analysis cuts of tracks & V0s)
9777bfcb 96 void SetPidPart(const Char_t* pid) { strncpy(fPidPart, pid, 9); fPidPart[9] = '\0'; } // Sets PID for particles wrt Reaction plane
97 void SetPidProbPart(Float_t lo, Float_t hi) { fPidProbPart[0] = lo ; fPidProbPart[1] = hi; } // Sets PID probability for particles wrt Reaction plane
98 void SetPtPart(Float_t lo, Float_t hi) { fPtPart[0] = lo; fPtPart[1] = hi; } // Sets pT for particles wrt Reaction plane
99 void SetPPart(Float_t lo, Float_t hi) { fPPart[0] = lo; fPPart[1] = hi; } // Sets Momentum for particles wrt Reaction plane
100 void SetEtaPart(Float_t lo, Float_t hi) { fEtaPart[0] = lo; fEtaPart[1] = hi; } // Sets Eta for particles wrt Reaction plane
101 void SetEtaAbsPart(Float_t lo, Float_t hi) { fEtaAbsPart[0] = TMath::Abs(lo); fEtaAbsPart[1] = TMath::Abs(hi); } // Sets |Eta| for particles wrt Reaction plane
102 void SetYPart(Float_t lo, Float_t hi) { fYPart[0] = lo; fYPart[1] = hi; } // Sets Rapidity for particles (with sign.) wrt Reaction plane
103 void SetFitPtsPart(Int_t lo, Int_t hi) { fFitPtsPart[0] = lo; fFitPtsPart[1] = hi; } // Sets FitPoints for particles wrt Reaction plane
104 void SetDedxPtsPart(Int_t lo, Int_t hi) { fDedxPtsPart[0] = lo; fDedxPtsPart[1] = hi; } // Sets dE/dx for particles wrt Reaction plane
105 void SetFitOverMaxPtsPart(Float_t lo, Float_t hi) { fFitOverMaxPtsPart[0] = lo; fFitOverMaxPtsPart[1] = hi; } // Sets FitPoints/MaxPoints for particles wrt Reaction plane
106 void SetChiSqPart(Float_t lo, Float_t hi) { fChiSqPart[0] = lo; fChiSqPart[1] = hi; } // Sets Chi^2 for particles wrt Reaction plane
107 void SetDcaGlobalPart(Float_t lo, Float_t hi) { fDcaGlobalPart[0] = lo; fDcaGlobalPart[1] = hi; } // Sets d.c.a. for particles wrt Reaction plane
92016a03 108 void SetDcaOverSigma(Float_t lo, Float_t hi) { fDcaOverSigma[0] = lo; fDcaOverSigma[1] = hi; } // Sets d.c.a. for particles wrt Reaction plane
109 void SetConstrainablePart(Bool_t constr) { fConstrainablePart = constr ; } // Sets constrainability for particles wrt Reaction plane
9777bfcb 110 void SetV0Pid(const Char_t* pid) { strncpy(fV0Pid, pid, 9) ; fV0Pid[9] = '\0' ; } // Sets PID for v0 wrt plane (...)
111 void SetV0Mass(Float_t lo, Float_t hi) { fV0Mass[0] = lo ; fV0Mass[1] = hi; } // Sets invariant mass cut for v0 wrt plane
112 void SetV0Pt(Float_t lo, Float_t hi) { fV0Pt[0] = lo ; fV0Pt[1] = hi; } // Sets pT for v0 wrt plane
113 void SetV0P(Float_t lo, Float_t hi) { fV0P[0] = lo ; fV0P[1] = hi; } // Sets Momentum for v0 wrt plane
114 void SetV0Eta(Float_t lo, Float_t hi) { fV0Eta[0] = lo ; fV0Eta[1] = hi; } // Sets Eta cut for v0 wrt plane
115 void SetV0EtaAbs(Float_t lo, Float_t hi) { fV0EtaAbs[0] = lo ; fV0EtaAbs[1] = hi; } // Sets |Eta| cut (absolute value) for v0 wrt plane
116 void SetV0Y(Float_t lo, Float_t hi) { fV0Y[0] = lo ; fV0Y[1] = hi; } // Sets Rapidity for v0 wrt plane
117 void SetV0ChiSqPart(Float_t lo, Float_t hi) { fV0ChiSq[0] = lo ; fV0ChiSq[1] = hi; } // Sets Chi^2 for v0 wrt plane
118 void SetV0Lenght(Float_t lo, Float_t hi) { fV0Lenght[0] = lo ; fV0Lenght[1] = hi; } // Sets distance to the main vertex for v0 wrt plane
119 void SetV0DcaCross(Float_t lo, Float_t hi) { fV0DcaCross[0] = lo ; fV0DcaCross[1] = hi; } // Sets distance to the main vertex in sigma units for v0 wrt plane
120 void SetV0LenghtOverSigma(Float_t lo, Float_t hi) { fV0LenghtOverSigma[0] = lo ; fV0LenghtOverSigma[1] = hi; } // Sets closest approach (between the 2 daughter tracks) for v0 wrt plane
121 void SetV0SideBands() { SetV0SideBands(TMath::Abs((fV0Mass[1]-fV0Mass[0])/2)) ; } // Includes the v0 sideband analysis wrt plane
122 void SetV0SideBands(Float_t sb) { fV0SideBand = sb ; } // Includes the v0 sideband analysis and a width
123
92016a03 124 void SetPtBinsPart(Int_t bins) { fPtBinsPart = bins; } // Sets N. of bins from fPtPart[0] to fPtPart[1]
125
30a892e3 126
127 private:
128
129 // These are just 3 integers - simple way to look at the [nHar][nSel] and [nSub] array
130 Int_t fHarmonic; // harmonic
131 Int_t fSelection; // selection
132 Int_t fSubevent; // sub-event
133
134 Int_t fPtBinsPart; // N. of bins in pT histograms (pT binning)
135
136 // Event Cuts (new)
137 Int_t fCent ; // Event Centrality class
138 Int_t fRun ; // Run number
139
140 // Cuts for V0 correlated to the Raction Plane (new)
141 Char_t fV0Pid[10]; // PID for v0 wrt plane (...)
142 Float_t fV0SideBand ; // width of the sidebands (using the sidebands' candidates)
143 Float_t fV0Mass[2] ; // mass cut for v0 wrt plane
144 Float_t fV0Pt[2]; // pT for v0 wrt plane
145 Float_t fV0P[2]; // Momentum for v0 wrt plane
146 Float_t fV0Eta[2]; // Eta cut for v0 wrt plane
147 Float_t fV0EtaAbs[2]; // |Eta| cut (absolute value) for v0 wrt plane
148 Float_t fV0Y[2]; // Rapidity for v0 wrt plane
149 Float_t fV0ChiSq[2]; // Chi^2 for v0 wrt plane
150 Float_t fV0Lenght[2]; // distance to the main vertex for v0 wrt plane
151 Float_t fV0LenghtOverSigma[2]; // distance to the main vertex in sigma units for v0 wrt plane
152 Float_t fV0DcaCross[2]; // closest approach (between the 2 daughter tracks) for v0 wrt plane
153
154 // Cuts for Tracks that will be related to the Raction Plane (original strategy from STAR)
155 Char_t fPidPart[10]; // PID for parts. wrt plane (h+, h-, pi-, pi+, pi, k+, k-, k, pr+, pr-, pr, d+, d-, d, e+, e-, e)
156 Float_t fPidProbPart[2] ; // probability of the most likelihood p.id. (you should specify also PidPart())
157 Float_t fPtPart[2]; // pT for parts. wrt plane
158 Float_t fPPart[2]; // Momentum for parts. wrt plane
159 Float_t fEtaPart[2]; // Eta cut for parts. wrt plane
160 Float_t fEtaAbsPart[2]; // |Eta| cut (absolute value) for parts. wrt plane
161 Float_t fYPart[2]; // Rapidity for parts. wrt plane
162 Int_t fFitPtsPart[2]; // FitPoints for parts. wrt plane
163 Int_t fDedxPtsPart[2]; // dE/dx for parts. wrt plane
164 Float_t fFitOverMaxPtsPart[2]; // FitPoints/MaxPoints for parts. wrt plane
165 Float_t fChiSqPart[2]; // Chi^2 for parts. wrt plane
166 Float_t fDcaGlobalPart[2]; // closest approach (to the main vertex) for parts. wrt plane
92016a03 167 Float_t fDcaOverSigma[2]; // closest approach (to the main vertex) over its error
30a892e3 168 Bool_t fConstrainablePart; // constrainability for parts. wrt plane
169
170 // Cuts for Tracks used in determining the Raction Plane (in STAR this selection was done inside the AliFlowEvent class)
327288af 171 static Float_t fgEtaTpcCuts[2][AliFlowConstants::kHars][AliFlowConstants::kSels]; // eta range (absolute values)
172 static Float_t fgPtTpcCuts[2][AliFlowConstants::kHars][AliFlowConstants::kSels]; // pT range
173 static Float_t fgDcaGlobalCuts[2]; // DCA cuts
174 static Char_t fgPid[10]; // h+, h-, pi-, pi+, pi, k+, k-, k, pr+, pr-, pr, e+, e-, e, d+, d-, d
92016a03 175 static Int_t fgTPChits[AliFlowConstants::kSels]; // minimum number of TPC hits
327288af 176 static Bool_t fgConstrainable; // cut un-constrainable tracks
30a892e3 177
30a892e3 178 ClassDef(AliFlowSelection,1) // macro for rootcint
179};
180
181#endif