Update in the Comparison tasks
[u/mrichter/AliRoot.git] / PWG1 / AliComparisonEff.h
CommitLineData
09b20ad1 1#ifndef ALICOMPARISONEFF_H
2#define ALICOMPARISONEFF_H
3
4//------------------------------------------------------------------------------
5// Class to keep information from comparison of
6// reconstructed and MC particle tracks (TPC efficiency).
7//
8// Author: J.Otwinowski 04/02/2008
9//------------------------------------------------------------------------------
10
11class TFile;
12class AliMCInfo;
13class AliESDRecInfo;
14class AliESDEvent;
15class AliESD;
16class AliESDfriend;
17class AliRecInfoCuts;
18class AliMCInfoCuts;
19class TH1I;
20class TH3F;
21class TH3;
22class TProfile;
23class TProfile2D;
24class TGraph2D;
25class TGraph;
26class TGeoManager;
3baa4bfd 27class TString;
09b20ad1 28class TStatToolkit;
f7a1cc68 29class AliMagF;
09b20ad1 30class AliESDVertex;
31
32#include "TNamed.h"
3baa4bfd 33#include "AliComparisonObject.h"
09b20ad1 34
3baa4bfd 35class AliComparisonEff : public AliComparisonObject {
09b20ad1 36public :
37 AliComparisonEff();
38 ~AliComparisonEff();
3baa4bfd 39
40 // Init data members
41 virtual void Init();
42
43 // Execute analysis
44 virtual void Exec(AliMCInfo* infoMC, AliESDRecInfo *infoRC);
45
46 // Merge output objects (needed by PROOF)
47 virtual Long64_t Merge(TCollection* list);
48
49 // Analyse output histograms
50 virtual void Analyse();
51
52 // Get analysis folder
53 virtual TFolder* GetAnalysisFolder() {return fAnalysisFolder;}
54
55 // Create folder for analysed histograms
56 TFolder *CreateFolder(TString folder = "folderEff",TString title = "Analysed Efficiency histograms");
57
b4126c69 58 // Export objects to folder
59 TFolder *ExportToFolder(TObjArray * array=0);
60
3baa4bfd 61 // Process events
09b20ad1 62 void Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC);
3baa4bfd 63
09b20ad1 64 // Selection cuts
65 void SetAliRecInfoCuts(AliRecInfoCuts* cuts=0) {fCutsRC = cuts;}
66 void SetAliMCInfoCuts(AliMCInfoCuts* cuts=0) {fCutsMC = cuts;}
67
3baa4bfd 68 // Getters
09b20ad1 69 AliRecInfoCuts* GetAliRecInfoCuts() const {return fCutsRC;}
70 AliMCInfoCuts* GetAliMCInfoCuts() const {return fCutsMC;}
71
35771050 72 TH1F *GetMCPt() {return fMCPt;}
73 TH1F *GetMCRecPt() {return fMCRecPt;}
74 TH1F *GetMCRecPrimPt() {return fMCRecPrimPt;}
75 TH1F *GetMCRecSecPt() {return fMCRecSecPt;}
76
77 TProfile* GetEffTPCPt() {return fEffTPCPt;}
78 TProfile* GetEffTPCITSPt() {return fEffTPCITSPt;}
79 TProfile* GetEffTPCPtMC() {return fEffTPCPtMC;}
80 TProfile* GetEffTPCPtF() {return fEffTPCPtF;}
81
82 TProfile* GetEffTPCPt_P() {return fEffTPCPt_P;}
83 TProfile* GetEffTPCPtMC_P() {return fEffTPCPtMC_P;}
84 TProfile* GetEffTPCPtF_P() {return fEffTPCPtF_P;}
85
86 TProfile* GetEffTPCPt_Pi() {return fEffTPCPt_Pi;}
87 TProfile* GetEffTPCPtMC_Pi() {return fEffTPCPtMC_Pi;}
88 TProfile* GetEffTPCPtF_Pi() {return fEffTPCPtF_Pi;}
89
90 TProfile* GetEffTPCPt_K() {return fEffTPCPt_K;}
91 TProfile* GetEffTPCPtMC_K() {return fEffTPCPtMC_K;}
92 TProfile* GetEffTPCPtF_K() {return fEffTPCPtF_K;}
93
94 //
95 TProfile* GetEffTPCTan() {return fEffTPCTan;}
96 TProfile* GetEffTPCITSTan() {return fEffTPCITSTan;}
97 TProfile* GetEffTPCTanMC() {return fEffTPCTanMC;}
98 TProfile* GetEffTPCTanF() {return fEffTPCTanF;}
99 //
100 TProfile2D* GetEffTPCPtTan() {return fEffTPCPtTan;}
101 TProfile2D* GetEffTPCPtTanMC() {return fEffTPCPtTanMC;}
102 TProfile2D* GetEffTPCPtTanF() {return fEffTPCPtTanF;}
103
104 // idx - 0 (isPrim), idx - 1 (isPrim && infoRC->GetStatus(1)==3)
105 // idx - 2 (infoRC->GetStatus(1)==3), idx - 3 (infoRC->GetStatus(1)==3 && !isPrim )
106 //
107 TH2F* GetTPCPtDCASigmaIdeal(Int_t i) {if(i<4) return fTPCPtDCASigmaIdeal[i]; else return 0;}
108 TH2F* GetTPCPtDCASigmaFull(Int_t i) {if(i<4) return fTPCPtDCASigmaFull[i] ; else return 0;}
109 TH2F* GetTPCPtDCASigmaDay0(Int_t i) {if(i<4) return fTPCPtDCASigmaFull[i] ; else return 0;}
110
111 TH2F* GetTPCPtDCAXY(Int_t i) {if(i<4) return fTPCPtDCAXY[i] ; else return 0;}
112 TH2F* GetTPCPtDCAZ(Int_t i) {if(i<4) return fTPCPtDCAZ[i] ; else return 0;}
113
114 // Pid = 0 - electrons, 1 - muons, 2 - kaons, 3 - pions, 4 - protons
115 //
116 TH3F* GetTPCPtDCASigmaIdealPid(Int_t i) {if(i<4) return fTPCPtDCASigmaIdealPid[i]; else return 0;}
117 TH3F* GetTPCPtDCASigmaFullPid(Int_t i) {if(i<4) return fTPCPtDCASigmaFullPid[i]; else return 0;}
118 TH3F* GetTPCPtDCASigmaDay0Pid(Int_t i) {if(i<4) return fTPCPtDCASigmaDay0Pid[i]; else return 0;}
119 TH3F* GetTPCPtDCAXYPid(Int_t i) {if(i<4) return fTPCPtDCAXYPid[i]; else return 0;}
120 TH3F* GetTPCPtDCAZPid(Int_t i) {if(i<4) return fTPCPtDCAZPid[i]; else return 0;}
09b20ad1 121
122private:
123
124 // Control histograms
125 TH1F *fMCPt;
126 TH1F *fMCRecPt;
127 TH1F *fMCRecPrimPt;
128 TH1F *fMCRecSecPt;
129
130 TProfile* fEffTPCPt; //->TPC efficiency as function of Pt (tan+-1)
131 TProfile* fEffTPCPtMC; //->MC -TPC efficiency as function of Pt (tan+-1)
132 TProfile* fEffTPCPtF; //->efficiency for findable tracks
133
134 TProfile* fEffTPCPt_P; //->TPC efficiency as function of Pt (tan+-1) - Protons
135 TProfile* fEffTPCPtMC_P; //->MC -TPC efficiency as function of Pt (tan+-1) - Protons
136 TProfile* fEffTPCPtF_P; //->efficiency for findable tracks - Protons
137
138 TProfile* fEffTPCPt_Pi; //->TPC efficiency as function of Pt (tan+-1) - Pions
139 TProfile* fEffTPCPtMC_Pi; //->MC -TPC efficiency as function of Pt (tan+-1) - Pions
140 TProfile* fEffTPCPtF_Pi; //->efficiency for findable tracks - Pions
141
142 TProfile* fEffTPCPt_K; //->TPC efficiency as function of Pt (tan+-1) - Kaons
143 TProfile* fEffTPCPtMC_K; //->MC -TPC efficiency as function of Pt (tan+-1) - Kaons
144 TProfile* fEffTPCPtF_K; //->efficiency for findable tracks - Kaons
145
146 //
147 TProfile* fEffTPCTan; //->TPC efficiency as function of Tan (pt>0.15
148 TProfile* fEffTPCTanMC; //->MC -TPC efficiency as function of Tan (pt>0.15)
149 TProfile* fEffTPCTanF; //->efficiency for findable tracks Tan (pt>0.15)
150 //
151 TProfile2D* fEffTPCPtTan; //->TPC efficiency as function of Pt and tan
152 TProfile2D* fEffTPCPtTanMC; //->MC -TPC efficiency as function of Pt and tan
153 TProfile2D* fEffTPCPtTanF; //->TPC efficiency as function of Pt and tan
154
155 // idx - 0 (isPrim), idx - 1 (isPrim && infoRC->GetStatus(1)==3)
156 // idx - 2 (infoRC->GetStatus(1)==3), idx - 3 (infoRC->GetStatus(1)==3 && !isPrim )
157 //
158
159 TH2F* fTPCPtDCASigmaIdeal[4]; //->TPC efficiency vs Pt vs DCA/Sigma (tan+-1)
160 TH2F* fTPCPtDCASigmaFull[4]; //->TPC efficiency vs Pt vs DCA/Sigma (tan+-1, full systematics)
161 TH2F* fTPCPtDCASigmaDay0[4]; //->TPC efficiency vs Pt vs DCA/Sigma (tan+-1, goofie systematics)
162
163 TH2F* fTPCPtDCAXY[4]; //->TPC efficiency as Pt vs DCA_XY (tan+-1)
164 TH2F* fTPCPtDCAZ[4]; //->TPC efficiency as Pt vs DCA_Z (tan+-1)
165
166 // Pid = 0 - electrons, 1 - muons, 2 - kaons, 3 - pions, 4 - protons
167 TH3F* fTPCPtDCASigmaIdealPid[4]; //->TPC efficiency vs Pt vs DCA/Sigma (tan+-1)
168 TH3F* fTPCPtDCASigmaFullPid[4]; //->TPC efficiency vs Pt vs DCA/Sigma (tan+-1, full systematics)
169 TH3F* fTPCPtDCASigmaDay0Pid[4]; //->TPC efficiency vs Pt vs DCA/Sigma (tan+-1, goofie systematics)
3baa4bfd 170 TH3F* fTPCPtDCAXYPid[4]; //->TPC efficiency vs Pt vs DCA_XY (tan+-1)
171 TH3F* fTPCPtDCAZPid[4]; //->TPC efficiency vs Pt vs DCA_Z (tan+-1)
09b20ad1 172
35771050 173 // TPC +ITS
174 TProfile* fEffTPCITSPt; //->TPCITS efficiency as function of Pt (tan+-1)
175 TProfile* fEffTPCITSTan; //->TPCITS efficiency as function of Tan (pt>0.15)
176
09b20ad1 177 // Global cuts objects
178 AliRecInfoCuts* fCutsRC; // selection cuts for reconstructed tracks
179 AliMCInfoCuts* fCutsMC; // selection cuts for MC tracks
180
181 // Magnet (needed for DCA calculations)
182 AliESDVertex* fVertex; //!
183
3baa4bfd 184 // analysis folder
185 TFolder *fAnalysisFolder; // folder for analysed histograms
186
09b20ad1 187 AliComparisonEff(const AliComparisonEff&); // not implemented
188 AliComparisonEff& operator=(const AliComparisonEff&); // not implemented
189
190 ClassDef(AliComparisonEff,1);
191};
192
193#endif