]> git.uio.no Git - u/mrichter/AliRoot.git/blame - JETAN/AliAnalysisTaskJetCluster.h
First implementation of EMCAL trigger QA from Nicola Arbor
[u/mrichter/AliRoot.git] / JETAN / AliAnalysisTaskJetCluster.h
CommitLineData
dbf053f0 1#ifndef ALIANALYSISTASKJETCLUSTER_H
2#define ALIANALYSISTASKJETCLUSTER_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7// **************************************
f840d64c 8// task used for comparing different jets D parmaters from fastjet
dbf053f0 9// *******************************************
10
11#include "AliAnalysisTaskSE.h"
12#include "THnSparse.h" // cannot forward declare ThnSparseF
13#include "fastjet/ClusterSequenceArea.hh"
14#include "fastjet/AreaDefinition.hh"
15#include "fastjet/JetDefinition.hh"
16#include "fastjet/PseudoJet.hh"
17
18////////////////
19class AliJetHeader;
20class AliESDEvent;
21class AliAODEvent;
54424110 22class AliAODExtension;
dbf053f0 23class AliAODJet;
24class AliGenPythiaEventHeader;
25class AliCFManager;
d6e66a82 26class AliAODJetEventBackground;
27class AliJetFinder;
dbf053f0 28class TList;
29class TChain;
30class TH2F;
31class TH1F;
32class TH3F;
33class TProfile;
d7ca0e14 34class TRandom3;
54424110 35class TRefArray;
8f85b773 36class TClonesArray;
dbf053f0 37
38class AliAnalysisTaskJetCluster : public AliAnalysisTaskSE
39{
40 public:
41 AliAnalysisTaskJetCluster();
42 AliAnalysisTaskJetCluster(const char* name);
54424110 43 virtual ~AliAnalysisTaskJetCluster();
dbf053f0 44 // Implementation of interface methods
45 virtual void UserCreateOutputObjects();
46 virtual void Init();
47 virtual void LocalInit() { Init(); }
48 virtual void UserExec(Option_t *option);
49 virtual void Terminate(Option_t *option);
50 virtual Bool_t Notify();
51
d6e66a82 52
53
dbf053f0 54 virtual void SetAODTrackInput(Bool_t b){fUseAODTrackInput = b;}
55 virtual void SetAODMCInput(Bool_t b){fUseAODMCInput = b;}
ca6d12f9 56 virtual void SetEventSelection(Bool_t b){fEventSelection = b;}
dbf053f0 57 virtual void SetRecEtaWindow(Float_t f){fRecEtaWindow = f;}
8a320ab9 58 virtual void SetTrackEtaWindow(Float_t f){fTrackEtaWindow = f;}
dbf053f0 59 virtual void SetTrackTypeGen(Int_t i){fTrackTypeGen = i;}
60 virtual void SetTrackTypeRec(Int_t i){fTrackTypeRec = i;}
54424110 61 virtual void SetTrackPtCut(Float_t x){fTrackPtCut = x;}
aae7993b 62 virtual void SetCentralityCut(Float_t xLo,Float_t xUp){fCentCutLo = xLo; fCentCutUp = xUp;}
b2c1e955 63 virtual void SetFilterMask(UInt_t i,Int_t iType = 0){fFilterMask = i;
64 fFilterType = iType;}
bea24d2d 65 virtual void SetJetTypes(UInt_t i){fJetTypes = i;}
0341d0d8 66 virtual void SetJetTriggerPtCut(Float_t x){fJetTriggerPtCut = x;}
ca6d12f9 67 virtual void SetVtxCuts(Float_t z,Float_t r = 1){fVtxZCut = z; fVtxR2Cut = r *r;}
b5b166c5 68 virtual void SetBackgroundBranch(const char* c){fBackgroundBranch = c;}
69 virtual const char* GetBackgroundBranch(){return fBackgroundBranch.Data();}
bd80a748 70 virtual void SetNSkipLeadingRan(Int_t x){fNSkipLeadingRan = x;}
af399bc2 71 virtual void SetNSkipLeadingCone(Int_t x){fNSkipLeadingCone = x;}
d7ca0e14 72 virtual void SetNRandomCones(Int_t x){fNRandomCones = x;}
bd80a748 73
54424110 74 virtual void SetJetOutputBranch(const char *c){fNonStdBranch = c;}
b5b166c5 75 virtual const char* GetJetOutputBranch(){return fNonStdBranch.Data();}
54424110 76 virtual void SetJetOutputFile(const char *c){fNonStdFile = c;}
b5b166c5 77 virtual const char* GetJetOutputFile(){return fNonStdFile.Data();}
65c43de8 78 virtual void SetMaxTrackPtInJet(Float_t x){fMaxTrackPtInJet = x;}
54424110 79 virtual void SetJetOutputMinPt(Float_t x){fJetOutputMinPt = x;}
21ead515 80 virtual void SetBackgroundCalc(Bool_t b){fUseBackgroundCalc = b;}
54424110 81
65c43de8 82
83
dbf053f0 84 // for Fast Jet
85 fastjet::JetAlgorithm GetAlgorithm() const {return fAlgorithm;}
86 fastjet::Strategy GetStrategy() const {return fStrategy;}
87 fastjet::RecombinationScheme GetRecombScheme() const {return fRecombScheme;}
88 fastjet::AreaType GetAreaType() const {return fAreaType;}
89 // Setters
90 void SetRparam(Double_t f) {fRparam = f;}
91 void SetAlgorithm(fastjet::JetAlgorithm f) {fAlgorithm = f;}
92 void SetStrategy(fastjet::Strategy f) {fStrategy = f;}
93 void SetRecombScheme(fastjet::RecombinationScheme f) {fRecombScheme = f;}
94 void SetAreaType(fastjet::AreaType f) {fAreaType = f;}
d6e66a82 95 void SetGhostArea(Double_t f) {fGhostArea = f;}
96 void SetActiveAreaRepeats(Int_t f) {fActiveAreaRepeats = f;}
97 void SetGhostEtamax(Double_t f) {fGhostEtamax = f;}
98
99
dbf053f0 100
101 // Helper
102 //
103
104 // we have different cases
105 // AOD reading -> MC from AOD
106 // ESD reading -> MC from Kinematics
107 // this has to match with our selection of input events
f840d64c 108 enum {kTrackUndef = 0, kTrackAOD, kTrackKineAll,kTrackKineCharged, kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance, kTrackAODextra, kTrackAODextraonly};
dbf053f0 109 enum {kMaxJets = 4};
110 enum {kMaxCorrelation = 3};
111 enum {kMaxRadius = 5};
aae7993b 112 enum {kMaxCent = 4};
bea24d2d 113 enum {kJet = 1<<0,
114 kJetRan = 1<<1,
115 kRC = 1<<2,
116 kRCRan = 1<<3
117 };
dbf053f0 118
119
120 private:
121
122 AliAnalysisTaskJetCluster(const AliAnalysisTaskJetCluster&);
123 AliAnalysisTaskJetCluster& operator=(const AliAnalysisTaskJetCluster&);
124
125 Int_t GetListOfTracks(TList *list,Int_t type);
126
54424110 127 AliAODEvent *fAOD; // ! where we take the jets from can be input or output AOD
128 AliAODExtension *fAODExtension; // ! AOD extension in case we write a non-sdt branch to a separate file and the aod is standard
129 TRefArray *fRef; // ! trefarray for track references within the jet
dbf053f0 130 Bool_t fUseAODTrackInput; // take track from input AOD not from ouptu AOD
131 Bool_t fUseAODMCInput; // take MC from input AOD not from ouptu AOD
21ead515 132 Bool_t fUseBackgroundCalc; // switches on background calculations
ca6d12f9 133 Bool_t fEventSelection; // use the event selection of this task, otherwise analyse all
54424110 134 UInt_t fFilterMask; // filter bit for slecected tracks
b2c1e955 135 UInt_t fFilterType; // filter type 0 = all, 1 = ITSTPC, 2 = TPC
bea24d2d 136 UInt_t fJetTypes; // 1<<0 regular jets, 1<<1 << randomized event 1<<2 random cones 1<<3 random cones randomiuzed evetn
dbf053f0 137 Int_t fTrackTypeRec; // type of tracks used for FF
138 Int_t fTrackTypeGen; // type of tracks used for FF
af399bc2 139 Int_t fNSkipLeadingRan; // number of leading tracks to be skipped in the randomized event
140 Int_t fNSkipLeadingCone; // number of leading jets to be for the random cones
d7ca0e14 141 Int_t fNRandomCones; // number of generated random cones
dbf053f0 142 Float_t fAvgTrials; // Average nimber of trials
143 Float_t fExternalWeight; // external weight
ca6d12f9 144 Float_t fTrackEtaWindow; // eta window used for corraltion plots between rec and gen
dbf053f0 145 Float_t fRecEtaWindow; // eta window used for corraltion plots between rec and gen
54424110 146 Float_t fTrackPtCut; // minimum track pt to be accepted
147 Float_t fJetOutputMinPt; // minimum p_t for jets to be written out
65c43de8 148 Float_t fMaxTrackPtInJet; // maximum track pt within a jet for flagging...
0341d0d8 149 Float_t fJetTriggerPtCut; // minimum jwt pT for AOD to be written
ca6d12f9 150 Float_t fVtxZCut; // zvtx cut
151 Float_t fVtxR2Cut; // R vtx cut (squared)
aae7993b 152 Float_t fCentCutUp; // upper limit on centrality
153 Float_t fCentCutLo; // lower limit on centrality
54424110 154 // output configurartion
155 TString fNonStdBranch; // the name of the non-std branch name, if empty no branch is filled
0341d0d8 156 TString fBackgroundBranch; // name of the branch used for background subtraction
54424110 157 TString fNonStdFile; // The optional name of the output file the non-std brnach is written to
158
159
dbf053f0 160 // Fast jet
161 Double_t fRparam;
162 fastjet::JetAlgorithm fAlgorithm; //fastjet::kt_algorithm
163 fastjet::Strategy fStrategy; //= fastjet::Best;
164 fastjet::RecombinationScheme fRecombScheme; // = fastjet::BIpt_scheme;
165 fastjet::AreaType fAreaType;
d6e66a82 166 Double_t fGhostArea;
167 Int_t fActiveAreaRepeats;
168 Double_t fGhostEtamax;
8f85b773 169
170 TClonesArray *fTCAJetsOut; //! TCA of output jets
171 TClonesArray *fTCAJetsOutRan; //! TCA of output jets in randomized event
172 TClonesArray *fTCARandomConesOut; //! TCA of output jets in randomized event
173 TClonesArray *fTCARandomConesOutRan; //! TCA of output jets in randomized event
174 AliAODJetEventBackground *fAODJetBackgroundOut; //! jet background to be written out
175
d7ca0e14 176 TRandom3* fRandom; //! random number generator
d6e66a82 177 TProfile* fh1Xsec; //! pythia cross section and trials
178 TH1F* fh1Trials; //! trials are added
179 TH1F* fh1PtHard; //! Pt har of the event...
180 TH1F* fh1PtHardNoW; //! Pt har of the event without weigt
181 TH1F* fh1PtHardTrials; //! Number of trials
182
183 TH1F* fh1NJetsRec; //! number of reconstructed jets
184 TH1F* fh1NConstRec;//! number of constiutens in leading jet
185 TH1F* fh1NConstLeadingRec;//! number of constiutens in leading jet
186 TH1F* fh1PtJetsRecIn; //! Jet pt for all jets
187 TH1F* fh1PtJetsLeadingRecIn; //! Jet pt for all jets
188 TH1F* fh1PtJetConstRec;//! pt of constituents
dbf053f0 189 TH1F* fh1PtJetConstLeadingRec;// pt of constituents
d6e66a82 190 TH1F* fh1PtTracksRecIn; //! track pt for all tracks
191 TH1F* fh1PtTracksLeadingRecIn; //! track pt for all tracks
dbf053f0 192
193 // Randomized track histos
d6e66a82 194 TH1F* fh1NJetsRecRan; //! number of reconstructed jets from randomized
195 TH1F* fh1NConstRecRan;//! number of constiutens in leading jet
196 TH1F* fh1PtJetsLeadingRecInRan; //! Jet pt for all jets
197 TH1F* fh1NConstLeadingRecRan;//! number of constiutens in leading jet
198 TH1F* fh1PtJetsRecInRan; //! Jet pt for all jets
199
200 TH1F* fh1PtTracksGenIn; //! track pt for all tracks
201 TH1F* fh1Nch; //! charged particle mult
82a35b1a 202 TH1F* fh1BiARandomCones[3]; //! Residual distribtion from reandom cones on real event
203 TH1F* fh1BiARandomConesRan[3]; //! Residual distribtion from reandom cones on random event
aae7993b 204 TH1F* fh1CentralityPhySel; // ! centrality of anaylsed events
e2ca7519 205 TH1F* fh1Centrality; // ! centrality of anaylsed events
aae7993b 206 TH1F* fh1CentralitySelect; // ! centrality of selected events
e2ca7519 207 TH1F* fh1ZPhySel; // ! centrality of anaylsed events
208 TH1F* fh1Z; // ! centrality of anaylsed events
209 TH1F* fh1ZSelect; // ! centrality of selected events
210
d6e66a82 211
212 TH2F* fh2NRecJetsPt; //! Number of found jets above threshold
213 TH2F* fh2NRecTracksPt; //! Number of found tracks above threshold
214 TH2F* fh2NConstPt; //! number of constituents vs. pt
215 TH2F* fh2NConstLeadingPt; //! number of constituents vs. pt
216 TH2F* fh2JetPhiEta; //! jet phi eta
217 TH2F* fh2LeadingJetPhiEta; //! leading jet phi eta
218 TH2F* fh2JetEtaPt; //! leading jet eta
219 TH2F* fh2LeadingJetEtaPt; //! leading jet eta
220 TH2F* fh2TrackEtaPt; //! track eta
221 TH2F* fh2LeadingTrackEtaPt; //! leading track eta
222 TH2F* fh2JetsLeadingPhiEta; //! jet phi eta
223 TH2F* fh2JetsLeadingPhiPt; //! jet correlation with leading jet
224 TH2F* fh2TracksLeadingPhiEta; //! track correlation with leading track
225 TH2F* fh2TracksLeadingPhiPt; //! track correlation with leading track
226 TH2F* fh2TracksLeadingJetPhiPt; //! track correlation with leading Jet
227 TH2F* fh2JetsLeadingPhiPtW; //! jet correlation with leading jet
228 TH2F* fh2TracksLeadingPhiPtW; //! track correlation with leading track
229 TH2F* fh2TracksLeadingJetPhiPtW; //! track correlation with leading Jet
230 TH2F* fh2NRecJetsPtRan; //! Number of found jets above threshold
231 TH2F* fh2NConstPtRan; //! number of constituents vs. pt
232 TH2F* fh2NConstLeadingPtRan; //! number of constituents vs. pt
233 TH2F* fh2PtNch; //! p_T of cluster vs. multiplicity,
234 TH2F* fh2PtNchRan; //! p_T of cluster vs. multiplicity,random
235 TH2F* fh2PtNchN; //! p_T of cluster vs. multiplicity, weigthed with constituents
236 TH2F* fh2PtNchNRan; //! p_T of cluster vs. multiplicity, weigthed with constituents random
237 TH2F* fh2TracksLeadingJetPhiPtRan; //! track correlation with leading Jet
238 TH2F* fh2TracksLeadingJetPhiPtWRan; //! track correlation with leading Jet
82a35b1a 239
aae7993b 240
241 TH2F* fh2JetsLeadingPhiPtC[kMaxCent]; //! jet correlation with leading jet
242 TH2F* fh2JetsLeadingPhiPtWC[kMaxCent]; //! jet correlation with leading jet
243 TH2F* fh2TracksLeadingJetPhiPtC[kMaxCent]; //! track correlation with leading Jet
244 TH2F* fh2TracksLeadingJetPhiPtWC[kMaxCent]; //! track correlation with leading Jet
245
d7ca0e14 246 TList *fHistList; //!leading tracks to be skipped in the randomized event Output list
dbf053f0 247
248
bea24d2d 249 ClassDef(AliAnalysisTaskJetCluster, 20)
dbf053f0 250};
251
252#endif