don't lie in the log!
[u/mrichter/AliRoot.git] / PWGPP / TPC / AliPerformanceRes.h
CommitLineData
7cc34f08 1#ifndef ALIPERFORMANCERES_H
2#define ALIPERFORMANCERES_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 TString;
12class TNamed;
13class TCanvas;
14class TH1F;
15class TH2F;
16
17class AliESDVertex;
18class AliESDtrack;
19class AliMCEvent;
20class AliStack;
21class AliTrackReference;
22class AliESDEvent;
23class AliESDfriend;
24class AliESDfriendTrack;
25class AliMCEvent;
26class AliMCParticle;
27class AliMCInfoCuts;
28class AliRecInfoCuts;
29
30#include "THnSparse.h"
31#include "AliPerformanceObject.h"
32
33class AliPerformanceRes : public AliPerformanceObject {
34public :
4823e4d4 35 AliPerformanceRes(const Char_t* name="AliPerformanceRes", const Char_t* title="AliPerformanceRes",Int_t analysisMode=0,Bool_t hptGenerator=kFALSE);
7cc34f08 36 virtual ~AliPerformanceRes();
37
38 // Init data members
39 virtual void Init();
40
41 // Execute analysis
42 virtual void Exec(AliMCEvent* const mcEvent, AliESDEvent *const esdEvent, AliESDfriend *const esdFriend, const Bool_t bUseMC, const Bool_t bUseESDfriend);
43
44 // Merge output objects (needed by PROOF)
45 virtual Long64_t Merge(TCollection* const list);
46
47 // Analyse output histograms
48 virtual void Analyse();
49
50 // Get analysis folder
51 virtual TFolder* GetAnalysisFolder() const {return fAnalysisFolder;}
52
53 // Process events
758320f7 54 void ProcessConstrained(AliStack* const stack, AliESDtrack *const esdTrack, AliESDEvent* const esdEvent );
55 void ProcessTPC(AliStack* const stack, AliESDtrack *const esdTrack, AliESDEvent* const esdEvent);
56 void ProcessTPCITS(AliStack* const stack, AliESDtrack *const esdTrack, AliESDEvent* const esdEvent);
57 void ProcessInnerTPC(AliMCEvent *const mcEvent, AliESDtrack *const esdTrack, AliESDEvent* const esdEvent);
58 void ProcessOuterTPC(AliMCEvent *const mcEvent, AliESDtrack *const esdTrack, AliESDfriendTrack *const friendTrack, AliESDEvent* const esdEvent);
7cc34f08 59
60 AliTrackReference *GetFirstTPCTrackRef(AliMCParticle *mcParticle);
61 AliTrackReference *GetLastTPCTrackRef(AliMCParticle *mcParticle);
62
63 // Create folder for analysed histograms
64 TFolder *CreateFolder(TString folder = "folderRes",TString title = "Analysed Resolution histograms");
65
66 // Export objects to folder
67 TFolder *ExportToFolder(TObjArray * array=0);
68
69 // Selection cuts
70 void SetAliRecInfoCuts(AliRecInfoCuts* const cuts=0) {fCutsRC = cuts;}
71 void SetAliMCInfoCuts(AliMCInfoCuts* const cuts=0) {fCutsMC = cuts;}
72
73 AliRecInfoCuts* GetAliRecInfoCuts() const {return fCutsRC;}
74 AliMCInfoCuts* GetAliMCInfoCuts() const {return fCutsMC;}
75
76 TH1F* MakeResol(TH2F * his, Int_t integ=0, Bool_t type=kFALSE, Int_t cut=0);
77
78 // getters
79 //
80 THnSparse *GetResolHisto() const { return fResolHisto; }
81 THnSparse *GetPullHisto() const { return fPullHisto; }
7729608b 82 static void SetMergeEntriesCut(Double_t entriesCut){fgkMergeEntriesCut = entriesCut;}
83
7cc34f08 84private:
85 //
86 // Control histograms
87 // 5 track parameters (details in STEER/AliExternalTrackParam.h)
88 //
89
90 // resolution histogram
91 THnSparseF *fResolHisto; //-> res_y:res_z:res_phi:res_lambda:res_pt:y:z:phi:eta:pt
92
93 // pull histogram
94 //THnSparseF *fPullHisto; //-> pull_y:pull_z:pull_phi:pull_lambda:pull_1pt:y:z:eta:phi:pt
95 THnSparseF *fPullHisto; //-> pull_y:pull_z:pull_snp:pull_tgl:pull_1pt:y:z:snp:tgl:1pt
96
97 // Global cuts objects
98 AliRecInfoCuts* fCutsRC; // selection cuts for reconstructed tracks
99 AliMCInfoCuts* fCutsMC; // selection cuts for MC tracks
100
101 // analysis folder
102 TFolder *fAnalysisFolder; // folder for analysed histograms
103
104 AliPerformanceRes(const AliPerformanceRes&); // not implemented
105 AliPerformanceRes& operator=(const AliPerformanceRes&); // not implemented
7729608b 106 static Double_t fgkMergeEntriesCut; //maximal number of entries for merging -can be modified via setter
7cc34f08 107
108 ClassDef(AliPerformanceRes,1);
109};
110
111#endif