AliPhysics  v5-06-11-01 (156c7f3)
 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 
62  void SetCentBins (Int_t nbins, Float_t *bins);
63  void SetDCABins (Int_t nbins, Float_t min, Float_t max);
64  void SetPtBins (Int_t nbins, Float_t *bins);
65  void SetCustomTPCpid (Float_t *par, Float_t sigma);
66  void SetTOFBins (Int_t nbins, Float_t min, Float_t max);
67  void SetDCAzBins (Int_t nbins, Float_t limit);
68  void SetFlatteningProbabilities (Int_t n, Float_t *probs) { fFlatteningProbs.Set(n,probs); }
69 
70  virtual void UserCreateOutputObjects();
71  virtual void UserExec(Option_t *);
72  virtual void Terminate(Option_t *);
73 
74 private:
77 
78  Bool_t AcceptTrack(AliAODTrack *t, Double_t dca[2]);
79  Bool_t PassesPIDSelection(AliAODTrack *t);
80  Float_t HasTOF(AliAODTrack *t);
81 
82  Bool_t Flatten(float cent);
83  void PtCorrection(float &pt, bool positiveCharge);
84 
85  TList *fList;
86  Int_t fPDG;
87  Float_t fPDGMass;
88  Float_t fPDGMassOverZ;
89  Bool_t fIsMC;
91 
92  AliPIDResponse *fPID;
93  Float_t fMagField;
94  AliVVertex *fPrimaryVertex;
95 
96  TList fMmc;
97  TList fAmc;
98 
99  Float_t fDCAzLimit;
100  Int_t fDCAzNbins;
101 
102  TArrayF fPtCorrectionA;
103  TArrayF fPtCorrectionM;
104 
105  Float_t fTOFlowBoundary;
107  Int_t fTOFnBins;
108 
113  UShort_t fRequireITSsignal;
116  UShort_t fRequireTPCsignal;
117  Float_t fRequireEtaMin;
118  Float_t fRequireEtaMax;
119  Float_t fRequireYmin;
120  Float_t fRequireYmax;
121  Float_t fRequireMaxChi2;
123  Float_t fRequireMaxDCAz;
126 
127  AliPID::EParticleType fParticle;
128  TArrayF fCentBins;
129  TArrayF fDCABins;
130  TArrayF fPtBins;
131  TArrayF fCustomTPCpid;
133 
134  // Event related histograms
135  TH1F *fCentrality;
138 
139  // MC only histograms
140  TH1F *fProduction;
141  TH2F *fAITS_TPC;
143  TH2F *fATotal;
145  TH2F *fMITS_TPC;
147  TH2F *fMTotal;
153 
154  // Data histograms
155  TH3F *fATOFsignal;
156  TH2F *fATPCcounts;
157  TH3F *fMDCAxyTPC;
158  TH3F *fMDCAzTPC;
159  TH3F *fMDCAxyTOF;
160  TH3F *fMDCAzTOF;
161  TH3F *fMTOFsignal;
162  TH2F *fMTPCcounts;
163 
165  ClassDef(AliAnalysisTaskNucleiYield, 1);
167 };
168 
169 #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
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)
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])
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.
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.
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.
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.
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)
TArrayF fCentBins
Centrality bins.
void SetRequireTPCrefit(bool refit=true)
void SetDCABins(Int_t nbins, Float_t min, Float_t max)
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)