Adding task to analyze properties of jet like clusters, using directly the fastjet...
[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;
22class AliAODJet;
23class AliGenPythiaEventHeader;
24class AliCFManager;
25
26class TList;
27class TChain;
28class TH2F;
29class TH1F;
30class TH3F;
31class TProfile;
32
33
34
35class AliAnalysisTaskJetCluster : public AliAnalysisTaskSE
36{
37 public:
38 AliAnalysisTaskJetCluster();
39 AliAnalysisTaskJetCluster(const char* name);
40 virtual ~AliAnalysisTaskJetCluster() {;}
41 // Implementation of interface methods
42 virtual void UserCreateOutputObjects();
43 virtual void Init();
44 virtual void LocalInit() { Init(); }
45 virtual void UserExec(Option_t *option);
46 virtual void Terminate(Option_t *option);
47 virtual Bool_t Notify();
48
49 virtual void SetUseGlobalSelection(Bool_t b){fUseGlobalSelection = b;}
50 virtual void SetAODTrackInput(Bool_t b){fUseAODTrackInput = b;}
51 virtual void SetAODMCInput(Bool_t b){fUseAODMCInput = b;}
52 virtual void SetRecEtaWindow(Float_t f){fRecEtaWindow = f;}
53 virtual void SetTrackTypeGen(Int_t i){fTrackTypeGen = i;}
54 virtual void SetTrackTypeRec(Int_t i){fTrackTypeRec = i;}
55 virtual void SetFilterMask(UInt_t i){fFilterMask = i;}
56 // use for the CF
57
58
59 // for Fast Jet
60 fastjet::JetAlgorithm GetAlgorithm() const {return fAlgorithm;}
61 fastjet::Strategy GetStrategy() const {return fStrategy;}
62 fastjet::RecombinationScheme GetRecombScheme() const {return fRecombScheme;}
63 fastjet::AreaType GetAreaType() const {return fAreaType;}
64 // Setters
65 void SetRparam(Double_t f) {fRparam = f;}
66 void SetAlgorithm(fastjet::JetAlgorithm f) {fAlgorithm = f;}
67 void SetStrategy(fastjet::Strategy f) {fStrategy = f;}
68 void SetRecombScheme(fastjet::RecombinationScheme f) {fRecombScheme = f;}
69 void SetAreaType(fastjet::AreaType f) {fAreaType = f;}
70
71 // Helper
72 //
73
74 // we have different cases
75 // AOD reading -> MC from AOD
76 // ESD reading -> MC from Kinematics
77 // this has to match with our selection of input events
78 enum {kTrackUndef = 0, kTrackAOD, kTrackKineAll,kTrackKineCharged, kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance};
79 enum {kMaxJets = 4};
80 enum {kMaxCorrelation = 3};
81 enum {kMaxRadius = 5};
82
83
84 private:
85
86 AliAnalysisTaskJetCluster(const AliAnalysisTaskJetCluster&);
87 AliAnalysisTaskJetCluster& operator=(const AliAnalysisTaskJetCluster&);
88
89 Int_t GetListOfTracks(TList *list,Int_t type);
90
91 AliAODEvent *fAOD; // where we take the jets from can be input or output AOD
92
93 Bool_t fUseAODTrackInput; // take track from input AOD not from ouptu AOD
94 Bool_t fUseAODMCInput; // take MC from input AOD not from ouptu AOD
95 Bool_t fUseGlobalSelection; // Limit the eta of the generated jets
96 UInt_t fFilterMask; // filter bit for slecected tracks
97 Int_t fTrackTypeRec; // type of tracks used for FF
98 Int_t fTrackTypeGen; // type of tracks used for FF
99 Float_t fAvgTrials; // Average nimber of trials
100 Float_t fExternalWeight; // external weight
101 Float_t fRecEtaWindow; // eta window used for corraltion plots between rec and gen
102 // Fast jet
103 Double_t fRparam;
104 fastjet::JetAlgorithm fAlgorithm; //fastjet::kt_algorithm
105 fastjet::Strategy fStrategy; //= fastjet::Best;
106 fastjet::RecombinationScheme fRecombScheme; // = fastjet::BIpt_scheme;
107 fastjet::AreaType fAreaType;
108
109 TProfile* fh1Xsec; // pythia cross section and trials
110 TH1F* fh1Trials; // trials are added
111 TH1F* fh1PtHard; // Pt har of the event...
112 TH1F* fh1PtHardNoW; // Pt har of the event without weigt
113 TH1F* fh1PtHardTrials; // Number of trials
114
115 TH1F* fh1NJetsRec; // number of reconstructed jets
116 TH1F* fh1NConstRec;// number of constiutens in leading jet
117 TH1F* fh1NConstLeadingRec;// number of constiutens in leading jet
118 TH1F* fh1PtJetsRecIn; // Jet pt for all jets
119 TH1F* fh1PtJetsLeadingRecIn; // Jet pt for all jets
120 TH1F* fh1PtJetConstRec;// pt of constituents
121 TH1F* fh1PtJetConstLeadingRec;// pt of constituents
122 TH1F* fh1PtTracksRecIn; // track pt for all tracks
123 TH1F* fh1PtTracksLeadingRecIn; // track pt for all tracks
124
125 // Randomized track histos
126 TH1F* fh1NJetsRecRan; // number of reconstructed jets from randomized
127 TH1F* fh1NConstRecRan;// number of constiutens in leading jet
128 TH1F* fh1PtJetsLeadingRecInRan; // Jet pt for all jets
129 TH1F* fh1NConstLeadingRecRan;// number of constiutens in leading jet
130 TH1F* fh1PtJetsRecInRan; // Jet pt for all jets
131
132 TH1F* fh1PtTracksGenIn; // track pt for all tracks
133
134
135 TH2F* fh2NRecJetsPt; // Number of found jets above threshold
136 TH2F* fh2NRecTracksPt; // Number of found tracks above threshold
137 TH2F* fh2NConstPt; // number of constituents vs. pt
138 TH2F* fh2NConstLeadingPt; // number of constituents vs. pt
139 TH2F* fh2JetPhiEta; // jet phi eta
140 TH2F* fh2LeadingJetPhiEta; // leading jet phi eta
141 TH2F* fh2JetEtaPt; // leading jet eta
142 TH2F* fh2LeadingJetEtaPt; // leading jet eta
143 TH2F* fh2TrackEtaPt; // track eta
144 TH2F* fh2LeadingTrackEtaPt; // leading track eta
145 TH2F* fh2JetsLeadingPhiEta; // jet phi eta
146 TH2F* fh2JetsLeadingPhiPt; // jet correlation with leading jet
147 TH2F* fh2TracksLeadingPhiEta; // track correlation with leading track
148 TH2F* fh2TracksLeadingPhiPt; // track correlation with leading track
149 TH2F* fh2TracksLeadingJetPhiPt; // track correlation with leading Jet
150 TH2F* fh2JetsLeadingPhiPtW; // jet correlation with leading jet
151 TH2F* fh2TracksLeadingPhiPtW; // track correlation with leading track
152 TH2F* fh2TracksLeadingJetPhiPtW; // track correlation with leading Jet
153 TH2F* fh2NRecJetsPtRan; // Number of found jets above threshold
154 TH2F* fh2NConstPtRan; // number of constituents vs. pt
155 TH2F* fh2NConstLeadingPtRan; // number of constituents vs. pt
156 TH2F* fh2TracksLeadingJetPhiPtRan; // track correlation with leading Jet
157 TH2F* fh2TracksLeadingJetPhiPtWRan; // track correlation with leading Jet
158 TList *fHistList; // Output list
159
160
161 ClassDef(AliAnalysisTaskJetCluster, 2) // Analysis task for standard jet analysis
162};
163
164#endif