Bug fix for case of missing first chamber (Jochen)
[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// **************************************
8// task used for comapring different jets D parmaters from fastjet
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;
dbf053f0 36
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 SetUseGlobalSelection(Bool_t b){fUseGlobalSelection = b;}
55 virtual void SetAODTrackInput(Bool_t b){fUseAODTrackInput = b;}
56 virtual void SetAODMCInput(Bool_t b){fUseAODMCInput = b;}
57 virtual void SetRecEtaWindow(Float_t f){fRecEtaWindow = f;}
58 virtual void SetTrackTypeGen(Int_t i){fTrackTypeGen = i;}
59 virtual void SetTrackTypeRec(Int_t i){fTrackTypeRec = i;}
54424110 60 virtual void SetTrackPtCut(Float_t x){fTrackPtCut = x;}
dbf053f0 61 virtual void SetFilterMask(UInt_t i){fFilterMask = i;}
0341d0d8 62 virtual void SetJetTriggerPtCut(Float_t x){fJetTriggerPtCut = x;}
63 virtual void SetBackgroundBranch(const char* c){fBackgroundBranch = c;}
64
bd80a748 65 virtual void SetNSkipLeadingRan(Int_t x){fNSkipLeadingRan = x;}
d7ca0e14 66 virtual void SetNRandomCones(Int_t x){fNRandomCones = x;}
bd80a748 67
54424110 68 virtual void SetJetOutputBranch(const char *c){fNonStdBranch = c;}
69 virtual void SetJetOutputFile(const char *c){fNonStdFile = c;}
70 virtual void SetJetOutputMinPt(Float_t x){fJetOutputMinPt = x;}
21ead515 71 virtual void SetBackgroundCalc(Bool_t b){fUseBackgroundCalc = b;}
54424110 72
dbf053f0 73 // for Fast Jet
74 fastjet::JetAlgorithm GetAlgorithm() const {return fAlgorithm;}
75 fastjet::Strategy GetStrategy() const {return fStrategy;}
76 fastjet::RecombinationScheme GetRecombScheme() const {return fRecombScheme;}
77 fastjet::AreaType GetAreaType() const {return fAreaType;}
78 // Setters
79 void SetRparam(Double_t f) {fRparam = f;}
80 void SetAlgorithm(fastjet::JetAlgorithm f) {fAlgorithm = f;}
81 void SetStrategy(fastjet::Strategy f) {fStrategy = f;}
82 void SetRecombScheme(fastjet::RecombinationScheme f) {fRecombScheme = f;}
83 void SetAreaType(fastjet::AreaType f) {fAreaType = f;}
d6e66a82 84 void SetGhostArea(Double_t f) {fGhostArea = f;}
85 void SetActiveAreaRepeats(Int_t f) {fActiveAreaRepeats = f;}
86 void SetGhostEtamax(Double_t f) {fGhostEtamax = f;}
87
88
dbf053f0 89
90 // Helper
91 //
92
93 // we have different cases
94 // AOD reading -> MC from AOD
95 // ESD reading -> MC from Kinematics
96 // this has to match with our selection of input events
97 enum {kTrackUndef = 0, kTrackAOD, kTrackKineAll,kTrackKineCharged, kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance};
98 enum {kMaxJets = 4};
99 enum {kMaxCorrelation = 3};
100 enum {kMaxRadius = 5};
101
102
103 private:
104
105 AliAnalysisTaskJetCluster(const AliAnalysisTaskJetCluster&);
106 AliAnalysisTaskJetCluster& operator=(const AliAnalysisTaskJetCluster&);
107
108 Int_t GetListOfTracks(TList *list,Int_t type);
109
54424110 110 AliAODEvent *fAOD; // ! where we take the jets from can be input or output AOD
111 AliAODExtension *fAODExtension; // ! AOD extension in case we write a non-sdt branch to a separate file and the aod is standard
112 TRefArray *fRef; // ! trefarray for track references within the jet
dbf053f0 113 Bool_t fUseAODTrackInput; // take track from input AOD not from ouptu AOD
114 Bool_t fUseAODMCInput; // take MC from input AOD not from ouptu AOD
115 Bool_t fUseGlobalSelection; // Limit the eta of the generated jets
21ead515 116 Bool_t fUseBackgroundCalc; // switches on background calculations
54424110 117 UInt_t fFilterMask; // filter bit for slecected tracks
dbf053f0 118 Int_t fTrackTypeRec; // type of tracks used for FF
119 Int_t fTrackTypeGen; // type of tracks used for FF
bd80a748 120 Int_t fNSkipLeadingRan; // number of leading tracks to be skipped in the randomized event
d7ca0e14 121 Int_t fNRandomCones; // number of generated random cones
dbf053f0 122 Float_t fAvgTrials; // Average nimber of trials
123 Float_t fExternalWeight; // external weight
124 Float_t fRecEtaWindow; // eta window used for corraltion plots between rec and gen
54424110 125 Float_t fTrackPtCut; // minimum track pt to be accepted
126 Float_t fJetOutputMinPt; // minimum p_t for jets to be written out
0341d0d8 127 Float_t fJetTriggerPtCut; // minimum jwt pT for AOD to be written
54424110 128 // output configurartion
129 TString fNonStdBranch; // the name of the non-std branch name, if empty no branch is filled
0341d0d8 130 TString fBackgroundBranch; // name of the branch used for background subtraction
54424110 131 TString fNonStdFile; // The optional name of the output file the non-std brnach is written to
132
133
dbf053f0 134 // Fast jet
135 Double_t fRparam;
136 fastjet::JetAlgorithm fAlgorithm; //fastjet::kt_algorithm
137 fastjet::Strategy fStrategy; //= fastjet::Best;
138 fastjet::RecombinationScheme fRecombScheme; // = fastjet::BIpt_scheme;
139 fastjet::AreaType fAreaType;
d6e66a82 140 Double_t fGhostArea;
141 Int_t fActiveAreaRepeats;
142 Double_t fGhostEtamax;
d7ca0e14 143 TRandom3* fRandom; //! random number generator
d6e66a82 144 TProfile* fh1Xsec; //! pythia cross section and trials
145 TH1F* fh1Trials; //! trials are added
146 TH1F* fh1PtHard; //! Pt har of the event...
147 TH1F* fh1PtHardNoW; //! Pt har of the event without weigt
148 TH1F* fh1PtHardTrials; //! Number of trials
149
150 TH1F* fh1NJetsRec; //! number of reconstructed jets
151 TH1F* fh1NConstRec;//! number of constiutens in leading jet
152 TH1F* fh1NConstLeadingRec;//! number of constiutens in leading jet
153 TH1F* fh1PtJetsRecIn; //! Jet pt for all jets
154 TH1F* fh1PtJetsLeadingRecIn; //! Jet pt for all jets
155 TH1F* fh1PtJetConstRec;//! pt of constituents
dbf053f0 156 TH1F* fh1PtJetConstLeadingRec;// pt of constituents
d6e66a82 157 TH1F* fh1PtTracksRecIn; //! track pt for all tracks
158 TH1F* fh1PtTracksLeadingRecIn; //! track pt for all tracks
dbf053f0 159
160 // Randomized track histos
d6e66a82 161 TH1F* fh1NJetsRecRan; //! number of reconstructed jets from randomized
162 TH1F* fh1NConstRecRan;//! number of constiutens in leading jet
163 TH1F* fh1PtJetsLeadingRecInRan; //! Jet pt for all jets
164 TH1F* fh1NConstLeadingRecRan;//! number of constiutens in leading jet
165 TH1F* fh1PtJetsRecInRan; //! Jet pt for all jets
166
167 TH1F* fh1PtTracksGenIn; //! track pt for all tracks
168 TH1F* fh1Nch; //! charged particle mult
82a35b1a 169 TH1F* fh1BiARandomCones[3]; //! Residual distribtion from reandom cones on real event
170 TH1F* fh1BiARandomConesRan[3]; //! Residual distribtion from reandom cones on random event
0341d0d8 171 TH1F* fh1Centrality; // centrality of anaylsed events
172 TH1F* fh1CentralitySelect; // centrality of selected events
d6e66a82 173
174 TH2F* fh2NRecJetsPt; //! Number of found jets above threshold
175 TH2F* fh2NRecTracksPt; //! Number of found tracks above threshold
176 TH2F* fh2NConstPt; //! number of constituents vs. pt
177 TH2F* fh2NConstLeadingPt; //! number of constituents vs. pt
178 TH2F* fh2JetPhiEta; //! jet phi eta
179 TH2F* fh2LeadingJetPhiEta; //! leading jet phi eta
180 TH2F* fh2JetEtaPt; //! leading jet eta
181 TH2F* fh2LeadingJetEtaPt; //! leading jet eta
182 TH2F* fh2TrackEtaPt; //! track eta
183 TH2F* fh2LeadingTrackEtaPt; //! leading track eta
184 TH2F* fh2JetsLeadingPhiEta; //! jet phi eta
185 TH2F* fh2JetsLeadingPhiPt; //! jet correlation with leading jet
186 TH2F* fh2TracksLeadingPhiEta; //! track correlation with leading track
187 TH2F* fh2TracksLeadingPhiPt; //! track correlation with leading track
188 TH2F* fh2TracksLeadingJetPhiPt; //! track correlation with leading Jet
189 TH2F* fh2JetsLeadingPhiPtW; //! jet correlation with leading jet
190 TH2F* fh2TracksLeadingPhiPtW; //! track correlation with leading track
191 TH2F* fh2TracksLeadingJetPhiPtW; //! track correlation with leading Jet
192 TH2F* fh2NRecJetsPtRan; //! Number of found jets above threshold
193 TH2F* fh2NConstPtRan; //! number of constituents vs. pt
194 TH2F* fh2NConstLeadingPtRan; //! number of constituents vs. pt
195 TH2F* fh2PtNch; //! p_T of cluster vs. multiplicity,
196 TH2F* fh2PtNchRan; //! p_T of cluster vs. multiplicity,random
197 TH2F* fh2PtNchN; //! p_T of cluster vs. multiplicity, weigthed with constituents
198 TH2F* fh2PtNchNRan; //! p_T of cluster vs. multiplicity, weigthed with constituents random
199 TH2F* fh2TracksLeadingJetPhiPtRan; //! track correlation with leading Jet
200 TH2F* fh2TracksLeadingJetPhiPtWRan; //! track correlation with leading Jet
82a35b1a 201
d7ca0e14 202 TList *fHistList; //!leading tracks to be skipped in the randomized event Output list
dbf053f0 203
204
0341d0d8 205 ClassDef(AliAnalysisTaskJetCluster, 9)
dbf053f0 206};
207
208#endif