]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG1/AliComparisonRes.h
Adding documentation for usage of PWG1
[u/mrichter/AliRoot.git] / PWG1 / AliComparisonRes.h
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
11 class TFile;
12 class AliMCInfo;
13 class AliESDRecInfo;
14 class AliESDEvent; 
15 class AliESD;
16 class AliESDfriend;
17 class AliMCInfoCuts;
18 class AliRecInfoCuts;
19 class TH1I;
20 class TH3F;
21 class TH3;
22 class TProfile;
23 class TProfile2D;
24 class TString;
25 class AliESDVertex;
26
27 #include "TNamed.h"
28 #include "AliComparisonObject.h"
29
30 class AliComparisonRes : public AliComparisonObject {
31 public :
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
57   // Selection cuts
58   void SetAliRecInfoCuts(AliRecInfoCuts* cuts=0) {fCutsRC = cuts;}   
59   void SetAliMCInfoCuts(AliMCInfoCuts* cuts=0) {fCutsMC = cuts;}  
60    
61   AliRecInfoCuts*  GetAliRecInfoCuts() const {return fCutsRC;}  
62   AliMCInfoCuts*   GetAliMCInfoCuts()  const {return fCutsMC;}  
63
64   static TH1F*       MakeResol(TH2F * his, Int_t integ, Bool_t type); 
65
66
67 private:
68   //
69   // Control histograms
70   //
71   TH2F* fPtResolLPT;        //-> pt resolution - low pt
72   TH2F* fPtResolHPT;        //-> pt resolution - high pt 
73   TH2F* fPtPullLPT;         //-> pt resolution - low pt
74   TH2F* fPtPullHPT;         //-> pt resolution - high pt 
75
76   //
77   // Resolution constrained param
78   //
79   TH2F   *fCPhiResolTan;   //-> angular resolution -  constrained
80   TH2F   *fCTanResolTan;   //-> angular resolution -  constrained
81   TH2F   *fCPtResolTan;    //-> pt resolution      -  constrained
82   TH2F   *fCPhiPullTan;    //-> angular resolution -  constrained
83   TH2F   *fCTanPullTan;    //-> angular resolution -  constrained
84   TH2F   *fCPtPullTan;     //-> pt resolution      -  constrained
85
86   //
87   // Histograms for track resolution parameterisation
88   //
89
90   TH2F* f1Pt2ResolS1PtTPC;      //-> (1/mcpt-1/pt)/(1+1/pt)^2 vs sqrt(1/pt) (TPC)
91   TH2F* f1Pt2ResolS1PtTPCITS;   //-> (1/mcpt-1/pt)/(1+1/pt)^2 vs sqrt(1/pt) (TPC+ITS)
92   TH2F* fYResolS1PtTPC;         //-> (mcy-y)/(0.2+1/pt) vs sqrt(1/pt) (TPC) 
93   TH2F* fYResolS1PtTPCITS;      //-> (mcy-y)/(0.2+1/pt) vs sqrt(1/pt) (TPC + ITS) 
94   TH2F* fZResolS1PtTPC;         //-> (mcz-z)/(0.2+1/pt) vs sqrt(1/pt) (TPC)
95   TH2F* fZResolS1PtTPCITS;      //-> (mcz-z)/(0.2+1/pt) vs sqrt(1/pt) (TPC+ITS)
96   TH2F* fPhiResolS1PtTPC;       //-> (mcphi-phi)/(0.1+1/pt) vs sqrt(1/pt) (TPC)
97   TH2F* fPhiResolS1PtTPCITS;    //-> (mcphi-phi)/(0.1+1/pt) vs sqrt(1/pt) (TPC+ITS)
98   TH2F* fThetaResolS1PtTPC;     //-> (mctheta-theta)/(0.1+1/pt) vs sqrt(1/pt) (TPC)
99   TH2F* fThetaResolS1PtTPCITS;  //-> (mctheta-theta)/(0.1+1/pt) vs sqrt(1/pt) (TPC+ITS)
100   
101   // constrained
102   TH2F* fC1Pt2ResolS1PtTPC;      //-> (1/mcpt-1/pt)/(1+1/pt)^2 vs sqrt(1/pt) (TPC)
103   TH2F* fC1Pt2ResolS1PtTPCITS;   //-> (1/mcpt-1/pt)/(1+1/pt)^2 vs sqrt(1/pt) (TPC+ITS)
104   TH2F* fCYResolS1PtTPC;         //-> (mcy-y)/(0.2+1/pt) vs sqrt(1/pt) (TPC) 
105   TH2F* fCYResolS1PtTPCITS;      //-> (mcy-y)/(0.2+1/pt) vs sqrt(1/pt) (TPC + ITS) 
106   TH2F* fCZResolS1PtTPC;         //-> (mcz-z)/(0.2+1/pt) vs sqrt(1/pt) (TPC)
107   TH2F* fCZResolS1PtTPCITS;      //-> (mcz-z)/(0.2+1/pt) vs sqrt(1/pt) (TPC+ITS)
108   TH2F* fCPhiResolS1PtTPC;       //-> (mcphi-phi)/(0.1+1/pt) vs sqrt(1/pt) (TPC)
109   TH2F* fCPhiResolS1PtTPCITS;    //-> (mcphi-phi)/(0.1+1/pt) vs sqrt(1/pt) (TPC+ITS)
110   TH2F* fCThetaResolS1PtTPC;     //-> (mctheta-theta)/(0.1+1/pt) vs sqrt(1/pt) (TPC)
111   TH2F* fCThetaResolS1PtTPCITS;  //-> (mctheta-theta)/(0.1+1/pt) vs sqrt(1/pt) (TPC+ITS)
112
113   AliESDVertex *fVertex;  //! 
114
115   // Global cuts objects
116   AliRecInfoCuts*  fCutsRC;      // selection cuts for reconstructed tracks
117   AliMCInfoCuts*  fCutsMC;       // selection cuts for MC tracks
118
119   // analysis folder 
120   TFolder *fAnalysisFolder; // folder for analysed histograms
121
122   AliComparisonRes(const AliComparisonRes&); // not implemented
123   AliComparisonRes& operator=(const AliComparisonRes&); // not implemented
124
125   ClassDef(AliComparisonRes,1);
126 };
127
128 #endif