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"
34 #include "THn.h" // in cxx file causes .../THn.h:257: error: conflicting declaration ‘typedef class THnT<float> THnF’
37 class AliAnalyseLeadingTrackUE;
38 class AliInputEventHandler;
40 class AliMCEventHandler;
41 class AliUEHistograms;
45 class AliEventPoolManager;
49 class AliAnalysisTaskPhiCorrelations : public AliAnalysisTask
52 AliAnalysisTaskPhiCorrelations(const char* name="AliAnalysisTaskPhiCorrelations");
53 virtual ~AliAnalysisTaskPhiCorrelations();
56 // Implementation of interace methods
57 virtual void ConnectInputData(Option_t *);
58 virtual void CreateOutputObjects();
59 virtual void Exec(Option_t *option);
62 // general configuration
63 virtual void SetDebugLevel( Int_t level ) { fDebug = level; }
64 virtual void SetMode(Int_t mode) { fMode = mode; }
65 virtual void SetReduceMemoryFootprint(Bool_t flag) { fReduceMemoryFootprint = flag; }
66 virtual void SetEventMixing(Bool_t flag) { fFillMixed = flag; }
67 virtual void SetMixingTracks(Int_t tracks) { fMixingTracks = tracks; }
68 virtual void SetCompareCentralities(Bool_t flag) { fCompareCentralities = flag; }
69 virtual void SetTwoTrackEfficiencyStudy(Bool_t flag) { fTwoTrackEfficiencyStudy = flag; }
70 virtual void SetTwoTrackEfficiencyCut(Float_t value = 0.02) { fTwoTrackEfficiencyCut = value; }
71 virtual void SetUseVtxAxis(Int_t flag) { fUseVtxAxis = flag; }
72 virtual void SetCourseCentralityBinning(Bool_t flag) { fCourseCentralityBinning = flag; }
73 virtual void SetSkipTrigger(Bool_t flag) { fSkipTrigger = flag; }
74 virtual void SetInjectedSignals(Bool_t flag) { fInjectedSignals = flag; }
77 void SetEfficiencyCorrection(THnF* hist) { fEfficiencyCorrection = hist; }
80 void SetTracksInVertex( Int_t val ){ fnTracksVertex = val; }
81 void SetZVertex( Double_t val ) { fZVertex = val; }
84 void SetTrackEtaCut( Double_t val ) { fTrackEtaCut = val; }
85 void SetOnlyOneEtaSide(Int_t flag) { fOnlyOneEtaSide = flag; }
86 void SetPtMin(Double_t val) { fPtMin = val; }
87 void SetFilterBit( UInt_t val ) { fFilterBit = val; }
89 void SetEventSelectionBit( UInt_t val ) { fSelectBit = val; }
90 void SetUseChargeHadrons( Bool_t val ) { fUseChargeHadrons = val; }
91 void SetSelectCharge(Int_t selectCharge) { fSelectCharge = selectCharge; }
92 void SetSelectTriggerCharge(Int_t selectCharge) { fTriggerSelectCharge = selectCharge; }
93 void SetTriggerRestrictEta(Float_t eta) { fTriggerRestrictEta = eta; }
94 void SetEtaOrdering(Bool_t flag) { fEtaOrdering = flag; }
95 void SetPairCuts(Bool_t conversions, Bool_t resonances) { fCutConversions = conversions; fCutResonances = resonances; }
96 void SetCentralityMethod(const char* method) { fCentralityMethod = method; }
97 void SetFillpT(Bool_t flag) { fFillpT = flag; }
98 void SetStepsFillSkip(Bool_t step0, Bool_t step6) { fFillOnlyStep0 = step0; fSkipStep6 = step6; }
99 void SetRejectCentralityOutliers(Bool_t flag = kTRUE) { fRejectCentralityOutliers = flag; }
100 void SetRemoveWeakDecays(Bool_t flag = kTRUE) { fRemoveWeakDecays = flag; }
101 void SetRemoveDuplicates(Bool_t flag = kTRUE) { fRemoveDuplicates = flag; }
104 AliAnalysisTaskPhiCorrelations(const AliAnalysisTaskPhiCorrelations &det);
105 AliAnalysisTaskPhiCorrelations& operator=(const AliAnalysisTaskPhiCorrelations &det);
106 void AddSettingsTree(); // add list of settings to output list
108 void AnalyseCorrectionMode(); // main algorithm to get correction maps
109 void AnalyseDataMode(); // main algorithm to get raw distributions
110 void Initialize(); // initialize some common pointer
111 TObjArray* CloneAndReduceTrackList(TObjArray* tracks);
112 void RemoveDuplicates(TObjArray* tracks);
114 // General configuration
115 Int_t fDebug; // Debug flag
116 Int_t fMode; // fMode = 0: data-like analysis
117 // fMode = 1: corrections analysis
118 Bool_t fReduceMemoryFootprint; // reduce memory consumption by writing less debug histograms
119 Bool_t fFillMixed; // enable event mixing (default: ON)
120 Int_t fMixingTracks; // size of track buffer for event mixing
121 Bool_t fCompareCentralities; // use the z vtx axis for a centrality comparison
122 Bool_t fTwoTrackEfficiencyStudy; // two-track efficiency study on
123 Float_t fTwoTrackEfficiencyCut; // enable two-track efficiency cut
124 Int_t fUseVtxAxis; // use z vtx as axis (needs 7-10 times more memory!)
125 Bool_t fCourseCentralityBinning; // less centrality bins
126 Bool_t fSkipTrigger; // skip trigger selection
127 Bool_t fInjectedSignals; // check header to skip injected signals in MC
129 // Pointers to external UE classes
130 AliAnalyseLeadingTrackUE* fAnalyseUE; //! points to class containing common analysis algorithms
131 AliUEHistograms* fHistos; //! points to class to handle histograms/containers
132 AliUEHistograms* fHistosMixed; //! points to class to handle mixed histograms/containers
134 THnF* fEfficiencyCorrection; // if non-0 this efficiency correction is applied on the fly to the filling for associated particles. The factor is multiplicative, i.e. should contain 1/efficiency. Axes: eta, pT, centrality, z-vtx
136 // Handlers and events
137 AliAODEvent* fAOD; //! AOD Event
138 AliESDEvent* fESD; //! ESD Event
139 TClonesArray* fArrayMC; //! Array of MC particles
140 AliInputEventHandler* fInputHandler; //! Generic InputEventHandler
141 AliMCEvent* fMcEvent; //! MC event
142 AliMCEventHandler* fMcHandler; //! MCEventHandler
143 AliEventPoolManager* fPoolMgr; //! event pool manager
145 // Histogram settings
146 TList* fListOfHistos; // Output list of containers
149 Int_t fnTracksVertex; // QA tracks pointing to principal vertex
150 Double_t fZVertex; // Position of Vertex in Z direction
151 TString fCentralityMethod; // Method to determine centrality
154 Double_t fTrackEtaCut; // Eta cut on particles
155 Int_t fOnlyOneEtaSide; // decides that only trigger particle from one eta side are considered (0 = all; -1 = negative, 1 = positive)
156 Double_t fPtMin; // Min pT to start correlations
157 UInt_t fFilterBit; // Select tracks from an specific track cut (default 0xFF all track selected)
158 UInt_t fSelectBit; // Select events according to AliAnalysisTaskJetServices bit maps
159 Bool_t fUseChargeHadrons; // Only use charge hadrons
161 Int_t fSelectCharge; // (un)like sign selection when building correlations: 0: no selection; 1: unlike sign; 2: like sign
162 Int_t fTriggerSelectCharge; // select charge of trigger particle
163 Float_t fTriggerRestrictEta; // restrict eta range for trigger particle (default: -1 [off])
164 Bool_t fEtaOrdering; // eta ordering, see AliUEHistograms.h for documentation
165 Bool_t fCutConversions; // cut on conversions (inv mass)
166 Bool_t fCutResonances; // cut on resonances (inv mass)
167 Bool_t fFillOnlyStep0; // fill only step 0
168 Bool_t fSkipStep6; // skip step 6 when filling
169 Bool_t fRejectCentralityOutliers; // enable rejection of outliers in centrality vs no track correlation
170 Bool_t fRemoveWeakDecays; // remove secondaries from weak decays from tracks and particles
171 Bool_t fRemoveDuplicates; // remove particles with the same label (double reconstruction)
173 Bool_t fFillpT; // fill sum pT instead of number density
175 ClassDef( AliAnalysisTaskPhiCorrelations, 19); // Analysis task for delta phi correlations
178 class AliDPhiBasicParticle : public AliVParticle
181 AliDPhiBasicParticle(Float_t eta, Float_t phi, Float_t pt, Short_t charge)
182 : fEta(eta), fPhi(phi), fpT(pt), fCharge(charge)
185 ~AliDPhiBasicParticle() {}
188 virtual Double_t Px() const { AliFatal("Not implemented"); return 0; }
189 virtual Double_t Py() const { AliFatal("Not implemented"); return 0; }
190 virtual Double_t Pz() const { AliFatal("Not implemented"); return 0; }
191 virtual Double_t Pt() const { return fpT; }
192 virtual Double_t P() const { AliFatal("Not implemented"); return 0; }
193 virtual Bool_t PxPyPz(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
195 virtual Double_t Xv() const { AliFatal("Not implemented"); return 0; }
196 virtual Double_t Yv() const { AliFatal("Not implemented"); return 0; }
197 virtual Double_t Zv() const { AliFatal("Not implemented"); return 0; }
198 virtual Bool_t XvYvZv(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
200 virtual Double_t OneOverPt() const { AliFatal("Not implemented"); return 0; }
201 virtual Double_t Phi() const { return fPhi; }
202 virtual Double_t Theta() const { AliFatal("Not implemented"); return 0; }
205 virtual Double_t E() const { AliFatal("Not implemented"); return 0; }
206 virtual Double_t M() const { AliFatal("Not implemented"); return 0; }
208 virtual Double_t Eta() const { return fEta; }
209 virtual Double_t Y() const { AliFatal("Not implemented"); return 0; }
211 virtual Short_t Charge() const { return fCharge; }
212 virtual Int_t GetLabel() const { AliFatal("Not implemented"); return 0; }
214 virtual Int_t PdgCode() const { AliFatal("Not implemented"); return 0; }
215 virtual const Double_t *PID() const { AliFatal("Not implemented"); return 0; }
221 Short_t fCharge; // charge
223 ClassDef( AliDPhiBasicParticle, 1); // class which contains only quantities requires for this analysis to reduce memory consumption for event mixing