]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/AliEPSelectionTask.h
Coverity fix
[u/mrichter/AliRoot.git] / ANALYSIS / AliEPSelectionTask.h
1 #ifndef ALIEPSELECTIONTASK_H
2 #define ALIEPSELECTIONTASK_H
3
4 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 //*****************************************************
8 //   Class AliEPSelectionTask
9 //   author: Alberica Toia, Johanna Gramling
10 //*****************************************************
11
12 #include "AliAnalysisTaskSE.h"
13
14 class TFile;
15 class TH1F;
16 class TH2F;
17 class TList;
18 class TString;
19 class TVector2;
20
21 class AliESDEvent;
22 class AliESDtrackCuts;
23 class AliESDtrack;
24 class AliEventplane;
25 class AliOADBContainer;
26
27 class AliEPSelectionTask : public AliAnalysisTaskSE {
28
29  public:
30   
31   enum ResoMethod{kRandom,kEta};
32
33   AliEPSelectionTask();
34   AliEPSelectionTask(const char *name);
35   virtual ~AliEPSelectionTask();
36
37   // Implementation of interface methods
38   virtual void UserCreateOutputObjects();
39   virtual void UserExec(Option_t *option);
40   virtual void Terminate(Option_t *option);
41   
42   TVector2 GetQ(AliEventplane* EP, TObjArray* event);
43   void GetQsub(TVector2& Qsub1, TVector2& Qsub2, TObjArray* event,AliEventplane* EP);
44   Double_t GetWeight(TObject* track1);
45   Double_t GetPhiWeight(TObject* track1);
46
47   virtual void  SetDebugLevel(Int_t level)   {fDebug = level;}
48   void SetInput(const char* input)           {fAnalysisInput = input;}
49   void SetUseMCRP()                          {fUseMCRP = kTRUE;}
50   void SetUsePhiWeight()                     {fUsePhiWeight = kTRUE;}
51   void SetUsePtWeight()                      {fUsePtWeight = kTRUE;}
52   void SetSaveTrackContribution()            {fSaveTrackContribution = kTRUE;}
53   void SetTrackType(TString tracktype);
54   void SetPhiDist();
55   void SetPersonalESDtrackCuts(AliESDtrackCuts* trackcuts);
56   void SetPersonalAODtrackCuts(UInt_t filterbit = 1, Float_t etalow = -0.8, Float_t etaup = 0.8, Float_t ptlow = 0.5, Float_t ptup = 20.);
57   void SetPersonalPhiDistribution(const char* filename, char* listname);
58   void SetEtaGap(Float_t etagap)             {fEtaGap = etagap;}
59   void SetSubeventsSplitMethod(Int_t method) {fSplitMethod = method;}
60   
61  private:
62    
63   AliEPSelectionTask(const AliEPSelectionTask& ep);
64   AliEPSelectionTask& operator= (const AliEPSelectionTask& ep); 
65
66   TObjArray* GetAODTracksAndMaxID(AliAODEvent* aod, Int_t& maxid);
67
68   TString  fAnalysisInput;              // "ESD", "AOD"
69   TString  fTrackType;                  // "GLOBAL", "TPC"
70   Bool_t   fUseMCRP;                    // i.e. usable for Therminator, when MC RP is provided
71   Bool_t   fUsePhiWeight;               // use of phi weights
72   Bool_t   fUsePtWeight;                // use of pT weights
73   Bool_t   fSaveTrackContribution;      // storage of contribution of each track to Q-Vector
74   Bool_t   fUserphidist;                // bool, if personal phi distribution should be used
75   Bool_t   fUsercuts;                   // bool, if personal cuts should be used
76   Int_t    fRunNumber;                  // runnumber
77   UInt_t   fAODfilterbit;               // AOD filter bit for AOD track selection  
78   Float_t  fEtaGap;                     // Eta Gap between Subevent A and B
79   Int_t    fSplitMethod;                // Splitting Method for subevents
80   
81
82   AliESDtrackCuts* fESDtrackCuts;       // track cuts
83   
84   AliOADBContainer* fEPContainer;       //! OADB Container
85   TH1F*  fPhiDist;                      // Phi distribution used to calculate phi weights
86
87   TVector2* fQVector;                   //! Q-Vector of the event  
88   Double_t* fQContributionX;            //! array of the tracks' contributions to X component of Q-Vector - index = track ID
89   Double_t* fQContributionY;            //! array of the tracks' contributions to Y component of Q-Vector - index = track ID
90   Double_t  fEventplaneQ;               //! Event plane angle from Q-Vector
91   TVector2* fQsub1;                     //! Q-Vector of sub-event 1
92   TVector2* fQsub2;                     //! Q-Vector of sub-event 2
93   Double_t  fQsubRes;                   //! Difference of EP angles of subevents
94   
95   TList* fOutputList;                   // Output histograms
96   TH1F*  fHOutEventplaneQ;              //! control histogram: Event Plane angle
97   TH1F*  fHOutPhi;                      //! control histogram: original phi distribution
98   TH1F*  fHOutPhiCorr;                  //! control histogram: corrected phi distribution
99   TH2F*  fHOutsub1sub2;                 //! control histogram: correlation of EP from subevents
100   TH2F*  fHOutNTEPRes;                  //! control histogram: Difference of EP angles of subevents vs Nch
101   TH2F*  fHOutPTPsi;                    //! control histogram: Difference of EP angle and emission angle of track vs track pT
102   TH2F*  fHOutDiff;                     //! control histogram: Difference of MC RP and EP - only filled if fUseMCRP is true!
103   TH2F*  fHOutleadPTPsi;                //! control histogram: emission angle of leading pT track vs EP angle
104
105   ClassDef(AliEPSelectionTask,4); 
106 };
107
108 #endif
109