]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.h
fill the refmult
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommon / AliFlowEventSimple.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3 /* $Id$ */
4
5 /*****************************************************************
6   AliFlowEventSimple: A simple event 
7   for flow analysis                  
8                                      
9   origin: Naomi van der Kolk (kolk@nikhef.nl)           
10           Ante Bilandzic     (anteb@nikhef.nl)         
11           Raimond Snellings  (Raimond.Snellings@nikhef.nl)    
12   mods:   Mikolaj Krzewicki  (mikolaj.krzewicki@cern.ch)
13 *****************************************************************/
14
15 #ifndef ALIFLOWEVENTSIMPLE_H
16 #define ALIFLOWEVENTSIMPLE_H
17
18 #include "TObject.h"
19 #include "TParameter.h"
20 #include "TMath.h"
21 class TTree;
22 class TF1;
23 class AliFlowVector;
24 class AliFlowTrackSimple;
25 class AliFlowTrackSimpleCuts;
26
27 class AliFlowEventSimple: public TObject {
28
29  public:
30   AliFlowEventSimple();
31   AliFlowEventSimple(Int_t aLenght);
32   AliFlowEventSimple( Int_t nParticles,
33                       TF1* ptDist,
34                       Double_t phiMin=0,
35                       Double_t phiMax=TMath::TwoPi(),
36                       Double_t etaMin=-1.0,
37                       Double_t etaMax= 1.0 );
38   AliFlowEventSimple(TTree* anInput, const AliFlowTrackSimpleCuts* rpCuts, const AliFlowTrackSimpleCuts* poiCuts);
39   AliFlowEventSimple(const AliFlowEventSimple& anEvent);
40   AliFlowEventSimple& operator=(const AliFlowEventSimple& anEvent);
41   virtual  ~AliFlowEventSimple();
42
43   virtual void Generate( Int_t nParticles,
44                          TF1* ptDist,
45                          Double_t phiMin=0,
46                          Double_t phiMax=TMath::TwoPi(),
47                          Double_t etaMin=-1.0,
48                          Double_t etaMax= 1.0 );
49
50   Bool_t  IsFolder() const {return kTRUE;};
51   void    Browse(TBrowser *b); 
52   void    Print(Option_t* option = "") const;      //method to print stats
53   
54   Int_t    NumberOfTracks() const                   { return fNumberOfTracks; }
55   Int_t    GetReferenceMultiplicity() const               { return fReferenceMultiplicity; }
56   void     SetReferenceMultiplicity( Int_t m )            { fReferenceMultiplicity = m; }
57   Int_t    GetEventNSelTracksRP() const             { return fNumberOfRPs; } 
58   void     SetEventNSelTracksRP(Int_t nr)           { fNumberOfRPs = nr; }  
59   Double_t GetMCReactionPlaneAngle() const          { return fMCReactionPlaneAngle; }
60   void     SetMCReactionPlaneAngle(Double_t fPhiRP) { fMCReactionPlaneAngle=fPhiRP; fMCReactionPlaneAngleIsSet=kTRUE; }
61   Bool_t   IsSetMCReactionPlaneAngle() const        { return fMCReactionPlaneAngleIsSet; }
62   void     SetAfterBurnerPrecision(Double_t p)      { fAfterBurnerPrecision=p; }
63   Double_t GetAfterBurnerPrecision() const          { return fAfterBurnerPrecision; }
64
65   void ResolutionPt(Double_t res);
66   void TagSubeventsInEta(Double_t etaMinA, Double_t etaMaxA, Double_t etaMinB, Double_t etaMaxB );
67   void TagRP(AliFlowTrackSimpleCuts* cuts );
68   void TagPOI(AliFlowTrackSimpleCuts* cuts );
69   void CloneTracks(Int_t n);
70   void AddV1( Double_t v1 );
71   void AddV2( Double_t v2 );
72   void AddV4( Double_t v4 );
73   void AddFlow( Double_t v1, Double_t v2, Double_t v4 );
74  
75   AliFlowTrackSimple* GetTrack(Int_t i);
76   void AddTrack( AliFlowTrackSimple* track ); 
77  
78   AliFlowVector GetQ(Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE);
79   void Get2Qsub(AliFlowVector* Qarray, Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE);  
80
81   //these should go away!!!!
82   TObjArray* TrackCollection() const                { return fTrackCollection; } //deprecated!
83   void     SetNumberOfTracks(Int_t nr)              { fNumberOfTracks = nr; }
84
85  protected:
86   TObjArray*              fTrackCollection;           //-> collection of tracks
87   Int_t                   fReferenceMultiplicity;           // reference multiplicity
88   Int_t                   fNumberOfTracks;            // number of tracks
89   Int_t                   fNumberOfRPs;               // number of tracks that have passed the RP selection
90   Double_t                fMCReactionPlaneAngle;      // the angle of the reaction plane from the MC truth
91   Bool_t                  fMCReactionPlaneAngleIsSet; // did we set it from MC?
92   Double_t                fAfterBurnerPrecision;      // iteration precision in afterburner
93   TParameter<Int_t>*      fNumberOfTracksWrap;        //! number of tracks in TBrowser
94   TParameter<Int_t>*      fNumberOfRPsWrap;           //! number of tracks that have passed the RP selection in TBrowser
95   TParameter<Double_t>*   fMCReactionPlaneAngleWrap;  //! the angle of the reaction plane from the MC truth in TBrowser
96
97   ClassDef(AliFlowEventSimple,1)
98 };
99
100 #endif
101
102