AliPhysics  vAN-20150427 (e6e7aad)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliAnalysisTaskNucleiYield.h
Go to the documentation of this file.
1 
20 #ifndef __AliAnalysisTaskNucleiYield__
21 #define __AliAnalysisTaskNucleiYield__
22 
23 #include "AliAnalysisTaskSE.h"
24 #include <Rtypes.h>
25 #include <TString.h>
26 #include <TArrayF.h>
27 #include <TList.h>
28 #include <AliPIDResponse.h>
29 class TH2F;
30 class TH3F;
31 class AliFlowTrackCuts;
32 class AliAODTrack;
33 class AliVVertex;
34 class AliPIDResponse;
35 
36 class AliAnalysisTaskNucleiYield : public AliAnalysisTaskSE {
37 public:
38  AliAnalysisTaskNucleiYield(TString taskname = "NucleiYieldTask");
40 
41  void SetParticleType(AliPID::EParticleType part);
42  void SetPDG (int pdg) { fPDG = (pdg >= 0) ? pdg : -pdg; }
43  void SetIsMC (bool isMc) { fIsMC = isMc; }
44  void SetFillOnlyEventHistos (bool onlyEventHistos) { fFillOnlyEventHistos = onlyEventHistos; }
45 
46  void SetRequireITSrefit (bool refit = true) { fRequireITSrefit = refit; }
47  void SetRequireTPCrefit (bool refit = true) { fRequireTPCrefit = refit; }
48  void SetRequireNoKinks (bool nokinks = true) { fRequireNoKinks = nokinks; }
49  void SetRequireITSrecPoints (int rec = 4) { fRequireITSrecPoints = rec; }
50  void SetRequireITSsignal (int sig = 3) { fRequireITSsignal = sig; }
51  void SetRequireTPCrecPoints (int rec = 70) { fRequireITSrecPoints = rec; }
52  void SetRequireTPCsignal (int sig = 70) { fRequireITSsignal = sig; }
53  void SetRequireSPDrecPoints (int rec = 1) { fRequireSPDrecPoints = rec; }
54  void SetEtaRange (float emin, float emax) { fRequireEtaMin = emin; fRequireEtaMax = emax; }
55  void SetYRange (float ymin, float ymax) { fRequireYmin = ymin; fRequireYmax = ymax; }
56  void SetRequireMaxChi2 (float maxChi2 = 4.f) { fRequireMaxChi2 = maxChi2; }
57  void SetRequireMaxDCAxy (float maxDCA) { fRequireMaxDCAxy = maxDCA; }
58  void SetRequireMaxDCAz (float maxDCA) { fRequireMaxDCAz = maxDCA; }
59  void SetRequireTPCpidSigmas (float sig) { fRequireTPCpidSigmas = (sig > 0) ? sig : -sig; }
60  void SetRequireITSpidSigmas (float sig) { fRequireITSpidSigmas = sig; }
61  void SetRequireMinEnergyLoss (float ecut) { fRequireMinEnergyLoss = ecut; }
63  void SetEnablePerformancePlot(bool cut) { fEnablePerformance = cut; }
64  void SetEnablePtCorrection(bool cut) { fEnablePtCorrection = cut; }
65 
66  void SetCentBins (Int_t nbins, Float_t *bins);
67  void SetDCABins (Int_t nbins, Float_t min, Float_t max);
68  void SetPtBins (Int_t nbins, Float_t *bins);
69  void SetCustomTPCpid (Float_t *par, Float_t sigma);
70  void SetTOFBins (Int_t nbins, Float_t min, Float_t max);
71  void SetDCAzBins (Int_t nbins, Float_t limit);
72  void SetFlatteningProbabilities (Int_t n, Float_t *probs) { fFlatteningProbs.Set(n,probs); }
73 
74  virtual void UserCreateOutputObjects();
75  virtual void UserExec(Option_t *);
76  virtual void Terminate(Option_t *);
77 
78 private:
81 
82  Bool_t AcceptTrack(AliAODTrack *t, Double_t dca[2]);
83  Bool_t PassesPIDSelection(AliAODTrack *t);
84  Float_t HasTOF(AliAODTrack *t);
85 
86  Bool_t Flatten(float cent);
87  void PtCorrection(float &pt, bool positiveCharge);
88 
89  TList *fList;
90  Int_t fPDG;
91  Float_t fPDGMass;
92  Float_t fPDGMassOverZ;
93  Bool_t fIsMC;
95 
96  AliPIDResponse *fPID;
97  Float_t fMagField;
98  AliVVertex *fPrimaryVertex;
99 
100  TList fMmc;
101  TList fAmc;
102 
103  Float_t fDCAzLimit;
104  Int_t fDCAzNbins;
105 
106  TArrayF fPtCorrectionA;
107  TArrayF fPtCorrectionM;
108 
109  Float_t fTOFlowBoundary;
111  Int_t fTOFnBins;
112 
119  UShort_t fRequireITSsignal;
122  UShort_t fRequireTPCsignal;
123  Float_t fRequireEtaMin;
124  Float_t fRequireEtaMax;
125  Float_t fRequireYmin;
126  Float_t fRequireYmax;
127  Float_t fRequireMaxChi2;
129  Float_t fRequireMaxDCAz;
134 
135  AliPID::EParticleType fParticle;
136  TArrayF fCentBins;
137  TArrayF fDCABins;
138  TArrayF fPtBins;
139  TArrayF fCustomTPCpid;
141 
142  // Event related histograms
143  TH1F *fCentrality;
146 
147  // MC only histograms
148  TH1F *fProduction;
149  TH2F *fAITS_TPC;
151  TH2F *fATotal;
153  TH2F *fMITS_TPC;
155  TH2F *fMTotal;
161 
162  // Data histograms
163  TH3F *fATOFsignal;
164  TH2F *fATPCcounts;
167  TH2F *fATPCeLoss;
168  TH3F *fMDCAxyTPC;
169  TH3F *fMDCAzTPC;
170  TH3F *fMDCAxyTOF;
171  TH3F *fMDCAzTOF;
172  TH3F *fMTOFsignal;
173  TH2F *fMTPCcounts;
176  TH2F *fMTPCeLoss;
177 
179  ClassDef(AliAnalysisTaskNucleiYield, 1);
181 };
182 
183 
184 #endif /* defined(__AliAnalysisTaskNucleiYield__) */
TH3F * fMDCASecondaryTPC
! *(MC only)* distribution of secondaries for ITS+TPC tracks
void SetPtBins(Int_t nbins, Float_t *bins)
TArrayF fPtBins
Transverse momentum bins.
void SetYRange(float ymin, float ymax)
UShort_t fRequireITSsignal
Cut on tracks: minimum number of required ITS PID recpoints.
Float_t fPDGMassOverZ
PDG mass over z.
TH1F * fFlattenedCentrality
! Events centrality distribution after the flattening
AliPIDResponse * fPID
! PID response class
TH3F * fATOFsignal
! *(Data only)* TOF signal for anti-matter
TH1F * fCentrality
! Events centrality distribution
UShort_t fRequireITSrecPoints
Cut on tracks: minimum number of required ITS recpoints.
AliAnalysisTaskNucleiYield & operator=(const AliAnalysisTaskNucleiYield &source)
TH3F * fMDCAPrimaryTOF
! *(MC only)* distribution of primaries for ITS+TPC+TOF tracks
TList fMmc
*(MC only)* List of matter particles
Int_t fRequireMagneticField
{0 : any magnetic field is fine, -1 : only negative magnetic field, 1 : only positive} ...
void SetRequireNoKinks(bool nokinks=true)
Int_t fPDG
PDG code of the particle of interest.
TH3F * fMDCAxyTOF
! *(Data only)* distribution for ITS+TPC+TOF tracks
TH2F * fATotal
! *(MC only)* Particles in acceptance (anti-matter)
Float_t fRequireMinEnergyLoss
Cut on the minimum energy loss counts in TPC.
TH2F * fMPtCorrection
! *(MC only)* as a function of for matter
TH3F * fMDCAxyTPC
! *(Data only)* distribution for ITS+TPC tracks
Bool_t fRequireNoKinks
Cut on tracks: set true to exclude tracks from kink vertices.
void SetFillOnlyEventHistos(bool onlyEventHistos)
Bool_t AcceptTrack(AliAODTrack *t, Double_t dca[2])
TH2F * fATPCeLoss
! *(Data only)* TPC dE/dx for anti-matter
TH1F * fCentralityClasses
! Events statistics per centrality classes
void SetRequireITSrefit(bool refit=true)
TList fAmc
*(MC only)* List of anti-matter particles
TH3F * fMDCAPrimaryTPC
! *(MC only)* distribution of primaries for ITS+TPC tracks
void SetDCAzBins(Int_t nbins, Float_t limit)
Float_t fMagField
Magnetic field value for the current event.
TH2F * fMITS_TPC
! *(MC only)* Tracks reconstructed in ITS-TPC acceptance (matter)
UShort_t fRequireTPCrecPoints
Cut on tracks: minimum number of required TPC recpoints.
Int_t fTOFnBins
Number of bins used for the TOF mass spectra.
TH2F * fAPtCorrection
! *(MC only)* as a function of for anti-matter
void SetParticleType(AliPID::EParticleType part)
TH2F * fMTPCcounts
! *(Data only)* TPC counts for matter
TArrayF fCustomTPCpid
Custom parametrisation of the Bethe-Bloch.
TH2F * fAITS_TPC_TOF
! *(MC only)* Tracks reconstructed in ITS-TPC-TOF acceptance (anti-matter)
Int_t fDCAzNbins
Number of bins used for distributions.
Bool_t fRequireITSrefit
Cut on tracks: set true to require ITS refit.
TH3F * fATOFphiSignal
! *(Data only)* TOF signal for anti-matter as a function of
Float_t fRequireMaxChi2
Cut on tracks: maximum TPC .
void SetEtaRange(float emin, float emax)
UShort_t fRequireTPCsignal
Cut on tracks: minimum number of required TPC PID recpoints.
Bool_t fEnablePtCorrection
If true enables the MC based correction.
TArrayF fPtCorrectionM
Array containing the parametrisation of the.
TH3F * fMDCAzTOF
! *(Data only)* distribution for ITS+TPC+TOF tracks
UShort_t fRequireSPDrecPoints
Cut on tracks: minimum number of required SPD recpoints.
Bool_t fFillOnlyEventHistos
Set treu to fill only event related histograms.
Float_t fTOFhighBoundary
Upper limit for the TOF mass spectra histograms.
Float_t fTOFlowBoundary
Lower limit for the TOF mass spectra histograms.
TH3F * fMDCAzTPC
! *(Data only)* distribution for ITS+TPC tracks
TH3F * fMTOFsignal
! *(Data only)* TOF signal for matter
AliVVertex * fPrimaryVertex
! Primary vertex of the current event
TArrayF fPtCorrectionA
Array containing the parametrisation of the.
TH2F * fMTPCeLoss
! *(Data only)* TPC dE/dx for matter
Bool_t fEnablePerformance
If true enables the task saves in the output the performance plots.
void SetFlatteningProbabilities(Int_t n, Float_t *probs)
TH2F * fATPCcounts
! *(Data only)* TPC counts for anti-matter
void SetRequireMaxChi2(float maxChi2=4.f)
TH2F * fMTotal
! *(MC only)* Particles in acceptance (matter)
void PtCorrection(float &pt, bool positiveCharge)
void SetCustomTPCpid(Float_t *par, Float_t sigma)
void SetCentBins(Int_t nbins, Float_t *bins)
AliPID::EParticleType fParticle
Particle specie.
AliAnalysisTaskNucleiYield(TString taskname="NucleiYieldTask")
TArrayF fFlatteningProbs
Flattening probabilities.
void SetTOFBins(Int_t nbins, Float_t min, Float_t max)
TH2F * fMITS_TPC_TOF
! *(MC only)* Tracks reconstructed in ITS-TPC-TOF acceptance (matter)
This task fills histograms required to perform the analysis on the light nuclei yield.
Bool_t fRequireTPCrefit
Cut on tracks: set true to require TPC refit.
Float_t fRequireEtaMin
Cut on tracks: minimum eta for the track.
TH3F * fMDCASecondaryTOF
! *(MC only)* distribution of secondaries for ITS+TPC+TOF tracks
Float_t fRequireYmin
Cut on tracks: mimimum y for the track (using PDG mass)
Float_t fDCAzLimit
Limits of the histograms.
Float_t fRequireTPCpidSigmas
Cut on TPC PID number of sigmas.
TH3F * fMTOFphiSignal
! *(Data only)* TOF signal for matter as a function of
TH2F * fATPCphiCounts
! *(Data only)* TPC counts for anti-matter as a function of
Bool_t fIsMC
Switch between MC and data.
TH1F * fProduction
! *(MC only)* Total number of produced particles
Float_t fRequireYmax
Cut on tracks: maximum y for the track (using PDG mass)
TH2F * fMTPCphiCounts
! *(Data only)* TPC counts for matter as a function of
TArrayF fCentBins
Centrality bins.
void SetRequireTPCrefit(bool refit=true)
void SetDCABins(Int_t nbins, Float_t min, Float_t max)
Float_t fRequireITSpidSigmas
Cut on ITS PID number of sigmas.
Float_t fRequireMaxDCAxy
Cut on tracks: maximum for the track.
Float_t fRequireMaxDCAz
Cut on tracks: maximum for the track.
Float_t fRequireEtaMax
Cut on tracks: maximum eta for the track.
TH2F * fAITS_TPC
! *(MC only)* Tracks reconstructed in ITS-TPC acceptance (anti-matter)