Adding histograms for smearing normized to p_T,Gen
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliAnalysisTaskJetSpectrum2.h
CommitLineData
3b7ffecf 1#ifndef ALIANALYSISTASKJETSPECTRUM2_H
2#define ALIANALYSISTASKJETSPECTRUM2_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 the correction of determiantion of reconstructed jet spectra
9// Compares input (gen) and output (rec) jets
10// *******************************************
11
12#include "AliAnalysisTaskSE.h"
13#include "THnSparse.h" // cannot forward declare ThnSparseF
14
15////////////////
16class AliJetHeader;
17class AliESDEvent;
18class AliAODEvent;
19class AliAODJet;
20class AliGenPythiaEventHeader;
21class AliCFManager;
22
23class TList;
24class TChain;
25class TH2F;
26class TH3F;
27class TProfile;
b1cd90b5 28class TSTring;
3b7ffecf 29
30
31class AliAnalysisTaskJetSpectrum2 : public AliAnalysisTaskSE
32{
33 public:
34 AliAnalysisTaskJetSpectrum2();
35 AliAnalysisTaskJetSpectrum2(const char* name);
36 virtual ~AliAnalysisTaskJetSpectrum2() {;}
37 // Implementation of interface methods
38 virtual void UserCreateOutputObjects();
39 virtual void Init();
40 virtual void LocalInit() { Init(); }
41 virtual void UserExec(Option_t *option);
42 virtual void Terminate(Option_t *option);
43 virtual Bool_t Notify();
44
b5cc0c6d 45 virtual void SetUseGlobalSelection(Bool_t b){fUseGlobalSelection = b;}
3b7ffecf 46 virtual void SetExternalWeight(Float_t f){fExternalWeight = f;}
47 virtual void SetUseExternalWeightOnly(Bool_t b){fUseExternalWeightOnly = b;}
565584e8 48 virtual void SetAODJetInput(Bool_t b){fUseAODJetInput = b;}
49 virtual void SetAODTrackInput(Bool_t b){fUseAODTrackInput = b;}
50 virtual void SetAODMCInput(Bool_t b){fUseAODMCInput = b;}
3b7ffecf 51 virtual void SetLimitGenJetEta(Bool_t b){fLimitGenJetEta = b;}
52 virtual void SetRecEtaWindow(Float_t f){fRecEtaWindow = f;}
9280dfa6 53 virtual void SetMinJetPt(Float_t f){fMinJetPt = f;}
54 virtual void SetDeltaPhiWindow(Float_t f){fDeltaPhiWindow = f;}
3b7ffecf 55 virtual void SetAnalysisType(Int_t i){fAnalysisType = i;}
56 virtual void SetBranchGen(const char* c){fBranchGen = c;}
57 virtual void SetBranchRec(const char* c){fBranchRec = c;}
58 virtual void SetTrackTypeGen(Int_t i){fTrackTypeGen = i;}
59 virtual void SetTrackTypeRec(Int_t i){fTrackTypeRec = i;}
60 virtual void SetFilterMask(UInt_t i){fFilterMask = i;}
f2dd0695 61 virtual void SetEventSelectionMask(UInt_t i){fEventSelectionMask = i;}
3b7ffecf 62 // use for the CF
63
64
65 // Helper
66 //
67
68 // we have different cases
69 // AOD reading -> MC from AOD
70 // ESD reading -> MC from Kinematics
71 // this has to match with our selection of input events
565584e8 72 enum {kTrackUndef = 0, kTrackAOD, kTrackKineAll,kTrackKineCharged, kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance};
3b7ffecf 73 enum {kAnaMC = 0x1, kAnaMCESD = 0x2};
74 enum {kMaxJets = 4};
75 enum {kMaxCorrelation = 3};
76
77 //
78 // 0 all jets
79 // 1 all jet in eta window
80 // 2 all jets with partner
81 // 3 all jets in eta window with partner
82 // 4 all jets with partner in eta window
83 enum {kStep0 = 0, kStep1, kStep2, kStep3, kStep4,kMaxStep};
84
85
86 private:
87
88 AliAnalysisTaskJetSpectrum2(const AliAnalysisTaskJetSpectrum2&);
89 AliAnalysisTaskJetSpectrum2& operator=(const AliAnalysisTaskJetSpectrum2&);
90
91 void MakeJetContainer();
92 Int_t GetListOfTracks(TList *list,Int_t type);
93
94 AliJetHeader *fJetHeaderRec;
95 AliJetHeader *fJetHeaderGen;
96 AliAODEvent *fAOD; // where we take the jets from can be input or output AOD
97 THnSparseF *fhnJetContainer[kMaxStep*2]; // like particle container in corrfw with different steps need AliCFContainer with Scale(), and clone() to do the same
98 THnSparseF *fhnCorrelation; // response matrix for unfolding
c8eabe24 99 THnSparseF *fhnCorrelationPhiZRec; // response matrix for unfolding in max Z rec bins
3b7ffecf 100
c8eabe24 101 TF1 *f1PtScale; // correction function to correct to the average true jet energy depending on p_T,rec
3b7ffecf 102
103 TString fBranchRec; // AOD branch name for reconstructed
104 TString fBranchGen; // AOD brnach for genereated
105
565584e8 106 Bool_t fUseAODJetInput; // take jet from input AOD not from ouptu AOD
107 Bool_t fUseAODTrackInput; // take track from input AOD not from ouptu AOD
108 Bool_t fUseAODMCInput; // take MC from input AOD not from ouptu AOD
b5cc0c6d 109 Bool_t fUseGlobalSelection; // Limit the eta of the generated jets
3b7ffecf 110 Bool_t fUseExternalWeightOnly; // use only external weight
111 Bool_t fLimitGenJetEta; // Limit the eta of the generated jets
f2dd0695 112 UInt_t fFilterMask; // filter bit for slecected tracks
113 UInt_t fEventSelectionMask; // Selection information used to filter events
3b7ffecf 114 Int_t fAnalysisType; // Analysis type
115 Int_t fTrackTypeRec; // type of tracks used for FF
116 Int_t fTrackTypeGen; // type of tracks used for FF
117 Float_t fAvgTrials; // Average nimber of trials
118 Float_t fExternalWeight; // external weight
119 Float_t fRecEtaWindow; // eta window used for corraltion plots between rec and gen
9280dfa6 120 Float_t fMinJetPt; // limits the jet p_T in addition to what already is done in the jet finder, this is important for jet matching for JF with lo threshold
26fa06fb 121 Float_t fDeltaPhiWindow; // minium angle between dijets
122
3b7ffecf 123
124 TProfile* fh1Xsec; // pythia cross section and trials
125 TH1F* fh1Trials; // trials are added
126 TH1F* fh1PtHard; // Pt har of the event...
127 TH1F* fh1PtHardNoW; // Pt har of the event without weigt
128 TH1F* fh1PtHardTrials; // Number of trials
129 TH1F* fh1NGenJets; // nr of gen jets
130 TH1F* fh1NRecJets; // nr of rec jets
edfbe476 131 TH1F* fh1PtTrackRec; // track pt
132 TH1F* fh1SumPtTrackRec; // sum over all track pT
133 TH1F* fh1SumPtTrackAreaRec; // sum over all track pT
c8eabe24 134 TH1F* fh1TmpRho; // just temporary histo for calculation
edfbe476 135
136
3b7ffecf 137 TH1F* fh1PtRecIn[kMaxJets]; // Jet pt for all this info is also in the THNsparse
138 TH1F* fh1PtGenIn[kMaxJets]; // Jet pt with corellated generated jet
139
cc0649e4 140 TH1F* fh1PtJetsRecIn; // Jet pt for all jets
565584e8 141 TH1F* fh1PtJetsLeadingRecIn; // Jet pt for all jets
cc0649e4 142 TH1F* fh1PtTracksRecIn; // track pt for all tracks
565584e8 143 TH1F* fh1PtTracksLeadingRecIn; // track pt for all tracks
cc0649e4 144 TH1F* fh1PtTracksGenIn; // track pt for all tracks
c8eabe24 145
cc0649e4 146
147 TH2F* fh2NRecJetsPt; // Number of found jets above threshold
148 TH2F* fh2NRecTracksPt; // Number of found tracks above threshold
565584e8 149 TH2F* fh2JetsLeadingPhiEta; // jet correlation with leading jet
150 TH2F* fh2JetsLeadingPhiPt; // jet correlation with leading jet
151 TH2F* fh2TracksLeadingPhiEta; // track correlation with leading track
152 TH2F* fh2TracksLeadingPhiPt; // track correlation with leading track
cf049e94 153 TH2F* fh2TracksLeadingJetPhiPt; // track correlation with leading track
c8eabe24 154 TH2F* fh2JetPtJetPhi; // Phi distribution of accepted jets
155 TH2F* fh2TrackPtTrackPhi; // phi distribution of accepted tracks
9a83d4af 156 TH2F* fh2RelPtFGen; // relative difference between generated and found
edfbe476 157 TH2F* fh2PhiPt[kMaxJets]; // delta phi correlation of tracks with the jet
158 TH2F* fh2PhiEta[kMaxJets]; // eta phi correlation of tracks with the jet
c8eabe24 159 TH2F* fh2RhoPtRec[kMaxJets]; // jet shape variable rho
160 TH2F* fh2PsiPtRec[kMaxJets]; // jet shape variable psi
161 TH2F* fh2RhoPtGen[kMaxJets]; //
162 TH2F* fh2PsiPtGen[kMaxJets]; //
3b7ffecf 163 TH2F* fh2FragRec[kMaxJets]; // fragmentation function
164 TH2F* fh2FragLnRec[kMaxJets]; // fragmetation in xi
3b7ffecf 165 TH2F* fh2FragGen[kMaxJets]; // fragmentation function
166 TH2F* fh2FragLnGen[kMaxJets]; // fragmetation in xi
167
9a83d4af 168
169
26fa06fb 170 // Dijet histos
171 TH2F* fh2DijetDeltaPhiPt; // dijet delta phi vs pt
172 TH2F* fh2DijetAsymPt; // dijet asym vs pt
173 TH2F* fh2DijetAsymPtCut; // dijet asym vs pt after delta phi cut
174 TH2F* fh2DijetDeltaPhiDeltaEta; // dijet delta phi delta eta
175 TH2F* fh2DijetPt2vsPt1; // dijet pt2 vs pt1
176 TH2F* fh2DijetDifvsSum; // dijet dif vs sum
177 TH1F* fh1DijetMinv; // dijet inv mass
178 TH1F* fh1DijetMinvCut; // dijet inv after delta phi cut
179
3b7ffecf 180
181 TList *fHistList; // Output list
182
183
9a83d4af 184 ClassDef(AliAnalysisTaskJetSpectrum2, 6) // Analysis task for standard jet analysis
3b7ffecf 185};
186
187#endif