]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/JetTasks/AliAnalysisTaskJetSpectrum2.h
New book-keeping class
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliAnalysisTaskJetSpectrum2.h
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 ////////////////
16 class AliJetHeader;
17 class AliESDEvent;
18 class AliAODEvent;
19 class AliAODJet;
20 class AliGenPythiaEventHeader;
21 class AliCFManager;
22
23 class TList;
24 class TChain;
25 class TH2F;
26 class TH3F;
27 class TProfile;
28
29
30
31 class 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
45     virtual void SetUseGlobalSelection(Bool_t b){fUseGlobalSelection = b;}
46     virtual void SetExternalWeight(Float_t f){fExternalWeight = f;}
47     virtual void SetUseExternalWeightOnly(Bool_t b){fUseExternalWeightOnly = b;}
48     virtual void SetAODInput(Bool_t b){fUseAODInput = b;}
49     virtual void SetLimitGenJetEta(Bool_t b){fLimitGenJetEta = b;}
50     virtual void SetRecEtaWindow(Float_t f){fRecEtaWindow = f;}
51     virtual void SetAnalysisType(Int_t i){fAnalysisType = i;}
52     virtual void SetBranchGen(const char* c){fBranchGen = c;}
53     virtual void SetBranchRec(const char* c){fBranchRec = c;}
54     virtual void SetTrackTypeGen(Int_t i){fTrackTypeGen = i;}
55     virtual void SetTrackTypeRec(Int_t i){fTrackTypeRec = i;}
56     virtual void SetFilterMask(UInt_t i){fFilterMask = i;}
57     // use for the CF
58
59
60     // Helper
61     //
62
63     // we have different cases
64     // AOD reading -> MC from AOD
65     // ESD reading -> MC from Kinematics
66     // this has to match with our selection of input events
67     enum {kTrackUndef = 0, kTrackAODIn, kTrackAODOut, kTrackKineAll,kTrackKineCharged, kTrackAODMCAll, kTrackAODMCCharged };
68     enum {kAnaMC =  0x1, kAnaMCESD = 0x2};
69     enum {kMaxJets = 4};
70     enum {kMaxCorrelation =  3};
71     
72     // 
73     // 0 all jets
74     // 1 all jet in eta window
75     // 2 all jets with partner
76     // 3 all jets in eta window with partner
77     // 4 all jets with partner in eta window
78     enum {kStep0 = 0, kStep1, kStep2, kStep3, kStep4,kMaxStep};
79
80
81  private:
82
83     AliAnalysisTaskJetSpectrum2(const AliAnalysisTaskJetSpectrum2&);
84     AliAnalysisTaskJetSpectrum2& operator=(const AliAnalysisTaskJetSpectrum2&);
85
86     void MakeJetContainer();
87     Int_t GetListOfTracks(TList *list,Int_t type);
88
89     AliJetHeader *fJetHeaderRec;
90     AliJetHeader *fJetHeaderGen;
91     AliAODEvent  *fAOD; // where we take the jets from can be input or output AOD
92     THnSparseF   *fhnJetContainer[kMaxStep*2];   // like particle container in corrfw with different steps need AliCFContainer with Scale(), and clone() to do the same
93     THnSparseF   *fhnCorrelation;           // response matrix for unfolding 
94
95
96     TString       fBranchRec;  // AOD branch name for reconstructed
97     TString       fBranchGen;  // AOD brnach for genereated
98
99     Bool_t        fUseAODInput;           // take jet from input AOD not from ouptu AOD
100     Bool_t        fUseGlobalSelection;    // Limit the eta of the generated jets
101     Bool_t        fUseExternalWeightOnly; // use only external weight
102     Bool_t        fLimitGenJetEta;        // Limit the eta of the generated jets
103     UInt_t        fFilterMask;             // filter bit for slecected tracks
104     Int_t         fAnalysisType;          // Analysis type 
105     Int_t         fTrackTypeRec;          // type of tracks used for FF 
106     Int_t         fTrackTypeGen;          // type of tracks used for FF 
107     Float_t       fAvgTrials;             // Average nimber of trials
108     Float_t       fExternalWeight;        // external weight
109     Float_t       fRecEtaWindow;          // eta window used for corraltion plots between rec and gen 
110
111     TProfile*     fh1Xsec;   // pythia cross section and trials
112     TH1F*         fh1Trials; // trials are added
113     TH1F*         fh1PtHard;  // Pt har of the event...       
114     TH1F*         fh1PtHardNoW;  // Pt har of the event without weigt       
115     TH1F*         fh1PtHardTrials;  // Number of trials 
116     TH1F*         fh1NGenJets;      // nr of gen jets
117     TH1F*         fh1NRecJets;      // nr of rec jets
118     
119     TH1F*         fh1PtRecIn[kMaxJets];  // Jet pt for all this info is also in the THNsparse      
120     TH1F*         fh1PtGenIn[kMaxJets];  // Jet pt with corellated generated jet    
121
122     TH2F*         fh2FragRec[kMaxJets];     // fragmentation function
123     TH2F*         fh2FragLnRec[kMaxJets];   // fragmetation in xi
124
125     TH2F*         fh2FragGen[kMaxJets];     // fragmentation function
126     TH2F*         fh2FragLnGen[kMaxJets];   // fragmetation in xi
127
128
129     TList *fHistList; // Output list
130    
131
132     ClassDef(AliAnalysisTaskJetSpectrum2, 1) // Analysis task for standard jet analysis
133 };
134  
135 #endif