1 #ifndef AliAnalysisTaskPhiCorrelations_H
2 #define AliAnalysisTaskPhiCorrelations_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 ////////////////////////////////////////////////////////////////////////
9 // Analysis class for Underlying Event studies w.r.t. leading track
11 // Look for correlations on the tranverse regions w.r.t
12 // the leading track in the event
14 // This class needs input AODs.
15 // The output is a list of analysis-specific containers.
17 // The AOD can be either connected to the InputEventHandler
18 // for a chain of AOD files
20 // to the OutputEventHandler
21 // for a chain of ESD files,
22 // in this case the class should be in the train after the jet-finder
25 // Jan Fiete Grosse-Oetringhaus
27 ////////////////////////////////////////////////////////////////////////
29 #include "AliAnalysisTask.h"
30 #include "AliUEHist.h"
32 #include "AliVParticle.h"
36 class AliAnalyseLeadingTrackUE;
37 class AliInputEventHandler;
39 class AliMCEventHandler;
40 class AliUEHistograms;
44 class AliEventPoolManager;
47 class AliAnalysisTaskPhiCorrelations : public AliAnalysisTask
50 AliAnalysisTaskPhiCorrelations(const char* name="AliAnalysisTaskPhiCorrelations");
51 virtual ~AliAnalysisTaskPhiCorrelations();
54 // Implementation of interace methods
55 virtual void ConnectInputData(Option_t *);
56 virtual void CreateOutputObjects();
57 virtual void Exec(Option_t *option);
60 // general configuration
61 virtual void SetDebugLevel( Int_t level ) { fDebug = level; }
62 virtual void SetMode(Int_t mode) { fMode = mode; }
63 virtual void SetReduceMemoryFootprint(Bool_t flag) { fReduceMemoryFootprint = flag; }
64 virtual void SetEventMixing(Bool_t flag) { fFillMixed = flag; }
65 virtual void SetMixingTracks(Int_t tracks) { fMixingTracks = tracks; }
66 virtual void SetCompareCentralities(Bool_t flag) { fCompareCentralities = flag; }
67 virtual void SetTwoTrackEfficiencyStudy(Bool_t flag) { fTwoTrackEfficiencyStudy = flag; }
68 virtual void SetUseVtxAxis(Bool_t flag) { fUseVtxAxis = flag; }
71 void SetTrackingEfficiency( const TH1D* hist) { fkTrackingEfficiency = hist; }
74 void SetTracksInVertex( Int_t val ){ fnTracksVertex = val; }
75 void SetZVertex( Double_t val ) { fZVertex = val; }
78 void SetTrackEtaCut( Double_t val ) { fTrackEtaCut = val; }
79 void SetPtMin(Double_t val) { fPtMin = val; }
80 void SetFilterBit( UInt_t val ) { fFilterBit = val; }
82 void SetEventSelectionBit( UInt_t val ) { fSelectBit = val; }
83 void SetUseChargeHadrons( Bool_t val ) { fUseChargeHadrons = val; }
84 void SetSelectCharge(Int_t selectCharge) { fSelectCharge = selectCharge; }
85 void SetCentralityMethod(const char* method) { fCentralityMethod = method; }
86 void SetFillpT(Bool_t flag) { fFillpT = flag; }
90 AliAnalysisTaskPhiCorrelations(const AliAnalysisTaskPhiCorrelations &det);
91 AliAnalysisTaskPhiCorrelations& operator=(const AliAnalysisTaskPhiCorrelations &det);
92 void AddSettingsTree(); // add list of settings to output list
94 void AnalyseCorrectionMode(); // main algorithm to get correction maps
95 void AnalyseDataMode(); // main algorithm to get raw distributions
96 void Initialize(); // initialize some common pointer
100 // General configuration
101 Int_t fDebug; // Debug flag
102 Int_t fMode; // fMode = 0: data-like analysis
103 // fMode = 1: corrections analysis
104 Bool_t fReduceMemoryFootprint; // reduce memory consumption by writing less debug histograms
105 Bool_t fFillMixed; // enable event mixing (default: ON)
106 Int_t fMixingTracks; // size of track buffer for event mixing
107 Bool_t fCompareCentralities; // use the z vtx axis for a centrality comparison
108 Bool_t fTwoTrackEfficiencyStudy; // two-track efficiency study on
109 Bool_t fUseVtxAxis; // use z vtx as axis (needs 7 times more memory!)
111 // Pointers to external UE classes
112 AliAnalyseLeadingTrackUE* fAnalyseUE; //! points to class containing common analysis algorithms
113 AliUEHistograms* fHistos; //! points to class to handle histograms/containers
114 AliUEHistograms* fHistosMixed; //! points to class to handle mixed histograms/containers
116 const TH1D* fkTrackingEfficiency; // used for study of bias by tracking
118 // Handlers and events
119 AliAODEvent* fAOD; //! AOD Event
120 AliESDEvent* fESD; //! ESD Event
121 TClonesArray* fArrayMC; //! Array of MC particles
122 AliInputEventHandler* fInputHandler; //! Generic InputEventHandler
123 AliMCEvent* fMcEvent; //! MC event
124 AliMCEventHandler* fMcHandler; //! MCEventHandler
125 AliEventPoolManager* fPoolMgr; //! event pool manager
127 // Histogram settings
128 TList* fListOfHistos; // Output list of containers
131 Int_t fnTracksVertex; // QA tracks pointing to principal vertex
132 Double_t fZVertex; // Position of Vertex in Z direction
133 TString fCentralityMethod; // Method to determine centrality
136 Double_t fTrackEtaCut; // Eta cut on particles
137 Double_t fPtMin; // Min pT to start correlations
138 UInt_t fFilterBit; // Select tracks from an specific track cut (default 0xFF all track selected)
139 UInt_t fSelectBit; // Select events according to AliAnalysisTaskJetServices bit maps
140 Bool_t fUseChargeHadrons; // Only use charge hadrons
142 Int_t fSelectCharge; // (un)like sign selection when building correlations: 0: no selection; 1: unlike sign; 2: like sign
143 Bool_t fFillpT; // fill sum pT instead of number density
145 ClassDef( AliAnalysisTaskPhiCorrelations, 3); // Analysis task for Underlying Event analysis w.r.t. leading track
148 class AliDPhiBasicParticle : public AliVParticle
151 AliDPhiBasicParticle(Float_t eta, Float_t phi, Float_t pt, Short_t charge)
152 : fEta(eta), fPhi(phi), fpT(pt), fCharge(charge)
155 ~AliDPhiBasicParticle() {}
158 virtual Double_t Px() const { AliFatal("Not implemented"); return 0; }
159 virtual Double_t Py() const { AliFatal("Not implemented"); return 0; }
160 virtual Double_t Pz() const { AliFatal("Not implemented"); return 0; }
161 virtual Double_t Pt() const { return fpT; }
162 virtual Double_t P() const { AliFatal("Not implemented"); return 0; }
163 virtual Bool_t PxPyPz(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
165 virtual Double_t Xv() const { AliFatal("Not implemented"); return 0; }
166 virtual Double_t Yv() const { AliFatal("Not implemented"); return 0; }
167 virtual Double_t Zv() const { AliFatal("Not implemented"); return 0; }
168 virtual Bool_t XvYvZv(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
170 virtual Double_t OneOverPt() const { AliFatal("Not implemented"); return 0; }
171 virtual Double_t Phi() const { return fPhi; }
172 virtual Double_t Theta() const { AliFatal("Not implemented"); return 0; }
175 virtual Double_t E() const { AliFatal("Not implemented"); return 0; }
176 virtual Double_t M() const { AliFatal("Not implemented"); return 0; }
178 virtual Double_t Eta() const { return fEta; }
179 virtual Double_t Y() const { AliFatal("Not implemented"); return 0; }
181 virtual Short_t Charge() const { return fCharge; }
182 virtual Int_t GetLabel() const { AliFatal("Not implemented"); return 0; }
184 virtual Int_t PdgCode() const { AliFatal("Not implemented"); return 0; }
185 virtual const Double_t *PID() const { AliFatal("Not implemented"); return 0; }
191 Short_t fCharge; // charge
193 ClassDef( AliDPhiBasicParticle, 1); // class which contains only quantities requires for this analysis to reduce memory consumption for event mixing