1 #ifndef ALI_ANALYSIS_TASK_PID_H 2 #define ALI_ANALYSIS_TASK_PID_H 16 class AliAnalysisFilter;
24 class AliPPVsMultUtils;
25 class AliTOFPIDResponse;
33 #include "THnSparse.h" 37 #include "AliCentrality.h" 38 #include "AliCFContainer.h" 120 {
if (!
fh1Xsec)
return kFALSE;
fh1Xsec->Fill(
"<#sigma>", xsection);
return kTRUE; };
122 {
if (!
fh1Trials)
return kFALSE;
fh1Trials->Fill(
"#sum{ntrials}", avgTrials);
return kTRUE; };
146 Bool_t usePureGaus = kFALSE);
151 TString ppCentEstimator =
fCentralityEstimator; ppCentEstimator = ppCentEstimator.ReplaceAll(
"ppMult",
"");
return ppCentEstimator; }
265 AliPID::EParticleType species,
Double_t& fraction,
Double_t& fractionErrorStat,
269 Bool_t uniformSystematicError = kFALSE)
const;
279 Bool_t takeIntoAccountSysError = kFALSE)
const;
487 AliError(
"Efficiency container not initialised -> cannot be filled!");
506 AliError(
"Histo for generated primary yield not initialised -> cannot be filled!");
561 AliError(Form(
"Histo for pT resolution (species: %s) not initialised -> cannot be filled!", AliPID::ParticleName(mcID)));
578 AliError(
"Histogram for number of events (kTriggerSel) not initialised -> cannot be incremented!");
586 AliError(
"Histogram for number of events (kTriggerSelAndVtxCut) not initialised -> cannot be incremented!");
594 AliError(
"Histogram for number of events (kTriggerSelAndVtxCutAndZvtxCut) not initialised -> cannot be incremented!");
602 AliError(
"Histogram for number of events (kTriggerSelAndVtxCutAndZvtxCutNoPileUpRejection) not initialised -> cannot be incremented!");
620 AliError(
"Histogram \"fh1EvtsPtHardCut\" not initialised -> cannot be filled!");
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).",
650 if (index < 0 || index >= 3) {
651 printf(
"Invalid index %d!\n", index);
696 Double_t centralityPercentile = -1.;
698 centralityPercentile = evt->GetCentrality()->GetCentralityPercentile(
fCentralityEstimator.Data());
700 return centralityPercentile;
void SetDoPID(Bool_t flag)
Double_t FastNormalisedGaus(Double_t x, Double_t mean, Double_t sigma) const
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()
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 fStoreCentralityPercentile
Bool_t GetUsePriors() const
Bool_t fTakeIntoAccountMuons
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
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
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)
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)
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.
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)
Bool_t GetDoPtResolution() const
AliAnalysisTaskPID & operator=(const AliAnalysisTaskPID &)
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
Double_t GetEtaAbsCutLow() const
Bool_t GetStoreTOFInfo() const
virtual void ConfigureTaskForCurrentEvent(AliVEvent *event)
THnSparseD * fhGenKa
Generated response for el.
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)
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 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)
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
Double_t GetAccuracyNonGaussianTail() const
void SetUseITS(Bool_t flag)
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
void SetSystematicScalingEtaCorrectionLowMomenta(Double_t scaleFactor)
THnSparseD * fDeDxCheck
QA for shared clusters.
void CleanupParticleFractionHistos()
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
THnSparseD * fhPIDdataAll
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