AliPhysics  1909eaa (1909eaa)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskPID.h
Go to the documentation of this file.
1 #ifndef ALI_ANALYSIS_TASK_PID_H
2 #define ALI_ANALYSIS_TASK_PID_H
3 
4 /*
5 This task collects PID output from different detectors.
6 Only tracks fulfilling some standard quality cuts are taken into account.
7 At the moment, only data from TPC and TOF is collected. But in future,
8 data from e.g. HMPID is also foreseen.
9 
10 Class written by Benjamin Hess.
11 Contact: bhess@cern.ch
12 */
13 
14 class TF1;
15 class TRandom3;
16 class AliAnalysisFilter;
17 class AliCFContainer;
18 class AliESDEvent;
19 class AliMCEvent;
20 class AliMCParticle;
21 class AliPID;
22 class AliPIDCombined;
23 class AliPIDResponse;
24 class AliPPVsMultUtils;
25 class AliTOFPIDResponse;
26 class AliVEvent;
27 class AliVTrack;
28 
29 #include "TAxis.h"
30 #include "TH1D.h"
31 #include "TH2D.h"
32 #include "TH3D.h"
33 #include "THnSparse.h"
34 #include "TProfile.h"
35 #include "TString.h"
36 
37 #include "AliCentrality.h"
38 #include "AliCFContainer.h"
39 
40 #include "AliPID.h"
42 
44  public:
46  AliAnalysisTaskPID(const char *name);
47  virtual ~AliAnalysisTaskPID();
48 
49  virtual void UserCreateOutputObjects();
50  virtual void UserExec(Option_t *option);
51  virtual void Terminate(const Option_t*);
52 
53  enum ErrorCode { kNoErrors = 1, kWarning = 0, kError = -1};
54 
57  kDataNumAxes = 12 };
58 
60  kGenJetPt = 5, kGenZ = 6, kGenXi = 7, kGenCharge = 8, kGenTOFpidInfo = 9, kGenDistance = 10, kGenJt = 11,
61  kGenNumAxes = 12 };
62 
65 
67 
70 
73 
75 
77  kEffZ = 6, kEffXi = 7, kEffDistance = 8, kEffJt = 9, kEffNumAxes = 10 };
78 
82 
83  enum TOFpidInfo { kNoTOFinfo = -2, kNoTOFpid = -1, kTOFpion = 0, kTOFkaon = 1, kTOFproton = 2, kNumTOFspecies = 3,
85 
88 
89  enum CutHistoType { kMCPtHardCut = 0 };
90 
92 
93  static Int_t PDGtoMCID(Int_t pdg);
94 
95  static void GetJetTrackObservables(Double_t trackPt, Double_t jetPt, Double_t& z, Double_t& xi, Bool_t storeXi = kTRUE);
96 
97  static Double_t GetMCStrangenessFactorCMS(Int_t motherPDG, Double_t motherGenPt);
98  static Double_t GetMCStrangenessFactorCMS(AliMCEvent* mcEvent, AliMCParticle* daughter);
99 
100  static Bool_t IsSecondaryWithStrangeMotherMC(AliMCEvent* mcEvent, Int_t partLabel);
101 
104 
105  virtual void ConfigureTaskForCurrentEvent(AliVEvent* event);
106 
113 
118 
120  { if (!fh1Xsec) return kFALSE; fh1Xsec->Fill("<#sigma>", xsection); return kTRUE; };
122  { if (!fh1Trials) return kFALSE; fh1Trials->Fill("#sum{ntrials}", avgTrials); return kTRUE; };
123 
124  Bool_t FillEfficiencyContainer(const Double_t* values, EffSteps step, Double_t weight = 1.0);
125 
126  Bool_t FillGeneratedYield(const Double_t* values, Double_t weight = 1.0);
127  Bool_t FillPtResolution(Int_t mcID, const Double_t* values);
128  Bool_t FillGenJets(Double_t centralityPercentile, Double_t jetPt, Double_t norm = -1.);
129  Bool_t FillRecJets(Double_t centralityPercentile, Double_t jetPt, Double_t norm = -1.);
130 
131  Bool_t IncrementEventCounter(Double_t centralityPercentile, EventCounterType type);
132 
134 
135  void PostOutputData();
136 
137  void PrintSettings(Bool_t printSystematicsSettings = kFALSE) const;
138 
139  void PrintSystematicsSettings() const;
140 
141  Bool_t ProcessTrack(const AliVTrack* track, Int_t particlePDGcode, Double_t centralityPercentile, Double_t jetPt, Bool_t isMBSelected = kFALSE,
142  Bool_t isMultSelected = kTRUE, Bool_t storeXi = kTRUE, Double_t radialDistanceToJet = -1, Double_t jT = -1);
143 
145  Int_t nResponses,
146  Bool_t usePureGaus = kFALSE);
148 
151  TString ppCentEstimator = fCentralityEstimator; ppCentEstimator = ppCentEstimator.ReplaceAll("ppMult", ""); return ppCentEstimator; }
152  void SetCentralityEstimator(TString estimator) { fCentralityEstimator = estimator; };
153 
154  Double_t GetCentralityPercentile(AliVEvent* evt) const;
155 
156  inline Double_t GetConvolutedGaussTransitionPar(Int_t index) const;
157 
159 
162 
163  Bool_t GetDoPID() const { return fDoPID; };
164  void SetDoPID(Bool_t flag) { fDoPID = flag; };
165 
166  Bool_t GetDoEfficiency() const { return fDoEfficiency; };
167  void SetDoEfficiency(Bool_t flag) { fDoEfficiency = flag; };
168 
170  void SetDoPtResolution(Bool_t flag) { fDoPtResolution = flag; };
171 
172  Bool_t GetDoDeDxCheck() const { return fDoDeDxCheck; };
173  void SetDoDeDxCheck(Bool_t flag) { fDoDeDxCheck = flag; };
174 
176  void SetDoBinZeroStudy(Bool_t flag) { fDoBinZeroStudy = flag; };
177 
180 
183 
186 
189 
192 
195 
196  Int_t GetTOFmode() const { return fTOFmode; };
197  void SetTOFmode(Int_t tofMode) { fTOFmode = tofMode; };
198 
201 
202  Bool_t GetUsePriors() const { return fUsePriors; };
203  void SetUsePriors(Bool_t flag) { fUsePriors = flag; };
204 
205  Bool_t GetUseITS() const { return fUseITS; };
206  void SetUseITS(Bool_t flag) { fUseITS = flag; };
207 
208  Bool_t GetUseTOF() const { return fUseTOF; };
209  void SetUseTOF(Bool_t flag) { fUseTOF = flag; };
210 
212  void SetStoreTOFInfo(Bool_t flag) { fStoreTOFInfo = flag; }
213 
214  Bool_t GetStoreCharge() const { return fStoreCharge; }
215  void SetStoreCharge(Bool_t flag) { fStoreCharge = flag; }
216 
218  Double_t GetEtaAbsCutUp() const { return fEtaAbsCutUp; };
219  Bool_t SetEtaAbsCutRange(Double_t lowerLimit, Double_t upperLimit);
220 
221  Bool_t IsInAcceptedEtaRange(Double_t etaAbs) const { return (etaAbs >= fEtaAbsCutLow && etaAbs <= fEtaAbsCutUp); };
222 
225 
229 
233 
236 
240 
244 
247 
251 
255 
259 
260  Double_t GetMaxEtaVariation(Double_t dEdxSplines);
262 
264  Bool_t GetParticleFraction(Double_t trackPt, Double_t jetPt, Double_t multiplicity,
265  AliPID::EParticleType species, Double_t& fraction, Double_t& fractionErrorStat,
266  Double_t& fractionErrorSys) const;
267  Bool_t GetParticleFractions(Double_t trackPt, Double_t jetPt, Double_t centralityPercentile,
268  Double_t* prob, Int_t smearSpeciesByError, Int_t takeIntoAccountSpeciesSysError,
269  Bool_t uniformSystematicError = kFALSE) const;
270  const TH3D* GetParticleFractionHisto(Int_t species, Bool_t sysError = kFALSE) const;
271  Bool_t SetParticleFractionHisto(const TH3D* hist, Int_t species, Bool_t sysError = kFALSE);
275  Bool_t SetParticleFractionHistosFromFile(const TString filePathName, Bool_t sysError = kFALSE);
277  Double_t centralityPercentile,
278  Bool_t smearByError,
279  Bool_t takeIntoAccountSysError = kFALSE) const;
280 
281  TOFpidInfo GetTOFType(const AliVTrack* track, Int_t tofMode) const;
282 
283  //Underlying event
284  Bool_t GetIsUEPID() const { return fIsUEPID; }
285  void SetIsUEPID(Bool_t flag) { fIsUEPID = flag; }
286  void FillUEDensity(Double_t cent, Double_t UEpt);
287  void FillJetArea(Double_t cent, Double_t area);
288  void NormalizeJetArea(Double_t jetParameter);
289 
290  protected:
292  Double_t ConvolutedGaus(const Double_t* xx, const Double_t* par) const;
293  inline Double_t FastGaus(Double_t x, Double_t mean, Double_t sigma) const;
295  Int_t FindBinWithinRange(TAxis* axis, Double_t value) const;
296  Int_t FindFirstBinAboveIn3dSubset(const TH3* hist, Double_t threshold, Int_t yValue, Int_t zValue) const;
297  Int_t FindLastBinAboveIn3dSubset(const TH3* hist, Double_t threshold, Int_t yValue, Int_t zValue) const;
298  virtual void SetUpGenHist(THnSparse* hist, Double_t* binsPt, Double_t* binsDeltaPrime, Double_t* binsCent, Double_t* binsJetPt,
299  Double_t* binsJt) const;
300  virtual void SetUpGenYieldHist(THnSparse* hist, Double_t* binsPt, Double_t* binsCent, Double_t* binsJetPt, Double_t* binsJt) const;
301  virtual void SetUpHist(THnSparse* hist, Double_t* binsPt, Double_t* binsDeltaPrime, Double_t* binsCent, Double_t* binsJetPt,
302  Double_t* binsJt) const;
303  virtual void SetUpPtResHist(THnSparse* hist, Double_t* binsPt, Double_t* binsJetPt, Double_t* binsCent) const;
304  virtual void SetUpSharedClsHist(THnSparse* hist, Double_t* binsPt, Double_t* binsJetPt) const;
305  virtual void SetUpDeDxCheckHist(THnSparse* hist, const Double_t* binsPt, const Double_t* binsJetPt, const Double_t* binsEtaAbs) const;
306  virtual void SetUpBinZeroStudyHist(THnSparse* hist, const Double_t* binsCent, const Double_t* binsPt) const;
307  virtual void SetUpPIDcombined();
308 
309  static const Int_t fgkNumJetAxes; // Number of additional axes for jets
310  static const Double_t fgkEpsilon; // Double_t threshold above zero
311  static const Int_t fgkMaxNumGenEntries; // Maximum number of generated detector responses per track and delta(Prime) and associated species
312 
313  static const Double_t fgkOneOverSqrt2; // = 1. / TMath::Sqrt2();
314 
315  private:
316  Int_t fRun; // Current run number
317  AliPIDCombined* fPIDcombined;
318  AliPPVsMultUtils* fPPVsMultUtils;
319 
320  Bool_t fInputFromOtherTask; // If set to kTRUE, no events are processed and the input must be fed in from another task. If set to kFALSE, normal event processing
321 
322  Bool_t fDoPID; // Do PID processing (and post the output), if flag is set to kTRUE
323  Bool_t fDoEfficiency; // Do efficiency processing (and post the output), if flag is set to kTRUE
324  Bool_t fDoPtResolution; // Do pT resolution processing (and post the output), if flag is set to kTRUE
325  Bool_t fDoDeDxCheck; // Check dEdx, if flag set to kTRUE
326  Bool_t fDoBinZeroStudy; // Do bin zero study, if flag is set to kTRUE
327 
329 
330  Bool_t fStoreCentralityPercentile; // If set to kTRUE, store centrality percentile for each event. In case of kFALSE (appropriate for pp), centrality percentile will be set to -1 for every event
331  Bool_t fStoreAdditionalJetInformation; // If set to kTRUE, additional jet information like jetPt, z, xi will be stored in the THnSparses
332 
333  Bool_t fTakeIntoAccountMuons; // Also take into account muons for the generation of the expected response and the most probable PID
334  Bool_t fUseITS; // Use ITS for PID combined probabilities
335  Bool_t fUseTOF; // Use TOF for PID combined probabilities
336  Bool_t fStoreTOFInfo; //Store the TOF Info in the histogram
337  Bool_t fUsePriors; // Use priors for PID combined probabilities
338  Bool_t fTPCDefaultPriors; // Use TPC default priors for PID combined probabilities, if priors are enabled
339 
340  Bool_t fStoreCharge; // Store positive and negative charged tracks separately
341 
342  Bool_t fUseMCidForGeneration; // If MC, use MCid instead of PIDcombined to generate the signals
343 
344  Bool_t fUseConvolutedGaus; // Use convoluted gaus to generate detector response instead of pure gaus
345  const Int_t fkConvolutedGausNPar; // Number of parameters for convoluted gaus
346  Double_t fAccuracyNonGaussianTail; // Accuracy of the non-gaussian tail (fraction of the maximum)
347  const Double_t fkDeltaPrimeLowLimit; // Lower deltaPrime limit
348  const Double_t fkDeltaPrimeUpLimit; // Upper deltaPrime limit
349  TF1* fConvolutedGausDeltaPrime; // Gaus convoluted with exponential tail to generate detector response (deltaPrime)
350 
351  Int_t fTOFmode; // TOF mode used for TOF PID info (affects num sigma inclusion/exclusion)
352  Double_t fConvolutedGaussTransitionPars[3]; // Parameter for transition from gaussian parameters to asymmetric shape
353  static const Double_t fgkSigmaReferenceForTransitionPars; // Reference sigma chosen to calculate transition parameters
354 
355  Double_t fEtaAbsCutLow; // Lower cut value on |eta|
356  Double_t fEtaAbsCutUp; // Upper cut value on |eta|
357 
358  // For systematic studies
359  Bool_t fDoAnySystematicStudiesOnTheExpectedSignal; // Internal flag indicating whether any systematic studies are going to be performed
360  Double_t fSystematicScalingSplinesThreshold; // beta-gamma threshold for the systematic spline scale factor
361  Double_t fSystematicScalingSplinesBelowThreshold; // Systematic scale factor for the splines (1. = no systematics) below threshold
362  Double_t fSystematicScalingSplinesAboveThreshold; // Systematic scale factor for the splines (1. = no systematics) above threshold
363  Double_t fSystematicScalingEtaCorrectionMomentumThr; // Momentum threshold for the systematic scale factor for the eta correction (separates low-p from high-p
364  Double_t fSystematicScalingEtaCorrectionLowMomenta; // Systematic scale factor for the eta correction (1. = no systematics) at low momenta
365  Double_t fSystematicScalingEtaCorrectionHighMomenta; // Systematic scale factor for the eta correction (1. = no systematics) at high momenta
366 
367  Double_t fSystematicScalingEtaSigmaParaThreshold; // dEdx threshold for the systematic scale factor for the parametrisation of the relative signal width
368  Double_t fSystematicScalingEtaSigmaParaBelowThreshold; // Systematic scale factor for the parametrisation of the relative signal width (1. = no systematics) below threshold
369  Double_t fSystematicScalingEtaSigmaParaAboveThreshold; // Systematic scale factor for the parametrisation of the relative signal width (1. = no systematics) above threshold
370  Double_t fSystematicScalingMultCorrection; // Systematic scale factor for the multiplicity correction (1. = no systematics)
371 
372 
373 
374  TH3D* fFractionHists[AliPID::kSPECIES]; // 3D histos of particle fraction as function with trackPt, jetPt (-1 for inclusive spectra), centralityPercentile (-1 for pp)
375  TH3D* fFractionSysErrorHists[AliPID::kSPECIES]; // 3D histos of sys. error of particle fraction as function with trackPt, jetPt (-1 for inclusive spectra), centralityPercentile (-1 for pp)
376 
377  TString fCentralityEstimator; // Estimator for the centrality (e.g. V0A, V0M)
378 
379  THnSparseD* fhPIDdataAll;
380 
381  // Generated response information
382  THnSparseD* fhGenEl;
383  THnSparseD* fhGenKa;
384  THnSparseD* fhGenPi;
385  THnSparseD* fhGenMu;
386  THnSparseD* fhGenPr;
387 
388  // Generated responses for a single track
409  /*
410  Double_t* fGenRespElDeltaEl; //! Generated responses for a single track
411  Double_t* fGenRespElDeltaKa; //! Generated responses for a single track
412  Double_t* fGenRespElDeltaPi; //! Generated responses for a single track
413  Double_t* fGenRespElDeltaPr; //! Generated responses for a single track
414  Double_t* fGenRespKaDeltaEl; //! Generated responses for a single track
415  Double_t* fGenRespKaDeltaKa; //! Generated responses for a single track
416  Double_t* fGenRespKaDeltaPi; //! Generated responses for a single track
417  Double_t* fGenRespKaDeltaPr; //! Generated responses for a single track
418  Double_t* fGenRespPiDeltaEl; //! Generated responses for a single track
419  Double_t* fGenRespPiDeltaKa; //! Generated responses for a single track
420  Double_t* fGenRespPiDeltaPi; //! Generated responses for a single track
421  Double_t* fGenRespPiDeltaPr; //! Generated responses for a single track
422  Double_t* fGenRespMuDeltaEl; //! Generated responses for a single track
423  Double_t* fGenRespMuDeltaKa; //! Generated responses for a single track
424  Double_t* fGenRespMuDeltaPi; //! Generated responses for a single track
425  Double_t* fGenRespMuDeltaPr; //! Generated responses for a single track
426  Double_t* fGenRespPrDeltaEl; //! Generated responses for a single track
427  Double_t* fGenRespPrDeltaKa; //! Generated responses for a single track
428  Double_t* fGenRespPrDeltaPi; //! Generated responses for a single track
429  Double_t* fGenRespPrDeltaPr; //! Generated responses for a single track
430  */
431 
434 
439 
444 
446 
449 
450  TProfile* fh1Xsec;
453 
454  AliCFContainer* fContainerEff;
455 
456  THnSparseD* fPtResolution[AliPID::kSPECIES];
457  THnSparseD* fQASharedCls;
458 
459  THnSparseD* fDeDxCheck;
460 
462 
464 
465  AliAnalysisTaskPID(const AliAnalysisTaskPID&); // not implemented
466  AliAnalysisTaskPID& operator=(const AliAnalysisTaskPID&); // not implemented
467 
468  //For Underlying Event
472 
474 };
475 
476 
477 //_____________________________________________________________________________
479  Double_t weight)
480 {
481  // Fill efficiency container at step "step" with the values
482 
483  if (!fDoEfficiency)
484  return kFALSE;
485 
486  if (!fContainerEff) {
487  AliError("Efficiency container not initialised -> cannot be filled!");
488  return kFALSE;
489  }
490 
491  fContainerEff->Fill(values, step, weight);
492 
493  return kTRUE;
494 }
495 
496 
497 //_____________________________________________________________________________
499 {
500  // Fill histos with generated primary yields with provided values
501 
502  if (!fDoPID)
503  return kFALSE;
504 
506  AliError("Histo for generated primary yield not initialised -> cannot be filled!");
507  return kFALSE;
508  }
509 
510  fhMCgeneratedYieldsPrimaries->Fill(values, weight);
511 
512  return kTRUE;
513 }
514 
515 
516 //_____________________________________________________________________________
517 inline Bool_t AliAnalysisTaskPID::FillGenJets(Double_t centralityPercentile, Double_t jetPt, Double_t norm)
518 {
519  if (!fDoPID && !fDoEfficiency)
520  return kFALSE;
521 
522  if (!fh2FFJetPtGen)
523  return kFALSE;
524 
525  if (norm > 0.)
526  fh2FFJetPtGen->Fill(centralityPercentile, jetPt, 1. / norm);
527  else
528  fh2FFJetPtGen->Fill(centralityPercentile, jetPt);
529 
530  return kTRUE;
531 }
532 
533 
534 //_____________________________________________________________________________
535 inline Bool_t AliAnalysisTaskPID::FillRecJets(Double_t centralityPercentile, Double_t jetPt, Double_t norm)
536 {
537  if (!fDoPID && !fDoEfficiency)
538  return kFALSE;
539 
540  if (!fh2FFJetPtRec)
541  return kFALSE;
542 
543  if (norm > 0.)
544  fh2FFJetPtRec->Fill(centralityPercentile, jetPt, 1. / norm);
545  else
546  fh2FFJetPtRec->Fill(centralityPercentile, jetPt);
547 
548  return kTRUE;
549 }
550 
551 
552 //_____________________________________________________________________________
554 {
555  // Fill histos with pT resolution with provided values
556 
557  if (!fDoPtResolution || mcID < 0 || mcID >= AliPID::kSPECIES)
558  return kFALSE;
559 
560  if (!fPtResolution[mcID]) {
561  AliError(Form("Histo for pT resolution (species: %s) not initialised -> cannot be filled!", AliPID::ParticleName(mcID)));
562  return kFALSE;
563  }
564 
565  fPtResolution[mcID]->Fill(values);
566 
567  return kTRUE;
568 }
569 
570 
571 //_____________________________________________________________________________
573 {
574  // Increment the number of events for the given centrality percentile and the corresponding counter type
575 
576  if (type == kTriggerSel) {
577  if (!fhEventsTriggerSel) {
578  AliError("Histogram for number of events (kTriggerSel) not initialised -> cannot be incremented!");
579  return kFALSE;
580  }
581 
582  fhEventsTriggerSel->Fill(centralityPercentile);
583  }
584  else if (type == kTriggerSelAndVtxCut) {
586  AliError("Histogram for number of events (kTriggerSelAndVtxCut) not initialised -> cannot be incremented!");
587  return kFALSE;
588  }
589 
590  fhEventsTriggerSelVtxCut->Fill(centralityPercentile);
591  }
592  else if (type == kTriggerSelAndVtxCutAndZvtxCut) {
593  if (!fhEventsProcessed) {
594  AliError("Histogram for number of events (kTriggerSelAndVtxCutAndZvtxCut) not initialised -> cannot be incremented!");
595  return kFALSE;
596  }
597 
598  fhEventsProcessed->Fill(centralityPercentile);
599  }
602  AliError("Histogram for number of events (kTriggerSelAndVtxCutAndZvtxCutNoPileUpRejection) not initialised -> cannot be incremented!");
603  return kFALSE;
604  }
605 
606  fhEventsProcessedNoPileUpRejection->Fill(centralityPercentile);
607  }
608 
609 
610  return kTRUE;
611 };
612 
613 
614 //_____________________________________________________________________________
616 {
617  // Fill cut histo of corresponding type at given value.
618  if (type == kMCPtHardCut) {
619  if (!fh1EvtsPtHardCut) {
620  AliError("Histogram \"fh1EvtsPtHardCut\" not initialised -> cannot be filled!");
621  return kFALSE;
622  }
623 
624  fh1EvtsPtHardCut->Fill(value);
625  }
626 
627  return kTRUE;
628 }
629 
630 
631 //_____________________________________________________________________________
633 {
634  if (lowerLimit >= upperLimit) {
635  AliError(Form("Requested lower |eta| cut limit >= upper |eta| cut limit. Old eta cut range will be used (low %f, high %f).",
637  return kFALSE;
638  }
639 
640  fEtaAbsCutLow = lowerLimit;
641  fEtaAbsCutUp = upperLimit;
642 
643  return kTRUE;
644 };
645 
646 
647 //_____________________________________________________________________________
649 {
650  if (index < 0 || index >= 3) {
651  printf("Invalid index %d!\n", index);
652  return -1;
653  }
654  return fConvolutedGaussTransitionPars[index];
655 }
656 
657 
658 //_____________________________________________________________________________
660 {
661  if (!fFractionHists[AliPID::kPion])
662  return -1;
663 
664  return fFractionHists[AliPID::kPion]->GetNbinsX();
665 }
666 
667 
668 //_____________________________________________________________________________
670 {
671  if (!fFractionHists[AliPID::kPion])
672  return -1;
673 
674  return fFractionHists[AliPID::kPion]->GetNbinsY();
675 }
676 
677 
678 //_____________________________________________________________________________
680 {
681  if (!fFractionHists[AliPID::kPion])
682  return -1;
683 
684  return fFractionHists[AliPID::kPion]->GetNbinsZ();
685 }
686 
687 
688 //_____________________________________________________________________________
690 {
691  // WARNING: This function may not be used in case of special pp centrality estimators which require different handling
692  // (and sometimes ESD events)
693  if (!evt)
694  return -1;
695 
696  Double_t centralityPercentile = -1.;
698  centralityPercentile = evt->GetCentrality()->GetCentralityPercentile(fCentralityEstimator.Data());
699 
700  return centralityPercentile;
701 }
702 
703 
704 //_____________________________________________________________________________
706 {
707  PostData(1, fOutputContainer);
708 
709  if (fDoEfficiency)
710  PostData(2, fContainerEff);
711 
713  PostData(3, fQAContainer);
714 }
715 
716 #endif
void SetDoPID(Bool_t flag)
Double_t FastNormalisedGaus(Double_t x, Double_t mean, Double_t sigma) const
Int_t pdg
void PrintSettings(Bool_t printSystematicsSettings=kFALSE) const
Int_t GetParticleFractionHistoNbinsCentrality() const
Double_t * fGenRespMuDeltaPrimePi
Generated responses for a single track.
void SetIsUEPID(Bool_t flag)
TH2D * fh2FFJetPtGen
Number of reconstructed jets vs. jetPt and centrality.
void SetSystematicScalingSplinesAboveThreshold(Double_t scaleFactor)
Double_t * fGenRespMuDeltaPrimePr
Generated responses for a single track.
Double_t * fGenRespPrDeltaPrimePr
Generated responses for a single track.
void CheckDoAnyStematicStudiesOnTheExpectedSignal()
double Double_t
Definition: External.C:58
Bool_t GetDoEfficiency() const
void NormalizeJetArea(Double_t jetParameter)
Bool_t GetUseTPCDefaultPriors() const
Bool_t GetUseMCidForGeneration() const
Bool_t SetEtaAbsCutRange(Double_t lowerLimit, Double_t upperLimit)
Int_t FindFirstBinAboveIn3dSubset(const TH3 *hist, Double_t threshold, Int_t yValue, Int_t zValue) const
Bool_t FillEfficiencyContainer(const Double_t *values, EffSteps step, Double_t weight=1.0)
TH3D * fFractionSysErrorHists[AliPID::kSPECIES]
TObjArray * fOutputContainer
dEdx check
THnSparseD * fhMCgeneratedYieldsPrimaries
Histo holding the generated charged primary yields for triggered events passing vertex cuts (includin...
void PrintSystematicsSettings() const
TH2D * fh2FFJetPtRec
Histo holding the generated (no reco, no cuts) primary particle yields in considered eta range...
Bool_t SetConvolutedGaussLambdaParameter(Double_t lambda)
Bool_t GetUsePriors() const
Definition: External.C:244
void SetSystematicScalingSplinesBelowThreshold(Double_t scaleFactor)
void SetStoreAdditionalJetInformation(Bool_t flag)
void SetAccuracyNonGaussianTail(Double_t value)
Double_t * fGenRespKaDeltaPrimePr
Generated responses for a single track.
void SetSystematicScalingEtaSigmaParaBelowThreshold(Double_t scaleFactor)
TH1D * fhEventsTriggerSelVtxCut
Histo holding the number of events passing trigger selection.
THnSparseD * fhGenMu
Generated response for pi.
Bool_t FillGenJets(Double_t centralityPercentile, Double_t jetPt, Double_t norm=-1.)
Double_t * fGenRespElDeltaPrimeEl
Generated response for pr.
TH1D * fh1Trials
pythia cross section and trials
Bool_t GetDoPID() const
Double_t * fGenRespPrDeltaPrimeEl
Generated responses for a single track.
ClassDef(AliAnalysisTaskPID, 23)
THnSparseD * fChargedGenPrimariesTriggerSel
Histo holding the number of processed events before pile-up rejection.
Double_t GetEtaAbsCutUp() const
virtual void SetUpDeDxCheckHist(THnSparse *hist, const Double_t *binsPt, const Double_t *binsJetPt, const Double_t *binsEtaAbs) const
void SetStoreCharge(Bool_t flag)
void SetDoDeDxCheck(Bool_t flag)
Double_t fSystematicScalingEtaCorrectionLowMomenta
Bool_t GetInputFromOtherTask() const
Bool_t GetParticleFraction(Double_t trackPt, Double_t jetPt, Double_t multiplicity, AliPID::EParticleType species, Double_t &fraction, Double_t &fractionErrorStat, Double_t &fractionErrorSys) const
void SetUseTOF(Bool_t flag)
Bool_t GetUseTOF() const
static Double_t GetMCStrangenessFactorCMS(Int_t motherPDG, Double_t motherGenPt)
void SetTakeIntoAccountMuons(Bool_t flag)
THnSparseD * fhGenPi
Generated response for ka.
Double_t * fGenRespMuDeltaPrimeKa
Generated responses for a single track.
Double_t * fGenRespPrDeltaPrimePi
Generated responses for a single track.
TObjArray * fQAContainer
output data container
virtual void SetUpPtResHist(THnSparse *hist, Double_t *binsPt, Double_t *binsJetPt, Double_t *binsCent) const
TH1D * fhEventsProcessed
Histo holding the maximum deviation of the eta correction factor from unity vs. 1/dEdx(splines) ...
Bool_t IsInAcceptedEtaRange(Double_t etaAbs) const
Bool_t CalculateMaxEtaVariationMapFromPIDResponse()
void SetDoEfficiency(Bool_t flag)
Double_t fSystematicScalingEtaSigmaParaThreshold
Double_t fSystematicScalingMultCorrection
virtual void UserExec(Option_t *option)
Bool_t GetStoreCentralityPercentile() const
void SetSystematicScalingEtaCorrectionMomentumThr(Double_t threshold)
Double_t * fGenRespElDeltaPrimePr
Generated responses for a single track.
Double_t GetSystematicScalingEtaSigmaParaThreshold() const
static const Double_t fgkSigmaReferenceForTransitionPars
Int_t GetIndexOfChargeAxisGen() const
const TH3D * GetParticleFractionHisto(Int_t species, Bool_t sysError=kFALSE) const
Int_t GetRandomParticleTypeAccordingToParticleFractions(Double_t trackPt, Double_t jetPt, Double_t centralityPercentile, Bool_t smearByError, Bool_t takeIntoAccountSysError=kFALSE) const
THnSparseD * fChargedGenPrimariesTriggerSelVtxCutZ
Histo holding the generated charged primary yields for triggered events passing vertex cuts...
static const Double_t fgkEpsilon
Double_t GetSystematicScalingSplinesBelowThreshold() const
Bool_t FillPythiaTrials(Double_t avgTrials)
Double_t * sigma
Bool_t FillGeneratedYield(const Double_t *values, Double_t weight=1.0)
Double_t * fGenRespPrDeltaPrimeKa
Generated responses for a single track.
THnSparseD * fPtResolution[AliPID::kSPECIES]
Container for efficiency determination.
AliPPVsMultUtils * fPPVsMultUtils
PID combined object.
void SetSystematicScalingMultCorrection(Double_t scaleFactor)
Bool_t fInputFromOtherTask
Utilities for pp vs. mult analysis.
Double_t GetSystematicScalingEtaCorrectionHighMomenta() const
static void GetJetTrackObservables(Double_t trackPt, Double_t jetPt, Double_t &z, Double_t &xi, Bool_t storeXi=kTRUE)
TH1D * fhEventsProcessedNoPileUpRejection
Histo holding the number of events passing trigger selection and vtx cut.
int Int_t
Definition: External.C:63
Double_t * fGenRespMuDeltaPrimeEl
Generated responses for a single track.
const TString GetPPCentralityEstimator() const
Double_t GetSystematicScalingSplinesThreshold() const
void SetSystematicScalingEtaCorrectionHighMomenta(Double_t scaleFactor)
static AliAnalysisTaskPID::EventGenerator GetEventGenerator()
Int_t GetIndexOfChargeAxisData() const
THnSparseD * fhGenPr
Generated response for mu.
Bool_t GetStoreCharge() const
Double_t * fGenRespPiDeltaPrimePr
Generated responses for a single track.
const TString GetCentralityEstimator() const
Bool_t ProcessTrack(const AliVTrack *track, Int_t particlePDGcode, Double_t centralityPercentile, Double_t jetPt, Bool_t isMBSelected=kFALSE, Bool_t isMultSelected=kTRUE, Bool_t storeXi=kTRUE, Double_t radialDistanceToJet=-1, Double_t jT=-1)
void FillUEDensity(Double_t cent, Double_t UEpt)
Definition: External.C:252
Bool_t GetDoPtResolution() const
AliAnalysisTaskPID & operator=(const AliAnalysisTaskPID &)
Double_t fSystematicScalingSplinesAboveThreshold
Double_t fSystematicScalingEtaSigmaParaAboveThreshold
Int_t GetIndexOfChargeAxisGenYield() const
Int_t FindBinWithinRange(TAxis *axis, Double_t value) const
Double_t GetSystematicScalingEtaSigmaParaAboveThreshold() const
Double_t GetEtaAbsCutLow() const
Bool_t GetStoreTOFInfo() const
virtual void ConfigureTaskForCurrentEvent(AliVEvent *event)
THnSparseD * fhGenKa
Generated response for el.
Definition: External.C:228
Int_t GetTOFmode() const
Definition: External.C:212
void SetDoPtResolution(Bool_t flag)
virtual void SetUpHist(THnSparse *hist, Double_t *binsPt, Double_t *binsDeltaPrime, Double_t *binsCent, Double_t *binsJetPt, Double_t *binsJt) const
Int_t GetParticleFractionHistoNbinsTrackPt() const
Int_t GetIndexOfTOFpidInfoAxisData() const
AliPIDCombined * fPIDcombined
const Double_t fkDeltaPrimeLowLimit
virtual void SetUpGenHist(THnSparse *hist, Double_t *binsPt, Double_t *binsDeltaPrime, Double_t *binsCent, Double_t *binsJetPt, Double_t *binsJt) const
THnSparseD * fQASharedCls
Pt Resolution for the individual species.
virtual void SetUpSharedClsHist(THnSparse *hist, Double_t *binsPt, Double_t *binsJetPt) const
ErrorCode SetParamsForConvolutedGaus(Double_t gausMean, Double_t gausSigma)
virtual void SetUpPIDcombined()
ErrorCode GenerateDetectorResponse(ErrorCode errCode, Double_t mean, Double_t sigma, Double_t *responses, Int_t nResponses, Bool_t usePureGaus=kFALSE)
Double_t fSystematicScalingEtaSigmaParaBelowThreshold
static const Double_t fgkOneOverSqrt2
void SetUseConvolutedGaus(Bool_t flag)
Bool_t SetParticleFractionHisto(const TH3D *hist, Int_t species, Bool_t sysError=kFALSE)
void SetCentralityEstimator(TString estimator)
const Double_t fkDeltaPrimeUpLimit
TH1F * fh1EvtsPtHardCut
sum of trials
Bool_t GetStoreAdditionalJetInformation() const
THnSparseD * fChargedGenPrimariesTriggerSelVtxCut
Histo holding the generated charged primary yields for triggered events.
Double_t fSystematicScalingEtaCorrectionMomentumThr
void SetSystematicScalingEtaSigmaParaAboveThreshold(Double_t scaleFactor)
Double_t GetMaxEtaVariation(Double_t dEdxSplines)
void SetInputFromOtherTask(Bool_t flag)
static Bool_t IsSecondaryWithStrangeMotherMC(AliMCEvent *mcEvent, Int_t partLabel)
Double_t * fGenRespPiDeltaPrimeEl
Generated responses for a single track.
virtual void UserCreateOutputObjects()
Double_t GetConvolutedGaussTransitionPar(Int_t index) const
static const Int_t fgkMaxNumGenEntries
THnSparseD * fChargedGenPrimariesTriggerSelVtxCutZPileUpRej
Histo holding the generated charged primary yields for triggered events passing vertex cuts (includin...
Double_t * fGenRespKaDeltaPrimeKa
Generated responses for a single track.
Double_t * fGenRespPiDeltaPrimePi
Generated responses for a single track.
Double_t FastGaus(Double_t x, Double_t mean, Double_t sigma) const
void SetDoBinZeroStudy(Bool_t flag)
TProfile * fh1Xsec
Number of generated jets vs. jetPt and centrality.
TH1D * fhMaxEtaVariation
Axis holding the deltaPrime binning.
void SetSystematicScalingSplinesThreshold(Double_t threshold)
Bool_t GetDoDeDxCheck() const
Double_t fSystematicScalingSplinesThreshold
TH1D * fhEventsTriggerSel
Histo holding the number of processed events (i.e. passing trigger selection, vtx and zvtx cuts and (...
Double_t GetSystematicScalingSplinesAboveThreshold() const
void SetUsePriors(Bool_t flag)
Bool_t GetUseITS() const
Double_t ConvolutedGaus(const Double_t *xx, const Double_t *par) const
void SetSystematicScalingEtaSigmaParaThreshold(Double_t threshold)
void SetUseTPCDefaultPriors(Bool_t flag)
Bool_t fDoAnySystematicStudiesOnTheExpectedSignal
void SetStoreTOFInfo(Bool_t flag)
virtual void SetUpBinZeroStudyHist(THnSparse *hist, const Double_t *binsCent, const Double_t *binsPt) const
static Int_t PDGtoMCID(Int_t pdg)
const Int_t fkConvolutedGausNPar
void FillJetArea(Double_t cent, Double_t area)
THnSparseD * fhGenEl
Data histo.
static const Int_t fgkNumJetAxes
const char Option_t
Definition: External.C:48
Double_t GetAccuracyNonGaussianTail() const
void SetUseITS(Bool_t flag)
Double_t * fGenRespElDeltaPrimeKa
Generated responses for a single track.
Double_t fConvolutedGaussTransitionPars[3]
Double_t * fGenRespPiDeltaPrimeKa
Generated responses for a single track.
void SetSystematicScalingEtaCorrectionLowMomenta(Double_t scaleFactor)
bool Bool_t
Definition: External.C:53
THnSparseD * fDeDxCheck
QA for shared clusters.
Double_t * fGenRespElDeltaPrimePi
Generated responses for a single track.
void SetTOFmode(Int_t tofMode)
virtual void Terminate(const Option_t *)
static void SetEventGenerator(AliAnalysisTaskPID::EventGenerator value)
Bool_t FillXsec(Double_t xsection)
static AliAnalysisTaskPID::EventGenerator fgEventGenerator
TAxis * fDeltaPrimeAxis
Generated responses for a single track.
Bool_t GetIsUEPID() const
Bool_t GetDoBinZeroStudy() const
Double_t GetCentralityPercentile(AliVEvent *evt) const
TOFpidInfo GetTOFType(const AliVTrack *track, Int_t tofMode) const
Int_t GetParticleFractionHistoNbinsJetPt() const
Bool_t FillRecJets(Double_t centralityPercentile, Double_t jetPt, Double_t norm=-1.)
Double_t GetSystematicScalingEtaCorrectionLowMomenta() const
Double_t fSystematicScalingSplinesBelowThreshold
Double_t GetSystematicScalingEtaCorrectionMomentumThr() const
Double_t fSystematicScalingEtaCorrectionHighMomenta
Double_t * fGenRespKaDeltaPrimeEl
Generated responses for a single track.
Bool_t FillCutHisto(Double_t value, CutHistoType type)
Double_t * fGenRespKaDeltaPrimePi
Generated responses for a single track.
TH3D * fFractionHists[AliPID::kSPECIES]
Bool_t GetUseConvolutedGaus() const
Bool_t SetParticleFractionHistosFromFile(const TString filePathName, Bool_t sysError=kFALSE)
void SetStoreCentralityPercentile(Bool_t flag)
Bool_t IncrementEventCounter(Double_t centralityPercentile, EventCounterType type)
AliCFContainer * fContainerEff
Number events before and after the cut on MC pT hard.
Double_t GetSystematicScalingMultCorrection() const
Bool_t GetTakeIntoAccountMuons() const
void SetUseMCidForGeneration(Bool_t flag)
Bool_t GetParticleFractions(Double_t trackPt, Double_t jetPt, Double_t centralityPercentile, Double_t *prob, Int_t smearSpeciesByError, Int_t takeIntoAccountSpeciesSysError, Bool_t uniformSystematicError=kFALSE) const
Int_t GetIndexOfTOFpidInfoAxisGen() const
Bool_t FillPtResolution(Int_t mcID, const Double_t *values)
virtual void SetUpGenYieldHist(THnSparse *hist, Double_t *binsPt, Double_t *binsCent, Double_t *binsJetPt, Double_t *binsJt) const
Int_t FindLastBinAboveIn3dSubset(const TH3 *hist, Double_t threshold, Int_t yValue, Int_t zValue) const
Double_t GetSystematicScalingEtaSigmaParaBelowThreshold() const