]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/FLOW/Tasks/AliAnalysisTaskFlowEvent.h
coverity fix (Ruben)
[u/mrichter/AliRoot.git] / PWG / FLOW / Tasks / AliAnalysisTaskFlowEvent.h
1 /////////////////////////////////////////////////////
2 // AliAnalysisTaskFlowEvent:
3 // analysis task to fill the flow event 
4 // and make it available to the flow analysis methods.
5 //////////////////////////////////////////////////////
6
7 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
8 * See cxx source for full Copyright notice */
9 /* $Id: $ */
10
11 #ifndef ALIANALYSISTASKFLOWEVENT_H
12 #define ALIANALYSISTASKFLOWEVENT_H
13
14 #include "AliFlowTrackSimple.h"
15
16 class AliCFManager;
17 class AliFlowEventCuts;
18 class AliFlowTrackCuts;
19 class AliFlowEventSimpleMaker;
20 class AliFlowEvent;
21 class TList;
22 class TRandom3;
23 class AliAnalysisTaskSE;
24 class TString;
25 class AliESDpid;
26
27 class AliAnalysisTaskFlowEvent : public AliAnalysisTaskSE {
28  public:
29   AliAnalysisTaskFlowEvent();
30   AliAnalysisTaskFlowEvent(const char *name, TString RPtype, Bool_t QAon, UInt_t seed=666, Bool_t bCandidates=kFALSE);
31   virtual ~AliAnalysisTaskFlowEvent();
32   
33   virtual void   UserCreateOutputObjects();
34   virtual void   UserExec(Option_t *option);
35   virtual void   Terminate(Option_t *);
36   virtual void   NotifyRun();
37
38   void    SetAnalysisType(TString type) { this->fAnalysisType = type; }
39   TString GetAnalysisType() const       { return this->fAnalysisType; }
40
41   void    SetRPType(TString rptype) { this->fRPType = rptype; }
42   TString GetRPType() const         { return this->fRPType; }
43
44   void    SetMinMult(Int_t multmin)    {this->fMinMult = multmin; }
45   Int_t   GetMinMult() const           {return this->fMinMult; }
46   void    SetMaxMult(Int_t multmax)    {this->fMaxMult = multmax; }
47   Int_t   GetMaxMult() const           {return this->fMaxMult; }
48
49   void SetSubeventEtaRange(Double_t minA, Double_t maxA, Double_t minB, Double_t maxB)
50     {this->fMinA = minA; this->fMaxA = maxA; this->fMinB = minB; this->fMaxB = maxB; }
51   Double_t GetMinA() const {return this->fMinA;}
52   Double_t GetMaxA() const {return this->fMaxA;}
53   Double_t GetMinB() const {return this->fMinB;}
54   Double_t GetMaxB() const {return this->fMaxB;}
55   
56   void DefineDeadZone( Double_t etaMin, Double_t etaMax, Double_t phiMin, Double_t phiMax )
57   {this->fExcludedEtaMin = etaMin; this->fExcludedEtaMax = etaMax; 
58     this->fExcludedPhiMin = phiMin; this->fExcludedPhiMax = phiMax; }
59
60   void          SetCutsEvent(AliFlowEventCuts* cutsEvent) {fCutsEvent=cutsEvent;}
61   AliFlowEventCuts* GetCutsEvent() const {return fCutsEvent;}
62   void          SetCutsRP(AliFlowTrackCuts* cutsRP) {fCutContainer->Add(cutsRP); fCutsRP=cutsRP; cutsRP->SetFlowTagType(AliFlowTrackSimple::kRP);}
63   AliFlowTrackCuts* GetCutsRP() const {return fCutsRP;} //to be reimplemented
64   void          SetCutsPOI(AliFlowTrackCuts* cutsPOI) {fCutContainer->Add(cutsPOI); fCutsPOI=cutsPOI; cutsPOI->SetFlowTagType(AliFlowTrackSimple::kPOI);}
65   AliFlowTrackCuts* GetCutsPOI() const {return fCutsPOI;} //to be reimplemented
66
67   void          SetCFManager1(AliCFManager* cfmgr) {this->fCFManager1 = cfmgr; } 
68   AliCFManager* GetCFManager1() const {return this->fCFManager1; }
69   void          SetCFManager2(AliCFManager* cfmgr) {this->fCFManager2 = cfmgr; } 
70   AliCFManager* GetCFManager2() const       {return this->fCFManager2; }
71   TList*        GetQAList()      const      {return fQAList; }
72   void          SetQAOn(Bool_t kt)        {fQAon = kt; }
73   Bool_t        GetQAOn()   const         {return fQAon; }
74
75   // setters for common constants
76   void SetNbinsMult( Int_t i ) { fNbinsMult = i; }
77   void SetNbinsPt( Int_t i )   { fNbinsPt = i; }
78   void SetNbinsPhi( Int_t i )  { fNbinsPhi = i; }
79   void SetNbinsEta( Int_t i )  { fNbinsEta = i; }
80   void SetNbinsQ( Int_t i )    { fNbinsQ = i; }
81    
82   void SetMultMin( Double_t i ) { fMultMin = i; }
83   void SetMultMax( Double_t i ) { fMultMax = i; }
84   void SetPtMin( Double_t i )   { fPtMin = i; }
85   void SetPtMax( Double_t i )   { fPtMax = i; }
86   void SetPhiMin( Double_t i )  { fPhiMin = i; }
87   void SetPhiMax( Double_t i )  { fPhiMax = i; }
88   void SetEtaMin( Double_t i )  { fEtaMin = i; }
89   void SetEtaMax( Double_t i )  { fEtaMax = i; }
90   void SetQMin( Double_t i )    { fQMin = i; }
91   void SetQMax( Double_t i )    { fQMax = i; }
92   void SetHistWeightvsPhiMin( Double_t i ) {fHistWeightvsPhiMin=i;}
93   void SetHistWeightvsPhiMax( Double_t i ) {fHistWeightvsPhiMax=i;}
94   // end setters common constants
95
96   // setters for adding by hand flow values (afterburner)
97   void SetAfterburnerOn(Bool_t b=kTRUE) {fAfterburnerOn=b;}
98   void SetNonFlowNumberOfTrackClones(Int_t n) {fNonFlowNumberOfTrackClones=n;}
99   void SetFlow( Double_t v1, Double_t v2, Double_t v3=0.0, Double_t v4=0.0, Double_t v5=0.0)
100                {fV1=v1;fV2=v2;fV3=v3;fV4=v4;fV5=v5;}
101   // end setters afterburner
102
103  private:
104
105   AliAnalysisTaskFlowEvent(const AliAnalysisTaskFlowEvent& aAnalysisTask);
106   AliAnalysisTaskFlowEvent& operator=(const AliAnalysisTaskFlowEvent& aAnalysisTask); 
107
108   //  TFile*        fOutputFile;    // temporary output file for testing
109   //  AliESDEvent*  fESD;           // ESD object
110   //  AliAODEvent*  fAOD;           // AOD object
111   TString       fAnalysisType;      // can be MC, ESD or AOD
112   TString       fRPType;            // can be Global or Tracklet or FMD
113   AliCFManager* fCFManager1;        // correction framework manager
114   AliCFManager* fCFManager2;        // correction framework manager
115   AliFlowEventCuts* fCutsEvent;     //event cuts
116   AliFlowTrackCuts* fCutsRP;        //cuts for RPs
117   AliFlowTrackCuts* fCutsPOI;       //cuts for POIs
118   TList*            fCutContainer;  //contains the cut objects
119   TList*        fQAList;             // QA histogram list
120   Int_t         fMinMult;           // Minimum multiplicity from tracks selected using CORRFW
121   Int_t         fMaxMult;           // Maximum multiplicity from tracks selected using CORRFW 
122   Double_t      fMinA;              // Minimum of eta range for subevent A
123   Double_t      fMaxA;              // Maximum of eta range for subevent A
124   Double_t      fMinB;              // Minimum of eta range for subevent B
125   Double_t      fMaxB;              // Maximum of eta range for subevent B
126
127   Bool_t fQAon;                       // flag to set the filling of the QA hostograms
128   Bool_t fLoadCandidates;           // true if reciving candidates collection
129
130   // setters for common constants
131   //histogram sizes
132   Int_t  fNbinsMult; // histogram size
133   Int_t  fNbinsPt;   // histogram size
134   Int_t  fNbinsPhi;  // histogram size
135   Int_t  fNbinsEta;  // histogram size
136   Int_t  fNbinsQ;    // histogram size
137  
138   // Histograms limits
139   Double_t  fMultMin;  // histogram limit 
140   Double_t  fMultMax;  // histogram limit
141   Double_t  fPtMin;    // histogram limit
142   Double_t  fPtMax;    // histogram limit
143   Double_t  fPhiMin;   // histogram limit
144   Double_t  fPhiMax;   // histogram limit
145   Double_t  fEtaMin;   // histogram limit
146   Double_t  fEtaMax;   // histogram limit
147   Double_t  fQMin;     // histogram limit
148   Double_t  fQMax;     // histogram limit
149   Double_t fHistWeightvsPhiMin; //histogram limit
150   Double_t fHistWeightvsPhiMax; //histogram limit
151   // end common constants
152
153   // Excluding a range
154   Double_t  fExcludedEtaMin;  // excluded region limit 
155   Double_t  fExcludedEtaMax;  // excluded region limit 
156   Double_t  fExcludedPhiMin;  // excluded region limit 
157   Double_t  fExcludedPhiMax;  // excluded region limit 
158   // End of excluding a range
159
160   // values afterburner
161   Bool_t    fAfterburnerOn;              // do we afterburn?
162   Int_t     fNonFlowNumberOfTrackClones; // number of times to clone the particles (nonflow) 
163   Double_t  fV1;        // Add Flow. Must be in range [0,0.5].
164   Double_t  fV2;        // Add Flow. Must be in range [0,0.5].
165   Double_t  fV3;        // Add Flow. Must be in range [0,0.5].
166   Double_t  fV4;        // Add Flow. Must be in range [0,0.5].
167   Double_t  fV5;        // Add Flow. Must be in range [0,0.5].
168
169   AliFlowEvent* fFlowEvent; //flowevent
170     
171   TRandom3* fMyTRandom3;     // TRandom3 generator
172   // end afterburner
173   
174   ClassDef(AliAnalysisTaskFlowEvent, 1); // example of analysis
175 };
176
177 #endif
178