AliPhysics  v5-06-11-01 (156c7f3)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliAnalysisTaskNucleiYield.cxx
Go to the documentation of this file.
2 
3 // ROOT includes
4 #include <TAxis.h>
5 #include <TChain.h>
6 #include <TH1F.h>
7 #include <TH2F.h>
8 #include <TH3F.h>
9 #include <TList.h>
10 #include <TMath.h>
11 #include <TParticle.h>
12 #include <TClonesArray.h>
13 #include <TTree.h>
14 #include <TRandom3.h>
15 
16 // ALIROOT includes
17 #include "AliAnalysisManager.h"
18 #include "AliCentrality.h"
19 #include "AliPID.h"
20 #include "AliTPCPIDResponse.h"
21 #include "AliTOFPIDResponse.h"
22 #include "AliVTrack.h"
23 #include "AliVVertex.h"
24 #include "AliVEvent.h"
25 #include "AliPIDResponse.h"
26 #include "AliVParticle.h"
27 #include "AliMCEvent.h"
28 #include "AliInputEventHandler.h"
29 #include "AliVEventHandler.h"
30 #include "AliStack.h"
31 #include "AliAODTrack.h"
32 #include "AliAODMCParticle.h"
33 #include "AliAODVertex.h"
34 
35 #define LIGHT_SPEED 2.99792457999999984e-02 // in the units that TOF like
36 #define EPS 1.e-15
37 
38 using TMath::TwoPi;
39 
43 
50 :AliAnalysisTaskSE(taskname.Data()) //
51 ,fList(0x0)
52 ,fPDG(0x0)
53 ,fPDGMass(0)
54 ,fPDGMassOverZ(0)
55 ,fIsMC(kFALSE)
56 ,fPID(0x0)
57 ,fMagField(0.f)
58 ,fPrimaryVertex(0x0)
59 ,fMmc()
60 ,fAmc()
61 ,fDCAzLimit(10.)
62 ,fDCAzNbins(400)
63 ,fPtCorrectionA(3)
64 ,fPtCorrectionM(3)
65 ,fTOFlowBoundary(-2.4)
66 ,fTOFhighBoundary(3.6)
67 ,fTOFnBins(75)
68 ,fRequireITSrefit(kTRUE)
69 ,fRequireTPCrefit(kTRUE)
70 ,fRequireNoKinks(kTRUE)
71 ,fRequireITSrecPoints(2u)
72 ,fRequireITSsignal(0u)
73 ,fRequireSPDrecPoints(1u)
74 ,fRequireTPCrecPoints(70u)
75 ,fRequireTPCsignal(70u)
76 ,fRequireEtaMin(-0.8f)
77 ,fRequireEtaMax(0.8f)
78 ,fRequireYmin(-0.5f)
79 ,fRequireYmax(0.5f)
80 ,fRequireMaxChi2(4.f)
81 ,fRequireMaxDCAxy(0.5f)
82 ,fRequireMaxDCAz(1.f)
83 ,fRequireTPCpidSigmas(3.f)
84 ,fRequireITSpidSigmas(-1.f)
85 ,fParticle(AliPID::kUnknown)
86 ,fCentBins(0x0)
87 ,fDCABins(0x0)
88 ,fPtBins(0x0)
89 ,fCustomTPCpid(0)
90 ,fFlatteningProbs(0)
91 ,fCentrality(0x0)
92 ,fFlattenedCentrality(0x0)
93 ,fCentralityClasses(0x0)
94 ,fProduction(0x0)
95 ,fAITS_TPC(0x0)
96 ,fAITS_TPC_TOF(0x0)
97 ,fATotal(0x0)
98 ,fAPtCorrection(0x0)
99 ,fMITS_TPC(0x0)
100 ,fMITS_TPC_TOF(0x0)
101 ,fMTotal(0x0)
102 ,fMPtCorrection(0x0)
103 ,fMDCAPrimaryTPC(0x0)
104 ,fMDCASecondaryTPC(0x0)
105 ,fMDCAPrimaryTOF(0x0)
106 ,fMDCASecondaryTOF(0x0)
107 ,fATOFsignal(0x0)
108 ,fATPCcounts(0x0)
109 ,fMDCAxyTPC(0x0)
110 ,fMDCAzTPC(0x0)
111 ,fMDCAxyTOF(0x0)
112 ,fMDCAzTOF(0x0)
113 ,fMTOFsignal(0x0)
114 ,fMTPCcounts(0x0) {
115  gRandom->SetSeed(0);
116  Float_t aCorrection[3] = {-2.10154e-03,-4.53472e-01,-3.01246e+00};
117  Float_t mCorrection[3] = {-2.00277e-03,-4.93461e-01,-3.05463e+00};
118  fPtCorrectionA.Set(3, aCorrection);
119  fPtCorrectionM.Set(3,mCorrection);
120  DefineInput(0, TChain::Class());
121  DefineOutput(1, TList::Class());
122 }
123 
127  // Destructor
128 
129  if (AliAnalysisManager::GetAnalysisManager()->IsProofMode()) return;
130  if (fList) delete fList;
131 }
132 
137  fList = new TList();
138  fList->SetOwner(kTRUE);
139 
140  const Int_t nPtBins = fPtBins.GetSize() - 1;
141  const Int_t nCentBins = fCentBins.GetSize() - 1;
142  const Int_t nDCAbins = fDCABins.GetSize() - 1;
143  const Float_t *pTbins = fPtBins.GetArray();
144  const Float_t *centBins = fCentBins.GetArray();
145  const Float_t *dcaBins = fDCABins.GetArray();
146 
147  fCentrality = new TH1F("fCentrality",";Centrality (%);Events / 1%;",100,0.,100.);
148  fCentralityClasses = new TH1F("fCentralityClasses",";Centrality classes(%);Events / Class;",nCentBins,centBins);
149  fFlattenedCentrality = new TH1F("fFlattenCentrality","Centrality distribution after the flattening;Centrality (%);Events / 1%;",100,0.,100.);
150  fList->Add(fCentrality);
153 
154  if (fIsMC) {
155  fMTotal = new TH2F("fMTotal",";Centrality (%);p_{T} (GeV/c); Counts",
156  nCentBins,centBins,nPtBins,pTbins);
157  fATotal = new TH2F("fATotal",";Centrality (%);p_{T} (GeV/c); Counts",
158  nCentBins,centBins,nPtBins,pTbins);
159  fMITS_TPC = new TH2F("fMITS_TPC",";Centrality (%);p_{T} (GeV/c); Counts",
160  nCentBins,centBins,nPtBins,pTbins);
161  fAITS_TPC = new TH2F("fAITS_TPC",";Centrality (%);p_{T} (GeV/c); Counts",
162  nCentBins,centBins,nPtBins,pTbins);
163  fMITS_TPC_TOF = new TH2F("fMITS_TPC_TOF",";Centrality (%);p_{T} (GeV/c); Counts",
164  nCentBins,centBins,nPtBins,pTbins);
165  fAITS_TPC_TOF = new TH2F("fAITS_TPC_TOF",";Centrality (%);p_{T} (GeV/c); Counts",
166  nCentBins,centBins,nPtBins,pTbins);
167  fMDCAPrimaryTPC = new TH3F("fMDCAPrimaryTPC",";Centrality (%);p_{T} (GeV/c); DCA_{xy} (cm)",
168  nCentBins,centBins,nPtBins,pTbins,nDCAbins,dcaBins);
169  fMDCASecondaryTPC = new TH3F("fMDCASecondaryTPC",";Centrality (%);p_{T} (GeV/c); DCA_{xy} (cm)",
170  nCentBins,centBins,nPtBins,pTbins,nDCAbins,dcaBins);
171  fMDCAPrimaryTOF = new TH3F("fMDCAPrimaryTOF",";Centrality (%);p_{T} (GeV/c); DCA_{xy} (cm)",
172  nCentBins,centBins,nPtBins,pTbins,nDCAbins,dcaBins);
173  fMDCASecondaryTOF = new TH3F("fMDCASecondaryTOF",";Centrality (%);p_{T} (GeV/c); DCA_{xy} (cm)",
174  nCentBins,centBins,nPtBins,pTbins,nDCAbins,dcaBins);
175  fAPtCorrection = new TH2F("fAPtCorrection",
176  ";p_{T}^{rec} (GeV/c);p_{T}^{MC}-p_{T}^{rec} (GeV/c);Entries",
177  160,0.4,6.,80,-1.,1.);
178  fMPtCorrection = new TH2F("fMPtCorrection",
179  ";p_{T}^{rec} (GeV/c);p_{T}^{MC}-p_{T}^{rec} (GeV/c);Entries",
180  160,0.4,6.,80,-1.,1.);
181  fProduction = new TH1F("fProduction",";p (GeV/c);Entries",100,-10,10);
182 
183  fList->Add(fProduction);
184  fList->Add(fMTotal);
185  fList->Add(fATotal);
186  fList->Add(fMITS_TPC);
187  fList->Add(fAITS_TPC);
188  fList->Add(fMITS_TPC_TOF);
189  fList->Add(fAITS_TPC_TOF);
190  fList->Add(fMDCAPrimaryTPC);
191  fList->Add(fMDCASecondaryTPC);
192  fList->Add(fMDCAPrimaryTOF);
193  fList->Add(fMDCASecondaryTOF);
194  fList->Add(fAPtCorrection);
195  fList->Add(fMPtCorrection);
196 
197  } else {
198 
199  float tofBins[fTOFnBins + 1];
200  const float deltaTOF = (fTOFhighBoundary - fTOFlowBoundary) / fTOFnBins;
201  for (int i = 0; i <= fTOFnBins; ++i)
202  tofBins[i] = i * deltaTOF + fTOFlowBoundary;
203  float dcazBins[fDCAzNbins + 1];
204  const float deltaDCAz = 2.f * fDCAzLimit / fDCAzNbins;
205  for (int i = 0; i <= fDCAzNbins; ++i)
206  dcazBins[i] = i * deltaDCAz - fDCAzLimit;
207  const int nTpcBins = 40;
208  float tpcBins[nTpcBins + 1];
209  for (int i = 0; i <= nTpcBins; ++i) {
210  tpcBins[i] = -4.f + i * 0.2f;
211  }
212 
213  fATOFsignal = new TH3F("fATOFsignal",
214  ";Centrality (%);p_{T} (GeV/c);m_{TOF}^{2}-m_{PDG}^{2} (GeV/c^{2})^{2}",
215  nCentBins,centBins,nPtBins,pTbins,fTOFnBins,tofBins);
216  fATPCcounts = new TH2F("fATPCcounts",";Centrality (%);p_{T} (GeV/c); Entries",
217  nCentBins,centBins,nPtBins,pTbins);
218  fMDCAxyTPC = new TH3F("fMDCAxyTPC",";Centrality (%);p_{T} (GeV/c); DCA_{xy} (cm)",
219  nCentBins,centBins,nPtBins,pTbins,nDCAbins,dcaBins);
220  fMDCAzTPC = new TH3F("fMDCAzTPC",";Centrality (%);p_{T} (GeV/c); DCA_{z} (cm)",
221  nCentBins,centBins,nPtBins,pTbins,fDCAzNbins,dcazBins);
222  fMDCAxyTOF = new TH3F("fMDCAxyTOF",";Centrality (%);p_{T} (GeV/c); DCA_{xy} (cm)",
223  nCentBins,centBins,nPtBins,pTbins,nDCAbins,dcaBins);
224  fMDCAzTOF = new TH3F("fMDCAzTOF",";Centrality (%);p_{T} (GeV/c); DCA_{z} (cm)",
225  nCentBins,centBins,nPtBins,pTbins,fDCAzNbins,dcazBins);
226  fMTOFsignal = new TH3F("fMTOFsignal",
227  ";Centrality (%);p_{T} (GeV/c);m_{TOF}^{2}-m_{PDG}^{2} (GeV/c^{2})^{2}",
228  nCentBins,centBins,nPtBins,pTbins,fTOFnBins,tofBins);
229  fMTPCcounts = new TH2F("fMTPCcounts",";Centrality (%);p_{T} (GeV/c); Entries",
230  nCentBins,centBins,nPtBins,pTbins);
231  fList->Add(fATOFsignal);
232  fList->Add(fATPCcounts);
233  fList->Add(fMDCAxyTPC);
234  fList->Add(fMDCAzTPC);
235  fList->Add(fMDCAxyTOF);
236  fList->Add(fMDCAzTOF);
237  fList->Add(fMTOFsignal);
238  fList->Add(fMTPCcounts);
239  }
240 
241  PostData(1,fList);
242 }
243 
251  AliVEvent *ev = dynamic_cast<AliVEvent*> (InputEvent());
252 
253  // Check event selection mask
254  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
255  AliInputEventHandler* handl = (AliInputEventHandler*)mgr->GetInputEventHandler();
256  UInt_t mask = handl->IsEventSelected();
257  if (!(mask & 0xffffffff)) {
258  PostData(1, fList);
259  return;
260  }
261  if (!((mask & AliVEvent::kMB) || (mask & AliVEvent::kCentral) || (mask & AliVEvent::kSemiCentral))) {
262  PostData(1, fList);
263  return;
264  }
265 
266  fPID = handl->GetPIDResponse();
267 
268  AliCentrality *centr = ev->GetCentrality();
269 
270  // Centrality selection in PbPb, percentile determined with V0
271  float centrality = centr->GetCentralityPercentile("V0M");
272  //select only events with centralities between 0 and 80 %
273  if (centrality < 0. || centrality > 80.) {
274  PostData(1, fList);
275  return;
276  }
277 
278  // Primary vertex displacement cut
279  fPrimaryVertex = (AliVVertex*)ev->GetPrimaryVertex();
280  if(TMath::Abs(fPrimaryVertex->GetZ()) > 10.) {
281  PostData(1, fList);
282  return;
283  }
284  fMagField = ev->GetMagneticField();
285 
286  fCentrality->Fill(centrality);
287  if (Flatten(centrality)) {
288  PostData(1, fList);
289  return;
290  }
291  fCentralityClasses->Fill(centrality);
292  fFlattenedCentrality->Fill(centrality);
293 
294  if (fParticle == AliPID::kUnknown) {
295  ::Error("AliAnalysisTaskNucleiYield::UserExec", "No particle type set");
296  PostData(1, fList);
297  return;
298  }
299 
300  TClonesArray *stack = 0x0;
301  if (fIsMC) {
302  // get branch "mcparticles"
303  stack = (TClonesArray*)ev->GetList()->FindObject(AliAODMCParticle::StdBranchName());
304  if (!stack) {
305  PostData(1, fList);
306  return;
307  }
308 
310  fMmc.SetOwner(kFALSE);
311  fAmc.SetOwner(kFALSE);
312  for (int iMC = 0; iMC < stack->GetEntriesFast(); ++iMC) {
313  AliAODMCParticle *part = (AliAODMCParticle*)stack->UncheckedAt(iMC);
314  const int pdg = part->GetPdgCode();
315  if (pdg == fPDG) fProduction->Fill(part->P());
316  else if (pdg == -fPDG) fProduction->Fill(-part->P());
317  if (part->Y() > fRequireYmax || part->Y() < fRequireYmin) continue;
318  if (pdg == fPDG) {
319  if (part->IsPhysicalPrimary()) fMTotal->Fill(centrality,part->Pt());
320  fMmc.Add(part);
321  } else if (pdg == -fPDG) {
322  if (part->IsPhysicalPrimary()) fATotal->Fill(centrality,part->Pt());
323  fAmc.Add(part);
324  }
325  }
326  }
327 
329  for (Int_t iT = 0; iT < (Int_t)ev->GetNumberOfTracks(); ++iT) {
330  AliAODTrack *track = dynamic_cast<AliAODTrack*>(ev->GetTrack(iT));
331  if (track->GetID() <= 0) continue;
332  Double_t dca[2];
333  if (!AcceptTrack(track,dca)) continue;
334  const float beta = HasTOF(track);
335  float pT = track->Pt();
336  PtCorrection(pT,track->Charge() > 0);
337  if (fIsMC) {
338  AliAODMCParticle *part = (AliAODMCParticle*)stack->At(TMath::Abs(track->GetLabel()));
339  if (!part) continue;
340  if (part->GetPdgCode() == fPDG) {
341  if (part->IsPhysicalPrimary()) {
342  fMITS_TPC->Fill(centrality,pT);
343  fMDCAPrimaryTPC->Fill(centrality,part->Pt(),dca[0]);
344  } else fMDCASecondaryTPC->Fill(centrality,part->Pt(),dca[0]);
345  fMPtCorrection->Fill(pT,part->Pt() - pT);
346  if (beta > 0) {
347  if (part->IsPhysicalPrimary()) {
348  fMDCAPrimaryTOF->Fill(centrality,part->Pt(),dca[0]);
349  fMITS_TPC_TOF->Fill(centrality,part->Pt());
350  } else {
351  fMDCASecondaryTOF->Fill(centrality,part->Pt(),dca[0]);
352  }
353  }
354  } else if (part->GetPdgCode() == -fPDG) {
355  fAPtCorrection->Fill(pT,part->Pt() - pT);
356  if (part->IsPhysicalPrimary()) {
357  fAITS_TPC->Fill(centrality,part->Pt());
358  if (beta > 0) fAITS_TPC_TOF->Fill(centrality,part->Pt());
359  }
360  }
361  } else {
362  if (!PassesPIDSelection(track)) continue;
363  if (track->Charge() > 0) {
364  fMDCAxyTPC->Fill(centrality, pT, dca[0]);
365  fMDCAzTPC->Fill(centrality, pT, dca[1]);
366  fMTPCcounts->Fill(centrality, pT);
367  } else
368  fATPCcounts->Fill(centrality, pT);
369 
370  if (beta < 0) continue;
372  const float m = track->GetTPCmomentum() * (TMath::Sqrt(1.f - beta * beta) / beta);
373  if (track->Charge() > 0) {
374  fMDCAxyTOF->Fill(centrality, pT, dca[0]);
375  fMDCAzTOF->Fill(centrality, pT, dca[1]);
376  fMTOFsignal->Fill(centrality, pT, m * m - fPDGMassOverZ * fPDGMassOverZ);
377  } else {
378  fATOFsignal->Fill(centrality, pT, m * m - fPDGMassOverZ * fPDGMassOverZ);
379  }
380  }
381 
382  } // End AOD track loop
383 
384  fAmc.Clear();
385  fMmc.Clear();
386 
387  // Post output data.
388  PostData(1,fList);
389 }
390 
396  return;
397 }
398 
406 Bool_t AliAnalysisTaskNucleiYield::AcceptTrack(AliAODTrack *track, Double_t dca[2]) {
407  ULong_t status = track->GetStatus();
408  if (!(status & AliVTrack::kITSrefit) && fRequireITSrefit) return kFALSE;
409  if (!(status & AliVTrack::kTPCrefit) && fRequireTPCrefit) return kFALSE;
410  if (track->Eta() < fRequireEtaMin || track->Eta() > fRequireEtaMax) return kFALSE;
411  if (track->Y(fPDGMass) < fRequireYmin || track->Y(fPDGMass) > fRequireYmax) return kFALSE;
412  AliAODVertex *vtx1 = (AliAODVertex*)track->GetProdVertex();
413  if(Int_t(vtx1->GetType()) == AliAODVertex::kKink && fRequireNoKinks) return kFALSE;
414  unsigned int nSPD = 0, nITS = 0;
415  for (int i = 0; i < 6; ++i) {
416  if (track->HasPointOnITSLayer(i)) {
417  if(i < 2) nSPD++;
418  nITS++;
419  }
420  }
421  if (nITS < fRequireITSrecPoints) return kFALSE;
422  if (nSPD < fRequireSPDrecPoints) return kFALSE;
423  if (track->Chi2perNDF() > fRequireMaxChi2) return kFALSE;
424  Double_t cov[3];
425  if (!track->PropagateToDCA(fPrimaryVertex, fMagField, 100, dca, cov)) return kFALSE;
426  if (TMath::Abs(dca[0]) > fRequireMaxDCAxy) return kFALSE;
427  if (TMath::Abs(dca[1]) > fRequireMaxDCAz) return kFALSE;
428  return kTRUE;
429 }
430 
436 Float_t AliAnalysisTaskNucleiYield::HasTOF(AliAODTrack *track) {
437  Bool_t hasTOFout = track->GetStatus() & AliVTrack::kTOFout;
438  Bool_t hasTOFtime = track->GetStatus() & AliVTrack::kTIME;
439  const float len = track->GetIntegratedLength();
440  Bool_t hasTOF = Bool_t(hasTOFout & hasTOFtime) && len > 350.f;
441 
442  if (!hasTOF) return -1.;
443  const float p = track->GetTPCmomentum();
444  const float tim = track->GetTOFsignal() - fPID->GetTOFResponse().GetStartTime(p);
445  if (tim < len / LIGHT_SPEED) return -1.;
446  else {
447  const float beta = len / (tim * LIGHT_SPEED);
448  if (beta < EPS || beta > (1. - EPS))
449  return -1.f;
450  else
451  return beta;
452  }
453 }
454 
461 void AliAnalysisTaskNucleiYield::SetCentBins(Int_t nbins, Float_t *bins) {
462  fCentBins.Set(nbins + 1, bins);
463 }
464 
471 void AliAnalysisTaskNucleiYield::SetDCABins(Int_t nbins, Float_t min, Float_t max) {
472  const float delta = (max - min) / nbins;
473  fDCABins.Set(nbins + 1);
474  for (int iB = 0; iB < nbins; ++iB) {
475  fDCABins[iB] = min + iB * delta;
476  }
477  fDCABins[nbins] = max;
478 }
479 
486 void AliAnalysisTaskNucleiYield::SetPtBins(Int_t nbins, Float_t *bins) {
487  fPtBins.Set(nbins + 1, bins);
488 }
489 
496 void AliAnalysisTaskNucleiYield::SetCustomTPCpid(Float_t *par, Float_t sigma) {
497  if (par == 0x0 && sigma <= 0) {
498  fCustomTPCpid.Set(1);
499  } else {
500  fCustomTPCpid.Set(6);
501  for (int i = 0; i < 5; ++i)
502  fCustomTPCpid.AddAt(par[i],i);
503  fCustomTPCpid.AddAt(sigma, 5);
504  }
505 }
506 
514  if (fCustomTPCpid.GetSize() < 6 || fIsMC) {
515  bool itsPID = kTRUE;
516  AliITSPIDResponse &itsPidResp = fPID->GetITSResponse();
517  AliTPCPIDResponse &tpcPidResp = fPID->GetTPCResponse();
518  if (fRequireITSpidSigmas > 0) {
519  itsPID = TMath::Abs(itsPidResp.GetNumberOfSigmas(t, fParticle)) < fRequireITSpidSigmas;
520  }
521  return itsPID && TMath::Abs(tpcPidResp.GetNumberOfSigmas(t, fParticle)) < fRequireTPCpidSigmas;
522  } else {
523  const float p = t->GetTPCmomentum() / fPDGMassOverZ;
524  const float r = AliExternalTrackParam::BetheBlochAleph(p, fCustomTPCpid[0], fCustomTPCpid[1],
526  fCustomTPCpid[4]);
527  return TMath::Abs(t->GetTPCsignal() - r) < fRequireTPCpidSigmas * fCustomTPCpid[5] * r;
528  }
529 
530 }
531 
539 void AliAnalysisTaskNucleiYield::SetTOFBins(Int_t nbins, Float_t min, Float_t max) {
540  fTOFnBins = nbins;
541  fTOFlowBoundary = min;
542  fTOFhighBoundary = max;
543 }
544 
551 void AliAnalysisTaskNucleiYield::SetDCAzBins(Int_t nbins, Float_t limit) {
552  fDCAzNbins = nbins;
553  fDCAzLimit = limit;
554 }
555 
561 void AliAnalysisTaskNucleiYield::SetParticleType(AliPID::EParticleType part) {
562  fParticle = part;
563  fPDGMass = AliPID::ParticleMass(part);
564  fPDGMassOverZ = AliPID::ParticleMassZ(part);
565 }
566 
577  if (fFlatteningProbs.GetSize() <= 0) {
578  Float_t prob[13] = {
579  0.839266,0.822364,0.807522,0.804727,0.806675,
580  0.828297,0.820842,0.834088,0.861455,1.,
581  0.38112,0.661154,0.953928
582  };
583  fFlatteningProbs.Set(13, prob);
584  }
585  if (!fIsMC) {
586  if (cent >= fFlatteningProbs.GetSize()) return kFALSE;
587  else return gRandom->Rndm() > fFlatteningProbs[int(cent)];
588  } else {
589  // This flattening is required since a strange peak in VOM distribution is observed in MC
590  return (cent < 1) && gRandom->Rndm() > 0.35;
591  }
592 }
593 
600 void AliAnalysisTaskNucleiYield::PtCorrection(float &pt, bool positiveCharge) {
601  Float_t *par = (positiveCharge) ? fPtCorrectionM.GetArray() : fPtCorrectionA.GetArray();
602  const Float_t correction = par[0] + par[1] * TMath::Exp(par[2] * pt);
603  pt -= correction;
604 }
TH3F * fMDCASecondaryTPC
! MC only distribution of secondaries for ITS+TPC tracks
void SetPtBins(Int_t nbins, Float_t *bins)
TArrayF fPtBins
Transverse momentum bins.
Float_t fPDGMassOverZ
PDG mass over z.
TH1F * fFlattenedCentrality
! Events centrality distribution after the flattening
AliPIDResponse * fPID
! PID response class
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
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.
TH3F * fMDCAPrimaryTOF
! MC only distribution of primaries for ITS+TPC+TOF tracks
TList fMmc
MC only List of matter particles
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.
Bool_t AcceptTrack(AliAODTrack *t, Double_t dca[2])
TH1F * fCentralityClasses
! Events statistics per centrality classes
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)
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.
#define LIGHT_SPEED
Float_t fRequireMaxChi2
Cut on tracks: maximum TPC .
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.
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 * fATPCcounts
! Data only TPC counts for anti-matter
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 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)