]>
Commit | Line | Data |
---|---|---|
ba06aaec | 1 | |
acb9d358 | 2 | #ifndef ALIPERFORMANCEPTCALIB_H |
3 | #define ALIPERFORMANCEPTCALIB_H | |
ba06aaec | 4 | //---------------------------------------------------------------------------------------------------- |
5 | // Class to study systematic shifts in pt and charge/pt respectively.Furthermore a comparison between | |
6 | // ESD and TPC track momenta is included. | |
7 | // Track cuts and a user defined shift in 1/pt can be switched on and off by user. | |
8 | // | |
9 | // Analysis with class AliPerfAnalyzeInvPt via AliPerformancePtCalib::Analyse(). : | |
10 | // Projection of charge/pt vs theta and vs phi resp. Histograms will be fitted with either | |
11 | // polynomial or gaussian fit function to extract minimum position of 1/pt. | |
12 | // Fit options and theta, phi bins can be set by user. | |
13 | // Attention: use the Set* functions of AliPerformancePtCalib when running AliPerformancePtCalib::Analyse(). | |
14 | // | |
15 | // Author: S. Schuchmann 11/13/2009 | |
16 | //---------------------------------------------------------------------------------------------------- | |
acb9d358 | 17 | |
18 | class TString; | |
19 | class TNamed; | |
20 | class TCanvas; | |
21 | class TH1F; | |
22 | class TH2F; | |
ba06aaec | 23 | class TH3F; |
acb9d358 | 24 | class TList; |
25 | ||
26 | class AliESDVertex; | |
27 | class AliESDtrack; | |
28 | class AliMCEvent; | |
29 | class AliStack; | |
30 | class AliTrackReference; | |
31 | class AliESDEvent; | |
32 | class AliESDfriend; | |
33 | class AliESDfriendTrack; | |
34 | class AliMCEvent; | |
35 | class AliMCParticle; | |
36 | class AliMCInfoCuts; | |
37 | class AliRecInfoCuts; | |
38 | ||
ba06aaec | 39 | class AliESDtrackCuts; |
40 | class AliAnalysisTask; | |
41 | ||
acb9d358 | 42 | #include "AliPerformanceObject.h" |
43 | ||
44 | class AliPerformancePtCalib : public AliPerformanceObject { | |
ba06aaec | 45 | public: |
46 | AliPerformancePtCalib(); | |
47 | AliPerformancePtCalib(Char_t* name, Char_t* title);//, Int_t analysisMode, Bool_t hptGenerator); | |
48 | virtual ~AliPerformancePtCalib(); | |
acb9d358 | 49 | |
ba06aaec | 50 | // Init data members |
51 | virtual void Init(); | |
acb9d358 | 52 | |
ba06aaec | 53 | // Execute analysis |
54 | virtual void Exec(AliMCEvent* const mcEvent, AliESDEvent *const esdEvent, AliESDfriend *const esdFriend, const Bool_t bUseMC, const Bool_t bUseESDfriend); | |
acb9d358 | 55 | |
ba06aaec | 56 | // Merge output objects (needed by PROOF) |
57 | virtual Long64_t Merge(TCollection* const list); | |
acb9d358 | 58 | |
ba06aaec | 59 | // Analyse output histograms |
60 | virtual void Analyse(); | |
acb9d358 | 61 | |
ba06aaec | 62 | // Get analysis folder |
63 | virtual TFolder* GetAnalysisFolder() const {return fAnalysisFolder;} | |
acb9d358 | 64 | |
4c10f566 | 65 | Bool_t AddTPCcuts(const AliESDtrack *esdTrack);// applies TPC cuts |
66 | Bool_t AddITScuts(const AliESDtrack *esdTrack);// applies ITS cuts | |
67 | Bool_t AddDCAcuts(const AliESDtrack *esdTrack);// applies DCA cuts | |
acb9d358 | 68 | |
ba06aaec | 69 | void SetReadTPCTracks(const Bool_t readTPC) {fOptTPC = readTPC;}//read only ESD tracks |
70 | void SetTPCRefit(const Bool_t refitTPC) {fRefitTPC = refitTPC;} //switch TPC refit flag on/off | |
71 | void SetITSRefit(const Bool_t refitITS) {fRefitITS = refitITS;} //switch ITS refit flag on/off | |
72 | void SetESDCuts(const Bool_t esdCuts) {fESDcuts = esdCuts;} //switch ESD track cuts on/off | |
73 | void SetDCACuts(const Bool_t dcaCut) {fDCAcut = dcaCut;} //switch DCA cut off | |
74 | void SetAcceptKinkDaughters(const Bool_t kink) {fAcceptKinkDaughters = kink;} //switch accept kink daughters on/off | |
75 | void SetRequireSigmaToVertex(const Bool_t sigmaTo) {fRequireSigmaToVertex = sigmaTo;}//switch require SigmaToVertex on/off | |
76 | void SetfDCAToVertex2D(const Bool_t dcaTo) {fDCAToVertex2D = dcaTo;}//switch DCA to vertex2D on/off | |
77 | void SetEtaRange(const Double_t eta) {fEtaAcceptance = eta ;}//sets eta window | |
78 | void SetESDcutValues(const Double_t * esdCutValues);// set ESD cut values as an array with size 6 | |
79 | // fMinPt = esdCutValues[0]; | |
80 | // fMaxPt = esdCutValues[1]; | |
81 | // fMinNClustersTPC = esdCutValues[2]; | |
82 | // fMaxChi2PerClusterTPC = esdCutValues[3]; | |
83 | // fMaxDCAtoVertexXY = esdCutValues[4]; | |
84 | // fMaxDCAtoVertexZ = esdCutValues[5]; | |
85 | ||
86 | //user defined shift in charge/pt | |
87 | void SetPtShift(const Double_t shiftVal); // set user defined shift in charge/pt | |
88 | ||
89 | // for analysis with AliPerformancePtCalibMC::Analyse() | |
90 | void SetProjBinsPhi(const Double_t *pBins,const Int_t sizep);// set phi bins for projection | |
91 | void SetProjBinsTheta(const Double_t *tBins, const Int_t sizet);// set theta bins for projection | |
92 | void SetMakeFitOption(const Bool_t setGausFit, const Double_t exclusionR,const Double_t fitR );//set fit options | |
93 | const TList *GetHistoList() {return fList;}// get list of histograms for analysis | |
acb9d358 | 94 | |
ba06aaec | 95 | // Create folder for analysed histograms |
96 | TFolder *CreateFolder(TString folder = "folderPtCalib",TString title = "Analysed PtCalib histograms"); | |
acb9d358 | 97 | |
ba06aaec | 98 | // Export objects to folder |
99 | TFolder *ExportToFolder(TObjArray * array=0); | |
acb9d358 | 100 | |
ba06aaec | 101 | // Selection cuts |
102 | void SetAliRecInfoCuts(AliRecInfoCuts* const cuts=0) {fCutsRC = cuts;} | |
103 | void SetAliMCInfoCuts(AliMCInfoCuts* const cuts=0) {fCutsMC = cuts;} | |
acb9d358 | 104 | |
ba06aaec | 105 | AliRecInfoCuts* GetAliRecInfoCuts() const {return fCutsRC;} |
106 | AliMCInfoCuts* GetAliMCInfoCuts() const {return fCutsMC;} | |
acb9d358 | 107 | |
108 | protected: | |
ba06aaec | 109 | Double_t fThetaBins[100];// array of theta bins for projection of 1/pt vs theta |
110 | Double_t fPhiBins[100]; // array of phi bins for projection of 1/pt vs theta | |
111 | ||
112 | Int_t fNThetaBins;// sets number of theta bins | |
113 | Int_t fNPhiBins ;// sets number of phi bins | |
114 | Double_t fRange;// sets fit range | |
115 | Double_t fExclRange ;// sets range of rejection of points around 0 | |
116 | Bool_t fFitGaus ;// flag for usage of gaussian fit function | |
117 | ||
118 | private: | |
119 | ||
120 | Bool_t fShift;//flag for shift in charge/pt | |
121 | Double_t fDeltaInvP;// shift value of charge/pt | |
acb9d358 | 122 | |
ba06aaec | 123 | //options for cuts |
124 | Bool_t fOptTPC;// flag for reading of TPC tracks in Exec | |
125 | Bool_t fESDcuts;//flag for usage of esd track cuts | |
126 | Bool_t fRefitTPC;//flag for TPC refit | |
127 | Bool_t fRefitITS;// flag for ITS refit | |
128 | Bool_t fDCAcut;//flag for usage of DCA cut | |
acb9d358 | 129 | |
ba06aaec | 130 | Double_t fEtaAcceptance;//sets value of eta window |
131 | Double_t fMinPt;//sets minimum pt for esd track cuts | |
132 | Double_t fMaxPt;//sets maximum pt for esd track cuts | |
133 | Double_t fMinNClustersTPC;// set minimum number of clusters in TPC for esd track cuts | |
134 | Double_t fMaxChi2PerClusterTPC;//set maximum of chi2 per cluster in TPC for esd track cuts | |
135 | Double_t fMaxDCAtoVertexXY;//set maximum of dca to vertex in xy direction for esd track cuts | |
136 | Double_t fMaxDCAtoVertexZ;//set maximum of dca to vertex in z for esd track cuts | |
137 | ||
138 | Bool_t fAcceptKinkDaughters; // flag for acception of kink daughters | |
139 | Bool_t fRequireSigmaToVertex;// flag for requirering sigma to vertex | |
140 | Bool_t fDCAToVertex2D;//flag for dca to vertex in 2d cut | |
141 | ||
142 | ||
143 | AliRecInfoCuts* fCutsRC; // selection cuts for reconstructed tracks | |
144 | AliMCInfoCuts* fCutsMC; // selection cuts for MC tracks | |
145 | ||
146 | ||
147 | TList *fList;// list of histograms | |
148 | TH2F *fHistInvPtTheta;//theta vs charge/pt | |
149 | TH2F *fHistInvPtPhi;//phi vs charge/pt | |
150 | TH2F *fHistPtTheta;//theta vs pt | |
151 | TH2F *fHistPtPhi;//phi vs pt | |
152 | ||
153 | TH1F *fHistPtShift0;//if shift in 1/pt is set by user, this histogram shows pt wihtout shift | |
154 | TH1F *fHistPrimaryVertexPosX;// primary vertex position x | |
155 | TH1F *fHistPrimaryVertexPosY;// primary vertex position y | |
156 | TH1F *fHistPrimaryVertexPosZ;// primary vertex position z | |
157 | TH1F *fHistTrackMultiplicity; // track multiplicity | |
158 | TH1F *fHistTrackMultiplicityCuts;//track multiplicity after all cuts are applied | |
159 | ||
160 | TH2F *fHistTPCMomentaPosP;//TPC p vs global esd track p for positive tracks | |
161 | TH2F *fHistTPCMomentaNegP;//TPC p vs global esd track p for negative tracks | |
162 | TH2F *fHistTPCMomentaPosPt;//TPC pt vs global esd track p positive tracks | |
163 | TH2F *fHistTPCMomentaNegPt;//TPC pt vs global esd track p for negative tracks | |
164 | ||
165 | ||
166 | TH1F *fHistUserPtShift;// shows the shift value if set by user | |
acb9d358 | 167 | |
ba06aaec | 168 | AliESDtrackCuts* fESDTrackCuts;// esd track cuts |
acb9d358 | 169 | |
ba06aaec | 170 | // analysis folder |
171 | TFolder *fAnalysisFolder; // folder for analysed histograms | |
acb9d358 | 172 | |
ba06aaec | 173 | AliPerformancePtCalib(const AliPerformancePtCalib&); // not implemented |
174 | AliPerformancePtCalib& operator=(const AliPerformancePtCalib&); // not implemented | |
acb9d358 | 175 | |
ba06aaec | 176 | ClassDef(AliPerformancePtCalib, 1); |
acb9d358 | 177 | }; |
178 | ||
179 | #endif |