]>
Commit | Line | Data |
---|---|---|
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" | |
408d1ac9 | 34 | #include "THn.h" // in cxx file causes .../THn.h:257: error: conflicting declaration ‘typedef class THnT<float> THnF’ |
e0331fd9 | 35 | |
36 | class AliAODEvent; | |
37 | class AliAnalyseLeadingTrackUE; | |
38 | class AliInputEventHandler; | |
39 | class AliMCEvent; | |
40 | class AliMCEventHandler; | |
41 | class AliUEHistograms; | |
42 | class AliVParticle; | |
43 | class TH1D; | |
44 | class TObjArray; | |
2a910c25 | 45 | class AliEventPoolManager; |
85bfac17 | 46 | class AliESDEvent; |
32e49607 | 47 | class AliHelperPID; |
e0331fd9 | 48 | |
408d1ac9 | 49 | |
e0331fd9 | 50 | class AliAnalysisTaskPhiCorrelations : public AliAnalysisTask |
51 | { | |
52 | public: | |
53 | AliAnalysisTaskPhiCorrelations(const char* name="AliAnalysisTaskPhiCorrelations"); | |
54 | virtual ~AliAnalysisTaskPhiCorrelations(); | |
55 | ||
56 | ||
57 | // Implementation of interace methods | |
58 | virtual void ConnectInputData(Option_t *); | |
59 | virtual void CreateOutputObjects(); | |
60 | virtual void Exec(Option_t *option); | |
61 | ||
62 | // Setters/Getters | |
63 | // general configuration | |
64 | virtual void SetDebugLevel( Int_t level ) { fDebug = level; } | |
65 | virtual void SetMode(Int_t mode) { fMode = mode; } | |
66 | virtual void SetReduceMemoryFootprint(Bool_t flag) { fReduceMemoryFootprint = flag; } | |
eed401dc | 67 | virtual void SetEventMixing(Bool_t flag) { fFillMixed = flag; } |
ac647b0f | 68 | virtual void SetMixingTracks(Int_t tracks) { fMixingTracks = tracks; } |
c3294f09 | 69 | virtual void SetCompareCentralities(Bool_t flag) { fCompareCentralities = flag; } |
1bba939a | 70 | virtual void SetTwoTrackEfficiencyStudy(Bool_t flag) { fTwoTrackEfficiencyStudy = flag; } |
d4b3dbfc | 71 | virtual void SetTwoTrackEfficiencyCut(Float_t value = 0.02) { fTwoTrackEfficiencyCut = value; } |
3bbad7c1 | 72 | virtual void SetUseVtxAxis(Int_t flag) { fUseVtxAxis = flag; } |
9894bedd | 73 | virtual void SetCourseCentralityBinning(Bool_t flag) { fCourseCentralityBinning = flag; } |
04af8d15 | 74 | virtual void SetSkipTrigger(Bool_t flag) { fSkipTrigger = flag; } |
1ccd8a0a | 75 | virtual void SetInjectedSignals(Bool_t flag) { fInjectedSignals = flag; } |
e0331fd9 | 76 | |
77 | // histogram settings | |
418b56c5 | 78 | void SetEfficiencyCorrectionTriggers(THnF* hist) { fEfficiencyCorrectionTriggers = hist; } |
79 | void SetEfficiencyCorrectionAssociated(THnF* hist) { fEfficiencyCorrectionAssociated = hist; } | |
e0331fd9 | 80 | |
81 | // for event QA | |
82 | void SetTracksInVertex( Int_t val ){ fnTracksVertex = val; } | |
83 | void SetZVertex( Double_t val ) { fZVertex = val; } | |
84 | ||
85 | // track cuts | |
86 | void SetTrackEtaCut( Double_t val ) { fTrackEtaCut = val; } | |
418b56c5 | 87 | void SetOnlyOneEtaSide(Int_t flag) { fOnlyOneEtaSide = flag; } |
e0331fd9 | 88 | void SetPtMin(Double_t val) { fPtMin = val; } |
89 | void SetFilterBit( UInt_t val ) { fFilterBit = val; } | |
418b56c5 | 90 | void SetTrackStatus(UInt_t status) { fTrackStatus = status; } |
9e35c487 | 91 | void SetCheckMotherPDG(Bool_t checkpdg) { fCheckMotherPDG = checkpdg; } |
2a910c25 | 92 | |
e0331fd9 | 93 | void SetEventSelectionBit( UInt_t val ) { fSelectBit = val; } |
94 | void SetUseChargeHadrons( Bool_t val ) { fUseChargeHadrons = val; } | |
5c9b9fa6 | 95 | void SetSelectParticleSpecies( Int_t trigger, Int_t associated ) { fParticleSpeciesTrigger = trigger; fParticleSpeciesAssociated = associated; } |
2a910c25 | 96 | void SetSelectCharge(Int_t selectCharge) { fSelectCharge = selectCharge; } |
7a77d480 | 97 | void SetSelectTriggerCharge(Int_t selectCharge) { fTriggerSelectCharge = selectCharge; } |
15b0fdd0 | 98 | void SetSelectAssociatedCharge(Int_t selectCharge) { fAssociatedSelectCharge = selectCharge; } |
d38fa455 | 99 | void SetTriggerRestrictEta(Float_t eta) { fTriggerRestrictEta = eta; } |
00b6f3c6 | 100 | void SetEtaOrdering(Bool_t flag) { fEtaOrdering = flag; } |
b0d56b29 | 101 | void SetPairCuts(Bool_t conversions, Bool_t resonances) { fCutConversions = conversions; fCutResonances = resonances; } |
2a910c25 | 102 | void SetCentralityMethod(const char* method) { fCentralityMethod = method; } |
c05ff6be | 103 | void SetFillpT(Bool_t flag) { fFillpT = flag; } |
a26093ba | 104 | void SetStepsFillSkip(Bool_t step0, Bool_t step6) { fFillOnlyStep0 = step0; fSkipStep6 = step6; } |
5e053cad | 105 | void SetRejectCentralityOutliers(Bool_t flag = kTRUE) { fRejectCentralityOutliers = flag; } |
f613255f | 106 | void SetRemoveWeakDecays(Bool_t flag = kTRUE) { fRemoveWeakDecays = flag; } |
d6a8903f | 107 | void SetRemoveDuplicates(Bool_t flag = kTRUE) { fRemoveDuplicates = flag; } |
8a368fc2 | 108 | void SetSkipFastCluster(Bool_t flag = kTRUE) { fSkipFastCluster = flag; } |
109 | void SetWeightPerEvent(Bool_t flag = kTRUE) { fWeightPerEvent = flag; } | |
3f3f12d9 | 110 | void SetCustomBinning(const char* binningStr) { fCustomBinning = binningStr; } |
640b9425 | 111 | void SetPtOrder(Bool_t flag) { fPtOrder = flag; } |
e0331fd9 | 112 | |
32e49607 | 113 | AliHelperPID* GetHelperPID() { return fHelperPID; } |
114 | void SetHelperPID(AliHelperPID* pid){ fHelperPID = pid; } | |
115 | ||
e0331fd9 | 116 | private: |
117 | AliAnalysisTaskPhiCorrelations(const AliAnalysisTaskPhiCorrelations &det); | |
118 | AliAnalysisTaskPhiCorrelations& operator=(const AliAnalysisTaskPhiCorrelations &det); | |
119 | void AddSettingsTree(); // add list of settings to output list | |
120 | // Analysis methods | |
121 | void AnalyseCorrectionMode(); // main algorithm to get correction maps | |
122 | void AnalyseDataMode(); // main algorithm to get raw distributions | |
123 | void Initialize(); // initialize some common pointer | |
7a028750 | 124 | TObjArray* CloneAndReduceTrackList(TObjArray* tracks); |
d6a8903f | 125 | void RemoveDuplicates(TObjArray* tracks); |
3f3f12d9 | 126 | void CleanUp(TObjArray* tracks, TObject* mcObj, Int_t maxLabel); |
29cfdb5f | 127 | void SelectCharge(TObjArray* tracks); |
e0331fd9 | 128 | |
e0331fd9 | 129 | // General configuration |
130 | Int_t fDebug; // Debug flag | |
131 | Int_t fMode; // fMode = 0: data-like analysis | |
132 | // fMode = 1: corrections analysis | |
418b56c5 | 133 | Bool_t fReduceMemoryFootprint; // reduce memory consumption by writing less debug histograms |
eed401dc | 134 | Bool_t fFillMixed; // enable event mixing (default: ON) |
ac647b0f | 135 | Int_t fMixingTracks; // size of track buffer for event mixing |
c3294f09 | 136 | Bool_t fCompareCentralities; // use the z vtx axis for a centrality comparison |
1bba939a | 137 | Bool_t fTwoTrackEfficiencyStudy; // two-track efficiency study on |
d4b3dbfc | 138 | Float_t fTwoTrackEfficiencyCut; // enable two-track efficiency cut |
3bbad7c1 | 139 | Int_t fUseVtxAxis; // use z vtx as axis (needs 7-10 times more memory!) |
9894bedd | 140 | Bool_t fCourseCentralityBinning; // less centrality bins |
04af8d15 | 141 | Bool_t fSkipTrigger; // skip trigger selection |
1ccd8a0a | 142 | Bool_t fInjectedSignals; // check header to skip injected signals in MC |
e0331fd9 | 143 | |
144 | // Pointers to external UE classes | |
32e49607 | 145 | AliHelperPID* fHelperPID; // points to class containing common analysis algorithms |
e0331fd9 | 146 | AliAnalyseLeadingTrackUE* fAnalyseUE; //! points to class containing common analysis algorithms |
147 | AliUEHistograms* fHistos; //! points to class to handle histograms/containers | |
148 | AliUEHistograms* fHistosMixed; //! points to class to handle mixed histograms/containers | |
149 | ||
418b56c5 | 150 | THnF* fEfficiencyCorrectionTriggers; // if non-0 this efficiency correction is applied on the fly to the filling for trigger particles. The factor is multiplicative, i.e. should contain 1/efficiency. Axes: eta, pT, centrality, z-vtx |
151 | THnF* fEfficiencyCorrectionAssociated; // 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 | |
152 | ||
e0331fd9 | 153 | // Handlers and events |
154 | AliAODEvent* fAOD; //! AOD Event | |
85bfac17 | 155 | AliESDEvent* fESD; //! ESD Event |
e0331fd9 | 156 | TClonesArray* fArrayMC; //! Array of MC particles |
157 | AliInputEventHandler* fInputHandler; //! Generic InputEventHandler | |
158 | AliMCEvent* fMcEvent; //! MC event | |
159 | AliMCEventHandler* fMcHandler; //! MCEventHandler | |
2a910c25 | 160 | AliEventPoolManager* fPoolMgr; //! event pool manager |
e0331fd9 | 161 | |
162 | // Histogram settings | |
163 | TList* fListOfHistos; // Output list of containers | |
164 | ||
165 | // Event QA cuts | |
c05ff6be | 166 | Int_t fnTracksVertex; // QA tracks pointing to principal vertex |
e0331fd9 | 167 | Double_t fZVertex; // Position of Vertex in Z direction |
2a910c25 | 168 | TString fCentralityMethod; // Method to determine centrality |
e0331fd9 | 169 | |
170 | // Track cuts | |
171 | Double_t fTrackEtaCut; // Eta cut on particles | |
9da2f080 | 172 | Int_t fOnlyOneEtaSide; // decides that only trigger particle from one eta side are considered (0 = all; -1 = negative, 1 = positive) |
9e35c487 | 173 | Double_t fPtMin; // Min pT to start correlations |
418b56c5 | 174 | UInt_t fFilterBit; // Select tracks from an specific track cut |
175 | UInt_t fTrackStatus; // if non-0, the bits set in this variable are required for each track | |
e0331fd9 | 176 | UInt_t fSelectBit; // Select events according to AliAnalysisTaskJetServices bit maps |
177 | Bool_t fUseChargeHadrons; // Only use charge hadrons | |
5c9b9fa6 | 178 | Int_t fParticleSpeciesTrigger; // Select which particle to use for the trigger [ -1 (all, default) 0 (pions) 1 (kaons) 2 (protons) 3 (others) particles ] |
179 | Int_t fParticleSpeciesAssociated; // Select which particle to use for the associated [ -1 (all, default) 0 (pions) 1 (kaons) 2 (protons) 3 (others) particles ] | |
9e35c487 | 180 | Bool_t fCheckMotherPDG; // Check the PDG code of mother for secondaries |
39c2cb38 | 181 | |
2a910c25 | 182 | Int_t fSelectCharge; // (un)like sign selection when building correlations: 0: no selection; 1: unlike sign; 2: like sign |
15b0fdd0 | 183 | Int_t fTriggerSelectCharge; // select charge of trigger particle: 1: positive; -1 negative |
184 | Int_t fAssociatedSelectCharge; // select charge of associated particle: 1: positive; -1 negative | |
d38fa455 | 185 | Float_t fTriggerRestrictEta; // restrict eta range for trigger particle (default: -1 [off]) |
00b6f3c6 | 186 | Bool_t fEtaOrdering; // eta ordering, see AliUEHistograms.h for documentation |
b0d56b29 | 187 | Bool_t fCutConversions; // cut on conversions (inv mass) |
188 | Bool_t fCutResonances; // cut on resonances (inv mass) | |
a26093ba | 189 | Bool_t fFillOnlyStep0; // fill only step 0 |
190 | Bool_t fSkipStep6; // skip step 6 when filling | |
5e053cad | 191 | Bool_t fRejectCentralityOutliers; // enable rejection of outliers in centrality vs no track correlation |
f613255f | 192 | Bool_t fRemoveWeakDecays; // remove secondaries from weak decays from tracks and particles |
d6a8903f | 193 | Bool_t fRemoveDuplicates; // remove particles with the same label (double reconstruction) |
51d0a028 | 194 | Bool_t fSkipFastCluster; // skip kFastOnly flagged events (only for data) |
8a368fc2 | 195 | Bool_t fWeightPerEvent; // weight with the number of trigger particles per event |
3f3f12d9 | 196 | TString fCustomBinning; // supersedes default binning if set, see AliUEHist::GetBinning or AliUEHistograms::AliUEHistograms for syntax and examples |
640b9425 | 197 | Bool_t fPtOrder; // apply pT,a < pt,t condition; default: kTRUE |
d38fa455 | 198 | |
c05ff6be | 199 | Bool_t fFillpT; // fill sum pT instead of number density |
2a910c25 | 200 | |
640b9425 | 201 | ClassDef( AliAnalysisTaskPhiCorrelations, 30); // Analysis task for delta phi correlations |
e0331fd9 | 202 | }; |
203 | ||
a1c31636 | 204 | class AliDPhiBasicParticle : public AliVParticle |
205 | { | |
206 | public: | |
207 | AliDPhiBasicParticle(Float_t eta, Float_t phi, Float_t pt, Short_t charge) | |
208 | : fEta(eta), fPhi(phi), fpT(pt), fCharge(charge) | |
209 | { | |
210 | } | |
211 | ~AliDPhiBasicParticle() {} | |
212 | ||
213 | // kinematics | |
214 | virtual Double_t Px() const { AliFatal("Not implemented"); return 0; } | |
215 | virtual Double_t Py() const { AliFatal("Not implemented"); return 0; } | |
216 | virtual Double_t Pz() const { AliFatal("Not implemented"); return 0; } | |
217 | virtual Double_t Pt() const { return fpT; } | |
218 | virtual Double_t P() const { AliFatal("Not implemented"); return 0; } | |
219 | virtual Bool_t PxPyPz(Double_t[3]) const { AliFatal("Not implemented"); return 0; } | |
220 | ||
221 | virtual Double_t Xv() const { AliFatal("Not implemented"); return 0; } | |
222 | virtual Double_t Yv() const { AliFatal("Not implemented"); return 0; } | |
223 | virtual Double_t Zv() const { AliFatal("Not implemented"); return 0; } | |
224 | virtual Bool_t XvYvZv(Double_t[3]) const { AliFatal("Not implemented"); return 0; } | |
225 | ||
226 | virtual Double_t OneOverPt() const { AliFatal("Not implemented"); return 0; } | |
227 | virtual Double_t Phi() const { return fPhi; } | |
228 | virtual Double_t Theta() const { AliFatal("Not implemented"); return 0; } | |
229 | ||
230 | ||
231 | virtual Double_t E() const { AliFatal("Not implemented"); return 0; } | |
232 | virtual Double_t M() const { AliFatal("Not implemented"); return 0; } | |
233 | ||
234 | virtual Double_t Eta() const { return fEta; } | |
235 | virtual Double_t Y() const { AliFatal("Not implemented"); return 0; } | |
236 | ||
237 | virtual Short_t Charge() const { return fCharge; } | |
238 | virtual Int_t GetLabel() const { AliFatal("Not implemented"); return 0; } | |
239 | // PID | |
240 | virtual Int_t PdgCode() const { AliFatal("Not implemented"); return 0; } | |
241 | virtual const Double_t *PID() const { AliFatal("Not implemented"); return 0; } | |
242 | ||
243 | private: | |
244 | Float_t fEta; // eta | |
245 | Float_t fPhi; // phi | |
246 | Float_t fpT; // pT | |
247 | Short_t fCharge; // charge | |
248 | ||
249 | ClassDef( AliDPhiBasicParticle, 1); // class which contains only quantities requires for this analysis to reduce memory consumption for event mixing | |
250 | }; | |
251 | ||
e0331fd9 | 252 | #endif |
253 | ||
254 |