PID usage handled by cut object + new definition of D* mass bands (Grazia)
[u/mrichter/AliRoot.git] / PWGJE / AliAnalysisTaskJetCore.h
CommitLineData
75bf77e3 1#ifndef ALIANALYSISTASKJETCORE_H
2#define ALIANALYSISTASKJETCORE_H
3
568f8fa2 4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7// **************************************
8// This task computes several jet observables like
9// the fraction of energy in inner and outer coronnas,
10// the distance from track to jet axis and a
11// correlation strength distribution of particles inside jets.
12// Author: lcunquei@cern.ch
13// *******************************************
14
75bf77e3 15class TH1F;
8c483a6b 16class TH1I;
75bf77e3 17class TH2F;
18class TH3F;
19class THnSparse;
20class AliESDEvent;
ea693273 21class AliAODExtension;
75bf77e3 22class AliAODEvent;
23
24#include "AliAnalysisTaskSE.h"
25#include "AliVEvent.h"
26
27class AliAnalysisTaskJetCore : public AliAnalysisTaskSE {
28public:
29 AliAnalysisTaskJetCore();
30 AliAnalysisTaskJetCore(const char *name);
31 virtual ~AliAnalysisTaskJetCore();
75bf77e3 32 virtual void LocalInit() {Init();}
33 virtual void Init();
34 virtual void UserCreateOutputObjects();
35 virtual void UserExec(Option_t *option);
36 virtual void Terminate(const Option_t*);
37
38 virtual Int_t GetNInputTracks();
da93bb11 39
ea693273 40 Double_t RelativePhi(Double_t angle1,Double_t angle2);
da93bb11 41 virtual THnSparse* NewTHnSparseF(const char* name, UInt_t entries);
42 virtual void GetDimParams(Int_t iEntry,TString &label, Int_t &nbins, Double_t &xmin, Double_t &xmax);
75bf77e3 43 virtual AliVEvent::EOfflineTriggerTypes GetOfflineTrgMask() const { return fOfflineTrgMask; }
44 virtual void GetBranchNames(TString &branch1, TString &branch2) const { branch1 = fJetBranchName[0]; branch2 = fJetBranchName[1]; }
45 virtual Bool_t GetIsPbPb() const { return fIsPbPb; }
46 virtual Int_t GetMinContribVtx() const { return fMinContribVtx; };
47 virtual Float_t GetVtxZMin() const { return fVtxZMin; }
48 virtual Float_t GetVtxZMax() const { return fVtxZMax; }
49 virtual Int_t GetEvtClassMin() const { return fEvtClassMin; }
50 virtual Int_t GetEvtClassMax() const { return fEvtClassMax; }
51 virtual Float_t GetCentMin() const { return fCentMin; }
52 virtual Float_t GetCentMax() const { return fCentMax; }
53 virtual Int_t GetNInputTracksMin() const { return fNInputTracksMin; }
54 virtual Int_t GetNInputTracksMax() const { return fNInputTracksMax; }
55 virtual Float_t GetJetEtaMin() const { return fJetEtaMin; }
56 virtual Float_t GetJetEtaMax() const { return fJetEtaMax; }
57 virtual Float_t GetJetPtMin() const { return fJetPtMin; }
58 virtual Float_t GetJetPtFractionMin() const { return fJetPtFractionMin; }
59 virtual Int_t GetNMatchJets() const { return fNMatchJets; }
60 virtual void SetBranchNames(const TString &branch1, const TString &branch2);
61 virtual void SetBackgroundBranch(TString &branch) { fBackgroundBranch = branch;}
62 virtual void SetIsPbPb(Bool_t b=kTRUE) { fIsPbPb = b; }
63 virtual void SetOfflineTrgMask(AliVEvent::EOfflineTriggerTypes mask) { fOfflineTrgMask = mask; }
64 virtual void SetMinContribVtx(Int_t n) { fMinContribVtx = n; }
65 virtual void SetVtxZMin(Float_t z) { fVtxZMin = z; }
66 virtual void SetVtxZMax(Float_t z) { fVtxZMax = z; }
67 virtual void SetEvtClassMin(Int_t evtClass) { fEvtClassMin = evtClass; }
68 virtual void SetEvtClassMax(Int_t evtClass) { fEvtClassMax = evtClass; }
8b47ec90 69 virtual void SetFilterMask(UInt_t i){fFilterMask = i;}
ea693273 70 virtual void SetRadioFrac(Float_t radiofrac) { fRadioFrac = radiofrac; }
71 virtual void SetMinDist(Float_t minDist) { fMinDist = minDist; }
75bf77e3 72 virtual void SetCentMin(Float_t cent) { fCentMin = cent; }
73 virtual void SetCentMax(Float_t cent) { fCentMax = cent; }
74 virtual void SetNInputTracksMin(Int_t nTr) { fNInputTracksMin = nTr; }
75 virtual void SetNInputTracksMax(Int_t nTr) { fNInputTracksMax = nTr; }
ea693273 76 virtual void SetAngStructCloseTracks(Int_t yesno){fAngStructCloseTracks=yesno;}
da93bb11 77 virtual void SetCheckMethods(Int_t yesno){fCheckMethods=yesno;}
529e2916 78 virtual void SetEventMixing(Int_t yesno){fDoEventMixing=yesno;}
447d2a5b 79 virtual void SetFlagPhiBkg(Int_t yesno){fFlagPhiBkg=yesno;}
80
75bf77e3 81 virtual void SetJetEtaMin(Float_t eta) { fJetEtaMin = eta; }
82 virtual void SetJetEtaMax(Float_t eta) { fJetEtaMax = eta; }
83 virtual void SetJetPtMin(Float_t pt) { fJetPtMin = pt; }
84 virtual void SetJetTriggerExclude(UChar_t i) { fJetTriggerExcludeMask = i; }
85 virtual void SetJetPtFractionMin(Float_t frac) { fJetPtFractionMin = frac; }
86 virtual void SetNMatchJets(Int_t n) { fNMatchJets = n; }
87 virtual void SetFillEvent(Bool_t b) { fbEvent = b; }
88 virtual void SetKeepJets(Bool_t b = kTRUE) { fKeepJets = b; }
529e2916 89 virtual void SetNonStdFile(char* c){fNonStdFile = c;}
75bf77e3 90
91
92private:
93 // ESD/AOD events
94 AliESDEvent *fESD; //! ESD object
5bd732d4 95 AliAODEvent *fAODIn; //! AOD event for AOD input tracks
96 AliAODEvent *fAODOut; //! AOD event
ea693273 97 AliAODExtension *fAODExtension; //! where we take the jets from can be input or output AOD
98 Int_t GetListOfTracks(TList *list);
da93bb11 99 Int_t GetHardestTrackBackToJet(AliAODJet *jet);
ea693273 100 Int_t GetListOfTracksCloseToJet(TList *list,AliAODJet *jet);
75bf77e3 101 // jets to compare
102 TString fJetBranchName[2]; // name of jet branches to compare
103 TList *fListJets[2]; //! jet lists
104
105 TString fBackgroundBranch;
ea693273 106 TString fNonStdFile; // name of delta aod file to catch the extension
75bf77e3 107 // event selection
108 Bool_t fIsPbPb; // is Pb-Pb (fast embedding) or p-p (detector response)
109 AliVEvent::EOfflineTriggerTypes fOfflineTrgMask; // mask of offline triggers to accept
110 Int_t fMinContribVtx; // minimum number of track contributors for primary vertex
111 Float_t fVtxZMin; // lower bound on vertex z
112 Float_t fVtxZMax; // upper bound on vertex z
113 Int_t fEvtClassMin; // lower bound on event class
114 Int_t fEvtClassMax; // upper bound on event class
8b47ec90 115 UInt_t fFilterMask; // filter bit for slecected tracks
ea693273 116 Float_t fRadioFrac; //!size of the concentric cone
117 Float_t fMinDist;
75bf77e3 118 Float_t fCentMin; // lower bound on centrality
119 Float_t fCentMax; // upper bound on centrality
120 Int_t fNInputTracksMin; // lower bound of nb. of input tracks
121 Int_t fNInputTracksMax; // upper bound of nb. of input tracks
ea693273 122 Int_t fAngStructCloseTracks;//only constituents or all tracks with R<0.8 for the angular structure
529e2916 123 Int_t fCheckMethods; //to look into more detail into the core
124 Int_t fDoEventMixing;
447d2a5b 125 Int_t fFlagPhiBkg;
529e2916 126 Float_t fJetEtaMin; // lower bound on eta for found jets
127 Float_t fJetEtaMax; // upper bound on eta for found jets
128 Int_t fNevents; // number of events
129 Int_t fTindex; // index reference
130 Int_t fTrigBufferIndex; //index for the buffering
447d2a5b 131 Int_t fCountAgain; //index for the buffering
529e2916 132 Float_t fJetPtMin; // minimum jet pT
75bf77e3 133 UChar_t fJetTriggerExcludeMask; // mask for jet triggeres to exclude
134 Float_t fJetPtFractionMin; // minimum fraction for positiv match of jets
135 Int_t fNMatchJets; // maximal nb. of jets taken for matching
136 Double_t fMatchMaxDist; // maximal distance of matching jets
137 Bool_t fKeepJets; // keep jets with negative pt after background subtraction
ea693273 138
75bf77e3 139
140 // output objects
141 const Int_t fkNbranches; //! number of branches to be read
142 const Int_t fkEvtClasses; //! number of event classes
143
144 TList *fOutputList; //! output data container
145 Bool_t fbEvent; // fill fhnEvent
146 TH1I *fHistEvtSelection; //! event selection statistic
da93bb11 147 THnSparse *fhnDeltaR; //! variables per jet
529e2916 148 THnSparse *fhnMixedEvents; //!mixed events matrix
149
ea693273 150
568f8fa2 151 TH2F *fh2JetCoreMethod1C10; //Energy fraction in the core C10 method 1
152 TH2F *fh2JetCoreMethod2C10; //Energy fraction in the core C10 method 2
568f8fa2 153 TH2F *fh2JetCoreMethod1C20; //Energy fraction in the core C20 method 1
154 TH2F *fh2JetCoreMethod2C20; //Energy fraction in the core C20 method 2
568f8fa2 155 TH2F *fh2JetCoreMethod1C30; //Energy fraction in the core C30 method 1
156 TH2F *fh2JetCoreMethod2C30; //Energy fraction in the core C30 method 2
568f8fa2 157 TH2F *fh2JetCoreMethod1C60; //Energy fraction in the core C60 method 1
158 TH2F *fh2JetCoreMethod2C60; //Energy fraction in the core C60 method 2
e03c221a 159 TH3F* fh3JetTrackC10; //C10 pt2
160 TH3F* fh3JetTrackC20; //C10 pt2
4e90d948 161 TH2F* fh2AngStructpt1C10; //Average
568f8fa2 162 TH2F* fh2AngStructpt2C10; //C10 pt2
163 TH2F* fh2AngStructpt3C10; //C10 pt3
164 TH2F* fh2AngStructpt4C10; //C10 pt4
165 TH2F* fh2AngStructpt1C20; //C20 pt1
166 TH2F* fh2AngStructpt2C20; //C20 pt2
167 TH2F* fh2AngStructpt3C20; //C20 pt3
168 TH2F* fh2AngStructpt4C20; //C20 pt4
169 TH2F* fh2AngStructpt1C30; //C30 pt1
170 TH2F* fh2AngStructpt2C30; //C30 pt2
171 TH2F* fh2AngStructpt3C30; //C30 pt3
172 TH2F* fh2AngStructpt4C30; //C30 pt4
173 TH2F* fh2AngStructpt1C60; //C60 pt1
174 TH2F* fh2AngStructpt2C60; //C60 pt2
175 TH2F* fh2AngStructpt3C60; //C60 pt3
176 TH2F* fh2AngStructpt4C60; //C60 pt4
ba143e7f 177
178 TH2F* fh2JetsumHT3R2a; //jet shape 02
179 TH2F* fh2JetsumHT3R2ap; //jet shape 02
180 TH2F* fh2JetsumHT3R4a; //jet shape 02
181 TH2F* fh2JetsumHT3R4ap; //jet shape 02
182 TH2F* fh2JetsumHT3R6a; //jet shape 02
183 TH2F* fh2JetsumHT3R6ap; //jet shape 02
184 TH2F* fh2JetsumHT3R8a; //jet shape 02
185 TH2F* fh2JetsumHT3R8ap; //jet shape 02
186 TH2F* fh2JetsumHT3R10a; //jet shape 12
187 TH2F* fh2JetsumHT3R10ap; //jet shape 12
188 TH2F* fh2JetsumHT3R2aa; //jet shape 02
189 TH2F* fh2JetsumHT3R2aap; //jet shape 02
190 TH2F* fh2JetsumHT3R4aa; //jet shape 02
191 TH2F* fh2JetsumHT3R4aap; //jet shape 02
192 TH2F* fh2JetsumHT3R6aa; //jet shape 02
193 TH2F* fh2JetsumHT3R6aap; //jet shape 02
194 TH2F* fh2JetsumHT3R8aa; //jet shape 02
195 TH2F* fh2JetsumHT3R8aap; //jet shape 02
196 TH2F* fh2JetsumHT3R10aa; //jet shape 12
197 TH2F* fh2JetsumHT3R10aap; //jet shape 12
198 TH2F* fh2JetsumHT3R2aaa; //jet shape 02
199 TH2F* fh2JetsumHT3R2aaap; //jet shape 02
200 TH2F* fh2JetsumHT3R4aaa; //jet shape 02
201 TH2F* fh2JetsumHT3R4aaap; //jet shape 02
202 TH2F* fh2JetsumHT3R6aaa; //jet shape 02
203 TH2F* fh2JetsumHT3R6aaap; //jet shape 02
204 TH2F* fh2JetsumHT3R8aaa; //jet shape 02
205 TH2F* fh2JetsumHT3R8aaap; //jet shape 02
206 TH2F* fh2JetsumHT3R10aaa; //jet shape 12
207 TH2F* fh2JetsumHT3R10aaap; //jet shape 12
208 TH2F* fh2JetsumHT3R2b; //jet shape 02
209 TH2F* fh2JetsumHT3R2bp; //jet shape 02
210 TH2F* fh2JetsumHT3R4b; //jet shape 02
211 TH2F* fh2JetsumHT3R4bp; //jet shape 02
212 TH2F* fh2JetsumHT3R6b; //jet shape 02
213 TH2F* fh2JetsumHT3R6bp; //jet shape 02
214 TH2F* fh2JetsumHT3R8b; //jet shape 02
215 TH2F* fh2JetsumHT3R8bp; //jet shape 02
216 TH2F* fh2JetsumHT3R10b; //jet shape 12
217 TH2F* fh2JetsumHT3R10bp; //jet shape 12
218 TH2F* fh2JetsumHT3R2bb; //jet shape 02
219 TH2F* fh2JetsumHT3R2bbp; //jet shape 02
220 TH2F* fh2JetsumHT3R4bb; //jet shape 02
221 TH2F* fh2JetsumHT3R4bbp; //jet shape 02
222 TH2F* fh2JetsumHT3R6bb; //jet shape 02
223 TH2F* fh2JetsumHT3R6bbp; //jet shape 02
224 TH2F* fh2JetsumHT3R8bb; //jet shape 02
225 TH2F* fh2JetsumHT3R8bbp; //jet shape 02
226 TH2F* fh2JetsumHT3R10bb; //jet shape 12
227 TH2F* fh2JetsumHT3R10bbp; //jet shape 12
228 TH2F* fh2JetsumHT3R2bbb; //jet shape 02
229 TH2F* fh2JetsumHT3R2bbbp; //jet shape 02
230 TH2F* fh2JetsumHT3R4bbb; //jet shape 02
231 TH2F* fh2JetsumHT3R4bbbp; //jet shape 02
232 TH2F* fh2JetsumHT3R6bbb; //jet shape 02
233 TH2F* fh2JetsumHT3R6bbbp; //jet shape 02
234 TH2F* fh2JetsumHT3R8bbb; //jet shape 02
235 TH2F* fh2JetsumHT3R8bbbp; //jet shape 02
236 TH2F* fh2JetsumHT3R10bbb; //jet shape 12
237 TH2F* fh2JetsumHT3R10bbbp; //jet shape 12
238
5bd732d4 239
8205e054 240 TH2F* fh2Ntriggers;
241 TH2F* fh2JetDensity;
242 TH2F* fh2JetDensityA4;
3353f803 243 TH3F* fh3spectriggeredC10; //triggered spectra
244 TH3F* fh3spectriggeredC20; //triggered spectra
245 TH3F* fh3spectriggeredC3060; //triggered spectra
da93bb11 246 TH3F* fh3specbiased; //biased spectra
20dcc500 247 TH3F* fh3spectot; //the two combined
248 TH3F* fh3spectotb; //the two combined
249
529e2916 250 Double_t fTrigBuffer[10][7]; //!buffer for triggers
75bf77e3 251
252 AliAnalysisTaskJetCore(const AliAnalysisTaskJetCore&); // not implemented
253 AliAnalysisTaskJetCore& operator=(const AliAnalysisTaskJetCore&); // not implemented
254
255 ClassDef(AliAnalysisTaskJetCore, 4);
256};
257
258#endif
259