AliPhysics  6cf2591 (6cf2591)
 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;};
197  void Set2pCorrelationFunctionsFlagsPro(TProfile* const cffp2p) {this->f2pCorrelationFunctionsFlagsPro = cffp2p;};
199  void Set3pCorrelationFunctionsFlagsPro(TProfile* const cffp3p) {this->f3pCorrelationFunctionsFlagsPro = cffp3p;};
201  void Set4pCorrelationFunctionsFlagsPro(TProfile* const cffp4p) {this->f4pCorrelationFunctionsFlagsPro = cffp4p;};
211 
212  // 4.) Background:
213  void SetBackgroundList(TList* const bl) {this->fBackgroundList = bl;};
214  TList* GetBackgroundList() const {return this->fBackgroundList;}
215  void SetBackgroundFlagsPro(TProfile* const bfp) {this->fBackgroundFlagsPro = bfp;};
216  TProfile* GetBackgroundFlagsPro() const {return this->fBackgroundFlagsPro;};
217  void Set2pBackgroundFlagsPro(TProfile* const bfp2p) {this->f2pBackgroundFlagsPro = bfp2p;};
218  TProfile* Get2pBackgroundFlagsPro() const {return this->f2pBackgroundFlagsPro;};
219  void Set3pBackgroundFlagsPro(TProfile* const bfp3p) {this->f3pBackgroundFlagsPro = bfp3p;};
220  TProfile* Get3pBackgroundFlagsPro() const {return this->f3pBackgroundFlagsPro;};
221  void Set4pBackgroundFlagsPro(TProfile* const bfp4p) {this->f4pBackgroundFlagsPro = bfp4p;};
222  TProfile* Get4pBackgroundFlagsPro() const {return this->f4pBackgroundFlagsPro;};
224  Int_t GetBackgroundOption() const {return this->fBackgroundOption;};
231  void SetMaxBufferSize1(Int_t mbs1) {this->fMaxBufferSize1 = mbs1;};
232  Int_t GetMaxBufferSize1() const {return this->fMaxBufferSize1;};
233 
234  // 5.) Buffers:
235  void SetBuffersList(TList* const bl) {this->fBuffersList = bl;};
236  TList* GetBuffersList() const {return this->fBuffersList;}
237  void SetBuffersFlagsPro(TProfile* const bfp) {this->fBuffersFlagsPro = bfp;};
238  TProfile* GetBuffersFlagsPro() const {return this->fBuffersFlagsPro;};
239  void SetFillBuffers(Int_t mb) {this->fFillBuffers = kTRUE; this->fMaxBuffer = mb;};
240 
241  // 6.) QA:
242  void SetQAList(TList* const qal) {this->fQAList = qal;};
243  TList* GetQAList() const {return this->fQAList;}
244  void SetQAFlagsPro(TProfile* const qafp) {this->fQAFlagsPro = qafp;};
245  TProfile* GetQAlagsPro() const {return this->fQAFlagsPro;};
246  void SetBailOutAfterQA(Bool_t boaqa) {this->fBailOutAfterQA = boaqa;};
247  Bool_t GetBailOutAfterQA() const {return this->fBailOutAfterQA;};
248  void SetFillQAEvents(Bool_t ffqae) {this->fFillQAEvents = ffqae;};
249  Bool_t GetFillQAEvents() const {return this->fFillQAEvents;};
250  void SetFillQAParticles(Bool_t ffqap) {this->fFillQAParticles = ffqap;};
251  Bool_t GetFillQAParticles() const {return this->fFillQAParticles;};
252  void SetQAEventsList(TList* const qael) {this->fQAEventsList = qael;};
253  TList* GetQAEventsList() const {return this->fQAEventsList;}
254  void SetQAParticlesList(TList* const qapl) {this->fQAParticlesList = qapl;};
255  TList* GetQAParticlesList() const {return this->fQAParticlesList;}
256 
257  // 7.) Common event cuts:
262  void SetNumberOfTracks(Int_t minnoft, Int_t maxnoft)
263  {
264  fCutOnNumberOfTracks = kTRUE;
265  this->fMinNumberOfTracks = minnoft;
266  this->fMaxNumberOfTracks = maxnoft;
267  };
268  void SetNumberOfGlobalTracks(Int_t minnofgt, Int_t maxnofgt)
269  {
271  this->fMinNumberOfGlobalTracks = minnofgt;
272  this->fMaxNumberOfGlobalTracks = maxnofgt;
273  };
274  void SetNumberOfV0s(Int_t minnofV0s, Int_t maxnofV0s)
275  {
276  fCutOnNumberOfV0s = kTRUE;
277  this->fMinNumberOfV0s = minnofV0s;
278  this->fMaxNumberOfV0s = maxnofV0s;
279  };
280  void SetNumberOfCascades(Int_t minnofc, Int_t maxnofc)
281  {
282  fCutOnNumberOfCascades = kTRUE;
283  this->fMinNumberOfCascades = minnofc;
284  this->fMaxNumberOfCascades = maxnofc;
285  };
286  void SetVertexX(Float_t minvX, Float_t maxvX)
287  {
288  fCutOnVertexX = kTRUE;
289  this->fMinVertexX = minvX;
290  this->fMaxVertexX = maxvX;
291  };
292  void SetVertexY(Float_t minvY, Float_t maxvY)
293  {
294  fCutOnVertexY = kTRUE;
295  this->fMinVertexY = minvY;
296  this->fMaxVertexY = maxvY;
297  };
298  void SetVertexZ(Float_t minvZ, Float_t maxvZ)
299  {
300  fCutOnVertexZ = kTRUE;
301  this->fMinVertexZ = minvZ;
302  this->fMaxVertexZ = maxvZ;
303  };
304  void SetNContributors(Int_t minNc, Int_t maxNc)
305  {
306  fCutOnNContributors = kTRUE;
307  this->fMinNContributors = minNc;
308  this->fMaxNContributors = maxNc;
309  };
310 
311  // 8.) Common global track cuts: // TBI at the moment, they are applied both to 'atracks' and 'gtracks', decouple eventually
313  {
314  fApplyGlobalTrackCuts = kTRUE;
315  this->fPtRange[0] = ptMin;
316  this->fPtRange[1] = ptMax;
317  };
318  void SetEtaRange(Float_t etaMin, Float_t etaMax)
319  {
320  fApplyGlobalTrackCuts = kTRUE;
321  this->fEtaRange[0] = etaMin;
322  this->fEtaRange[1] = etaMax;
323  };
324  void SetPhiRange(Float_t phiMin, Float_t phiMax)
325  {
326  fApplyGlobalTrackCuts = kTRUE;
327  this->fPhiRange[0] = phiMin;
328  this->fPhiRange[1] = phiMax;
329  };
330 
331  // *.) Online monitoring:
332  void SetUpdateOutputFile(const Int_t uf, const char *uqof)
333  {
334  // Example usage: taskMPF->SetUpdateOutputFile(44,"AnalysisResults.root");
335  this->fOnlineMonitoring = kTRUE;
336  this->fUpdateOutputFile = kTRUE;
337  this->fUpdateFrequency = uf;
338  this->fUpdateWhichOutputFile = new TString(uqof);
339  };
340  void SetMaxNumberOfEvents(const Int_t mnof, const char *uqof)
341  {
342  // Example usage: taskMPF->SetMaxNumberOfEvents(44,"AnalysisResults.root");
343  this->fOnlineMonitoring = kTRUE;
344  this->fMaxNumberOfEvents = mnof;
345  this->fUpdateWhichOutputFile = new TString(uqof);
346  };
347 
348  // *.) Debugging:
349  void SetWaitForSpecifiedEvent(UInt_t run, UShort_t bunchCross, UInt_t orbit, UInt_t period)
350  {
351  this->fDoSomeDebugging = kTRUE;
352  this->fWaitForSpecifiedEvent = kTRUE;
353  this->fRun = run;
354  this->fBunchCross = bunchCross;
355  this->fOrbit = orbit;
356  this->fPeriod = period;
357  }; // void SetWaitForSpecifiedEvent(UInt_t run, UShort_t bunchCross, UInt_t orbit, UInt_t period)
358 
359  private:
362 
363  TList *fHistList; // base list to hold all output object (a.k.a. grandmother of all lists)
365 
366  AliPIDResponse *fPIDResponse;
367 
368  Int_t fMaxNoGlobalTracksAOD; // maximum # of TExMap *fGlobalTracksAOD objects to be booked. Default is 3, one for default analysis, and two for event mixing
369  TExMap *fGlobalTracksAOD[10];
370  Bool_t fProcessBothKineAndReco; // process both aMC and aAOD, or aMC and aESD, typically to get purities (TBI: add support for ESD)
371  Bool_t fProcessOnlyKine; // process only aMC
372  Bool_t fProcessOnlyReco; // process only aAOD or aESD (i.e. disregard aMC even if available)
373  Bool_t fRejectFakeTracks; // if set to kFALSE, and if fMC is available, get the corresponding MC particle by taking absolute value of label
374  AliMCEvent *fMC; // placeholder for MC info
375 
376  // 1.) Control histograms:
377  TList *fControlHistogramsList; // list to hold all 'control histograms' objects
378  TProfile *fControlHistogramsFlagsPro; // profile to hold all flags for control histograms
379  Bool_t fFillControlHistograms; // not set directly, but instead via: fFillControlHistogramsEvent || fFillControlHistogramsNonIdentifiedParticles || ...
380  // 1a) Event (a.k.a. global event observables):
381  TList *fControlHistogramsEventList; // list to hold all 'control histograms' for events TBI
382  TProfile *fControlHistogramsEventFlagsPro; // profile to hold all flags for control histograms for events TBI
383  Bool_t fFillControlHistogramsEvent; // fill or not control histograms for global event observables
384  TH1I *fGetNumberOfTracksHist; // a{AOD,MC}->GetNumberOfTracks()
386  TH1I *fGetNumberOfV0sHist; // aAOD->GetNumberOfV0s()
387  TH1I *fGetNumberOfCascadesHist; // aAOD->GetNumberOfCascades()
388  TH1D *fGetMagneticFieldHist; // aAOD->GetMagneticField()
389  TH1I *fGetEventTypeHist; // aAOD->GetEventType()
390  TH1D *fGetCentralityHist; // aAOD->GetCentrality()
391  TH1F *fVertexXYZ[3];
392  TH1I *fGetNContributorsHist; // avtx->GetNContributors()
393  TH1F *fGetChi2perNDFHist; // avtx->GetChi2perNDF();
394  TH1I *fGetNDaughtersHist; // avtx->GetNDaughters();
395 
396  // 1b) Non-identified particles (for AOD these are "normal global" tracks, i.e. the ones which satisfy atrack->GetID()>=0 ):
397  TList *fControlHistogramsNonIdentifiedParticlesList; // list to hold all 'control histograms' for non-identified particles
398  TProfile *fControlHistogramsNonIdentifiedParticlesFlagsPro; // profile to hold all flags for control histograms for non-identified particles
399  Bool_t fFillControlHistogramsNonIdentifiedParticles; // fill or not control histograms for non-identified particles
400  TH1I *fChargeHist; // atrack->Charge()
401  TH1I *fGetTPCNclsHist; // atrack->GetTPCNcls()
402  TH1I *fGetTPCsignalNHist; // atrack->GetTPCsignalN()
403  TH1I *fGetITSNclsHist; // atrack->GetITSNcls()
404  TH2F *fdEdxVsPtHist; // atrack->GetTPCmomentum(),atrack->GetTPCsignal()
405  TH1F *fPtHist; // atrack->Pt()
406  TH1F *fEtaHist; // atrack->Eta()
407  TH1F *fPhiHist; // atrack->Phi()
408  TH1F *fMassHist; // atrack->M()
409  TH1I *fGetFilterMap; // atrack->GetFilterMap()
410  TH1I *fGetPdgCode; // atrack->GetPdgCode()
411 
412  // 1c) Non-identified particles for the specified filterbit (f.t.s.f.) (by default TPC-only):
413  TList *fControlHistogramsNonIdentifiedParticlesFTSFList; // list to hold all 'control histograms' for non-identified particles
414  TProfile *fControlHistogramsNonIdentifiedParticlesFTSFFlagsPro; // profile to hold all flags for control histograms for non-identified particles
415  Bool_t fFillControlHistogramsNonIdentifiedParticlesFTSF; // fill or not control histograms for non-identified particles
416  Int_t fFilterBitFTSF; // filter bit, relevant only for these group of control histos. For the particle selection, there is another flag
417  TH1I *fChargeFTSFHist; // atrack->Charge()
418  TH1I *fGetTPCNclsFTSFHist; // atrack->GetTPCNcls()
419  TH1I *fGetTPCsignalNFTSFHist; // atrack->GetTPCsignalN()
420  TH1I *fGetITSNclsFTSFHist; // atrack->GetITSNcls()
421  TH2F *fdEdxVsPtFTSFHist; // atrack->GetTPCmomentum(),atrack->GetTPCsignal()
422  TH1F *fPtFTSFHist; // atrack->Pt()
423  TH1F *fEtaFTSFHist; // atrack->Eta()
424  TH1F *fPhiFTSFHist; // atrack->Phi()
425  TH1F *fMassFTSFHist; // atrack->M()
426  TH1I *fGetFilterMapFTSF; // atrack->GetFilterMap()
427  TH1I *fGetPdgCodeFTSF; // atrack->GetPdgCode()
428 
429  // 1d) Identified particles:
430  TList *fControlHistogramsIdentifiedParticlesList; // list to hold all 'control histograms' for identified particles
431  TProfile *fControlHistogramsIdentifiedParticlesFlagsPro; // profile to hold all flags for control histograms for identified particles
432  Bool_t fFillControlHistogramsIdentifiedParticles; // fill or not control histograms for identified particles (by default they are not filled)
433  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
434  TProfile *fInclusiveSigmaCutsPro; // holds the values of fInclusiveSigmaCuts[5];
435  TProfile2D *fExclusiveSigmaCutsPro; // holds the values of fExclusiveSigmaCuts[5][5];
436  TH1F *fMassPIDHist[5][2][2];
437  TH1F *fPtPIDHist[5][2][2];
438  TH1F *fEtaPIDHist[5][2][2];
439  TH1F *fPhiPIDHist[5][2][2];
440  Bool_t fUseDefaultInclusiveSigmaCuts; // if the setter SetInclusiveSigmaCuts(...) (see above) is not called explicitly, the default hardwired values will be used
441  Bool_t fUseDefaultExclusiveSigmaCuts; // if the setter SetExclusiveSigmaCuts(...) (see above) is not called explicitly, the default hardwired values will be used
442  Double_t fInclusiveSigmaCuts[5]; // [PID function] see .cxx for detailed documentation
443  Double_t fExclusiveSigmaCuts[5][5]; // [PID function][PID exclusive] see .cxx for detailed documentation
444 
445  // ...
446  // 1e) V0s:
447  TList *fControlHistogramsV0sList; // list to hold all 'control histograms' for V0s
448  TProfile *fControlHistogramsV0sFlagsPro; // profile to hold all flags for control histograms for V0s
449  Bool_t fFillControlHistogramsV0s; // fill or not control histograms for V0s (by default they are not filled)
450  TH1I *fGetNProngsHist; // aAODv0->GetNProngs()
451  TH1F *fMassK0ShortHist; // aAODv0->MassK0Short()
452  TH1F *fMassLambdaHist; // aAODv0->MassLambda()
453  TH1F *fMassAntiLambdaHist; // aAODv0->MassAntiLambda()
454  TH1F *fOpenAngleV0Hist; // aAODv0->OpenAngleV0() // same as aAODv0->ProngsRelAngle()
455  TH1F *fRadiusV0Hist; // aAODv0->RadiusV0()
456  TH1F *fDcaV0ToPrimVertexHist; // aAODv0->DcaV0ToPrimVertex()
457  TH1F *fMomV0XHist; // aAODv0->MomV0X()
458  TH1F *fMomV0YHist; // aAODv0->MomV0Y()
459  TH1F *fMomV0ZHist; // aAODv0->MomV0Z()
460  TH1F *fPtV0Hist; // pow(aAODv0->Pt2V0(),0.5)
461  TH1F *fPseudoRapV0Hist; // aAODv0->PseudoRapV0()
462  TH2F *fPAHist; // Pod.-Arm.
463 
464  // ...
465  // 1d) Cascades:
466  // ...
467 
468  // 2.) Event-by-event objects:
469  TList *fEBEHistogramsList; // list to hold all stuff from e-b-e histograms
470  TProfile *fEBEObjectsFlagsPro; // profile to hold all flags for e-b-e histograms for V0s
471  //Bool_t fFillEBEHistograms; // fill or not e-b-e histograms TBI do I really need this?
472  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
473  TClonesArray *fPIDCA[5][2][2];
474  TClonesArray *fPIDV0sCA[1];
475 
476  // 3.) Correlation functions:
477  TList *fCorrelationFunctionsList; // list to hold all correlation functions for primary particle
478  TProfile *fCorrelationFunctionsFlagsPro; // profile to hold all flags for correlation functions
479  TProfile *f2pCorrelationFunctionsFlagsPro; // profile to hold all flags for 2p correlation functions (placed in fCorrelationFunctionsSublist[0])
480  TProfile *f3pCorrelationFunctionsFlagsPro; // profile to hold all flags for 3p correlation functions (placed in fCorrelationFunctionsSublist[1])
481  TProfile *f4pCorrelationFunctionsFlagsPro; // profile to hold all flags for 4p correlation functions (placed in fCorrelationFunctionsSublist[2])
483  Bool_t fFillCorrelationFunctions; // fill or not correlation functions (by default they are not filled)
484  Bool_t fNormalizeCorrelationFunctions; // normalize correlation functions with the background
486  TH1F *fCorrelationFunctions[10][10];
487  Bool_t fFill3pCorrelationFunctions; // fill 3-p correlation functions
488  TH1F *f3pCorrelationFunctions[10][10][10];
489  Bool_t fFill4pCorrelationFunctions; // fill 4-p correlation functions
490  TH1F *f4pCorrelationFunctions[10][10][10][10];
491 
492  // 4.) Background:
493  TList *fBackgroundList; // list to hold all background objects primary particle
494  TProfile *fBackgroundFlagsPro; // profile to hold all flags for background
495  TProfile *f2pBackgroundFlagsPro; // profile to hold all flags for 2p background (placed in fBackgroundSublist[0])
496  TProfile *f3pBackgroundFlagsPro; // profile to hold all flags for 3p background (placed in fBackgroundSublist[1])
497  TProfile *f4pBackgroundFlagsPro; // profile to hold all flags for 4p background (placed in fBackgroundSublist[2])
499  Int_t fBackgroundOption; // set how to estimate background: 0 = "shifting", 1 = "permutations", etc. (see .cxx for further explanation). By default, it is "shifting"
500  Bool_t fEstimate2pBackground; // enable or not 2p background estimation
501  Bool_t fEstimate3pBackground; // enable or not 3p background estimation
502  Bool_t fEstimate4pBackground; // enable or not 4p background estimation
503  TH1F *f2pBackground[10][10];
504  TH1F *f3pBackground[10][10][10];
505  TH1F *f4pBackground[10][10][10][10];
506  TClonesArray *fMixedEvents0[3];
507  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
508  TClonesArray *fMixedEvents1[10][50];
509  TExMap *fGlobalTracksAOD1[10][50];
510 
511  // 5.) Buffers:
512  TList *fBuffersList; // list to hold all objects for buffers
513  TProfile *fBuffersFlagsPro; // profile to hold all flags for buffers
514  Bool_t fFillBuffers; // hold some thingies for bunch of events in memories
515  Int_t fMaxBuffer; // max buffer size (e.g. for 3-p correlations it is 3, etc.) TBI there is a problem apparently, re-think
516  TClonesArray *fChargedParticlesCA[2][10][10000];
517  TExMap *fChargedParticlesEM[10];
518 
519  // 6.) QA:
520  TList *fQAList; // list to holds all QA objects. It is nested in: a) "QA events"; b) "QA particles"; c) ...
521  TProfile *fQAFlagsPro; // list to holds all flags for QA objects
522  Bool_t fFillQA; // fill QA objects. Not set directly, but instead via: fFillQA = fFillQAEvents || fFillQAParticles || ...
523  Bool_t fBailOutAfterQA; // fill QA objects and bail out, i.e. do not do the actual analysis
524  Bool_t fFillQAEvents; // fill two sets of histograms, before and after event cuts
525  Bool_t fFillQAParticles; // fill two sets of histograms, before and after particle cuts
526  TList *fQAEventsList; // list to holds all objects for "QA events"
527  TList *fQAParticlesList; // list to holds all objects for "QA particles"
528  TH1I *fQAFilterBitScan; // for each track in AOD, dump it's filterbits
529  TH2I *fQAIDvsFilterBit; // atrack->ID() vs. filterbit
530  TH1F *fQAParticleHist[2][10][10];
531 
532  // 7.) Common event cuts (TBI validated only for AOD analysis, for the time being...):
533  // a) Cuts on AliAODEvent:
534  Bool_t fRejectEventsWithoutPrimaryVertex; // as the name says it, by default set to kTRUE. has a setter
535  Float_t fMinMagneticField; // defaulted to 0.001, compared to aAOD->GetMagneticField()
536  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
537  Int_t fMinNumberOfTracks; // default values never in effect; if aAOD->GetNumberOfTracks() < fMinNumberOfTracks, event is rejected
538  Int_t fMaxNumberOfTracks; // default values never in effect; if aAOD->GetNumberOfTracks() > fMaxNumberOfTracks, event is rejected
539  Bool_t fCutOnNumberOfGlobalTracks; // cut on the total number of 'normal' global tracks in AOD, i.e. on fGlobalTracksAOD[0]->GetSize()
540  Int_t fMinNumberOfGlobalTracks; // default values never in effect; if fGlobalTracksAOD[0]->GetSize() < fMinNumberOfGlobalTracks, event is rejected
541  Int_t fMaxNumberOfGlobalTracks; // default values never in effect; if fGlobalTracksAOD[0]->GetSize() > fMaxNumberOfGlobalTracks, event is rejected
542  Bool_t fCutOnNumberOfV0s; // cut on the total number of V0s in AOD, i.e. on aAOD->GetNumberOfV0s()
543  Int_t fMinNumberOfV0s; // default values never in effect; if aAOD->GetNumberOfV0s() < fMinNumberOfV0s, event is rejected
544  Int_t fMaxNumberOfV0s; // default values never in effect; if aAOD->GetNumberOfV0s() > fMaxNumberOfV0s, event is rejected
545  Bool_t fCutOnNumberOfCascades; // cut on the total number of cascades in AOD, i.e. on aAOD->GetNumberOfCascades()
546  Int_t fMinNumberOfCascades; // default values never in effect; if aAOD->GetNumberOfCascades() < fMinNumberOfCascades, event is rejected
547  Int_t fMaxNumberOfCascades; // default values never in effect; if aAOD->GetNumberOfCascades() > fMaxNumberOfCascades, event is rejected
548  // b) Cuts on AliAODVertex:
549 
550  Bool_t fCutOnVertexX; // cut on the x position of vertex, i.e. on avtx->GetX()
551  Float_t fMinVertexX; // default values never in effect; if avtx->GetX() < fMinVertexX, event is rejected
552  Float_t fMaxVertexX; // default values never in effect; if avtx->GetX() > fMaxVertexX, event is rejected
553  Bool_t fCutOnVertexY; // cut on the y position of vertex, i.e. on avtx->GetY()
554  Float_t fMinVertexY; // default values never in effect; if avtx->GetY() < fMinVertexY, event is rejected
555  Float_t fMaxVertexY; // default values never in effect; if avtx->GetY() > fMaxVertexY, event is rejected
556  Bool_t fCutOnVertexZ; // cut on the z position of vertex, i.e. on avtx->GetZ()
557  Float_t fMinVertexZ; // default values never in effect; if avtx->GetZ() < fMinVertexZ, event is rejected
558  Float_t fMaxVertexZ; // default values never in effect; if avtx->GetZ() > fMaxVertexZ, event is rejected
559  Bool_t fCutOnNContributors; // cut on avtx->GetNContributors()
560  Int_t fMinNContributors; // default values never in effect; if avtx->GetNContributors() < fMinNContributors, event is rejected
561  Int_t fMaxNContributors; // default values never in effect; if avtx->GetNContributors() > fMaxNContributors, event is rejected
562 
563  // 8.) Common global track cuts (applied only on "normal" global tracks in AOD):
564  TList *fGlobalTrackCutsList; // list to hold all objects for common global track cuts
565  TProfile *fGlobalTrackCutsFlagsPro; // profile to hold all flags
566  Bool_t fApplyGlobalTrackCuts; // if set to kFALSE, the default hardwired cuts will be used. TBI doesn't do anything at the moment in .cxx
567  Float_t fPtRange[2]; // ptMin = fPtRange[0], ptMax = fPtRange[1]
568  Float_t fEtaRange[2]; // etaMin = etaRange[0], etaMax = etaRange[1]
569  Float_t fPhiRange[2]; // phiMin = phiRange[0], phiMax = phiRange[1]
570 
571  // *.) Online monitoring:
572  Bool_t fOnlineMonitoring; // enable online monitoring (not set excplicitly!), the flags below just refine it
573  Bool_t fUpdateOutputFile; // update the output file after certain number of analysed events
574  Int_t fUpdateFrequency; // after how many events the output file will be updated
575  TString *fUpdateWhichOutputFile; // which file will be regularly updated
576  Int_t fMaxNumberOfEvents; // if this number of events is reached, write to external file and bail out
577 
578  // *.) Debugging:
579  Bool_t fDoSomeDebugging; // enable call to function within which debugging is done. Set indirectly.
580  Bool_t fWaitForSpecifiedEvent; // do something only for the specified event
581  UInt_t fRun; // do something only for the specified event
582  UShort_t fBunchCross; // do something only for the specified event
583  UInt_t fOrbit; // do something only for the specified event
584  UInt_t fPeriod; // do something only for the specified event
585 
587 
588 };
589 
590 //================================================================================================================
591 
592 #endif
593 
594 
595 
596 
597 
598 
599 
600 
601 
602 
603 
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)
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]...
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)