]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/AliEPSelectionTask.h
Adding extra check for GPU_FORCE_64BIT_PTR env var
[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 class AliVTrack;
27 class THnSparse;
28
29 class AliEPSelectionTask : public AliAnalysisTaskSE {
30
31  public:
32   
33   enum ResoMethod{kRandom,kEta,kCharge};
34
35   AliEPSelectionTask();
36   AliEPSelectionTask(const char *name);
37   virtual ~AliEPSelectionTask();
38
39   // Implementation of interface methods
40   virtual void UserCreateOutputObjects();
41   virtual void UserExec(Option_t *option);
42   virtual void Terminate(Option_t *option);
43   
44   TVector2 GetQ(AliEventplane* EP, TObjArray* event);
45   void GetQsub(TVector2& Qsub1, TVector2& Qsub2, TObjArray* event,AliEventplane* EP);
46   Double_t GetWeight(TObject* track1);
47   Double_t GetPhiWeight(TObject* track1);
48
49   virtual void  SetDebugLevel(Int_t level)   {fDebug = level;}
50   void SetInput(const char* input)           {fAnalysisInput = input;}
51   void SetUseMCRP()                          {fUseMCRP = kTRUE;}
52   void SetUsePhiWeight(Bool_t usephi = kTRUE){fUsePhiWeight = usephi;}
53   void SetUsePtWeight()                      {fUsePtWeight = kTRUE;}
54   void SetSaveTrackContribution()            {fSaveTrackContribution = kTRUE;}
55   void SetTrackType(TString tracktype);
56   void SetPhiDist();
57   void SetPersonalESDtrackCuts(AliESDtrackCuts* trackcuts);
58   void SetPersonalAODtrackCuts(UInt_t filterbit = 1, Float_t etalow = -0.8, Float_t etaup = 0.8, Float_t ptlow = 0.15, Float_t ptup = 20., Int_t ntpc = 50);
59   void SetPersonalPhiDistribution(const char* filename, char* listname);
60   void SetEtaGap(Float_t etagap)             {fEtaGap = etagap;}
61   void SetSubeventsSplitMethod(Int_t method) {fSplitMethod = method;}
62   
63  private:
64    
65   AliEPSelectionTask(const AliEPSelectionTask& ep);
66   AliEPSelectionTask& operator= (const AliEPSelectionTask& ep); 
67
68   TObjArray* GetAODTracksAndMaxID(AliAODEvent* aod, Int_t& maxid);
69   void SetOADBandPeriod();
70   TH1F* SelectPhiDist(AliVTrack *track);
71   TObjArray* GetTracksForLHC11h(AliESDEvent* esd);
72
73   TString  fAnalysisInput;              // "ESD", "AOD"
74   TString  fTrackType;                  // "GLOBAL", "TPC"
75   TString  fPeriod;                     // "LHC11h","LHC10h"
76   Bool_t   fUseMCRP;                    // i.e. usable for Therminator, when MC RP is provided
77   Bool_t   fUsePhiWeight;               // use of phi weights
78   Bool_t   fUsePtWeight;                // use of pT weights
79   Bool_t   fSaveTrackContribution;      // storage of contribution of each track to Q-Vector
80   Bool_t   fUserphidist;                // bool, if personal phi distribution should be used
81   Bool_t   fUsercuts;                   // bool, if personal cuts should be used
82   Int_t    fRunNumber;                  // runnumber
83   UInt_t   fAODfilterbit;               // AOD filter bit for AOD track selection  
84   Float_t  fEtaGap;                     // Eta Gap between Subevent A and B
85   Int_t    fSplitMethod;                // Splitting Method for subevents
86   
87
88   AliESDtrackCuts* fESDtrackCuts;       // track cuts
89   
90   AliOADBContainer* fEPContainer;       //! OADB Container
91   TH1F*  fPhiDist[4];                   // array of Phi distributions used to calculate phi weights
92   THnSparse *fSparseDist;               //! THn for eta-charge phi-weighting
93   TH1F *fHruns;                         // information about runwise statistics of phi-weights
94
95   TVector2* fQVector;                   //! Q-Vector of the event  
96   Double_t* fQContributionX;            //! array of the tracks' contributions to X component of Q-Vector - index = track ID
97   Double_t* fQContributionY;            //! array of the tracks' contributions to Y component of Q-Vector - index = track ID
98   Double_t  fEventplaneQ;               //! Event plane angle from Q-Vector
99   TVector2* fQsub1;                     //! Q-Vector of sub-event 1
100   TVector2* fQsub2;                     //! Q-Vector of sub-event 2
101   Double_t  fQsubRes;                   //! Difference of EP angles of subevents
102   
103   TList* fOutputList;                   // Output histograms
104   TH1F*  fHOutEventplaneQ;              //! control histogram: Event Plane angle
105   TH1F*  fHOutPhi;                      //! control histogram: original phi distribution
106   TH1F*  fHOutPhiCorr;                  //! control histogram: corrected phi distribution
107   TH2F*  fHOutsub1sub2;                 //! control histogram: correlation of EP from subevents
108   TH2F*  fHOutNTEPRes;                  //! control histogram: Difference of EP angles of subevents vs Nch
109   TH2F*  fHOutPTPsi;                    //! control histogram: Difference of EP angle and emission angle of track vs track pT
110   TH2F*  fHOutDiff;                     //! control histogram: Difference of MC RP and EP - only filled if fUseMCRP is true!
111   TH2F*  fHOutleadPTPsi;                //! control histogram: emission angle of leading pT track vs EP angle
112
113   ClassDef(AliEPSelectionTask,4); 
114 };
115
116 #endif
117