]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FLOW/Attic/AliFlowAnalyser.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / FLOW / Attic / AliFlowAnalyser.h
1 //////////////////////////////////////////////////////////////////////
2 //
3 // $Id: AliFlowAnalyser.h 18618 2007-05-16 15:38:22Z snelling $
4 //
5 // Author: Emanuele Simili
6 //
7 //////////////////////////////////////////////////////////////////////
8 //
9 // Description: ALICE flow analysis for AliFlowEvent(s), 
10 // adapted from the STAR flow analysis .
11 // Original Authors:                 Raimond Snellings & Art Poskanzer
12 //
13 //////////////////////////////////////////////////////////////////////
14
15 #ifndef ALIFLOWANALYSER_H
16 #define ALIFLOWANALYSER_H
17
18 #include <TVector2.h>
19 #include <TFile.h>
20 #include "AliFlowConstants.h"
21
22 class TH1F;
23 class TH1D;
24 class TH2F;
25 class TH2D;
26 class TH3F;
27 class TProfile;
28 class TProfile2D;
29 class TOrdCollection;
30 class TClonesArray;
31
32 class AliFlowTrack;
33 class AliFlowV0;
34 class AliFlowEvent;
35 class AliFlowSelection;
36
37 class AliFlowAnalyser {
38
39
40 public:
41   
42   AliFlowAnalyser(const AliFlowSelection* flowSelect = 0);      // Constructor with selection object (default selection if no one given)
43   virtual  ~AliFlowAnalyser();                                  // Default destructor (no actions)
44
45  // Steps of the flow analysis
46   Bool_t   Init() ;                                             // Books histograms for flow analysis
47   Bool_t   Finish() ;                                           // Saves histograms, Closes stuff
48
49  // Analysis of 1 event (can be called from outside)
50   Bool_t   Analyze(AliFlowEvent* flowEvent = 0) ;               // Fills the defaults histograms (init them first!) and performs the calculation for the given event         
51
52  // Resolution corrections to v_n (call it at the end of the evts loop)
53   Bool_t   Resolution() ;                                       // Calculates resolution and mean flow values
54  
55  // Weights calculation and saving (call it at the end of the evts loop)
56   void     Weightening() ;                                      // Calculates weights and fills PhiWgt histograms
57
58  // Options
59   void     SetSub(Int_t sub = 0)                                { fSub = sub ; }                // Set subevents (1=eta,0=rnd,-1=charged)
60   void     SetEtaSub()                                          { SetSub(1) ; }         // Set subevents (1=eta,0=rnd,-1=charged)
61   void     SetV1Ep1Ep2(Bool_t v1Ep1Ep2 = kTRUE)                 { fV1Ep1Ep2 = v1Ep1Ep2 ; }      // Switches the v_1{EP1,EP2} calculation on/off
62   void     SetShuffle(Bool_t sh = kTRUE)                        { fShuffle = sh ; }             // Set to re-shuffle evt tracks
63   void     SetUsePhiWgt(Bool_t pw = kTRUE)                      { fReadPhiWgt = pw ; }          // Set to use phi weights (true by default...if there)
64   void     SetUseBayWgt(Bool_t bw = kTRUE)                      { fBayWgt = bw ; }              // Set to use bayesian weights for p.id. (false by default)
65   void     SetUsePtWgt(Bool_t ptw = kTRUE)                      { fPtWgt = ptw ; }              // uses pT as a weight for RP determination
66   void     SetUseEtaWgt(Bool_t etw = kTRUE)                     { fEtaWgt = etw ; }             // uses eta as a weight for RP determination
67   void     SetUseOnePhiWgt(Bool_t opw = kTRUE)                  { fOnePhiWgt = opw ; }          // just one wgt histogram
68   void     SetUseFirstLastPhiWgt(Bool_t flw = kTRUE)            { fOnePhiWgt = !flw ; }         // uses 3 wgt histograms
69   void     SetFlowForV0(Bool_t v0 = kTRUE)                      { fV0loop = v0 ; }              // Enables Flow study for v0
70   void     SetTrackLoop(Bool_t trkl = kTRUE)                    { fTrackLoop = trkl ; }         // Enables Tracks loop (keep it kTRUE)
71   void     SetCustomRespFunc(Bool_t crf = kTRUE)                { fCustomRespFunc = crf ; }     // Enables to use a custom detector response function
72   //void     SetDebugg(Int_t db = 1) ;                          // set the cout's for debug (default is 1)
73
74  // Histograms
75   void     SetPtRangevEta(Float_t lo, Float_t hi)               { fPtRangevEta[0] = lo ; fPtRangevEta[1] = hi ; }  // Sets the pt range for the v(eta) histograms.
76   void     SetEtaRangevPt(Float_t lo, Float_t hi)               { fEtaRangevPt[0] = lo ; fEtaRangevPt[1] = hi ; }  // Sets the |eta| range for the v(pt) histograms.
77   //void     SetMaxLabel(Int_t lab = 100)                       { fMaxLabel = lab ; }
78   
79  // Output 
80   void     SetHistFileName(TString name)                        { fHistFileName = name ; }      // Sets output file name
81   TString  GetHistFileName() const                              { return fHistFileName ; }
82
83  // Phi Weights 
84   TString  GetWgtFileName() const                               { return (TString)fPhiWgtFile->GetName() ; }
85   void     FillWgtArrays(TFile* wgtFile) ;                      // Loads phi & bayesian weights from file (flowPhiWgt.hist.root) and fills the arrays
86
87  // Results
88   Float_t  GetRunBayesian(Int_t nPid=2, Int_t selN=0) const ;   // Normalized Particle abundance (all events up to here)
89   void     PrintRunBayesian(Int_t selN=0) const ;               // Prints the normalized Particle abundance (up to here)
90   void     PrintEventQuantities() const ;                       // Prints event by event calculated quantities
91   Float_t  Res(Int_t eventN, Int_t harN) const                  { return fRes[eventN][harN]; }    // Returns the calculated resolution for the RP
92   Float_t  ResErr(Int_t eventN, Int_t harN) const               { return fResErr[eventN][harN]; } // Returns the estimated error on the resolution 
93
94
95  protected:
96  
97  // Internal methods to fill the histogram
98   Bool_t   FillFromFlowEvent(AliFlowEvent* fFlowEvent) ;        // Fills internal variables and array from Flow Events
99   void     FillEventHistograms(AliFlowEvent* fFlowEvent) ;      // Fills Events' histograms (from AliFlowEvent)
100   void     FillParticleHistograms(TClonesArray* fFlowTracks) ;          // Fills Tracks' histograms (from AliFlowTrack)
101   void     FillV0Histograms(TClonesArray* fFlowV0s) ;           // Fills V0s' histograms
102   Int_t    HarmonicsLoop(AliFlowTrack* fFlowTrack) ;            // Harmonics & Selections histograms (from AliFlowTracks)
103   //void     FillLabels() ;                                     // fills an histogram of Labels (the ones from ESD) 
104
105  // Weights plugged to the event
106   void     FillBayesianWgt(AliFlowEvent* fFlowEvent) ;          // Plugs the bayesian weights (fBayesianWgt[0]*) into the AliFlowEvent
107   void     FillEvtPhiWgt(AliFlowEvent* fFlowEvent) ;            // Plugs the PhiWeights (fPhiWgt*, etc.) into the AliFlowEvent
108  
109  // Resolution Calculation
110   Double_t Chi(Double_t res) ;                                  // Calculates chi from the event plane resolution
111   Double_t ResEventPlane(Double_t chi) ;                        // Calculates the event plane resolution as a function of chi
112   Double_t ResEventPlaneK2(Double_t chi) ;                      // Calculates the event plane resolution as a function of chi for the case k=2.
113   Double_t ResEventPlaneK3(Double_t chi) ;                      // Calculates the event plane resolution as a function of chi for the case k=3.
114   Double_t ResEventPlaneK4(Double_t chi) ;                      // Calculates the event plane resolution as a function of chi for the case k=4.
115
116
117  private:
118
119  // to make the code checker happy
120   AliFlowAnalyser(const AliFlowAnalyser &flowAnal) ;            // Copy Constructor (dummy)
121   AliFlowAnalyser &operator=(const AliFlowAnalyser &flowAnal) ; // Assignment Operator
122
123  // Flags
124   Bool_t           fTrackLoop ;                                 //! tracks main loop
125   Bool_t           fV0loop ;                                    //! correlation analysis is done also for neutral secundary vertex
126   Bool_t           fShuffle ;                                   //! to randomly reshuffle tracks
127   Bool_t           fV1Ep1Ep2;                                   //! Flag for v_1{EP1,EP2} calculation on/off
128   Bool_t           fEtaSub;                                     //! eta subevents
129   Bool_t           fReadPhiWgt ;                                //! Phi Weights are applied to Phi distrib. (default is false)
130   Bool_t           fBayWgt ;                                    //! Bayesian Weights are applied to P.Id. (default is false) 
131   Bool_t           fRePid ;                                     //! Re-Calculates the P.Id. basing on the bayesian wgts (if plugged in)
132   Bool_t           fCustomRespFunc ;                            //! A custom "detector response function" is used for P.Id (default is false -> the combined response function from the ESD will be used)
133   Int_t            fSub;                                        //! subevents (1=eta,0=rnd,-1=charged)
134
135   Bool_t           fPtWgt ;                                     //! flag to use pT as a weight for RP determination
136   Bool_t           fEtaWgt ;                                    //! flag to use eta as a weight for RP determination
137   Bool_t           fOnePhiWgt ;                                 //! if kTRUE: just one phi-wgt histogram, if kFALSE: three phi-wgt histogram (TPC+,TPC-,cross)
138
139  // Files
140   TFile*           fHistFile ;                                  //! histograms file (output)
141   TFile*           fPhiWgtFile ;                                //! phi weight file 
142   TString          fHistFileName ;                              //! Output File Name (histograms from flow analysis)
143   //TString        fFlowEvtFileName ;                           //! Input file name (Flow Events)
144
145  // enumerators                             
146   Int_t            fEventNumber ;                               //! progressive enumeration of AliFlowEvents
147   Int_t            fTrackNumber ;                               //! progressive enumeration of AliFlowTracks
148   Int_t            fV0Number ;                                  //! progressive enumeration of AliFlowV0s
149   //Int_t          fNumberOfEvents ;                            //! total number of AliFlowEvents in file
150   Int_t            fNumberOfTracks ;                            //! total number of tracks in the current event
151   Int_t            fNumberOfV0s ;                               //! total number of v0s in the current event
152   Int_t            fPidId ;                                     //! Particle Id hypothesys of the track (0..4 for e,mu,pi,k,p)
153   Int_t            fSelParts ;                                  //! n. of tracks selected for correlation analysis
154   Int_t            fSelV0s ;                                    //! n. of v0s selected for correlation analysis
155
156   Int_t            fTotalNumberOfEvents ;                       //! total number of analyzed AliFlowEvents
157   Int_t            fTotalNumberOfTracks ;                       //! total number of analyzed tracks
158   Int_t            fTotalNumberOfV0s ;                          //! total number of analyzed v0s
159
160  // Internal pointers
161   AliFlowEvent*     fFlowEvent ;                                //! pointer to AliFlowEvent
162   AliFlowTrack*     fFlowTrack ;                                //! pointer to AliFlowTrack
163   AliFlowV0*        fFlowV0 ;                                   //! pointer to AliFlowV0
164   AliFlowSelection* fFlowSelect ;                               //! selection object
165   TClonesArray*     fFlowTracks ;                               //! pointer to the TrackCollection
166   TClonesArray*     fFlowV0s ;                                  //! pointer to the V0Collection
167
168   Float_t           fVertex[3] ;                                //! Event's Vertex position 
169
170  // For weights
171   Int_t             fPhiBins ;                                  //! n. of phi bins     
172   Float_t           fPhiMin ;                                   //! wgt histo range (phi)
173   Float_t           fPhiMax ;                                   //! wgt histo range (phi) 
174
175   AliFlowConstants::PhiWgt_t    fPhiWgt ;                       //! PhiWgt Array (all TPC)
176   AliFlowConstants::PhiWgt_t    fPhiWgtPlus ;                   //! PhiWgt Array (TPC+)
177   AliFlowConstants::PhiWgt_t    fPhiWgtMinus ;                  //! PhiWgt Array (TPC-)
178   AliFlowConstants::PhiWgt_t    fPhiWgtCross ;                  //! PhiWgt Array (TPC/)     
179
180  // For bayesian weights
181   Double_t fBayesianWgt[AliFlowConstants::kSels][AliFlowConstants::kPid] ;      //! Bayesian weights (expected particle abundance)
182   TVector2 fQ[AliFlowConstants::kSels][AliFlowConstants::kHars];                        //! flow vector
183   Float_t  fPsi[AliFlowConstants::kSels][AliFlowConstants::kHars];                      //! event plane angle
184   UInt_t   fMult[AliFlowConstants::kSels][AliFlowConstants::kHars];                     //! multiplicity
185   Float_t  fQnorm[AliFlowConstants::kSels][AliFlowConstants::kHars];                    //! Q/Sqrt(Mult)
186   TVector2 fQSub[AliFlowConstants::kSubs][AliFlowConstants::kSels][AliFlowConstants::kHars];            //! flow vector subs
187   Float_t  fPsiSub[AliFlowConstants::kSubs][AliFlowConstants::kSels][AliFlowConstants::kHars];          //! plane angle of subevents
188   UInt_t   fMultSub[AliFlowConstants::kSubs][AliFlowConstants::kSels][AliFlowConstants::kHars];         //! multiplicity subs
189   Float_t  fRes[AliFlowConstants::kSels][AliFlowConstants::kHars];                      //! event plane resolution
190   Float_t  fResErr[AliFlowConstants::kSels][AliFlowConstants::kHars];                   //! event plane resolution error
191
192  // for Histograms
193   TString           fLabel ;                                    //! label axis : rapidity or pseudorapidity
194   Float_t           fEtaMin ;                                   //! histo range (eta)
195   Float_t           fEtaMax ;                                   //! histo range (eta) 
196   Float_t           fPtMin ;                                    //! histo range (pt)       
197   Float_t           fPtMax ;                                    //! histo range (pt)       
198   Float_t           fPtMaxPart ;                                //! max pt for _part histo
199   Int_t             fEtaBins ;                                  //! n. of eta bins
200   Int_t             fPtBins ;                                   //! n. of pt bins     
201   Int_t             fPtBinsPart ;                               //! n. of pt bins for _part histo
202   Float_t           fPtRangevEta[2] ;                           //! pt range for the v(eta) histograms.
203   Float_t           fEtaRangevPt[2] ;                           //! |eta| range for the v(pt) histograms.
204   Int_t             fMaxLabel ;                                 //! for the MC labels histogram (max bin)
205
206   TOrdCollection*   fPhiWgtHistList ;                           //! Weights:  histogram list
207   TOrdCollection*   fVnResHistList ;                            //! Resolution and Vn:  histogram list
208  
209 // for Single histograms
210
211  // *****************
212  // EVENTs HISTOGRAMS
213  // *****************
214   TH1F*     fHistTrigger;                                  //! histogram ...
215   TH1F*     fHistMult;                                     //! histogram ...
216   TH1F*     fHistV0Mult;                                   //! histogram ...
217   TH1F*     fHistOrigMult;                                 //! histogram ...
218   TH1F*     fHistMultOverOrig;                             //! histogram ...
219   TH1F*     fHistMultEta;                                  //! histogram ...
220   TH1F*     fHistCent;                                     //! histogram ...
221   TH1F*     fHistVertexZ;                                  //! histogram ...
222   TH2F*     fHistVertexXY2D;                               //! histogram ...
223   TH2F*     fHistEnergyZDC;                                //! histogram ...
224   TH1F*     fHistPartZDC;                                  //! histogram ...
225   TProfile* fHistPidMult;                                  //! histogram ...
226   TH1F*     fHistBayPidMult;                               //! histogram ...
227   TH1F*     fHistEtaSym;                                   //! histogram ...
228   TH1F*     fHistEtaSymPart;                               //! histogram ...
229   TH2F*     fHistEtaSymVerZ2D;                             //! histogram ...
230   TH2F*     fHistEtaSymVerZ2DPart;                         //! histogram ...
231  // selected (TR & V0)
232   TH1F*     fHistMultPart;                                 //! histogram ...
233   TH1F*     fHistV0MultPart;                               //! histogram ...
234   TH1F*     fHistBayPidMultPart;                           //! histogram ...
235   TH1F*     fHistMultPartUnit;                             //! histogram ...
236   
237  // *****************
238  // TRACKs HISTOGRAMS (all tracks)
239  // *****************
240   TH1F*     fHistPtot ;                                    //! histogram ...
241   TH1F*     fHistPt ;                                      //! histogram ...
242   TH1F*     fHistCharge;                                   //! histogram ...
243   TH1F*     fHistDcaGlobal;                                //! histogram ...
244   TH1F*     fHistDca;                                      //! histogram ...
245   TH1F*     fHistTransDca;                                 //! histogram ...
246   TH1F*     fHistChi2;                                     //! histogram ...
247   TH1F*     fHistLenght;                                   //! histogram ...
248   TH1F*     fHistInvMass ;                                 //! histogram ...
249   TH1F*     fHistFitOverMax;                               //! histogram ...
250   TH2D*     fHistPhiPtCon ;                                //! histogram ...
251   TH2D*     fHistPhiPtUnc ;                                //! histogram ...
252   TH2D*     fHistPtPhiPos ;                                //! histogram ...
253   TH2D*     fHistPtPhiNeg ;                                //! histogram ...
254   TH3F*     fHistAllEtaPtPhi3D;                            //! histogram ...
255   TProfile* fHistCosPhi;                                   //! histogram ...
256   TH2F*     fHistPidPt;                                    //! histogram ...
257   TH1F*     fHistPhi ;                                     //! histogram ...
258   TH1F*     fHistPhiCons ;                                 //! histogram ...
259   TH2D*     fHistYieldAll2D;                               //! histogram ...
260   TH2D*     fHistYieldCon2D;                               //! histogram ...
261   TH2D*     fHistYieldUnc2D;                               //! histogram ...
262   TH3F*     fHistConsEtaPtPhi3D;                           //! histogram ...
263   TH3F*     fHistGlobEtaPtPhi3D;                           //! histogram ...
264   TH3F*     fHistUncEtaPtPhi3D ;                           //! histogram ...
265   // fit & dE/dX for each detector (all tracks)
266   TH1F*     fHistChi2ITS;                                  //! histogram ...
267   TH1F*     fHistChi2normITS;                              //! histogram ...
268   TH1F*     fHistFitPtsITS;                                //! histogram ...
269   TH1F*     fHistMaxPtsITS;                                //! histogram ...
270   TH2F*     fHistMeanDedxPos2DITS;                         //! histogram ...
271   TH2F*     fHistMeanDedxNeg2DITS;                         //! histogram ...
272   // -
273   TH1F*     fHistChi2TPC;                                  //! histogram ...
274   TH1F*     fHistChi2normTPC;                              //! histogram ...
275   TH1F*     fHistFitPtsTPC;                                //! histogram ...
276   TH1F*     fHistMaxPtsTPC;                                //! histogram ...
277   TH1F*     fHistFitOverMaxTPC;                            //! histogram ...
278   TH2F*     fHistMeanDedxPos2D;                            //! histogram ...
279   TH2F*     fHistMeanDedxNeg2D;                            //! histogram ...
280   // -
281   TH1F*     fHistChi2TRD;                                  //! histogram ...
282   TH1F*     fHistChi2normTRD;                              //! histogram ...
283   TH1F*     fHistFitPtsTRD;                                //! histogram ...
284   TH1F*     fHistMaxPtsTRD;                                //! histogram ...
285   TH2F*     fHistMeanDedxPos2DTRD;                         //! histogram ...
286   TH2F*     fHistMeanDedxNeg2DTRD;                         //! histogram ...
287   // -
288   TH1F*     fHistChi2TOF;                                  //! histogram ...
289   TH1F*     fHistChi2normTOF;                              //! histogram ...
290   TH1F*     fHistFitPtsTOF;                                //! histogram ...
291   TH1F*     fHistMaxPtsTOF;                                //! histogram ...
292   TH2F*     fHistMeanDedxPos2DTOF;                         //! histogram ...
293   TH2F*     fHistMeanDedxNeg2DTOF;                         //! histogram ...
294   // detector response for particle type (all tracks, based on Pid)
295   TH2F*     fHistMeanTPCPiPlus ;                           //! histogram ...
296   TH2F*     fHistMeanTPCPiMinus ;                          //! histogram ...
297   TH2F*     fHistMeanTPCProton ;                           //! histogram ...
298   TH2F*     fHistMeanTPCPbar ;                             //! histogram ...
299   TH2F*     fHistMeanTPCKplus ;                            //! histogram ...
300   TH2F*     fHistMeanTPCKminus ;                           //! histogram ...
301   TH2F*     fHistMeanTPCDeuteron ;                         //! histogram ...
302   TH2F*     fHistMeanTPCAntiDeuteron ;                     //! histogram ...
303   TH2F*     fHistMeanTPCPositron ;                         //! histogram ...
304   TH2F*     fHistMeanTPCElectron ;                         //! histogram ...
305   TH2F*     fHistMeanTPCMuonPlus ;                         //! histogram ...
306   TH2F*     fHistMeanTPCMuonMinus ;                        //! histogram ...
307   // -
308   TH2F*     fHistMeanITSPiPlus ;                           //! histogram ...
309   TH2F*     fHistMeanITSPiMinus ;                          //! histogram ...
310   TH2F*     fHistMeanITSProton ;                           //! histogram ...
311   TH2F*     fHistMeanITSPbar ;                             //! histogram ...
312   TH2F*     fHistMeanITSKplus ;                            //! histogram ...
313   TH2F*     fHistMeanITSKminus ;                           //! histogram ...
314   TH2F*     fHistMeanITSDeuteron ;                         //! histogram ...
315   TH2F*     fHistMeanITSAntiDeuteron ;                     //! histogram ...
316   TH2F*     fHistMeanITSPositron ;                         //! histogram ...
317   TH2F*     fHistMeanITSElectron ;                         //! histogram ...
318   TH2F*     fHistMeanITSMuonPlus ;                         //! histogram ...
319   TH2F*     fHistMeanITSMuonMinus ;                        //! histogram ...
320   // -
321   TH2F*     fHistMeanTOFPiPlus ;                           //! histogram ...
322   TH2F*     fHistMeanTOFPiMinus ;                          //! histogram ...
323   TH2F*     fHistMeanTOFProton ;                           //! histogram ...
324   TH2F*     fHistMeanTOFPbar ;                             //! histogram ...
325   TH2F*     fHistMeanTOFKplus ;                            //! histogram ...
326   TH2F*     fHistMeanTOFKminus ;                           //! histogram ...
327   TH2F*     fHistMeanTOFDeuteron ;                         //! histogram ...
328   TH2F*     fHistMeanTOFAntiDeuteron ;                     //! histogram ...
329   TH2F*     fHistMeanTOFPositron ;                         //! histogram ...
330   TH2F*     fHistMeanTOFElectron ;                         //! histogram ...
331   TH2F*     fHistMeanTOFMuonPlus ;                         //! histogram ...
332   TH2F*     fHistMeanTOFMuonMinus ;                        //! histogram ...
333   // -
334   TH2F*     fHistMeanTRDPiPlus ;                           //! histogram ...
335   TH2F*     fHistMeanTRDPiMinus ;                          //! histogram ...
336   TH2F*     fHistMeanTRDProton ;                           //! histogram ...
337   TH2F*     fHistMeanTRDPbar ;                             //! histogram ...
338   TH2F*     fHistMeanTRDKplus ;                            //! histogram ...
339   TH2F*     fHistMeanTRDKminus ;                           //! histogram ...
340   TH2F*     fHistMeanTRDDeuteron ;                         //! histogram ...
341   TH2F*     fHistMeanTRDAntiDeuteron ;                     //! histogram ...
342   TH2F*     fHistMeanTRDPositron ;                         //! histogram ...
343   TH2F*     fHistMeanTRDElectron ;                         //! histogram ...
344   TH2F*     fHistMeanTRDMuonPlus ;                         //! histogram ...
345   TH2F*     fHistMeanTRDMuonMinus ;                        //! histogram ...
346   // pid probability for all particle (all tracks)
347   TH1F*     fHistPidPiPlus;                                //! histogram ...
348   TH1F*     fHistPidPiMinus;                               //! histogram ...
349   TH1F*     fHistPidProton;                                //! histogram ...
350   TH1F*     fHistPidAntiProton;                            //! histogram ...
351   TH1F*     fHistPidKplus;                                 //! histogram ...
352   TH1F*     fHistPidKminus;                                //! histogram ...
353   TH1F*     fHistPidDeuteron;                              //! histogram ...
354   TH1F*     fHistPidAntiDeuteron;                          //! histogram ...
355   TH1F*     fHistPidElectron;                              //! histogram ...
356   TH1F*     fHistPidPositron;                              //! histogram ...
357   TH1F*     fHistPidMuonMinus;                             //! histogram ...
358   TH1F*     fHistPidMuonPlus;                              //! histogram ...
359   // pid probability for particle type (all tracks, based on Pid)
360   TH1F*     fHistPidPiPlusPart;                            //! histogram ...
361   TH1F*     fHistPidPiMinusPart;                           //! histogram ...
362   TH1F*     fHistPidProtonPart;                            //! histogram ...
363   TH1F*     fHistPidAntiProtonPart;                        //! histogram ...
364   TH1F*     fHistPidKplusPart;                             //! histogram ...
365   TH1F*     fHistPidKminusPart;                            //! histogram ...
366   TH1F*     fHistPidDeuteronPart;                          //! histogram ...
367   TH1F*     fHistPidAntiDeuteronPart;                      //! histogram ...
368   TH1F*     fHistPidElectronPart;                          //! histogram ...
369   TH1F*     fHistPidPositronPart;                          //! histogram ...
370   TH1F*     fHistPidMuonMinusPart;                         //! histogram ...
371   TH1F*     fHistPidMuonPlusPart;                          //! histogram ...
372   // MC labels from the simulation (all tracks)
373   //TH2F*     fLabHist;                                    //! histogram ... 
374  // *****************
375  // selected TRACKS
376  // *****************
377   TProfile* fHistBinEta;                                   //! histogram ...
378   TProfile* fHistBinPt;                                    //! histogram ...
379   //
380   TH3F*     fHistEtaPtPhi3DPart ;                          //! histogram ...
381   TH2D*     fHistYieldPart2D;                              //! histogram ...
382   TH1F*     fHistDcaGlobalPart ;                           //! histogram ...
383   TH1F*     fHistInvMassPart ;                             //! histogram ...
384   TH3F*     fHistEtaPtPhi3DOut ;                           //! histogram ...
385   TH2D*     fHistYieldOut2D;                               //! histogram ...
386   TH1F*     fHistDcaGlobalOut ;                            //! histogram ...
387   TH1F*     fHistInvMassOut ;                              //! histogram ...
388   TH3F*     fHistMeanDedxPos3DPart ;                       //! histogram ...
389   TH3F*     fHistMeanDedxNeg3DPart ;                       //! histogram ...
390   TH3F*     fHistMeanDedxPos3DPartITS ;                    //! histogram ...
391   TH3F*     fHistMeanDedxNeg3DPartITS ;                    //! histogram ...
392 //
393
394  // *****************
395  // V0s HISTOGRAMS (all v0s)
396  // *****************
397   TH1F*     fHistV0Mass;                                   //! histogram ...
398   TH3F*     fHistV0EtaPtPhi3D;                             //! histogram ...
399   TH2D*     fHistV0YieldAll2D;                             //! histogram ...
400   TH2D*     fHistV0PYall2D;                                //! histogram ...
401   TH1F*     fHistV0Dca;                                    //! histogram ...
402   TH1F*     fHistV0Chi2;                                   //! histogram ...
403   TH1F*     fHistV0Lenght;                                 //! histogram ...
404   TH1F*     fHistV0Sigma;                                  //! histogram ...
405   TProfile* fHistV0CosPhi;                                 //! histogram ... 
406   TH2D*     fHistV0MassPtSlices;                           //! histogram ...
407  // *****************
408  // selected V0s
409  // *****************
410   TProfile* fHistV0BinEta;                                 //! histogram ... 
411   TProfile* fHistV0BinPt;                                  //! histogram ... 
412   TProfile* fHistV0sbBinEta;                               //! histogram ... 
413   TProfile* fHistV0sbBinPt;                                //! histogram ...
414   //
415   TH1F*     fHistV0MassWin ;                               //! histogram ...
416   TH3F*     fHistV0EtaPtPhi3DPart ;                        //! histogram ...
417   TH2D*     fHistV0YieldPart2D;                            //! histogram ...
418   TH1F*     fHistV0DcaPart ;                               //! histogram ...
419   TH1F*     fHistV0LenghtPart ;                            //! histogram ...
420   TH1F*     fHistV0sbMassSide ;                            //! histogram ...
421   TH3F*     fHistV0sbEtaPtPhi3DPart ;                      //! histogram ...
422   TH2D*     fHistV0sbYieldPart2D;                          //! histogram ...
423   TH1F*     fHistV0sbDcaPart ;                             //! histogram ...
424   TH1F*     fHistV0sbLenghtPart ;                          //! histogram ...
425
426 // for each harmonic, each selection, and each sub-event
427
428  // *****************
429  // SUB-EVENTs HISTOGRAMS
430  // *****************
431   struct AliHistSubHars {
432    TH1F*     fHistPsiSubs;                                 //! histogram ...
433   };
434
435   struct AliHistSubs {
436    struct AliHistSubHars fHistSubHar[AliFlowConstants::kHars];         //! structure array ... 
437   };
438   struct AliHistSubs fHistSub[AliFlowConstants::kSels*AliFlowConstants::kSubs];    //! structure ...
439
440 // for each harmonic and each selection
441
442   struct AliHistFullHars 
443   {
444    // weights
445     TH1D*       fHistPhiPlus;                              //! histogram ...
446     TH1D*       fHistPhiMinus;                             //! histogram ...
447     TH1D*       fHistPhiAll;                               //! histogram ...
448     TH1D*       fHistPhiWgtPlus;                           //! histogram ...
449     TH1D*       fHistPhiWgtMinus;                          //! histogram ...
450     TH1D*       fHistPhiWgtAll;                            //! histogram ...
451     TH1D*       fHistPhiFlatPlus;                          //! histogram ...
452     TH1D*       fHistPhiFlatMinus;                         //! histogram ...
453     TH1D*       fHistPhiFlatAll;                           //! histogram ...
454     TH1D*       fHistPhi;                                  //! histogram ...
455     TH1D*       fHistPhiWgt;                               //! histogram ...
456     TH1D*       fHistPhiFlat;                              //! histogram ...
457    // flow (events)
458     TH1F*       fHistPsi;                                  //! histogram ...
459     TH1F*       fHistPsiSubCorr;                           //! histogram ...
460     TH1F*       fHistPsiSubCorrDiff;                       //! histogram ...
461     TH1F*       fHistPsiDiff;                              //! histogram ...
462     TH1F*       fHistMult;                                 //! histogram ...
463     TH1F*       fHistQnorm;                                //! histogram ...
464    // flow (tracks)
465     TH1F*       fHistPhiCorr;                              //! histogram ...
466     TProfile2D* fHistvObs2D;                               //! histogram ...
467     TProfile*   fHistvObsEta;                              //! histogram ...
468     TProfile*   fHistvObsPt;                               //! histogram ...
469     TH2D*       fHistv2D;                                  //! histogram ...
470     TH1D*       fHistvEta;                                 //! histogram ...
471     TH1D*       fHistvPt;                                  //! histogram ...
472    // flow (v0s)                                           
473     TH1F*       fHistV0PhiCorr;                            //! histogram ...
474     TProfile2D* fHistV0vObs2D;                             //! histogram ...
475     TProfile*   fHistV0vObsEta;                            //! histogram ...
476     TProfile*   fHistV0vObsPt;                             //! histogram ...
477     TH2D*       fHistV0v2D;                                //! histogram ...
478     TH1D*       fHistV0vEta;                               //! histogram ...     
479     TH1D*       fHistV0vPt;                                //! histogram ...     
480    // flow (v0s sidebands)
481     TProfile*   fHistV0sbvObsEtaSx ;                       //! histogram ...  
482     TProfile*   fHistV0sbvObsPtSx ;                        //! histogram ...
483     TProfile*   fHistV0sbvObsEtaDx ;                       //! histogram ...
484     TProfile*   fHistV0sbvObsPtDx ;                        //! histogram ...
485     TH1F*       fHistV0sbPhiCorr ;                         //! histogram ...
486     TProfile2D* fHistV0sbvObs2D ;                          //! histogram ...
487     TProfile*   fHistV0sbvObsEta ;                         //! histogram ...
488     TProfile*   fHistV0sbvObsPt ;                          //! histogram ...
489     TH2D*       fHistV0sbv2D ;                             //! histogram ...
490     TH1D*       fHistV0sbvEta ;                            //! histogram ...
491     TH1D*       fHistV0sbvPt ;                             //! histogram ...
492    // check (tracks used for R.P.)
493     TH1F*       fHistYieldPt ;                             //! histogram ...
494     TH3F*       fHistEtaPtPhi3D ;                          //! histogram ...
495     TH2D*       fHistYield2D ;                             //! histogram ...
496     TH1F*       fHistDcaGlob ;                             //! histogram ...
497    // check (tracks excluded)
498     TH1F*       fHistYieldPtout;                           //! histogram ...
499     TH3F*       fHistEtaPtPhi3Dout ;                       //! histogram ...
500     TH2D*       fHistYield2Dout ;                          //! histogram ...
501     TH1F*       fHistDcaGlobout ;                          //! histogram ...
502   };
503
504 // for each selection
505
506   struct AliHistFulls 
507   {
508    TH1F*     fHistBayPidMult;                             //! histogram ...
509   // flow (events)
510    TProfile* fHistCos;                                    //! histogram ...
511    TH1F*     fHistRes;                                    //! histogram ...
512    TProfile* fHistvObs;                                   //! histogram ...
513    TH1D*     fHistv;                                      //! histogram ...
514    TProfile* fHistV0vObs;                                 //! histogram ...
515    TProfile* fHistV0sbvObsSx;                             //! histogram ...
516    TProfile* fHistV0sbvObsDx;                             //! histogram ...
517    TH1D*     fHistV0v;                                    //! histogram ...
518   // wgt, evts, trks, v0s (as defined above)
519    struct AliHistFullHars  fHistFullHar[AliFlowConstants::kHars];         //! structure array ...
520   };
521   struct AliHistFulls fHistFull[AliFlowConstants::kSels];             //! structure array ...
522
523   ClassDef(AliFlowAnalyser,0)              // macro for rootcint
524 };
525
526 #endif
527
528
529
530 // lame = not productive; poorly designed; uncool ...