]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ANALYSIS/AliEPSelectionTask.h
AliAODEvent::GetHeader now return AliVHeader
[u/mrichter/AliRoot.git] / ANALYSIS / AliEPSelectionTask.h
CommitLineData
9663fa4b 1#ifndef AliEPSELECTIONTASK_H
2#define AliEPSELECTIONTASK_H
ce7adfe9 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
14class TFile;
15class TH1F;
16class TH2F;
17class TList;
18class TString;
19class TVector2;
ce7adfe9 20
21class AliESDEvent;
22class AliESDtrackCuts;
23class AliESDtrack;
24class AliEventplane;
90267ca6 25class AliOADBContainer;
9663fa4b 26class AliVTrack;
27class THnSparse;
6b7c66c9 28class TProfile;
ce7adfe9 29
30class AliEPSelectionTask : public AliAnalysisTaskSE {
31
32 public:
e51055a0 33
c39c35d1 34 enum ResoMethod{kRandom,kEta,kCharge};
ce7adfe9 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);
e51055a0 46 void GetQsub(TVector2& Qsub1, TVector2& Qsub2, TObjArray* event,AliEventplane* EP);
47 Double_t GetWeight(TObject* track1);
48 Double_t GetPhiWeight(TObject* track1);
6b7c66c9 49 void Recenter(Int_t var, Double_t * values);
ce7adfe9 50
e51055a0 51 virtual void SetDebugLevel(Int_t level) {fDebug = level;}
52 void SetInput(const char* input) {fAnalysisInput = input;}
53 void SetUseMCRP() {fUseMCRP = kTRUE;}
9593a21e 54 void SetUsePhiWeight(Bool_t usephi = kTRUE){fUsePhiWeight = usephi;}
e51055a0 55 void SetUsePtWeight() {fUsePtWeight = kTRUE;}
6b7c66c9 56 void SetUseRecentering() {fUseRecentering = kTRUE;}
e51055a0 57 void SetSaveTrackContribution() {fSaveTrackContribution = kTRUE;}
90267ca6 58 void SetTrackType(TString tracktype);
59 void SetPhiDist();
6b7c66c9 60 void SetQvectorDist();
90267ca6 61 void SetPersonalESDtrackCuts(AliESDtrackCuts* trackcuts);
e1ffd90d 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);
71916547 63 void SetPersonalPhiDistribution(const char* filename, char* listname);
e51055a0 64 void SetEtaGap(Float_t etagap) {fEtaGap = etagap;}
65 void SetSubeventsSplitMethod(Int_t method) {fSplitMethod = method;}
ce7adfe9 66
67 private:
68
69 AliEPSelectionTask(const AliEPSelectionTask& ep);
70 AliEPSelectionTask& operator= (const AliEPSelectionTask& ep);
71
e51055a0 72 TObjArray* GetAODTracksAndMaxID(AliAODEvent* aod, Int_t& maxid);
9663fa4b 73 void SetOADBandPeriod();
74 TH1F* SelectPhiDist(AliVTrack *track);
75 TObjArray* GetTracksForLHC11h(AliESDEvent* esd);
e51055a0 76
ce7adfe9 77 TString fAnalysisInput; // "ESD", "AOD"
90267ca6 78 TString fTrackType; // "GLOBAL", "TPC"
9663fa4b 79 TString fPeriod; // "LHC11h","LHC10h"
6b7c66c9 80 Double_t fCentrality; // centrality percentile from "V0M"
ce7adfe9 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
6b7c66c9 84 Bool_t fUseRecentering; // use of mean & rms of q vector components for recentering
ce7adfe9 85 Bool_t fSaveTrackContribution; // storage of contribution of each track to Q-Vector
1e552991 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
e51055a0 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
ce7adfe9 92
e51055a0 93
1e552991 94 AliESDtrackCuts* fESDtrackCuts; // track cuts
ce7adfe9 95
90267ca6 96 AliOADBContainer* fEPContainer; //! OADB Container
6b7c66c9 97 AliOADBContainer* fQxContainer; //! OADB Container for Q_x vector
98 AliOADBContainer* fQyContainer; //! OADB Container for Q_y vector
9663fa4b 99 TH1F* fPhiDist[4]; // array of Phi distributions used to calculate phi weights
100 THnSparse *fSparseDist; //! THn for eta-charge phi-weighting
6b7c66c9 101 TProfile* fQDist[2]; // array of TProfiles with mean+rms for recentering
9663fa4b 102 TH1F *fHruns; // information about runwise statistics of phi-weights
ce7adfe9 103
08c34a44 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
ce7adfe9 111
71916547 112 TList* fOutputList; // Output histograms
08c34a44 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
ce7adfe9 121
1e552991 122 ClassDef(AliEPSelectionTask,4);
ce7adfe9 123};
124
125#endif
126