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