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