1 #ifndef AliEPSELECTIONTASK_H
2 #define AliEPSELECTIONTASK_H
4 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 //*****************************************************
8 // Class AliEPSelectionTask
9 // author: Alberica Toia, Johanna Gramling
10 //*****************************************************
12 #include "AliAnalysisTaskSE.h"
22 class AliESDtrackCuts;
25 class AliOADBContainer;
30 class AliEPSelectionTask : public AliAnalysisTaskSE {
34 enum ResoMethod{kRandom,kEta,kCharge};
37 AliEPSelectionTask(const char *name);
38 virtual ~AliEPSelectionTask();
40 // Implementation of interface methods
41 virtual void UserCreateOutputObjects();
42 virtual void UserExec(Option_t *option);
43 virtual void Terminate(Option_t *option);
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);
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);
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;}
69 AliEPSelectionTask(const AliEPSelectionTask& ep);
70 AliEPSelectionTask& operator= (const AliEPSelectionTask& ep);
72 TObjArray* GetAODTracksAndMaxID(AliAODEvent* aod, Int_t& maxid);
73 void SetOADBandPeriod();
74 TH1F* SelectPhiDist(AliVTrack *track);
75 TObjArray* GetTracksForLHC11h(AliESDEvent* esd);
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
94 AliESDtrackCuts* fESDtrackCuts; // track cuts
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
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
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
122 ClassDef(AliEPSelectionTask,4);