AliPhysics  a88b1f0 (a88b1f0)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskMultiparticleFemtoscopy.h
Go to the documentation of this file.
1 /*
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved.
3  * See cxx source for full Copyright notice
4  * $Id$
5  */
6 
7  /********************************
8  * femtoscopy with multiparticle *
9  * technology *
10  * *
11  * author: Ante Bilandzic *
12  * (abilandzic@gmail.com) *
13  ********************************/
14 
15 #ifndef ALIANALYSISTASKMULTIPARTICLEFEMTOSCOPY_H
16 #define ALIANALYSISTASKMULTIPARTICLEFEMTOSCOPY_H
17 
18 #include "AliAnalysisTaskSE.h"
19 #include "AliPIDResponse.h"
20 #include "AliAODTrack.h"
21 #include "AliAODEvent.h"
22 #include "AliVEvent.h"
23 #include "AliESDEvent.h"
24 #include "AliMCEvent.h"
25 #include "AliAODMCParticle.h"
26 #include "TExMap.h"
27 #include "TProfile.h"
28 #include "TH1F.h"
29 #include "TH1I.h"
30 
31 //================================================================================================================
32 
34  public:
36  AliAnalysisTaskMultiparticleFemtoscopy(const char *name, Bool_t useParticleWeights=kFALSE);
38  virtual void UserCreateOutputObjects();
39  virtual void UserExec(Option_t *);
40  virtual void Terminate(Option_t *);
41 
42  // 0.) Methods called in the constructor:
43  virtual void InitializeArrays(); // use this method temporarily for all objects not classified yet
45  virtual void InitializeArraysForEBEObjects();
47  virtual void InitializeArraysForBackground();
48  virtual void InitializeArraysForBuffers();
49  virtual void InitializeArraysForQA();
51 
52  // 1.) Methods called in UserCreateOutputObjects():
53  // 2a) Directly:
55  virtual void BookAndNestAllLists();
56  virtual void BookEverything(); // use this to book all un-classified objects
58  virtual void BookEverythingForEBEObjects();
60  virtual void BookEverythingForBackground();
61  virtual void BookEverythingForBuffers();
62  virtual void BookEverythingForQA();
63  virtual void BookEverythingForGlobalTrackCuts();
64  // 2b) Indirectly:
65  Int_t InsanityChecksForGlobalTrackCuts(); // insanity checks for global track cuts
66 
67  // 2.) Methods called in UserExec(Option_t *):
68  // 2a) Directly:
69  virtual void InsanityChecksUserExec();
70  virtual void QA(AliVEvent *ave);
71  virtual void MC(AliMCEvent *aMC);
72  virtual void ESD(AliESDEvent *aESD);
73  virtual void AOD(AliAODEvent *aAOD);
74  virtual void OnlineMonitoring();
75  // 2b) Indirectly:
76  virtual void EstimateBackground(AliVEvent *ave);
77  virtual void FillControlHistogramsEvent(AliVEvent *ave);
78  virtual void FillControlHistogramsParticle(AliVEvent *ave);
79  virtual void FillControlHistogramsNonIdentifiedParticles(AliAODTrack *atrack);
80  virtual void FillControlHistogramsNonIdentifiedParticles(AliAODMCParticle *amcparticle);
81  virtual void FillControlHistogramsNonIdentifiedParticlesFTSF(AliAODTrack *atrack);
82  virtual void FillControlHistogramsIdentifiedParticles(AliAODTrack *atrack, AliAODTrack *gtrack);
83  virtual void FillControlHistogramsIdentifiedParticles(AliAODMCParticle *amcparticle);
84  virtual void V0s(AliVEvent *ave);
85  Int_t InsanityChecksForTracks(AliAODTrack *atrack); // insanity checks for each track ('atrack') in AOD
86  Int_t InsanityChecksForGlobalTracks(AliAODTrack *gtrack); // insanity checks only for global tracks ('gtrack') in AOD
87  Bool_t Pion(AliAODTrack *atrack, Int_t charge = 1, Bool_t bPrimary = kTRUE);
88  Bool_t Kaon(AliAODTrack *atrack, Int_t charge = 1, Bool_t bPrimary = kTRUE);
89  Bool_t Proton(AliAODTrack *atrack, Int_t charge = 1, Bool_t bPrimary = kTRUE);
90  Bool_t PassesCommonEventCuts(AliVEvent *ave);
91  Bool_t PassesMixedEventCuts(AliVEvent *ave);
92  Bool_t PassesGlobalTrackCuts(AliAODTrack *gtrack); // common cuts for global tracks TBI make it uniform with MC
93  Bool_t PassesCommonTrackCuts(AliAODTrack *atrack); // common cuts for analysis specific tracks (e.g. TPC-only) TBI make it uniform with MC
94  Bool_t PassesCommonTrackCuts(AliAODMCParticle *amcparticle); // common cuts for analysis specific tracks TBI see above two lines
95  virtual void GlobalTracksAOD(AliAODEvent *aAOD, Int_t index); // fill fGlobalTracksAOD in e-b-e . For the meaning of 'index', see declaration of fGlobalTracksAOD
96  Double_t RelativeMomenta(AliAODTrack *agtrack1, AliAODTrack *agtrack2);
97  Double_t RelativeMomenta(AliAODMCParticle *amcparticle1, AliAODMCParticle *amcparticle2);
98  Double_t Q3(AliAODTrack *agtrack1, AliAODTrack *agtrack2, AliAODTrack *agtrack3);
99  Double_t Q4(AliAODTrack *agtrack1, AliAODTrack *agtrack2, AliAODTrack *agtrack3, AliAODTrack *agtrack4);
100 
101  virtual void ResetEBEObjects();
102  Bool_t SpecifiedEvent(UInt_t run, UShort_t bunchCross, UInt_t orbit, UInt_t period);
104  virtual void DoSomeDebugging(AliVEvent *ave);
105  virtual void CalculateCorrelationFunctions(AliAODEvent *aAOD);
106  virtual void Calculate3pCorrelationFunctions(AliAODEvent *aAOD);
107  virtual void Calculate4pCorrelationFunctions(AliAODEvent *aAOD);
108  virtual void CalculateCorrelationFunctions(AliMCEvent *aMC);
109  virtual void CalculateBackground(TClonesArray *ca1, TClonesArray *ca2);
110  virtual void Calculate3pBackground(TClonesArray *ca1, TClonesArray *ca2, TClonesArray *ca3);
111  virtual void Calculate4pBackground(TClonesArray *ca1, TClonesArray *ca2, TClonesArray *ca3, TClonesArray *ca4);
112  virtual void CalculateBackground(TClonesArray *ca1, TClonesArray *ca2, Bool_t bMC); // TBI unify with the previous function
113  // 3.) Methods called in Terminate(Option_t *):
114  virtual void GetOutputHistograms(TList *histList);
115  // TBI implement the rest as well
116  virtual void GetPointersForCorrelationFunctions();
117  virtual void GetPointersForBackground();
118  virtual void GetPointersForBuffers();
119  virtual void NormalizeCorrelationFunctions();
120 
121  // Setters and getters:
122  // 0.) Not classified yet;
123  // 1.) Control histograms;
124  // 2.) Event-by-event histograms;
125  // 3.) Correlation functions;
126  // 4.) Background;
127  // 5.) Buffers;
128  // 6.) QA;
129  // 7.) ...
130  // *.) Debugging
131 
132  // 0.) Not classified yet:
137  void SetProcessOnlyKine(Bool_t pok) {this->fProcessOnlyKine = pok;};
138  Bool_t GetProcessOnlyKine() const {return this->fProcessOnlyKine;};
139  void SetProcessOnlyReco(Bool_t por) {this->fProcessOnlyReco = por;};
140  Bool_t GetProcessOnlyReco() const {return this->fProcessOnlyReco;};
141  void SetRejectFakeTracks(Bool_t rft) {this->fRejectFakeTracks = rft;};
143 
144  // 1.) Control histograms:
145  void SetControlHistogramsList(TList* const chl) {this->fControlHistogramsList = chl;};
147  void SetControlHistogramsFlagsPro(TProfile* const chfp) {this->fControlHistogramsFlagsPro = chfp;};
148  TProfile* GetControlHistogramsFlagsPro() const {return this->fControlHistogramsFlagsPro;};
149  //void SetFillControlHistograms(Bool_t fch) {this->fFillControlHistograms = fch;}; // TBI remove eventually
150  //Bool_t GetFillControlHistograms() const {return this->fFillControlHistograms;}; // TBI remove eventually
157  void SetFilterBitFTSF(Int_t fbFTSF) {this->fFilterBitFTSF = fbFTSF;};
158  Int_t GetFilterBitFTSF() const {return this->fFilterBitFTSF;};
163  // 2.) Event-by-event histograms:
164  void SetEBEHistogramsList(TList* const ehl) {this->fEBEHistogramsList = ehl;};
166  void SetEBEObjectsFlagsPro(TProfile* const ehfp) {this->fEBEObjectsFlagsPro = ehfp;};
167  TProfile* GetEBEObjectsFlagsPro() const {return this->fEBEObjectsFlagsPro;};
168  //void SetFillEBEHistograms(Bool_t feh) {this->fFillEBEHistograms = feh;}; // TBI rethink
169  //Bool_t GetFillEBEHistograms() const {return this->fFillEBEHistograms;};
170  // 3.) Correlation functions:
173  void SetCorrelationFunctionsFlagsPro(TProfile* const cffp) {this->fCorrelationFunctionsFlagsPro = cffp;};
183 
184  // 4.) Background:
185  void SetBackgroundList(TList* const bl) {this->fBackgroundList = bl;};
186  TList* GetBackgroundList() const {return this->fBackgroundList;}
187  void SetBackgroundFlagsPro(TProfile* const bfp) {this->fBackgroundFlagsPro = bfp;};
188  TProfile* GetBackgroundFlagsPro() const {return this->fBackgroundFlagsPro;};
195 
196  // 5.) Buffers:
197  void SetBuffersList(TList* const bl) {this->fBuffersList = bl;};
198  TList* GetBuffersList() const {return this->fBuffersList;}
199  void SetBuffersFlagsPro(TProfile* const bfp) {this->fBuffersFlagsPro = bfp;};
200  TProfile* GetBuffersFlagsPro() const {return this->fBuffersFlagsPro;};
201  void SetFillBuffers(Int_t mb) {this->fFillBuffers = kTRUE; this->fMaxBuffer = mb;};
202 
203  // 6.) QA:
204  void SetQAList(TList* const qal) {this->fQAList = qal;};
205  TList* GetQAList() const {return this->fQAList;}
206  void SetQAFlagsPro(TProfile* const qafp) {this->fQAFlagsPro = qafp;};
207  TProfile* GetQAlagsPro() const {return this->fQAFlagsPro;};
208  void SetBailOutAfterQA(Bool_t boaqa) {this->fBailOutAfterQA = boaqa;};
209  Bool_t GetBailOutAfterQA() const {return this->fBailOutAfterQA;};
210  void SetFillQAEvents(Bool_t ffqae) {this->fFillQAEvents = ffqae;};
211  Bool_t GetFillQAEvents() const {return this->fFillQAEvents;};
212  void SetFillQAParticles(Bool_t ffqap) {this->fFillQAParticles = ffqap;};
213  Bool_t GetFillQAParticles() const {return this->fFillQAParticles;};
214  void SetQAEventsList(TList* const qael) {this->fQAEventsList = qael;};
215  TList* GetQAEventsList() const {return this->fQAEventsList;}
216  void SetQAParticlesList(TList* const qapl) {this->fQAParticlesList = qapl;};
217  TList* GetQAParticlesList() const {return this->fQAParticlesList;}
218 
219  // 7.) Common event cuts:
224  void SetNumberOfTracks(Int_t minnoft, Int_t maxnoft)
225  {
226  fCutOnNumberOfTracks = kTRUE;
227  this->fMinNumberOfTracks = minnoft;
228  this->fMaxNumberOfTracks = maxnoft;
229  };
230  void SetNumberOfGlobalTracks(Int_t minnofgt, Int_t maxnofgt)
231  {
233  this->fMinNumberOfGlobalTracks = minnofgt;
234  this->fMaxNumberOfGlobalTracks = maxnofgt;
235  };
236  void SetNumberOfV0s(Int_t minnofV0s, Int_t maxnofV0s)
237  {
238  fCutOnNumberOfV0s = kTRUE;
239  this->fMinNumberOfV0s = minnofV0s;
240  this->fMaxNumberOfV0s = maxnofV0s;
241  };
242  void SetNumberOfCascades(Int_t minnofc, Int_t maxnofc)
243  {
244  fCutOnNumberOfCascades = kTRUE;
245  this->fMinNumberOfCascades = minnofc;
246  this->fMaxNumberOfCascades = maxnofc;
247  };
248  void SetVertexX(Float_t minvX, Float_t maxvX)
249  {
250  fCutOnVertexX = kTRUE;
251  this->fMinVertexX = minvX;
252  this->fMaxVertexX = maxvX;
253  };
254  void SetVertexY(Float_t minvY, Float_t maxvY)
255  {
256  fCutOnVertexY = kTRUE;
257  this->fMinVertexY = minvY;
258  this->fMaxVertexY = maxvY;
259  };
260  void SetVertexZ(Float_t minvZ, Float_t maxvZ)
261  {
262  fCutOnVertexZ = kTRUE;
263  this->fMinVertexZ = minvZ;
264  this->fMaxVertexZ = maxvZ;
265  };
266  void SetNContributors(Int_t minNc, Int_t maxNc)
267  {
268  fCutOnNContributors = kTRUE;
269  this->fMinNContributors = minNc;
270  this->fMaxNContributors = maxNc;
271  };
272 
273  // 8.) Common global track cuts:
275  {
276  fApplyGlobalTrackCuts = kTRUE;
277  this->fPtRange[0] = ptMin;
278  this->fPtRange[1] = ptMax;
279  };
280  void SetEtaRange(Float_t etaMin, Float_t etaMax)
281  {
282  fApplyGlobalTrackCuts = kTRUE;
283  this->fEtaRange[0] = etaMin;
284  this->fEtaRange[1] = etaMax;
285  };
286  void SetPhiRange(Float_t phiMin, Float_t phiMax)
287  {
288  fApplyGlobalTrackCuts = kTRUE;
289  this->fPhiRange[0] = phiMin;
290  this->fPhiRange[1] = phiMax;
291  };
292 
293  // *.) Online monitoring:
294  void SetUpdateOutputFile(const Int_t uf, const char *uqof)
295  {
296  // Example usage: taskMPF->SetUpdateOutputFile(44,"AnalysisResults.root");
297  this->fOnlineMonitoring = kTRUE;
298  this->fUpdateOutputFile = kTRUE;
299  this->fUpdateFrequency = uf;
300  this->fUpdateWhichOutputFile = new TString(uqof);
301  };
302  void SetMaxNumberOfEvents(const Int_t mnof, const char *uqof)
303  {
304  // Example usage: taskMPF->SetMaxNumberOfEvents(44,"AnalysisResults.root");
305  this->fOnlineMonitoring = kTRUE;
306  this->fMaxNumberOfEvents = mnof;
307  this->fUpdateWhichOutputFile = new TString(uqof);
308  };
309 
310  // *.) Debugging:
311  void SetWaitForSpecifiedEvent(UInt_t run, UShort_t bunchCross, UInt_t orbit, UInt_t period)
312  {
313  this->fDoSomeDebugging = kTRUE;
314  this->fWaitForSpecifiedEvent = kTRUE;
315  this->fRun = run;
316  this->fBunchCross = bunchCross;
317  this->fOrbit = orbit;
318  this->fPeriod = period;
319  }; // void SetWaitForSpecifiedEvent(UInt_t run, UShort_t bunchCross, UInt_t orbit, UInt_t period)
320 
321  private:
324 
325  TList *fHistList; // base list to hold all output object (a.k.a. grandmother of all lists)
327 
328  AliPIDResponse *fPIDResponse;
329 
330  Int_t fMaxNoGlobalTracksAOD; // maximum # of TExMap *fGlobalTracksAOD objects to be booked. Default is 3, one for default analysis, and two for event mixing
331  TExMap *fGlobalTracksAOD[10];
332  Bool_t fProcessBothKineAndReco; // process both aMC and aAOD, or aMC and aESD, typically to get purities (TBI: add support for ESD)
333  Bool_t fProcessOnlyKine; // process only aMC
334  Bool_t fProcessOnlyReco; // process only aAOD or aESD (i.e. disregard aMC even if available)
335  Bool_t fRejectFakeTracks; // if set to kFALSE, and if fMC is available, get the corresponding MC particle by taking absolute value of label
336  AliMCEvent *fMC; // placeholder for MC info
337 
338  // 1.) Control histograms:
339  TList *fControlHistogramsList; // list to hold all 'control histograms' objects
340  TProfile *fControlHistogramsFlagsPro; // profile to hold all flags for control histograms
341  Bool_t fFillControlHistograms; // not set directly, but instead via: fFillControlHistogramsEvent || fFillControlHistogramsNonIdentifiedParticles || ...
342  // 1a) Event (a.k.a. global event observables):
343  TList *fControlHistogramsEventList; // list to hold all 'control histograms' for events TBI
344  TProfile *fControlHistogramsEventFlagsPro; // profile to hold all flags for control histograms for events TBI
345  Bool_t fFillControlHistogramsEvent; // fill or not control histograms for global event observables
346  TH1I *fGetNumberOfTracksHist; // a{AOD,MC}->GetNumberOfTracks()
347  TH1I *fGetNumberOfGlobalTracksHist; // fGlobalTracksAOD[0]->GetSize() this is then my multiplicity...
348  TH1I *fGetNumberOfV0sHist; // aAOD->GetNumberOfV0s()
349  TH1I *fGetNumberOfCascadesHist; // aAOD->GetNumberOfCascades()
350  TH1D *fGetMagneticFieldHist; // aAOD->GetMagneticField()
351  TH1I *fGetEventTypeHist; // aAOD->GetEventType()
352  TH1D *fGetCentralityHist; // aAOD->GetCentrality()
353 
354  TH1F *fVertexXYZ[3];
355  TH1I *fGetNContributorsHist; // avtx->GetNContributors()
356  TH1F *fGetChi2perNDFHist; // avtx->GetChi2perNDF();
357  TH1I *fGetNDaughtersHist; // avtx->GetNDaughters();
358 
359  // 1b) Non-identified particles (for AOD these are "normal global" tracks, i.e. the ones which satisfy atrack->GetID()>=0 ):
360  TList *fControlHistogramsNonIdentifiedParticlesList; // list to hold all 'control histograms' for non-identified particles
361  TProfile *fControlHistogramsNonIdentifiedParticlesFlagsPro; // profile to hold all flags for control histograms for non-identified particles
362  Bool_t fFillControlHistogramsNonIdentifiedParticles; // fill or not control histograms for non-identified particles
363  TH1I *fChargeHist; // atrack->Charge()
364  TH1I *fGetTPCNclsHist; // atrack->GetTPCNcls()
365  TH1I *fGetTPCsignalNHist; // atrack->GetTPCsignalN()
366  TH1I *fGetITSNclsHist; // atrack->GetITSNcls()
367  TH2F *fdEdxVsPtHist; // atrack->GetTPCmomentum(),atrack->GetTPCsignal()
368  TH1F *fPtHist; // atrack->Pt()
369  TH1F *fEtaHist; // atrack->Eta()
370  TH1F *fPhiHist; // atrack->Phi()
371  TH1F *fMassHist; // atrack->M()
372  TH1I *fGetFilterMap; // atrack->GetFilterMap()
373  TH1I *fGetPdgCode; // atrack->GetPdgCode()
374 
375  // 1c) Non-identified particles for the specified filterbit (f.t.s.f.) (by default TPC-only):
376  TList *fControlHistogramsNonIdentifiedParticlesFTSFList; // list to hold all 'control histograms' for non-identified particles
377  TProfile *fControlHistogramsNonIdentifiedParticlesFTSFFlagsPro; // profile to hold all flags for control histograms for non-identified particles
378  Bool_t fFillControlHistogramsNonIdentifiedParticlesFTSF; // fill or not control histograms for non-identified particles
379  Int_t fFilterBitFTSF; // filter bit, relevant only for these group of control histos. For the particle selection, there is another flag
380  TH1I *fChargeFTSFHist; // atrack->Charge()
381  TH1I *fGetTPCNclsFTSFHist; // atrack->GetTPCNcls()
382  TH1I *fGetTPCsignalNFTSFHist; // atrack->GetTPCsignalN()
383  TH1I *fGetITSNclsFTSFHist; // atrack->GetITSNcls()
384  TH2F *fdEdxVsPtFTSFHist; // atrack->GetTPCmomentum(),atrack->GetTPCsignal()
385  TH1F *fPtFTSFHist; // atrack->Pt()
386  TH1F *fEtaFTSFHist; // atrack->Eta()
387  TH1F *fPhiFTSFHist; // atrack->Phi()
388  TH1F *fMassFTSFHist; // atrack->M()
389  TH1I *fGetFilterMapFTSF; // atrack->GetFilterMap()
390  TH1I *fGetPdgCodeFTSF; // atrack->GetPdgCode()
391 
392  // 1d) Identified particles:
393  TList *fControlHistogramsIdentifiedParticlesList; // list to hold all 'control histograms' for identified particles
394  TProfile *fControlHistogramsIdentifiedParticlesFlagsPro; // profile to hold all flags for control histograms for identified particles
395  Bool_t fFillControlHistogramsIdentifiedParticles; // fill or not control histograms for identified particles (by default they are not filled)
396  TH1F *fMassPIDHist[5][2][2];
397  TH1F *fPtPIDHist[5][2][2];
398  TH1F *fEtaPIDHist[5][2][2];
399  TH1F *fPhiPIDHist[5][2][2];
402 
403  // ...
404  // 1e) V0s:
405  TList *fControlHistogramsV0sList; // list to hold all 'control histograms' for V0s
406  TProfile *fControlHistogramsV0sFlagsPro; // profile to hold all flags for control histograms for V0s
407  Bool_t fFillControlHistogramsV0s; // fill or not control histograms for V0s (by default they are not filled)
408  TH1I *fGetNProngsHist; // aAODv0->GetNProngs()
409  TH1F *fMassK0ShortHist; // aAODv0->MassK0Short()
410  TH1F *fMassLambdaHist; // aAODv0->MassLambda()
411  TH1F *fMassAntiLambdaHist; // aAODv0->MassAntiLambda()
412  TH1F *fOpenAngleV0Hist; // aAODv0->OpenAngleV0() // same as aAODv0->ProngsRelAngle()
413  TH1F *fRadiusV0Hist; // aAODv0->RadiusV0()
414  TH1F *fDcaV0ToPrimVertexHist; // aAODv0->DcaV0ToPrimVertex()
415  TH1F *fMomV0XHist; // aAODv0->MomV0X()
416  TH1F *fMomV0YHist; // aAODv0->MomV0Y()
417  TH1F *fMomV0ZHist; // aAODv0->MomV0Z()
418  TH1F *fPtV0Hist; // pow(aAODv0->Pt2V0(),0.5)
419  TH1F *fPseudoRapV0Hist; // aAODv0->PseudoRapV0()
420  TH2F *fPAHist; // Pod.-Arm.
421 
422  // ...
423  // 1d) Cascades:
424  // ...
425 
426 
427  // 2.) Event-by-event objects:
428  TList *fEBEHistogramsList; // list to hold all stuff from e-b-e histograms
429  TProfile *fEBEObjectsFlagsPro; // profile to hold all flags for e-b-e histograms for V0s
430  //Bool_t fFillEBEHistograms; // fill or not e-b-e histograms TBI do I really need this?
431  TH1I *fUniqueIDHistEBE; // filled with aAODv0->GetPosID() and aAODv0->GetNegID(). If the bin corresponding to that ID is already filled, two V0s share the same daughter
432  TClonesArray *fPIDCA[5][2][2];
433  TClonesArray *fPIDV0sCA[1];
434 
435  // 3.) Correlation functions:
436  TList *fCorrelationFunctionsList; // list to hold all correlation functions for primary particle
437  TProfile *fCorrelationFunctionsFlagsPro; // profile to hold all flags for correlation functions
438  Bool_t fFillCorrelationFunctions; // fill or not correlation functions (by default they are not filled)
439  Bool_t fNormalizeCorrelationFunctions; // normalize correlation functions with the background
440  TExMap *fCorrelationFunctionsIndices; // associates pdg code to index of correlation function
441  TH1F *fCorrelationFunctions[10][10];
442  Bool_t fFill3pCorrelationFunctions; // fill 3-p correlation functions
443  TH1F *f3pCorrelationFunctions[10][10][10];
444  Bool_t fFill4pCorrelationFunctions; // fill 4-p correlation functions
445  TH1F *f4pCorrelationFunctions[10][10][10][10];
446 
447  // 4.) Background:
448  TList *fBackgroundList; // list to hold all correlation functions for primary particle
449  TProfile *fBackgroundFlagsPro; // profile to hold all flags for correlation functions
450  Bool_t fEstimate2pBackground; // enable or not 2p background estimation
451  Bool_t fEstimate3pBackground; // enable or not 3p background estimation
452  Bool_t fEstimate4pBackground; // enable or not 4p background estimation
453  TH1F *fBackground[10][10];
454  TH1F *f3pBackground[10][10][10];
455  TH1F *f4pBackground[10][10][10][10];
456  TClonesArray *fMixedEvents[4];
457 
458  // 5.) Buffers:
459  TList *fBuffersList; // list to hold all objects for buffers
460  TProfile *fBuffersFlagsPro; // profile to hold all flags for buffers
461  Bool_t fFillBuffers; // hold some thingies for bunch of events in memories
462  Int_t fMaxBuffer; // max buffer size (e.g. for 3-p correlations it is 3, etc.) TBI there is a problem apparently, re-think
463  TClonesArray *fChargedParticlesCA[2][10][10000]; // [0=AOD||ESD,1=MC][#events,max=10][particles]
464  TExMap *fChargedParticlesEM[10]; // [#events,max=10,has to correspond to 2nd entry above] this is standard mapping, nothing more nor less than that...
465 
466  // 6.) QA:
467  TList *fQAList; // list to holds all QA objects. It is nested in: a) "QA events"; b) "QA particles"; c) ...
468  TProfile *fQAFlagsPro; // list to holds all flags for QA objects
469  Bool_t fFillQA; // fill QA objects. Not set directly, but instead via: fFillQA = fFillQAEvents || fFillQAParticles || ...
470  Bool_t fBailOutAfterQA; // fill QA objects and bail out, i.e. do not do the actual analysis
471  Bool_t fFillQAEvents; // fill two sets of histograms, before and after event cuts
472  Bool_t fFillQAParticles; // fill two sets of histograms, before and after particle cuts
473  TList *fQAEventsList; // list to holds all objects for "QA events"
474  TList *fQAParticlesList; // list to holds all objects for "QA particles"
475  TH1I *fQAFilterBitScan; // for each track in AOD, dump it's filterbits
476  TH2I *fQAIDvsFilterBit; // atrack->ID() vs. filterbit
477  TH1F *fQAParticleHist[2][10][10]; // [0="before rain",1="after rain"][distribution_index][cut_index]
478 
479  // 7.) Common event cuts (TBI validated only for AOD analysis, for the time being...):
480  // a) Cuts on AliAODEvent:
481  Bool_t fRejectEventsWithoutPrimaryVertex; // as the name says it, by default set to kTRUE. has a setter
482  Float_t fMinMagneticField; // defaulted to 0.001, compared to aAOD->GetMagneticField()
483  Bool_t fCutOnNumberOfTracks; // cut on the total number of tracks in AOD, i.e. on aAOD->GetNumberOfTracks(). This is NOT multiplicity, since some tracks are stored multiple times in AOD
484  Int_t fMinNumberOfTracks; // default values never in effect; if aAOD->GetNumberOfTracks() < fMinNumberOfTracks, event is rejected
485  Int_t fMaxNumberOfTracks; // default values never in effect; if aAOD->GetNumberOfTracks() > fMaxNumberOfTracks, event is rejected
486  Bool_t fCutOnNumberOfGlobalTracks; // cut on the total number of 'normal' global tracks in AOD, i.e. on fGlobalTracksAOD[0]->GetSize()
487  Int_t fMinNumberOfGlobalTracks; // default values never in effect; if fGlobalTracksAOD[0]->GetSize() < fMinNumberOfGlobalTracks, event is rejected
488  Int_t fMaxNumberOfGlobalTracks; // default values never in effect; if fGlobalTracksAOD[0]->GetSize() > fMaxNumberOfGlobalTracks, event is rejected
489  Bool_t fCutOnNumberOfV0s; // cut on the total number of V0s in AOD, i.e. on aAOD->GetNumberOfV0s()
490  Int_t fMinNumberOfV0s; // default values never in effect; if aAOD->GetNumberOfV0s() < fMinNumberOfV0s, event is rejected
491  Int_t fMaxNumberOfV0s; // default values never in effect; if aAOD->GetNumberOfV0s() > fMaxNumberOfV0s, event is rejected
492  Bool_t fCutOnNumberOfCascades; // cut on the total number of cascades in AOD, i.e. on aAOD->GetNumberOfCascades()
493  Int_t fMinNumberOfCascades; // default values never in effect; if aAOD->GetNumberOfCascades() < fMinNumberOfCascades, event is rejected
494  Int_t fMaxNumberOfCascades; // default values never in effect; if aAOD->GetNumberOfCascades() > fMaxNumberOfCascades, event is rejected
495 
496  // b) Cuts on AliAODVertex:
497  Bool_t fCutOnVertexX; // cut on the x position of vertex, i.e. on avtx->GetX()
498  Float_t fMinVertexX; // default values never in effect; if avtx->GetX() < fMinVertexX, event is rejected
499  Float_t fMaxVertexX; // default values never in effect; if avtx->GetX() > fMaxVertexX, event is rejected
500  Bool_t fCutOnVertexY; // cut on the y position of vertex, i.e. on avtx->GetY()
501  Float_t fMinVertexY; // default values never in effect; if avtx->GetY() < fMinVertexY, event is rejected
502  Float_t fMaxVertexY; // default values never in effect; if avtx->GetY() > fMaxVertexY, event is rejected
503  Bool_t fCutOnVertexZ; // cut on the z position of vertex, i.e. on avtx->GetZ()
504  Float_t fMinVertexZ; // default values never in effect; if avtx->GetZ() < fMinVertexZ, event is rejected
505  Float_t fMaxVertexZ; // default values never in effect; if avtx->GetZ() > fMaxVertexZ, event is rejected
506  Bool_t fCutOnNContributors; // cut on avtx->GetNContributors()
507  Int_t fMinNContributors; // default values never in effect; if avtx->GetNContributors() < fMinNContributors, event is rejected
508  Int_t fMaxNContributors; // default values never in effect; if avtx->GetNContributors() > fMaxNContributors, event is rejected
509 
510  // 8.) Common global track cuts (applied only on "normal" global tracks in AOD):
511  TList *fGlobalTrackCutsList; // list to hold all objects for common global track cuts
512  TProfile *fGlobalTrackCutsFlagsPro; // profile to hold all flags
513  Bool_t fApplyGlobalTrackCuts; // if set to kFALSE, the default hardwired cuts will be used
514  Float_t fPtRange[2]; // ptMin = fPtRange[0], ptMax = fPtRange[1]
515  Float_t fEtaRange[2]; // etaMin = etaRange[0], etaMax = etaRange[1]
516  Float_t fPhiRange[2]; // phiMin = phiRange[0], phiMax = phiRange[1]
517 
518  // *.) Online monitoring:
519  Bool_t fOnlineMonitoring; // enable online monitoring (not set excplicitly!), the flags below just refine it
520  Bool_t fUpdateOutputFile; // update the output file after certain number of analysed events
521  Int_t fUpdateFrequency; // after how many events the output file will be updated
522  TString *fUpdateWhichOutputFile; // which file will be regularly updated
523  Int_t fMaxNumberOfEvents; // if this number of events is reached, write to external file and bail out
524 
525  // *.) Debugging:
532 
534 
535 };
536 
537 //================================================================================================================
538 
539 #endif
540 
541 
542 
543 
544 
545 
546 
547 
548 
549 
550 
Int_t charge
double Double_t
Definition: External.C:58
ClassDef(AliAnalysisTaskMultiparticleFemtoscopy, 8)
do something only for the specified event
Definition: External.C:236
TList * fCorrelationFunctionsList
holds AliAODv0 candidates for each event [0=Lambda,1=...]
UInt_t fOrbit
do something only for the specified event
TH1F * fPtPIDHist[5][2][2]
[0=e,1=mu,2=pi,3=K,4=p][particle(+q)/antiparticle(-q)][kPrimary/kFromDecayVtx]
TH1F * fPhiPIDHist[5][2][2]
[0=e,1=mu,2=pi,3=K,4=p][particle(+q)/antiparticle(-q)][kPrimary/kFromDecayVtx]
AliAnalysisTaskMultiparticleFemtoscopy & operator=(const AliAnalysisTaskMultiparticleFemtoscopy &aatmpf)
TH1F * fEtaPIDHist[5][2][2]
[0=e,1=mu,2=pi,3=K,4=p][particle(+q)/antiparticle(-q)][kPrimary/kFromDecayVtx]
void SetNumberOfGlobalTracks(Int_t minnofgt, Int_t maxnofgt)
Bool_t SpecifiedEvent(UInt_t run, UShort_t bunchCross, UInt_t orbit, UInt_t period)
Double_t ptMin
void SetWaitForSpecifiedEvent(UInt_t run, UShort_t bunchCross, UInt_t orbit, UInt_t period)
Bool_t Proton(AliAODTrack *atrack, Int_t charge=1, Bool_t bPrimary=kTRUE)
virtual void CalculateBackground(TClonesArray *ca1, TClonesArray *ca2)
UInt_t fRun
do something only for the specified event
void SetMaxNumberOfEvents(const Int_t mnof, const char *uqof)
TList * fBuffersList
tracks for mixed events (supporting up to 4-mixed events at the moment)
void SetUpdateOutputFile(const Int_t uf, const char *uqof)
int Int_t
Definition: External.C:63
Definition: External.C:204
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
TClonesArray * fPIDV0sCA[1]
holds AliAODTrack candidates for each event [0=e,1=mu,2=pi,3=K,4=p][particle(+q)/antiparticle(-q)][kP...
Double_t RelativeMomenta(AliAODTrack *agtrack1, AliAODTrack *agtrack2)
TList * fBackgroundList
[particle(+q): 0=e,1=mu,2=pi,3=K,4=p, anti-particle(-q): 5=e,6=mu,7=pi,8=K,9=p] x [same] x [same] x [...
Definition: External.C:212
Bool_t Pion(AliAODTrack *atrack, Int_t charge=1, Bool_t bPrimary=kTRUE)
Double_t Q4(AliAODTrack *agtrack1, AliAODTrack *agtrack2, AliAODTrack *agtrack3, AliAODTrack *agtrack4)
UShort_t fBunchCross
do something only for the specified event
Bool_t Kaon(AliAODTrack *atrack, Int_t charge=1, Bool_t bPrimary=kTRUE)
Bool_t fFill4pCorrelationFunctions
[particle(+q): 0=e,1=mu,2=pi,3=K,4=p, anti-particle(-q): 5=e,6=mu,7=pi,8=K,9=p] x [same] x [same]...
virtual void GlobalTracksAOD(AliAODEvent *aAOD, Int_t index)
AliPIDResponse * fPIDResponse
MC, AOD, ESD, MC_AOD or MC_ESD.
TH1F * f4pBackground[10][10][10][10]
[particle(+q): 0=e,1=mu,2=pi,3=K,4=p, anti-particle(-q): 0=e,1=mu,2=pi,3=K,4=p] x [same] x [same] ...
virtual void Calculate4pBackground(TClonesArray *ca1, TClonesArray *ca2, TClonesArray *ca3, TClonesArray *ca4)
virtual void Calculate3pBackground(TClonesArray *ca1, TClonesArray *ca2, TClonesArray *ca3)
TClonesArray * fMixedEvents[4]
[particle(+q): 0=e,1=mu,2=pi,3=K,4=p, anti-particle(-q): 0=e,1=mu,2=pi,3=K,4=p] x [same] x [same] ...
virtual void FillControlHistogramsNonIdentifiedParticles(AliAODTrack *atrack)
Double_t Q3(AliAODTrack *agtrack1, AliAODTrack *agtrack2, AliAODTrack *agtrack3)
Bool_t fProcessBothKineAndReco
global tracks in AOD. [0] is used in the default analysis, [1] and [2] for event mixing, etc.
UInt_t fPeriod
do something only for the specified event
Double_t fInclusiveSigmaCuts[5]
[0=e,1=mu,2=pi,3=K,4=p][particle(+q)/antiparticle(-q)][kPrimary/kFromDecayVtx]
virtual void FillControlHistogramsIdentifiedParticles(AliAODTrack *atrack, AliAODTrack *gtrack)
Bool_t fFill3pCorrelationFunctions
[particle(+q): 0=e,1=mu,2=pi,3=K,4=p, anti-particle(-q): 5=e,6=mu,7=pi,8=K,9=p] x [same]...
unsigned short UShort_t
Definition: External.C:28
TList * fControlHistogramsV0sList
[PID function][PID exclusive] see .cxx for detailed documentation
const char Option_t
Definition: External.C:48
Bool_t fWaitForSpecifiedEvent
enable call to function within which debugging is done. Set indirectly.
bool Bool_t
Definition: External.C:53
Double_t ptMax
TH1F * f3pBackground[10][10][10]
[particle(+q): 0=e,1=mu,2=pi,3=K,4=p, anti-particle(-q): 0=e,1=mu,2=pi,3=K,4=p] x [same]...
TH1I * fGetNContributorsHist
[avtx->GetX(),avtx->GetY(),avtx->GetZ()]
Double_t fExclusiveSigmaCuts[5][5]
[PID function] see .cxx for detailed documentation
virtual void FillControlHistogramsNonIdentifiedParticlesFTSF(AliAODTrack *atrack)