]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowSelection.h
First CVS version of the flow analysis code (Emanuele)
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowSelection.h
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
32 class AliFlowTrack ;
33 class AliFlowEvent ;
34 class Flow ;
35
36 class AliFlowSelection : public TObject {
37
38  public:
39
40           AliFlowSelection();
41   virtual ~AliFlowSelection();
42
43  // Selection Methods for ... 
44   Bool_t  Select(AliFlowEvent*);                                // (dummy)
45   Bool_t  Select(AliFlowTrack*);                                // selection for R.P.[nSel][nHar]
46   Bool_t  Select(AliFlowV0*);                                   // (dummy) 
47   Bool_t  SelectPart(AliFlowTrack*);                            // track selection for Correlation Analysis
48   Bool_t  SelectPart(AliFlowV0*);                               // v0 selection for Correlation Analysis (mass window + sidebands)
49   Bool_t  SelectV0Part(AliFlowV0*);                             // v0 mass window for Correlation Analysis 
50   Bool_t  SelectV0Side(AliFlowV0*);                             // v0 sidebands for Correlation Analysis 
51   Bool_t  SelectV0sxSide(AliFlowV0*);                           // selects v0s in the left hand sideband
52   Bool_t  SelectV0dxSide(AliFlowV0*);                           // selects v0s in the right hand sideband
53
54  // Gets (Harmonic, Selection, Sub-event)
55   Int_t   Sel() const;                                          // Returns the Harmonic                       
56   Int_t   Har() const;                                          // Returns the Selection
57   Int_t   Sub() const;                                          // Returns the Sub-Event
58
59  // Gets (Event cuts)
60   Int_t   CentralityCut() const ;                               // Returns Event Centrality class
61   Int_t   RunIdCut() const ;                                    // Returns Run number 
62
63  // Gets (R.P. cuts) and CutList
64   Float_t EtaCutLo(Int_t harN, Int_t selN) const;               // Returns lower eta cut for R.P.[harN][selN] calculation (absolute values)
65   Float_t EtaCutHi(Int_t harN, Int_t selN) const;               // Returns upper eta cut for R.P.[harN][selN] calculation (absolute values)                             
66   Float_t PtCutLo(Int_t harN, Int_t selN)  const;               // Returns lower pT cut for R.P.[harN][selN] calculation 
67   Float_t PtCutHi(Int_t harN, Int_t selN) const ;               // Returns upper pT cut for R.P.[harN][selN] calculation
68   Float_t DcaGlobalCutLo() const;                               // Returns lower DCA cut for R.P. calculation
69   Float_t DcaGlobalCutHi() const;                               // Returns upper DCA cut for R.P. calculation
70   Char_t* Pid() const;                                          // Returns particle specie used in R.P. calculation
71   Bool_t  ConstrainCut() const;                                 // Returns kTRUE/kFalse if the cut over un-constrainable tracks is enabled
72   Int_t   NhitsCut(Int_t selN) const;                           // Returns the minimum number of TPC hits for R.P.[selN] calculation
73
74  // Gets (correlation cuts)
75   Char_t* PidPart() ;                                           // Returns selected particle species wrt Reaction Plane
76   Float_t PtMaxPart() const ;                                   // Returns the max pT for evt.plane calc.
77   Int_t   PtBinsPart() const ;                                  // Returns N. of pT binning
78   void    SetPtBinsPart(const Int_t);                           // Sets N. of bins from fPtPart[0] to fPtPart[1]
79   void    PrintList() const ;                                   // Prints the tracks cut-list (for correlation analysis)
80   void    PrintSelectionList() const ;                          // Prints a summary of the selection criteria (for RP determination)
81   void    PrintV0List() const ;                                 // Prints the v0s cut-list (for correlation analysis)
82
83  // Harmonic & Selection set (R.P.)
84   void    SetHarmonic(const Int_t&);                            // Sets the Harmonic
85   void    SetSelection(const Int_t&);                           // Sets the Selection
86   void    SetSubevent(const Int_t&);                            // Sets the Sub-Event
87   
88  // Cuts set (Events)
89   void    SetCentralityCut(Int_t cent) ;                        // Sets Event Centrality class
90   void    SetRunIdCut(Int_t run) ;                              // Sets Run number 
91   
92  // Cuts set (Reaction Plane)
93   static void  SetPidCut(const Char_t* pid);                               // Sets the particle specie used in R.P. calculation
94   static void  SetEtaCut(Float_t lo, Float_t hi, Int_t harN, Int_t selN);  // Sets |eta| cut for R.P.[harN][selN] calculation
95   static void  SetPtCut(Float_t lo, Float_t hi, Int_t harN, Int_t selN);   // Sets pT cut for R.P.[harN][selN] calculation
96   static void  SetDcaGlobalCut(Float_t lo, Float_t hi);                    // Sets DCA cut for R.P. calculation
97   static void  SetConstrainCut(Bool_t tf = kTRUE) ;                        // Sets the cut over un-constrainable tracks
98   static void  SetNhitsCut(Int_t hits, Int_t selN) ;                       // Sets the minimum number of TPC hits for R.P.[selN] calculation
99
100  // Cuts set (Correlation Analysis)
101   void    SetPidPart(const Char_t*);                            // Sets PID for particles wrt Reaction plane 
102   void    SetPidProbPart(const Float_t, const Float_t);         // Sets PID probability for particles wrt Reaction plane
103   void    SetPtPart(const Float_t, const Float_t);              // Sets pT for particles wrt Reaction plane 
104   void    SetPPart(const Float_t, const Float_t);               // Sets Momentum for particles wrt Reaction plane 
105   void    SetEtaPart(const Float_t, const Float_t);             // Sets Eta for particles wrt Reaction plane    
106   void    SetEtaAbsPart(const Float_t, const Float_t);          // Sets |Eta| for particles wrt Reaction plane          
107   void    SetYPart(const Float_t, const Float_t);               // Sets Rapidity for particles (with sign.) wrt Reaction plane 
108   void    SetFitPtsPart(const Int_t, const Int_t);              // Sets FitPoints for particles wrt Reaction plane  
109   void    SetDedxPtsPart(const Int_t, const Int_t);             // Sets dE/dx for particles wrt Reaction plane          
110   void    SetFitOverMaxPtsPart(const Float_t, const Float_t);   // Sets FitPoints/MaxPoints for particles wrt Reaction plane 
111   void    SetChiSqPart(const Float_t, const Float_t);           // Sets Chi^2 for particles wrt Reaction plane          
112   void    SetDcaGlobalPart(const Float_t, const Float_t);       // Sets d.c.a. for particles wrt Reaction plane         
113   void    SetConstrainablePart(Bool_t constr = kTRUE);          // Sets constrainability for particles wrt Reaction plane       
114
115  // Cuts set (V0 Analysis)
116   void    SetV0Pid(const Char_t*) ;                             // Sets PID for v0 wrt plane (...)
117   void    SetV0Mass(const Float_t, const Float_t) ;             // Sets invariant mass cut for v0 wrt plane 
118   void    SetV0Pt(const Float_t, const Float_t) ;               // Sets pT for v0 wrt plane 
119   void    SetV0P(const Float_t, const Float_t) ;                // Sets Momentum for v0 wrt plane 
120   void    SetV0Eta(const Float_t, const Float_t) ;              // Sets Eta cut for v0 wrt plane 
121   void    SetV0EtaAbs(const Float_t, const Float_t) ;           // Sets |Eta| cut (absolute value) for v0 wrt plane 
122   void    SetV0Y(const Float_t, const Float_t) ;                // Sets Rapidity for v0 wrt plane 
123   void    SetV0ChiSqPart(const Float_t, const Float_t) ;        // Sets Chi^2 for v0 wrt plane 
124   void    SetV0DcaCross(const Float_t, const Float_t) ;         // Sets distance to the main vertex for v0 wrt plane
125   void    SetV0Lenght(const Float_t, const Float_t) ;           // Sets distance to the main vertex in sigma units for v0 wrt plane
126   void    SetV0LenghtOverSigma(const Float_t, const Float_t) ;  // Sets closest approach (between the 2 daughter tracks) for v0 wrt plane  
127   void    SetV0SideBands() ;                                    // Includes the v0 sideband analysis wrt plane          
128   void    SetV0SideBands(const Float_t) ;                       // Includes the v0 sideband analysis and a width                
129
130  // For just constrainable track analysis (main loop, R.P. excluded)
131   void    SetJustLoopConstrainable() ;                          // Sets for the analysis loop just over constrainable track
132   Bool_t  JustLoopConstrainable() const ;                       // kFALSE (default) or kTRUE (set it above) 
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
184  // Cuts for all tracks entering the main loop (R.P. loop is excluded)
185   Bool_t  fJustLoopConstrainable ;                              // constrainability for tracks entering the main loop 
186
187   ClassDef(AliFlowSelection,1)                                  // macro for rootcint
188 }; 
189
190 #endif