]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG1/AliComparisonRes.h
Dixed a crash when no proper files/data to display (Mikolaj)
[u/mrichter/AliRoot.git] / PWG1 / AliComparisonRes.h
CommitLineData
3baa4bfd 1#ifndef ALICOMPARISONRES_H
2#define ALICOMPARISONRES_H
3
4//------------------------------------------------------------------------------
5// Class to keep information from comparison of
6// reconstructed and MC particle tracks (TPC resolution).
7//
8// Author: J.Otwinowski 04/02/2008
9//------------------------------------------------------------------------------
10
11class TFile;
12class AliMCInfo;
13class AliESDRecInfo;
14class AliESDEvent;
15class AliESD;
16class AliESDfriend;
17class AliMCInfoCuts;
18class AliRecInfoCuts;
19class TH1I;
20class TH3F;
21class TH3;
22class TProfile;
23class TProfile2D;
24class TString;
25class AliESDVertex;
26
27#include "TNamed.h"
28#include "AliComparisonObject.h"
29
30class AliComparisonRes : public AliComparisonObject {
31public :
32 AliComparisonRes();
33 virtual ~AliComparisonRes();
34
35 // Init data members
36 virtual void Init();
37
38 // Execute analysis
39 virtual void Exec(AliMCInfo* infoMC, AliESDRecInfo *infoRC);
40
41 // Merge output objects (needed by PROOF)
42 virtual Long64_t Merge(TCollection* list);
43
44 // Analyse output histograms
45 virtual void Analyse();
46
47 // Get analysis folder
48 virtual TFolder* GetAnalysisFolder() {return fAnalysisFolder;}
49
50 // Process events
51 void ProcessConstrained(AliMCInfo* infoMC, AliESDRecInfo *infoRC);
52 void Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC);
53
54 // Create folder for analysed histograms
55 TFolder *CreateFolder(TString folder = "folderRes",TString title = "Analysed Resolution histograms");
56
b4126c69 57 // Export objects to folder
58 TFolder *ExportToFolder(TObjArray * array=0);
59
3baa4bfd 60 // Selection cuts
61 void SetAliRecInfoCuts(AliRecInfoCuts* cuts=0) {fCutsRC = cuts;}
62 void SetAliMCInfoCuts(AliMCInfoCuts* cuts=0) {fCutsMC = cuts;}
63
64 AliRecInfoCuts* GetAliRecInfoCuts() const {return fCutsRC;}
65 AliMCInfoCuts* GetAliMCInfoCuts() const {return fCutsMC;}
66
67 static TH1F* MakeResol(TH2F * his, Int_t integ, Bool_t type);
68
69
70private:
71 //
72 // Control histograms
73 //
decf0997 74 TH2F *fPtResolLPT; //-> pt resolution - low pt
75 TH2F *fPtResolHPT; //-> pt resolution - high pt
76 TH2F *fPtPullLPT; //-> pt resolution - low pt
77 TH2F *fPtPullHPT; //-> pt resolution - high pt
78 TH2F *fPhiResolTan; //-> angular resolution
79 TH2F *fTanResolTan; //-> angular resolution
80 TH2F *fPhiPullTan; //-> angular resolution
81 TH2F *fTanPullTan; //-> angular resolution
3baa4bfd 82
83 //
84 // Resolution constrained param
85 //
86 TH2F *fCPhiResolTan; //-> angular resolution - constrained
87 TH2F *fCTanResolTan; //-> angular resolution - constrained
88 TH2F *fCPtResolTan; //-> pt resolution - constrained
89 TH2F *fCPhiPullTan; //-> angular resolution - constrained
90 TH2F *fCTanPullTan; //-> angular resolution - constrained
91 TH2F *fCPtPullTan; //-> pt resolution - constrained
92
93 //
94 // Histograms for track resolution parameterisation
95 //
96
97 TH2F* f1Pt2ResolS1PtTPC; //-> (1/mcpt-1/pt)/(1+1/pt)^2 vs sqrt(1/pt) (TPC)
98 TH2F* f1Pt2ResolS1PtTPCITS; //-> (1/mcpt-1/pt)/(1+1/pt)^2 vs sqrt(1/pt) (TPC+ITS)
99 TH2F* fYResolS1PtTPC; //-> (mcy-y)/(0.2+1/pt) vs sqrt(1/pt) (TPC)
100 TH2F* fYResolS1PtTPCITS; //-> (mcy-y)/(0.2+1/pt) vs sqrt(1/pt) (TPC + ITS)
101 TH2F* fZResolS1PtTPC; //-> (mcz-z)/(0.2+1/pt) vs sqrt(1/pt) (TPC)
102 TH2F* fZResolS1PtTPCITS; //-> (mcz-z)/(0.2+1/pt) vs sqrt(1/pt) (TPC+ITS)
103 TH2F* fPhiResolS1PtTPC; //-> (mcphi-phi)/(0.1+1/pt) vs sqrt(1/pt) (TPC)
104 TH2F* fPhiResolS1PtTPCITS; //-> (mcphi-phi)/(0.1+1/pt) vs sqrt(1/pt) (TPC+ITS)
105 TH2F* fThetaResolS1PtTPC; //-> (mctheta-theta)/(0.1+1/pt) vs sqrt(1/pt) (TPC)
106 TH2F* fThetaResolS1PtTPCITS; //-> (mctheta-theta)/(0.1+1/pt) vs sqrt(1/pt) (TPC+ITS)
107
108 // constrained
109 TH2F* fC1Pt2ResolS1PtTPC; //-> (1/mcpt-1/pt)/(1+1/pt)^2 vs sqrt(1/pt) (TPC)
110 TH2F* fC1Pt2ResolS1PtTPCITS; //-> (1/mcpt-1/pt)/(1+1/pt)^2 vs sqrt(1/pt) (TPC+ITS)
111 TH2F* fCYResolS1PtTPC; //-> (mcy-y)/(0.2+1/pt) vs sqrt(1/pt) (TPC)
112 TH2F* fCYResolS1PtTPCITS; //-> (mcy-y)/(0.2+1/pt) vs sqrt(1/pt) (TPC + ITS)
113 TH2F* fCZResolS1PtTPC; //-> (mcz-z)/(0.2+1/pt) vs sqrt(1/pt) (TPC)
114 TH2F* fCZResolS1PtTPCITS; //-> (mcz-z)/(0.2+1/pt) vs sqrt(1/pt) (TPC+ITS)
115 TH2F* fCPhiResolS1PtTPC; //-> (mcphi-phi)/(0.1+1/pt) vs sqrt(1/pt) (TPC)
116 TH2F* fCPhiResolS1PtTPCITS; //-> (mcphi-phi)/(0.1+1/pt) vs sqrt(1/pt) (TPC+ITS)
117 TH2F* fCThetaResolS1PtTPC; //-> (mctheta-theta)/(0.1+1/pt) vs sqrt(1/pt) (TPC)
118 TH2F* fCThetaResolS1PtTPCITS; //-> (mctheta-theta)/(0.1+1/pt) vs sqrt(1/pt) (TPC+ITS)
119
120 AliESDVertex *fVertex; //!
121
122 // Global cuts objects
123 AliRecInfoCuts* fCutsRC; // selection cuts for reconstructed tracks
124 AliMCInfoCuts* fCutsMC; // selection cuts for MC tracks
125
126 // analysis folder
127 TFolder *fAnalysisFolder; // folder for analysed histograms
128
129 AliComparisonRes(const AliComparisonRes&); // not implemented
130 AliComparisonRes& operator=(const AliComparisonRes&); // not implemented
131
132 ClassDef(AliComparisonRes,1);
133};
134
135#endif