1 #ifndef ALIANALYSISTASKJETSPECTRUM_H
2 #define ALIANALYSISTASKJETSPECTRUM_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 the correction of determiantion of reconstructed jet spectra
9 // Compares input (gen) and output (rec) jets
10 // *******************************************
12 #include "AliAnalysisTaskSE.h"
13 #include "THnSparse.h" // cannot forward declare ThnSparseF
20 class AliGenPythiaEventHeader;
30 class AliAnalysisTaskJetSpectrum : public AliAnalysisTaskSE
33 AliAnalysisTaskJetSpectrum();
34 AliAnalysisTaskJetSpectrum(const char* name);
35 virtual ~AliAnalysisTaskJetSpectrum() {;}
36 // Implementation of interface methods
37 virtual void UserCreateOutputObjects();
39 virtual void LocalInit() { Init(); }
40 virtual void UserExec(Option_t *option);
41 virtual void Terminate(Option_t *option);
42 virtual Bool_t Notify();
45 virtual void SetExternalWeight(Float_t f){fExternalWeight = f;}
46 virtual void SetUseExternalWeightOnly(Bool_t b){fUseExternalWeightOnly = b;}
47 virtual void SetAODInput(Bool_t b){fUseAODInput = b;}
48 virtual void SetLimitGenJetEta(Bool_t b){fLimitGenJetEta = b;}
49 virtual void SetRecEtaWindow(Float_t f){fRecEtaWindow = f;}
50 virtual void SetAnalysisType(Int_t i){fAnalysisType = i;}
51 virtual void SetBranchGen(const char* c){fBranchGen = c;}
52 virtual void SetBranchRec(const char* c){fBranchRec = c;}
55 static void GetClosestJets(AliAODJet *genJets,const Int_t &nGenJets,
56 AliAODJet *recJets,const Int_t &nRecJets,
57 Int_t *iGenIndex,Int_t *iRecIndex,Int_t iDebug = 0);
63 enum {kMaxCorrelation = 3};
67 AliAnalysisTaskJetSpectrum(const AliAnalysisTaskJetSpectrum&);
68 AliAnalysisTaskJetSpectrum& operator=(const AliAnalysisTaskJetSpectrum&);
70 static const Float_t fgkJetNpartCut[kMaxCorrelation];
73 AliJetHeader *fJetHeaderRec;
74 AliJetHeader *fJetHeaderGen;
75 AliAODEvent *fAOD; // where we take the jets from can be input or output AOD
77 TString fBranchRec; // AOD branch name for reconstructed
78 TString fConfigRec; // Name of the Config file
79 TString fBranchGen; // AOD brnach for genereated
80 TString fConfigGen; // Name of the Config file (if any)
82 Bool_t fUseAODInput; // use AOD input
83 Bool_t fUseExternalWeightOnly; // use only external weight
84 Bool_t fLimitGenJetEta; // Limit the eta of the generated jets
85 Int_t fAnalysisType; // Analysis type
86 Float_t fExternalWeight; // external weight
87 Float_t fRecEtaWindow; // eta window used for corraltion plots between rec and gen
89 TProfile* fh1Xsec; // pythia cross section and trials
90 TH1F* fh1Trials; // trials are added
91 TH1F* fh1PtHard; // Pt har of the event...
92 TH1F* fh1PtHardNoW; // Pt har of the event...
93 TH1F* fh1PtHardTrials; // Number of trials
96 TH1F* fh1E[kMaxJets]; // Jet Energy
97 TH1F* fh1PtRecIn[kMaxJets]; // Jet pt for all
98 TH1F* fh1PtRecOut[kMaxJets]; // Jet pt with corellated generated jet
99 TH1F* fh1PtGenIn[kMaxJets]; // Detection efficiency for given p_T.gen
100 TH1F* fh1PtGenOut[kMaxJets]; // gen pT of found jets
102 TH2F* fh2PtFGen[kMaxJets]; // correlation betwen genreated and found jet pT
103 TH2F* fh2PhiFGen[kMaxJets]; // correlation betwen genreated and found jet phi
104 TH2F* fh2EtaFGen[kMaxJets]; // correlation betwen genreated and found jet eta
105 TH2F* fh2Frag[kMaxJets]; // fragmentation function
106 TH2F* fh2FragLn[kMaxJets]; // fragmetation in xi
107 TH2F* fh2PtGenDeltaPhi[kMaxJets]; // difference between generated and found jet phi
108 TH2F* fh2PtGenDeltaEta[kMaxJets]; // difference between generated and found jet eta
109 TH2F* fh2PtRecDeltaR[kMaxJets]; // distance of rec jet i to j > i p_T,j
110 TH2F* fh2PtGenDeltaR[kMaxJets]; // distance of jet i to j > i vs p_T,j
112 TH3F* fh3PtRecGenHard[kMaxJets]; // correlation beetwen pt hard, rec and gen
113 TH3F* fh3PtRecGenHardNoW[kMaxJets]; // correlation beetwen pt hard, rec and gen no weight
114 TH3F* fh3RecEtaPhiPt[kMaxJets]; // correlation between eta phi and rec pt
115 TH3F* fh3RecEtaPhiPtNoGen[kMaxJets]; // correlation between eta phi and rec pt of jets without a partner
116 TH3F* fh3GenEtaPhiPtNoFound[kMaxJets]; // correlation between eta phi and gen pt of jets without a partner
117 TH3F* fh3GenEtaPhiPt[kMaxJets]; // correlation between eta phi and gen pt of jets without a partner
118 // ========= Multiplicity dependence ======
120 // ==========TODO , flavaor dependence ========
121 // ============================================
124 // ============= TODO , phi dependence ========
125 // ============================================
127 TList *fHistList; // Output list
129 ///////// For 2 dimensional unfolding //////////////////
130 TH1F* fh1JetMultiplicity; // JetMultiplicity
131 TH2F* fh2ERecZRec; // rec e and z
132 TH2F* fh2EGenZGen; // gen e and z
133 TH2F* fh2Efficiency; // 2 dimensional efficiency
134 TH3F* fh3EGenERecN; // correlation rec energy, gen energy N particles
135 THnSparseF* fhnCorrelation[kMaxCorrelation]; // 4d Correllation for unfolding
136 ///////////////////////////////////////////////////////
139 ClassDef(AliAnalysisTaskJetSpectrum, 1) // Analysis task for standard jet analysis