]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/FLOW/Base/AliFlowEventSimple.h
from Carlos Perez Lara:
[u/mrichter/AliRoot.git] / PWG / FLOW / Base / AliFlowEventSimple.h
CommitLineData
f1d945a1 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2* See cxx source for full Copyright notice */
3/* $Id$ */
4
929098e4 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*****************************************************************/
f1d945a1 14
929098e4 15#ifndef ALIFLOWEVENTSIMPLE_H
16#define ALIFLOWEVENTSIMPLE_H
17
18#include "TObject.h"
c076fda8 19#include "TParameter.h"
bc231a12 20#include "TMath.h"
929098e4 21class TTree;
bc231a12 22class TF1;
929098e4 23class AliFlowVector;
f1d945a1 24class AliFlowTrackSimple;
929098e4 25class AliFlowTrackSimpleCuts;
f1d945a1 26
27class AliFlowEventSimple: public TObject {
28
29 public:
9fa64edc 30
31 enum ConstructionMethod {kEmpty,kGenerate};
32
46bec39c 33 AliFlowEventSimple();
bc231a12 34 AliFlowEventSimple( Int_t nParticles,
9fa64edc 35 ConstructionMethod m=kEmpty,
36 TF1* ptDist=NULL,
37 Double_t phiMin=0.0,
bc231a12 38 Double_t phiMax=TMath::TwoPi(),
39 Double_t etaMin=-1.0,
40 Double_t etaMax= 1.0 );
929098e4 41 AliFlowEventSimple(TTree* anInput, const AliFlowTrackSimpleCuts* rpCuts, const AliFlowTrackSimpleCuts* poiCuts);
e35ddff0 42 AliFlowEventSimple(const AliFlowEventSimple& anEvent);
43 AliFlowEventSimple& operator=(const AliFlowEventSimple& anEvent);
f1d945a1 44 virtual ~AliFlowEventSimple();
c076fda8 45
46 Bool_t IsFolder() const {return kTRUE;};
29195b69 47 void Browse(TBrowser *b);
48 void Print(Option_t* option = "") const; //method to print stats
f1d945a1 49
929098e4 50 Int_t NumberOfTracks() const { return fNumberOfTracks; }
df23c5ae 51 Int_t GetReferenceMultiplicity() const { return fReferenceMultiplicity; }
52 void SetReferenceMultiplicity( Int_t m ) { fReferenceMultiplicity = m; }
bc231a12 53 Int_t GetEventNSelTracksRP() const { return fNumberOfRPs; }
54 void SetEventNSelTracksRP(Int_t nr) { fNumberOfRPs = nr; }
df23c5ae 55 Int_t GetEventNSelTracksPOI() const { return fNumberOfPOIs; }
56 void SetEventNSelTracksPOI(Int_t np) { fNumberOfPOIs = np; }
59dab33a 57 Int_t GetNumberOfRPs() const { return fNumberOfRPs; }
58 void SetNumberOfRPs( Int_t nr ) { fNumberOfRPs=nr; }
df23c5ae 59 Int_t GetNumberOfPOIs() const { return fNumberOfPOIs; }
60 void SetNumberOfPOIs( Int_t np ) { fNumberOfPOIs=np; }
929098e4 61 Double_t GetMCReactionPlaneAngle() const { return fMCReactionPlaneAngle; }
62 void SetMCReactionPlaneAngle(Double_t fPhiRP) { fMCReactionPlaneAngle=fPhiRP; fMCReactionPlaneAngleIsSet=kTRUE; }
124fb262 63 Bool_t IsSetMCReactionPlaneAngle() const { return fMCReactionPlaneAngleIsSet; }
bc231a12 64 void SetAfterBurnerPrecision(Double_t p) { fAfterBurnerPrecision=p; }
65 Double_t GetAfterBurnerPrecision() const { return fAfterBurnerPrecision; }
9fa64edc 66 void SetUserModified(Bool_t s=kTRUE) { fUserModified=s; }
67 Bool_t IsUserModified() const { return fUserModified; }
ad4d7e4e 68 void SetShuffleTracks(Bool_t b) {fShuffleTracks=b;}
ba4dd29f 69 void ShuffleTracks();
929098e4 70
7382279b 71 void ResolutionPt(Double_t res);
940a5ed1 72 void TagSubeventsInEta(Double_t etaMinA, Double_t etaMaxA, Double_t etaMinB, Double_t etaMaxB );
076df7bf 73 void TagSubeventsByCharge();
cc0afcfc 74 void TagRP(const AliFlowTrackSimpleCuts* cuts );
75 void TagPOI(const AliFlowTrackSimpleCuts* cuts );
929098e4 76 void CloneTracks(Int_t n);
bc231a12 77 void AddV1( Double_t v1 );
244c607a 78 void AddV2( Double_t v2 );
54089829 79 void AddV3( Double_t v3 );
bc231a12 80 void AddV4( Double_t v4 );
1a80f9f6 81 void AddV5( Double_t v5 );
82 void AddFlow( Double_t v1, Double_t v2, Double_t v3, Double_t v4, Double_t v5 );
83 void AddFlow(Double_t v1, Double_t v2, Double_t v3, Double_t v4, Double_t v5,
84 Double_t rp1, Double_t rp2, Double_t rp3, Double_t rp4, Double_t rp5 );
99ff691b 85 void AddV2( TF1* ptDepV2 );
34b15925 86 void DefineDeadZone( Double_t etaMin, Double_t etaMax, Double_t phiMin, Double_t phiMax );
87 Int_t CleanUpDeadTracks();
7d27a354 88 void ClearFast();
26c4cbb9 89
99ff691b 90 static TF1* SimplePtSpectrum();
91 static TF1* SimplePtDepV2();
92
f1d945a1 93 AliFlowTrackSimple* GetTrack(Int_t i);
7382279b 94 void AddTrack( AliFlowTrackSimple* track );
7b5556ef 95 AliFlowTrackSimple* MakeNewTrack();
03a02aca 96
97 AliFlowVector GetQ(Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE);
29195b69 98 void Get2Qsub(AliFlowVector* Qarray, Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE);
395fadba 99
7382279b 100 protected:
9fa64edc 101 virtual void Generate( Int_t nParticles,
102 TF1* ptDist=NULL,
103 Double_t phiMin=0.0,
104 Double_t phiMax=TMath::TwoPi(),
105 Double_t etaMin=-1.0,
106 Double_t etaMax= 1.0 );
107
7d27a354 108 //data members
bc231a12 109 TObjArray* fTrackCollection; //-> collection of tracks
7d27a354 110 Int_t fReferenceMultiplicity; // reference multiplicity
929098e4 111 Int_t fNumberOfTracks; // number of tracks
bc231a12 112 Int_t fNumberOfRPs; // number of tracks that have passed the RP selection
df23c5ae 113 Int_t fNumberOfPOIs; // number of tracks that have passed the POI selection
929098e4 114 Double_t fMCReactionPlaneAngle; // the angle of the reaction plane from the MC truth
115 Bool_t fMCReactionPlaneAngleIsSet; // did we set it from MC?
bc231a12 116 Double_t fAfterBurnerPrecision; // iteration precision in afterburner
9fa64edc 117 Bool_t fUserModified; // did we modify the event in any way (afterburner etc) ?
929098e4 118 TParameter<Int_t>* fNumberOfTracksWrap; //! number of tracks in TBrowser
bc231a12 119 TParameter<Int_t>* fNumberOfRPsWrap; //! number of tracks that have passed the RP selection in TBrowser
df23c5ae 120 TParameter<Int_t>* fNumberOfPOIsWrap; //! number of tracks that have passed the POI selection in TBrowser
bc231a12 121 TParameter<Double_t>* fMCReactionPlaneAngleWrap; //! the angle of the reaction plane from the MC truth in TBrowser
ad4d7e4e 122 Int_t* fShuffledIndexes; //! placeholder for randomized indexes
123 Bool_t fShuffleTracks; // do we shuffle tracks on get?
29195b69 124
bc231a12 125 ClassDef(AliFlowEventSimple,1)
f1d945a1 126};
127
128#endif
5fef318d 129
130