]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowSelection.cxx
70d0ce64101b17811c55969faa7b88649caee645
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowSelection.cxx
1 //////////////////////////////////////////////////////////////////////
2 //
3 // $Id$
4 //
5 // Author: Emanuele Simili
6 //
7 //////////////////////////////////////////////////////////////////////
8 //_____________________________________________________________
9 //
10 // Description:  
11 //       the AliFlowSelection Class selects tracks from the AliFlowEvent. 
12 // There are two kind of selection :
13 // - Selection of tracks for the R.P. determination is performed via the
14 //  method Select(AliFlowTrack*): it simply checks the labels array of 
15 //  the track. Those arrays must be previously filled by calling 
16 //  AliFlowEvent::SetSelection(), wich uses the static cuts defined here.
17 //  Set the flag to Select via SetHarmonic() and SetSelection().   
18 // - Selection of tracks for Correlation Analysis is performed via the 
19 //  method SelectPart(AliFlowEvent*): cuts are applied to tracks 
20 //  (such as p.id, pT, total P, rapidity, eta, number of fit points, 
21 //  ratio of fit points to max points, chi2, and global dca). 
22 //  Set the cuts to apply via the appropriate Set...() methods.
23 // 
24 // The AliFlowSelection Class is adapted from the original StFlowSelection,
25 // succesfully used to study flow in the STAR experiment at RICH.
26 // Original Authors:                 Raimond Snellings & Art Poskanzer
27 //
28
29 #include "AliFlowSelection.h"
30 #include "AliFlowEvent.h"
31 #include "AliFlowTrack.h"
32 #include "AliFlowV0.h"
33 #include "AliFlowConstants.h"
34
35 #include <iostream>
36 #include <stdlib.h>
37 #include <string.h>
38 using namespace std; //required for resolving the 'cout' symbol
39
40 // - 1st selection (both harmonic) is Disabled ! - the 2 following are the same (basic cuts, no P.id)
41 Float_t  AliFlowSelection::fgEtaTpcCuts[2][AliFlowConstants::kHars][AliFlowConstants::kSels] = {{{1.0,0.0},{1.0,0.0}},{{0.0,1.1},{0.0,1.1}}} ;
42 Float_t  AliFlowSelection::fgPtTpcCuts[2][AliFlowConstants::kHars][AliFlowConstants::kSels]  = {{{1.0,0.1},{1.0,0.1}},{{0.0,10.0},{0.0,10.0}}} ;
43 Float_t  AliFlowSelection::fgDcaGlobalCuts[2]     = { 0. , 1. } ;
44 Char_t   AliFlowSelection::fgPid[10]              = { '\0' } ;
45 Bool_t   AliFlowSelection::fgConstrainable        = kTRUE ;
46 Int_t    AliFlowSelection::fgTPChits[AliFlowConstants::kSels] = { 0 , 1 } ;
47
48 ClassImp(AliFlowSelection)
49 //-----------------------------------------------------------------------
50 AliFlowSelection::AliFlowSelection():
51   fHarmonic(-1), fSelection(-1), fSubevent(-1), fPtBinsPart(AliFlowConstants::kPtBinsPart), fCent(-1), fRun(-1), fV0SideBand(0.), fConstrainablePart(kFALSE)
52 {
53  // Default constructor: when initialized all selection cuts are disabled (lo>hi).
54
55  // -
56  fPidPart[0] = '\0' ;
57  fPidProbPart[0]       = 1 ;            // = 0.  
58  fPidProbPart[1]       = 0 ;            // = 1.  
59  fPtPart[0]            = 1 ;            // = 0.  
60  fPtPart[1]            = 0 ;            // = 10. 
61  fPPart[0]             = 1 ;            // = 0.  
62  fPPart[1]             = 0 ;            // = 10. 
63  fEtaPart[0]           = 1 ;            // = -0.9
64  fEtaPart[1]           = 0 ;            // = 0.9 
65  fEtaAbsPart[0]        = 1 ;            // = 0.
66  fEtaAbsPart[1]        = 0 ;            // = 0.9 
67  fFitPtsPart[0]        = 1 ;            // = 0   
68  fFitPtsPart[1]        = 0 ;            // = 0   
69  fDedxPtsPart[0]       = 1 ;            // = 0   
70  fDedxPtsPart[1]       = 0 ;            // = 0   
71  fFitOverMaxPtsPart[0] = 1 ;            // = 0.  
72  fFitOverMaxPtsPart[1] = 0 ;            // = 0.  
73  fChiSqPart[0]         = 1 ;            // = 0.  
74  fChiSqPart[1]         = 0 ;            // = 100.
75  fDcaGlobalPart[0]     = 1 ;            // = 0.  
76  fDcaGlobalPart[1]     = 0 ;            // = 1.  
77  fDcaOverSigma[0]      = 1 ;            // = 0. ;
78  fDcaOverSigma[1]      = 0 ;            // = 1. ;
79  fYPart[0]             = 1 ;            // = 0.  
80  fYPart[1]             = 0 ;            // = 0.  
81  // -
82  fV0Pid[10] = '\0' ;
83  fV0Pt[0]              = 1 ;  
84  fV0Pt[1]              = 0 ;  
85  fV0P[0]               = 1 ;  
86  fV0P[1]               = 0 ;  
87  fV0Eta[0]             = 1 ;  
88  fV0Eta[1]             = 0 ;  
89  fV0EtaAbs[0]          = 1 ;  
90  fV0EtaAbs[1]          = 0 ;  
91  fV0Y[0]               = 1 ;  
92  fV0Y[1]               = 0 ;  
93  fV0ChiSq[0]           = 1 ;  
94  fV0ChiSq[1]           = 0 ;  
95  fV0Lenght[0]          = 1 ;  
96  fV0Lenght[1]          = 0 ;  
97  fV0LenghtOverSigma[0] = 1 ;  
98  fV0LenghtOverSigma[1] = 0 ;  
99  fV0DcaCross[0]        = 1 ;  
100  fV0DcaCross[1]        = 0 ;  
101  fV0Mass[0]            = 1 ;
102  fV0Mass[1]            = 0 ;
103 }
104 //-----------------------------------------------------------------------
105 AliFlowSelection::~AliFlowSelection() 
106 {
107  // default destructor (dummy)
108 }
109 //-----------------------------------------------------------------------
110 Bool_t AliFlowSelection::Select(AliFlowEvent* pFlowEvent) const 
111 {
112  // Returns kTRUE if the event is selected. 
113
114  if((fCent>=0) && ((Int_t)pFlowEvent->Centrality() != fCent)) { return kFALSE ; }
115  //if(pFlowEvent->RunID() != fRun) { return kFALSE ; }
116  //if(pFlowEvent->... != ...) { return kFALSE ; }
117  
118  return kTRUE ;
119 }
120 //-----------------------------------------------------------------------
121 Bool_t AliFlowSelection::Select(AliFlowTrack* pFlowTrack) const 
122 {
123  // Selects particles for event plane determination.
124  // Returns kTRUE if the track is selected.
125  
126  if(!pFlowTrack->Select(fHarmonic, fSelection, fSubevent)) { return kFALSE ; }
127  return kTRUE ;
128 }
129 //-----------------------------------------------------------------------
130 Bool_t AliFlowSelection::Select(AliFlowV0* pFlowV0) const  
131 {
132  // Returns kTRUE if the v0 is selected. (dummy) 
133
134  if(!pFlowV0) { return kFALSE ; }
135  return kTRUE ;
136 }
137 //-----------------------------------------------------------------------
138 Bool_t AliFlowSelection::SelectPart(AliFlowTrack* pFlowTrack) const  
139 {
140  // Make track selection for Correlation Analysis & Vn (charged particles 
141  // to correlate with the event plane).  
142  // Returns kTRUE if the track is selected.
143
144  // PID
145  if(fPidPart[0] != '\0') 
146  {
147   if(strstr(fPidPart, "h")!=0)                                  // if fPidPart contains the char "h" 
148   {
149    int charge = pFlowTrack->Charge();
150    if(strcmp("h+", fPidPart)==0 && charge != 1)  return kFALSE; // if fPidPart == "h+"
151    if(strcmp("h-", fPidPart)==0 && charge != -1) return kFALSE;
152   } 
153   else 
154   {
155    const Char_t* pid = pFlowTrack->Pid() ;
156    if(strstr(pid, fPidPart)==0) return kFALSE;                  // if pFlowTrack->Pid() does not contain fPidPart (RP. selected parts.)
157   }
158  } 
159  
160  // PID probability
161  float pidProb = pFlowTrack->MostLikelihoodRespFunc() ;
162  if(fPidProbPart[1] > fPidProbPart[0] &&  (pidProb < fPidProbPart[0] || pidProb > fPidProbPart[1])) return kFALSE;
163  
164  // Constrainable
165  bool constrainable = pFlowTrack->IsConstrainable() ;
166  if(fConstrainablePart && !constrainable)  return kFALSE;
167  
168  // Pt
169  float pt = pFlowTrack->Pt();
170  if(fPtPart[1] > fPtPart[0] &&  (pt < fPtPart[0] || pt > fPtPart[1])) return kFALSE;
171  
172  // P
173  float totalp = pFlowTrack->P();
174  if(fPPart[1] > fPPart[0] && (totalp < fPPart[0] || totalp > fPPart[1])) return kFALSE;
175  
176  // Eta
177  float eta = pFlowTrack->Eta();
178  if(fEtaPart[1] > fEtaPart[0] && (eta < fEtaPart[0] || eta > fEtaPart[1])) return kFALSE;
179  
180  // |Eta|
181  float absEta = TMath::Abs(pFlowTrack->Eta());
182  if(fEtaAbsPart[1] > fEtaAbsPart[0] && (absEta < fEtaAbsPart[0] || absEta > fEtaAbsPart[1])) return kFALSE;
183  
184  // Fit Points (TPC)
185  int fitPts = pFlowTrack->FitPtsTPC();
186  if(fFitPtsPart[1] > fFitPtsPart[0] && (fitPts < fFitPtsPart[0] || fitPts > fFitPtsPart[1])) return kFALSE;
187  
188  // Fit Points over Max Points (TPC)
189  int maxPts = pFlowTrack->MaxPtsTPC();
190  if(maxPts) 
191  { 
192   float fitOverMaxPts = (float)(fitPts)/(float)maxPts ;
193   if(fFitOverMaxPtsPart[1] > fFitOverMaxPtsPart[0] && (fitOverMaxPts < fFitOverMaxPtsPart[0] || fitOverMaxPts > fFitOverMaxPtsPart[1])) return kFALSE;
194  }
195  
196  // Chi Squared (main Vertex)
197  float chiSq = pFlowTrack->Chi2();
198  if(fChiSqPart[1] > fChiSqPart[0] && (chiSq < fChiSqPart[0] || chiSq > fChiSqPart[1])) return kFALSE;
199  
200  // DCA Global
201  float globdca = pFlowTrack->Dca();
202  if(fDcaGlobalPart[1] > fDcaGlobalPart[0] && (globdca < fDcaGlobalPart[0] || globdca > fDcaGlobalPart[1])) return kFALSE;
203  
204  // DCA Global
205  float dcaSigma = 1. ;
206  if(pFlowTrack->TransDcaError() != 0) { dcaSigma = pFlowTrack->TransDca() / pFlowTrack->TransDcaError() ; }
207  if(fDcaOverSigma[1] > fDcaOverSigma[0] && (dcaSigma < fDcaOverSigma[0] || dcaSigma > fDcaOverSigma[1])) return kFALSE;
208
209  // Rapidity
210  float y = pFlowTrack->Y();
211  if(fYPart[1] > fYPart[0] && (y < fYPart[0] || y > fYPart[1])) return kFALSE;
212
213  return kTRUE;
214 }
215 //-----------------------------------------------------------------------
216 Bool_t AliFlowSelection::SelectPart(AliFlowV0* pFlowV0) const 
217 {
218  // Make v0 selection for Correlation Analysis & Vn (neutral particles 
219  // to correlate with the event plane).  
220  // Returns kTRUE if the v0 is selected.
221
222  // PID
223  if(fV0Pid[0] != '\0') 
224  {
225   if(strstr(fV0Pid, '\0')!=0)
226   {
227    int charge = pFlowV0->Charge();
228    if(strcmp("0", fV0Pid)==0 && charge != 0) return kFALSE;
229   } 
230   else 
231   {
232    const Char_t* pid = pFlowV0->Pid() ;
233    if(strstr(pid, fV0Pid)==0) return kFALSE;
234   }
235  }
236
237  // InvMass
238  float mass = pFlowV0->Mass() ;
239  if(fV0Mass[1]>fV0Mass[0])
240  {
241   float massMin = fV0Mass[0]-fV0SideBand ;
242   float massMax = fV0Mass[1]+fV0SideBand ;
243   if((mass < massMin) || (mass > massMax)) return kFALSE ;
244  }
245
246  // Pt
247  float pt = pFlowV0->Pt();
248  if(fV0Pt[1] > fV0Pt[0] &&  (pt < fV0Pt[0] || pt > fV0Pt[1])) return kFALSE;
249
250  // P
251  float totalp = pFlowV0->P();
252  if(fV0P[1] > fV0P[0] && (totalp < fV0P[0] || totalp > fV0P[1])) return kFALSE;
253
254  // Eta
255  float eta = pFlowV0->Eta();
256  if(fV0Eta[1] > fV0Eta[0] && (eta < fV0Eta[0] || eta > fV0Eta[1])) return kFALSE;
257  
258  // |Eta|
259  float absEta = TMath::Abs(pFlowV0->Eta());
260  if(fV0EtaAbs[1] > fV0EtaAbs[0] && (absEta < fV0EtaAbs[0] || absEta > fV0EtaAbs[1])) return kFALSE;
261  
262  // Chi Squared (main Vertex)
263  float chiSq = pFlowV0->Chi2();
264  if(fV0ChiSq[1] > fV0ChiSq[0] && (chiSq < fV0ChiSq[0] || chiSq > fV0ChiSq[1])) return kFALSE;
265
266  // DCA Cross
267  float cdca = pFlowV0->DaughtersDca() ;
268  if(fV0DcaCross[1] > fV0DcaCross[0] && (cdca < fV0DcaCross[0] || cdca > fV0DcaCross[1])) return kFALSE;
269
270  // V0 lenght
271  float lenght = pFlowV0->V0Lenght() ;
272  if(fV0Lenght[1] > fV0Lenght[0] && (lenght < fV0Lenght[0] || lenght > fV0Lenght[1])) return kFALSE;
273
274  // V0 lenght
275  float sigma  = pFlowV0->Sigma() ;
276  if(sigma) 
277  {
278   float lenghtOverSigma = lenght/sigma ;
279   if(fV0LenghtOverSigma[1] > fV0LenghtOverSigma[0] && (lenghtOverSigma < fV0LenghtOverSigma[0] || lenghtOverSigma > fV0LenghtOverSigma[1])) return kFALSE;
280  }
281
282  // Rapidity
283  float y = pFlowV0->Y();
284  if(fV0Y[1] > fV0Y[0] && (y < fV0Y[0] || y > fV0Y[1])) return kFALSE;
285
286  return kTRUE;
287 }
288 //-----------------------------------------------------------------------
289 Bool_t  AliFlowSelection::SelectV0Part(AliFlowV0* pFlowV0) const 
290
291  // selects v0s in the invariant Mass window
292  
293  float mass = pFlowV0->Mass() ;
294  if(fV0Mass[1]>fV0Mass[0])
295  {
296   if(mass < fV0Mass[0] || mass > fV0Mass[1]) return kFALSE ; 
297  } 
298  return kTRUE;
299 }
300 //-----------------------------------------------------------------------
301 Bool_t  AliFlowSelection::SelectV0Side(AliFlowV0* pFlowV0) const 
302
303  // selects v0s in the sidebands of the Mass window
304  
305  float mass = pFlowV0->Mass() ;
306  if(fV0Mass[1]>fV0Mass[0])
307  { 
308   float massMin = fV0Mass[0]-fV0SideBand ;
309   float massMax = fV0Mass[1]+fV0SideBand ;
310   if((mass < massMin) || (mass >= fV0Mass[0] && mass <= fV0Mass[1]) || (mass > massMax)) return kFALSE ;
311  }
312  return kTRUE;
313 }
314 //-----------------------------------------------------------------------
315 Bool_t  AliFlowSelection::SelectV0sxSide(AliFlowV0* pFlowV0) const 
316
317  // selects v0s in the left hand sideband
318  
319  float mass = pFlowV0->Mass() ;
320  float massMin = fV0Mass[0]-fV0SideBand ;
321  if((mass >= massMin) && (mass < fV0Mass[0]))   { return kTRUE ; }
322  else                                           { return kFALSE ; }
323 }
324 //-----------------------------------------------------------------------
325 Bool_t  AliFlowSelection::SelectV0dxSide(AliFlowV0* pFlowV0) const 
326
327  // selects v0s in the right hand sideband
328  
329  float mass = pFlowV0->Mass() ;
330  float massMax = fV0Mass[1]+fV0SideBand ;
331  if((mass > fV0Mass[1]) && (mass <= massMax))   { return kTRUE ; }
332  else                                           { return kFALSE ; }
333 }
334 //-----------------------------------------------------------------------
335 void AliFlowSelection::PrintList() const 
336 {
337  // Prints the selection criteria for correlation analysis
338
339  cout << "#################################################################" << endl;
340  cout << "# Selection List (particles correlated to the event plane):" << endl;
341  cout << "# " << endl;
342  if(fPidPart[0]!='\0') 
343  { cout << "# P.id for particles correlated to the event plane: " << fPidPart << "  " << endl ; }
344  if(fPtPart[1]>fPtPart[0]) 
345  { cout << "# Pt for particles correlated to the event plane: " << fPtPart[0] << " to " << fPtPart[1] << " GeV/c" << endl ; }
346  if(fPPart[1]>fPPart[0]) 
347  { cout << "# P for particles correlated to the event plane: " << fPPart[0] << " to " << fPPart[1] << " GeV/c" << endl ; }
348  if(fEtaPart[1]>fEtaPart[0]) 
349  { cout << "# Eta for particles correlated to the event plane: " << fEtaPart[0] << " to " << fEtaPart[1] << endl ; }
350  if(fEtaAbsPart[1]>fEtaAbsPart[0]) 
351  { cout << "# |Eta| for V0s correlated to the event plane: " << fEtaAbsPart[0] << " to " << fEtaAbsPart[1] << endl ; }
352  if(fYPart[1]>fYPart[0]) 
353  { cout << "# Y for particles correlated to the event plane: " << fYPart[0] << " to " << fYPart[1] << endl ; }
354  if(fFitPtsPart[1]>fFitPtsPart[0]) 
355  { cout << "# Fit Points for particles correlated to the event plane: " << fFitPtsPart[0] << " to " << fFitPtsPart[1] << endl ; }
356  if(fDedxPtsPart[1]>fDedxPtsPart[0]) 
357  { cout << "# Dedx Points for particles correlated to the event plane: " << fDedxPtsPart[0] << " to " << fDedxPtsPart[1] << endl ; }
358  if(fFitOverMaxPtsPart[1]>fFitOverMaxPtsPart[0]) 
359  { cout << "# Fit/Max Points for particles correlated to the event plane: " << fFitOverMaxPtsPart[0] << " to " << fFitOverMaxPtsPart[1] << endl ; }
360  if(fChiSqPart[1]>fChiSqPart[0]) 
361  { cout << "# Chi2 for particles correlated to the event plane: " << fChiSqPart[0] << " to " << fChiSqPart[1] << endl ; }
362  if(fDcaGlobalPart[1]>fDcaGlobalPart[0]) 
363  { cout << "# Global Dca for particles correlated with the event plane: " << fDcaGlobalPart[0] << " to " << fDcaGlobalPart[1] << endl ; }
364  if(fDcaOverSigma[1]>fDcaOverSigma[0])
365  { cout << "# Transverse Dca / Sigma for particles correlated with the event plane: " << fDcaOverSigma[0] << " to " << fDcaOverSigma[1] << endl ; }
366  if(fConstrainablePart)          { cout << "# Constrainability cut:   Constrained  Tracks " << endl ; }
367  cout << "#################################################################" << endl;
368 }
369 //-----------------------------------------------------------------------
370 void AliFlowSelection::PrintV0List() const 
371 {
372  // Prints the selection criteria for V0s
373
374  cout << "#################################################################" << endl;
375  cout << "# Selection List (V0s correlated with the event plane):" << endl;
376  cout << "# " << endl;
377  if(fV0Pid[0]!='\0') 
378  { cout << "# P.id for V0s correlated to the event plane: " << fV0Pid << "  " << endl ; }
379  if(fV0Mass[1]>fV0Mass[0]) 
380  {
381   if(!fV0SideBand)
382   { cout << "# Invariant Mass for V0s correlated to the event plane: " << fV0Mass[0] << " to " << fV0Mass[1] << endl ; }
383   else
384   { cout << "# Invariant Mass for V0-SideBands correlated to the event plane: " << fV0Mass[0]-fV0SideBand << " to " << fV0Mass[0]  << " & " << fV0Mass[1] << " to " << fV0Mass[1]+fV0SideBand << endl ; }
385  }
386  if(fV0Pt[1]>fV0Pt[0]) 
387  { cout << "# Pt for V0s correlated to the event plane: " << fV0Pt[0] << " to " << fV0Pt[1] << " GeV/c" << endl ; }
388  if(fV0P[1]>fV0P[0]) 
389  { cout << "# P for V0s correlated to the event plane: " << fV0P[0] << " to " << fV0P[1] << " GeV/c" << endl ; }
390  if(fV0Eta[1]>fV0Eta[0]) 
391  { cout << "# Eta for V0s correlated to the event plane: " << fV0Eta[0] << " to " << fV0Eta[1] << endl ; }
392  if(fV0EtaAbs[1]>fV0EtaAbs[0]) 
393  { cout << "# |Eta| for V0s correlated to the event plane: " << fV0EtaAbs[0] << " to " << fV0EtaAbs[1] << endl ; }
394  if(fV0Y[1]>fV0Y[0]) 
395  { cout << "# Y for V0s correlated to the event plane: " << fV0Y[0] << " to " << fV0Y[1] << endl ; }
396  if(fV0ChiSq[1]>fV0ChiSq[0]) 
397  { cout << "# Chi2 for V0s correlated to the event plane: " << fV0ChiSq[0] << " to " << fV0ChiSq[1] << endl ; }
398  if(fV0DcaCross[1]>fV0DcaCross[0]) 
399  { cout << "# Closest approach between the daughter tracks for V0s correlated to the event plane: " << fV0DcaCross[0] << " to " << fV0DcaCross[1] << endl ; }
400  if(fV0Lenght[1]>fV0Lenght[0]) 
401  { cout << "# ... for V0s correlated to the event plane: " << fV0Lenght[0] << " to " << fV0Lenght[1] << endl ; }
402  if(fV0LenghtOverSigma[1]>fV0LenghtOverSigma[0]) 
403  { cout << "# ... for V0s correlated to the event plane: " << fV0LenghtOverSigma[0] << " to " << fV0LenghtOverSigma[1] << endl ; }
404  cout << "#################################################################" << endl;
405 }
406 //-----------------------------------------------------------------------
407 void AliFlowSelection::PrintSelectionList() const
408 {
409  // Prints the list of selection cuts for RP determination
410  
411  if(fCent>=0)      
412  { 
413   cout << "#######################################################" << endl;
414   cout << "# Event centrality: " << endl ; 
415   float lowC, hiC ;
416   if(fCent==0)      { lowC=0 ; hiC=AliFlowConstants::fgCentNorm[0] * AliFlowConstants::fgMaxMult ; }
417   else if(fCent>8)  { lowC=AliFlowConstants::fgCentNorm[8] * AliFlowConstants::fgMaxMult ; hiC=99999 ; }
418   else              { lowC=AliFlowConstants::fgCentNorm[fCent-1] * AliFlowConstants::fgMaxMult ; hiC=AliFlowConstants::fgCentNorm[fCent] * AliFlowConstants::fgMaxMult ; }
419   cout << "#  - Centrality Class = " << fCent << " ( " << (int)lowC << " < mult < " << (int)hiC << " ) . " << endl ; 
420  }
421  else      
422  { 
423   cout << "#######################################################" << endl;
424   cout << "# All centralities " << endl ; 
425  }
426
427  cout << "#######################################################" << endl;
428  cout << "# Tracks used for the event plane: " << endl ; 
429  cout << "#  - Selection[0]    (for all " << AliFlowConstants::kHars << " Harmonics) :  " << endl ; 
430  cout << "#   NO CUTS " << endl ; 
431  cout << "#  - Selection[1+]   (for all " << AliFlowConstants::kHars << " Harmonics) : " << endl ; 
432  if(Pid()[0] != '\0')                   { cout << "#   Particle ID =  " << Pid() << endl ; } 
433  if(ConstrainCut())                     { cout << "#   Constrainable Tracks " << endl ; }
434  if(DcaGlobalCutHi()>DcaGlobalCutLo())  { cout << "#   Global Dca Tpc cuts =  " << DcaGlobalCutLo() << " , " << DcaGlobalCutHi() << endl ; }
435  for (int k = 1; k < AliFlowConstants::kSels; k++) 
436  {
437   for (int j = 0; j < AliFlowConstants::kHars ; j++) 
438   {
439    cout << "#  - Selection[" << k << "] , Harmonic[" << j+1 << "] :" << endl ;
440    if(NhitsCut(k))                      { cout << "#   Minimum TPC hits =  " << NhitsCut(k) << endl ; }
441    if(EtaCutHi(j,k)>EtaCutLo(j,k))      { cout << "#   TMath::Abs(Eta) cuts =  " << EtaCutLo(j,k) << " , "  << EtaCutHi(j,k) << endl ; }
442    if(PtCutHi(j,k)>PtCutLo(j,k))        { cout << "#   Pt cuts = " << PtCutLo(j,k) << " , "  << PtCutHi(j,k) << endl ; }
443   }
444  }
445  cout << "#######################################################" << endl;  
446 }
447 //-----------------------------------------------------------------------
448 void AliFlowSelection::SetHarmonic(const Int_t& harN) 
449 {
450  // sets the Harmonic #
451
452  if(harN < 0 || harN >= AliFlowConstants::kHars) 
453  {
454   cout << "### Harmonic " << harN << " not valid" << endl;
455   fHarmonic = 0;
456  } 
457  else { fHarmonic = harN; } 
458 }
459 //-----------------------------------------------------------------------
460 void AliFlowSelection::SetSelection(const Int_t& selN) 
461 {
462  // sets the Selection #
463
464  if(selN < 0 || selN >= AliFlowConstants::kSels) 
465  {
466   cout << "### Selection " << selN << " not valid" << endl;
467   fSelection = 0;
468  } 
469  else { fSelection = selN; } 
470 }
471 //-----------------------------------------------------------------------
472 void AliFlowSelection::SetSubevent(const Int_t& subN) 
473 {
474  // sets the Sub-Event # (-1 for the full-event)
475
476  if(subN < -1 || subN > AliFlowConstants::kSubs) 
477  {
478   cout << "### Subevent " << subN << " not valid" << endl;
479   fSubevent = -1;
480  } 
481  else { fSubevent = subN; } 
482 }
483 //-----------------------------------------------------------------------
484 Float_t AliFlowSelection::PtMaxPart() const                    
485 {
486  // Returns the upper pT cut for particle used in correlation analysis
487  
488  if(fPtPart[1]>fPtPart[0]) { return fPtPart[1] ; } 
489  else { return 0. ; } 
490 }
491 //-----------------------------------------------------------------------