Introduced HBT and conversion cuts for standard BF analysis; Move from Vectors to...
[u/mrichter/AliRoot.git] / PWGCF / EBYE / BalanceFunctions / AliAnalysisTaskTriggeredBF.h
CommitLineData
f8b2d882 1#ifndef ALIANALYSISTASKTRIGGEREDBF_CXX\r
2#define ALIANALYSISTASKTRIGGEREDBF_CXX\r
3\r
4// Analysis task for the TriggeredBF code\r
5// Authors: Panos Cristakoglou@cern.ch, m.weber@cern.ch\r
6\r
845fdeca 7#include "AliLog.h"\r
8#include "AliAnalysisTaskSE.h"\r
9#include "AliBalanceTriggered.h"\r
10\r
f8b2d882 11class TList;\r
12class TH1F;\r
13class TH2F;\r
f8b2d882 14\r
15class AliBalanceTriggered;\r
f8b2d882 16\r
f8b2d882 17\r
18class AliAnalysisTaskTriggeredBF : public AliAnalysisTaskSE {\r
19 public:\r
20 AliAnalysisTaskTriggeredBF(const char *name = "AliAnalysisTaskTriggeredBF");\r
21 virtual ~AliAnalysisTaskTriggeredBF(); \r
22 \r
23 \r
24 virtual void UserCreateOutputObjects();\r
25 virtual void UserExec(Option_t *option);\r
26 virtual void UserExecMix(Option_t*);\r
27 virtual void FinishTaskOutput();\r
28 virtual void Terminate(Option_t *);\r
29\r
30 void SetAnalysisObject(AliBalanceTriggered *const analysis) {\r
31 fBalance = analysis;\r
32 }\r
33 void SetShufflingObject(AliBalanceTriggered *const analysisShuffled) {\r
34 fRunShuffling = kTRUE;\r
35 fShuffledBalance = analysisShuffled;\r
36 }\r
845fdeca 37 void SetMixingObject(AliBalanceTriggered *const analysisMixed) {\r
38 fRunMixing = kTRUE;\r
39 fMixedBalance = analysisMixed;\r
40 }\r
f8b2d882 41 \r
42 void SetVertexDiamond(Double_t vx, Double_t vy, Double_t vz) {\r
43 fVxMax = vx;\r
44 fVyMax = vy;\r
45 fVzMax = vz;\r
46 }\r
47\r
48 //==============AOD analysis==============//\r
49 void SetAODtrackCutBit(Int_t bit){\r
50 nAODtrackCutBit = bit;\r
51 }\r
52\r
53 void SetKinematicsCutsAOD(Double_t ptmin, Double_t ptmax, Double_t etamin, Double_t etamax){\r
54 fPtMin = ptmin;\r
55 fPtMax = ptmax;\r
56 fEtaMin = etamin;\r
57 fEtaMax = etamax;\r
58\r
59 }\r
60\r
61 void SetExtraDCACutsAOD(Double_t DCAxy, Double_t DCAz){\r
62 fDCAxyCut = DCAxy;\r
63 fDCAzCut = DCAz;\r
64 }\r
65\r
66 void SetExtraTPCCutsAOD(Double_t maxTPCchi2, Int_t minNClustersTPC){\r
67 fTPCchi2Cut = maxTPCchi2;\r
68 fNClustersTPCCut = minNClustersTPC;\r
69 }\r
70\r
71 //Centrality\r
72 void SetCentralityEstimator(const char* centralityEstimator) {fCentralityEstimator = centralityEstimator;}\r
73 const char* GetCentralityEstimator(void) {return fCentralityEstimator;}\r
74 void SetCentralityPercentileRange(Double_t min, Double_t max) { \r
75 fUseCentrality = kTRUE;\r
76 fCentralityPercentileMin=min;\r
77 fCentralityPercentileMax=max;\r
78 }\r
79 void SetImpactParameterRange(Double_t min, Double_t max) { \r
80 fUseCentrality = kTRUE;\r
81 fImpactParameterMin=min;\r
82 fImpactParameterMax=max;\r
83 }\r
84\r
85 //multiplicity\r
86 void SetMultiplicityRange(Int_t min, Int_t max) {\r
87 fUseMultiplicity = kTRUE;\r
88 fNumberOfAcceptedTracksMin = min;\r
89 fNumberOfAcceptedTracksMax = max;}\r
90 \r
91 void UseOfflineTrigger() {fUseOfflineTrigger = kTRUE;}\r
92 \r
93\r
94 private:\r
845fdeca 95 Float_t IsEventAccepted(AliVEvent* event);\r
96 TObjArray* GetAcceptedTracks(AliVEvent* event);\r
97 TObjArray* GetShuffledTracks(TObjArray* tracks);\r
98\r
f8b2d882 99 AliBalanceTriggered *fBalance; //TriggeredBF object\r
100 Bool_t fRunShuffling;//run shuffling or not\r
101 AliBalanceTriggered *fShuffledBalance; //TriggeredBF object (shuffled)\r
845fdeca 102 Bool_t fRunMixing;//run mixing or not\r
103 AliBalanceTriggered *fMixedBalance; //TriggeredBF object (mixed)\r
f8b2d882 104 TList *fList; //fList object\r
105 TList *fListTriggeredBF; //fList object\r
845fdeca 106 TList *fListTriggeredBFS; //fList object (shuffling)\r
107 TList *fListTriggeredBFM; //fList object (mixing)\r
f8b2d882 108 TList *fHistListPIDQA; //! list of histograms\r
109\r
110 TH1F *fHistEventStats; //event stats\r
111 TH2F *fHistCentStats; //centrality stats\r
112 TH1F *fHistTriggerStats; //trigger stats\r
113 TH1F *fHistTrackStats; //Track filter bit stats\r
114 TH1F *fHistVx; //x coordinate of the primary vertex\r
115 TH1F *fHistVy; //y coordinate of the primary vertex\r
116 TH1F *fHistVz; //z coordinate of the primary vertex\r
117\r
118 TH2F *fHistClus;//\r
119 TH2F *fHistDCA;//\r
120 TH1F *fHistChi2;//\r
121 TH1F *fHistPt;//\r
122 TH1F *fHistEta;//\r
123 TH1F *fHistPhi;//\r
124 TH1F *fHistPhiBefore;//\r
125 TH1F *fHistPhiAfter;//\r
126 TH2F *fHistV0M;//\r
127 TH2F *fHistRefTracks;//\r
128\r
129 \r
130 TString fCentralityEstimator; //"V0M","TRK","TKL","ZDC","FMD"\r
131 Bool_t fUseCentrality;//use the centrality (PbPb) or not (pp)\r
132 Double_t fCentralityPercentileMin;//centrality percentile min\r
133 Double_t fCentralityPercentileMax;//centrality percentile max\r
134 Double_t fImpactParameterMin;//impact parameter min (used for MC)\r
135 Double_t fImpactParameterMax;//impact parameter max (used for MC)\r
136\r
137 Bool_t fUseMultiplicity;//use the multiplicity cuts\r
138 Int_t fNumberOfAcceptedTracksMin;//min. number of number of accepted tracks (used for the multiplicity dependence study - pp)\r
139 Int_t fNumberOfAcceptedTracksMax;//max. number of number of accepted tracks (used for the multiplicity dependence study - pp)\r
140 TH1F *fHistNumberOfAcceptedTracks;//hisot to store the number of accepted tracks\r
141\r
142 Bool_t fUseOfflineTrigger;//Usage of the offline trigger selection\r
143\r
144 Double_t fVxMax;//vxmax\r
145 Double_t fVyMax;//vymax\r
146 Double_t fVzMax;//vzmax\r
147\r
148 Int_t nAODtrackCutBit;//track cut bit from track selection (only used for AODs)\r
149\r
150 Double_t fPtMin;//only used for AODs\r
151 Double_t fPtMax;//only used for AODs\r
152 Double_t fEtaMin;//only used for AODs\r
153 Double_t fEtaMax;//only used for AODs\r
154\r
155 Double_t fDCAxyCut;//only used for AODs\r
156 Double_t fDCAzCut;//only used for AODs\r
157\r
158 Double_t fTPCchi2Cut;//only used for AODs\r
159 Int_t fNClustersTPCCut;//only used for AODs\r
160\r
161 \r
162 AliAnalysisTaskTriggeredBF(const AliAnalysisTaskTriggeredBF&); // not implemented\r
163 AliAnalysisTaskTriggeredBF& operator=(const AliAnalysisTaskTriggeredBF&); // not implemented\r
164 \r
165 ClassDef(AliAnalysisTaskTriggeredBF, 1); // example of analysis\r
166};\r
167\r
845fdeca 168// class used for io with AliBalance (taken from AliAnalysisTaskPhiCorrelations)\r
169class AliBFBasicParticle : public AliVParticle\r
170{ \r
171 public:\r
172 AliBFBasicParticle(Float_t eta, Float_t phi, Float_t pt, Short_t charge)\r
173 : fEta(eta), fPhi(phi), fpT(pt), fCharge(charge)\r
174 {\r
175 }\r
176 ~AliBFBasicParticle() {}\r
177 \r
178 // kinematics\r
179 virtual Double_t Px() const { AliFatal("Not implemented"); return 0; }\r
180 virtual Double_t Py() const { AliFatal("Not implemented"); return 0; }\r
181 virtual Double_t Pz() const { AliFatal("Not implemented"); return 0; }\r
182 virtual Double_t Pt() const { return fpT; }\r
183 virtual Double_t P() const { AliFatal("Not implemented"); return 0; }\r
184 virtual Bool_t PxPyPz(Double_t[3]) const { AliFatal("Not implemented"); return 0; }\r
185\r
186 virtual Double_t Xv() const { AliFatal("Not implemented"); return 0; }\r
187 virtual Double_t Yv() const { AliFatal("Not implemented"); return 0; }\r
188 virtual Double_t Zv() const { AliFatal("Not implemented"); return 0; }\r
189 virtual Bool_t XvYvZv(Double_t[3]) const { AliFatal("Not implemented"); return 0; }\r
190\r
191 virtual Double_t OneOverPt() const { AliFatal("Not implemented"); return 0; }\r
192 virtual Double_t Phi() const { return fPhi; }\r
193 virtual Double_t Theta() const { AliFatal("Not implemented"); return 0; }\r
194\r
195\r
196 virtual Double_t E() const { AliFatal("Not implemented"); return 0; }\r
197 virtual Double_t M() const { AliFatal("Not implemented"); return 0; }\r
198 \r
199 virtual Double_t Eta() const { return fEta; }\r
200 virtual Double_t Y() const { AliFatal("Not implemented"); return 0; }\r
201 \r
202 virtual Short_t Charge() const { return fCharge; }\r
203 virtual Short_t SetCharge(Short_t charge) { fCharge = charge; }\r
204 virtual Int_t GetLabel() const { AliFatal("Not implemented"); return 0; }\r
205 // PID\r
206 virtual Int_t PdgCode() const { AliFatal("Not implemented"); return 0; } \r
207 virtual const Double_t *PID() const { AliFatal("Not implemented"); return 0; }\r
208 \r
209 private:\r
210 Float_t fEta; // eta\r
211 Float_t fPhi; // phi\r
212 Float_t fpT; // pT\r
213 Short_t fCharge; // charge\r
214 \r
215 ClassDef( AliBFBasicParticle, 1); // class which contains only quantities requires for this analysis to reduce memory consumption for event mixing\r
216};\r
217\r
f8b2d882 218#endif\r