]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/JetTasks/AliAnalysisTaskJetSpectrum.h
Changes by Sara V. to UE class, and one cosmetic change in Spectrum task
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliAnalysisTaskJetSpectrum.h
1 #ifndef ALIANALYSISTASKJETSPECTRUM_H
2 #define ALIANALYSISTASKJETSPECTRUM_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 ////////////////
16 class AliJetHeader;
17 class AliESDEvent;
18 class AliAODEvent;
19 class AliAODJet;
20 class AliGenPythiaEventHeader;
21
22 class TList;
23 class TChain;
24 class TH2F;
25 class TH3F;
26 class TProfile;
27
28
29
30 class AliAnalysisTaskJetSpectrum : public AliAnalysisTaskSE
31 {
32  public:
33     AliAnalysisTaskJetSpectrum();
34     AliAnalysisTaskJetSpectrum(const char* name);
35     virtual ~AliAnalysisTaskJetSpectrum() {;}
36     // Implementation of interface methods
37     virtual void UserCreateOutputObjects();
38     virtual void Init();
39     virtual void LocalInit() { Init(); }
40     virtual void UserExec(Option_t *option);
41     virtual void Terminate(Option_t *option);
42     virtual Bool_t Notify();
43
44
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;}
53
54     // Helper
55     //
56
57     enum {kAnaMC =  0x1};
58     enum {kMaxJets =  4};
59     enum {kMaxCorrelation =  3};
60
61  private:
62
63     AliAnalysisTaskJetSpectrum(const AliAnalysisTaskJetSpectrum&);
64     AliAnalysisTaskJetSpectrum& operator=(const AliAnalysisTaskJetSpectrum&);
65     
66     static const Float_t fgkJetNpartCut[kMaxCorrelation];
67
68
69     AliJetHeader *fJetHeaderRec;
70     AliJetHeader *fJetHeaderGen;
71     AliAODEvent  *fAOD; // where we take the jets from can be input or output AOD
72
73     TString       fBranchRec;  // AOD branch name for reconstructed
74     TString       fBranchGen;  // AOD brnach for genereated
75
76     Bool_t        fUseAODInput;           // use AOD input
77     Bool_t        fUseExternalWeightOnly; // use only external weight
78     Bool_t        fLimitGenJetEta;        // Limit the eta of the generated jets
79     Int_t         fAnalysisType;          // Analysis type 
80     Float_t       fExternalWeight;        // external weight
81     Float_t       fRecEtaWindow;          // eta window used for corraltion plots between rec and gen 
82
83     TProfile*     fh1Xsec;   // pythia cross section and trials
84     TH1F*         fh1Trials; // trials are added
85     TH1F*         fh1PtHard;  // Pt har of the event...       
86     TH1F*         fh1PtHardNoW;  // Pt har of the event...       
87     TH1F*         fh1PtHardTrials;  // Number of trials 
88     TH1F*         fh1NGenJets;
89     TH1F*         fh1NRecJets;
90     TH1F*         fh1E[kMaxJets];       // Jet Energy       
91     TH1F*         fh1PtRecIn[kMaxJets];       // Jet pt for all      
92     TH1F*         fh1PtRecOut[kMaxJets];      // Jet pt with corellated generated jet    
93     TH1F*         fh1PtGenIn[kMaxJets];       // Detection efficiency for given p_T.gen
94     TH1F*         fh1PtGenOut[kMaxJets];      // gen pT of found jets
95
96     TH2F*         fh2PtFGen[kMaxJets];   // correlation betwen genreated and found  jet pT
97     TH2F*         fh2PhiFGen[kMaxJets];  // correlation betwen genreated and found  jet phi
98     TH2F*         fh2EtaFGen[kMaxJets];  // correlation betwen genreated and found  jet eta
99     TH2F*         fh2Frag[kMaxJets];    // fragmentation function
100     TH2F*         fh2FragLn[kMaxJets];  // fragmetation in xi
101     TH2F*         fh2PtGenDeltaPhi[kMaxJets];  // difference between generated and found  jet phi
102     TH2F*         fh2PtGenDeltaEta[kMaxJets];  // difference between generated and found  jet eta
103     TH2F*         fh2PtRecDeltaR[kMaxJets];     // distance of rec jet i to j > i p_T,j
104     TH2F*         fh2PtGenDeltaR[kMaxJets];     // distance of jet i to j > i vs p_T,j
105
106     TH3F*         fh3PtRecGenHard[kMaxJets];      // correlation beetwen pt hard, rec and gen                             
107     TH3F*         fh3PtRecGenHardNoW[kMaxJets];  // correlation beetwen pt hard, rec and gen no weight                                              
108     TH3F*         fh3RecEtaPhiPt[kMaxJets]; // correlation between eta phi and rec pt                                              
109     TH3F*         fh3RecEtaPhiPtNoGen[kMaxJets]; // correlation between eta phi and rec pt of jets without a partner                    
110     TH3F*         fh3GenEtaPhiPtNoFound[kMaxJets]; // correlation between eta phi and gen pt of jets without a partner
111     TH3F*         fh3GenEtaPhiPt[kMaxJets]; // correlation between eta phi and gen pt of jets without a partner                              
112     // ========= Multiplicity dependence ======
113
114     // ==========TODO , flavaor dependence ========                           
115     // ============================================                       
116                                      
117
118     // ============= TODO , phi dependence ========
119     // ============================================                            
120   
121     TList *fHistList; // Output list
122     
123     ///////// For 2 dimensional unfolding //////////////////
124     TH1F*         fh1JetMultiplicity;   // JetMultiplicity
125     TH2F*         fh2ERecZRec;          // rec e and z
126     TH2F*         fh2EGenZGen;          // gen e and z
127     TH2F*         fh2Efficiency;        // 2 dimensional efficiency
128     TH3F*         fh3EGenERecN;         // correlation rec energy, gen energy N particles 
129     THnSparseF*   fhnCorrelation[kMaxCorrelation]; // 4d Correllation for unfolding
130     ///////////////////////////////////////////////////////
131
132
133     ClassDef(AliAnalysisTaskJetSpectrum, 2) // Analysis task for standard jet analysis
134 };
135  
136 #endif