AliPhysics  db95e02 (db95e02)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskFlowStrange.h
Go to the documentation of this file.
1 // AliAnalysisTaskFlowStrange:
3 // Analysis task to select K0/Lambda candidates for flow analysis.
4 // Authors: Cristian Ivan (civan@cern.ch)
5 // Carlos Perez (cperez@cern.ch)
6 // Pawel Debski (pdebski@cern.ch)
8 
9 /* Copyright(c) 1998-1999, ALICExperiment at CERN, All rights reserved. *
10 * See cxx source for full Copyright notice */
11 /* $Id: $ */
12 
13 #ifndef AliAnalysisTaskFlowStrange_H
14 #define AliAnalysisTaskFlowStrange_H
15 
16 #include "AliAnalysisTaskSE.h"
17 
18 class TList;
19 class TH2D;
20 class TObjArray;
21 class TClonesArray;
22 class AliAODMCParticle;
23 class AliESDtrackCuts;
24 class AliFlowEventCuts;
25 class AliPIDResponse;
26 class AliESDEvent;
27 class AliAODEvent;
28 class AliAODv0;
29 class AliESDv0;
30 class AliVVertex;
31 class AliFlowBayesianPID;
32 class AliAODVertex;
33 
35  public:
36  enum Especie {kKZE=0,kLDA=1,kLDABAR=2,kLDAALL=3,kCHARGED=90,kPION=91,kKAON=92,kPROTON=93};
41  virtual void UserCreateOutputObjects();
42  virtual void Exec(Option_t*);
43  virtual void UserExec(Option_t *);
44  virtual void Terminate(Option_t *);
45  virtual void MyUserExec(Option_t *);
46  virtual void MyUserCreateOutputObjects();
47  virtual void MyPrintConfig();
48  virtual void PrintConfig();
49 
50  void SetHarmonic(Int_t val) {fHarmonic= val;}
51 
52  void SetOutputList(TList *lst) {fList=lst;}
53  TList* GetOutputList() {return fList;}
55 
56  void SetDebug(Int_t val=1) {fDebug = val;}
57  void SetQAlevel(Int_t qa) {fQAlevel = qa;}
58 
59  void SetpA() {fRunOnpA = kTRUE; fRunOnpp = kFALSE;}
60  void Setpp() {fRunOnpA = kFALSE; fRunOnpp = kTRUE; }
61  void SetReadESD(Bool_t val) {fReadESD=val;}
62  void SetReadMC(Bool_t val) {fReadMC=val;}
63 
64  void SetAvoidExec(Bool_t val) {fAvoidExec=val;}
70 
72  void SetUseFlowPackage(Bool_t val) {fUseFP=val;}
73  void SetWhichPsi(Int_t val) {fWhichPsi=val;}
75  void LoadVZEResponse(TList *val, Bool_t val2=kFALSE, Bool_t val3=kTRUE) {fVZEload=val;fVZEmb=val2;fVZEByDisk=val3;}
77  void SetRFPMinPt(Double_t val) {fRFPminPt=val;}
78  void SetRFPMaxPt(Double_t val) {fRFPmaxPt=val;}
85  void SetRFPMaxIPz(Double_t val) {fRFPmaxIPz=val;}
87  void SetRFPVZERingRange(Int_t val1, Int_t val2, Int_t val3, Int_t val4)
88  {fVZECa=val1;fVZECb=val2;fVZEAa=val3;fVZEAb=val4;}
89 
91  void SetSkipVn(Bool_t val) {fSkipVn=val;}
93  void SetK0L0(Int_t specie) {fSpecie=specie;}
95  void SetPtEdges(Int_t n, Double_t *p);
96  void SetOnline(Bool_t val) {fOnline=val;}
97  void SetHomemade(Bool_t val) {fHomemade=val;}
100  void SetMinEta(Double_t val) {fDecayMinEta=val;}
101  void SetMaxEta(Double_t val) {fDecayMaxEta=val;}
102  void SetMinPt(Double_t val) {fDecayMinPt=val;}
105  void SetMinQt(Double_t val, Bool_t val2=kTRUE) {fDecayMinQt=val; fDecayAPCutPie=val2;}
110 
116  void SetDauITSLayer(Int_t layer, Int_t config) {fDaughterITSConfig[layer]=config;}
125 
126  void OpenToyModel();
127  void MakeToyEvent(Int_t seed=0, Int_t m_decay = 30, Double_t v_decay = 0.05,
128  Double_t mass_decay_mu = 0.497648, Double_t mass_decay_sg = 0.01,
129  Int_t m_bgr = 30, Double_t v_bgr = 0.08,
130  Int_t mtpc_a = 300, Double_t v_tpca = 0.10, Int_t mtpc_c = 300, Double_t v_tpcc = 0.10,
131  Int_t mvze_a = 300, Double_t v_vzea = 0.10, Int_t mvze_c = 300, Double_t v_vzec = 0.10 );
132  void CloseToyModel();
134 
135  private:
138  void AddQAEvents();
139  void AddQACandidates();
140 
141  void MyNotifyRun();
143  void Publish();
144 
145  void AddEventSpy(TString name);
146  void FillEventSpy(TString name);
147 
154 
155  void ReadStack(TClonesArray* mcArray);
156  void ReadFromESD(AliESDEvent *tESD);
157  void ReadFromAODv0(AliAODEvent *tAOD);
158 
159  void ChargeParticles(AliAODEvent *tAOD);
160 
161  void ComputePsi2(AliVEvent *event);
162  void AddMakeQSpy();
163  void FillMakeQSpy();
164  void ComputeChi2VZERO();
165  void MakeQVZE(AliVEvent *event);
166  void MakeQTPC(AliVEvent *event);
167  void MakeQTPC(AliESDEvent *event);
168  void MakeQTPC(AliAODEvent *event);
169  void AddTPCRFPSpy(TList *val);
170  Bool_t PassesRFPTPCCuts(AliESDtrack *myTrack, Double_t aodChi2NDF=0, Float_t aodipxy=0, Float_t aodipz=0);
171  void MakeQVectors();
172  void ResetContainers();
173 
174  void AddCandidates();
175  TList* RebinDecayVn(TList *tList,Int_t nbins, Int_t *bins);
176 
178 
179  Double_t CosThetaPointXY(AliESDv0 *me, const AliVVertex *vtx);
180  Double_t CosThetaPointXY(AliAODv0 *me, const AliVVertex *vtx);
181  Double_t DecayLengthXY(AliESDv0 *me, const AliVVertex *vtx);
182  Double_t DecayLengthXY(AliAODv0 *me, const AliVVertex *vtx);
183  Double_t DecayLength(AliESDv0 *me, const AliVVertex *vtx);
184  Double_t DecayLength(AliAODv0 *me, const AliVVertex *vtx);
185 
186  void AddMCParticleSpy(TList *val);
187  void FillMCParticleSpy(TString listName, AliAODMCParticle *par);
188  void FillMCParticleSpy(TString listName, TParticle *par);
189 
190  void AddCandidatesSpy(TList *val, Bool_t fillRes=kFALSE);
191  void FillCandidateSpy(TString listName, Bool_t fillRes=kFALSE);
192 
193  void AddTrackSpy(TList *val, Bool_t fillRes=kFALSE);
194  void FillTrackSpy(TString listName, Bool_t fillRes=kFALSE);
195 
196  void AddDecayVn(TList *val);
197  void FillDecayVn(TString listName,Double_t ms,Double_t pt,Double_t phi,Double_t eta,Int_t fid1,Int_t fid2);
198  void QCStoreDecayVn(TString name);
199  void ComputeDecayVn(TString listName);
200 
201  void AddTrackVn(TList *val);
202  void FillTrackVn(TString listName,Double_t pt,Double_t phi,Double_t eta,Int_t fid);
203  void QCStoreTrackVn(TString name);
204  void ComputeTrackVn(TString listName);
205  Bool_t InQTPC(Int_t id);
206 
207  void MakeFilterBits();
208  Bool_t PassesFilterBit(AliESDtrack *me);
209 
210  void LoadTrack(AliESDtrack *myTrack, Double_t aodChi2NDF=0);
211  Bool_t AcceptDaughter(Bool_t strongITS=kTRUE);
213  Bool_t PassesPIDCuts(AliESDtrack *myTrack, AliPID::EParticleType pid=AliPID::kProton);
214 
216 
217  void MakeTrack();
218  void PushBackFlowTrack(AliFlowEvent *event, Double_t pt, Double_t phi, Double_t eta, Double_t we, Int_t id);
219 
220  Double_t GetWDist(const AliVVertex* v0, const AliVVertex* v1);
221  Bool_t plpMV(const AliVEvent *event);
222 
223  void LoadVZEROResponse();
224  void AddVZEROResponse();
225  void SaveVZEROResponse();
226  void AddVZEQA();
227  void FillVZEQA();
228  void FillVZEQA(AliAODEvent *tAOD);
229 
230  Int_t RefMult(AliAODEvent *tAOD, Int_t fb);
231  Int_t RefMultTPC();
233 
234  AliPIDResponse *fPIDResponse;
235  AliESDtrackCuts *fFB1; // filterbit cut equivalent
236  AliESDtrackCuts *fFB1024; // filterbit cut equivalent
237  AliFlowEvent *fTPCevent; // flow event (needed here due to ev selection)
238  AliFlowEvent *fVZEevent; // flow event (needed here due to ev selection)
239  TObjArray *fCandidates; // array of selected candidates
240  TList *fList; // stores the final list of output histograms
241 
242  Int_t fRunNumber; // current run number
243 
244  Int_t fDebug; // debug level
245  Int_t fQAlevel; // QA plots
246 
247  Bool_t fReadESD; // move back to ESD
248  Bool_t fReadMC; // read MC files
249  Bool_t fAddPiToMCReactionPlane; // add pi randomly (MCTUNED)
250  Int_t fPostMatched; // post only (un)matched particles
251  Bool_t fAvoidExec; // avoids Exec
252  Bool_t fSkipSelection; // skip decay finder
253  Bool_t fSkipVn; // skip flow computation
254  Bool_t fUseFP; // flow package?
255  Bool_t fRunOnpA; // make task compatible with pA event selection
256  Bool_t fRunOnpp; // make task compatible with pp event selection
257  Bool_t fExtraEventRejection; // to reject pile up
258  Bool_t fSkipCentralitySelection; // to skip centrality
263  Double_t fV0M; // V0M CC
264  Double_t fTRK; // TRK CC
267  Int_t fSPDtracklets; // spd tracklets
268  Float_t fVZETotM; // vzero total multiplicity
269  Int_t fRefMultTPC; // tpc only multiplicity
270  Int_t fRefMultHyb; // hybrid multiplicity
271 
272  Double_t fVertexZcut; // cut on main vertex Z
273 
274  Bool_t fExcludeTPCEdges; // exclude TPC edges from single track selection
275 
276  Int_t fSpecie; // K0=>0 L0=>1
277  Bool_t fOnline; // change into online v0 finder
278  Bool_t fHomemade; // homemade v0 finder
279 
280  Int_t fWhichPsi; // detector for Psi2
281 
282  Bool_t fVZEsave; // make vze response
283  TList *fVZEload; // adress to calibration file
284  TH2D *fVZEResponse; // vze response vs centrality class
285  Double_t fVZEextW[64]; // vze weights
286  Bool_t fVZEmb; // integrate response (linearity)
287  Bool_t fVZEByDisk; // normalized by disk
288  Int_t fVZECa; // start of V0C (ring number 0-3)
289  Int_t fVZECb; // end of V0C (ring number 0-3)
290  Int_t fVZEAa; // start of V0A (ring number 0-3)
291  Int_t fVZEAb; // end of V0A (ring number 0-3)
292  TList *fVZEQA; // address to qalist
293 
294  Int_t fHarmonic; // flow angle order
295  Double_t fPsi2; // best estimation of Psi2
296  Double_t fMCEP; // stores MC EP (when available)
297  // VZE QVector
305  // TPC QVector
319 
320  Int_t fMassBins; // opens
322  Double_t fMaxMass; // window
323  Int_t fPtBins; // to shrink
324  Double_t fPtBinEdge[100]; // output
325 
326  Int_t fRFPFilterBit; // RFP TPC
327  Double_t fRFPminPt; // RFP TPC
328  Double_t fRFPmaxPt; // RFP TPC
329  Double_t fRFPAminEta; // RFP TPC
330  Double_t fRFPAmaxEta; // RFP TPC
331  Double_t fRFPCminEta; // RFP TPC
332  Double_t fRFPCmaxEta; // RFP TPC
334  Double_t fRFPmaxIPxy; // RFP TPC
335  Double_t fRFPmaxIPz; // RFP TPC
336  Int_t fRFPTPCncls; // RFP TPC
337 
339  Double_t fDecayPhi; // DECAY
340  Double_t fDecayEta; // DECAY
341  Double_t fDecayPt; // DECAY
347  Double_t fDecayQt; // DECAY
355  Int_t fDecayIDneg; // DECAY
356  Int_t fDecayIDpos; // DECAY
357  Int_t fDecayID; // DECAY
358 
362  Double_t fDecayMatchPt; // MC DECAY
364 
365  Double_t fDecayMinEta; // DECAY CUTS
366  Double_t fDecayMaxEta; // DECAY CUTS
367  Double_t fDecayMinPt; // DECAY CUTS
370  Double_t fDecayMinQt; // DECAY CUTS
371  Bool_t fDecayAPCutPie; // DECAY CUTS
373  Double_t fDecayMinRadXY; // DECAY CUTS
377 
378  Double_t fDaughterPhi; // DAUGHTER
379  Double_t fDaughterEta; // DAUGHTER
380  Double_t fDaughterPt; // DAUGHTER
381  Int_t fDaughterNClsTPC; // DAUGHTER
382  Int_t fDaughterNClsITS; // DAUGHTER
383  Int_t fDaughterITSConfig[6]; // DAUGHTER
384  Int_t fDaughterCharge; // DAUGHTER
391  UInt_t fDaughterStatus; // DAUGHTER
392  UChar_t fDaughterITScm; // DAUGHTER
398 
399  Double_t fDaughterMatchPhi; // MC DAUGHTER
400  Double_t fDaughterMatchEta; // MC DAUGHTER
401  Double_t fDaughterMatchPt; // MC DAUGHTER
404 
405  Bool_t fDaughterUnTag; // UNTAG PROCEDURE
406 
407  Double_t fDaughterMinEta; // DAUGHTER CUTS
408  Double_t fDaughterMaxEta; // DAUGHTER CUTS
409  Double_t fDaughterMinPt; // DAUGHTER CUTS
410  Int_t fDaughterMinNClsTPC; // DAUGHTER CUTS
411  Int_t fDaughterMinNClsITS; // DAUGHTER CUTS
412  Int_t fDaughterMinXRows; // DAUGHTER CUTS
416  Double_t fDaughterMaxNSigmaPID; // DAUGHTER CUTS
417  Bool_t fDaughterSPDRequireAny; // DAUGHTER CUTS
418  Bool_t fDaughterITSrefit; // DAUGHTER CUTS
419 
421 };
422 #endif
Int_t charge
double Double_t
Definition: External.C:58
void MakeToyEvent(Int_t seed=0, Int_t m_decay=30, Double_t v_decay=0.05, Double_t mass_decay_mu=0.497648, Double_t mass_decay_sg=0.01, Int_t m_bgr=30, Double_t v_bgr=0.08, Int_t mtpc_a=300, Double_t v_tpca=0.10, Int_t mtpc_c=300, Double_t v_tpcc=0.10, Int_t mvze_a=300, Double_t v_vzea=0.10, Int_t mvze_c=300, Double_t v_vzec=0.10)
void FillDecayVn(TString listName, Double_t ms, Double_t pt, Double_t phi, Double_t eta, Int_t fid1, Int_t fid2)
AliAnalysisTaskFlowStrange & operator=(const AliAnalysisTaskFlowStrange &analysisTask)
char Char_t
Definition: External.C:18
Bool_t PassesRFPTPCCuts(AliESDtrack *myTrack, Double_t aodChi2NDF=0, Float_t aodipxy=0, Float_t aodipz=0)
void FillMCParticleSpy(TString listName, AliAODMCParticle *par)
void SetMinCosinePointingAngleXY(Double_t val)
Double_t DecayLengthXY(AliESDv0 *me, const AliVVertex *vtx)
Double_t CosThetaPointXY(AliESDv0 *me, const AliVVertex *vtx)
Bool_t AcceptAAEvent(AliESDEvent *tESD)
TList * RebinDecayVn(Int_t nbins, Int_t *bins)
void ComputePsi2(AliVEvent *event)
void AddTrackSpy(TList *val, Bool_t fillRes=kFALSE)
ClassDef(AliAnalysisTaskFlowStrange, 6)
void SetPtEdges(Int_t n, Double_t *p)
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
Bool_t MinimumRequirementsAA(AliAODEvent *tAOD)
Bool_t AcceptPPEvent(AliAODEvent *tAOD)
Bool_t AcceptPAEvent(AliAODEvent *tAOD)
Definition: External.C:228
Bool_t PassesPIDCuts(AliESDtrack *myTrack, AliPID::EParticleType pid=AliPID::kProton)
Bool_t IsAtTPCEdge(Double_t phi, Double_t pt, Int_t charge, Double_t b)
void PushBackFlowTrack(AliFlowEvent *event, Double_t pt, Double_t phi, Double_t eta, Double_t we, Int_t id)
void LoadVZEResponse(TList *val, Bool_t val2=kFALSE, Bool_t val3=kTRUE)
void SetRFPVZERingRange(Int_t val1, Int_t val2, Int_t val3, Int_t val4)
AliESDtrackCuts * fFB1
PID response object.
void ReadStack(TClonesArray *mcArray)
void SetMinQt(Double_t val, Bool_t val2=kTRUE)
Double_t DecayLength(AliESDv0 *me, const AliVVertex *vtx)
void FillTrackVn(TString listName, Double_t pt, Double_t phi, Double_t eta, Int_t fid)
void AddCandidatesSpy(TList *val, Bool_t fillRes=kFALSE)
Bool_t plpMV(const AliVEvent *event)
Double_t GetWDist(const AliVVertex *v0, const AliVVertex *v1)
void LoadTrack(AliESDtrack *myTrack, Double_t aodChi2NDF=0)
void SetCentralityRange(TString val, Int_t m, Int_t M)
const char Option_t
Definition: External.C:48
Bool_t AcceptDaughter(Bool_t strongITS=kTRUE)
void FillCandidateSpy(TString listName, Bool_t fillRes=kFALSE)
const Int_t nbins
bool Bool_t
Definition: External.C:53
Int_t RefMult(AliAODEvent *tAOD, Int_t fb)
void SetMass(Int_t n, Double_t m, Double_t M)
void SetDauITSLayer(Int_t layer, Int_t config)
void FillTrackSpy(TString listName, Bool_t fillRes=kFALSE)