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