AliPhysics  32e057f (32e057f)
AliAnalysisTaskFlowStrangee.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 AliAnalysisTaskFlowStrangee_H
14 #define AliAnalysisTaskFlowStrangee_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 AliFlowTrackCuts;
26 class AliPIDResponse;
27 class AliESDEvent;
28 class AliAODEvent;
29 class AliAODv0;
30 class AliESDv0;
31 class AliVVertex;
32 class AliFlowBayesianPID;
33 class AliAODVertex;
34 
36  public:
37  enum Especie {kKZE=0,kLDA=1,kLDABAR=2,kLDAALL=3,kCHARGED=90,kPION=91,kKAON=92,kPROTON=93};
42  virtual void UserCreateOutputObjects();
43  virtual void Exec(Option_t*);
44  virtual void UserExec(Option_t *);
45  virtual void Terminate(Option_t *);
46  virtual void MyUserExec(Option_t *);
47  virtual void MyUserCreateOutputObjects();
48  virtual void MyPrintConfig();
49  virtual void PrintConfig();
50 
51  void SetHarmonic(Int_t val) {fHarmonic= val;}
52 
53  void SetOutputList(TList *lst) {fList=lst;}
54  TList* GetOutputList() {return fList;}
56 
57  void SetDebug(Int_t val=1) {fDebug = val;}
58  void SetQAlevel(Int_t qa) {fQAlevel = qa;}
59 
60  void SetpA() {fRunOnpA = kTRUE; fRunOnpp = kFALSE;}
61  void Setpp() {fRunOnpA = kFALSE; fRunOnpp = kTRUE; }
62  void SetReadESD(Bool_t val) {fReadESD=val;}
63  void SetReadMC(Bool_t val) {fReadMC=val;}
64 
65  void SetAvoidExec(Bool_t val) {fAvoidExec=val;}
71 
73  void SetUseFlowPackage(Bool_t val) {fUseFP=val;}
74  void SetWhichPsi(Int_t val) {fWhichPsi=val;}
76  void LoadVZEResponse(TList *val, Bool_t val2=kFALSE, Bool_t val3=kTRUE) {fVZEload=val;fVZEmb=val2;fVZEByDisk=val3;}
78  void SetRFPMinPt(Double_t val) {fRFPminPt=val;}
79  void SetRFPMaxPt(Double_t val) {fRFPmaxPt=val;}
86  void SetRFPMaxIPz(Double_t val) {fRFPmaxIPz=val;}
88  void SetRFPVZERingRange(Int_t val1, Int_t val2, Int_t val3, Int_t val4)
89  {fVZECa=val1;fVZECb=val2;fVZEAa=val3;fVZEAb=val4;}
90  //void SetRPCuts(AliFlowTrackCuts *cutsRP) { fCutsRP = cutsRP; }
91 
93  void SetSkipVn(Bool_t val) {fSkipVn=val;}
95  void SetK0L0(Int_t specie) {fSpecie=specie;}
97  void SetPtEdges(Int_t n, Double_t *p);
98  void SetOnline(Bool_t val) {fOnline=val;}
99  void SetHomemade(Bool_t val) {fHomemade=val;}
102  void SetMinEta(Double_t val) {fDecayMinEta=val;}
103  void SetMaxEta(Double_t val) {fDecayMaxEta=val;}
104  void SetMinPt(Double_t val) {fDecayMinPt=val;}
107  void SetMinQt(Double_t val, Bool_t val2=kTRUE) {fDecayMinQt=val; fDecayAPCutPie=val2;}
112 
118  void SetDauITSLayer(Int_t layer, Int_t config) {fDaughterITSConfig[layer]=config;}
127 
128  //newITScuts
129  void SetMaxSharedITSCluster(Int_t maxITSclusterShared){fmaxSharedITSCluster = maxITSclusterShared;}
131  void OpenToyModel();
132  void MakeToyEvent(Int_t seed=0, Int_t m_decay = 30, Double_t v_decay = 0.05,
133  Double_t mass_decay_mu = 0.497648, Double_t mass_decay_sg = 0.01,
134  Int_t m_bgr = 30, Double_t v_bgr = 0.08,
135  Int_t mtpc_a = 300, Double_t v_tpca = 0.10, Int_t mtpc_c = 300, Double_t v_tpcc = 0.10,
136  Int_t mvze_a = 300, Double_t v_vzea = 0.10, Int_t mvze_c = 300, Double_t v_vzec = 0.10 );
137  void CloseToyModel();
139 
140  private:
143  void AddQAEvents();
144  void AddQACandidates();
145 
146  void MyNotifyRun();
148  void Publish();
149 
150  void AddEventSpy(TString name);
151  void FillEventSpy(TString name);
152 
159 
160  void ReadStack(TClonesArray* mcArray);
161  void ReadFromESD(AliESDEvent *tESD);
162  void ReadFromAODv0(AliAODEvent *tAOD);
163 
164  void ChargeParticles(AliAODEvent *tAOD);
165 
166  void ComputePsi2(AliVEvent *event);
167  void AddMakeQSpy();
168  void FillMakeQSpy();
169  void ComputeChi2VZERO();
170  void MakeQVZE(AliVEvent *event);
171  void MakeQTPC(AliVEvent *event);
172  void MakeQTPC(AliESDEvent *event);
173  void MakeQTPC(AliAODEvent *event);
174  void AddTPCRFPSpy(TList *val);
175  Bool_t PassesRFPTPCCuts(AliESDtrack *myTrack, Double_t aodChi2NDF=0, Float_t aodipxy=0, Float_t aodipz=0);
176  void MakeQVectors();
177  void ResetContainers();
178 
179  void AddCandidates();
180  TList* RebinDecayVn(TList *tList,Int_t nbins, Int_t *bins);
181 
183 
184  Double_t CosThetaPointXY(AliESDv0 *me, const AliVVertex *vtx);
185  Double_t CosThetaPointXY(AliAODv0 *me, const AliVVertex *vtx);
186  Double_t DecayLengthXY(AliESDv0 *me, const AliVVertex *vtx);
187  Double_t DecayLengthXY(AliAODv0 *me, const AliVVertex *vtx);
188  Double_t DecayLength(AliESDv0 *me, const AliVVertex *vtx);
189  Double_t DecayLength(AliAODv0 *me, const AliVVertex *vtx);
190 
191  void AddMCParticleSpy(TList *val);
192  void FillMCParticleSpy(TString listName, AliAODMCParticle *par);
193  void FillMCParticleSpy(TString listName, TParticle *par);
194 
195  void AddCandidatesSpy(TList *val, Bool_t fillRes=kFALSE);
196  void FillCandidateSpy(TString listName, Bool_t fillRes=kFALSE);
197 
198  void AddTrackSpy(TList *val, Bool_t fillRes=kFALSE);
199  void FillTrackSpy(TString listName, Bool_t fillRes=kFALSE);
200 
201  void AddDecayVn(TList *val);
202  void FillDecayVn(TString listName,Double_t ms,Double_t pt,Double_t phi,Double_t eta,Int_t fid1,Int_t fid2);
203  void QCStoreDecayVn(TString name);
204  void ComputeDecayVn(TString listName);
205 
206  void AddTrackVn(TList *val);
207  void FillTrackVn(TString listName,Double_t pt,Double_t phi,Double_t eta,Int_t fid);
208  void QCStoreTrackVn(TString name);
209  void ComputeTrackVn(TString listName);
210  Bool_t InQTPC(Int_t id);
211 
212  void MakeFilterBits();
213  Bool_t PassesFilterBit(AliESDtrack *me);
214 
215  void LoadTrack(AliESDtrack *myTrack, Double_t aodChi2NDF=0);
216  Bool_t AcceptDaughter(Bool_t strongITS=kTRUE, Bool_t newITScuts=kFALSE);
218  Bool_t PassesPIDCuts(AliESDtrack *myTrack, AliPID::EParticleType pid=AliPID::kProton);
219 
221 
222  void MakeTrack();
223  void PushBackFlowTrack(AliFlowEvent *event, Double_t pt, Double_t phi, Double_t eta, Double_t we, Int_t id);
224 
225  Double_t GetWDist(const AliVVertex* v0, const AliVVertex* v1);
226  Bool_t plpMV(const AliVEvent *event);
227 
228  void LoadVZEROResponse();
229  void AddVZEROResponse();
230  void SaveVZEROResponse();
231  void AddVZEQA();
232  void FillVZEQA();
233  void FillVZEQA(AliAODEvent *tAOD);
234 
235  Int_t RefMult(AliAODEvent *tAOD, Int_t fb);
236  Int_t RefMultTPC();
238 
239  AliPIDResponse *fPIDResponse;
240  AliESDtrackCuts *fFB1; // filterbit cut equivalent
241  AliESDtrackCuts *fFB1024; // filterbit cut equivalent
242  AliFlowEvent *fTPCevent; // flow event (needed here due to ev selection)
243  AliFlowEvent *fVZEevent; // flow event (needed here due to ev selection)
244  // AliFlowTrackCuts* fCutsRP;
245 
246  TObjArray *fCandidates; // array of selected candidates
247  TList *fList; // stores the final list of output histograms
248 
249  Int_t fRunNumber; // current run number
250 
251  Int_t fDebug; // debug level
252  Int_t fQAlevel; // QA plots
253 
254  Bool_t fReadESD; // move back to ESD
255  Bool_t fReadMC; // read MC files
256  Bool_t fAddPiToMCReactionPlane; // add pi randomly (MCTUNED)
257  Int_t fPostMatched; // post only (un)matched particles
258  Bool_t fAvoidExec; // avoids Exec
259  Bool_t fSkipSelection; // skip decay finder
260  Bool_t fSkipVn; // skip flow computation
261  Bool_t fUseFP; // flow package?
262  Bool_t fRunOnpA; // make task compatible with pA event selection
263  Bool_t fRunOnpp; // make task compatible with pp event selection
264  Bool_t fExtraEventRejection; // to reject pile up
265  Bool_t fSkipCentralitySelection; // to skip centrality
270  Double_t fV0M; // V0M CC
271  Double_t fTRK; // TRK CC
274  Int_t fSPDtracklets; // spd tracklets
275  Float_t fVZETotM; // vzero total multiplicity
276  Int_t fRefMultTPC; // tpc only multiplicity
277  Int_t fRefMultHyb; // hybrid multiplicity
278 
279  Double_t fVertexZcut; // cut on main vertex Z
280 
281  Bool_t fExcludeTPCEdges; // exclude TPC edges from single track selection
282 
283  Int_t fSpecie; // K0=>0 L0=>1
284  Bool_t fOnline; // change into online v0 finder
285  Bool_t fHomemade; // homemade v0 finder
286 
287  Int_t fWhichPsi; // detector for Psi2
288 
289  Bool_t fVZEsave; // make vze response
290  TList *fVZEload; // adress to calibration file
291  TH2D *fVZEResponse; // vze response vs centrality class
292  Double_t fVZEextW[64]; // vze weights
293  Bool_t fVZEmb; // integrate response (linearity)
294  Bool_t fVZEByDisk; // normalized by disk
295  Int_t fVZECa; // start of V0C (ring number 0-3)
296  Int_t fVZECb; // end of V0C (ring number 0-3)
297  Int_t fVZEAa; // start of V0A (ring number 0-3)
298  Int_t fVZEAb; // end of V0A (ring number 0-3)
299  TList *fVZEQA; // address to qalist
300 
301  Int_t fHarmonic; // flow angle order
302  Double_t fPsi2; // best estimation of Psi2
303  Double_t fMCEP; // stores MC EP (when available)
304  // VZE QVector
312  // TPC QVector
326 
327  Int_t fMassBins; // opens
329  Double_t fMaxMass; // window
330  Int_t fPtBins; // to shrink
331  Double_t fPtBinEdge[100]; // output
332 
333  Int_t fRFPFilterBit; // RFP TPC
334  Double_t fRFPminPt; // RFP TPC
335  Double_t fRFPmaxPt; // RFP TPC
336  Double_t fRFPAminEta; // RFP TPC
337  Double_t fRFPAmaxEta; // RFP TPC
338  Double_t fRFPCminEta; // RFP TPC
339  Double_t fRFPCmaxEta; // RFP TPC
341  Double_t fRFPmaxIPxy; // RFP TPC
342  Double_t fRFPmaxIPz; // RFP TPC
343  Int_t fRFPTPCncls; // RFP TPC
344 
346  Double_t fDecayPhi; // DECAY
347  Double_t fDecayEta; // DECAY
348  Double_t fDecayPt; // DECAY
354  Double_t fDecayQt; // DECAY
362  Int_t fDecayIDneg; // DECAY
363  Int_t fDecayIDpos; // DECAY
364  Int_t fDecayID; // DECAY
365 
369  Double_t fDecayMatchPt; // MC DECAY
371 
372  Double_t fDecayMinEta; // DECAY CUTS
373  Double_t fDecayMaxEta; // DECAY CUTS
374  Double_t fDecayMinPt; // DECAY CUTS
377  Double_t fDecayMinQt; // DECAY CUTS
378  Bool_t fDecayAPCutPie; // DECAY CUTS
380  Double_t fDecayMinRadXY; // DECAY CUTS
384 
385  Double_t fDaughterPhi; // DAUGHTER
386  Double_t fDaughterEta; // DAUGHTER
387  Double_t fDaughterPt; // DAUGHTER
388  Int_t fDaughterNClsTPC; // DAUGHTER
389  Int_t fDaughterNClsITS; // DAUGHTER
390  Int_t fDaughterITSConfig[6]; // DAUGHTER
391  Int_t fDaughterCharge; // DAUGHTER
398  UInt_t fDaughterStatus; // DAUGHTER
399  UChar_t fDaughterITScm; // DAUGHTER
405 
406  //newITScuts
407  Int_t fsharedITSCluster; // DAUGHTER
410 
411  Double_t fDaughterMatchPhi; // MC DAUGHTER
412  Double_t fDaughterMatchEta; // MC DAUGHTER
413  Double_t fDaughterMatchPt; // MC DAUGHTER
416 
417  Bool_t fDaughterUnTag; // UNTAG PROCEDURE
418 
419  Double_t fDaughterMinEta; // DAUGHTER CUTS
420  Double_t fDaughterMaxEta; // DAUGHTER CUTS
421  Double_t fDaughterMinPt; // DAUGHTER CUTS
422  Int_t fDaughterMinNClsTPC; // DAUGHTER CUTS
423  Int_t fDaughterMinNClsITS; // DAUGHTER CUTS
424  Int_t fDaughterMinXRows; // DAUGHTER CUTS
428  Double_t fDaughterMaxNSigmaPID; // DAUGHTER CUTS
429  Bool_t fDaughterSPDRequireAny; // DAUGHTER CUTS
430  Bool_t fDaughterITSrefit; // DAUGHTER CUTS
431 
432  //newITScuts
433  Double_t fMaxchi2perITSCluster; // DAUGHTER CUTS
434  Int_t fmaxSharedITSCluster; // DAUGHTER CUTS
435 
436  ClassDef(AliAnalysisTaskFlowStrangee, 6);
437 };
438 #endif
Int_t charge
void SetCentralityRange(TString val, Int_t m, Int_t M)
Bool_t plpMV(const AliVEvent *event)
void SetMaxChi2perITSCluster(Double_t maxITSChi2)
double Double_t
Definition: External.C:58
AliAnalysisTaskFlowStrangee & operator=(const AliAnalysisTaskFlowStrangee &analysisTask)
void FillTrackSpy(TString listName, Bool_t fillRes=kFALSE)
Bool_t PassesPIDCuts(AliESDtrack *myTrack, AliPID::EParticleType pid=AliPID::kProton)
char Char_t
Definition: External.C:18
void SetMinQt(Double_t val, Bool_t val2=kTRUE)
Bool_t MinimumRequirementsAA(AliAODEvent *tAOD)
TList * RebinDecayVn(Int_t nbins, Int_t *bins)
Double_t GetWDist(const AliVVertex *v0, const AliVVertex *v1)
void SetMaxSharedITSCluster(Int_t maxITSclusterShared)
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
void FillCandidateSpy(TString listName, Bool_t fillRes=kFALSE)
float Float_t
Definition: External.C:68
void LoadTrack(AliESDtrack *myTrack, Double_t aodChi2NDF=0)
Definition: External.C:228
void SetDauITSLayer(Int_t layer, Int_t config)
AliESDtrackCuts * fFB1
PID response object.
Double_t DecayLength(AliESDv0 *me, const AliVVertex *vtx)
void PushBackFlowTrack(AliFlowEvent *event, Double_t pt, Double_t phi, Double_t eta, Double_t we, Int_t id)
Bool_t PassesRFPTPCCuts(AliESDtrack *myTrack, Double_t aodChi2NDF=0, Float_t aodipxy=0, Float_t aodipz=0)
void FillMCParticleSpy(TString listName, AliAODMCParticle *par)
void AddTrackSpy(TList *val, Bool_t fillRes=kFALSE)
void SetRFPVZERingRange(Int_t val1, Int_t val2, Int_t val3, Int_t val4)
void LoadVZEResponse(TList *val, Bool_t val2=kFALSE, Bool_t val3=kTRUE)
void FillDecayVn(TString listName, Double_t ms, Double_t pt, Double_t phi, Double_t eta, Int_t fid1, Int_t fid2)
Double_t CosThetaPointXY(AliESDv0 *me, const AliVVertex *vtx)
Bool_t IsAtTPCEdge(Double_t phi, Double_t pt, Int_t charge, Double_t b)
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 ComputePsi2(AliVEvent *event)
void SetMass(Int_t n, Double_t m, Double_t M)
const char Option_t
Definition: External.C:48
const Int_t nbins
bool Bool_t
Definition: External.C:53
Int_t RefMult(AliAODEvent *tAOD, Int_t fb)
Double_t DecayLengthXY(AliESDv0 *me, const AliVVertex *vtx)
Bool_t AcceptDaughter(Bool_t strongITS=kTRUE, Bool_t newITScuts=kFALSE)
void AddCandidatesSpy(TList *val, Bool_t fillRes=kFALSE)
void FillTrackVn(TString listName, Double_t pt, Double_t phi, Double_t eta, Int_t fid)