]> git.uio.no Git - u/mrichter/AliRoot.git/blame - JETAN/AliAnalysisTaskJetCluster.h
error in AliHMPIDCluster.h fixed
[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;}
0341d0d8 65 virtual void SetJetTriggerPtCut(Float_t x){fJetTriggerPtCut = x;}
ca6d12f9 66 virtual void SetVtxCuts(Float_t z,Float_t r = 1){fVtxZCut = z; fVtxR2Cut = r *r;}
b5b166c5 67 virtual void SetBackgroundBranch(const char* c){fBackgroundBranch = c;}
68 virtual const char* GetBackgroundBranch(){return fBackgroundBranch.Data();}
bd80a748 69 virtual void SetNSkipLeadingRan(Int_t x){fNSkipLeadingRan = x;}
af399bc2 70 virtual void SetNSkipLeadingCone(Int_t x){fNSkipLeadingCone = x;}
d7ca0e14 71 virtual void SetNRandomCones(Int_t x){fNRandomCones = x;}
bd80a748 72
54424110 73 virtual void SetJetOutputBranch(const char *c){fNonStdBranch = c;}
b5b166c5 74 virtual const char* GetJetOutputBranch(){return fNonStdBranch.Data();}
54424110 75 virtual void SetJetOutputFile(const char *c){fNonStdFile = c;}
b5b166c5 76 virtual const char* GetJetOutputFile(){return fNonStdFile.Data();}
54424110 77 virtual void SetJetOutputMinPt(Float_t x){fJetOutputMinPt = x;}
21ead515 78 virtual void SetBackgroundCalc(Bool_t b){fUseBackgroundCalc = b;}
54424110 79
dbf053f0 80 // for Fast Jet
81 fastjet::JetAlgorithm GetAlgorithm() const {return fAlgorithm;}
82 fastjet::Strategy GetStrategy() const {return fStrategy;}
83 fastjet::RecombinationScheme GetRecombScheme() const {return fRecombScheme;}
84 fastjet::AreaType GetAreaType() const {return fAreaType;}
85 // Setters
86 void SetRparam(Double_t f) {fRparam = f;}
87 void SetAlgorithm(fastjet::JetAlgorithm f) {fAlgorithm = f;}
88 void SetStrategy(fastjet::Strategy f) {fStrategy = f;}
89 void SetRecombScheme(fastjet::RecombinationScheme f) {fRecombScheme = f;}
90 void SetAreaType(fastjet::AreaType f) {fAreaType = f;}
d6e66a82 91 void SetGhostArea(Double_t f) {fGhostArea = f;}
92 void SetActiveAreaRepeats(Int_t f) {fActiveAreaRepeats = f;}
93 void SetGhostEtamax(Double_t f) {fGhostEtamax = f;}
94
95
dbf053f0 96
97 // Helper
98 //
99
100 // we have different cases
101 // AOD reading -> MC from AOD
102 // ESD reading -> MC from Kinematics
103 // this has to match with our selection of input events
f840d64c 104 enum {kTrackUndef = 0, kTrackAOD, kTrackKineAll,kTrackKineCharged, kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance, kTrackAODextra, kTrackAODextraonly};
dbf053f0 105 enum {kMaxJets = 4};
106 enum {kMaxCorrelation = 3};
107 enum {kMaxRadius = 5};
aae7993b 108 enum {kMaxCent = 4};
dbf053f0 109
110
111 private:
112
113 AliAnalysisTaskJetCluster(const AliAnalysisTaskJetCluster&);
114 AliAnalysisTaskJetCluster& operator=(const AliAnalysisTaskJetCluster&);
115
116 Int_t GetListOfTracks(TList *list,Int_t type);
117
54424110 118 AliAODEvent *fAOD; // ! where we take the jets from can be input or output AOD
119 AliAODExtension *fAODExtension; // ! AOD extension in case we write a non-sdt branch to a separate file and the aod is standard
120 TRefArray *fRef; // ! trefarray for track references within the jet
dbf053f0 121 Bool_t fUseAODTrackInput; // take track from input AOD not from ouptu AOD
122 Bool_t fUseAODMCInput; // take MC from input AOD not from ouptu AOD
21ead515 123 Bool_t fUseBackgroundCalc; // switches on background calculations
ca6d12f9 124 Bool_t fEventSelection; // use the event selection of this task, otherwise analyse all
54424110 125 UInt_t fFilterMask; // filter bit for slecected tracks
b2c1e955 126 UInt_t fFilterType; // filter type 0 = all, 1 = ITSTPC, 2 = TPC
dbf053f0 127 Int_t fTrackTypeRec; // type of tracks used for FF
128 Int_t fTrackTypeGen; // type of tracks used for FF
af399bc2 129 Int_t fNSkipLeadingRan; // number of leading tracks to be skipped in the randomized event
130 Int_t fNSkipLeadingCone; // number of leading jets to be for the random cones
d7ca0e14 131 Int_t fNRandomCones; // number of generated random cones
dbf053f0 132 Float_t fAvgTrials; // Average nimber of trials
133 Float_t fExternalWeight; // external weight
ca6d12f9 134 Float_t fTrackEtaWindow; // eta window used for corraltion plots between rec and gen
dbf053f0 135 Float_t fRecEtaWindow; // eta window used for corraltion plots between rec and gen
54424110 136 Float_t fTrackPtCut; // minimum track pt to be accepted
137 Float_t fJetOutputMinPt; // minimum p_t for jets to be written out
0341d0d8 138 Float_t fJetTriggerPtCut; // minimum jwt pT for AOD to be written
ca6d12f9 139 Float_t fVtxZCut; // zvtx cut
140 Float_t fVtxR2Cut; // R vtx cut (squared)
aae7993b 141 Float_t fCentCutUp; // upper limit on centrality
142 Float_t fCentCutLo; // lower limit on centrality
54424110 143 // output configurartion
144 TString fNonStdBranch; // the name of the non-std branch name, if empty no branch is filled
0341d0d8 145 TString fBackgroundBranch; // name of the branch used for background subtraction
54424110 146 TString fNonStdFile; // The optional name of the output file the non-std brnach is written to
147
148
dbf053f0 149 // Fast jet
150 Double_t fRparam;
151 fastjet::JetAlgorithm fAlgorithm; //fastjet::kt_algorithm
152 fastjet::Strategy fStrategy; //= fastjet::Best;
153 fastjet::RecombinationScheme fRecombScheme; // = fastjet::BIpt_scheme;
154 fastjet::AreaType fAreaType;
d6e66a82 155 Double_t fGhostArea;
156 Int_t fActiveAreaRepeats;
157 Double_t fGhostEtamax;
8f85b773 158
159 TClonesArray *fTCAJetsOut; //! TCA of output jets
160 TClonesArray *fTCAJetsOutRan; //! TCA of output jets in randomized event
161 TClonesArray *fTCARandomConesOut; //! TCA of output jets in randomized event
162 TClonesArray *fTCARandomConesOutRan; //! TCA of output jets in randomized event
163 AliAODJetEventBackground *fAODJetBackgroundOut; //! jet background to be written out
164
d7ca0e14 165 TRandom3* fRandom; //! random number generator
d6e66a82 166 TProfile* fh1Xsec; //! pythia cross section and trials
167 TH1F* fh1Trials; //! trials are added
168 TH1F* fh1PtHard; //! Pt har of the event...
169 TH1F* fh1PtHardNoW; //! Pt har of the event without weigt
170 TH1F* fh1PtHardTrials; //! Number of trials
171
172 TH1F* fh1NJetsRec; //! number of reconstructed jets
173 TH1F* fh1NConstRec;//! number of constiutens in leading jet
174 TH1F* fh1NConstLeadingRec;//! number of constiutens in leading jet
175 TH1F* fh1PtJetsRecIn; //! Jet pt for all jets
176 TH1F* fh1PtJetsLeadingRecIn; //! Jet pt for all jets
177 TH1F* fh1PtJetConstRec;//! pt of constituents
dbf053f0 178 TH1F* fh1PtJetConstLeadingRec;// pt of constituents
d6e66a82 179 TH1F* fh1PtTracksRecIn; //! track pt for all tracks
180 TH1F* fh1PtTracksLeadingRecIn; //! track pt for all tracks
dbf053f0 181
182 // Randomized track histos
d6e66a82 183 TH1F* fh1NJetsRecRan; //! number of reconstructed jets from randomized
184 TH1F* fh1NConstRecRan;//! number of constiutens in leading jet
185 TH1F* fh1PtJetsLeadingRecInRan; //! Jet pt for all jets
186 TH1F* fh1NConstLeadingRecRan;//! number of constiutens in leading jet
187 TH1F* fh1PtJetsRecInRan; //! Jet pt for all jets
188
189 TH1F* fh1PtTracksGenIn; //! track pt for all tracks
190 TH1F* fh1Nch; //! charged particle mult
82a35b1a 191 TH1F* fh1BiARandomCones[3]; //! Residual distribtion from reandom cones on real event
192 TH1F* fh1BiARandomConesRan[3]; //! Residual distribtion from reandom cones on random event
aae7993b 193 TH1F* fh1CentralityPhySel; // ! centrality of anaylsed events
e2ca7519 194 TH1F* fh1Centrality; // ! centrality of anaylsed events
aae7993b 195 TH1F* fh1CentralitySelect; // ! centrality of selected events
e2ca7519 196 TH1F* fh1ZPhySel; // ! centrality of anaylsed events
197 TH1F* fh1Z; // ! centrality of anaylsed events
198 TH1F* fh1ZSelect; // ! centrality of selected events
199
d6e66a82 200
201 TH2F* fh2NRecJetsPt; //! Number of found jets above threshold
202 TH2F* fh2NRecTracksPt; //! Number of found tracks above threshold
203 TH2F* fh2NConstPt; //! number of constituents vs. pt
204 TH2F* fh2NConstLeadingPt; //! number of constituents vs. pt
205 TH2F* fh2JetPhiEta; //! jet phi eta
206 TH2F* fh2LeadingJetPhiEta; //! leading jet phi eta
207 TH2F* fh2JetEtaPt; //! leading jet eta
208 TH2F* fh2LeadingJetEtaPt; //! leading jet eta
209 TH2F* fh2TrackEtaPt; //! track eta
210 TH2F* fh2LeadingTrackEtaPt; //! leading track eta
211 TH2F* fh2JetsLeadingPhiEta; //! jet phi eta
212 TH2F* fh2JetsLeadingPhiPt; //! jet correlation with leading jet
213 TH2F* fh2TracksLeadingPhiEta; //! track correlation with leading track
214 TH2F* fh2TracksLeadingPhiPt; //! track correlation with leading track
215 TH2F* fh2TracksLeadingJetPhiPt; //! track correlation with leading Jet
216 TH2F* fh2JetsLeadingPhiPtW; //! jet correlation with leading jet
217 TH2F* fh2TracksLeadingPhiPtW; //! track correlation with leading track
218 TH2F* fh2TracksLeadingJetPhiPtW; //! track correlation with leading Jet
219 TH2F* fh2NRecJetsPtRan; //! Number of found jets above threshold
220 TH2F* fh2NConstPtRan; //! number of constituents vs. pt
221 TH2F* fh2NConstLeadingPtRan; //! number of constituents vs. pt
222 TH2F* fh2PtNch; //! p_T of cluster vs. multiplicity,
223 TH2F* fh2PtNchRan; //! p_T of cluster vs. multiplicity,random
224 TH2F* fh2PtNchN; //! p_T of cluster vs. multiplicity, weigthed with constituents
225 TH2F* fh2PtNchNRan; //! p_T of cluster vs. multiplicity, weigthed with constituents random
226 TH2F* fh2TracksLeadingJetPhiPtRan; //! track correlation with leading Jet
227 TH2F* fh2TracksLeadingJetPhiPtWRan; //! track correlation with leading Jet
82a35b1a 228
aae7993b 229
230 TH2F* fh2JetsLeadingPhiPtC[kMaxCent]; //! jet correlation with leading jet
231 TH2F* fh2JetsLeadingPhiPtWC[kMaxCent]; //! jet correlation with leading jet
232 TH2F* fh2TracksLeadingJetPhiPtC[kMaxCent]; //! track correlation with leading Jet
233 TH2F* fh2TracksLeadingJetPhiPtWC[kMaxCent]; //! track correlation with leading Jet
234
d7ca0e14 235 TList *fHistList; //!leading tracks to be skipped in the randomized event Output list
dbf053f0 236
237
b2c1e955 238 ClassDef(AliAnalysisTaskJetCluster, 18)
dbf053f0 239};
240
241#endif