AliPhysics  vAN-20150723 (baea2bf)
 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  void SetFixForLHC14a6 (bool fix) { fFixForLHC14a6 = fix; }
70 
71  void SetCentBins (Int_t nbins, Float_t *bins);
72  void SetDCABins (Int_t nbins, Float_t min, Float_t max);
73  void SetPtBins (Int_t nbins, Float_t *bins);
74  void SetCustomTPCpid (Float_t *par, Float_t sigma);
75  void SetTOFBins (Int_t nbins, Float_t min, Float_t max);
76  void SetDCAzBins (Int_t nbins, Float_t limit);
77  void SetFlatteningProbabilities (Int_t n, Float_t *probs) { fFlatteningProbs.Set(n,probs); }
78 
79  virtual void UserCreateOutputObjects();
80  virtual void UserExec(Option_t *);
81  virtual void Terminate(Option_t *);
82 
83 private:
86 
87  Bool_t AcceptTrack(AliAODTrack *t, Double_t dca[2]);
88  Bool_t PassesPIDSelection(AliAODTrack *t);
89  Float_t HasTOF(AliAODTrack *t);
90 
91  Bool_t Flatten(float cent);
92  void PtCorrection(float &pt, bool positiveCharge);
93 
94  TList *fList;
95  Int_t fPDG;
96  Float_t fPDGMass;
97  Float_t fPDGMassOverZ;
98  Bool_t fIsMC;
100 
101  AliPIDResponse *fPID;
102  Float_t fMagField;
103  AliVVertex *fPrimaryVertex;
104 
105  TList fMmc;
106  TList fAmc;
107 
108  Float_t fDCAzLimit;
109  Int_t fDCAzNbins;
110 
111  TArrayF fPtCorrectionA;
112  TArrayF fPtCorrectionM;
113 
114  Float_t fTOFlowBoundary;
116  Int_t fTOFnBins;
125  UShort_t fRequireITSsignal;
129  UShort_t fRequireTPCsignal;
130  Float_t fRequireEtaMin;
131  Float_t fRequireEtaMax;
132  Float_t fRequireYmin;
133  Float_t fRequireYmax;
134  Float_t fRequireMaxChi2;
136  Float_t fRequireMaxDCAz;
142  Bool_t fFixForLHC14a6;
143 
144 
145  AliPID::EParticleType fParticle;
146  TArrayF fCentBins;
147  TArrayF fDCABins;
148  TArrayF fPtBins;
149  TArrayF fCustomTPCpid;
151 
152  // Event related histograms
153  TH1F *fCentrality;
156 
157  // MC only histograms
158  TH1F *fProduction;
159  TH2F *fAITS_TPC;
161  TH2F *fATotal;
163  TH2F *fMITS_TPC;
165  TH2F *fMTotal;
171 
172  // Data histograms
173  TH3F *fATOFsignal;
174  TH2F *fATPCcounts;
177  TH2F *fATPCeLoss;
178  TH3F *fMDCAxyTPC;
179  TH3F *fMDCAzTPC;
180  TH3F *fMDCAxyTOF;
181  TH3F *fMDCAzTOF;
182  TH3F *fMTOFsignal;
183  TH2F *fMTPCcounts;
186  TH2F *fMTPCeLoss;
187 
189  ClassDef(AliAnalysisTaskNucleiYield, 1);
191 };
192 
193 
194 #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.
Bool_t fFixForLHC14a6
Cut away all the tracks with at least 1 SPD cluster.
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)