]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGPP/TPC/AliPerformancePtCalib.h
PWGPPMUONdep and PWGPPmuonlite converted to native cmake
[u/mrichter/AliRoot.git] / PWGPP / TPC / AliPerformancePtCalib.h
CommitLineData
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.
4060dd2d 7// Track cuts and a user defined shift in charge/pt can be switched on and off by user.
ba06aaec 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
18class TString;
19class TNamed;
20class TCanvas;
21class TH1F;
22class TH2F;
23class TList;
24
25class AliESDVertex;
26class AliESDtrack;
27class AliMCEvent;
28class AliStack;
29class AliTrackReference;
30class AliESDEvent;
31class AliESDfriend;
32class AliESDfriendTrack;
acb9d358 33class AliMCInfoCuts;
34class AliRecInfoCuts;
ba06aaec 35class AliESDtrackCuts;
fbe2204e 36class AliESDpid;
ba06aaec 37
4060dd2d 38#include "THnSparse.h"
acb9d358 39#include "AliPerformanceObject.h"
40
41class AliPerformancePtCalib : public AliPerformanceObject {
ba06aaec 42public:
4823e4d4 43 AliPerformancePtCalib(const Char_t * name="AliPerformancePtCalib",const Char_t* title ="AliPerformancePtCalib");
ba06aaec 44 virtual ~AliPerformancePtCalib();
acb9d358 45
ba06aaec 46 // Init data members
47 virtual void Init();
acb9d358 48
ba06aaec 49 // Execute analysis
50 virtual void Exec(AliMCEvent* const mcEvent, AliESDEvent *const esdEvent, AliESDfriend *const esdFriend, const Bool_t bUseMC, const Bool_t bUseESDfriend);
acb9d358 51
ba06aaec 52 // Merge output objects (needed by PROOF)
53 virtual Long64_t Merge(TCollection* const list);
acb9d358 54
ba06aaec 55 // Analyse output histograms
56 virtual void Analyse();
acb9d358 57
ba06aaec 58 // Get analysis folder
59 virtual TFolder* GetAnalysisFolder() const {return fAnalysisFolder;}
acb9d358 60
ba06aaec 61 void SetReadTPCTracks(const Bool_t readTPC) {fOptTPC = readTPC;}//read only ESD tracks
ba06aaec 62 void SetEtaRange(const Double_t eta) {fEtaAcceptance = eta ;}//sets eta window
4060dd2d 63
aa4776c7 64 void SetAliESDtrackCuts( AliESDtrackCuts* esdTrackCuts) { fESDTrackCuts = esdTrackCuts;fESDcuts=kTRUE;}//esd track cuts
41fefc69 65
fbe2204e 66 void SetAnalysePions(const Bool_t anaPions) {fPions = anaPions;}
ba06aaec 67 void SetPtShift(const Double_t shiftVal); // set user defined shift in charge/pt
4060dd2d 68
69 // setters for analysis with AliPerformancePtCalib::Analyse()
70 void SetProjBinsPhi(const Double_t *pBins,const Int_t sizep,const Double_t minTheta, const Double_t maxTheta);// set phi bins for projection and theta range selection (rad)
71 void SetProjBinsTheta(const Double_t *tBins, const Int_t sizet,const Double_t minPhi, const Double_t maxPhi);// set theta bins for projection and phi range selection (rad)
ba06aaec 72 void SetMakeFitOption(const Bool_t setGausFit, const Double_t exclusionR,const Double_t fitR );//set fit options
6bcacaf1 73 void SetDoRebin(const Int_t rebin){if(rebin) {fDoRebin = kTRUE; fRebin = rebin;}}
ba06aaec 74 const TList *GetHistoList() {return fList;}// get list of histograms for analysis
4060dd2d 75
ba06aaec 76 // Create folder for analysed histograms
77 TFolder *CreateFolder(TString folder = "folderPtCalib",TString title = "Analysed PtCalib histograms");
acb9d358 78
ba06aaec 79 // Export objects to folder
80 TFolder *ExportToFolder(TObjArray * array=0);
acb9d358 81
ba06aaec 82 // Selection cuts
83 void SetAliRecInfoCuts(AliRecInfoCuts* const cuts=0) {fCutsRC = cuts;}
84 void SetAliMCInfoCuts(AliMCInfoCuts* const cuts=0) {fCutsMC = cuts;}
4060dd2d 85
ba06aaec 86 AliRecInfoCuts* GetAliRecInfoCuts() const {return fCutsRC;}
87 AliMCInfoCuts* GetAliMCInfoCuts() const {return fCutsMC;}
acb9d358 88
89protected:
4060dd2d 90 // variables for fitting in Analyse() function
ba06aaec 91 Double_t fThetaBins[100];// array of theta bins for projection of 1/pt vs theta
92 Double_t fPhiBins[100]; // array of phi bins for projection of 1/pt vs theta
4060dd2d 93
ba06aaec 94 Int_t fNThetaBins;// sets number of theta bins
95 Int_t fNPhiBins ;// sets number of phi bins
4060dd2d 96 Double_t fMaxPhi;// max phi for 2D projection on theta and charge/pt axis
97 Double_t fMinPhi;// min phi for 2D projection on theta and charge/pt axis
98 Double_t fMaxTheta;// max theta for 2D projection on phi and charge/pt axis
99 Double_t fMinTheta;// min theta for 2D projection on phi and charge/pt axis
ba06aaec 100 Double_t fRange;// sets fit range
101 Double_t fExclRange ;// sets range of rejection of points around 0
102 Bool_t fFitGaus ;// flag for usage of gaussian fit function
4060dd2d 103 Bool_t fDoRebin;// flag for rebin 1D histos before fitting
104 Int_t fRebin;// number of bins for rebin
105
ba06aaec 106private:
4060dd2d 107 // option for user defined shift in charge/pt
ba06aaec 108 Bool_t fShift;//flag for shift in charge/pt
109 Double_t fDeltaInvP;// shift value of charge/pt
acb9d358 110
ba06aaec 111 //options for cuts
112 Bool_t fOptTPC;// flag for reading of TPC tracks in Exec
113 Bool_t fESDcuts;//flag for usage of esd track cuts
fbe2204e 114 Bool_t fPions;// flag for analzsing pions instead of all charged particles
41fefc69 115
4060dd2d 116 //ESD track cut values
ba06aaec 117 Double_t fEtaAcceptance;//sets value of eta window
ba06aaec 118
ba06aaec 119 AliRecInfoCuts* fCutsRC; // selection cuts for reconstructed tracks
120 AliMCInfoCuts* fCutsMC; // selection cuts for MC tracks
4060dd2d 121
ba06aaec 122
123
124 TList *fList;// list of histograms
4060dd2d 125
126 //histograms and THnSparse
127 THnSparseF *fHistInvPtPtThetaPhi;// is filled with charge/pt, pt, theta, phi for ESD or TPC
ba06aaec 128
4060dd2d 129 TH1F *fHistPtShift0;//if shift in charge/pt is set by user, this histogram shows pt wihtout shift
ba06aaec 130 TH1F *fHistPrimaryVertexPosX;// primary vertex position x
131 TH1F *fHistPrimaryVertexPosY;// primary vertex position y
132 TH1F *fHistPrimaryVertexPosZ;// primary vertex position z
133 TH1F *fHistTrackMultiplicity; // track multiplicity
134 TH1F *fHistTrackMultiplicityCuts;//track multiplicity after all cuts are applied
135
136 TH2F *fHistTPCMomentaPosP;//TPC p vs global esd track p for positive tracks
137 TH2F *fHistTPCMomentaNegP;//TPC p vs global esd track p for negative tracks
138 TH2F *fHistTPCMomentaPosPt;//TPC pt vs global esd track p positive tracks
139 TH2F *fHistTPCMomentaNegPt;//TPC pt vs global esd track p for negative tracks
140
141
142 TH1F *fHistUserPtShift;// shows the shift value if set by user
fbe2204e 143 TH2F *fHistdedxPions;// dEdx vs cahrge*pt
acb9d358 144
ba06aaec 145 AliESDtrackCuts* fESDTrackCuts;// esd track cuts
fbe2204e 146 //pid
147 AliESDpid *fESDpid;
ba06aaec 148 // analysis folder
149 TFolder *fAnalysisFolder; // folder for analysed histograms
acb9d358 150
ba06aaec 151 AliPerformancePtCalib(const AliPerformancePtCalib&); // not implemented
152 AliPerformancePtCalib& operator=(const AliPerformancePtCalib&); // not implemented
acb9d358 153
ba06aaec 154 ClassDef(AliPerformancePtCalib, 1);
acb9d358 155};
156
157#endif