end-of-line normalization
[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;
ce7adfe9 28
29class AliEPSelectionTask : public AliAnalysisTaskSE {
30
31 public:
e51055a0 32
c39c35d1 33 enum ResoMethod{kRandom,kEta,kCharge};
ce7adfe9 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);
e51055a0 45 void GetQsub(TVector2& Qsub1, TVector2& Qsub2, TObjArray* event,AliEventplane* EP);
46 Double_t GetWeight(TObject* track1);
47 Double_t GetPhiWeight(TObject* track1);
ce7adfe9 48
e51055a0 49 virtual void SetDebugLevel(Int_t level) {fDebug = level;}
50 void SetInput(const char* input) {fAnalysisInput = input;}
51 void SetUseMCRP() {fUseMCRP = kTRUE;}
9593a21e 52 void SetUsePhiWeight(Bool_t usephi = kTRUE){fUsePhiWeight = usephi;}
e51055a0 53 void SetUsePtWeight() {fUsePtWeight = kTRUE;}
54 void SetSaveTrackContribution() {fSaveTrackContribution = kTRUE;}
90267ca6 55 void SetTrackType(TString tracktype);
56 void SetPhiDist();
57 void SetPersonalESDtrackCuts(AliESDtrackCuts* trackcuts);
e1ffd90d 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);
71916547 59 void SetPersonalPhiDistribution(const char* filename, char* listname);
e51055a0 60 void SetEtaGap(Float_t etagap) {fEtaGap = etagap;}
61 void SetSubeventsSplitMethod(Int_t method) {fSplitMethod = method;}
ce7adfe9 62
63 private:
64
65 AliEPSelectionTask(const AliEPSelectionTask& ep);
66 AliEPSelectionTask& operator= (const AliEPSelectionTask& ep);
67
e51055a0 68 TObjArray* GetAODTracksAndMaxID(AliAODEvent* aod, Int_t& maxid);
9663fa4b 69 void SetOADBandPeriod();
70 TH1F* SelectPhiDist(AliVTrack *track);
71 TObjArray* GetTracksForLHC11h(AliESDEvent* esd);
e51055a0 72
ce7adfe9 73 TString fAnalysisInput; // "ESD", "AOD"
90267ca6 74 TString fTrackType; // "GLOBAL", "TPC"
9663fa4b 75 TString fPeriod; // "LHC11h","LHC10h"
ce7adfe9 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
1e552991 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
e51055a0 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
ce7adfe9 86
e51055a0 87
1e552991 88 AliESDtrackCuts* fESDtrackCuts; // track cuts
ce7adfe9 89
90267ca6 90 AliOADBContainer* fEPContainer; //! OADB Container
9663fa4b 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
ce7adfe9 94
08c34a44 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
ce7adfe9 102
71916547 103 TList* fOutputList; // Output histograms
08c34a44 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
ce7adfe9 112
1e552991 113 ClassDef(AliEPSelectionTask,4);
ce7adfe9 114};
115
116#endif
117