10 #include "TFitResultPtr.h"
11 #include "TFitResult.h"
13 #include "AliMCParticle.h"
15 #include "AliAnalysisTask.h"
16 #include "AliAnalysisManager.h"
18 #include "AliAODEvent.h"
19 #include "AliESDEvent.h"
20 #include "AliMCEvent.h"
21 #include "AliESDtrackCuts.h"
22 #include "AliAnalysisFilter.h"
23 #include "AliInputEventHandler.h"
25 #include "AliVVertex.h"
27 #include "AliPIDCombined.h"
28 #include "AliPIDResponse.h"
29 #include "AliTPCPIDResponse.h"
31 #include "AliPPVsMultUtils.h"
60 , fPIDcombined(new AliPIDCombined())
61 , fPPVsMultUtils(new AliPPVsMultUtils())
62 , fInputFromOtherTask(kFALSE)
64 , fDoEfficiency(kTRUE)
65 , fDoPtResolution(kFALSE)
66 , fDoDeDxCheck(kFALSE)
67 , fDoBinZeroStudy(kFALSE)
68 , fStoreCentralityPercentile(kFALSE)
69 , fStoreAdditionalJetInformation(kFALSE)
70 , fTakeIntoAccountMuons(kFALSE)
73 , fStoreTOFInfo(kTRUE)
75 , fTPCDefaultPriors(kFALSE)
77 , fUseMCidForGeneration(kTRUE)
78 , fUseConvolutedGaus(kFALSE)
79 , fkConvolutedGausNPar(3)
80 , fAccuracyNonGaussianTail(1e-8)
81 , fkDeltaPrimeLowLimit(0.02)
82 , fkDeltaPrimeUpLimit(40.0)
83 , fConvolutedGausDeltaPrime(0x0)
87 , fDoAnySystematicStudiesOnTheExpectedSignal(kFALSE)
88 , fSystematicScalingSplinesThreshold(50.)
89 , fSystematicScalingSplinesBelowThreshold(1.0)
90 , fSystematicScalingSplinesAboveThreshold(1.0)
91 , fSystematicScalingEtaCorrectionMomentumThr(0.35)
92 , fSystematicScalingEtaCorrectionLowMomenta(1.0)
93 , fSystematicScalingEtaCorrectionHighMomenta(1.0)
94 , fSystematicScalingEtaSigmaParaThreshold(250.)
95 , fSystematicScalingEtaSigmaParaBelowThreshold(1.0)
96 , fSystematicScalingEtaSigmaParaAboveThreshold(1.0)
97 , fSystematicScalingMultCorrection(1.0)
98 , fCentralityEstimator("V0M")
105 , fGenRespElDeltaPrimeEl(new
Double_t[fgkMaxNumGenEntries])
106 , fGenRespElDeltaPrimeKa(new
Double_t[fgkMaxNumGenEntries])
107 , fGenRespElDeltaPrimePi(new
Double_t[fgkMaxNumGenEntries])
108 , fGenRespElDeltaPrimePr(new
Double_t[fgkMaxNumGenEntries])
109 , fGenRespKaDeltaPrimeEl(new
Double_t[fgkMaxNumGenEntries])
110 , fGenRespKaDeltaPrimeKa(new
Double_t[fgkMaxNumGenEntries])
111 , fGenRespKaDeltaPrimePi(new
Double_t[fgkMaxNumGenEntries])
112 , fGenRespKaDeltaPrimePr(new
Double_t[fgkMaxNumGenEntries])
113 , fGenRespPiDeltaPrimeEl(new
Double_t[fgkMaxNumGenEntries])
114 , fGenRespPiDeltaPrimeKa(new
Double_t[fgkMaxNumGenEntries])
115 , fGenRespPiDeltaPrimePi(new
Double_t[fgkMaxNumGenEntries])
116 , fGenRespPiDeltaPrimePr(new
Double_t[fgkMaxNumGenEntries])
117 , fGenRespMuDeltaPrimeEl(new
Double_t[fgkMaxNumGenEntries])
118 , fGenRespMuDeltaPrimeKa(new
Double_t[fgkMaxNumGenEntries])
119 , fGenRespMuDeltaPrimePi(new
Double_t[fgkMaxNumGenEntries])
120 , fGenRespMuDeltaPrimePr(new
Double_t[fgkMaxNumGenEntries])
121 , fGenRespPrDeltaPrimeEl(new
Double_t[fgkMaxNumGenEntries])
122 , fGenRespPrDeltaPrimeKa(new
Double_t[fgkMaxNumGenEntries])
123 , fGenRespPrDeltaPrimePi(new
Double_t[fgkMaxNumGenEntries])
124 , fGenRespPrDeltaPrimePr(new
Double_t[fgkMaxNumGenEntries])
147 , fDeltaPrimeAxis(0x0)
148 , fhMaxEtaVariation(0x0)
149 , fhEventsProcessed(0x0)
150 , fhEventsTriggerSel(0x0)
151 , fhEventsTriggerSelVtxCut(0x0)
152 , fhEventsProcessedNoPileUpRejection(0x0)
153 , fChargedGenPrimariesTriggerSel(0x0)
154 , fChargedGenPrimariesTriggerSelVtxCut(0x0)
155 , fChargedGenPrimariesTriggerSelVtxCutZ(0x0)
156 , fChargedGenPrimariesTriggerSelVtxCutZPileUpRej(0x0)
157 , fhMCgeneratedYieldsPrimaries(0x0)
162 , fh1EvtsPtHardCut(0x0)
166 , fOutputContainer(0x0)
174 AliLog::SetClassDebugLevel(
"AliAnalysisTaskPID", AliLog::kInfo);
177 fkDeltaPrimeLowLimit, fkDeltaPrimeUpLimit,
178 fkConvolutedGausNPar,
"AliAnalysisTaskPID",
"ConvolutedGaus");
182 fConvolutedGausDeltaPrime->SetParameter(0, 0);
183 fConvolutedGausDeltaPrime->SetParameter(1, 1);
184 fConvolutedGausDeltaPrime->SetParameter(2, 2);
190 fConvolutedGaussTransitionPars[0] = -999;
191 fConvolutedGaussTransitionPars[1] = -999;
192 fConvolutedGaussTransitionPars[2] = -999;
195 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
196 fFractionHists[i] = 0x0;
197 fFractionSysErrorHists[i] = 0x0;
199 fPtResolution[i] = 0x0;
207 , fPIDcombined(new AliPIDCombined())
208 , fPPVsMultUtils(new AliPPVsMultUtils())
209 , fInputFromOtherTask(kFALSE)
211 , fDoEfficiency(kTRUE)
212 , fDoPtResolution(kFALSE)
213 , fDoDeDxCheck(kFALSE)
214 , fDoBinZeroStudy(kFALSE)
215 , fStoreCentralityPercentile(kFALSE)
216 , fStoreAdditionalJetInformation(kFALSE)
217 , fTakeIntoAccountMuons(kFALSE)
220 , fStoreTOFInfo(kTRUE)
222 , fTPCDefaultPriors(kFALSE)
223 , fStoreCharge(kTRUE)
224 , fUseMCidForGeneration(kTRUE)
225 , fUseConvolutedGaus(kFALSE)
226 , fkConvolutedGausNPar(3)
227 , fAccuracyNonGaussianTail(1e-8)
228 , fkDeltaPrimeLowLimit(0.02)
229 , fkDeltaPrimeUpLimit(40.0)
230 , fConvolutedGausDeltaPrime(0x0)
234 , fDoAnySystematicStudiesOnTheExpectedSignal(kFALSE)
235 , fSystematicScalingSplinesThreshold(50.)
236 , fSystematicScalingSplinesBelowThreshold(1.0)
237 , fSystematicScalingSplinesAboveThreshold(1.0)
238 , fSystematicScalingEtaCorrectionMomentumThr(0.35)
239 , fSystematicScalingEtaCorrectionLowMomenta(1.0)
240 , fSystematicScalingEtaCorrectionHighMomenta(1.0)
241 , fSystematicScalingEtaSigmaParaThreshold(250.)
242 , fSystematicScalingEtaSigmaParaBelowThreshold(1.0)
243 , fSystematicScalingEtaSigmaParaAboveThreshold(1.0)
244 , fSystematicScalingMultCorrection(1.0)
245 , fCentralityEstimator(
"V0M")
252 , fGenRespElDeltaPrimeEl(new
Double_t[fgkMaxNumGenEntries])
253 , fGenRespElDeltaPrimeKa(new
Double_t[fgkMaxNumGenEntries])
254 , fGenRespElDeltaPrimePi(new
Double_t[fgkMaxNumGenEntries])
255 , fGenRespElDeltaPrimePr(new
Double_t[fgkMaxNumGenEntries])
256 , fGenRespKaDeltaPrimeEl(new
Double_t[fgkMaxNumGenEntries])
257 , fGenRespKaDeltaPrimeKa(new
Double_t[fgkMaxNumGenEntries])
258 , fGenRespKaDeltaPrimePi(new
Double_t[fgkMaxNumGenEntries])
259 , fGenRespKaDeltaPrimePr(new
Double_t[fgkMaxNumGenEntries])
260 , fGenRespPiDeltaPrimeEl(new
Double_t[fgkMaxNumGenEntries])
261 , fGenRespPiDeltaPrimeKa(new
Double_t[fgkMaxNumGenEntries])
262 , fGenRespPiDeltaPrimePi(new
Double_t[fgkMaxNumGenEntries])
263 , fGenRespPiDeltaPrimePr(new
Double_t[fgkMaxNumGenEntries])
264 , fGenRespMuDeltaPrimeEl(new
Double_t[fgkMaxNumGenEntries])
265 , fGenRespMuDeltaPrimeKa(new
Double_t[fgkMaxNumGenEntries])
266 , fGenRespMuDeltaPrimePi(new
Double_t[fgkMaxNumGenEntries])
267 , fGenRespMuDeltaPrimePr(new
Double_t[fgkMaxNumGenEntries])
268 , fGenRespPrDeltaPrimeEl(new
Double_t[fgkMaxNumGenEntries])
269 , fGenRespPrDeltaPrimeKa(new
Double_t[fgkMaxNumGenEntries])
270 , fGenRespPrDeltaPrimePi(new
Double_t[fgkMaxNumGenEntries])
271 , fGenRespPrDeltaPrimePr(new
Double_t[fgkMaxNumGenEntries])
294 , fDeltaPrimeAxis(0x0)
295 , fhMaxEtaVariation(0x0)
296 , fhEventsProcessed(0x0)
297 , fhEventsTriggerSel(0x0)
298 , fhEventsTriggerSelVtxCut(0x0)
299 , fhEventsProcessedNoPileUpRejection(0x0)
300 , fChargedGenPrimariesTriggerSel(0x0)
301 , fChargedGenPrimariesTriggerSelVtxCut(0x0)
302 , fChargedGenPrimariesTriggerSelVtxCutZ(0x0)
303 , fChargedGenPrimariesTriggerSelVtxCutZPileUpRej(0x0)
304 , fhMCgeneratedYieldsPrimaries(0x0)
309 , fh1EvtsPtHardCut(0x0)
313 , fOutputContainer(0x0)
321 AliLog::SetClassDebugLevel(
"AliAnalysisTaskPID", AliLog::kInfo);
342 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
351 DefineInput(0, TChain::Class());
353 DefineOutput(1, TObjArray::Class());
355 DefineOutput(2, AliCFContainer::Class());
357 DefineOutput(3, TObjArray::Class());
502 printf(
"File: %s, Line: %d: SetUpPIDcombined\n", (
char*)__FILE__, __LINE__);
505 AliFatal(
"No PIDcombined object!\n");
518 Int_t detectorMask = AliPIDResponse::kDetTPC;
521 Int_t rejectMismatchMask = AliPIDResponse::kDetTPC;
525 detectorMask = detectorMask | AliPIDResponse::kDetITS;
526 rejectMismatchMask = rejectMismatchMask | AliPIDResponse::kDetITS;
529 detectorMask = detectorMask | AliPIDResponse::kDetTOF;
530 rejectMismatchMask = rejectMismatchMask | AliPIDResponse::kDetTOF;
534 fPIDcombined->SetRejectMismatchMask(rejectMismatchMask);
537 printf(
"File: %s, Line: %d: SetUpPIDcombined done\n", (
char*)__FILE__, __LINE__);
548 AliError(
"No PID response!");
556 AliError(
"No eta correction map!");
570 for (
Int_t binX = 1; binX <= hEta->GetNbinsX(); binX++) {
571 Double_t curr = TMath::Abs(hEta->GetBinContent(binX, binY) - 1.);
576 if (maxAbs < 1e-12) {
577 AliError(Form(
"Maximum deviation from unity is zero for 1/dEdx = %f (bin %d)", hEta->GetYaxis()->GetBinCenter(binY), binY));
585 printf(
"AliAnalysisTaskPID: Calculated max eta variation from map \"%s\".\n", hEta->GetTitle());
598 printf(
"File: %s, Line: %d: UserCreateOutputObjects\n", (
char*)__FILE__, __LINE__);
604 AliFatal(
"PIDResponse object was not created");
611 printf(
"File: %s, Line: %d: UserCreateOutputObjects -> OpenFile(1) successful\n", (
char*)__FILE__, __LINE__);
618 std::cout <<
"OutputContainer successfully created" << std::endl;
631 Double_t binsPt[nPtBins + 1] = {0., 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45,
632 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95,
633 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9,
634 2., 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9,
635 3., 3.2, 3.4, 3.6, 3.8, 4., 4.5, 5., 5.5, 6.,
636 6.5, 7., 8., 9., 10., 11., 12., 13., 14., 15.,
637 16., 18., 20., 22., 24., 26., 28., 30., 32., 34.,
638 36., 40., 45., 50. };
644 const Bool_t useITSTPCtrackletsCentEstimatorWithNewBinning =
fCentralityEstimator.CompareTo(
"ITSTPCtracklets", TString::kIgnoreCase) == 0
647 const Int_t nCentBinsGeneral = 12;
648 const Int_t nCentBinsNewITSTPCtracklets = 16;
650 const Int_t nCentBins = useITSTPCtrackletsCentEstimatorWithNewBinning ? nCentBinsNewITSTPCtracklets : nCentBinsGeneral;
653 for (
Int_t i = 0; i < nCentBins + 1; i++)
657 Double_t binsCentV0[nCentBinsGeneral+1] = {-1, 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };
660 Double_t binsCentITSTPCTracklets[nCentBinsNewITSTPCtracklets+1] = { 0, 1, 4, 7, 10, 15, 20, 25, 30, 40, 50, 60, 70, 80, 90, 100, 9999 };
661 Double_t binsCentITSTPCTrackletsOldPreliminary[nCentBinsGeneral+1] = { 0, 7, 13, 20, 29, 40, 50, 60, 72, 83, 95, 105, 115 };
664 Double_t binsCentpp[nCentBinsGeneral+1] = { 0, 0.01, 0.1, 1, 5, 10, 15, 20, 30, 40, 50, 70, 100};
668 for (
Int_t i = 0; i < nCentBinsGeneral+1; i++)
669 binsCent[i] = binsCentITSTPCTrackletsOldPreliminary[i];
673 for (
Int_t i = 0; i < nCentBinsNewITSTPCtracklets+1; i++)
674 binsCent[i] = binsCentITSTPCTracklets[i];
678 for (
Int_t i = 0; i < nCentBinsGeneral+1; i++)
679 binsCent[i] = binsCentpp[i];
683 for (
Int_t i = 0; i < nCentBinsGeneral+1; i++)
684 binsCent[i] = binsCentV0[i];
687 const Int_t nJetPtBins = 11;
688 Double_t binsJetPt[nJetPtBins+1] = {0, 2, 5, 10, 15, 20, 30, 40, 60, 80, 120, 200};
690 const Int_t nChargeBins = 2;
691 const Double_t binsCharge[nChargeBins+1] = { -1.0 - 1e-4, 0.0, 1.0 + 1e-4 };
699 const Int_t deltaPrimeNBins = 600;
700 Double_t deltaPrimeBins[deltaPrimeNBins + 1];
704 const Double_t factor = TMath::Power(toHigh/fromLow, 1./deltaPrimeNBins);
707 deltaPrimeBins[0] = fromLow;
708 for (
Int_t i = 0 + 1; i <= deltaPrimeNBins; i++) {
709 deltaPrimeBins[i] = factor * deltaPrimeBins[i - 1];
714 const Int_t nMCPIDbins = 5;
718 const Int_t nSelSpeciesBins = 4;
722 const Int_t nZBins = 20;
726 const Int_t nXiBins = 70;
734 const Int_t nDistanceBins = 30;
735 const Double_t distanceBinsMin = 0.;
736 const Double_t distanceBinsMax = 0.6;
740 const Int_t nJtBins = 30 + 1;
745 const Double_t factorJt = TMath::Power(toHighJt/fromLowJt, 1./(nJtBins-1));
749 binsJt[1] = fromLowJt;
750 for (
Int_t i = 0 + 1 + 1; i <= nJtBins; i++) {
751 binsJt[i] = factorJt * binsJt[i - 1];
756 Int_t binsNoJets[nBinsNoJets] = { nMCPIDbins,
764 Int_t binsJets[nBinsJets] = { nMCPIDbins,
779 Double_t xminNoJets[nBinsNoJets] = { mcPIDmin,
787 Double_t xminJets[nBinsJets] = { mcPIDmin,
802 Double_t xmaxNoJets[nBinsNoJets] = { mcPIDmax,
805 deltaPrimeBins[deltaPrimeNBins],
807 binsCharge[nChargeBins],
810 Double_t xmaxJets[nBinsJets] = { mcPIDmax,
813 deltaPrimeBins[deltaPrimeNBins],
815 binsJetPt[nJetPtBins],
818 binsCharge[nChargeBins],
828 fhPIDdataAll =
new THnSparseD(
"hPIDdataAll",
"", nBins, bins, xmin, xmax);
842 fhGenEl =
new THnSparseD(
"hGenEl",
"", nGenBins, genBins, genXmin, genXmax);
846 fhGenKa =
new THnSparseD(
"hGenKa",
"", nGenBins, genBins, genXmin, genXmax);
850 fhGenPi =
new THnSparseD(
"hGenPi",
"", nGenBins, genBins, genXmin, genXmax);
855 fhGenMu =
new THnSparseD(
"hGenMu",
"", nGenBins, genBins, genXmin, genXmax);
860 fhGenPr =
new THnSparseD(
"hGenPr",
"", nGenBins, genBins, genXmin, genXmax);
866 std::cout <<
"Adding Event Histograms" << std::endl;
869 "Number of events passing trigger selection, vtx and zvtx cuts and pile-up rejection;Centrality Percentile",
870 nCentBins, binsCent);
875 "Number of events passing trigger selection and vtx cut;Centrality Percentile",
876 nCentBins, binsCent);
881 "Number of events passing trigger selection;Centrality Percentile",
882 nCentBins, binsCent);
888 "Number of events passing trigger selection, vtx and zvtx cuts;Centrality Percentile",
889 nCentBins, binsCent);
894 std::cout <<
"Event Histograms added" << std::endl;
899 nChargeBins, nDistanceBins, nJtBins };
902 binsCharge[0], distanceBinsMin, binsJt[0] };
905 binsCharge[nChargeBins], distanceBinsMax, binsJt[nJtBins] };
910 "Generated yields w/o reco and cuts inside acceptance (physical primaries)",
911 nBinsGenYields, genYieldsBins, genYieldsXmin, genYieldsXmax);
917 fh2UEDensity =
new TH2D(
"fh2UEDensity",
"p_{T} density of the Underlying event;Centrality Percentile;UE p_{T}/Event", nCentBins, binsCent, 10, 0.0, 4.0);
919 fh1JetArea =
new TH1D(
"fh1JetArea",
"Jet Area (real)/#Pi*#Rho^{2} of the Jets used in the UE;Centrality Percentile",nCentBins,binsCent);
927 std::cout <<
"Try OpenFile(2)" << std::endl;
931 printf(
"File: %s, Line: %d: UserCreateOutputObjects -> OpenFile(2) successful\n", (
char*)__FILE__, __LINE__);
937 const Int_t nMCIDbins = AliPID::kSPECIES;
940 for(
Int_t i = 0; i <= nMCIDbins; i++) {
944 const Int_t nEtaBins = 18;
945 const Double_t binsEta[nEtaBins+1] = {-0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1,
946 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9 };
949 nDistanceBins, nJtBins };
951 fContainerEff =
new AliCFContainer(
"containerEff",
"Reconstruction Efficiency x Acceptance x Resolution and Secondary Correction",
987 "Detector level (rec) with cuts on particle level with measured observables");
990 "Detector level, all cuts on detector level with measured observables");
992 "Detector level, all cuts on detector level, only MC primaries");
994 "Detector level, all cuts on detector level with measured observables, only MC primaries");
996 "Detector level (strangeness scaled), all cuts on detector level with measured observables");
1001 fh2FFJetPtRec =
new TH2D(
"fh2FFJetPtRec",
"Number of reconstructed jets;Centrality Percentile;p_{T}^{jet} (GeV/c)",
1002 nCentBins, binsCent, nJetPtBins, binsJetPt);
1005 fh2FFJetPtGen =
new TH2D(
"fh2FFJetPtGen",
"Number of generated jets;Centrality Percentile;p_{T}^{jet} (GeV/c)",
1006 nCentBins, binsCent, nJetPtBins, binsJetPt);
1012 fh1Xsec =
new TProfile(
"fh1Xsec",
"xsec from pyxsec.root", 1, 0, 1);
1014 fh1Xsec->GetXaxis()->SetBinLabel(1,
"<#sigma>");
1015 fh1Trials =
new TH1D(
"fh1Trials",
"trials from pyxsec.root", 1, 0, 1);
1017 fh1Trials->GetXaxis()->SetBinLabel(1,
"#sum{ntrials}");
1019 fh1EvtsPtHardCut =
new TH1F(
"fh1EvtsPtHardCut",
"#events before and after MC #it{p}_{T,hard} cut;;Events",2,0,2);
1035 printf(
"File: %s, Line: %d: UserCreateOutputObjects -> OpenFile(3) successful\n", (
char*)__FILE__, __LINE__);
1039 const Int_t nPtBinsRes = 100;
1040 Double_t pTbinsRes[nPtBinsRes + 1];
1042 const Double_t fromLowPtRes = 0.15;
1044 const Double_t factorPtRes = TMath::Power(toHighPtRes/fromLowPtRes, 1./nPtBinsRes);
1046 pTbinsRes[0] = fromLowPtRes;
1047 for (
Int_t i = 0 + 1; i <= nPtBinsRes; i++) {
1048 pTbinsRes[i] = factorPtRes * pTbinsRes[i - 1];
1053 nChargeBins, nCentBins };
1055 binsCharge[0], binsCent[0] };
1056 Double_t ptResolutionXmax[
kPtResNumAxes] = { binsJetPt[nJetPtBins], pTbinsRes[nPtBinsRes], pTbinsRes[nPtBinsRes],
1057 binsCharge[nChargeBins], binsCent[
nCentBins] };
1059 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
1060 fPtResolution[i] =
new THnSparseD(Form(
"fPtResolution_%s", AliPID::ParticleShortName(i)),
1061 Form(
"Pt resolution for primaries, %s", AliPID::ParticleLatexName(i)),
1062 nBinsPtResolution, ptResolutionBins, ptResolutionXmin, ptResolutionXmax);
1074 fQASharedCls =
new THnSparseD(
"fQASharedCls",
"QA shared clusters", nBinsQASharedCls, qaSharedClsBins, qaSharedClsXmin, qaSharedClsXmax);
1083 const Int_t nEtaAbsBins = 9;
1084 const Double_t binsEtaAbs[nEtaAbsBins+1] = { 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9 };
1088 const Int_t nDeDxBins = (
Int_t) ((dEdxMax - dEdxMin) / 0.02);
1094 fDeDxCheck =
new THnSparseD(
"fDeDxCheck",
"dEdx check", nBinsDeDxCheck, dEdxCheckBins, dEdxCheckXmin, dEdxCheckXmax);
1102 const Int_t nEtaBins = 18;
1106 Double_t binZeroStudyXmin[nBinsBinZeroStudy] = { binsCent[0], binsPt[0], etaLow };
1110 binZeroStudyXmin, binZeroStudyXmax);
1115 binZeroStudyBins, binZeroStudyXmin, binZeroStudyXmax);
1120 binZeroStudyBins, binZeroStudyXmin, binZeroStudyXmax);
1125 nBinsBinZeroStudy, binZeroStudyBins, binZeroStudyXmin, binZeroStudyXmax);
1131 printf(
"File: %s, Line: %d: UserCreateOutputObjects -> Posting output data\n", (
char*)__FILE__, __LINE__);
1140 printf(
"File: %s, Line: %d: UserCreateOutputObjects -> Done\n", (
char*)__FILE__, __LINE__);
1151 printf(
"File: %s, Line: %d: UserExec\n", (
char*)__FILE__, __LINE__);
1158 printf(
"File: %s, Line: %d: UserExec -> Processing started\n", (
char*)__FILE__, __LINE__);
1160 fEvent =
dynamic_cast<AliVEvent*
>(InputEvent());
1162 Printf(
"ERROR: fEvent not available");
1168 fMC =
dynamic_cast<AliMCEvent*
>(MCEvent());
1173 Double_t centralityPercentile = -1;
1174 Double_t centralityPercentileNoEventSelection = -1;
1179 centralityPercentile = AliPPVsMultUtils::GetStandardReferenceMultiplicity(
fEvent, kTRUE);
1180 centralityPercentileNoEventSelection = AliPPVsMultUtils::GetStandardReferenceMultiplicity(
fEvent, kFALSE);
1191 centralityPercentileNoEventSelection = centralityPercentile;
1195 const Bool_t nonNegativeCentralityPercentileNoEventSelection = centralityPercentileNoEventSelection >= 0;
1196 const Bool_t nonNegativeCentralityPercentile = centralityPercentile >= 0;
1199 Bool_t passedVertexSelectionMult, passedVertexZSelectionMult;
1201 Bool_t passedDAQCheck, passedTrackClustCut;
1211 passedVertexSelectionMult = passedVertexZSelectionMult = kFALSE;
1212 isPileUpMult = kTRUE;
1213 passedDAQCheck = passedTrackClustCut = kFALSE;
1218 passedVertexSelectionMult = nonNegativeCentralityPercentileNoEventSelection ? AliPPVsMultUtils::IsINELgtZERO(
fEvent) : kFALSE;
1220 passedVertexZSelectionMult = nonNegativeCentralityPercentileNoEventSelection ? AliPPVsMultUtils::IsAcceptedVertexPosition(
fEvent) : kFALSE;
1222 isPileUpMult = nonNegativeCentralityPercentileNoEventSelection ? (!AliPPVsMultUtils::IsNotPileupSPDInMultBins(
fEvent) ||
1223 !AliPPVsMultUtils::HasNoInconsistentSPDandTrackVertices(
fEvent)) : kTRUE;
1227 passedDAQCheck = !
fEvent->IsIncompleteDAQ();
1233 for (
Int_t iPart = 0; iPart <
fMC->GetNumberOfTracks(); iPart++) {
1234 AliMCParticle *mcPart =
dynamic_cast<AliMCParticle*
>(
fMC->GetTrack(iPart));
1239 if (!
fMC->IsPhysicalPrimary(iPart))
1242 const Double_t etaGen = mcPart->Eta();
1243 const Double_t ptGen = mcPart->Pt();
1250 if (nonNegativeCentralityPercentileNoEventSelection) {
1253 if (passedVertexSelectionMult) {
1255 if (passedVertexZSelectionMult) {
1257 if (!isPileUpMult && nonNegativeCentralityPercentile) {
1270 if (passedVertexSelectionMB) {
1272 if (passedVertexZSelectionMB) {
1285 Bool_t isMBSelected = kFALSE;
1286 Bool_t isMultSelected = kFALSE;
1291 if (passedVertexSelectionMB) {
1293 if (passedVertexZSelectionMB) {
1304 isMBSelected = kTRUE;
1310 if (nonNegativeCentralityPercentileNoEventSelection) {
1312 if (passedVertexSelectionMult) {
1314 if (passedVertexZSelectionMult) {
1316 if (!isPileUpMult && nonNegativeCentralityPercentile) {
1321 isMultSelected = kTRUE;
1329 if (passedDAQCheck && passedTrackClustCut && !isPileUpMB) {
1331 if (passedVertexSelectionMB) {
1333 if (passedVertexZSelectionMB) {
1335 isMBSelected = kTRUE;
1343 if (!isMBSelected && !isMultSelected)
1352 for (
Int_t iPart = 0; iPart <
fMC->GetNumberOfTracks(); iPart++) {
1353 AliMCParticle *mcPart =
dynamic_cast<AliMCParticle*
>(
fMC->GetTrack(iPart));
1369 Double_t chargeMC = mcPart->Charge() / 3.;
1371 if (TMath::Abs(chargeMC) < 0.01)
1374 if (!
fMC->IsPhysicalPrimary(iPart))
1393 -1, -1, -1, -1, -1 };
1407 for (
Int_t iTracks = 0; iTracks <
fEvent->GetNumberOfTracks(); iTracks++) {
1408 AliVTrack* track =
dynamic_cast<AliVTrack*
>(
fEvent->GetTrack(iTracks));
1410 Printf(
"ERROR: Could not retrieve track %d", iTracks);
1417 ((
fPIDResponse->GetTunedOnDataMask() & AliPIDResponse::kDetTPC) == AliPIDResponse::kDetTPC);
1418 Double_t dEdxTPC = tuneOnDataTPC ?
fPIDResponse->GetTPCsignalTunedOnData(track) : track->GetTPCsignal();
1440 AliMCParticle* mcTrack = 0x0;
1441 Int_t mcID = AliPID::kUnknown;
1445 label = track->GetLabel();
1450 mcTrack =
dynamic_cast<AliMCParticle*
>(
fMC->GetTrack(TMath::Abs(label)));
1452 Printf(
"ERROR: Could not retrieve mcTrack with label %d for track %d", label, iTracks);
1456 pdg = mcTrack->PdgCode();
1462 if (
fMC->IsPhysicalPrimary(TMath::Abs(label)) &&
1467 centralityPercentile, -1, -1, -1, -1, -1 };
1477 centralityPercentile, -1, -1, -1, -1, -1 };
1493 ProcessTrack(track, pdg, centralityPercentile, -1, isMBSelected, isMultSelected);
1496 if (mcTrack &&
fMC->IsPhysicalPrimary(TMath::Abs(label))) {
1498 Double_t valuePtRes[
kPtResNumAxes] = { -1, mcTrack->Pt(), track->Pt(), mcTrack->Charge() / 3., centralityPercentile };
1513 centralityPercentile, -1, -1, -1, -1, -1 };
1516 if (isMultSelected) {
1530 centralityPercentile, -1, -1, -1, -1, -1 };
1531 if (
fMC->IsPhysicalPrimary(TMath::Abs(label))) {
1532 if (isMultSelected) {
1549 printf(
"File: %s, Line: %d: UserExec -> Processing done\n", (
char*)__FILE__, __LINE__);
1554 printf(
"File: %s, Line: %d: UserExec -> Done\n", (
char*)__FILE__, __LINE__);
1605 AliError(
"Could not set up task: no event!");
1609 Int_t run =
event->GetRunNumber();
1616 AliFatal(
"Systematics on eta correction requested, but failed to calculate max eta varation map!");
1630 Int_t absPDGcode = TMath::Abs(pdg);
1631 if (absPDGcode == 211) {
1632 return AliPID::kPion;
1634 else if (absPDGcode == 321) {
1635 return AliPID::kKaon;
1637 else if (absPDGcode == 2212) {
1640 else if (absPDGcode == 11) {
1641 return AliPID::kElectron;
1643 else if (absPDGcode == 13) {
1644 return AliPID::kMuon;
1647 return AliPID::kUnknown;
1656 z = (jetPt > 0 && trackPt >= 0) ? (trackPt / jetPt) : -1;
1658 xi = (z > 0) ? TMath::Log(1. / z) : -1;
1664 if(trackPt > (1. - 1e-06) * jetPt && trackPt < (1. + 1e-06) * jetPt) {
1666 xi = storeXi ? 1e-06 : -1;
1676 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
1696 printf(
"File: %s, Line: %d: ConvolutedGaus: mean %e, sigma %e, lambda %e\n", (
char*)__FILE__, __LINE__, mean, sigma, lambda);
1698 return lambda/sigma*TMath::Exp(-lambda/sigma*(xx[0]-mean)+lambda*lambda*0.5)*0.5*TMath::Erfc((-xx[0]+mean+sigma*lambda)/sigma*
fgkOneOverSqrt2);
1710 const Double_t arg = (x - mean) / sigma;
1711 return exp(-0.5 * arg * arg);
1723 const Double_t arg = (x - mean) / sigma;
1724 const Double_t res = exp(-0.5 * arg * arg);
1725 return res / (2.50662827463100024 *
sigma);
1735 Int_t bin = axis->FindFixBin(value);
1739 if (bin > axis->GetNbins())
1740 bin = axis->GetNbins();
1757 Int_t nBinsX = hist->GetNbinsX();
1758 for (
Int_t xBin = 1; xBin <= nBinsX; xBin++) {
1759 if (hist->GetBinContent(xBin, yBin, zBin) > threshold)
1778 Int_t nBinsX = hist->GetNbinsX();
1779 for (
Int_t xBin = nBinsX; xBin >= 1; xBin--) {
1780 if (hist->GetBinContent(xBin, yBin, zBin) > threshold)
1790 AliPID::EParticleType species,
1799 fractionErrorStat = 999.;
1800 fractionErrorSys = 999.;
1803 AliError(Form(
"Only fractions for species index %d to %d availabe, but not for the requested one: %d", 0,
AliPID::kProton, species));
1808 AliError(Form(
"Histo with particle fractions for species %d not loaded!", species));
1831 if (trackPt <= xAxis->GetBinCenter(firstBin)) {
1832 fraction =
fFractionHists[species]->GetBinContent(firstBin, jetPtBin, centBin);
1833 fractionErrorStat =
fFractionHists[species]->GetBinError(firstBin, jetPtBin, centBin);
1836 else if (trackPt >= xAxis->GetBinCenter(lastBin)) {
1837 fraction =
fFractionHists[species]->GetBinContent(lastBin, jetPtBin, centBin);
1838 fractionErrorStat =
fFractionHists[species]->GetBinError(lastBin, jetPtBin, centBin);
1842 Double_t x0 = 0., x1 = 0., y0 = 0., y1 = 0.;
1843 Double_t y0errStat = 0., y1errStat = 0., y0errSys = 0., y1errSys = 0.;
1844 Int_t trackPtBin = xAxis->FindFixBin(trackPt);
1847 if (trackPt <= xAxis->GetBinCenter(trackPtBin)) {
1848 y0 =
fFractionHists[species]->GetBinContent(trackPtBin - 1, jetPtBin, centBin);
1849 y0errStat =
fFractionHists[species]->GetBinError(trackPtBin - 1, jetPtBin, centBin);
1852 x0 = xAxis->GetBinCenter(trackPtBin - 1);
1853 y1 =
fFractionHists[species]->GetBinContent(trackPtBin, jetPtBin, centBin);
1854 y1errStat =
fFractionHists[species]->GetBinError(trackPtBin, jetPtBin, centBin);
1857 x1 = xAxis->GetBinCenter(trackPtBin);
1860 y0 =
fFractionHists[species]->GetBinContent(trackPtBin, jetPtBin, centBin);
1861 y0errStat =
fFractionHists[species]->GetBinError(trackPtBin, jetPtBin, centBin);
1864 x0 = xAxis->GetBinCenter(trackPtBin);
1865 y1 =
fFractionHists[species]->GetBinContent(trackPtBin + 1, jetPtBin, centBin);
1866 y1errStat =
fFractionHists[species]->GetBinError(trackPtBin + 1, jetPtBin, centBin);
1869 x1 = xAxis->GetBinCenter(trackPtBin + 1);
1873 fraction = y0 + (trackPt - x0) * ((y1 - y0) / (x1 - x0));
1874 fractionErrorStat = y0errStat + (trackPt - x0) * ((y1errStat - y0errStat) / (x1 - x0));
1875 fractionErrorSys =
fFractionSysErrorHists[species] ? (y0errSys + (trackPt - x0) * ((y1errSys - y0errSys) / (x1 - x0))) : 0.;
1885 Int_t takeIntoAccountSpeciesSysError,
Bool_t uniformSystematicError)
const
1902 if (!prob || smearSpeciesByError >= AliPID::kSPECIES || takeIntoAccountSpeciesSysError >= AliPID::kSPECIES)
1905 Double_t probTemp[AliPID::kSPECIES];
1906 Double_t probErrorStat[AliPID::kSPECIES];
1907 Double_t probErrorSys[AliPID::kSPECIES];
1910 success = success &&
GetParticleFraction(trackPt, jetPt, centralityPercentile, AliPID::kElectron,
1911 probTemp[AliPID::kElectron], probErrorStat[AliPID::kElectron],
1912 probErrorSys[AliPID::kElectron]);
1913 success = success &&
GetParticleFraction(trackPt, jetPt, centralityPercentile, AliPID::kMuon,
1914 probTemp[AliPID::kMuon], probErrorStat[AliPID::kMuon], probErrorSys[AliPID::kMuon]);
1915 success = success &&
GetParticleFraction(trackPt, jetPt, centralityPercentile, AliPID::kPion,
1916 probTemp[AliPID::kPion], probErrorStat[AliPID::kPion], probErrorSys[AliPID::kPion]);
1917 success = success &&
GetParticleFraction(trackPt, jetPt, centralityPercentile, AliPID::kKaon,
1918 probTemp[AliPID::kKaon], probErrorStat[AliPID::kKaon], probErrorSys[AliPID::kKaon]);
1920 probTemp[
AliPID::kProton], probErrorStat[AliPID::kProton], probErrorSys[AliPID::kProton]);
1926 if (takeIntoAccountSpeciesSysError >= 0) {
1928 Double_t generatedFraction = uniformSystematicError
1929 ?
fRandom->Rndm() * 2. * probErrorSys[takeIntoAccountSpeciesSysError]
1930 - probErrorSys[takeIntoAccountSpeciesSysError]
1931 + probTemp[takeIntoAccountSpeciesSysError]
1932 :
fRandom->Gaus(probTemp[takeIntoAccountSpeciesSysError],
1933 probErrorSys[takeIntoAccountSpeciesSysError]);
1936 if (generatedFraction < 0.)
1937 generatedFraction = 0.;
1938 else if (generatedFraction > 1.)
1939 generatedFraction = 1.;
1942 Double_t deltaFraction = generatedFraction - probTemp[takeIntoAccountSpeciesSysError];
1945 if (deltaFraction > 0) {
1947 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
1948 if (probTemp[i] - probErrorSys[i] < 0)
1949 probErrorSys[i] = probTemp[i];
1954 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
1955 if (probTemp[i] + probErrorSys[i] > 1)
1956 probErrorSys[i] = 1. - probTemp[i];
1962 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
1963 if (i != takeIntoAccountSpeciesSysError)
1964 summedWeight += probErrorSys[i];
1976 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
1977 if (i != takeIntoAccountSpeciesSysError) {
1978 if (summedWeight > 1e-13)
1979 weight[i] = probErrorSys[i] / summedWeight;
1981 weight[i] = probErrorSys[i] / (AliPID::kSPECIES - 1);
1987 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
1988 if (i != takeIntoAccountSpeciesSysError)
1989 probTemp[i] = probTemp[i] - weight[i] * deltaFraction;
1991 probTemp[i] = generatedFraction;
1998 if (smearSpeciesByError >= 0) {
2000 Double_t generatedFraction =
fRandom->Gaus(probTemp[smearSpeciesByError], probErrorStat[smearSpeciesByError]);
2003 if (generatedFraction < 0.)
2004 generatedFraction = 0.;
2005 else if (generatedFraction > 1.)
2006 generatedFraction = 1.;
2009 Double_t deltaFraction = generatedFraction - probTemp[smearSpeciesByError];
2012 if (deltaFraction > 0) {
2014 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
2015 if (probTemp[i] - probErrorStat[i] < 0)
2016 probErrorStat[i] = probTemp[i];
2021 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
2022 if (probTemp[i] + probErrorStat[i] > 1)
2023 probErrorStat[i] = 1. - probTemp[i];
2029 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
2030 if (i != smearSpeciesByError)
2031 summedWeight += probErrorStat[i];
2043 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
2044 if (i != smearSpeciesByError) {
2045 if (summedWeight > 1e-13)
2046 weight[i] = probErrorStat[i] / summedWeight;
2048 weight[i] = probErrorStat[i] / (AliPID::kSPECIES - 1);
2054 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
2055 if (i != smearSpeciesByError)
2056 prob[i] = probTemp[i] - weight[i] * deltaFraction;
2058 prob[i] = generatedFraction;
2063 for (
Int_t i = 0; i < AliPID::kSPECIES; i++)
2064 prob[i] = probTemp[i];
2070 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
2077 if (TMath::Abs(probSum - 1.0) > 1e-4) {
2078 printf(
"Warning: Re-normalising sum of fractions: Sum is %e\n", probSum);
2079 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
2107 const Int_t absMotherPDG = TMath::Abs(motherPDG);
2112 if (absMotherPDG == 310 || absMotherPDG == 321) {
2113 if (0.00 <= motherGenPt && motherGenPt < 0.20) fac = 0.873424;
2114 else if(0.20 <= motherGenPt && motherGenPt < 0.40) fac = 0.854657;
2115 else if(0.40 <= motherGenPt && motherGenPt < 0.60) fac = 0.800455;
2116 else if(0.60 <= motherGenPt && motherGenPt < 0.80) fac = 0.738324;
2117 else if(0.80 <= motherGenPt && motherGenPt < 1.00) fac = 0.687298;
2118 else if(1.00 <= motherGenPt && motherGenPt < 1.20) fac = 0.650806;
2119 else if(1.20 <= motherGenPt && motherGenPt < 1.40) fac = 0.629848;
2120 else if(1.40 <= motherGenPt && motherGenPt < 1.60) fac = 0.619261;
2121 else if(1.60 <= motherGenPt && motherGenPt < 1.80) fac = 0.610045;
2122 else if(1.80 <= motherGenPt && motherGenPt < 2.00) fac = 0.601626;
2123 else if(2.00 <= motherGenPt && motherGenPt < 2.20) fac = 0.605392;
2124 else if(2.20 <= motherGenPt && motherGenPt < 2.40) fac = 0.596221;
2125 else if(2.40 <= motherGenPt && motherGenPt < 2.60) fac = 0.607561;
2126 else if(2.60 <= motherGenPt && motherGenPt < 2.80) fac = 0.604021;
2127 else if(2.80 <= motherGenPt && motherGenPt < 3.00) fac = 0.600392;
2128 else if(3.00 <= motherGenPt && motherGenPt < 3.20) fac = 0.603259;
2129 else if(3.20 <= motherGenPt && motherGenPt < 3.40) fac = 0.619247;
2130 else if(3.40 <= motherGenPt && motherGenPt < 3.60) fac = 0.614940;
2131 else if(3.60 <= motherGenPt && motherGenPt < 3.80) fac = 0.632294;
2132 else if(3.80 <= motherGenPt && motherGenPt < 4.00) fac = 0.633038;
2133 else if(4.00 <= motherGenPt && motherGenPt < 5.00) fac = 0.646769;
2134 else if(5.00 <= motherGenPt && motherGenPt < 6.00) fac = 0.700733;
2135 else if(6.00 <= motherGenPt && motherGenPt < 8.00) fac = 0.664591;
2136 else if(8.00 <= motherGenPt && motherGenPt < 10.00) fac = 0.683853;
2139 if (absMotherPDG == 3122) {
2141 if (0.00 <= motherGenPt && motherGenPt < 0.20) fac = 0.871675;
2142 else if(0.20 <= motherGenPt && motherGenPt < 0.40) fac = 0.892235;
2143 else if(0.40 <= motherGenPt && motherGenPt < 0.60) fac = 0.705598;
2144 else if(0.60 <= motherGenPt && motherGenPt < 0.80) fac = 0.630633;
2145 else if(0.80 <= motherGenPt && motherGenPt < 1.00) fac = 0.552697;
2146 else if(1.00 <= motherGenPt && motherGenPt < 1.20) fac = 0.505789;
2147 else if(1.20 <= motherGenPt && motherGenPt < 1.40) fac = 0.461067;
2148 else if(1.40 <= motherGenPt && motherGenPt < 1.60) fac = 0.433770;
2149 else if(1.60 <= motherGenPt && motherGenPt < 1.80) fac = 0.422565;
2150 else if(1.80 <= motherGenPt && motherGenPt < 2.00) fac = 0.398517;
2151 else if(2.00 <= motherGenPt && motherGenPt < 2.20) fac = 0.393404;
2152 else if(2.20 <= motherGenPt && motherGenPt < 2.40) fac = 0.394656;
2153 else if(2.40 <= motherGenPt && motherGenPt < 2.60) fac = 0.390861;
2154 else if(2.60 <= motherGenPt && motherGenPt < 2.80) fac = 0.380383;
2155 else if(2.80 <= motherGenPt && motherGenPt < 3.00) fac = 0.396162;
2156 else if(3.00 <= motherGenPt && motherGenPt < 3.20) fac = 0.388568;
2157 else if(3.20 <= motherGenPt && motherGenPt < 3.40) fac = 0.429110;
2158 else if(3.40 <= motherGenPt && motherGenPt < 3.60) fac = 0.427236;
2159 else if(3.60 <= motherGenPt && motherGenPt < 3.80) fac = 0.437851;
2160 else if(3.80 <= motherGenPt && motherGenPt < 4.00) fac = 0.470140;
2161 else if(4.00 <= motherGenPt && motherGenPt < 5.00) fac = 0.509113;
2162 else if(5.00 <= motherGenPt && motherGenPt < 6.00) fac = 0.616101;
2163 else if(6.00 <= motherGenPt && motherGenPt < 8.00) fac = 0.832494;
2164 else if(8.00 <= motherGenPt && motherGenPt < 10.00) fac = 0.997015;
2167 if (absMotherPDG == 3312 || absMotherPDG == 3322) {
2168 if (0.00 <= motherGenPt && motherGenPt < 0.20) fac = 0.946902;
2169 else if(0.20 <= motherGenPt && motherGenPt < 0.40) fac = 0.885799;
2170 else if(0.40 <= motherGenPt && motherGenPt < 0.60) fac = 0.712161;
2171 else if(0.60 <= motherGenPt && motherGenPt < 0.80) fac = 0.595333;
2172 else if(0.80 <= motherGenPt && motherGenPt < 1.00) fac = 0.531432;
2173 else if(1.00 <= motherGenPt && motherGenPt < 1.20) fac = 0.424845;
2174 else if(1.20 <= motherGenPt && motherGenPt < 1.40) fac = 0.378739;
2175 else if(1.40 <= motherGenPt && motherGenPt < 1.60) fac = 0.347243;
2176 else if(1.60 <= motherGenPt && motherGenPt < 1.80) fac = 0.366527;
2177 else if(1.80 <= motherGenPt && motherGenPt < 2.00) fac = 0.332981;
2178 else if(2.00 <= motherGenPt && motherGenPt < 2.20) fac = 0.314722;
2179 else if(2.20 <= motherGenPt && motherGenPt < 2.40) fac = 0.287927;
2180 else if(2.40 <= motherGenPt && motherGenPt < 2.60) fac = 0.285158;
2181 else if(2.60 <= motherGenPt && motherGenPt < 2.80) fac = 0.296892;
2182 else if(2.80 <= motherGenPt && motherGenPt < 3.00) fac = 0.291956;
2183 else if(3.00 <= motherGenPt && motherGenPt < 3.20) fac = 0.347254;
2184 else if(3.20 <= motherGenPt && motherGenPt < 3.40) fac = 0.348836;
2185 else if(3.40 <= motherGenPt && motherGenPt < 3.60) fac = 0.287240;
2186 else if(3.60 <= motherGenPt && motherGenPt < 3.80) fac = 0.325536;
2187 else if(3.80 <= motherGenPt && motherGenPt < 4.00) fac = 0.364368;
2188 else if(4.00 <= motherGenPt && motherGenPt < 5.00) fac = 0.405848;
2189 else if(5.00 <= motherGenPt && motherGenPt < 6.00) fac = 0.439721;
2194 if (absMotherPDG == 310 || absMotherPDG == 321) {
2195 if (0.00 <= motherGenPt && motherGenPt < 0.20) fac = 0.768049;
2196 else if(0.20 <= motherGenPt && motherGenPt < 0.40) fac = 0.732933;
2197 else if(0.40 <= motherGenPt && motherGenPt < 0.60) fac = 0.650298;
2198 else if(0.60 <= motherGenPt && motherGenPt < 0.80) fac = 0.571332;
2199 else if(0.80 <= motherGenPt && motherGenPt < 1.00) fac = 0.518734;
2200 else if(1.00 <= motherGenPt && motherGenPt < 1.20) fac = 0.492543;
2201 else if(1.20 <= motherGenPt && motherGenPt < 1.40) fac = 0.482704;
2202 else if(1.40 <= motherGenPt && motherGenPt < 1.60) fac = 0.488056;
2203 else if(1.60 <= motherGenPt && motherGenPt < 1.80) fac = 0.488861;
2204 else if(1.80 <= motherGenPt && motherGenPt < 2.00) fac = 0.492862;
2205 else if(2.00 <= motherGenPt && motherGenPt < 2.20) fac = 0.504332;
2206 else if(2.20 <= motherGenPt && motherGenPt < 2.40) fac = 0.501858;
2207 else if(2.40 <= motherGenPt && motherGenPt < 2.60) fac = 0.512970;
2208 else if(2.60 <= motherGenPt && motherGenPt < 2.80) fac = 0.524131;
2209 else if(2.80 <= motherGenPt && motherGenPt < 3.00) fac = 0.539130;
2210 else if(3.00 <= motherGenPt && motherGenPt < 3.20) fac = 0.554101;
2211 else if(3.20 <= motherGenPt && motherGenPt < 3.40) fac = 0.560348;
2212 else if(3.40 <= motherGenPt && motherGenPt < 3.60) fac = 0.568869;
2213 else if(3.60 <= motherGenPt && motherGenPt < 3.80) fac = 0.583310;
2214 else if(3.80 <= motherGenPt && motherGenPt < 4.00) fac = 0.604818;
2215 else if(4.00 <= motherGenPt && motherGenPt < 5.00) fac = 0.632630;
2216 else if(5.00 <= motherGenPt && motherGenPt < 6.00) fac = 0.710070;
2217 else if(6.00 <= motherGenPt && motherGenPt < 8.00) fac = 0.736365;
2218 else if(8.00 <= motherGenPt && motherGenPt < 10.00) fac = 0.835865;
2221 if (absMotherPDG == 3122) {
2223 if (0.00 <= motherGenPt && motherGenPt < 0.20) fac = 0.645162;
2224 else if(0.20 <= motherGenPt && motherGenPt < 0.40) fac = 0.627431;
2225 else if(0.40 <= motherGenPt && motherGenPt < 0.60) fac = 0.457136;
2226 else if(0.60 <= motherGenPt && motherGenPt < 0.80) fac = 0.384369;
2227 else if(0.80 <= motherGenPt && motherGenPt < 1.00) fac = 0.330597;
2228 else if(1.00 <= motherGenPt && motherGenPt < 1.20) fac = 0.309571;
2229 else if(1.20 <= motherGenPt && motherGenPt < 1.40) fac = 0.293620;
2230 else if(1.40 <= motherGenPt && motherGenPt < 1.60) fac = 0.283709;
2231 else if(1.60 <= motherGenPt && motherGenPt < 1.80) fac = 0.282047;
2232 else if(1.80 <= motherGenPt && motherGenPt < 2.00) fac = 0.277261;
2233 else if(2.00 <= motherGenPt && motherGenPt < 2.20) fac = 0.275772;
2234 else if(2.20 <= motherGenPt && motherGenPt < 2.40) fac = 0.280726;
2235 else if(2.40 <= motherGenPt && motherGenPt < 2.60) fac = 0.288540;
2236 else if(2.60 <= motherGenPt && motherGenPt < 2.80) fac = 0.288315;
2237 else if(2.80 <= motherGenPt && motherGenPt < 3.00) fac = 0.296619;
2238 else if(3.00 <= motherGenPt && motherGenPt < 3.20) fac = 0.302993;
2239 else if(3.20 <= motherGenPt && motherGenPt < 3.40) fac = 0.338121;
2240 else if(3.40 <= motherGenPt && motherGenPt < 3.60) fac = 0.349800;
2241 else if(3.60 <= motherGenPt && motherGenPt < 3.80) fac = 0.356802;
2242 else if(3.80 <= motherGenPt && motherGenPt < 4.00) fac = 0.391202;
2243 else if(4.00 <= motherGenPt && motherGenPt < 5.00) fac = 0.422573;
2244 else if(5.00 <= motherGenPt && motherGenPt < 6.00) fac = 0.573815;
2245 else if(6.00 <= motherGenPt && motherGenPt < 8.00) fac = 0.786984;
2246 else if(8.00 <= motherGenPt && motherGenPt < 10.00) fac = 1.020021;
2249 if (absMotherPDG == 3312 || absMotherPDG == 3322) {
2250 if (0.00 <= motherGenPt && motherGenPt < 0.20) fac = 0.666620;
2251 else if(0.20 <= motherGenPt && motherGenPt < 0.40) fac = 0.575908;
2252 else if(0.40 <= motherGenPt && motherGenPt < 0.60) fac = 0.433198;
2253 else if(0.60 <= motherGenPt && motherGenPt < 0.80) fac = 0.340901;
2254 else if(0.80 <= motherGenPt && motherGenPt < 1.00) fac = 0.290896;
2255 else if(1.00 <= motherGenPt && motherGenPt < 1.20) fac = 0.236074;
2256 else if(1.20 <= motherGenPt && motherGenPt < 1.40) fac = 0.218681;
2257 else if(1.40 <= motherGenPt && motherGenPt < 1.60) fac = 0.207763;
2258 else if(1.60 <= motherGenPt && motherGenPt < 1.80) fac = 0.222848;
2259 else if(1.80 <= motherGenPt && motherGenPt < 2.00) fac = 0.208806;
2260 else if(2.00 <= motherGenPt && motherGenPt < 2.20) fac = 0.197275;
2261 else if(2.20 <= motherGenPt && motherGenPt < 2.40) fac = 0.183645;
2262 else if(2.40 <= motherGenPt && motherGenPt < 2.60) fac = 0.188788;
2263 else if(2.60 <= motherGenPt && motherGenPt < 2.80) fac = 0.188282;
2264 else if(2.80 <= motherGenPt && motherGenPt < 3.00) fac = 0.207442;
2265 else if(3.00 <= motherGenPt && motherGenPt < 3.20) fac = 0.240388;
2266 else if(3.20 <= motherGenPt && motherGenPt < 3.40) fac = 0.241916;
2267 else if(3.40 <= motherGenPt && motherGenPt < 3.60) fac = 0.208276;
2268 else if(3.60 <= motherGenPt && motherGenPt < 3.80) fac = 0.234550;
2269 else if(3.80 <= motherGenPt && motherGenPt < 4.00) fac = 0.251689;
2270 else if(4.00 <= motherGenPt && motherGenPt < 5.00) fac = 0.310204;
2271 else if(5.00 <= motherGenPt && motherGenPt < 6.00) fac = 0.343492;
2290 AliMCParticle* currentMother = daughter;
2291 AliMCParticle* currentDaughter = daughter;
2296 Int_t daughterPDG = currentDaughter->PdgCode();
2298 Int_t motherLabel = currentDaughter->GetMother();
2299 if(motherLabel >= mcEvent->GetNumberOfTracks()){
2300 currentMother = currentDaughter;
2304 currentMother = (AliMCParticle*)mcEvent->GetTrack(motherLabel);
2306 if (!currentMother) {
2307 currentMother = currentDaughter;
2311 Int_t motherPDG = currentMother->PdgCode();
2314 if (mcEvent->IsPhysicalPrimary(motherLabel))
2317 if (TMath::Abs(daughterPDG) == 321) {
2319 currentMother = currentDaughter;
2322 if (TMath::Abs(motherPDG) == 310) {
2326 if (TMath::Abs(motherPDG) == 3212 && TMath::Abs(daughterPDG) == 3122) {
2328 currentMother = currentDaughter;
2332 currentDaughter = currentMother;
2336 Int_t motherPDG = currentMother->PdgCode();
2337 Double_t motherGenPt = currentMother->Pt();
2352 Printf(
"ERROR: fPIDResponse not available -> Cannot determine TOF type!");
2401 if (tofStatus != AliPIDResponse::kDetPidOk)
2416 else if (tofMode == 1) {
2420 else if (tofMode == 2) {
2425 Printf(
"ERROR: Bad TOF mode: %d!", tofMode);
2431 if (TMath::Abs(nsigma[
kTOFpion]) < inclusion && TMath::Abs(nsigma[
kTOFkaon]) > exclusion && TMath::Abs(nsigma[
kTOFproton]) > exclusion)
2433 if (TMath::Abs(nsigma[kTOFpion]) > exclusion && TMath::Abs(nsigma[kTOFkaon]) < inclusion && TMath::Abs(nsigma[kTOFproton]) > exclusion)
2435 if (TMath::Abs(nsigma[kTOFpion]) > exclusion && TMath::Abs(nsigma[kTOFkaon]) > exclusion && TMath::Abs(nsigma[kTOFproton]) < inclusion)
2457 if (!mcEvent || partLabel < 0)
2460 AliMCParticle* part = (AliMCParticle*)mcEvent->GetTrack(partLabel);
2465 if (mcEvent->IsPhysicalPrimary(partLabel))
2468 Int_t iMother = part->GetMother();
2473 AliMCParticle* partM = (AliMCParticle*)mcEvent->GetTrack(iMother);
2477 Int_t codeM = TMath::Abs(partM->PdgCode());
2478 Int_t mfl =
Int_t(codeM / TMath::Power(10,
Int_t(TMath::Log10(codeM))));
2479 if (mfl == 3 && codeM != 3)
2493 AliError(Form(
"Only fractions for species index %d to %d can be set, but not for the requested one: %d", 0,
2494 AliPID::kProton, species));
2521 TFile* f = TFile::Open(filePathName.Data());
2523 std::cout <<
"Failed to open file with particle fractions \"" << filePathName.Data() <<
"\"!" << std::endl;
2528 for (
Int_t i = 0; i < AliPID::kSPECIES; i++) {
2529 TString histName = Form(
"hFraction%s_%s", sysError ?
"SysError" :
"", AliPID::ParticleName(i));
2530 hist =
dynamic_cast<TH3D*
>(f->Get(histName.Data()));
2532 std::cout <<
"Failed to load particle fractions for " << histName.Data() <<
"!";
2533 std::cout << std::endl <<
"Cleaning up particle fraction histos!" << std::endl;
2539 std::cout <<
"Failed to load particle fractions for " << histName.Data() <<
"!";
2540 std::cout << std::endl <<
"Cleaning up particle fraction histos!" << std::endl;
2560 Printf(
"Error GetMaxEtaVariation: No map or invalid dEdxSplines (%f)!", dEdxSplines);
2579 Bool_t takeIntoAccountSysError)
const
2594 Int_t randomSpecies = (smearByError || takeIntoAccountSysError) ? (
Int_t)(
fRandom->Rndm() * AliPID::kSPECIES) : -1;
2598 return AliPID::kUnknown;
2602 if (rnd <= prob[AliPID::kPion])
2603 return AliPID::kPion;
2604 else if (rnd <= prob[AliPID::kPion] + prob[AliPID::kKaon])
2605 return AliPID::kKaon;
2606 else if (rnd <= prob[AliPID::kPion] + prob[AliPID::kKaon] + prob[
AliPID::kProton])
2608 else if (rnd <= prob[AliPID::kPion] + prob[AliPID::kKaon] + prob[AliPID::kProton] + prob[AliPID::kElectron])
2609 return AliPID::kElectron;
2611 return AliPID::kMuon;
2627 for (
Int_t i = 0; i < nResponses; i++)
2628 responses[i] = -999;
2638 TH1* hProbDensity = 0x0;
2640 if (ownErrCode ==
kError)
2645 for (
Int_t i = 0; i < nResponses; i++) {
2646 responses[i] = hProbDensity->GetRandom();
2651 for (
Int_t i = 0; i < nResponses; i++) {
2652 responses[i] =
fRandom->Gaus(mean, sigma);
2669 printf(
"\n\nSettings for task %s:\n", GetName());
2706 printf(
"\nParams for transition from gauss to asymmetric shape:\n");
2713 std::cout <<
"Run Mode: ";
2715 std::cout <<
"Jet PID Mode";
2718 std::cout <<
"Light Flavor Mode";
2721 std::cout <<
"No recognized Run mode";
2723 std::cout << std::endl;
2725 std::cout <<
"Store Charge: " << std::endl;
2727 std::cout <<
"true";
2729 std::cout <<
"false";
2731 std::cout << std::endl;
2732 printf(
"Do PID: %d\n",
fDoPID);
2739 std::cout <<
"Use Strangeness weighting factors for Pythia 6 (Perugia 2011)" << std::endl;
2742 std::cout <<
"Use Strangeness weighting factors for Pythia 6 (Perugia 0)" << std::endl;
2745 std::cout <<
"Using kUnknown Strangeness weighting factors" << std::endl;
2755 if (printSystematicsSettings)
2767 printf(
"\n\nSettings for systematics for task %s:\n", GetName());
2795 printf(
"File: %s, Line: %d: ProcessTrack\n", (
char*)__FILE__, __LINE__);
2797 if (!isMBSelected && !isMultSelected)
2804 printf(
"File: %s, Line: %d: ProcessTrack -> Processing started\n", (
char*)__FILE__, __LINE__);
2806 const Bool_t isMC = (particlePDGcode == 0) ? kFALSE : kTRUE;
2811 if (TMath::Abs(particlePDGcode) == 211) {
2814 else if (TMath::Abs(particlePDGcode) == 321) {
2817 else if (TMath::Abs(particlePDGcode) == 2212) {
2820 else if (TMath::Abs(particlePDGcode) == 11) {
2823 else if (TMath::Abs(particlePDGcode) == 13) {
2835 const Double_t pTPC = track->GetTPCmomentum();
2845 ((
fPIDResponse->GetTunedOnDataMask() & AliPIDResponse::kDetTPC) == AliPIDResponse::kDetTPC);
2846 Double_t dEdxTPC = tuneOnDataTPC ?
fPIDResponse->GetTPCsignalTunedOnData(track) : track->GetTPCsignal();
2850 Printf(
"Skipping track with strange dEdx value: dEdx %f, pTPC %f, eta %f, ncl %d\n", track->GetTPCsignal(), pTPC,
2851 track->Eta(), track->GetTPCsignalN());
2860 if ((pTPC >= 0.3 && (nSigmaPr > 10 && nSigmaEl > 10)) ||
2861 (pTPC < 0.3 && (nSigmaPr > 15 && nSigmaEl > 15))) {
2863 Printf(
"Skipping track which seems to be a light nucleus: dEdx %f, pTPC %f, pT %f, eta %f, ncl %d, nSigmaPr %f, nSigmaEl %f\n",
2864 track->GetTPCsignal(), pTPC, pT, track->Eta(), track->GetTPCsignalN(), nSigmaPr, nSigmaEl);
2869 Double_t dEdxEl, dEdxKa, dEdxPi, dEdxMu, dEdxPr;
2870 Double_t sigmaEl, sigmaKa, sigmaPi, sigmaMu, sigmaPr;
2877 dEdxEl =
fPIDResponse->GetTPCResponse().GetExpectedSignal(track, AliPID::kElectron, AliTPCPIDResponse::kdEdxDefault, kFALSE, kFALSE);
2878 dEdxKa =
fPIDResponse->GetTPCResponse().GetExpectedSignal(track, AliPID::kKaon, AliTPCPIDResponse::kdEdxDefault, kFALSE, kFALSE);
2879 dEdxPi =
fPIDResponse->GetTPCResponse().GetExpectedSignal(track, AliPID::kPion, AliTPCPIDResponse::kdEdxDefault, kFALSE, kFALSE);
2881 fPIDResponse->GetTPCResponse().GetExpectedSignal(track, AliPID::kMuon, AliTPCPIDResponse::kdEdxDefault, kFALSE, kFALSE);
2882 dEdxPr =
fPIDResponse->GetTPCResponse().GetExpectedSignal(track,
AliPID::kProton, AliTPCPIDResponse::kdEdxDefault, kFALSE, kFALSE);
2891 Double_t usedSystematicScalingSplines = 1.;
2893 bg = pTPC / AliPID::ParticleMass(AliPID::kElectron);
2897 dEdxEl *= usedSystematicScalingSplines;
2899 bg = pTPC / AliPID::ParticleMass(AliPID::kKaon);
2903 dEdxKa *= usedSystematicScalingSplines;
2905 bg = pTPC / AliPID::ParticleMass(AliPID::kPion);
2909 dEdxPi *= usedSystematicScalingSplines;
2912 bg = pTPC / AliPID::ParticleMass(AliPID::kMuon);
2916 dEdxMu *= usedSystematicScalingSplines;
2924 dEdxPr *= usedSystematicScalingSplines;
2932 fPIDResponse->GetTPCResponse().GetEtaCorrectionFast(track, dEdxMu) : 1.;
2955 etaCorrEl = etaCorrEl * (1.0 + (usedSystematicScalingEtaCorrection - 1.) * (etaCorrEl - 1.0) / maxEtaVariationEl);
2958 etaCorrKa = etaCorrKa * (1.0 + (usedSystematicScalingEtaCorrection - 1.) * (etaCorrKa - 1.0) / maxEtaVariationKa);
2961 etaCorrPi = etaCorrPi * (1.0 + (usedSystematicScalingEtaCorrection - 1.) * (etaCorrPi - 1.0) / maxEtaVariationPi);
2965 etaCorrMu = etaCorrMu * (1.0 + (usedSystematicScalingEtaCorrection - 1.) * (etaCorrMu - 1.0) / maxEtaVariationMu);
2971 etaCorrPr = etaCorrPr * (1.0 + (usedSystematicScalingEtaCorrection - 1.) * (etaCorrPr - 1.0) / maxEtaVariationPr);
2984 const Int_t currEvtMultiplicity =
fPIDResponse->GetTPCResponse().GetCurrentEventMultiplicity();
2987 dEdxEl * etaCorrEl, currEvtMultiplicity) : 1.;
2989 dEdxKa * etaCorrKa, currEvtMultiplicity) : 1.;
2991 dEdxPi * etaCorrPi, currEvtMultiplicity) : 1.;
2993 fPIDResponse->GetTPCResponse().GetMultiplicityCorrectionFast(track, dEdxMu * etaCorrMu, currEvtMultiplicity) : 1.;
2995 dEdxPr * etaCorrPr, currEvtMultiplicity) : 1.;
2998 fPIDResponse->GetTPCResponse().GetMultiplicitySigmaCorrectionFast(dEdxEl * etaCorrEl, currEvtMultiplicity) : 1.;
3000 fPIDResponse->GetTPCResponse().GetMultiplicitySigmaCorrectionFast(dEdxKa * etaCorrKa, currEvtMultiplicity) : 1.;
3002 fPIDResponse->GetTPCResponse().GetMultiplicitySigmaCorrectionFast(dEdxPi * etaCorrPi, currEvtMultiplicity) : 1.;
3004 fPIDResponse->GetTPCResponse().GetMultiplicitySigmaCorrectionFast(dEdxMu * etaCorrMu, currEvtMultiplicity) : 1.;
3006 fPIDResponse->GetTPCResponse().GetMultiplicitySigmaCorrectionFast(dEdxPr * etaCorrPr, currEvtMultiplicity) : 1.;
3032 Double_t dEdxElExpected =
fPIDResponse->GetTPCResponse().GetExpectedSignal(track, AliPID::kElectron, AliTPCPIDResponse::kdEdxDefault,
3034 Double_t systematicScalingEtaSigmaParaEl = 1.;
3035 if (doSigmaSystematics) {
3040 Double_t sigmaRelEl =
fPIDResponse->GetTPCResponse().GetExpectedSigma(track, AliPID::kElectron, AliTPCPIDResponse::kdEdxDefault,
3042 / dEdxElExpected * systematicScalingEtaSigmaParaEl * multiplicityCorrSigmaEl;
3045 Double_t dEdxKaExpected =
fPIDResponse->GetTPCResponse().GetExpectedSignal(track, AliPID::kKaon, AliTPCPIDResponse::kdEdxDefault,
3047 Double_t systematicScalingEtaSigmaParaKa = 1.;
3048 if (doSigmaSystematics) {
3053 Double_t sigmaRelKa =
fPIDResponse->GetTPCResponse().GetExpectedSigma(track, AliPID::kKaon, AliTPCPIDResponse::kdEdxDefault,
3055 / dEdxKaExpected * systematicScalingEtaSigmaParaKa * multiplicityCorrSigmaKa;
3058 Double_t dEdxPiExpected =
fPIDResponse->GetTPCResponse().GetExpectedSignal(track, AliPID::kPion, AliTPCPIDResponse::kdEdxDefault,
3060 Double_t systematicScalingEtaSigmaParaPi = 1.;
3061 if (doSigmaSystematics) {
3066 Double_t sigmaRelPi =
fPIDResponse->GetTPCResponse().GetExpectedSigma(track, AliPID::kPion, AliTPCPIDResponse::kdEdxDefault,
3068 / dEdxPiExpected * systematicScalingEtaSigmaParaPi * multiplicityCorrSigmaPi;
3073 Double_t dEdxMuExpected =
fPIDResponse->GetTPCResponse().GetExpectedSignal(track, AliPID::kMuon, AliTPCPIDResponse::kdEdxDefault,
3075 Double_t systematicScalingEtaSigmaParaMu = 1.;
3076 if (doSigmaSystematics) {
3081 sigmaRelMu =
fPIDResponse->GetTPCResponse().GetExpectedSigma(track, AliPID::kMuon, AliTPCPIDResponse::kdEdxDefault, kTRUE, kFALSE)
3082 / dEdxMuExpected * systematicScalingEtaSigmaParaMu * multiplicityCorrSigmaMu;
3088 Double_t systematicScalingEtaSigmaParaPr = 1.;
3089 if (doSigmaSystematics) {
3096 / dEdxPrExpected * systematicScalingEtaSigmaParaPr * multiplicityCorrSigmaPr;
3099 dEdxEl *= etaCorrEl * multiplicityCorrEl;
3100 dEdxKa *= etaCorrKa * multiplicityCorrKa;
3101 dEdxPi *= etaCorrPi * multiplicityCorrPi;
3102 dEdxMu *= etaCorrMu * multiplicityCorrMu;
3103 dEdxPr *= etaCorrPr * multiplicityCorrPr;
3106 sigmaEl = sigmaRelEl * dEdxEl;
3107 sigmaKa = sigmaRelKa * dEdxKa;
3108 sigmaPi = sigmaRelPi * dEdxPi;
3109 sigmaMu = sigmaRelMu * dEdxMu;
3110 sigmaPr = sigmaRelPr * dEdxPr;
3115 dEdxEl =
fPIDResponse->GetTPCResponse().GetExpectedSignal(track, AliPID::kElectron, AliTPCPIDResponse::kdEdxDefault,
3118 dEdxKa =
fPIDResponse->GetTPCResponse().GetExpectedSignal(track, AliPID::kKaon, AliTPCPIDResponse::kdEdxDefault,
3121 dEdxPi =
fPIDResponse->GetTPCResponse().GetExpectedSignal(track, AliPID::kPion, AliTPCPIDResponse::kdEdxDefault,
3125 fPIDResponse->GetTPCResponse().GetExpectedSignal(track, AliPID::kMuon, AliTPCPIDResponse::kdEdxDefault,
3132 sigmaEl =
fPIDResponse->GetTPCResponse().GetExpectedSigma(track, AliPID::kElectron, AliTPCPIDResponse::kdEdxDefault,
3135 sigmaKa =
fPIDResponse->GetTPCResponse().GetExpectedSigma(track, AliPID::kKaon, AliTPCPIDResponse::kdEdxDefault,
3138 sigmaPi =
fPIDResponse->GetTPCResponse().GetExpectedSigma(track, AliPID::kPion, AliTPCPIDResponse::kdEdxDefault,
3141 sigmaMu =
fPIDResponse->GetTPCResponse().GetExpectedSigma(track, AliPID::kMuon, AliTPCPIDResponse::kdEdxDefault,
3149 Double_t deltaPrimeElectron = (dEdxEl > 0) ? dEdxTPC / dEdxEl : -1;
3151 Printf(
"Error: Expected TPC signal <= 0 for electron hypothesis");
3155 Double_t deltaPrimeKaon = (dEdxKa > 0) ? dEdxTPC / dEdxKa : -1;
3157 Printf(
"Error: Expected TPC signal <= 0 for kaon hypothesis");
3161 Double_t deltaPrimePion = (dEdxPi > 0) ? dEdxTPC / dEdxPi : -1;
3163 Printf(
"Error: Expected TPC signal <= 0 for pion hypothesis");
3167 Double_t deltaPrimeProton = (dEdxPr > 0) ? dEdxTPC / dEdxPr : -1;
3169 Printf(
"Error: Expected TPC signal <= 0 for proton hypothesis");
3174 printf(
"File: %s, Line: %d: ProcessTrack -> Compute probabilities\n", (
char*)__FILE__, __LINE__);
3180 for (
Int_t i = 0; i < AliPID::kSPECIESC; i++)
3210 prob[AliPID::kMuon] = 0;
3215 if (pTPC < 1. && dEdxTPC > dEdxEl && dEdxTPC > dEdxKa) {
3216 prob[AliPID::kMuon] = 0;
3217 prob[AliPID::kPion] = 0;
3236 Int_t maxIndex = TMath::LocMax(AliPID::kSPECIESC, prob);
3238 if ((prob[maxIndex] > 0 && maxIndex >= AliPID::kSPECIES && dEdxTPC > dEdxEl + 5. * sigmaEl) ||
3239 (dEdxTPC > dEdxEl + 5. * sigmaEl && dEdxTPC > dEdxPr + 5. * sigmaPr)) {
3240 for (
Int_t i = 0; i < AliPID::kSPECIESC; i++)
3243 if (dEdxEl > dEdxPr) {
3244 prob[AliPID::kElectron] = 1.;
3245 maxIndex = AliPID::kElectron;
3253 for (
Int_t i = AliPID::kSPECIES; i < AliPID::kSPECIESC; i++)
3257 for (
Int_t i = 0; i < AliPID::kSPECIES; i++)
3261 for (
Int_t i = 0; i < AliPID::kSPECIES; i++)
3267 if (TMath::Abs(prob[maxIndex] - 1. / AliPID::kSPECIES) < 1e-5)
3268 maxIndex = AliPID::kPion;
3282 printf(
"File: %s, Line: %d: ProcessTrack -> Generate Responses for dEdx check\n", (
char*)__FILE__, __LINE__);
3303 for (
Int_t n = 0; n < numGenEntries; n++) {
3308 if (rnd <= prob[AliPID::kElectron]) {
3312 else if (rnd <= prob[AliPID::kElectron] + prob[AliPID::kKaon]) {
3316 else if (rnd <= prob[AliPID::kElectron] + prob[AliPID::kKaon] + prob[AliPID::kMuon] + prob[AliPID::kPion]) {
3330 printf(
"File: %s, Line: %d: ProcessTrack -> Generate Responses for dEdx check done\n", (
char*)__FILE__, __LINE__);
3347 for (iRowInd = 0; iRowInd < 159; iRowInd++) {
3348 if (track->GetTPCSharedMapPtr()->TestBitNumber(iRowInd)) {
3366 Bool_t maxIndexSetManually = kFALSE;
3369 Double_t probManualTPC[AliPID::kSPECIES];
3370 for (
Int_t i = 0; i < AliPID::kSPECIES; i++)
3371 probManualTPC[i] = 0;
3373 probManualTPC[AliPID::kElectron] = TMath::Exp(-0.5*(dEdxTPC-dEdxEl)*(dEdxTPC-dEdxEl)/(sigmaEl*sigmaEl))/sigmaEl;
3375 probManualTPC[AliPID::kMuon] = 0.;
3376 probManualTPC[AliPID::kPion] = TMath::Exp(-0.5*(dEdxTPC-dEdxPi)*(dEdxTPC-dEdxPi)/(sigmaPi*sigmaPi))/sigmaPi;
3377 probManualTPC[AliPID::kKaon] = TMath::Exp(-0.5*(dEdxTPC-dEdxKa)*(dEdxTPC-dEdxKa)/(sigmaKa*sigmaKa))/sigmaKa;
3378 probManualTPC[
AliPID::kProton] = TMath::Exp(-0.5*(dEdxTPC-dEdxPr)*(dEdxTPC-dEdxPr)/(sigmaPr*sigmaPr))/sigmaPr;
3380 const Int_t maxIndexManualTPC = TMath::LocMax(AliPID::kSPECIES, probManualTPC);
3383 if (probManualTPC[maxIndexManualTPC] > 0.)
3384 maxIndex = maxIndexManualTPC;
3386 maxIndexSetManually = kTRUE;
3391 if (prob[maxIndex] > 0 || maxIndexSetManually) {
3392 if (maxIndex == AliPID::kElectron)
3394 else if (maxIndex == AliPID::kKaon)
3396 else if (maxIndex == AliPID::kMuon)
3398 else if (maxIndex == AliPID::kPion)
3436 for (
Int_t k = 0; k < 2; k++) {
3438 if (!isMultSelected)
3479 genEntry[
kGenZ] = z;
3518 printf(
"File: %s, Line: %d: ProcessTrack -> Generate Responses\n", (
char*)__FILE__, __LINE__);
3553 if (errCode ==
kWarning && fDebug > 1) {
3554 Printf(
"Warning: Questionable detector response for track, most likely due to very low number of PID clusters! Debug output (dEdx_expected, sigma_expected):");
3557 Printf(
"Error: Failed to generate detector response for track - skipped! Debug output (dEdx_expected, sigma_expected):");
3560 Printf(
"Pr: %e, %e", dEdxPr, sigmaPr);
3561 Printf(
"Pi: %e, %e", dEdxPi, sigmaPi);
3562 Printf(
"El: %e, %e", dEdxEl, sigmaEl);
3563 Printf(
"Mu: %e, %e", dEdxMu, sigmaMu);
3564 Printf(
"Ka: %e, %e", dEdxKa, sigmaKa);
3565 Printf(
"track: dEdx %f, pTPC %f, eta %f, ncl %d\n", track->GetTPCsignal(), track->GetTPCmomentum(), track->Eta(),
3566 track->GetTPCsignalN());
3574 for (
Int_t n = 0; n < numGenEntries; n++) {
3580 if (rnd <= prob[AliPID::kElectron])
3582 else if (rnd <= prob[AliPID::kElectron] + prob[AliPID::kKaon])
3584 else if (rnd <= prob[AliPID::kElectron] + prob[AliPID::kKaon] + prob[AliPID::kMuon])
3586 else if (rnd <= prob[AliPID::kElectron] + prob[AliPID::kKaon] + prob[AliPID::kMuon] + prob[AliPID::kPion])
3593 for (
Int_t k = 0; k < 2; k++) {
3595 if (!isMultSelected)
3698 printf(
"File: %s, Line: %d: ProcessTrack -> Done\n", (
char*)__FILE__, __LINE__);
3716 Double_t oldFuncRangeLow = 0, oldFuncRangeUp = 100;
3731 const Int_t nPar = 3;
3732 Double_t inputPar[nPar] = { muInput, sigmaInput, lambda };
3734 TH1D* hInput =
new TH1D(
"hInput",
"Input distribution", 2000, rangeStart, rangeEnd);
3761 for (
Int_t i = 0; i < 50000000; i++)
3762 hInput->Fill(hProbDensity->GetRandom());
3765 Int_t maxBin = hInput->GetMaximumBin();
3766 Double_t max = hInput->GetBinContent(maxBin);
3768 UChar_t usedBins = 1;
3770 max += hInput->GetBinContent(maxBin - 1);
3773 if (maxBin < hInput->GetNbinsX()) {
3774 max += hInput->GetBinContent(maxBin + 1);
3781 const Double_t lowThreshold = hInput->GetXaxis()->GetBinLowEdge(hInput->FindFirstBinAbove(0.1 * max));
3782 const Double_t highThreshold = hInput->GetXaxis()->GetBinUpEdge(hInput->FindLastBinAbove(0.1 * max));
3784 TFitResultPtr fitResGaussFirstStep = hInput->Fit(
"gaus",
"QNRS",
"", lowThreshold, highThreshold);
3786 TFitResultPtr fitResGauss;
3788 if ((
Int_t)fitResGaussFirstStep == 0) {
3789 TF1 fGauss(
"fGauss",
"[0]*TMath::Gaus(x, [1], [2], 1)", rangeStart, rangeEnd);
3790 fGauss.SetParameter(0, fitResGaussFirstStep->GetParams()[0]);
3791 fGauss.SetParError(0, fitResGaussFirstStep->GetErrors()[0]);
3792 fGauss.SetParameter(2, fitResGaussFirstStep->GetParams()[2]);
3793 fGauss.SetParError(2, fitResGaussFirstStep->GetErrors()[2]);
3795 fGauss.FixParameter(1, fitResGaussFirstStep->GetParams()[1]);
3796 fitResGauss = hInput->Fit(&fGauss,
"QNS",
"s", rangeStart, rangeEnd);
3799 fitResGauss = hInput->Fit(
"gaus",
"QNRS",
"same", rangeStart, rangeEnd);
3809 if ((
Int_t)fitResGauss != 0) {
3810 AliError(
"Not able to calculate parameters for the transition \"restricted gauss\" -> \"convoluted gauss\": Gauss Fit failed!\n");
3816 delete [] oldFuncParams;
3821 if (fitResGauss->GetParams()[2] <= 0) {
3822 AliError(
"Not able to calculate parameters for the transition \"restricted gauss\" -> \"convoluted gauss\": Sigma of gauss fit <= 0!\n");
3828 delete [] oldFuncParams;
3895 delete [] oldFuncParams;
3909 printf(
"File: %s, Line: %d: SetParamsForConvolutedGaus: mean %e, sigma %e\n", (
char*)__FILE__, __LINE__, gausMean, gausSigma);
3912 AliError(
"Transition parameters not initialised! Default parameters will be used. Please call SetConvolutedGaussLambdaParameter(...) before any calculations!");
3928 printf(
"File: %s, Line: %d: SetParamsForConvolutedGaus -> Parameters set to: %e, %e, %e (transition pars: %e, %e, %e, %e)\n",
3937 gausMean + 6. * gausSigma, 1.0E-5);
3943 Double_t lowBoundSearchBoundLow = TMath::Max(1e-4, maxX - 5. * gausSigma);
3944 Double_t lowBoundSearchBoundUp = maxX;
3946 Bool_t lowerBoundaryFixedAtZero = kFALSE;
3949 if (lowBoundSearchBoundLow <= 0) {
3952 printf(
"Error generating signal: maximum is <= 0!\n");
3957 if (valueAtZero / maximum > 0.05) {
3959 printf(
"Error generating signal: Too large fraction below zero deltaPrime: convGauss(0) / convGauss(max) = %e / %e = %e!\n",
3960 valueAtZero, maximum, valueAtZero / maximum);
3970 lowerBoundaryFixedAtZero = kTRUE;
3978 lowBoundSearchBoundUp -= gausSigma;
3979 lowBoundSearchBoundLow -= gausSigma;
3981 if (lowBoundSearchBoundLow < 0) {
3982 lowBoundSearchBoundLow = 0;
3983 lowBoundSearchBoundUp += gausSigma;
3988 Double_t rangeStart = lowerBoundaryFixedAtZero ? 0 :
3989 fConvolutedGausDeltaPrime->GetX(maximumFraction, lowBoundSearchBoundLow, lowBoundSearchBoundUp, (maxX < 0.4) ? 1e-5 : 0.001);
3995 rangeEnd = rangeStart + 0.00001;
4001 Double_t upBoundSearchBoundUp = maxX + 5 * gausSigma;
4002 Double_t upBoundSearchBoundLow = maxX;
4004 upBoundSearchBoundUp += gausSigma;
4005 upBoundSearchBoundLow += gausSigma;
4009 rangeEnd =
fConvolutedGausDeltaPrime->GetX(maximumFraction, upBoundSearchBoundLow, upBoundSearchBoundUp, (maxX < 0.4) ? 1e-5 : 0.001);
4021 printf(
"File: %s, Line: %d: SetParamsForConvolutedGaus -> range %f - %f, error code %d\n", (
char*)__FILE__, __LINE__,
4022 rangeStart, rangeEnd, errCode);
4034 hist->SetBinEdges(
kGenPt, binsPt);
4039 hist->SetBinEdges(
kGenJetPt, binsJetPt);
4040 hist->SetBinEdges(
kGenJt, binsJt);
4044 hist->GetAxis(
kGenMCID)->SetTitle(
"MC PID");
4045 hist->GetAxis(
kGenMCID)->SetBinLabel(1,
"e");
4046 hist->GetAxis(
kGenMCID)->SetBinLabel(2,
"K");
4047 hist->GetAxis(
kGenMCID)->SetBinLabel(3,
"#mu");
4048 hist->GetAxis(
kGenMCID)->SetBinLabel(4,
"#pi");
4049 hist->GetAxis(
kGenMCID)->SetBinLabel(5,
"p");
4057 hist->GetAxis(
kGenPt)->SetTitle(
"p_{T} (GeV/c)");
4064 hist->GetAxis(
kGenJetPt)->SetTitle(
"p_{T}^{jet} (GeV/c)");
4066 hist->GetAxis(
kGenZ)->SetTitle(
"z = p_{T}^{track} / p_{T}^{jet}");
4068 hist->GetAxis(
kGenXi)->SetTitle(
"#xi = ln(p_{T}^{jet} / p_{T}^{track})");
4072 hist->GetAxis(
kGenJt)->SetTitle(
"j_{T} (GeV/c)");
4100 for (
Int_t i = 0; i < 5; i++)
4101 hist->GetAxis(
kGenYieldMCID)->SetBinLabel(i + 1, AliPID::ParticleLatexName(i));
4105 hist->GetAxis(
kGenYieldPt)->SetTitle(
"p_{T}^{gen} (GeV/c)");
4109 hist->GetAxis(
kGenYieldJetPt)->SetTitle(
"p_{T}^{jet, gen} (GeV/c)");
4111 hist->GetAxis(
kGenYieldZ)->SetTitle(
"z = p_{T}^{track} / p_{T}^{jet}");
4113 hist->GetAxis(
kGenYieldXi)->SetTitle(
"#xi = ln(p_{T}^{jet} / p_{T}^{track})");
4117 hist->GetAxis(
kGenYieldJt)->SetTitle(
"j_{T} (GeV/c)");
4130 hist->SetBinEdges(
kDataPt, binsPt);
4136 hist->SetBinEdges(
kDataJt, binsJt);
4140 hist->GetAxis(
kDataMCID)->SetTitle(
"MC PID");
4141 hist->GetAxis(
kDataMCID)->SetBinLabel(1,
"e");
4142 hist->GetAxis(
kDataMCID)->SetBinLabel(2,
"K");
4143 hist->GetAxis(
kDataMCID)->SetBinLabel(3,
"#mu");
4144 hist->GetAxis(
kDataMCID)->SetBinLabel(4,
"#pi");
4145 hist->GetAxis(
kDataMCID)->SetBinLabel(5,
"p");
4153 hist->GetAxis(
kDataPt)->SetTitle(
"p_{T} (GeV/c)");
4160 hist->GetAxis(
kDataJetPt)->SetTitle(
"p_{T}^{jet} (GeV/c)");
4162 hist->GetAxis(
kDataZ)->SetTitle(
"z = p_{T}^{track} / p_{T}^{jet}");
4164 hist->GetAxis(
kDataXi)->SetTitle(
"#xi = ln(p_{T}^{jet} / p_{T}^{track})");
4168 hist->GetAxis(
kDataJt)->SetTitle(
"j_{T} (GeV/c)");
4194 hist->GetAxis(
kPtResJetPt)->SetTitle(
"p_{T}^{jet, rec} (GeV/c)");
4195 hist->GetAxis(
kPtResGenPt)->SetTitle(
"p_{T}^{gen} (GeV/c)");
4196 hist->GetAxis(
kPtResRecPt)->SetTitle(
"p_{T}^{rec} (GeV/c)");
4198 hist->GetAxis(
kPtResCharge)->SetTitle(
"Charge (e_{0})");
4213 hist->GetAxis(
kQASharedClsPt)->SetTitle(
"#it{p}_{T} (GeV/#it{c})");
4238 hist->GetAxis(
kDeDxCheckP)->SetTitle(
"p_{TPC} (GeV/c)");
4239 hist->GetAxis(
kDeDxCheckDeDx)->SetTitle(
"TPC dE/dx (arb. unit)");
4275 std::cout <<
"Cannot normalize Jet Area" << std::endl;
virtual Bool_t GetIsPbpOrpPb() const
Double_t FastNormalisedGaus(Double_t x, Double_t mean, Double_t sigma) const
void PrintSettings(Bool_t printSystematicsSettings=kFALSE) const
Double_t * fGenRespMuDeltaPrimePi
Generated responses for a single track.
TH2D * fh2FFJetPtGen
Number of reconstructed jets vs. jetPt and centrality.
Double_t * fGenRespMuDeltaPrimePr
Generated responses for a single track.
Double_t * fGenRespPrDeltaPrimePr
Generated responses for a single track.
void CheckDoAnyStematicStudiesOnTheExpectedSignal()
void NormalizeJetArea(Double_t jetParameter)
Bool_t GetUseTPCDefaultPriors() const
Bool_t GetUseMCidForGeneration() const
Int_t FindFirstBinAboveIn3dSubset(const TH3 *hist, Double_t threshold, Int_t yValue, Int_t zValue) const
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...
AliAnalysisFilter * fTrackFilter
Can be used to statistically determine the shape in the pt bins e.g.
Bool_t SetConvolutedGaussLambdaParameter(Double_t lambda)
PileUpRejectionType GetPileUpRejectionType() const
Bool_t fStoreCentralityPercentile
Bool_t GetUsePriors() const
Bool_t fTakeIntoAccountMuons
Double_t * fGenRespKaDeltaPrimePr
Generated responses for a single track.
TH1D * fhEventsTriggerSelVtxCut
Histo holding the number of events passing trigger selection.
THnSparseD * fhGenMu
Generated response for pi.
static Bool_t TPCCutMIGeo(const AliVTrack *track, const AliVEvent *evt, TTreeStream *streamer=0x0)
Double_t * fGenRespElDeltaPrimeEl
Generated response for pr.
TH1D * fh1Trials
pythia cross section and trials
Double_t * fGenRespPrDeltaPrimeEl
Generated responses for a single track.
Double_t fAccuracyNonGaussianTail
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
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
static Double_t GetMCStrangenessFactorCMS(Int_t motherPDG, Double_t motherGenPt)
virtual Bool_t GetUseTPCCutMIGeo() const
THnSparseD * fhGenPi
Generated response for ka.
static Double_t GetCutNcr()
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) ...
virtual Bool_t GetUseTPCnclCut() const
Bool_t IsInAcceptedEtaRange(Double_t etaAbs) const
Bool_t CalculateMaxEtaVariationMapFromPIDResponse()
virtual Bool_t GetUsePhiCut() const
virtual Bool_t GetIsPileUp(AliVEvent *event, PileUpRejectionType pileUpRejection=kPileUpRejectionClass) const
Double_t fSystematicScalingEtaSigmaParaThreshold
Double_t fSystematicScalingMultCorrection
virtual void UserExec(Option_t *option)
Bool_t GetStoreCentralityPercentile() const
Double_t * fGenRespElDeltaPrimePr
Generated responses for a single track.
Double_t GetSystematicScalingEtaSigmaParaThreshold() const
static const Double_t fgkSigmaReferenceForTransitionPars
virtual Bool_t PhiPrimeCut(const AliVTrack *track, Double_t magField) const
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
AliPIDResponse * fPIDResponse
MC object.
Double_t * fGenRespPrDeltaPrimeKa
Generated responses for a single track.
THnSparseD * fPtResolution[AliPID::kSPECIES]
Container for efficiency determination.
AliPPVsMultUtils * fPPVsMultUtils
PID combined object.
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.
Double_t * fGenRespMuDeltaPrimeEl
Generated responses for a single track.
const TString GetPPCentralityEstimator() const
Double_t GetSystematicScalingSplinesThreshold() const
static AliAnalysisTaskPID::EventGenerator GetEventGenerator()
Int_t GetIndexOfChargeAxisData() const
THnSparseD * fhGenPr
Generated response for mu.
Bool_t GetStoreCharge() const
static UShort_t GetCutPureNcl()
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)
AliAnalysisUtils * fAnaUtils
ESD V0 kine cuts.
void FillUEDensity(Double_t cent, Double_t UEpt)
Double_t fSystematicScalingSplinesAboveThreshold
Double_t fSystematicScalingEtaSigmaParaAboveThreshold
Int_t GetIndexOfChargeAxisGenYield() const
Bool_t fUseConvolutedGaus
Int_t FindBinWithinRange(TAxis *axis, Double_t value) const
Double_t GetSystematicScalingEtaSigmaParaAboveThreshold() const
Bool_t GetStoreTOFInfo() const
Double_t GetEtaAbsCutLow() const
virtual void ConfigureTaskForCurrentEvent(AliVEvent *event)
THnSparseD * fhGenKa
Generated response for el.
virtual void SetUpHist(THnSparse *hist, Double_t *binsPt, Double_t *binsDeltaPrime, Double_t *binsCent, Double_t *binsJetPt, Double_t *binsJt) 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)
static Bool_t TPCnclCut(const AliVTrack *track)
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
Bool_t SetParticleFractionHisto(const TH3D *hist, Int_t species, Bool_t sysError=kFALSE)
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
Double_t GetMaxEtaVariation(Double_t dEdxSplines)
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
virtual void UserCreateOutputObjects()
TF1 * fConvolutedGausDeltaPrime
static Bool_t IsSecondaryWithStrangeMotherMC(AliMCEvent *mcEvent, Int_t partLabel)
Double_t * fGenRespPiDeltaPrimeEl
Generated responses for a single track.
Bool_t fStoreAdditionalJetInformation
virtual void UserCreateOutputObjects()
Double_t GetConvolutedGaussTransitionPar(Int_t index) const
Bool_t fUseMCidForGeneration
static Double_t GetCutNcl()
AliMCEvent * fMC
ESDEvent object, if ESD.
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
TProfile * fh1Xsec
Number of generated jets vs. jetPt and centrality.
TH1D * fhMaxEtaVariation
Axis holding the deltaPrime binning.
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
Double_t ConvolutedGaus(const Double_t *xx, const Double_t *par) const
Bool_t fDoAnySystematicStudiesOnTheExpectedSignal
virtual Bool_t GetVertexIsOk(AliVEvent *event, Bool_t doVtxZcut=kTRUE) const
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
Double_t GetAccuracyNonGaussianTail() const
Double_t * fGenRespElDeltaPrimeKa
Generated responses for a single track.
virtual ~AliAnalysisTaskPID()
Double_t fConvolutedGaussTransitionPars[3]
Double_t * fGenRespPiDeltaPrimeKa
Generated responses for a single track.
TString fCentralityEstimator
THnSparseD * fDeDxCheck
QA for shared clusters.
void CleanupParticleFractionHistos()
Double_t * fGenRespElDeltaPrimePi
Generated responses for a single track.
virtual void Terminate(const Option_t *)
TAxis * fDeltaPrimeAxis
Generated responses for a single track.
TOFpidInfo GetTOFType(const AliVTrack *track, Int_t tofMode) const
THnSparseD * fhPIDdataAll
Double_t GetSystematicScalingEtaCorrectionLowMomenta() const
Double_t fSystematicScalingSplinesBelowThreshold
RunMode GetRunMode() const
Double_t GetSystematicScalingEtaCorrectionMomentumThr() const
Double_t fSystematicScalingEtaCorrectionHighMomenta
Double_t * fGenRespKaDeltaPrimeEl
Generated responses for a single track.
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)
Bool_t IncrementEventCounter(Double_t centralityPercentile, EventCounterType type)
static Double_t GetCutGeo()
AliCFContainer * fContainerEff
Number events before and after the cut on MC pT hard.
TList * OpenFile(const char *fname)
Double_t GetSystematicScalingMultCorrection() const
Bool_t GetTakeIntoAccountMuons() const
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