1 #ifndef ALIANALYSISTASKJETCLUSTER_H
2 #define ALIANALYSISTASKJETCLUSTER_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 // **************************************
8 // task used for comapring different jets D parmaters from fastjet
9 // *******************************************
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"
22 class AliAODExtension;
24 class AliGenPythiaEventHeader;
26 class AliAODJetEventBackground;
38 class AliAnalysisTaskJetCluster : public AliAnalysisTaskSE
41 AliAnalysisTaskJetCluster();
42 AliAnalysisTaskJetCluster(const char* name);
43 virtual ~AliAnalysisTaskJetCluster();
44 // Implementation of interface methods
45 virtual void UserCreateOutputObjects();
47 virtual void LocalInit() { Init(); }
48 virtual void UserExec(Option_t *option);
49 virtual void Terminate(Option_t *option);
50 virtual Bool_t Notify();
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;}
60 virtual void SetTrackPtCut(Float_t x){fTrackPtCut = x;}
61 virtual void SetFilterMask(UInt_t i){fFilterMask = i;}
63 virtual void SetNSkipLeadingRan(Int_t x){fNSkipLeadingRan = x;}
64 virtual void SetNRandomCones(Int_t x){fNRandomCones = x;}
66 virtual void SetJetOutputBranch(const char *c){fNonStdBranch = c;}
67 virtual void SetJetOutputFile(const char *c){fNonStdFile = c;}
68 virtual void SetJetOutputMinPt(Float_t x){fJetOutputMinPt = x;}
69 virtual void SetBackgroundCalc(Bool_t b){fUseBackgroundCalc = b;}
72 fastjet::JetAlgorithm GetAlgorithm() const {return fAlgorithm;}
73 fastjet::Strategy GetStrategy() const {return fStrategy;}
74 fastjet::RecombinationScheme GetRecombScheme() const {return fRecombScheme;}
75 fastjet::AreaType GetAreaType() const {return fAreaType;}
77 void SetRparam(Double_t f) {fRparam = f;}
78 void SetAlgorithm(fastjet::JetAlgorithm f) {fAlgorithm = f;}
79 void SetStrategy(fastjet::Strategy f) {fStrategy = f;}
80 void SetRecombScheme(fastjet::RecombinationScheme f) {fRecombScheme = f;}
81 void SetAreaType(fastjet::AreaType f) {fAreaType = f;}
82 void SetGhostArea(Double_t f) {fGhostArea = f;}
83 void SetActiveAreaRepeats(Int_t f) {fActiveAreaRepeats = f;}
84 void SetGhostEtamax(Double_t f) {fGhostEtamax = f;}
91 // we have different cases
92 // AOD reading -> MC from AOD
93 // ESD reading -> MC from Kinematics
94 // this has to match with our selection of input events
95 enum {kTrackUndef = 0, kTrackAOD, kTrackKineAll,kTrackKineCharged, kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance};
97 enum {kMaxCorrelation = 3};
98 enum {kMaxRadius = 5};
103 AliAnalysisTaskJetCluster(const AliAnalysisTaskJetCluster&);
104 AliAnalysisTaskJetCluster& operator=(const AliAnalysisTaskJetCluster&);
106 Int_t GetListOfTracks(TList *list,Int_t type);
108 AliAODEvent *fAOD; // ! where we take the jets from can be input or output AOD
109 AliAODExtension *fAODExtension; // ! AOD extension in case we write a non-sdt branch to a separate file and the aod is standard
110 TRefArray *fRef; // ! trefarray for track references within the jet
111 Bool_t fUseAODTrackInput; // take track from input AOD not from ouptu AOD
112 Bool_t fUseAODMCInput; // take MC from input AOD not from ouptu AOD
113 Bool_t fUseGlobalSelection; // Limit the eta of the generated jets
114 Bool_t fUseBackgroundCalc; // switches on background calculations
115 UInt_t fFilterMask; // filter bit for slecected tracks
116 Int_t fTrackTypeRec; // type of tracks used for FF
117 Int_t fTrackTypeGen; // type of tracks used for FF
118 Int_t fNSkipLeadingRan; // number of leading tracks to be skipped in the randomized event
119 Int_t fNRandomCones; // number of generated random cones
120 Float_t fAvgTrials; // Average nimber of trials
121 Float_t fExternalWeight; // external weight
122 Float_t fRecEtaWindow; // eta window used for corraltion plots between rec and gen
123 Float_t fTrackPtCut; // minimum track pt to be accepted
124 Float_t fJetOutputMinPt; // minimum p_t for jets to be written out
126 // output configurartion
127 TString fNonStdBranch; // the name of the non-std branch name, if empty no branch is filled
128 TString fNonStdFile; // The optional name of the output file the non-std brnach is written to
133 fastjet::JetAlgorithm fAlgorithm; //fastjet::kt_algorithm
134 fastjet::Strategy fStrategy; //= fastjet::Best;
135 fastjet::RecombinationScheme fRecombScheme; // = fastjet::BIpt_scheme;
136 fastjet::AreaType fAreaType;
138 Int_t fActiveAreaRepeats;
139 Double_t fGhostEtamax;
140 TRandom3* fRandom; //! random number generator
141 TProfile* fh1Xsec; //! pythia cross section and trials
142 TH1F* fh1Trials; //! trials are added
143 TH1F* fh1PtHard; //! Pt har of the event...
144 TH1F* fh1PtHardNoW; //! Pt har of the event without weigt
145 TH1F* fh1PtHardTrials; //! Number of trials
147 TH1F* fh1NJetsRec; //! number of reconstructed jets
148 TH1F* fh1NConstRec;//! number of constiutens in leading jet
149 TH1F* fh1NConstLeadingRec;//! number of constiutens in leading jet
150 TH1F* fh1PtJetsRecIn; //! Jet pt for all jets
151 TH1F* fh1PtJetsLeadingRecIn; //! Jet pt for all jets
152 TH1F* fh1PtJetConstRec;//! pt of constituents
153 TH1F* fh1PtJetConstLeadingRec;// pt of constituents
154 TH1F* fh1PtTracksRecIn; //! track pt for all tracks
155 TH1F* fh1PtTracksLeadingRecIn; //! track pt for all tracks
157 // Randomized track histos
158 TH1F* fh1NJetsRecRan; //! number of reconstructed jets from randomized
159 TH1F* fh1NConstRecRan;//! number of constiutens in leading jet
160 TH1F* fh1PtJetsLeadingRecInRan; //! Jet pt for all jets
161 TH1F* fh1NConstLeadingRecRan;//! number of constiutens in leading jet
162 TH1F* fh1PtJetsRecInRan; //! Jet pt for all jets
164 TH1F* fh1PtTracksGenIn; //! track pt for all tracks
165 TH1F* fh1Nch; //! charged particle mult
166 TH1F* fh1BiARandomCones[3]; //! Residual distribtion from reandom cones on real event
167 TH1F* fh1BiARandomConesRan[3]; //! Residual distribtion from reandom cones on random event
170 TH2F* fh2NRecJetsPt; //! Number of found jets above threshold
171 TH2F* fh2NRecTracksPt; //! Number of found tracks above threshold
172 TH2F* fh2NConstPt; //! number of constituents vs. pt
173 TH2F* fh2NConstLeadingPt; //! number of constituents vs. pt
174 TH2F* fh2JetPhiEta; //! jet phi eta
175 TH2F* fh2LeadingJetPhiEta; //! leading jet phi eta
176 TH2F* fh2JetEtaPt; //! leading jet eta
177 TH2F* fh2LeadingJetEtaPt; //! leading jet eta
178 TH2F* fh2TrackEtaPt; //! track eta
179 TH2F* fh2LeadingTrackEtaPt; //! leading track eta
180 TH2F* fh2JetsLeadingPhiEta; //! jet phi eta
181 TH2F* fh2JetsLeadingPhiPt; //! jet correlation with leading jet
182 TH2F* fh2TracksLeadingPhiEta; //! track correlation with leading track
183 TH2F* fh2TracksLeadingPhiPt; //! track correlation with leading track
184 TH2F* fh2TracksLeadingJetPhiPt; //! track correlation with leading Jet
185 TH2F* fh2JetsLeadingPhiPtW; //! jet correlation with leading jet
186 TH2F* fh2TracksLeadingPhiPtW; //! track correlation with leading track
187 TH2F* fh2TracksLeadingJetPhiPtW; //! track correlation with leading Jet
188 TH2F* fh2NRecJetsPtRan; //! Number of found jets above threshold
189 TH2F* fh2NConstPtRan; //! number of constituents vs. pt
190 TH2F* fh2NConstLeadingPtRan; //! number of constituents vs. pt
191 TH2F* fh2PtNch; //! p_T of cluster vs. multiplicity,
192 TH2F* fh2PtNchRan; //! p_T of cluster vs. multiplicity,random
193 TH2F* fh2PtNchN; //! p_T of cluster vs. multiplicity, weigthed with constituents
194 TH2F* fh2PtNchNRan; //! p_T of cluster vs. multiplicity, weigthed with constituents random
195 TH2F* fh2TracksLeadingJetPhiPtRan; //! track correlation with leading Jet
196 TH2F* fh2TracksLeadingJetPhiPtWRan; //! track correlation with leading Jet
198 TList *fHistList; //!leading tracks to be skipped in the randomized event Output list
201 ClassDef(AliAnalysisTaskJetCluster, 8)