]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGDQ/dielectron/macrosJPSI/RaaPbPb2010/AliCorrelationReducedEvent.h
Merge remote-tracking branch 'origin/master' into mergingFlat
[u/mrichter/AliRoot.git] / PWGDQ / dielectron / macrosJPSI / RaaPbPb2010 / AliCorrelationReducedEvent.h
1 // Classes used for creating a reduced information tree
2 // Author: Ionut-Cristian Arsene (i.c.arsene@gsi.de)
3 // 
4 //  Basic structure:
5 //  1. Event wise information
6 //  2. List of tracks in the event
7 //  3. List of resonance candidates
8
9 #ifndef ALICORRELATIONREDUCEDEVENT_H
10 #define ALICORRELATIONREDUCEDEVENT_H
11
12 #include <TClonesArray.h>
13 #include <TBits.h>
14 #include <TMath.h>
15
16
17 const Int_t fgkNMaxHarmonics = 10;
18 /*class AliCorrelationReducedTrack;
19 class AliCorrelationReducedPair;
20 class AliCorrelationReducedEventFriend;
21 class AliCorrelationReducedEvent;
22 class AliCorrelationReducedCaloCluster;*/
23
24 //_____________________________________________________________________
25 class AliCorrelationReducedTrack : public TObject {
26
27   friend class AliAnalysisTaskCorrelationTree;
28
29  public:
30   AliCorrelationReducedTrack();
31   ~AliCorrelationReducedTrack();
32
33   // getters
34   UShort_t TrackId()                     const {return fTrackId;}
35   ULong_t  Status()                      const {return fStatus;}
36   Bool_t   CheckTrackStatus(UInt_t flag) const {return (flag<8*sizeof(ULong_t) ? (fStatus&(1<<flag)) : kFALSE);}
37   Int_t    Charge()                      const {return (fGlobalPt>0.0 ? +1 : -1);}
38   Float_t  Px()                          const {return TMath::Abs(fGlobalPt)*TMath::Cos(fGlobalPhi);}
39   Float_t  Py()                          const {return TMath::Abs(fGlobalPt)*TMath::Sin(fGlobalPhi);}
40   Float_t  Pz()                          const {return TMath::Abs(fGlobalPt)*TMath::SinH(fGlobalEta);}
41   Float_t  P()                           const {return TMath::Abs(fGlobalPt)*TMath::CosH(fGlobalEta);};
42   Float_t  Phi()                         const {return fGlobalPhi;}
43   Float_t  Pt()                          const {return TMath::Abs(fGlobalPt);}
44   Float_t  Eta()                         const {return fGlobalEta;}
45   Float_t  Theta()                       const {return TMath::ACos(TMath::TanH(fGlobalEta));}
46   Float_t  PxTPC()                       const {return fTPCPt*TMath::Cos(fTPCPhi);}
47   Float_t  PyTPC()                       const {return fTPCPt*TMath::Sin(fTPCPhi);}
48   Float_t  PzTPC()                       const {return fTPCPt*TMath::SinH(fTPCEta);}
49   Float_t  PTPC()                        const {return fTPCPt*TMath::CosH(fTPCEta);};
50   Float_t  PhiTPC()                      const {return fTPCPhi;}
51   Float_t  PtTPC()                       const {return fTPCPt;}
52   Float_t  EtaTPC()                      const {return fTPCEta;}
53   Float_t  ThetaTPC()                    const {return TMath::ACos(TMath::TanH(fTPCEta));}
54   Float_t  Pin()                         const {return fMomentumInner;}
55   Float_t  DCAxy()                       const {return fDCA[0];}
56   Float_t  DCAz()                        const {return fDCA[1];}
57   
58   UShort_t ITSncls()                const;
59   UChar_t  ITSclusterMap()          const {return fITSclusterMap;}
60   Bool_t   ITSLayerHit(Int_t layer) const {return (layer>=0 && layer<6 ? (fITSclusterMap&(1<<layer)) : kFALSE);};
61   Float_t  ITSsignal()              const {return fITSsignal;}
62   
63   UChar_t TPCncls()                        const {return fTPCNcls;}
64   UChar_t TPCFindableNcls()                const {return fTPCNclsF;}
65   UChar_t TPCCrossedRows()                 const {return fTPCCrossedRows;}
66   UChar_t TPCnclsIter1()                   const {return fTPCNclsIter1;}
67   UChar_t TPCClusterMap()                  const {return fTPCClusterMap;}
68   Int_t   TPCClusterMapBitsFired()         const;
69   Bool_t  TPCClusterMapBitFired(Int_t bit) const {return (bit>=0 && bit<8 ? (fTPCClusterMap&(1<<bit)) : kFALSE);};
70   Float_t TPCsignal()                      const {return fTPCsignal;}
71   Float_t TPCnSig(Int_t specie)            const {return (specie>=0 && specie<=3 ? fTPCnSig[specie] : -999.);}
72   
73   Float_t  TOFbeta()             const {return fTOFbeta;}    
74   Float_t  TOFnSig(Int_t specie) const {return (specie>=0 && specie<=3 ? fTOFnSig[specie] : -999.);}
75   
76   Int_t    TRDntracklets(Int_t type)  const {return (type==0 || type==1 ? fTRDntracklets[type] : -1);}
77   Float_t  TRDpid(Int_t specie)       const {return (specie>=0 && specie<=1 ? fTRDpid[specie] : -999.);}
78   
79   Int_t    CaloClusterId() const {return fCaloClusterId;}
80   //Float_t  CaloEnergy(AliCorrelationReducedEvent* event) const {if(fCaloClusterId>0) return event->GetCaloCluster(fCaloClusterId)->Energy();}
81   //Float_t  CaloDx(AliCorrelationReducedEvent* event) const {if(fCaloClusterId>0) return event->GetCaloCluster(fCaloClusterId)->Dx();}
82   //Float_t  CaloDz(AliCorrelationReducedEvent* event) const {if(fCaloClusterId>0) return event->GetCaloCluster(fCaloClusterId)->Dz();}
83   
84   Float_t  BayesPID(Int_t specie) const {return (specie>=0 && specie<=2 ? fBayesPID[specie] : -999.);}
85   Bool_t   UsedForQvector()       const {return fFlags&(1<<0);}
86   
87  private:
88   UShort_t fTrackId;            // track id 
89   ULong_t fStatus;              // tracking status
90   Float_t fGlobalPhi;           // phi at the vertex from global track, in the [0,2pi) interval
91   Float_t fGlobalPt;            // pt*charge at the vertex from global track
92   Float_t fGlobalEta;           // eta at the vertex from global track
93   Float_t fTPCPhi;              // phi at the vertex from TPC alone tracking , in the [0,2pi) interval
94   Float_t fTPCPt;               // pt at the vertex from TPC alone tracking  
95   Float_t fTPCEta;              // eta at the vertex from TPC alone tracking 
96   Float_t fMomentumInner;       // inner param momentum (only the magnitude)
97   Float_t fDCA[2];              // DCA xy,z
98   
99   // ITS
100   UChar_t  fITSclusterMap;      // ITS cluster map
101   Float_t  fITSsignal;          // ITS signal
102   
103   // TPC
104   UChar_t fTPCNcls;            // TPC ncls                          
105   UChar_t fTPCCrossedRows;     // TPC crossed rows                  
106   UChar_t fTPCNclsF;           // TPC findable ncls                 
107   UChar_t fTPCNclsIter1;       // TPC no clusters after first iteration
108   UChar_t fTPCClusterMap;      // TPC cluster distribution map
109   Float_t fTPCsignal;          // TPC de/dx
110   Float_t fTPCnSig[4];         // 0-electron; 1-pion; 2-kaon; 3-proton
111     
112   // TOF
113   Float_t fTOFbeta;             // TOF pid info
114   Float_t fTOFnSig[4];          // TOF n-sigma deviation from expected signal
115   
116   // TRD
117   UChar_t fTRDntracklets[2];       // 0 - AliESDtrack::GetTRDntracklets(); 1 - AliESDtrack::GetTRDntrackletsPID()   TODO: use only 1 char
118   Float_t fTRDpid[2];              // TRD pid probabilities, [0]-electron, [1]-pion
119   
120   // EMCAL/PHOS
121   Int_t  fCaloClusterId;          // ID for the calorimeter cluster (if any)
122   
123   // Bayesian PID
124   Float_t fBayesPID[3];            // Combined Bayesian PID   pi/K/p
125   
126   UShort_t fFlags;                // BIT0 toggled if track used for TPC event plane   TODO combine with other posible flags, use for MC pid?
127   // TODO flag for which TPC part used for pid  --> Char_t  used in 2011 data
128   
129   AliCorrelationReducedTrack(const AliCorrelationReducedTrack &c);
130   AliCorrelationReducedTrack& operator= (const AliCorrelationReducedTrack &c);
131
132   ClassDef(AliCorrelationReducedTrack, 2);
133 };
134
135
136 //_____________________________________________________________________
137 class AliCorrelationReducedPair : public TObject {
138
139   friend class AliAnalysisTaskCorrelationTree;
140
141  public:
142   enum CandidateType {
143     kK0sToPiPi=0,
144     kPhiToKK,
145     kLambda0ToPPi,
146     kALambda0ToPPi,
147     kJpsiToEE,
148     kNMaxCandidateTypes
149   };
150   AliCorrelationReducedPair();
151   AliCorrelationReducedPair(const AliCorrelationReducedPair &c);
152   ~AliCorrelationReducedPair();
153
154   // getters
155   Char_t   CandidateId()         const {return fCandidateId;}
156   Char_t   PairType()            const {return fPairType;}
157   Int_t    LegId(Int_t leg)      const {return (leg==0 || leg==1 ? fLegIds[leg] : -1);}
158   Float_t  Mass(Int_t idx=0)     const {return (idx>=0 && idx<3 ? fMass[idx] : -999.);}
159   Float_t  Px()                  const {return fPt*TMath::Cos(fPhi);}
160   Float_t  Py()                  const {return fPt*TMath::Sin(fPhi);}
161   Float_t  Pz()                  const {return fPt*TMath::SinH(fEta);}
162   Float_t  P()                   const {return fPt*TMath::CosH(fEta);}
163   Float_t  Phi()                 const {return fPhi;}
164   Float_t  Pt()                  const {return fPt;}
165   Float_t  Eta()                 const {return fEta;}
166   Float_t  Energy()              const;
167   Float_t  Rapidity()            const;
168   Float_t  Theta()               const {return TMath::ACos(TMath::TanH(fEta));}
169   Float_t  Lxy()                 const {return fLxy;}
170   Float_t  OpeningAngle()        const {return fOpeningAngle;}
171   Bool_t   IsOnTheFly()          const {return fPairType;}
172   UInt_t   MCid()                const {return fMCid;}
173   Bool_t   CheckMC(const Int_t flag) const {return (flag<32 ? (fMCid&(1<<flag)) : kFALSE);}
174   
175  private:
176   Char_t  fCandidateId;         // candidate type (K0s, Lambda, J/psi, phi, etc)
177   Char_t  fPairType;            // 0 ++; 1 +-; 2 -- for dielectron pairs; 0- offline, 1- on the fly for V0 candidates
178   UShort_t fLegIds[2];          // leg ids 
179   Float_t fMass[3];             // invariant mass for pairs (2 extra mass values for other V0 pid assumptions)
180                                 // idx=0 -> K0s assumption; idx=1 -> Lambda; idx=2 -> anti-Lambda
181   Float_t fPhi;                 // pair phi in the [0,2*pi) interval
182   Float_t fPt;                  // pair pt
183   Float_t fEta;                 // pair eta 
184   Float_t fLxy;                 // pseudo-proper decay length
185   Float_t fOpeningAngle;        // opening angle                TODO remove   ???
186   UInt_t  fMCid;                // Bit map with Monte Carlo info about the pair
187
188   AliCorrelationReducedPair& operator= (const AliCorrelationReducedPair &c);
189
190   ClassDef(AliCorrelationReducedPair, 1);
191 };
192
193
194 //_________________________________________________________________________
195 class AliCorrelationReducedEventFriend : public TObject {
196   
197   friend class AliAnalysisTaskCorrelationTree;
198   
199  public: 
200   enum EventPlaneStatus {
201     kRaw=0,
202     kCalibrated,
203     kRecentered,
204     kShifted,
205     kNMaxFlowFlags
206   };
207   enum EventPlaneDetector {
208     kTPC=0,       
209     kTPCptWeights,
210     kTPCpos,
211     kTPCneg,
212     kVZEROA,
213     kVZEROC,
214     kFMD,
215     kZDCA,
216     kZDCC,
217     kNdetectors
218   };
219   
220   AliCorrelationReducedEventFriend();
221   ~AliCorrelationReducedEventFriend();
222   
223   Double_t Qx(Int_t det, Int_t harmonic)  const {return (det>=0 && det<kNdetectors && harmonic>0 && harmonic<=fgkNMaxHarmonics ? fQvector[det][harmonic-1][0] : -999.);}
224   Double_t Qy(Int_t det, Int_t harmonic)  const {return (det>=0 && det<kNdetectors && harmonic>0 && harmonic<=fgkNMaxHarmonics ? fQvector[det][harmonic-1][1] : -999.);}
225   Double_t EventPlane(Int_t det, Int_t h) const;
226   UChar_t GetEventPlaneStatus(Int_t det, Int_t h) const {return (det>=0 && det<kNdetectors && h>0 && h<=fgkNMaxHarmonics ? fEventPlaneStatus[det][h] : -999.);} 
227   Bool_t  CheckEventPlaneStatus(Int_t det, Int_t h, EventPlaneStatus flag) const;
228   void    CopyEvent(AliCorrelationReducedEventFriend* event);
229
230   void SetQx(Int_t det, Int_t harmonic, Float_t qx) { if(det>=0 && det<kNdetectors && harmonic>0 && harmonic<=fgkNMaxHarmonics) fQvector[det][harmonic-1][0]=qx;}
231   void SetQy(Int_t det, Int_t harmonic, Float_t qy) { if(det>=0 && det<kNdetectors && harmonic>0 && harmonic<=fgkNMaxHarmonics) fQvector[det][harmonic-1][1]=qy;}
232   void SetEventPlaneStatus(Int_t det, Int_t harmonic, EventPlaneStatus status) { 
233     if(det>=0 && det<kNdetectors && harmonic>0 && harmonic<=fgkNMaxHarmonics) 
234       fEventPlaneStatus[det][harmonic-1] |= (1<<status);
235   }
236   
237  private:
238   // Q-vectors for the first 10 harmonics from TPC, VZERO, FMD and ZDC detectors
239   Double_t fQvector[kNdetectors][fgkNMaxHarmonics][2];     // Q vector components for all detectors and 6 harmonics
240   UChar_t fEventPlaneStatus[kNdetectors][fgkNMaxHarmonics];  // Bit maps for the event plane status (1 char per detector and per harmonic)
241    
242   void ClearEvent();
243   AliCorrelationReducedEventFriend(const AliCorrelationReducedEventFriend &c);
244   AliCorrelationReducedEventFriend& operator= (const AliCorrelationReducedEventFriend &c);
245
246   ClassDef(AliCorrelationReducedEventFriend, 1);
247 };
248
249
250 //_________________________________________________________________________
251 class AliCorrelationReducedCaloCluster : public TObject {
252   
253   friend class AliAnalysisTaskCorrelationTree;
254   
255  public:
256   enum ClusterType {
257     kUndefined=0, kEMCAL, kPHOS  
258   };
259    
260   AliCorrelationReducedCaloCluster();
261   ~AliCorrelationReducedCaloCluster();
262   
263   Bool_t  IsEMCAL() const {return (fType==kEMCAL ? kTRUE : kFALSE);}
264   Bool_t  IsPHOS()  const {return (fType==kPHOS ? kTRUE : kFALSE);}
265   Float_t Energy()  const {return fEnergy;}
266   Float_t Dx()      const {return fTrackDx;}
267   Float_t Dz()      const {return fTrackDz;}
268   
269  private:
270   Char_t  fType;         // cluster type (EMCAL/PHOS)
271   Float_t fEnergy;       // cluster energy
272   Float_t fTrackDx;      // distance to closest track in phi
273   Float_t fTrackDz;      // distance to closest track in z
274   
275   AliCorrelationReducedCaloCluster(const AliCorrelationReducedCaloCluster &c);
276   AliCorrelationReducedCaloCluster& operator= (const AliCorrelationReducedCaloCluster &c);
277
278   ClassDef(AliCorrelationReducedCaloCluster, 1);
279 };
280
281
282 //_________________________________________________________________________
283 class AliCorrelationReducedEvent : public TObject {
284
285   friend class AliAnalysisTaskCorrelationTree;
286
287  public:
288   AliCorrelationReducedEvent();
289   ~AliCorrelationReducedEvent();
290
291   // getters
292   Int_t     RunNo()                           const {return fRunNo;}
293   UShort_t  BC()                              const {return fBC;}
294   ULong64_t TriggerMask()                     const {return fTriggerMask;}
295   Bool_t    IsPhysicsSelection()              const {return fIsPhysicsSelection;}
296   Float_t   Vertex(Int_t axis)                const {return (axis>=0 && axis<=2 ? fVtx[axis] : 0);}
297   Int_t     VertexNContributors()             const {return fNVtxContributors;}
298   Float_t   VertexTPC(Int_t axis)             const {return (axis>=0 && axis<=2 ? fVtxTPC[axis] : 0);}
299   Int_t     VertexTPCContributors()           const {return fNVtxTPCContributors;}
300   Float_t   CentralityVZERO()                 const {return fCentrality[0];}
301   Float_t   CentralitySPD()                   const {return fCentrality[1];}
302   Float_t   CentralityTPC()                   const {return fCentrality[2];}
303   Float_t   CentralityZEMvsZDC()              const {return fCentrality[3];}
304   Int_t     CentralityQuality()               const {return fCentQuality;}
305   Int_t     NV0CandidatesTotal()              const {return fNV0candidates[0];}
306   Int_t     NV0Candidates()                   const {return fNV0candidates[1];}
307   Int_t     NDielectrons()                    const {return fNDielectronCandidates;}
308   Int_t     NTracksTotal()                    const {return fNtracks[0];}
309   Int_t     NTracks()                         const {return fNtracks[1];}
310   Int_t     SPDntracklets()                   const {return fSPDntracklets;}
311   
312   Float_t   MultChannelVZERO(Int_t channel)   const {return (channel>=0 && channel<=63 ? fVZEROMult[channel] : -999.);}
313   Float_t   MultVZEROA()                      const;
314   Float_t   MultVZEROC()                      const;
315   Float_t   MultVZERO()                       const;
316   Float_t   MultRingVZEROA(Int_t ring)        const;
317   Float_t   MultRingVZEROC(Int_t ring)        const;
318   
319   Float_t   EnergyZDC(Int_t channel)   const {return (channel>=0 && channel<8 ? fZDCnEnergy[channel] : -999.);}
320   Float_t   EnergyZDCnA(Int_t channel) const {return (channel>=0 && channel<4 ? fZDCnEnergy[channel+4] : -999.);}
321   Float_t   EnergyZDCnC(Int_t channel) const {return (channel>=0 && channel<4 ? fZDCnEnergy[channel] : -999.);}
322   
323   AliCorrelationReducedTrack* GetTrack(Int_t i)         const {return (i<fNtracks[1] ? (AliCorrelationReducedTrack*)fTracks->At(i) : 0x0);}
324   AliCorrelationReducedPair* GetV0Pair(Int_t i)         const {return (i>=0 && i<fNV0candidates[1] ? (AliCorrelationReducedPair*)fCandidates->At(i) : 0x0);}
325   AliCorrelationReducedPair* GetDielectronPair(Int_t i) const {return (i>=0 && i<fNDielectronCandidates ? (AliCorrelationReducedPair*)fCandidates->At(i+fNV0candidates[1]) : 0x0);}
326   TClonesArray* GetPairs()                              const {return fCandidates;}
327   TClonesArray* GetTracks()                             const {return fTracks;}
328
329   Int_t GetNCaloClusters() const {return fNCaloClusters;}
330   AliCorrelationReducedCaloCluster* GetCaloCluster(Int_t i) const {return (i>=0 && i<fNCaloClusters ? (AliCorrelationReducedCaloCluster*)fCaloClusters->At(i) : 0x0);}
331   
332   void GetQvector(Double_t Qvec[][2], Int_t det);
333   void GetTPCQvector(Double_t Qvec[][2], Int_t det);
334   void GetVZEROQvector(Double_t Qvec[][2], Int_t det);
335   void GetVZEROQvector(Double_t Qvec[][2], Int_t det, Float_t* vzeroMult);
336   void GetZDCQvector(Double_t Qvec[][2], Int_t det);
337
338  private:
339   Int_t     fRunNo;                 // run number
340   UShort_t  fBC;                    // bunch crossing
341   ULong64_t fTriggerMask;           // trigger mask
342   Bool_t    fIsPhysicsSelection;    // PhysicsSelection passed event
343   Float_t   fVtx[3];                // global event vertex vector in cm
344   Int_t     fNVtxContributors;      // global event vertex contributors
345   Float_t   fVtxTPC[3];             // TPC only event vertex           
346   Int_t     fNVtxTPCContributors;   // TPC only event vertex contributors
347   Float_t   fCentrality[4];         // centrality; 0-VZERO, 1-SPD, 2-TPC, 3-ZEMvsZDC 
348   Int_t     fCentQuality;           // quality flag for the centrality 
349   Int_t     fNV0candidates[2];      // number of V0 candidates, [0]-total, [1]-selected for the tree
350   Int_t     fNDielectronCandidates; // number of pairs selected as dielectrons
351   Int_t     fNtracks[2];            // number of tracks, [0]-total, [1]-selected for the tree
352   Int_t     fSPDntracklets;         // number of SPD tracklets in |eta|<1.0 
353
354   Float_t   fVZEROMult[64];         // VZERO multiplicity in all 64 channels
355   Float_t   fZDCnEnergy[8];         // neutron ZDC energy in all 8 channels
356     
357   TClonesArray* fTracks;            //->   array containing global tracks
358   static TClonesArray* fgTracks;
359   
360   TClonesArray* fCandidates;        //->   array containing pair candidates
361   static TClonesArray* fgCandidates;
362   
363   Int_t     fNCaloClusters;         // number of calorimeter clusters  
364   TClonesArray* fCaloClusters;        //->   array containing calorimeter clusters
365   static TClonesArray* fgCaloClusters;
366   
367   void ClearEvent();
368   AliCorrelationReducedEvent(const AliCorrelationReducedEvent &c);
369   AliCorrelationReducedEvent& operator= (const AliCorrelationReducedEvent &c);
370
371   ClassDef(AliCorrelationReducedEvent, 2);
372 };
373
374 //_______________________________________________________________________________
375 inline UShort_t AliCorrelationReducedTrack::ITSncls() const
376 {
377   //
378   // ITS number of clusters from the cluster map
379   //
380   UShort_t ncls=0;
381   for(Int_t i=0; i<6; ++i) ncls += (ITSLayerHit(i) ? 1 : 0);
382   return ncls;
383 }
384
385
386 //_______________________________________________________________________________
387 inline Int_t AliCorrelationReducedTrack::TPCClusterMapBitsFired()  const
388 {
389   //
390   // Count the number of bits fired in the TPC cluster map
391   //
392   Int_t nbits=0;
393   for(Int_t i=0; i<8; ++i) nbits += (TPCClusterMapBitFired(i) ? 1 : 0);
394   return nbits;
395 }
396
397
398 //_______________________________________________________________________________
399 inline Float_t AliCorrelationReducedPair::Energy() const 
400 {
401   //
402   // Return the energy
403   //
404   Float_t mass=fMass[0];
405   switch (fCandidateId) {
406     case kK0sToPiPi:
407       mass = fMass[0];
408       break;
409     case kLambda0ToPPi:
410       mass = fMass[1];
411       break;
412     case kALambda0ToPPi:
413       mass = fMass[2];
414       break;
415     default:
416       mass = fMass[0];
417       break;    
418   }
419   Float_t p = P();
420   return TMath::Sqrt(mass*mass+p*p);
421 }
422
423
424 //_______________________________________________________________________________
425 inline Float_t AliCorrelationReducedPair::Rapidity() const
426 {
427   //
428   // return rapidity
429   //
430   Float_t e = Energy();
431   Float_t pz = Pz();
432   if(e-TMath::Abs(pz)>1.0e-10)
433     return 0.5*TMath::Log((e+pz)/(e-pz));
434   else 
435     return -999.;
436 }
437
438
439 //_______________________________________________________________________________
440 inline Double_t AliCorrelationReducedEventFriend::EventPlane(Int_t det, Int_t harmonic) const
441 {
442   //
443   // Event plane from detector "det" and harmonic "harmonic"
444   //
445   if(det<0 || det>=kNdetectors || harmonic<1 || harmonic>fgkNMaxHarmonics) return -999.;
446   return TMath::ATan2(fQvector[det][harmonic-1][1], fQvector[det][harmonic-1][0])/Double_t(harmonic);
447 }
448
449 //_______________________________________________________________________________
450 inline Bool_t AliCorrelationReducedEventFriend::CheckEventPlaneStatus(Int_t det, Int_t h, EventPlaneStatus flag) const {
451   //
452   // Check the status of the event plane for a given detector and harmonic
453   //
454   if(det<0 || det>=kNdetectors || h<1 || h>fgkNMaxHarmonics) return kFALSE;
455   return (flag<kNMaxFlowFlags ? (fEventPlaneStatus[det][h]&(1<<flag)) : kFALSE);
456 }
457
458 #endif