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