AliPhysics  vAN-20150630 (513c479)
 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 SetRequireSDDrecPoints (int rec = 1) { fRequireSDDrecPoints = rec; }
54  void SetRequireSPDrecPoints (int rec = 1) { fRequireSPDrecPoints = rec; }
55  void SetEtaRange (float emin, float emax) { fRequireEtaMin = emin; fRequireEtaMax = emax; }
56  void SetYRange (float ymin, float ymax) { fRequireYmin = ymin; fRequireYmax = ymax; }
57  void SetRequireMaxChi2 (float maxChi2 = 4.f) { fRequireMaxChi2 = maxChi2; }
58  void SetRequireMaxDCAxy (float maxDCA) { fRequireMaxDCAxy = maxDCA; }
59  void SetRequireMaxDCAz (float maxDCA) { fRequireMaxDCAz = maxDCA; }
60  void SetRequireTPCpidSigmas (float sig) { fRequireTPCpidSigmas = (sig > 0) ? sig : -sig; }
61  void SetRequireITSpidSigmas (float sig) { fRequireITSpidSigmas = sig; }
62  void SetRequireMinEnergyLoss (float ecut) { fRequireMinEnergyLoss = ecut; }
64  void SetRequireVetoSPD (bool veto) { fRequireVetoSPD = veto; }
65  void SetEnablePerformancePlot (bool cut) { fEnablePerformance = cut; }
66  void SetEnablePtCorrection (bool cut) { fEnablePtCorrection = cut; }
67  void SetDisableITSatHighPt (float pt) { fDisableITSatHighPt = pt; }
69 
70  void SetCentBins (Int_t nbins, Float_t *bins);
71  void SetDCABins (Int_t nbins, Float_t min, Float_t max);
72  void SetPtBins (Int_t nbins, Float_t *bins);
73  void SetCustomTPCpid (Float_t *par, Float_t sigma);
74  void SetTOFBins (Int_t nbins, Float_t min, Float_t max);
75  void SetDCAzBins (Int_t nbins, Float_t limit);
76  void SetFlatteningProbabilities (Int_t n, Float_t *probs) { fFlatteningProbs.Set(n,probs); }
77 
78  virtual void UserCreateOutputObjects();
79  virtual void UserExec(Option_t *);
80  virtual void Terminate(Option_t *);
81 
82 private:
85 
86  Bool_t AcceptTrack(AliAODTrack *t, Double_t dca[2]);
87  Bool_t PassesPIDSelection(AliAODTrack *t);
88  Float_t HasTOF(AliAODTrack *t);
89 
90  Bool_t Flatten(float cent);
91  void PtCorrection(float &pt, bool positiveCharge);
92 
93  TList *fList;
94  Int_t fPDG;
95  Float_t fPDGMass;
96  Float_t fPDGMassOverZ;
97  Bool_t fIsMC;
99 
100  AliPIDResponse *fPID;
101  Float_t fMagField;
102  AliVVertex *fPrimaryVertex;
103 
104  TList fMmc;
105  TList fAmc;
106 
107  Float_t fDCAzLimit;
108  Int_t fDCAzNbins;
109 
110  TArrayF fPtCorrectionA;
111  TArrayF fPtCorrectionM;
112 
113  Float_t fTOFlowBoundary;
115  Int_t fTOFnBins;
124  UShort_t fRequireITSsignal;
128  UShort_t fRequireTPCsignal;
129  Float_t fRequireEtaMin;
130  Float_t fRequireEtaMax;
131  Float_t fRequireYmin;
132  Float_t fRequireYmax;
133  Float_t fRequireMaxChi2;
135  Float_t fRequireMaxDCAz;
141 
142 
143  AliPID::EParticleType fParticle;
144  TArrayF fCentBins;
145  TArrayF fDCABins;
146  TArrayF fPtBins;
147  TArrayF fCustomTPCpid;
149 
150  // Event related histograms
151  TH1F *fCentrality;
154 
155  // MC only histograms
156  TH1F *fProduction;
157  TH2F *fAITS_TPC;
159  TH2F *fATotal;
161  TH2F *fMITS_TPC;
163  TH2F *fMTotal;
169 
170  // Data histograms
171  TH3F *fATOFsignal;
172  TH2F *fATPCcounts;
175  TH2F *fATPCeLoss;
176  TH3F *fMDCAxyTPC;
177  TH3F *fMDCAzTPC;
178  TH3F *fMDCAxyTOF;
179  TH3F *fMDCAzTOF;
180  TH3F *fMTOFsignal;
181  TH2F *fMTPCcounts;
184  TH2F *fMTPCeLoss;
185 
187  ClassDef(AliAnalysisTaskNucleiYield, 1);
189 };
190 
191 
192 #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.
UShort_t fRequireSDDrecPoints
Cut on tracks: minimum number of required SDD recpoints.
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.
Bool_t fRequireVetoSPD
Cut away all the tracks with at least 1 SPD cluster.
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
Float_t fDisableTPCpidAtHighPt
threshold for TPC pid cut
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 fDisableITSatHighPt
threshold for ITS cuts
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)