]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/Correlations/DPhi/AliAnalysisTaskPhiCorrelations.h
Modifications for B=0 field in SDD task in CPass0/CPass1 and for the ITS task
[u/mrichter/AliRoot.git] / PWGCF / Correlations / DPhi / AliAnalysisTaskPhiCorrelations.h
CommitLineData
e0331fd9 1#ifndef AliAnalysisTaskPhiCorrelations_H
2#define AliAnalysisTaskPhiCorrelations_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7////////////////////////////////////////////////////////////////////////
8//
9// Analysis class for Underlying Event studies w.r.t. leading track
10//
11// Look for correlations on the tranverse regions w.r.t
12// the leading track in the event
13//
14// This class needs input AODs.
15// The output is a list of analysis-specific containers.
16//
17// The AOD can be either connected to the InputEventHandler
18// for a chain of AOD files
19// or
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
23//
24// Authors:
e0331fd9 25// Jan Fiete Grosse-Oetringhaus
e0331fd9 26//
27////////////////////////////////////////////////////////////////////////
28
29#include "AliAnalysisTask.h"
30#include "AliUEHist.h"
2a910c25 31#include "TString.h"
a1c31636 32#include "AliVParticle.h"
33#include "AliLog.h"
e0331fd9 34
35class AliAODEvent;
36class AliAnalyseLeadingTrackUE;
37class AliInputEventHandler;
38class AliMCEvent;
39class AliMCEventHandler;
40class AliUEHistograms;
41class AliVParticle;
42class TH1D;
43class TObjArray;
2a910c25 44class AliEventPoolManager;
85bfac17 45class AliESDEvent;
e0331fd9 46
47class AliAnalysisTaskPhiCorrelations : public AliAnalysisTask
48 {
49 public:
50 AliAnalysisTaskPhiCorrelations(const char* name="AliAnalysisTaskPhiCorrelations");
51 virtual ~AliAnalysisTaskPhiCorrelations();
52
53
54 // Implementation of interace methods
55 virtual void ConnectInputData(Option_t *);
56 virtual void CreateOutputObjects();
57 virtual void Exec(Option_t *option);
58
59 // Setters/Getters
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; }
eed401dc 64 virtual void SetEventMixing(Bool_t flag) { fFillMixed = flag; }
ac647b0f 65 virtual void SetMixingTracks(Int_t tracks) { fMixingTracks = tracks; }
c3294f09 66 virtual void SetCompareCentralities(Bool_t flag) { fCompareCentralities = flag; }
1bba939a 67 virtual void SetTwoTrackEfficiencyStudy(Bool_t flag) { fTwoTrackEfficiencyStudy = flag; }
04af8d15 68 virtual void SetTwoTrackEfficiencyCut(Bool_t flag) { fTwoTrackEfficiencyCut = flag; }
44af28f9 69 virtual void SetUseVtxAxis(Bool_t flag) { fUseVtxAxis = flag; }
04af8d15 70 virtual void SetSkipTrigger(Bool_t flag) { fSkipTrigger = flag; }
e0331fd9 71
72 // histogram settings
73 void SetTrackingEfficiency( const TH1D* hist) { fkTrackingEfficiency = hist; }
74
75 // for event QA
76 void SetTracksInVertex( Int_t val ){ fnTracksVertex = val; }
77 void SetZVertex( Double_t val ) { fZVertex = val; }
78
79 // track cuts
80 void SetTrackEtaCut( Double_t val ) { fTrackEtaCut = val; }
9da2f080 81 void SetOnlyOneEtaSide(Int_t flag) { fOnlyOneEtaSide = flag; }
e0331fd9 82 void SetPtMin(Double_t val) { fPtMin = val; }
83 void SetFilterBit( UInt_t val ) { fFilterBit = val; }
2a910c25 84
e0331fd9 85 void SetEventSelectionBit( UInt_t val ) { fSelectBit = val; }
86 void SetUseChargeHadrons( Bool_t val ) { fUseChargeHadrons = val; }
2a910c25 87 void SetSelectCharge(Int_t selectCharge) { fSelectCharge = selectCharge; }
d38fa455 88 void SetTriggerRestrictEta(Float_t eta) { fTriggerRestrictEta = eta; }
00b6f3c6 89 void SetEtaOrdering(Bool_t flag) { fEtaOrdering = flag; }
b0d56b29 90 void SetPairCuts(Bool_t conversions, Bool_t resonances) { fCutConversions = conversions; fCutResonances = resonances; }
2a910c25 91 void SetCentralityMethod(const char* method) { fCentralityMethod = method; }
c05ff6be 92 void SetFillpT(Bool_t flag) { fFillpT = flag; }
a26093ba 93 void SetStepsFillSkip(Bool_t step0, Bool_t step6) { fFillOnlyStep0 = step0; fSkipStep6 = step6; }
e0331fd9 94
95 private:
96 AliAnalysisTaskPhiCorrelations(const AliAnalysisTaskPhiCorrelations &det);
97 AliAnalysisTaskPhiCorrelations& operator=(const AliAnalysisTaskPhiCorrelations &det);
98 void AddSettingsTree(); // add list of settings to output list
99 // Analysis methods
100 void AnalyseCorrectionMode(); // main algorithm to get correction maps
101 void AnalyseDataMode(); // main algorithm to get raw distributions
102 void Initialize(); // initialize some common pointer
7a028750 103 TObjArray* CloneAndReduceTrackList(TObjArray* tracks);
e0331fd9 104
e0331fd9 105 // General configuration
106 Int_t fDebug; // Debug flag
107 Int_t fMode; // fMode = 0: data-like analysis
108 // fMode = 1: corrections analysis
109 Bool_t fReduceMemoryFootprint; // reduce memory consumption by writing less debug histograms
eed401dc 110 Bool_t fFillMixed; // enable event mixing (default: ON)
ac647b0f 111 Int_t fMixingTracks; // size of track buffer for event mixing
c3294f09 112 Bool_t fCompareCentralities; // use the z vtx axis for a centrality comparison
1bba939a 113 Bool_t fTwoTrackEfficiencyStudy; // two-track efficiency study on
04af8d15 114 Bool_t fTwoTrackEfficiencyCut; // enable two-track efficiency cut
44af28f9 115 Bool_t fUseVtxAxis; // use z vtx as axis (needs 7 times more memory!)
04af8d15 116 Bool_t fSkipTrigger; // skip trigger selection
e0331fd9 117
118 // Pointers to external UE classes
119 AliAnalyseLeadingTrackUE* fAnalyseUE; //! points to class containing common analysis algorithms
120 AliUEHistograms* fHistos; //! points to class to handle histograms/containers
121 AliUEHistograms* fHistosMixed; //! points to class to handle mixed histograms/containers
122
123 const TH1D* fkTrackingEfficiency; // used for study of bias by tracking
124
125 // Handlers and events
126 AliAODEvent* fAOD; //! AOD Event
85bfac17 127 AliESDEvent* fESD; //! ESD Event
e0331fd9 128 TClonesArray* fArrayMC; //! Array of MC particles
129 AliInputEventHandler* fInputHandler; //! Generic InputEventHandler
130 AliMCEvent* fMcEvent; //! MC event
131 AliMCEventHandler* fMcHandler; //! MCEventHandler
2a910c25 132 AliEventPoolManager* fPoolMgr; //! event pool manager
e0331fd9 133
134 // Histogram settings
135 TList* fListOfHistos; // Output list of containers
136
137 // Event QA cuts
c05ff6be 138 Int_t fnTracksVertex; // QA tracks pointing to principal vertex
e0331fd9 139 Double_t fZVertex; // Position of Vertex in Z direction
2a910c25 140 TString fCentralityMethod; // Method to determine centrality
e0331fd9 141
142 // Track cuts
143 Double_t fTrackEtaCut; // Eta cut on particles
9da2f080 144 Int_t fOnlyOneEtaSide; // decides that only trigger particle from one eta side are considered (0 = all; -1 = negative, 1 = positive)
e0331fd9 145 Double_t fPtMin; // Min pT to start correlations
146 UInt_t fFilterBit; // Select tracks from an specific track cut (default 0xFF all track selected)
147 UInt_t fSelectBit; // Select events according to AliAnalysisTaskJetServices bit maps
148 Bool_t fUseChargeHadrons; // Only use charge hadrons
149
2a910c25 150 Int_t fSelectCharge; // (un)like sign selection when building correlations: 0: no selection; 1: unlike sign; 2: like sign
d38fa455 151 Float_t fTriggerRestrictEta; // restrict eta range for trigger particle (default: -1 [off])
00b6f3c6 152 Bool_t fEtaOrdering; // eta ordering, see AliUEHistograms.h for documentation
b0d56b29 153 Bool_t fCutConversions; // cut on conversions (inv mass)
154 Bool_t fCutResonances; // cut on resonances (inv mass)
a26093ba 155 Bool_t fFillOnlyStep0; // fill only step 0
156 Bool_t fSkipStep6; // skip step 6 when filling
d38fa455 157
c05ff6be 158 Bool_t fFillpT; // fill sum pT instead of number density
2a910c25 159
9da2f080 160 ClassDef( AliAnalysisTaskPhiCorrelations, 9); // Analysis task for delta phi correlations
e0331fd9 161 };
162
a1c31636 163class AliDPhiBasicParticle : public AliVParticle
164{
165 public:
166 AliDPhiBasicParticle(Float_t eta, Float_t phi, Float_t pt, Short_t charge)
167 : fEta(eta), fPhi(phi), fpT(pt), fCharge(charge)
168 {
169 }
170 ~AliDPhiBasicParticle() {}
171
172 // kinematics
173 virtual Double_t Px() const { AliFatal("Not implemented"); return 0; }
174 virtual Double_t Py() const { AliFatal("Not implemented"); return 0; }
175 virtual Double_t Pz() const { AliFatal("Not implemented"); return 0; }
176 virtual Double_t Pt() const { return fpT; }
177 virtual Double_t P() const { AliFatal("Not implemented"); return 0; }
178 virtual Bool_t PxPyPz(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
179
180 virtual Double_t Xv() const { AliFatal("Not implemented"); return 0; }
181 virtual Double_t Yv() const { AliFatal("Not implemented"); return 0; }
182 virtual Double_t Zv() const { AliFatal("Not implemented"); return 0; }
183 virtual Bool_t XvYvZv(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
184
185 virtual Double_t OneOverPt() const { AliFatal("Not implemented"); return 0; }
186 virtual Double_t Phi() const { return fPhi; }
187 virtual Double_t Theta() const { AliFatal("Not implemented"); return 0; }
188
189
190 virtual Double_t E() const { AliFatal("Not implemented"); return 0; }
191 virtual Double_t M() const { AliFatal("Not implemented"); return 0; }
192
193 virtual Double_t Eta() const { return fEta; }
194 virtual Double_t Y() const { AliFatal("Not implemented"); return 0; }
195
196 virtual Short_t Charge() const { return fCharge; }
197 virtual Int_t GetLabel() const { AliFatal("Not implemented"); return 0; }
198 // PID
199 virtual Int_t PdgCode() const { AliFatal("Not implemented"); return 0; }
200 virtual const Double_t *PID() const { AliFatal("Not implemented"); return 0; }
201
202 private:
203 Float_t fEta; // eta
204 Float_t fPhi; // phi
205 Float_t fpT; // pT
206 Short_t fCharge; // charge
207
208 ClassDef( AliDPhiBasicParticle, 1); // class which contains only quantities requires for this analysis to reduce memory consumption for event mixing
209};
210
e0331fd9 211#endif
212
213