From 48120c27e209c5358e241d6db25d2a31dcadd5af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Thu, 22 Oct 2026 19:03:18 +0200 Subject: [PATCH] Fix casts Fixes C-style, redundant, wrong, and dangerous casts (found by Clang-Tidy and cpplint). - Remove redundant casts. (`readability-redundant-casting`) - Remove `const_cast`. (`cppcoreguidelines-pro-type-const-cast`) - Replace C-style casts with `static_cast`. (`google-readability-casting`, cpplint: `readability/casting`) - Replace unsafe C-style casts with `dynamic_cast`. (`cppcoreguidelines-pro-type-cstyle-cast`) - Replace `static_cast` in downcasts with `dynamic_cast`. (`cppcoreguidelines-pro-type-static-cast-downcast`) - Replace `reinterpret_cast` with `static_cast` or `dynamic_cast`. (`cppcoreguidelines-pro-type-reinterpret-cast`) - Replace two-step casting through `void*` with `reinterpret_cast`. (`bugprone-casting-through-void`) --- PWGCF/Core/CorrelationContainer.cxx | 34 +- .../Tasks/NetProtonCumulants.cxx | 2 +- .../Tasks/RobustFluctuationObservables.cxx | 2 +- .../Tasks/antiprotonCumulantsMc.cxx | 6 +- .../EbyEFluctuations/Tasks/eventMeanPtId.cxx | 2 +- .../Tasks/kaonIsospinFluctuations.cxx | 4 +- .../Tasks/netprotcumulants.cxx | 6 +- .../Tasks/netprotonCumulantsMc.cxx | 6 +- .../Tasks/v0ptHadPiKaProt.cxx | 10 +- PWGCF/Femto3D/Core/femto3dPairTask.h | 4 +- PWGCF/Femto3D/Tools/checkPacking.cxx | 6 +- .../femtoDreamProducerReducedTask.cxx | 4 +- .../TableProducer/femtoDreamProducerTask.cxx | 8 +- ...toDreamProducerTaskForSpecificAnalysis.cxx | 48 +-- .../femtoDreamProducerTaskReso.cxx | 8 +- .../Tasks/femtoDreamDebugCascade.cxx | 8 +- .../FemtoDream/Tasks/femtoDreamDebugReso.cxx | 20 +- .../FemtoDream/Tasks/femtoDreamDebugTrack.cxx | 4 +- PWGCF/FemtoDream/Tasks/femtoDreamDebugV0.cxx | 8 +- PWGCF/FemtoDream/Tasks/femtoDreamHashTask.cxx | 4 +- .../Tasks/femtoDreamPairTaskTrackCascade.cxx | 8 +- .../Tasks/femtoDreamPairTaskTrackTrack.cxx | 8 +- .../Tasks/femtoDreamPairTaskTrackV0.cxx | 8 +- .../Tasks/femtoDreamPairTaskV0Reso.cxx | 20 +- .../Tasks/femtoDreamPairTaskV0V0.cxx | 4 +- ...femtoDreamTripletTaskTrackTrackCascade.cxx | 4 +- .../femtoDreamTripletTaskTrackTrackTrack.cxx | 4 +- ...mtoDreamTripletTaskTrackTrackTrackPbPb.cxx | 4 +- .../femtoDreamTripletTaskTrackTrackV0.cxx | 8 +- .../femtoDreamTripletTaskTrackTrackV0PbPb.cxx | 8 +- .../Tasks/femtodreamPairCascadeCascade.cxx | 4 +- .../Core/FemtoUniversePairSHCentMultKt.h | 4 +- .../Core/FemtoUniverseSHContainer.h | 4 +- .../femtoUniverseProducerReducedTask.cxx | 4 +- .../femtoUniverseProducerTask.cxx | 12 +- .../femtoUniverseProducerTaskV0Only.cxx | 8 +- .../Tasks/femtoUniverseDebugTrack.cxx | 4 +- .../Tasks/femtoUniverseDebugV0.cxx | 12 +- .../Tasks/femtoUniverseEfficiencyBase.cxx | 8 +- .../Tasks/femtoUniverseHashTask.cxx | 4 +- ...toUniversePairTaskTrackCascadeExtended.cxx | 22 +- .../Tasks/femtoUniversePairTaskTrackD0.cxx | 36 +- .../femtoUniversePairTaskTrackNucleus.cxx | 20 +- .../Tasks/femtoUniversePairTaskTrackPhi.cxx | 18 +- .../Tasks/femtoUniversePairTaskTrackTrack.cxx | 8 +- ...ersePairTaskTrackTrack3DMultKtExtended.cxx | 24 +- ...emtoUniversePairTaskTrackTrackExtended.cxx | 24 +- .../femtoUniversePairTaskTrackTrackMC.cxx | 24 +- ...femtoUniversePairTaskTrackTrackMcTruth.cxx | 4 +- ...iversePairTaskTrackTrackMultKtExtended.cxx | 54 +-- ...irTaskTrackTrackSpherHarMultKtExtended.cxx | 16 +- ...TrackTrackSpherHarMultKtExtendedItsPid.cxx | 4 +- .../femtoUniversePairTaskTrackV0Extended.cxx | 26 +- .../femtoUniversePairTaskTrackV0Helicity.cxx | 16 +- ...femtoUniversePairTaskV0CascadeExtended.cxx | 8 +- .../femtoWorldProducerReducedTask.cxx | 4 +- .../TableProducer/femtoWorldProducerTask.cxx | 76 ++-- .../Tasks/femtoWorldPairTaskPionPion.cxx | 26 +- .../femtoWorldPairTaskProtonAntiproton.cxx | 26 +- .../Tasks/femtoWorldPairTaskTrackD0.cxx | 18 +- .../Tasks/femtoWorldPairTaskTrackPhi.cxx | 20 +- .../Tasks/femtoWorldPairTaskTrackTrack.cxx | 26 +- .../Tasks/femtoWorldPionAllPairTask.cxx | 6 +- .../femtoWorldPionPairTaskTrackTrack.cxx | 26 +- PWGCF/Flow/TableProducer/zdcQVectors.cxx | 390 +++++++++--------- PWGCF/Flow/Tasks/flowAnalysisGF.cxx | 2 +- PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx | 2 +- PWGCF/Flow/Tasks/flowPbpbPikp.cxx | 2 +- PWGCF/Flow/Tasks/flowPidCme.cxx | 6 +- PWGCF/Flow/Tasks/flowQa.cxx | 2 +- PWGCF/Flow/Tasks/flowRunbyRun.cxx | 4 +- PWGCF/Flow/Tasks/flowSP.cxx | 2 +- PWGCF/Flow/Tasks/flowTask.cxx | 2 +- PWGCF/Flow/Tasks/flowTransmutation.cxx | 2 +- PWGCF/Flow/Tasks/flowZdcTask.cxx | 2 +- PWGCF/Flow/Tasks/pidFlowPtCorr.cxx | 2 +- PWGCF/Flow/Tasks/resonancesGfwFlow.cxx | 2 +- .../Core/BootstrapProfile.cxx | 48 +-- .../GenericFramework/Core/BootstrapProfile.h | 4 +- PWGCF/GenericFramework/Core/FlowContainer.cxx | 2 +- PWGCF/GenericFramework/Core/GFWWeights.cxx | 82 ++-- .../GenericFramework/Core/GFWWeightsList.cxx | 16 +- .../Tasks/flowGenericFramework.cxx | 2 +- .../Tasks/flowGfwLightIons.cxx | 2 +- .../GenericFramework/Tasks/flowGfwNonflow.cxx | 2 +- PWGCF/GenericFramework/Tasks/flowGfwV02.cxx | 2 +- PWGCF/JCorran/Core/JQVectors.h | 2 +- PWGCF/JCorran/TableProducer/JCatalyst.cxx | 4 +- .../Core/MuPa-MemberFunctions.h | 140 +++---- .../Tasks/multiharmonicCorrelations.cxx | 22 +- .../Tasks/multiparticle-correlations-ar.cxx | 2 +- .../Tasks/threeParticleCorrelations.cxx | 28 +- PWGCF/TableProducer/dptDptFilter.cxx | 18 +- PWGCF/TableProducer/dptDptFilter.h | 2 +- PWGCF/TableProducer/filterCorrelations.cxx | 4 +- PWGCF/Tasks/correlations.cxx | 8 +- PWGCF/Tasks/dptDptCorrelations.cxx | 16 +- PWGCF/Tasks/dptDptFilterQa.cxx | 8 +- PWGCF/Tasks/matchRecoGen.cxx | 2 +- .../Core/EventSelectionFilterAndAnalysis.cxx | 8 +- .../Core/EventSelectionFilterAndAnalysis.h | 4 +- .../Core/SelectionFilterAndAnalysis.cxx | 2 +- .../Core/SkimmingConfigurableCuts.cxx | 26 +- .../Core/SkimmingConfigurableCuts.h | 2 +- .../Core/TrackSelectionFilterAndAnalysis.cxx | 24 +- .../Core/TrackSelectionFilterAndAnalysis.h | 4 +- .../TableProducer/longrangeMaker.cxx | 2 +- .../twoParticleCorrelationsFiltering.cxx | 8 +- .../Tasks/cascDiHadronCorr.cxx | 6 +- .../TwoParticleCorrelations/Tasks/corrFit.cxx | 2 +- .../Tasks/corrReso.cxx | 2 +- .../Tasks/diHadronCor.cxx | 4 +- .../Tasks/dptDptEfficiencyAndQc.cxx | 4 +- .../Tasks/dptDptPerRunExtraQc.cxx | 4 +- .../Tasks/etaDihadron.cxx | 4 +- .../Tasks/flowDecorrelation.cxx | 2 +- .../Tasks/hParticleCorrelation.cxx | 2 +- .../Tasks/lambdaR2Correlation.cxx | 12 +- .../Tasks/lambdaSpinPolarization.cxx | 12 +- .../Tasks/longRangeDihadronCor.cxx | 2 +- .../Tasks/nucleibalance.cxx | 4 +- .../Tasks/particleOriginAnalysis.cxx | 2 +- .../Tasks/pidDiHadron.cxx | 2 +- .../Tasks/pidLongRange.cxx | 2 +- .../Tasks/r2p2-4-id.cxx | 2 +- .../Tasks/twoParticleCorrelations.cxx | 8 +- .../Tasks/twoParticleCorrelationsMpi.cxx | 2 +- 127 files changed, 930 insertions(+), 930 deletions(-) diff --git a/PWGCF/Core/CorrelationContainer.cxx b/PWGCF/Core/CorrelationContainer.cxx index 6c4a2e56d0d..2c97bbfb990 100644 --- a/PWGCF/Core/CorrelationContainer.cxx +++ b/PWGCF/Core/CorrelationContainer.cxx @@ -155,7 +155,7 @@ CorrelationContainer::CorrelationContainer(const CorrelationContainer& c) : TNam // CorrelationContainer copy constructor // - ((CorrelationContainer&)c).Copy(*this); + c.Copy(*this); } //____________________________________________________________________ @@ -195,7 +195,7 @@ CorrelationContainer& CorrelationContainer::operator=(const CorrelationContainer // assigment operator if (this != &c) { - ((CorrelationContainer&)c).Copy(*this); + c.Copy(*this); } return *this; @@ -206,7 +206,7 @@ void CorrelationContainer::Copy(TObject& c) const { // copy function - CorrelationContainer& target = (CorrelationContainer&)c; + CorrelationContainer& target = dynamic_cast(c); if (mPairHist) { target.mPairHist = dynamic_cast(mPairHist->Clone()); @@ -423,7 +423,7 @@ void CorrelationContainer::getHistsZVtxMult(CorrelationContainer::CFStep step, F Int_t dimensions[] = {4, 0, 5, 3}; THnBase* tmpTrackHist = sparse->ProjectionND(4, dimensions, "E"); - *eventHist = (TH2*)mTriggerHist->getTHn(step)->Projection(1, 2); // NOTE the syntax is Projection(Y, X) --> produces a histogram where x = axis 2 (vertex) and y = axis 1 (multiplicity) + *eventHist = static_cast(mTriggerHist->getTHn(step)->Projection(1, 2)); // NOTE the syntax is Projection(Y, X) --> produces a histogram where x = axis 2 (vertex) and y = axis 1 (multiplicity) // convert to THn *trackHist = changeToThn(tmpTrackHist); delete tmpTrackHist; @@ -523,7 +523,7 @@ TH2* CorrelationContainer::getSumOfRatios(CorrelationContainer* mixed, Correlati Int_t nCorrelationFunctions = 0; getHistsZVtxMult(step, ptTriggerMin, ptTriggerMax, &trackSameAll, &eventSameAll); - mixed->getHistsZVtxMult((stepForMixed == -1) ? step : (CFStep)stepForMixed, ptTriggerMin, ptTriggerMax, &trackMixedAll, &eventMixedAll); + mixed->getHistsZVtxMult((stepForMixed == -1) ? step : static_cast(stepForMixed), ptTriggerMin, ptTriggerMax, &trackMixedAll, &eventMixedAll); // If we ask for histograms from step8 (TTR cut applied) there is a hole at 0,0; so this cannot be used for the // mixed-event normalization. If step6 is available, the normalization factor is read out from that one. @@ -728,7 +728,7 @@ TH2* CorrelationContainer::getSumOfRatios(CorrelationContainer* mixed, Correlati */ if (!totalTracks) { - totalTracks = (TH2*)tracksSame->Clone("totalTracks"); + totalTracks = dynamic_cast(tracksSame->Clone("totalTracks")); } else { totalTracks->Add(tracksSame); } @@ -766,7 +766,7 @@ TH2* CorrelationContainer::getSumOfRatios(CorrelationContainer* mixed, Correlati } } if (trigger != nullptr) { - *trigger = (Int_t)totalEvents; + *trigger = static_cast(totalEvents); } // normalizate to dphi width @@ -836,7 +836,7 @@ THnBase* CorrelationContainer::getTrackEfficiencyND(EfficiencyStep step1, Effici resetBinLimits(sourceContainer->getTHn(step1)); resetBinLimits(sourceContainer->getTHn(step2)); - THnBase* clone = (THnBase*)measured->Clone(); + THnBase* clone = dynamic_cast(measured->Clone()); clone->Divide(measured, generated, 1, 1, "B"); @@ -936,7 +936,7 @@ TH1* CorrelationContainer::getTrackEfficiency(EfficiencyStep step1, EfficiencySt if (mPtMax > mPtMin) { // TODO this is just checking up to 15 for now - Float_t ptMax = TMath::Min((Float_t)15., mPtMax); + Float_t ptMax = TMath::Min(static_cast(15.), mPtMax); if (axis1 == 1) { binBegin[0] = generated->GetXaxis()->FindBin(mPtMin); binEnd[0] = generated->GetXaxis()->FindBin(ptMax); @@ -1010,7 +1010,7 @@ TH1* CorrelationContainer::getTrackEfficiency(EfficiencyStep step1, EfficiencySt measured = new TH2D(Form("%s_rebinned", tmp->GetName()), tmp->GetTitle(), axis->GetNbins(), axis->GetXbins()->GetArray(), tmp->GetNbinsY(), tmp->GetYaxis()->GetXbins()->GetArray()); for (Int_t x = 1; x <= tmp->GetNbinsX(); x++) { for (Int_t y = 1; y <= tmp->GetNbinsY(); y++) { - ((TH2*)measured)->Fill(tmp->GetXaxis()->GetBinCenter(x), tmp->GetYaxis()->GetBinCenter(y), tmp->GetBinContent(x, y)); + (dynamic_cast(measured))->Fill(tmp->GetXaxis()->GetBinCenter(x), tmp->GetYaxis()->GetBinCenter(y), tmp->GetBinContent(x, y)); measured->SetBinError(x, y, 0); // cannot trust bin error, set to 0 } } @@ -1020,7 +1020,7 @@ TH1* CorrelationContainer::getTrackEfficiency(EfficiencyStep step1, EfficiencySt generated = new TH2D(Form("%s_rebinned", tmp->GetName()), tmp->GetTitle(), axis->GetNbins(), axis->GetXbins()->GetArray(), tmp->GetNbinsY(), tmp->GetYaxis()->GetXbins()->GetArray()); for (Int_t x = 1; x <= tmp->GetNbinsX(); x++) { for (Int_t y = 1; y <= tmp->GetNbinsY(); y++) { - ((TH2*)generated)->Fill(tmp->GetXaxis()->GetBinCenter(x), tmp->GetYaxis()->GetBinCenter(y), tmp->GetBinContent(x, y)); + (dynamic_cast(generated))->Fill(tmp->GetXaxis()->GetBinCenter(x), tmp->GetYaxis()->GetBinCenter(y), tmp->GetBinContent(x, y)); generated->SetBinError(x, y, 0); // cannot trust bin error, set to 0 } } @@ -1170,14 +1170,14 @@ TH1* CorrelationContainer::getBias(EfficiencyStep step1, EfficiencyStep step2, c resetBinLimits(mTriggerHist->getTHn(step2), 3); setBinLimits(tmp->getTHn(step2)); - TH1D* events1 = (TH1D*)mTriggerHist->getTHn(step1)->Projection(0); - TH3D* hist1 = (TH3D*)tmp->getTHn(step1)->Projection(0, tmp->getNVar() - 1, 2); + TH1D* events1 = mTriggerHist->getTHn(step1)->Projection(0); + TH3D* hist1 = tmp->getTHn(step1)->Projection(0, tmp->getNVar() - 1, 2); if (weighting == 0) { weightHistogram(hist1, events1); } - TH1D* events2 = (TH1D*)mTriggerHist->getTHn(step2)->Projection(0); - TH3D* hist2 = (TH3D*)tmp->getTHn(step2)->Projection(0, tmp->getNVar() - 1, 2); + TH1D* events2 = mTriggerHist->getTHn(step2)->Projection(0); + TH3D* hist2 = tmp->getTHn(step2)->Projection(0, tmp->getNVar() - 1, 2); if (weighting == 0) { weightHistogram(hist2, events2); } @@ -1430,7 +1430,7 @@ void CorrelationContainer::symmetrizepTBins() } // for symmetric bins - THnBase* source = (THnBase*)target->Clone(); + THnBase* source = dynamic_cast(target->Clone()); // axes: 0 delta eta; 1 pT,a; 2 pT,t; 3 centrality; 4 delta phi; 5 vtx-z for (Int_t i3 = 1; i3 <= target->GetAxis(3)->GetNbins(); i3++) { @@ -1573,7 +1573,7 @@ void CorrelationContainer::extendTrackingEfficiency(Bool_t verbose) new TCanvas; proj->DrawCopy(); } - if ((Int_t)proj->Fit("pol0", (verbose) ? "+" : "Q0+", "SAME", fitRangeBegin, fitRangeEnd) == 0) { + if (static_cast(proj->Fit("pol0", (verbose) ? "+" : "Q0+", "SAME", fitRangeBegin, fitRangeEnd)) == 0) { target[i] = proj->GetFunction("pol0")->GetParameter(0); } else { target[i] = 0; diff --git a/PWGCF/EbyEFluctuations/Tasks/NetProtonCumulants.cxx b/PWGCF/EbyEFluctuations/Tasks/NetProtonCumulants.cxx index 4f7c7de7d4c..64750e73efd 100644 --- a/PWGCF/EbyEFluctuations/Tasks/NetProtonCumulants.cxx +++ b/PWGCF/EbyEFluctuations/Tasks/NetProtonCumulants.cxx @@ -70,7 +70,7 @@ struct NetProtonCumulants_Table_QA { // Filter command*********** Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; - Filter trackFilter = (nabs(aod::track::eta) < 0.8f) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl); + Filter trackFilter = (nabs(aod::track::eta) < 0.8f) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl); // Connect to ccdb Service ccdb; diff --git a/PWGCF/EbyEFluctuations/Tasks/RobustFluctuationObservables.cxx b/PWGCF/EbyEFluctuations/Tasks/RobustFluctuationObservables.cxx index c1bc5143b58..361e3e88a59 100644 --- a/PWGCF/EbyEFluctuations/Tasks/RobustFluctuationObservables.cxx +++ b/PWGCF/EbyEFluctuations/Tasks/RobustFluctuationObservables.cxx @@ -1699,7 +1699,7 @@ struct RobustFluctuationObservables { histosEvent.fill(HIST("h2D_diffFoundBC_vs_BC"), collBC, diffFoundBC_vs_BC); if (collision.has_foundBC()) - histosEvent.fill(HIST("h2D_diffFoundBC_vs_BC_inTF"), collBC, static_cast(foundBcInTF) - static_cast(bcInTF)); + histosEvent.fill(HIST("h2D_diffFoundBC_vs_BC_inTF"), collBC, foundBcInTF - bcInTF); // with FT0 conditions if (isFT0) { diff --git a/PWGCF/EbyEFluctuations/Tasks/antiprotonCumulantsMc.cxx b/PWGCF/EbyEFluctuations/Tasks/antiprotonCumulantsMc.cxx index 00871c475c5..83318c41a16 100644 --- a/PWGCF/EbyEFluctuations/Tasks/antiprotonCumulantsMc.cxx +++ b/PWGCF/EbyEFluctuations/Tasks/antiprotonCumulantsMc.cxx @@ -110,7 +110,7 @@ struct AntiprotonCumulantsMc { // Filter command for rec (data)*********** Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; - Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (aod::track::itsChi2NCl < cfgCutItsChi2NCl) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy); + Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (aod::track::itsChi2NCl < cfgCutItsChi2NCl) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy); // filtering collisions and tracks for real data*********** using AodCollisions = soa::Filtered>; @@ -138,8 +138,8 @@ struct AntiprotonCumulantsMc { ccdb->setCreatedNotAfter(ccdbNoLaterThan.value); LOGF(info, "Getting object %s", ccdbPath.value.data()); TList* lst = ccdb->getForTimeStamp(ccdbPath.value, ccdbNoLaterThan.value); - hRatio2DEtaVsPtProton = reinterpret_cast(lst->FindObject("hRatio2DEtaVsPtProton")); - hRatio2DEtaVsPtAntiproton = reinterpret_cast(lst->FindObject("hRatio2DEtaVsPtAntiproton")); + hRatio2DEtaVsPtProton = dynamic_cast(lst->FindObject("hRatio2DEtaVsPtProton")); + hRatio2DEtaVsPtAntiproton = dynamic_cast(lst->FindObject("hRatio2DEtaVsPtAntiproton")); if (!hRatio2DEtaVsPtProton || !hRatio2DEtaVsPtAntiproton) LOGF(info, "FATAL!! could not get efficiency---------> check"); } diff --git a/PWGCF/EbyEFluctuations/Tasks/eventMeanPtId.cxx b/PWGCF/EbyEFluctuations/Tasks/eventMeanPtId.cxx index ff63af24227..bc195080fbf 100644 --- a/PWGCF/EbyEFluctuations/Tasks/eventMeanPtId.cxx +++ b/PWGCF/EbyEFluctuations/Tasks/eventMeanPtId.cxx @@ -186,7 +186,7 @@ struct EventMeanPtId { // ccdb->setCreatedNotAfter(ccdbNoLaterThan.value); // LOGF(info, "Getting object %s", ccdbPath.value.data()); TList* lst = ccdb->getForTimeStamp(cfgPathCCDB.value, 1); - ptHistogramAllchargeRec = reinterpret_cast(lst->FindObject("hPtEta_rec")); + ptHistogramAllchargeRec = dynamic_cast(lst->FindObject("hPtEta_rec")); } std::vector ptBinning = {0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0}; AxisSpec vtxZAxis = {100, -20.0, 20.0, "Z (cm)"}; diff --git a/PWGCF/EbyEFluctuations/Tasks/kaonIsospinFluctuations.cxx b/PWGCF/EbyEFluctuations/Tasks/kaonIsospinFluctuations.cxx index 14ff6c33833..12c3e704eea 100644 --- a/PWGCF/EbyEFluctuations/Tasks/kaonIsospinFluctuations.cxx +++ b/PWGCF/EbyEFluctuations/Tasks/kaonIsospinFluctuations.cxx @@ -2440,8 +2440,8 @@ struct KaonIsospinFluctuations { void processSim(MyMcCollisions const& mcCollisions, aod::McParticles const& mcParticles) { - auto finalParticleIdList = (std::vector)cfgFinalParticleIdList; - auto nonFinalParticleIdList = (std::vector)cfgNonFinalParticleIdList; + auto finalParticleIdList = std::vector(cfgFinalParticleIdList); + auto nonFinalParticleIdList = std::vector(cfgNonFinalParticleIdList); std::sort(finalParticleIdList.begin(), finalParticleIdList.end()); std::sort(nonFinalParticleIdList.begin(), nonFinalParticleIdList.end()); diff --git a/PWGCF/EbyEFluctuations/Tasks/netprotcumulants.cxx b/PWGCF/EbyEFluctuations/Tasks/netprotcumulants.cxx index 2d9ee21339d..b51fcaf320b 100644 --- a/PWGCF/EbyEFluctuations/Tasks/netprotcumulants.cxx +++ b/PWGCF/EbyEFluctuations/Tasks/netprotcumulants.cxx @@ -175,7 +175,7 @@ struct NetProtCumulants { // Filter command for rec (data)*********** Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; - Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (aod::track::itsChi2NCl < cfgCutItsChi2NCl) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy); + Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (aod::track::itsChi2NCl < cfgCutItsChi2NCl) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy); // filtering collisions and tracks for real data*********** using AodCollisions = soa::Filtered>; @@ -203,8 +203,8 @@ struct NetProtCumulants { ccdb->setCreatedNotAfter(ccdbNoLaterThan.value); LOGF(info, "Getting object %s", ccdbPath.value.data()); TList* lst = ccdb->getForTimeStamp(ccdbPath.value, ccdbNoLaterThan.value); - hRatio2DEtaVsPtProton = reinterpret_cast(lst->FindObject("hRatio2DEtaVsPtProton")); - hRatio2DEtaVsPtAntiproton = reinterpret_cast(lst->FindObject("hRatio2DEtaVsPtAntiproton")); + hRatio2DEtaVsPtProton = dynamic_cast(lst->FindObject("hRatio2DEtaVsPtProton")); + hRatio2DEtaVsPtAntiproton = dynamic_cast(lst->FindObject("hRatio2DEtaVsPtAntiproton")); if (!hRatio2DEtaVsPtProton || !hRatio2DEtaVsPtAntiproton) LOGF(info, "FATAL!! could not get efficiency---------> check"); } diff --git a/PWGCF/EbyEFluctuations/Tasks/netprotonCumulantsMc.cxx b/PWGCF/EbyEFluctuations/Tasks/netprotonCumulantsMc.cxx index 2f31669b547..9470ee8965b 100644 --- a/PWGCF/EbyEFluctuations/Tasks/netprotonCumulantsMc.cxx +++ b/PWGCF/EbyEFluctuations/Tasks/netprotonCumulantsMc.cxx @@ -110,7 +110,7 @@ struct NetprotonCumulantsMc { // Filter command for rec (data)*********** Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; - Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (aod::track::itsChi2NCl < cfgCutItsChi2NCl) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy); + Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (aod::track::itsChi2NCl < cfgCutItsChi2NCl) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy); // filtering collisions and tracks for real data*********** using AodCollisions = soa::Filtered>; @@ -138,8 +138,8 @@ struct NetprotonCumulantsMc { ccdb->setCreatedNotAfter(ccdbNoLaterThan.value); LOGF(info, "Getting object %s", ccdbPath.value.data()); TList* lst = ccdb->getForTimeStamp(ccdbPath.value, ccdbNoLaterThan.value); - hRatio2DEtaVsPtProton = reinterpret_cast(lst->FindObject("hRatio2DEtaVsPtProton")); - hRatio2DEtaVsPtAntiproton = reinterpret_cast(lst->FindObject("hRatio2DEtaVsPtAntiproton")); + hRatio2DEtaVsPtProton = dynamic_cast(lst->FindObject("hRatio2DEtaVsPtProton")); + hRatio2DEtaVsPtAntiproton = dynamic_cast(lst->FindObject("hRatio2DEtaVsPtAntiproton")); if (!hRatio2DEtaVsPtProton || !hRatio2DEtaVsPtAntiproton) LOGF(info, "FATAL!! could not get efficiency---------> check"); } diff --git a/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx b/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx index 019fd1855ea..a0099221620 100644 --- a/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx +++ b/PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx @@ -285,7 +285,7 @@ struct V0ptHadPiKaProt { ccdb->setCreatedNotAfter(ccdbNoLaterThan.value); LOGF(info, "Getting object %s", ccdbPath.value.data()); TList* lst = ccdb->getForTimeStamp(ccdbPath.value, ccdbNoLaterThan.value); - hWeightPhiFunctionVzEtaPhi = reinterpret_cast(lst->FindObject("hWeightPhiFunctionVzEtaPhi")); + hWeightPhiFunctionVzEtaPhi = dynamic_cast(lst->FindObject("hWeightPhiFunctionVzEtaPhi")); if (!hWeightPhiFunctionVzEtaPhi) LOGF(info, "FATAL!! could not get phi weights---------> check"); } @@ -299,10 +299,10 @@ struct V0ptHadPiKaProt { ccdb->setCreatedNotAfter(ccdbNoLaterThanPtEff.value); LOGF(info, "Getting object %s", ccdbPathPtEff.value.data()); TList* lst = ccdb->getForTimeStamp(ccdbPathPtEff.value, ccdbNoLaterThanPtEff.value); - hEffAllCharged = reinterpret_cast(lst->FindObject("hEffAllCharged")); - hEffPion = reinterpret_cast(lst->FindObject("hEffPion")); - hEffKaon = reinterpret_cast(lst->FindObject("hEffKaon")); - hEffProton = reinterpret_cast(lst->FindObject("hEffProton")); + hEffAllCharged = dynamic_cast(lst->FindObject("hEffAllCharged")); + hEffPion = dynamic_cast(lst->FindObject("hEffPion")); + hEffKaon = dynamic_cast(lst->FindObject("hEffKaon")); + hEffProton = dynamic_cast(lst->FindObject("hEffProton")); if (!hEffAllCharged || !hEffPion || !hEffKaon || !hEffProton) LOGF(info, "FATAL!! could not get efficiency files---------> !!! check !!!"); } diff --git a/PWGCF/Femto3D/Core/femto3dPairTask.h b/PWGCF/Femto3D/Core/femto3dPairTask.h index e0ba131e0a3..19556200506 100644 --- a/PWGCF/Femto3D/Core/femto3dPairTask.h +++ b/PWGCF/Femto3D/Core/femto3dPairTask.h @@ -102,14 +102,14 @@ Type getBinIndex(float const& value, std::vector const& binning, int cons for (unsigned int i = 0; i < binning.size() - 1; i++) { if (value >= binning[i] && binning[i + 1] > value) { if (NsubBins < 2) { - res = (Type)i; + res = static_cast(i); break; } else { float subBinWidth = (binning[i + 1] - binning[i]) / NsubBins; int subBin = std::floor((value - binning[i]) / subBinWidth); int delimeter = std::pow(10, std::to_string(NsubBins).size()); - res = (Type)i + (Type)subBin / delimeter; + res = static_cast(i) + static_cast(subBin) / delimeter; break; } } diff --git a/PWGCF/Femto3D/Tools/checkPacking.cxx b/PWGCF/Femto3D/Tools/checkPacking.cxx index 085f9825d31..cfd174c94e6 100644 --- a/PWGCF/Femto3D/Tools/checkPacking.cxx +++ b/PWGCF/Femto3D/Tools/checkPacking.cxx @@ -73,14 +73,14 @@ bool process(const TString& outputName, const int nevents = 100000) LOG(info) << "Bin width = " << T::bin_width << " vs histo " << hgaus->GetXaxis()->GetBinWidth(1); hgaus->SetLineColor(2); hgaus->SetLineStyle(1); - TH1F* hgausPacked = static_cast(hgaus->Clone("hgausPacked")); + TH1F* hgausPacked = dynamic_cast(hgaus->Clone("hgausPacked")); hgausPacked->SetLineColor(4); hgausPacked->SetLineStyle(2); - TH1F* huniform = static_cast(hgaus->Clone("huniform")); + TH1F* huniform = dynamic_cast(hgaus->Clone("huniform")); huniform->SetLineColor(2); huniform->SetLineStyle(1); - TH1F* huniformPacked = static_cast(hgaus->Clone("huniformPacked")); + TH1F* huniformPacked = dynamic_cast(hgaus->Clone("huniformPacked")); huniformPacked->SetLineColor(4); huniformPacked->SetLineStyle(2); diff --git a/PWGCF/FemtoDream/TableProducer/femtoDreamProducerReducedTask.cxx b/PWGCF/FemtoDream/TableProducer/femtoDreamProducerReducedTask.cxx index 8d401c41226..d5eb6337da7 100644 --- a/PWGCF/FemtoDream/TableProducer/femtoDreamProducerReducedTask.cxx +++ b/PWGCF/FemtoDream/TableProducer/femtoDreamProducerReducedTask.cxx @@ -297,9 +297,9 @@ struct femtoDreamProducerReducedTask { if (ConfIsDebug) { outputDebugParts(track.sign(), - (uint8_t)track.tpcNClsFound(), + static_cast(track.tpcNClsFound()), track.tpcNClsFindable(), - (uint8_t)track.tpcNClsCrossedRows(), + static_cast(track.tpcNClsCrossedRows()), track.tpcNClsShared(), track.tpcInnerParam(), track.itsNCls(), diff --git a/PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx b/PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx index 675419459da..9e6fb0dd4f2 100644 --- a/PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx +++ b/PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx @@ -535,9 +535,9 @@ struct femtoDreamProducerTask { if constexpr (isTrackOrV0) { if constexpr (hasItsPid) { outputDebugParts(particle.sign(), - (uint8_t)particle.tpcNClsFound(), + static_cast(particle.tpcNClsFound()), particle.tpcNClsFindable(), - (uint8_t)particle.tpcNClsCrossedRows(), + static_cast(particle.tpcNClsCrossedRows()), particle.tpcNClsShared(), particle.tpcInnerParam(), particle.itsNCls(), @@ -571,9 +571,9 @@ struct femtoDreamProducerTask { -999., -999., -999., -999., -999., -999., -999.); } else { outputDebugParts(particle.sign(), - (uint8_t)particle.tpcNClsFound(), + static_cast(particle.tpcNClsFound()), particle.tpcNClsFindable(), - (uint8_t)particle.tpcNClsCrossedRows(), + static_cast(particle.tpcNClsCrossedRows()), particle.tpcNClsShared(), particle.tpcInnerParam(), particle.itsNCls(), diff --git a/PWGCF/FemtoDream/TableProducer/femtoDreamProducerTaskForSpecificAnalysis.cxx b/PWGCF/FemtoDream/TableProducer/femtoDreamProducerTaskForSpecificAnalysis.cxx index 5e8b6290672..e516140f17a 100644 --- a/PWGCF/FemtoDream/TableProducer/femtoDreamProducerTaskForSpecificAnalysis.cxx +++ b/PWGCF/FemtoDream/TableProducer/femtoDreamProducerTaskForSpecificAnalysis.cxx @@ -67,7 +67,7 @@ struct FemtoDreamProducerTaskForSpecificAnalysis { Configurable confCutPartAntiPart{"confCutPartAntiPart", 0, "Track - Selection bit from cutCulator for antipart"}; /// Partition for selected particles - Partition selectedParts = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + Partition selectedParts = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= confPIDthrMom, ncheckbit(aod::femtodreamparticle::pidcut, confTPCPIDBit), ncheckbit(aod::femtodreamparticle::pidcut, confTPCTOFPIDBit)); /// V0 selection @@ -123,22 +123,22 @@ struct FemtoDreamProducerTaskForSpecificAnalysis { } Reso; // Partition for selected particles - Partition selectedV0s = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0)); - Partition selectedCascades = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kCascade)); + Partition selectedV0s = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kV0)); + Partition selectedCascades = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kCascade)); - Partition selectedK0Short = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0K0Short)); + Partition selectedK0Short = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kV0K0Short)); - Partition selectedPhi = ((aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::kResoPosdaughTPC_NegdaughTPC)) || - (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::kResoPosdaughTOF_NegdaughTOF)) || - (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::kResoPosdaughTOF_NegdaughTPC)) || - (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::kResoPosdaughTPC_NegdaughTOF))) && + Partition selectedPhi = ((aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::kResoPosdaughTPC_NegdaughTPC)) || + (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::kResoPosdaughTOF_NegdaughTOF)) || + (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::kResoPosdaughTOF_NegdaughTPC)) || + (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::kResoPosdaughTPC_NegdaughTOF))) && ((aod::femtodreamparticle::mLambda > Reso.confMinInvMassReso) && (aod::femtodreamparticle::mLambda < Reso.confMaxInvMassReso)); - Partition selectedKStar = ((aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTPC)) || - (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTOF)) || - (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTPC)) || - (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTOF))) && + Partition selectedKStar = ((aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTPC)) || + (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTOF)) || + (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTPC)) || + (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTOF))) && ((aod::femtodreamparticle::mLambda > Reso.confMinInvMassReso) && (aod::femtodreamparticle::mLambda < Reso.confMaxInvMassReso)); @@ -875,10 +875,10 @@ struct FemtoDreamProducerTaskForSpecificAnalysis { femtoParticle.mAntiLambda()); } - if ((femtoParticle.partType() == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTPC)) || - (femtoParticle.partType() == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTOF)) || - (femtoParticle.partType() == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTPC)) || - (femtoParticle.partType() == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTOF))) { + if ((femtoParticle.partType() == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTPC)) || + (femtoParticle.partType() == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTOF)) || + (femtoParticle.partType() == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTPC)) || + (femtoParticle.partType() == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTOF))) { std::vector childIDs; const auto& children = femtoParticle.childrenIds(); @@ -1041,10 +1041,10 @@ struct FemtoDreamProducerTaskForSpecificAnalysis { femtoParticle.mAntiLambda()); } - if ((femtoParticle.partType() == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTPC)) || - (femtoParticle.partType() == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTOF)) || - (femtoParticle.partType() == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTPC)) || - (femtoParticle.partType() == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTOF))) { + if ((femtoParticle.partType() == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTPC)) || + (femtoParticle.partType() == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTOF)) || + (femtoParticle.partType() == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTPC)) || + (femtoParticle.partType() == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTOF))) { std::vector childIDs; const auto& children = femtoParticle.childrenIds(); @@ -1184,10 +1184,10 @@ struct FemtoDreamProducerTaskForSpecificAnalysis { for (const auto& femtoParticle : parts) { - if ((femtoParticle.partType() == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTPC)) || - (femtoParticle.partType() == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTOF)) || - (femtoParticle.partType() == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTPC)) || - (femtoParticle.partType() == uint8_t(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTOF))) { + if ((femtoParticle.partType() == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTPC)) || + (femtoParticle.partType() == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTPC_NegdaughTOF)) || + (femtoParticle.partType() == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTPC)) || + (femtoParticle.partType() == static_cast(aod::femtodreamparticle::kResoKStarPosdaughTOF_NegdaughTOF))) { const auto& posresoChild = parts.iteratorAt(femtoParticle.index() - 2); const auto& negresoChild = parts.iteratorAt(femtoParticle.index() - 1); diff --git a/PWGCF/FemtoDream/TableProducer/femtoDreamProducerTaskReso.cxx b/PWGCF/FemtoDream/TableProducer/femtoDreamProducerTaskReso.cxx index 3bab4b2fb72..59a542e753f 100644 --- a/PWGCF/FemtoDream/TableProducer/femtoDreamProducerTaskReso.cxx +++ b/PWGCF/FemtoDream/TableProducer/femtoDreamProducerTaskReso.cxx @@ -781,9 +781,9 @@ struct FemtoDreamProducerTaskReso { if constexpr (isTrackOrV0) { if constexpr (hasItsPid) { outputDebugParts(particle.sign(), - (uint8_t)particle.tpcNClsFound(), + static_cast(particle.tpcNClsFound()), particle.tpcNClsFindable(), - (uint8_t)particle.tpcNClsCrossedRows(), + static_cast(particle.tpcNClsCrossedRows()), particle.tpcNClsShared(), particle.tpcInnerParam(), particle.itsNCls(), @@ -817,9 +817,9 @@ struct FemtoDreamProducerTaskReso { -999., -999., -999., -999., -999., -999., -999.); } else { outputDebugParts(particle.sign(), - (uint8_t)particle.tpcNClsFound(), + static_cast(particle.tpcNClsFound()), particle.tpcNClsFindable(), - (uint8_t)particle.tpcNClsCrossedRows(), + static_cast(particle.tpcNClsCrossedRows()), particle.tpcNClsShared(), particle.tpcInnerParam(), particle.itsNCls(), diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamDebugCascade.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamDebugCascade.cxx index f22bdcdbd4f..d2382a4b9e1 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamDebugCascade.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamDebugCascade.cxx @@ -83,7 +83,7 @@ struct femtoDreamDebugCascade { ConfigurableAxis ConfCascadeChildTempFitVarpTBins{"ConfCascadeChildTempFitVarpTBins", {20, 0.5, 4.05}, "Cascade child: pT binning of the pT vs. TempFitVar plot"}; using FemtoFullParticles = soa::Join; - Partition partsOne = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kCascade)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCascade_CutBit)); + Partition partsOne = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kCascade)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCascade_CutBit)); Preslice perCol = aod::femtodreamparticle::fdCollisionId; /// Histogramming @@ -140,9 +140,9 @@ struct femtoDreamDebugCascade { continue; } // check cuts on V0 children - if (posChild.partType() == uint8_t(aod::femtodreamparticle::ParticleType::kCascadeV0Child) && - negChild.partType() == uint8_t(aod::femtodreamparticle::ParticleType::kCascadeV0Child) && - bachChild.partType() == uint8_t(aod::femtodreamparticle::ParticleType::kCascadeBachelor)) { + if (posChild.partType() == static_cast(aod::femtodreamparticle::ParticleType::kCascadeV0Child) && + negChild.partType() == static_cast(aod::femtodreamparticle::ParticleType::kCascadeV0Child) && + bachChild.partType() == static_cast(aod::femtodreamparticle::ParticleType::kCascadeBachelor)) { if (ConfUseChildCuts) { if (!((posChild.cut() & ConfCascade_ChildPos_CutBit) == ConfCascade_ChildPos_CutBit && diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamDebugReso.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamDebugReso.cxx index d53ae5c126b..4c195dc2e16 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamDebugReso.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamDebugReso.cxx @@ -78,17 +78,17 @@ struct FemtoDreamDebugReso { using FemtoFullParticles = soa::Join; - Partition partsPhi = (ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoPosdaughTPC_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCBit), false) || - ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoPosdaughTOF_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCTOFBit), false) || - ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoPosdaughTOF_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCBit), false) || - ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoPosdaughTPC_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCTOFBit), false)); + Partition partsPhi = (ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoPosdaughTPC_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCBit), false) || + ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoPosdaughTOF_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCTOFBit), false) || + ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoPosdaughTOF_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCBit), false) || + ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoPosdaughTPC_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCTOFBit), false)); Preslice perCol = aod::femtodreamparticle::fdCollisionId; - Partition partsKstar = (ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTPC_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCBit), false) || - ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTOF_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCTOFBit), false) || - ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTOF_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCBit), false) || - ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTPC_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCTOFBit), false)); + Partition partsKstar = (ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTPC_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCBit), false) || + ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTOF_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCTOFBit), false) || + ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTOF_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCBit), false) || + ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTPC_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, resonance.confResoChildPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, resonance.confResoChildNegMergedTPCTOFBit), false)); /// Histogramming FemtoDreamEventHisto eventHisto; FemtoDreamParticleHisto posChildHistos; @@ -124,9 +124,9 @@ struct FemtoDreamDebugReso { if (posresoChild.globalIndex() != part.childrenIds()[0] || negresoChild.globalIndex() != part.childrenIds()[1]) { continue; } - if (posresoChild.partType() == uint8_t(aod::femtodreamparticle::ParticleType::kResoChild) && + if (posresoChild.partType() == static_cast(aod::femtodreamparticle::ParticleType::kResoChild) && (posresoChild.cut() & resonance.confChildPosCutBit.value) == resonance.confChildPosCutBit.value && - negresoChild.partType() == uint8_t(aod::femtodreamparticle::ParticleType::kResoChild) && + negresoChild.partType() == static_cast(aod::femtodreamparticle::ParticleType::kResoChild) && (negresoChild.cut() & resonance.confChildNegCutBit.value) == resonance.confChildNegCutBit.value) { TVector3 pparent(part.px(), part.py(), part.pz()); // Parent momentum (px, py, pz) diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamDebugTrack.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamDebugTrack.cxx index 729fecc4928..948c0c7f20b 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamDebugTrack.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamDebugTrack.cxx @@ -82,7 +82,7 @@ struct femtoDreamDebugTrack { using FemtoFullParticles = soa::Join; - Partition partsOne = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + Partition partsOne = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && (ncheckbit(aod::femtodreamparticle::cut, ConfTrk1_CutBit)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= ConfTrk1_PIDThres, ncheckbit(aod::femtodreamparticle::pidcut, ConfTrk1_TPCBit) && ((aod::femtodreamparticle::pidcut & ConfTrk1_TPCBit_Reject) == 0u), ncheckbit(aod::femtodreamparticle::pidcut, ConfTrk1_TPCTOFBit)) && (aod::femtodreamparticle::pt > ConfTrk1_minPt) && @@ -97,7 +97,7 @@ struct femtoDreamDebugTrack { // adsf using FemtoFullParticlesMC = soa::Join; Partition partsOneMC = - (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && ncheckbit(aod::femtodreamparticle::cut, ConfTrk1_CutBit) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= ConfTrk1_PIDThres, ncheckbit(aod::femtodreamparticle::pidcut, ConfTrk1_TPCBit) && ((aod::femtodreamparticle::pidcut & ConfTrk1_TPCBit_Reject) == 0u), ncheckbit(aod::femtodreamparticle::pidcut, ConfTrk1_TPCTOFBit)); Preslice perColGen = aod::femtodreamparticle::fdCollisionId; diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamDebugV0.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamDebugV0.cxx index f82fb64330b..9d1fe2df04c 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamDebugV0.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamDebugV0.cxx @@ -78,10 +78,10 @@ struct femtoDreamDebugV0 { Configurable ConfCompetingV0MassUpLimit{"ConfCompetingV0MassUpLimit", 0., "Upper Limit of the invariant mass window within which to reject the V0"}; using FemtoFullParticles = soa::Join; - Partition partsV0 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0)) && (ncheckbit(aod::femtodreamparticle::cut, ConfV01_CutBit)); + Partition partsV0 = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kV0)) && (ncheckbit(aod::femtodreamparticle::cut, ConfV01_CutBit)); Preslice perCol = aod::femtodreamparticle::fdCollisionId; - Partition partsK0Short = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0K0Short)) && (ncheckbit(aod::femtodreamparticle::cut, ConfV01_CutBit)); + Partition partsK0Short = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kV0K0Short)) && (ncheckbit(aod::femtodreamparticle::cut, ConfV01_CutBit)); /// Histogramming FemtoDreamEventHisto eventHisto; @@ -131,10 +131,10 @@ struct femtoDreamDebugV0 { continue; } // check cuts on V0 children - if (posChild.partType() == uint8_t(aod::femtodreamparticle::ParticleType::kV0Child) && + if (posChild.partType() == static_cast(aod::femtodreamparticle::ParticleType::kV0Child) && (posChild.cut() & ConfV01_ChildPos_CutBit) == ConfV01_ChildPos_CutBit && (posChild.pidcut() & ConfV01_ChildPos_TPCBit) == ConfV01_ChildPos_TPCBit && - negChild.partType() == uint8_t(aod::femtodreamparticle::ParticleType::kV0Child) && + negChild.partType() == static_cast(aod::femtodreamparticle::ParticleType::kV0Child) && (negChild.cut() & ConfV01_ChildNeg_CutBit) == ConfV01_ChildNeg_CutBit && (negChild.pidcut() & ConfV01_ChildNeg_TPCBit) == ConfV01_ChildNeg_TPCBit) { diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamHashTask.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamHashTask.cxx index 95116e0140e..4ecbe1a14fc 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamHashTask.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamHashTask.cxx @@ -42,8 +42,8 @@ struct femtoDreamPairHashTask { void init(InitContext&) { /// here the Configurables are passed to std::vectors - CastCfgVtxBins = (std::vector)CfgVtxBins; - CastCfgMultBins = (std::vector)CfgMultBins; + CastCfgVtxBins = std::vector(CfgVtxBins); + CastCfgMultBins = std::vector(CfgMultBins); } void process(o2::aod::FDCollision const& col) diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackCascade.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackCascade.cxx index 3b8164861ee..a7452f4e1d2 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackCascade.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackCascade.cxx @@ -102,7 +102,7 @@ struct femtoDreamPairTaskTrackCascade { Configurable TempFitVarMax{"TempFitVarMax", 10., "Maximum DCAxy of partricle 1 (Track)"}; } Track1; /// Partition for particle 1 - Partition PartitionTrk1 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + Partition PartitionTrk1 = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && (ncheckbit(aod::femtodreamparticle::cut, Track1.CutBit)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= Track1.PIDThres, ncheckbit(aod::femtodreamparticle::pidcut, Track1.TPCBit) && ((aod::femtodreamparticle::pidcut & Track1.TPCBit_Reject) == 0u), ncheckbit(aod::femtodreamparticle::pidcut, Track1.TPCTOFBit)) && (aod::femtodreamparticle::pt > Track1.PtMin) && @@ -113,7 +113,7 @@ struct femtoDreamPairTaskTrackCascade { ((aod::femtodreamparticle::tempFitVar >= Track1.TempFitVarMin) && (aod::femtodreamparticle::tempFitVar <= Track1.TempFitVarMax))); - Partition PartitionMCTrk1 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + Partition PartitionMCTrk1 = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && (ncheckbit(aod::femtodreamparticle::cut, Track1.CutBit)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= Track1.PIDThres, ncheckbit(aod::femtodreamparticle::pidcut, Track1.TPCBit) && ((aod::femtodreamparticle::pidcut & Track1.TPCBit_Reject) == 0u), ncheckbit(aod::femtodreamparticle::pidcut, Track1.TPCTOFBit)) && (aod::femtodreamparticle::pt > Track1.PtMin) && @@ -152,7 +152,7 @@ struct femtoDreamPairTaskTrackCascade { Configurable UseChildPIDCuts{"UseChildPIDCuts", true, "Use PID cuts on the children of the Cascades additional to those of the selection of the cascade builder (for debugging purposes)"}; } Cascade2; /// Partition for particle 2 - Partition PartitionCascade2 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kCascade)) && + Partition PartitionCascade2 = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kCascade)) && ((aod::femtodreamparticle::cut & Cascade2.CutBit) == Cascade2.CutBit) && (aod::femtodreamparticle::pt > Cascade2.PtMin) && (aod::femtodreamparticle::pt < Cascade2.PtMax) && @@ -163,7 +163,7 @@ struct femtoDreamPairTaskTrackCascade { (aod::femtodreamparticle::mAntiLambda > Cascade2.InvMassV0DaughMin) && (aod::femtodreamparticle::mAntiLambda < Cascade2.InvMassV0DaughMax); - Partition PartitionMCCascade2 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kCascade)) && + Partition PartitionMCCascade2 = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kCascade)) && ((aod::femtodreamparticle::cut & Cascade2.CutBit) == Cascade2.CutBit) && (aod::femtodreamparticle::pt > Cascade2.PtMin) && (aod::femtodreamparticle::pt < Cascade2.PtMax) && diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackTrack.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackTrack.cxx index cb482f58715..5aa6878e082 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackTrack.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackTrack.cxx @@ -153,7 +153,7 @@ struct femtoDreamPairTaskTrackTrack { /// Partition for particle 1 Partition PartitionTrk1 = - (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && (ncheckbit(aod::femtodreamparticle::cut, Track1.CutBit)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= Track1.PIDThres, ncheckbit(aod::femtodreamparticle::pidcut, Track1.TPCBit) && ((aod::femtodreamparticle::pidcut & Track1.TPCBit_Reject) == 0u), ncheckbit(aod::femtodreamparticle::pidcut, Track1.TPCTOFBit)) && (aod::femtodreamparticle::pt >= Track1.PtMin) && @@ -165,7 +165,7 @@ struct femtoDreamPairTaskTrackTrack { (aod::femtodreamparticle::tempFitVar <= Track1.TempFitVarMax))); Partition> PartitionMCTrk1 = - (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && (ncheckbit(aod::femtodreamparticle::cut, Track1.CutBit)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= Track1.PIDThres, ncheckbit(aod::femtodreamparticle::pidcut, Track1.TPCBit) && ((aod::femtodreamparticle::pidcut & Track1.TPCBit_Reject) == 0u), ncheckbit(aod::femtodreamparticle::pidcut, Track1.TPCTOFBit)) && (aod::femtodreamparticle::pt >= Track1.PtMin) && @@ -198,7 +198,7 @@ struct femtoDreamPairTaskTrackTrack { /// Partition for track 2 Partition PartitionTrk2 = - (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && (ncheckbit(aod::femtodreamparticle::cut, Track2.CutBit)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= Track2.PIDThres, ncheckbit(aod::femtodreamparticle::pidcut, Track2.TPCBit) && ((aod::femtodreamparticle::pidcut & Track2.TPCBit_Reject) == 0u), ncheckbit(aod::femtodreamparticle::pidcut, Track2.TPCTOFBit)) && (aod::femtodreamparticle::pt >= Track2.PtMin) && @@ -210,7 +210,7 @@ struct femtoDreamPairTaskTrackTrack { (aod::femtodreamparticle::tempFitVar <= Track2.TempFitVarMax))); Partition> PartitionMCTrk2 = - (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && (ncheckbit(aod::femtodreamparticle::cut, Track2.CutBit)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= Track2.PIDThres, ncheckbit(aod::femtodreamparticle::pidcut, Track2.TPCBit) && ((aod::femtodreamparticle::pidcut & Track2.TPCBit_Reject) == 0u), ncheckbit(aod::femtodreamparticle::pidcut, Track2.TPCTOFBit)) && (aod::femtodreamparticle::pt >= Track2.PtMin) && diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackV0.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackV0.cxx index ccf630b78a8..8c81532b44a 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackV0.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackV0.cxx @@ -115,7 +115,7 @@ struct femtoDreamPairTaskTrackV0 { } Track1; /// Partition for particle 1 - Partition PartitionTrk1 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + Partition PartitionTrk1 = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && (ncheckbit(aod::femtodreamparticle::cut, Track1.CutBit)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= Track1.PIDThres, ncheckbit(aod::femtodreamparticle::pidcut, Track1.TPCBit) && ((aod::femtodreamparticle::pidcut & Track1.TPCBit_Reject) == 0u), ncheckbit(aod::femtodreamparticle::pidcut, Track1.TPCTOFBit)) && (aod::femtodreamparticle::pt > Track1.PtMin) && @@ -126,7 +126,7 @@ struct femtoDreamPairTaskTrackV0 { ((aod::femtodreamparticle::tempFitVar >= Track1.TempFitVarMin) && (aod::femtodreamparticle::tempFitVar <= Track1.TempFitVarMax))); - Partition PartitionMCTrk1 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + Partition PartitionMCTrk1 = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && (ncheckbit(aod::femtodreamparticle::cut, Track1.CutBit)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= Track1.PIDThres, ncheckbit(aod::femtodreamparticle::pidcut, Track1.TPCBit) && ((aod::femtodreamparticle::pidcut & Track1.TPCBit_Reject) == 0u), ncheckbit(aod::femtodreamparticle::pidcut, Track1.TPCTOFBit)) && (aod::femtodreamparticle::pt > Track1.PtMin) && @@ -162,7 +162,7 @@ struct femtoDreamPairTaskTrackV0 { } V02; /// Partition for particle 2 - Partition PartitionV02 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0)) && + Partition PartitionV02 = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kV0)) && ((aod::femtodreamparticle::cut & V02.CutBit) == V02.CutBit) && (aod::femtodreamparticle::pt > V02.PtMin) && (aod::femtodreamparticle::pt < V02.PtMax) && @@ -173,7 +173,7 @@ struct femtoDreamPairTaskTrackV0 { (aod::femtodreamparticle::mAntiLambda > V02.InvMassAntiMin) && (aod::femtodreamparticle::mAntiLambda < V02.InvMassAntiMax); - Partition PartitionMCV02 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0)) && + Partition PartitionMCV02 = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kV0)) && ((aod::femtodreamparticle::cut & V02.CutBit) == V02.CutBit) && (aod::femtodreamparticle::pt > V02.PtMin) && (aod::femtodreamparticle::pt < V02.PtMax) && diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0Reso.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0Reso.cxx index 5bd1511f013..90a9c7fd1ea 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0Reso.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0Reso.cxx @@ -176,7 +176,7 @@ struct FemtoDreamPairTaskV0Reso { } Reso2; /// Partition for particle Lambda - Partition partitionV01 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0)) && + Partition partitionV01 = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kV0)) && ((aod::femtodreamparticle::cut & V01.cutBit) == V01.cutBit) && (aod::femtodreamparticle::pt > V01.ptMin) && (aod::femtodreamparticle::pt < V01.ptMax) && @@ -188,10 +188,10 @@ struct FemtoDreamPairTaskV0Reso { (aod::femtodreamparticle::mAntiLambda < V01.invMassAntiMax); /// Partition for particle Phi - Partition partitionReso2 = (ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoPosdaughTPC_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCBit), false) || - ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoPosdaughTOF_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCTOFBit), false) || - ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoPosdaughTOF_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCBit), false) || - ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoPosdaughTPC_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCTOFBit), false)) && + Partition partitionReso2 = (ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoPosdaughTPC_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCBit), false) || + ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoPosdaughTOF_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCTOFBit), false) || + ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoPosdaughTOF_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCBit), false) || + ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoPosdaughTPC_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCTOFBit), false)) && (aod::femtodreamparticle::pt < Reso2.ptMax) && (aod::femtodreamparticle::eta > Reso2.etaMin) && (aod::femtodreamparticle::eta < Reso2.etaMax) && @@ -201,7 +201,7 @@ struct FemtoDreamPairTaskV0Reso { /// Partitions for K0Short and KStar /// Partition for particle K0Short - Partition partitionK0Short1 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0K0Short)) && + Partition partitionK0Short1 = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kV0K0Short)) && ((aod::femtodreamparticle::cut & V01.cutBit) == V01.cutBit) && (aod::femtodreamparticle::pt > V01.ptMin) && (aod::femtodreamparticle::pt < V01.ptMax) && @@ -213,10 +213,10 @@ struct FemtoDreamPairTaskV0Reso { (aod::femtodreamparticle::mAntiLambda < V01.invMassAntiMax); /// Partition for particle KStar - Partition partitionKStar2 = (ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTPC_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCBit), false) || - ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTOF_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCTOFBit), false) || - ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTOF_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCBit), false) || - ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTPC_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCTOFBit), false)) && + Partition partitionKStar2 = (ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTPC_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCBit), false) || + ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTOF_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCTOFBit), false) || + ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTOF_NegdaughTPC), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCTOFBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCBit), false) || + ifnode(aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kResoKStarPosdaughTPC_NegdaughTOF), ncheckbit(aod::femtodreamparticle::pidcut, Reso2.daughPosTPCBit) && ncheckbit(aod::femtodreamparticle::cut, Reso2.daughNegMergedTPCTOFBit), false)) && (aod::femtodreamparticle::pt < Reso2.ptMax) && (aod::femtodreamparticle::eta > Reso2.etaMin) && (aod::femtodreamparticle::eta < Reso2.etaMax) && diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0V0.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0V0.cxx index bc5191724c6..a8dd8c61682 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0V0.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0V0.cxx @@ -121,7 +121,7 @@ struct femtoDreamPairTaskV0V0 { } V01; /// Partition for particle 1 - Partition PartitionV01 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0)) && + Partition PartitionV01 = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kV0)) && ((aod::femtodreamparticle::cut & V01.CutBit) == V01.CutBit) && (aod::femtodreamparticle::pt > V01.PtMin) && (aod::femtodreamparticle::pt < V01.PtMax) && @@ -159,7 +159,7 @@ struct femtoDreamPairTaskV0V0 { } V02; /// Partition for particle 2 - Partition PartitionV02 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0)) && + Partition PartitionV02 = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kV0)) && ((aod::femtodreamparticle::cut & V02.CutBit) == V02.CutBit) && (aod::femtodreamparticle::pt > V02.PtMin) && (aod::femtodreamparticle::pt < V02.PtMax) && diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackCascade.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackCascade.cxx index 1599bedb0bb..8c18f530690 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackCascade.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackCascade.cxx @@ -77,7 +77,7 @@ struct femtoDreamTripletTaskTrackTrackCascade { Configurable ConfUse3D{"ConfUse3D", false, "Enable three dimensional histogramms (to be used only for analysis with high statistics): k* vs mT vs multiplicity"}; Configurable ConfDCACutPtDep{"ConfDCACutPtDep", false, "Use pt dependent dca cut for tracks"}; /// Partition for selected particles - Partition SelectedParts = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + Partition SelectedParts = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= ConfPIDthrMom, ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCPIDBit), ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCTOFPIDBit)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) && (aod::femtodreamparticle::pt < ConfMaxpT) && @@ -104,7 +104,7 @@ struct femtoDreamTripletTaskTrackTrackCascade { Configurable Conf_minPt_Cascade{"Conf_minPt_Cascade", 0., "Minimum pT of Cascade"}; Configurable Conf_maxPt_Cascade{"Conf_maxPt_Cascade", 999., "Maximum pT of Cascade"}; // Partition for selected particles - Partition SelectedCascades = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kCascade)) && + Partition SelectedCascades = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kCascade)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCutCascade)) && (aod::femtodreamparticle::mLambda > Conf_minInvMass_Cascade) && (aod::femtodreamparticle::mLambda < Conf_maxInvMass_Cascade) && diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrack.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrack.cxx index 7456409d1bc..049d2bc8483 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrack.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrack.cxx @@ -86,7 +86,7 @@ struct femtoDreamTripletTaskTrackTrackTrack { Configurable ConfCutPart{"ConfCutPart", 5542474, "Track - Selection bit from cutCulator"}; /// Partition for selected particles - Partition SelectedParts = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + Partition SelectedParts = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= ConfPIDthrMom, ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCPIDBit), ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCTOFPIDBit)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) && (aod::femtodreamparticle::pt < ConfMaxpT) && @@ -96,7 +96,7 @@ struct femtoDreamTripletTaskTrackTrackTrack { (aod::femtodreamparticle::tempFitVar <= ConfMaxDCAxy))); ; - Partition> SelectedPartsMC = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + Partition> SelectedPartsMC = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= ConfPIDthrMom, ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCPIDBit), ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCTOFPIDBit)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) && (aod::femtodreamparticle::pt < ConfMaxpT) && diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrackPbPb.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrackPbPb.cxx index 9a5087d9f6b..cd6f930ac5f 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrackPbPb.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrackPbPb.cxx @@ -93,7 +93,7 @@ struct femtoDreamTripletTaskTrackTrackTrackPbPb { Configurable ConfCutPart{"ConfCutPart", 5542474, "Track - Selection bit from cutCulator"}; /// Partition for selected particles - Partition SelectedParts = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + Partition SelectedParts = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= ConfPIDthrMom, ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCPIDBit), ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCTOFPIDBit)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) && (aod::femtodreamparticle::pt < ConfMaxpT) && @@ -103,7 +103,7 @@ struct femtoDreamTripletTaskTrackTrackTrackPbPb { (aod::femtodreamparticle::tempFitVar <= ConfMaxDCAxy))); ; - Partition> SelectedPartsMC = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + Partition> SelectedPartsMC = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= ConfPIDthrMom, ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCPIDBit), ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCTOFPIDBit)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) && (aod::femtodreamparticle::pt < ConfMaxpT) && diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackV0.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackV0.cxx index 8702d8d5c77..3a58fda50d2 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackV0.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackV0.cxx @@ -85,7 +85,7 @@ struct femtoDreamTripletTaskTrackTrackV0 { Configurable ConfDCACutPtDep{"ConfDCACutPtDep", false, "Use pt dependent dca cut for tracks"}; /// Partition for selected particles - Partition SelectedParts = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + Partition SelectedParts = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= ConfPIDthrMom, ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCPIDBit), ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCTOFPIDBit)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) && (aod::femtodreamparticle::pt < ConfMaxpT) && @@ -95,7 +95,7 @@ struct femtoDreamTripletTaskTrackTrackV0 { (aod::femtodreamparticle::tempFitVar <= ConfMaxDCAxy))); ; - Partition> SelectedPartsMC = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + Partition> SelectedPartsMC = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= ConfPIDthrMom, ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCPIDBit), ncheckbit(aod::femtodreamparticle::pidcut, ConfTPCTOFPIDBit)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCutPart)) && (aod::femtodreamparticle::pt < ConfMaxpT) && @@ -126,7 +126,7 @@ struct femtoDreamTripletTaskTrackTrackV0 { Configurable Conf_maxPt_V0{"Conf_maxPt_V0", 999., "Maximum pT of V0"}; // Partition for selected particles - Partition SelectedV0s = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0)) && + Partition SelectedV0s = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kV0)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCutV0)) && (aod::femtodreamparticle::mLambda > Conf_minInvMass_V0) && (aod::femtodreamparticle::mLambda < Conf_maxInvMass_V0) && @@ -134,7 +134,7 @@ struct femtoDreamTripletTaskTrackTrackV0 { (aod::femtodreamparticle::mAntiLambda < Conf_maxInvMassAnti_V0) && (aod::femtodreamparticle::pt > Conf_minPt_V0) && (aod::femtodreamparticle::pt < Conf_maxPt_V0); - Partition> SelectedV0sMC = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0)) && + Partition> SelectedV0sMC = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kV0)) && (ncheckbit(aod::femtodreamparticle::cut, ConfCutV0)) && (aod::femtodreamparticle::mLambda > Conf_minInvMass_V0) && (aod::femtodreamparticle::mLambda < Conf_maxInvMass_V0) && diff --git a/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackV0PbPb.cxx b/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackV0PbPb.cxx index 1eecc066d27..ba66ac59e86 100644 --- a/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackV0PbPb.cxx +++ b/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackV0PbPb.cxx @@ -97,7 +97,7 @@ struct FemtoDreamTripletTaskTrackTrackV0PbPb { Configurable confDCACutPtDepPar1{"confDCACutPtDepPar1", 0.013, "Parameter par[1] of the pt dep cut, par[0] + par[1]/(pT/(GeV/c)−1.1) cm"}; /// Partition for selected particles - Partition selectedParts = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + Partition selectedParts = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && ifnode(aod::femtodreamparticle::pt * (0.5f * nexp(aod::femtodreamparticle::eta) + 0.5f * nexp(-1.f * aod::femtodreamparticle::eta)) <= confPIDthrMom, ncheckbit(aod::femtodreamparticle::pidcut, confTPCPIDBit), ncheckbit(aod::femtodreamparticle::pidcut, confTPCTOFPIDBit)) && (ncheckbit(aod::femtodreamparticle::cut, confCutPart)) && (aod::femtodreamparticle::pt < confMaxpT) && @@ -107,7 +107,7 @@ struct FemtoDreamTripletTaskTrackTrackV0PbPb { (aod::femtodreamparticle::tempFitVar <= confMaxDCAxy))); ; - Partition> selectedPartsMC = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + Partition> selectedPartsMC = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kTrack)) && ifnode(aod::femtodreamparticle::pt * (0.5f * nexp(aod::femtodreamparticle::eta) + 0.5f * nexp(-1.f * aod::femtodreamparticle::eta)) <= confPIDthrMom, ncheckbit(aod::femtodreamparticle::pidcut, confTPCPIDBit), ncheckbit(aod::femtodreamparticle::pidcut, confTPCTOFPIDBit)) && (ncheckbit(aod::femtodreamparticle::cut, confCutPart)) && (aod::femtodreamparticle::pt < confMaxpT) && @@ -138,7 +138,7 @@ struct FemtoDreamTripletTaskTrackTrackV0PbPb { Configurable confMaxPtV0{"confMaxPtV0", 999.0, "Maximum pT of V0"}; // Partition for selected particles - Partition selectedV0s = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0)) && + Partition selectedV0s = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kV0)) && (ncheckbit(aod::femtodreamparticle::cut, confCutV0)) && (aod::femtodreamparticle::mLambda > confMinInvMassV0) && (aod::femtodreamparticle::mLambda < confMaxInvMassV0) && @@ -146,7 +146,7 @@ struct FemtoDreamTripletTaskTrackTrackV0PbPb { (aod::femtodreamparticle::mAntiLambda < confMaxInvMassAntiV0) && (aod::femtodreamparticle::pt > confMinPtV0) && (aod::femtodreamparticle::pt < confMaxPtV0); - Partition> selectedV0sMC = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0)) && + Partition> selectedV0sMC = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kV0)) && (ncheckbit(aod::femtodreamparticle::cut, confCutV0)) && (aod::femtodreamparticle::mLambda > confMinInvMassV0) && (aod::femtodreamparticle::mLambda < confMaxInvMassV0) && diff --git a/PWGCF/FemtoDream/Tasks/femtodreamPairCascadeCascade.cxx b/PWGCF/FemtoDream/Tasks/femtodreamPairCascadeCascade.cxx index 3c4ebd17713..5fa6b812e7b 100644 --- a/PWGCF/FemtoDream/Tasks/femtodreamPairCascadeCascade.cxx +++ b/PWGCF/FemtoDream/Tasks/femtodreamPairCascadeCascade.cxx @@ -113,7 +113,7 @@ struct FemtoDreamPairCascadeCascade { } Cascade1; /// Partition for particle 1 - Partition partitionCascade1 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kCascade)) && + Partition partitionCascade1 = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kCascade)) && ((aod::femtodreamparticle::cut & Cascade1.cutBit) == Cascade1.cutBit) && (aod::femtodreamparticle::pt > Cascade1.ptMin) && (aod::femtodreamparticle::pt < Cascade1.ptMax) && @@ -153,7 +153,7 @@ struct FemtoDreamPairCascadeCascade { } Cascade2; /// Partition for particle 2 - Partition partitionCascade2 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kCascade)) && + Partition partitionCascade2 = (aod::femtodreamparticle::partType == static_cast(aod::femtodreamparticle::ParticleType::kCascade)) && ((aod::femtodreamparticle::cut & Cascade2.cutBit) == Cascade2.cutBit) && (aod::femtodreamparticle::pt > Cascade2.ptMin) && (aod::femtodreamparticle::pt < Cascade2.ptMax) && diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniversePairSHCentMultKt.h b/PWGCF/FemtoUniverse/Core/FemtoUniversePairSHCentMultKt.h index abcfc8efada..b38e9123384 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniversePairSHCentMultKt.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniversePairSHCentMultKt.h @@ -85,8 +85,8 @@ class PairSHCentMultKt do { fels[il] = el; fems[il] = em; - felsi[il] = static_cast(el); - femsi[il] = static_cast(em); + felsi[il] = el; + femsi[il] = em; em++; il++; if (em > el) { diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseSHContainer.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseSHContainer.h index a529a9f0c94..86d90f93d40 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseSHContainer.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseSHContainer.h @@ -90,8 +90,8 @@ class FemtoUniverseSHContainer fels[il] = el; fems[il] = em; - felsi[il] = static_cast(el); - femsi[il] = static_cast(em); + felsi[il] = el; + femsi[il] = em; em++; il++; if (em > el) { diff --git a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerReducedTask.cxx b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerReducedTask.cxx index 627000c53d0..9dd48e7bf27 100644 --- a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerReducedTask.cxx +++ b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerReducedTask.cxx @@ -296,9 +296,9 @@ struct femtoUniverseProducerReducedTask { if (ConfDebugOutput) { outputDebugParts(track.sign(), - (uint8_t)track.tpcNClsFound(), + static_cast(track.tpcNClsFound()), track.tpcNClsFindable(), - (uint8_t)track.tpcNClsCrossedRows(), + static_cast(track.tpcNClsCrossedRows()), track.tpcNClsShared(), track.tpcFractionSharedCls(), track.tpcInnerParam(), diff --git a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx index d65918ea5f0..3e21a3cc728 100644 --- a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx +++ b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx @@ -761,9 +761,9 @@ struct FemtoUniverseProducerTask { { if constexpr (isTrackOrV0) { if constexpr (std::experimental::is_detected::value) { - outputDebugParts(particle.sign(), (uint8_t)particle.tpcNClsFound(), + outputDebugParts(particle.sign(), static_cast(particle.tpcNClsFound()), particle.tpcNClsFindable(), - (uint8_t)particle.tpcNClsCrossedRows(), + static_cast(particle.tpcNClsCrossedRows()), particle.tpcNClsShared(), particle.tpcFractionSharedCls(), particle.tpcInnerParam(), particle.itsNCls(), particle.itsNClsInnerBarrel(), particle.dcaXY(), particle.dcaZ(), particle.tpcSignal(), @@ -775,9 +775,9 @@ struct FemtoUniverseProducerTask { particle.tofNSigmaLaPr(), particle.tofNSigmaLaPi(), particle.tofNSigmaALaPr(), particle.tofNSigmaALaPi(), particle.tofNSigmaK0PiPlus(), particle.tofNSigmaK0PiMinus()); } else { - outputDebugParts(particle.sign(), (uint8_t)particle.tpcNClsFound(), + outputDebugParts(particle.sign(), static_cast(particle.tpcNClsFound()), particle.tpcNClsFindable(), - (uint8_t)particle.tpcNClsCrossedRows(), + static_cast(particle.tpcNClsCrossedRows()), particle.tpcNClsShared(), particle.tpcFractionSharedCls(), particle.tpcInnerParam(), particle.itsNCls(), particle.itsNClsInnerBarrel(), particle.dcaXY(), particle.dcaZ(), particle.tpcSignal(), @@ -1304,9 +1304,9 @@ struct FemtoUniverseProducerTask { tmpIDtrack.push_back(track.globalIndex()); - outputDebugParts(track.sign(), (uint8_t)track.tpcNClsFound(), + outputDebugParts(track.sign(), static_cast(track.tpcNClsFound()), track.tpcNClsFindable(), - (uint8_t)track.tpcNClsCrossedRows(), + static_cast(track.tpcNClsCrossedRows()), track.tpcNClsShared(), track.tpcFractionSharedCls(), track.tpcInnerParam(), track.itsNCls(), track.itsNClsInnerBarrel(), track.dcaXY(), track.dcaZ(), track.tpcSignal(), diff --git a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTaskV0Only.cxx b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTaskV0Only.cxx index c69f0f2eea5..8f02185da83 100644 --- a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTaskV0Only.cxx +++ b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTaskV0Only.cxx @@ -476,9 +476,9 @@ struct femtoUniverseProducerTaskV0Only { indexChildID, v0.mLambda(), v0.mAntiLambda()); if (ConfDebugOutput) { outputDebugParts( - postrack.sign(), (uint8_t)postrack.tpcNClsFound(), + postrack.sign(), static_cast(postrack.tpcNClsFound()), postrack.tpcNClsFindable(), - (uint8_t)postrack.tpcNClsCrossedRows(), + static_cast(postrack.tpcNClsCrossedRows()), postrack.tpcNClsShared(), postrack.tpcFractionSharedCls(), postrack.tpcInnerParam(), postrack.itsNCls(), postrack.itsNClsInnerBarrel(), postrack.dcaXY(), postrack.dcaZ(), postrack.tpcSignal(), @@ -490,9 +490,9 @@ struct femtoUniverseProducerTaskV0Only { -999., -999., -999., -999., -999.); // QA for positive daughter outputDebugParts( - negtrack.sign(), (uint8_t)negtrack.tpcNClsFound(), + negtrack.sign(), static_cast(negtrack.tpcNClsFound()), negtrack.tpcNClsFindable(), - (uint8_t)negtrack.tpcNClsCrossedRows(), + static_cast(negtrack.tpcNClsCrossedRows()), negtrack.tpcNClsShared(), negtrack.tpcFractionSharedCls(), negtrack.tpcInnerParam(), negtrack.itsNCls(), negtrack.itsNClsInnerBarrel(), negtrack.dcaXY(), negtrack.dcaZ(), negtrack.tpcSignal(), diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugTrack.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugTrack.cxx index 79933fdae0f..1b901edbb98 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugTrack.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugTrack.cxx @@ -83,11 +83,11 @@ struct FemtoUniverseDebugTrack { FemtoUniverseTrackSelection trackCuts; using FemtoFullParticles = soa::Join; - Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == int8_t(trackonefilter.confTrackSign)); // && ((aod::femtouniverseparticle::cut & confCutPartOne) == confCutPartOne); + Partition partsOne = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == static_cast(trackonefilter.confTrackSign)); // && ((aod::femtouniverseparticle::cut & confCutPartOne) == confCutPartOne); Preslice perColReco = aod::femtouniverseparticle::fdCollisionId; using FemtoFullParticlesMC = soa::Join; - Partition partsOneMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == int8_t(trackonefilter.confTrackSign)); // && ((aod::femtouniverseparticle::cut & confCutPartOne) == confCutPartOne); + Partition partsOneMC = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == static_cast(trackonefilter.confTrackSign)); // && ((aod::femtouniverseparticle::cut & confCutPartOne) == confCutPartOne); Preslice perColGen = aod::femtouniverseparticle::fdCollisionId; /// Histogramming for Event diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugV0.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugV0.cxx index 21967c475e7..c5e923050dc 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugV0.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugV0.cxx @@ -78,9 +78,9 @@ struct FemtoUniverseDebugV0 { /// Partitioning using FemtoFullParticles = soa::Join; - Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kV0)) && ((aod::femtouniverseparticle::cut & V0configs.confCutV0) == V0configs.confCutV0); + Partition partsOne = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kV0)) && ((aod::femtouniverseparticle::cut & V0configs.confCutV0) == V0configs.confCutV0); - Partition> partsOneMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kV0)) && ((aod::femtouniverseparticle::cut & V0configs.confCutV0) == V0configs.confCutV0); + Partition> partsOneMC = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kV0)) && ((aod::femtouniverseparticle::cut & V0configs.confCutV0) == V0configs.confCutV0); Preslice perCol = aod::femtouniverseparticle::fdCollisionId; @@ -128,8 +128,8 @@ struct FemtoUniverseDebugV0 { } // Check cuts on V0 children - if (positiveChild.partType() == uint8_t(aod::femtouniverseparticle::ParticleType::kV0Child) && - negativeChild.partType() == uint8_t(aod::femtouniverseparticle::ParticleType::kV0Child) && + if (positiveChild.partType() == static_cast(aod::femtouniverseparticle::ParticleType::kV0Child) && + negativeChild.partType() == static_cast(aod::femtouniverseparticle::ParticleType::kV0Child) && isFullPIDSelected(positiveChild.pidCut(), positiveChild.p(), 999.f, childconfigs.confPositiveChildIndex.value, childconfigs.confChildnSpecies.value, childconfigs.confChildPIDnSigmaMax.value, childconfigs.confPositiveChildPIDnSigmaMax.value, 1.f) && isFullPIDSelected(negativeChild.pidCut(), negativeChild.p(), 999.f, childconfigs.confNegativeChildIndex.value, childconfigs.confChildnSpecies.value, childconfigs.confChildPIDnSigmaMax.value, childconfigs.confNegativeChildPIDnSigmaMax.value, 1.f)) { auto positiveChildMass = pdg->Mass(V0configs.confPDGCodePositiveChild); @@ -170,8 +170,8 @@ struct FemtoUniverseDebugV0 { } // Check cuts on V0 children - if (positiveChild.partType() == uint8_t(aod::femtouniverseparticle::ParticleType::kV0Child) && - negativeChild.partType() == uint8_t(aod::femtouniverseparticle::ParticleType::kV0Child) && + if (positiveChild.partType() == static_cast(aod::femtouniverseparticle::ParticleType::kV0Child) && + negativeChild.partType() == static_cast(aod::femtouniverseparticle::ParticleType::kV0Child) && isFullPIDSelected(positiveChild.pidCut(), positiveChild.p(), 999.f, childconfigs.confPositiveChildIndex.value, childconfigs.confChildnSpecies.value, childconfigs.confChildPIDnSigmaMax.value, childconfigs.confPositiveChildPIDnSigmaMax.value, 1.f) && isFullPIDSelected(negativeChild.pidCut(), negativeChild.p(), 999.f, childconfigs.confNegativeChildIndex.value, childconfigs.confChildnSpecies.value, childconfigs.confChildPIDnSigmaMax.value, childconfigs.confNegativeChildPIDnSigmaMax.value, 1.f)) { auto positiveChildMass = pdg->Mass(V0configs.confPDGCodePositiveChild); diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyBase.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyBase.cxx index abc3036d1b0..d01421caff5 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyBase.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyBase.cxx @@ -161,7 +161,7 @@ struct FemtoUniverseEfficiencyBase { Configurable confChargePart1{"confChargePart1", 1, "Charge of the first particle"}; /// Partition for particle 1 - Partition partsOneMCGen = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < confPtHighPart1) && (aod::femtouniverseparticle::pt > confPtLowPart1) && (nabs(aod::femtouniverseparticle::eta) < ConfBothTracks.confEtaMax); + Partition partsOneMCGen = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < confPtHighPart1) && (aod::femtouniverseparticle::pt > confPtLowPart1) && (nabs(aod::femtouniverseparticle::eta) < ConfBothTracks.confEtaMax); Partition partsTrackOneMCReco = (aod::femtouniverseparticle::pt < confPtHighPart1) && (aod::femtouniverseparticle::pt > confPtLowPart1) && (nabs(aod::femtouniverseparticle::eta) < ConfBothTracks.confEtaMax); @@ -182,7 +182,7 @@ struct FemtoUniverseEfficiencyBase { Configurable confChargePart2{"confChargePart2", 1, "Charge of the second particle"}; /// Partition for particle 2 - Partition partsTwoMCGen = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < confPtHighPart2) && (aod::femtouniverseparticle::pt > confPtLowPart2) && (nabs(aod::femtouniverseparticle::eta) < ConfBothTracks.confEtaMax); + Partition partsTwoMCGen = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < confPtHighPart2) && (aod::femtouniverseparticle::pt > confPtLowPart2) && (nabs(aod::femtouniverseparticle::eta) < ConfBothTracks.confEtaMax); Partition partsTrackTwoMCReco = (aod::femtouniverseparticle::pt < confPtHighPart2) && (aod::femtouniverseparticle::pt > confPtLowPart2) && (nabs(aod::femtouniverseparticle::eta) < ConfBothTracks.confEtaMax); @@ -224,7 +224,7 @@ struct FemtoUniverseEfficiencyBase { registryTOFMatch.add("part1/hTpcPt", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}}); registryPDG.add("part1/PDGvspT", "PDG;#it{p}_{T} (GeV/c); PDG", {HistType::kTH2F, {{confTempFitVarpTBins}, {16001, -8000.5, 8000.5}}}); registryPDG.add("part1/PDGvspTall", "PDG;#it{p}_{T} (GeV/c); PDG", {HistType::kTH2F, {{confTempFitVarpTBins}, {16001, -8000.5, 8000.5}}}); - if (confParticleTypePartOne == uint8_t(aod::femtouniverseparticle::ParticleType::kV0)) { + if (confParticleTypePartOne == static_cast(aod::femtouniverseparticle::ParticleType::kV0)) { trackHistoV0OneRec.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarCPABins, false, confPDGCodePartOne, confIsDebug); trackHistoV0OneChildPosRec.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarDCABins, false, 0, confIsDebug, "posChildV0_1"); trackHistoV0OneChildNegRec.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarDCABins, false, 0, confIsDebug, "negChildV0_1"); @@ -256,7 +256,7 @@ struct FemtoUniverseEfficiencyBase { registryTOFMatch.add("part2/hTpcPt", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}}); registryPDG.add("part2/PDGvspT", "PDG;#it{p}_{T} (GeV/c); PDG", {HistType::kTH2F, {{confTempFitVarpTBins}, {16001, -8000.5, 8000.5}}}); registryPDG.add("part2/PDGvspTall", "PDG;#it{p}_{T} (GeV/c); PDG", {HistType::kTH2F, {{confTempFitVarpTBins}, {16001, -8000.5, 8000.5}}}); - if (confParticleTypePartTwo == uint8_t(aod::femtouniverseparticle::ParticleType::kV0)) { + if (confParticleTypePartTwo == static_cast(aod::femtouniverseparticle::ParticleType::kV0)) { trackHistoV0TwoRec.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarCPABins, false, confPDGCodePartTwo, confIsDebug); trackHistoV0TwoChildPosRec.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarDCABins, false, 0, confIsDebug, "posChildV0_2"); trackHistoV0TwoChildNegRec.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarDCABins, false, 0, confIsDebug, "negChildV0_2"); diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniverseHashTask.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniverseHashTask.cxx index 08c0a74f675..583b944d9c2 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniverseHashTask.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniverseHashTask.cxx @@ -42,8 +42,8 @@ struct FemtoUniverseHashTask { void init(InitContext&) { /// here the Configurables are passed to std::vectors - castCfgVtxBins = (std::vector)cfgVtxBins; - castCfgMultBins = (std::vector)cfgMultBins; + castCfgVtxBins = std::vector(cfgVtxBins); + castCfgMultBins = std::vector(cfgMultBins); } void process(o2::aod::FdCollision const& col) diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx index b9a740f4874..a53ce14dd67 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx @@ -161,28 +161,28 @@ struct femtoUniversePairTaskTrackCascadeExtended { // NOLINT(cppcoreguidelines-p using FilteredFDCollision = FilteredFDCollisions::iterator; /// Partition for the first track particle using extended table - Partition partsTrackOneFull = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::mAntiLambda == trackparticleconfigs.confChargePart1) && (nabs(aod::femtouniverseparticle::eta) < narrowcuts.confEta) && (aod::femtouniverseparticle::pt < trackparticleconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackparticleconfigs.confLPtPart1); // used for track - cascade and track - track correlations + Partition partsTrackOneFull = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::mAntiLambda == trackparticleconfigs.confChargePart1) && (nabs(aod::femtouniverseparticle::eta) < narrowcuts.confEta) && (aod::femtouniverseparticle::pt < trackparticleconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackparticleconfigs.confLPtPart1); // used for track - cascade and track - track correlations /// Partition for MC QA of track using partone configs - Partition partsTrackOneFullMc = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::mAntiLambda == trackparticleconfigs.confChargePart1) && (nabs(aod::femtouniverseparticle::eta) < narrowcuts.confEta) && (aod::femtouniverseparticle::pt < trackparticleconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackparticleconfigs.confLPtPart1); + Partition partsTrackOneFullMc = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::mAntiLambda == trackparticleconfigs.confChargePart1) && (nabs(aod::femtouniverseparticle::eta) < narrowcuts.confEta) && (aod::femtouniverseparticle::pt < trackparticleconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackparticleconfigs.confLPtPart1); /// Partition for the first track particle using bitmask (without extended table) - Partition partsTrackOneBasic = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::mAntiLambda == trackparticleconfigs.confChargePart1) && (nabs(aod::femtouniverseparticle::eta) < narrowcuts.confEta) && (aod::femtouniverseparticle::pt < trackparticleconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackparticleconfigs.confLPtPart1); - Partition partsTrackOneMCgenBasic = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (nabs(aod::femtouniverseparticle::eta) < narrowcuts.confEta) && (aod::femtouniverseparticle::pt < trackparticleconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackparticleconfigs.confLPtPart1); + Partition partsTrackOneBasic = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::mAntiLambda == trackparticleconfigs.confChargePart1) && (nabs(aod::femtouniverseparticle::eta) < narrowcuts.confEta) && (aod::femtouniverseparticle::pt < trackparticleconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackparticleconfigs.confLPtPart1); + Partition partsTrackOneMCgenBasic = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (nabs(aod::femtouniverseparticle::eta) < narrowcuts.confEta) && (aod::femtouniverseparticle::pt < trackparticleconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackparticleconfigs.confLPtPart1); /// Partition for the second track particle using extended table - Partition partsTrackTwoFull = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::mAntiLambda == trackparticleconfigs.confChargePart2) && (nabs(aod::femtouniverseparticle::eta) < narrowcuts.confEta) && (aod::femtouniverseparticle::pt < trackparticleconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackparticleconfigs.confLPtPart1); // used for track - track correlations + Partition partsTrackTwoFull = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::mAntiLambda == trackparticleconfigs.confChargePart2) && (nabs(aod::femtouniverseparticle::eta) < narrowcuts.confEta) && (aod::femtouniverseparticle::pt < trackparticleconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackparticleconfigs.confLPtPart1); // used for track - track correlations /// Partition for the second track particle using bitmask (without extended table) - Partition partsTrackTwoBasic = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::mAntiLambda == trackparticleconfigs.confChargePart2) && (nabs(aod::femtouniverseparticle::eta) < narrowcuts.confEta) && (aod::femtouniverseparticle::pt < trackparticleconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackparticleconfigs.confLPtPart1); + Partition partsTrackTwoBasic = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::mAntiLambda == trackparticleconfigs.confChargePart2) && (nabs(aod::femtouniverseparticle::eta) < narrowcuts.confEta) && (aod::femtouniverseparticle::pt < trackparticleconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackparticleconfigs.confLPtPart1); /// Partition for cascades using extended table - Partition partsTwoFull = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kCascade)) && (aod::femtouniverseparticle::pt < cascparticleconfigs.confHPtPart2) && (aod::femtouniverseparticle::pt > cascparticleconfigs.confLPtPart2); + Partition partsTwoFull = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kCascade)) && (aod::femtouniverseparticle::pt < cascparticleconfigs.confHPtPart2) && (aod::femtouniverseparticle::pt > cascparticleconfigs.confLPtPart2); /// Partition for cascades using extended MC reco table - Partition partsTwoMCrecoFull = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kCascade)) && (aod::femtouniverseparticle::pt < cascparticleconfigs.confHPtPart2) && (aod::femtouniverseparticle::pt > cascparticleconfigs.confLPtPart2); + Partition partsTwoMCrecoFull = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kCascade)) && (aod::femtouniverseparticle::pt < cascparticleconfigs.confHPtPart2) && (aod::femtouniverseparticle::pt > cascparticleconfigs.confLPtPart2); /// Partition for cascades using bitmask (without extended table) - Partition partsTwoBasic = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kCascade)) && (aod::femtouniverseparticle::pt < cascparticleconfigs.confHPtPart2) && (aod::femtouniverseparticle::pt > cascparticleconfigs.confLPtPart2); - Partition partsTwoMCgenBasic = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < cascparticleconfigs.confHPtPart2) && (aod::femtouniverseparticle::pt > cascparticleconfigs.confLPtPart2); + Partition partsTwoBasic = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kCascade)) && (aod::femtouniverseparticle::pt < cascparticleconfigs.confHPtPart2) && (aod::femtouniverseparticle::pt > cascparticleconfigs.confLPtPart2); + Partition partsTwoMCgenBasic = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < cascparticleconfigs.confHPtPart2) && (aod::femtouniverseparticle::pt > cascparticleconfigs.confLPtPart2); /// Histogramming for track particle FemtoUniverseParticleHisto trackHistoPartOnePos; @@ -1453,7 +1453,7 @@ struct femtoUniversePairTaskTrackCascadeExtended { // NOLINT(cppcoreguidelines-p void processMCgen(aod::FDParticles const& parts) { for (const auto& part : parts) { - if (part.partType() != uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) + if (part.partType() != static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) continue; int pdgCode = static_cast(part.pidCut()); diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx index fce3a57e78c..50c8987e0e3 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx @@ -191,37 +191,37 @@ struct FemtoUniversePairTaskTrackD0 { Configurable doEfficiencyCorr{"doEfficiencyCorr", false, "Apply efficiency corrections"}; /// Partitions for particle 1 - Partition partsTrack = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == int8_t(ConfTrack.confTrackSign)) && (aod::femtouniverseparticle::pt > ConfTrack.confTrackLowPtCut) && (aod::femtouniverseparticle::pt < ConfTrack.confTrackHighPtCut) && (nabs(aod::femtouniverseparticle::eta) < ConfTrack.confTrackEtaMax); - Partition partsTrackFullSigma = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == int8_t(ConfTrack.confTrackSign)) && (aod::femtouniverseparticle::pt > ConfTrack.confTrackLowPtCut) && (aod::femtouniverseparticle::pt < ConfTrack.confTrackHighPtCut) && (nabs(aod::femtouniverseparticle::eta) < ConfTrack.confTrackEtaMax); - Partition partsTrackMCReco = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == int8_t(ConfTrack.confTrackSign)) && (aod::femtouniverseparticle::pt > ConfTrack.confTrackLowPtCut) && (aod::femtouniverseparticle::pt < ConfTrack.confTrackHighPtCut) && (nabs(aod::femtouniverseparticle::eta) < ConfTrack.confTrackEtaMax); + Partition partsTrack = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == static_cast(ConfTrack.confTrackSign)) && (aod::femtouniverseparticle::pt > ConfTrack.confTrackLowPtCut) && (aod::femtouniverseparticle::pt < ConfTrack.confTrackHighPtCut) && (nabs(aod::femtouniverseparticle::eta) < ConfTrack.confTrackEtaMax); + Partition partsTrackFullSigma = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == static_cast(ConfTrack.confTrackSign)) && (aod::femtouniverseparticle::pt > ConfTrack.confTrackLowPtCut) && (aod::femtouniverseparticle::pt < ConfTrack.confTrackHighPtCut) && (nabs(aod::femtouniverseparticle::eta) < ConfTrack.confTrackEtaMax); + Partition partsTrackMCReco = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == static_cast(ConfTrack.confTrackSign)) && (aod::femtouniverseparticle::pt > ConfTrack.confTrackLowPtCut) && (aod::femtouniverseparticle::pt < ConfTrack.confTrackHighPtCut) && (nabs(aod::femtouniverseparticle::eta) < ConfTrack.confTrackEtaMax); Partition partsTrackMCTruth = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pidCut == static_cast(ConfTrack.confPDGCodeTrack)) && (aod::femtouniverseparticle::pt > ConfTrack.confTrackLowPtCut) && (aod::femtouniverseparticle::pt < ConfTrack.confTrackHighPtCut) && (nabs(aod::femtouniverseparticle::eta) < ConfTrack.confTrackEtaMax); /// Partitions for particle 2 /// Partition with all D0/D0bar mesons (which pass one and double mass hypothesis) - Partition partsAllDmesons = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kD0)) && ((aod::femtouniverseparticle::mLambda > 0.0f) || (aod::femtouniverseparticle::mAntiLambda > 0.0f)) && (aod::femtouniverseparticle::decayVtxZ < ConfMlProb.confMlProbNonPromptMax); + Partition partsAllDmesons = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kD0)) && ((aod::femtouniverseparticle::mLambda > 0.0f) || (aod::femtouniverseparticle::mAntiLambda > 0.0f)) && (aod::femtouniverseparticle::decayVtxZ < ConfMlProb.confMlProbNonPromptMax); /// Partition with D0 mesons only (one and double mass hypothesis) - Partition partsAllD0s = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kD0)) && (aod::femtouniverseparticle::mLambda > ConfDmesons.minInvMassD0D0barSignal) && (aod::femtouniverseparticle::mLambda < ConfDmesons.maxInvMassD0D0barSignal) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::decayVtxZ < ConfMlProb.confMlProbNonPromptMax); + Partition partsAllD0s = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kD0)) && (aod::femtouniverseparticle::mLambda > ConfDmesons.minInvMassD0D0barSignal) && (aod::femtouniverseparticle::mLambda < ConfDmesons.maxInvMassD0D0barSignal) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::decayVtxZ < ConfMlProb.confMlProbNonPromptMax); /// Partition with D0 mesons only (one mass hypothesis) - Partition partsD0s = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kD0)) && (aod::femtouniverseparticle::mLambda > ConfDmesons.minInvMassD0D0barSignal) && (aod::femtouniverseparticle::mLambda < ConfDmesons.maxInvMassD0D0barSignal) && (aod::femtouniverseparticle::mAntiLambda < 0.0f) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::decayVtxZ < ConfMlProb.confMlProbNonPromptMax); + Partition partsD0s = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kD0)) && (aod::femtouniverseparticle::mLambda > ConfDmesons.minInvMassD0D0barSignal) && (aod::femtouniverseparticle::mLambda < ConfDmesons.maxInvMassD0D0barSignal) && (aod::femtouniverseparticle::mAntiLambda < 0.0f) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::decayVtxZ < ConfMlProb.confMlProbNonPromptMax); /// Partition with D0s selected from the side-band (SB) regions (candidates with double mass hypothesis included) - Partition partsD0sFromSB = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kD0)) && ((aod::femtouniverseparticle::mLambda > ConfDmesons.minInvMassD0D0barLeftSB && aod::femtouniverseparticle::mLambda < ConfDmesons.maxInvMassD0D0barLeftSB) || (aod::femtouniverseparticle::mLambda > ConfDmesons.minInvMassD0D0barRightSB && aod::femtouniverseparticle::mLambda < ConfDmesons.maxInvMassD0D0barRightSB)) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::decayVtxZ < ConfMlProb.confMlProbNonPromptMax); + Partition partsD0sFromSB = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kD0)) && ((aod::femtouniverseparticle::mLambda > ConfDmesons.minInvMassD0D0barLeftSB && aod::femtouniverseparticle::mLambda < ConfDmesons.maxInvMassD0D0barLeftSB) || (aod::femtouniverseparticle::mLambda > ConfDmesons.minInvMassD0D0barRightSB && aod::femtouniverseparticle::mLambda < ConfDmesons.maxInvMassD0D0barRightSB)) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::decayVtxZ < ConfMlProb.confMlProbNonPromptMax); /// Partition with D0bar mesons only (one and double mass hypothesis) - Partition partsAllD0bars = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kD0)) && (aod::femtouniverseparticle::mAntiLambda > ConfDmesons.minInvMassD0D0barSignal) && (aod::femtouniverseparticle::mAntiLambda < ConfDmesons.maxInvMassD0D0barSignal) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::decayVtxZ < ConfMlProb.confMlProbNonPromptMax); + Partition partsAllD0bars = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kD0)) && (aod::femtouniverseparticle::mAntiLambda > ConfDmesons.minInvMassD0D0barSignal) && (aod::femtouniverseparticle::mAntiLambda < ConfDmesons.maxInvMassD0D0barSignal) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::decayVtxZ < ConfMlProb.confMlProbNonPromptMax); /// Partition with D0bar mesons only (one mass hypothesis) - Partition partsD0bars = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kD0)) && (aod::femtouniverseparticle::mLambda < 0.0f) && (aod::femtouniverseparticle::mAntiLambda > ConfDmesons.minInvMassD0D0barSignal) && (aod::femtouniverseparticle::mAntiLambda < ConfDmesons.maxInvMassD0D0barSignal) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::decayVtxZ < ConfMlProb.confMlProbNonPromptMax); + Partition partsD0bars = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kD0)) && (aod::femtouniverseparticle::mLambda < 0.0f) && (aod::femtouniverseparticle::mAntiLambda > ConfDmesons.minInvMassD0D0barSignal) && (aod::femtouniverseparticle::mAntiLambda < ConfDmesons.maxInvMassD0D0barSignal) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::decayVtxZ < ConfMlProb.confMlProbNonPromptMax); /// Partition with D0bars selected from the side-band (SB) regions (candidates with double mass hypothesis included) - Partition partsD0barsFromSB = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kD0)) && ((aod::femtouniverseparticle::mAntiLambda > ConfDmesons.minInvMassD0D0barLeftSB && aod::femtouniverseparticle::mAntiLambda < ConfDmesons.maxInvMassD0D0barLeftSB) || (aod::femtouniverseparticle::mAntiLambda > ConfDmesons.minInvMassD0D0barRightSB && aod::femtouniverseparticle::mAntiLambda < ConfDmesons.maxInvMassD0D0barRightSB)) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::decayVtxZ < ConfMlProb.confMlProbNonPromptMax); + Partition partsD0barsFromSB = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kD0)) && ((aod::femtouniverseparticle::mAntiLambda > ConfDmesons.minInvMassD0D0barLeftSB && aod::femtouniverseparticle::mAntiLambda < ConfDmesons.maxInvMassD0D0barLeftSB) || (aod::femtouniverseparticle::mAntiLambda > ConfDmesons.minInvMassD0D0barRightSB && aod::femtouniverseparticle::mAntiLambda < ConfDmesons.maxInvMassD0D0barRightSB)) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::decayVtxZ < ConfMlProb.confMlProbNonPromptMax); /// Partition for MC Reco prompt D0/D0bar mesons - Partition partsPromptD0MCReco = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kD0)) && (aod::femtouniverseparticle::mLambda > ConfDmesons.minInvMassD0D0barSignal) && (aod::femtouniverseparticle::mLambda < ConfDmesons.maxInvMassD0D0barSignal) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::tpcNClsFound == ConfDmesons.confD0OriginFlag); - Partition partsPromptD0barMCReco = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kD0)) && (aod::femtouniverseparticle::mAntiLambda > ConfDmesons.minInvMassD0D0barSignal) && (aod::femtouniverseparticle::mAntiLambda < ConfDmesons.maxInvMassD0D0barSignal) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::tpcNClsFound == ConfDmesons.confD0OriginFlag); + Partition partsPromptD0MCReco = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kD0)) && (aod::femtouniverseparticle::mLambda > ConfDmesons.minInvMassD0D0barSignal) && (aod::femtouniverseparticle::mLambda < ConfDmesons.maxInvMassD0D0barSignal) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::tpcNClsFound == ConfDmesons.confD0OriginFlag); + Partition partsPromptD0barMCReco = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kD0)) && (aod::femtouniverseparticle::mAntiLambda > ConfDmesons.minInvMassD0D0barSignal) && (aod::femtouniverseparticle::mAntiLambda < ConfDmesons.maxInvMassD0D0barSignal) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::tpcNClsFound == ConfDmesons.confD0OriginFlag); /// Partition for MC Reco prompt D0/D0bar mesons (sideband candidates) - Partition partsPromptD0MCRecoSB = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kD0)) && ((aod::femtouniverseparticle::mLambda > ConfDmesons.minInvMassD0D0barLeftSB && aod::femtouniverseparticle::mLambda < ConfDmesons.maxInvMassD0D0barLeftSB) || (aod::femtouniverseparticle::mLambda > ConfDmesons.minInvMassD0D0barRightSB && aod::femtouniverseparticle::mLambda < ConfDmesons.maxInvMassD0D0barRightSB)) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::tpcNClsFound == ConfDmesons.confD0OriginFlag); - Partition partsPromptD0barMCRecoSB = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kD0)) && ((aod::femtouniverseparticle::mAntiLambda > ConfDmesons.minInvMassD0D0barLeftSB && aod::femtouniverseparticle::mAntiLambda < ConfDmesons.maxInvMassD0D0barLeftSB) || (aod::femtouniverseparticle::mAntiLambda > ConfDmesons.minInvMassD0D0barRightSB && aod::femtouniverseparticle::mAntiLambda < ConfDmesons.maxInvMassD0D0barRightSB)) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::tpcNClsFound == ConfDmesons.confD0OriginFlag); + Partition partsPromptD0MCRecoSB = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kD0)) && ((aod::femtouniverseparticle::mLambda > ConfDmesons.minInvMassD0D0barLeftSB && aod::femtouniverseparticle::mLambda < ConfDmesons.maxInvMassD0D0barLeftSB) || (aod::femtouniverseparticle::mLambda > ConfDmesons.minInvMassD0D0barRightSB && aod::femtouniverseparticle::mLambda < ConfDmesons.maxInvMassD0D0barRightSB)) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::tpcNClsFound == ConfDmesons.confD0OriginFlag); + Partition partsPromptD0barMCRecoSB = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kD0)) && ((aod::femtouniverseparticle::mAntiLambda > ConfDmesons.minInvMassD0D0barLeftSB && aod::femtouniverseparticle::mAntiLambda < ConfDmesons.maxInvMassD0D0barLeftSB) || (aod::femtouniverseparticle::mAntiLambda > ConfDmesons.minInvMassD0D0barRightSB && aod::femtouniverseparticle::mAntiLambda < ConfDmesons.maxInvMassD0D0barRightSB)) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar) && (aod::femtouniverseparticle::tpcNClsFound == ConfDmesons.confD0OriginFlag); // MC Truth D0/D0bar candidates Partition partsD0MCTruth = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pidCut == static_cast(ConfDmesons.confPDGCodeD0)) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar); Partition partsD0barMCTruth = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pidCut == static_cast(ConfDmesons.confPDGCodeD0bar)) && (aod::femtouniverseparticle::pt > ConfDmesons.confMinPtD0D0bar) && (aod::femtouniverseparticle::pt < ConfDmesons.confMaxPtD0D0bar); /// Partition for D0/D0bar daughters - Partition partsDmesonsChildren = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kD0Child); + Partition partsDmesonsChildren = aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kD0Child); /// Histogramming for particle 1 FemtoUniverseParticleHisto trackHistoPartTrack; @@ -472,8 +472,8 @@ struct FemtoUniversePairTaskTrackD0 { } // D0/D0bar histograms - auto vbins = (std::vector)binsPt; - auto vFivePtBins = (std::vector)binsPtFive; + auto vbins = std::vector(binsPt); + auto vFivePtBins = std::vector(binsPtFive); // Axes for THnSparse const AxisSpec thnAxisNonPromptScore{ConfThnAxes.thnConfigAxisNonPromptScore, "BDT score non-prompt"}; const AxisSpec thnAxisPromptScore{ConfThnAxes.thnConfigAxisPromptScore, "BDT score prompt"}; @@ -1455,7 +1455,7 @@ struct FemtoUniversePairTaskTrackD0 { void processMcTruth(aod::FDParticles const& parts) { for (auto const& part : parts) { - if (part.partType() != uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { + if (part.partType() != static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { continue; } diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackNucleus.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackNucleus.cxx index 037c88b9837..0360c8b9b9b 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackNucleus.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackNucleus.cxx @@ -136,9 +136,9 @@ struct FemtoUniversePairTaskTrackNucleus { } trackfilter; /// Partition for track - Partition partTrack = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackfilter.confChargeTrack && aod::femtouniverseparticle::pt < trackfilter.confPtHighTrack && aod::femtouniverseparticle::pt > trackfilter.confPtLowTrack; + Partition partTrack = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackfilter.confChargeTrack && aod::femtouniverseparticle::pt < trackfilter.confPtHighTrack && aod::femtouniverseparticle::pt > trackfilter.confPtLowTrack; - Partition> partTrackMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackfilter.confChargeTrack && aod::femtouniverseparticle::pt < trackfilter.confPtHighTrack && aod::femtouniverseparticle::pt > trackfilter.confPtLowTrack; + Partition> partTrackMC = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackfilter.confChargeTrack && aod::femtouniverseparticle::pt < trackfilter.confPtHighTrack && aod::femtouniverseparticle::pt > trackfilter.confPtLowTrack; /// Histogramming for track FemtoUniverseParticleHisto trackHistoTrack; @@ -154,9 +154,9 @@ struct FemtoUniversePairTaskTrackNucleus { } nucleusfilter; /// Partition for nucleus - Partition partNucleus = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == nucleusfilter.confChargeNucleus) && aod::femtouniverseparticle::pt < nucleusfilter.confPtHighNucleus && aod::femtouniverseparticle::pt > nucleusfilter.confPtLowNucleus; + Partition partNucleus = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == nucleusfilter.confChargeNucleus) && aod::femtouniverseparticle::pt < nucleusfilter.confPtHighNucleus && aod::femtouniverseparticle::pt > nucleusfilter.confPtLowNucleus; - Partition> partNucleusMC = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == nucleusfilter.confChargeNucleus) && aod::femtouniverseparticle::pt < nucleusfilter.confPtHighNucleus && aod::femtouniverseparticle::pt > nucleusfilter.confPtLowNucleus; + Partition> partNucleusMC = aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == nucleusfilter.confChargeNucleus) && aod::femtouniverseparticle::pt < nucleusfilter.confPtHighNucleus && aod::femtouniverseparticle::pt > nucleusfilter.confPtLowNucleus; /// Histogramming for nucleus FemtoUniverseParticleHisto trackHistoNucleus; @@ -513,14 +513,14 @@ struct FemtoUniversePairTaskTrackNucleus { void doSameEvent(const PartitionType& groupTrack, const PartitionType& groupNucleus, const PartType& parts, float magFieldTesla, int multCol, int pairType, bool /*fillQA*/) { for (const auto& part : groupTrack) { - if (!isParticleNsigma((int8_t)1, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(part, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(part, o2::track::PID::Deuteron), part.tpcSignal())) { + if (!isParticleNsigma(static_cast(1), part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(part, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(part, o2::track::PID::Deuteron), part.tpcSignal())) { continue; } trackHistoTrack.fillQA(part); } for (const auto& part : groupNucleus) { - if (!isParticleNsigma((int8_t)2, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(part, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(part, o2::track::PID::Deuteron), part.tpcSignal())) { + if (!isParticleNsigma(static_cast(2), part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(part, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(part, o2::track::PID::Deuteron), part.tpcSignal())) { continue; } trackHistoNucleus.fillQA(part); @@ -529,11 +529,11 @@ struct FemtoUniversePairTaskTrackNucleus { /// Combinations creation for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupTrack, groupNucleus))) { - if (!isParticleNsigma((int8_t)1, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p1, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(p1, o2::track::PID::Deuteron), p1.tpcSignal())) { + if (!isParticleNsigma(static_cast(1), p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p1, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(p1, o2::track::PID::Deuteron), p1.tpcSignal())) { continue; } - if (!isParticleNsigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p2, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(p2, o2::track::PID::Deuteron), p2.tpcSignal())) { + if (!isParticleNsigma(static_cast(2), p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p2, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(p2, o2::track::PID::Deuteron), p2.tpcSignal())) { continue; } @@ -684,11 +684,11 @@ struct FemtoUniversePairTaskTrackNucleus { { for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupTrack, groupNucleus))) { - if (!isParticleNsigma((int8_t)1, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p1, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(p1, o2::track::PID::Deuteron), p1.tpcSignal())) { + if (!isParticleNsigma(static_cast(1), p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p1, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(p1, o2::track::PID::Deuteron), p1.tpcSignal())) { continue; } - if (!isParticleNsigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p2, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(p2, o2::track::PID::Deuteron), p2.tpcSignal())) { + if (!isParticleNsigma(static_cast(2), p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(p2, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(p2, o2::track::PID::Deuteron), p2.tpcSignal())) { continue; } diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx index aa6e8bb7cc8..fe88ebcf62d 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx @@ -137,12 +137,12 @@ struct FemtoUniversePairTaskTrackPhi { Configurable confTrackUseRun3PIDforKaons{"confTrackUseRun3PIDforKaons", true, "Use Run3 PID for kaons from Veronika Barbasova's AN (https://alice-notes.web.cern.ch/node/1758). If this is on the other PID methods are ignored for kaons."}; /// Partitions for the track (particle 1) - Partition partsTrack = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && + Partition partsTrack = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == confTrackSign) && (aod::femtouniverseparticle::pt > confTrackPtLow) && (aod::femtouniverseparticle::pt < confTrackPtHigh); - Partition partsTrackMCReco = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && + Partition partsTrackMCReco = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == confTrackSign) && (aod::femtouniverseparticle::pt > confTrackPtLow) && (aod::femtouniverseparticle::pt < confTrackPtHigh); @@ -154,25 +154,25 @@ struct FemtoUniversePairTaskTrackPhi { Configurable confInvMassUpLimitPhi{"confInvMassUpLimitPhi", 1.027, "Upper limit of the Phi invariant mass"}; /// Partitions for the Phi meson (particle 2) - Partition partsPhi = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kPhi)) && + Partition partsPhi = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kPhi)) && (aod::femtouniverseparticle::pt > confPhiPtLow) && (aod::femtouniverseparticle::pt < confPhiPtHigh) && (aod::femtouniverseparticle::tempFitVar > confInvMassLowLimitPhi) && (aod::femtouniverseparticle::tempFitVar < confInvMassUpLimitPhi); - Partition partsPhiMCReco = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kPhi)) && + Partition partsPhiMCReco = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kPhi)) && (aod::femtouniverseparticle::pt > confPhiPtLow) && (aod::femtouniverseparticle::pt < confPhiPtHigh) && (aod::femtouniverseparticle::tempFitVar > confInvMassLowLimitPhi) && (aod::femtouniverseparticle::tempFitVar < confInvMassUpLimitPhi); /// Partitions for Phi daughters kPhiChild - Partition partsPhiDaugh = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kPhiChild)); - Partition> partsPhiDaughMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kPhiChild)); + Partition partsPhiDaugh = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kPhiChild)); + Partition> partsPhiDaughMC = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kPhiChild)); // Partition for K+K- minv - Partition partsKaons = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)); - Partition> partsKaonsMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)); + Partition partsKaons = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)); + Partition> partsKaonsMC = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)); /// Histogramming for particle 1 FemtoUniverseParticleHisto trackHistoPartTrack; @@ -668,7 +668,7 @@ struct FemtoUniversePairTaskTrackPhi { void processMCTruth(aod::FDParticles const& parts) { for (auto const& part : parts) { - if (part.partType() != uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { + if (part.partType() != static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { continue; } diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack.cxx index 4b410fb8fca..dc575cd116b 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack.cxx @@ -81,8 +81,8 @@ struct FemtoUniversePairTaskTrackTrack { Configurable confPIDPartOne{"confPIDPartOne", 2, "Particle 1 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector>int>> /// Partition for particle 1 - Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && ((aod::femtouniverseparticle::cut & confCutPartOne) == confCutPartOne); - Partition> partsOneMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && ((aod::femtouniverseparticle::cut & confCutPartOne) == confCutPartOne); + Partition partsOne = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && ((aod::femtouniverseparticle::cut & confCutPartOne) == confCutPartOne); + Partition> partsOneMC = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && ((aod::femtouniverseparticle::cut & confCutPartOne) == confCutPartOne); /// Histogramming for particle 1 FemtoUniverseParticleHisto trackHistoPartOne; @@ -94,10 +94,10 @@ struct FemtoUniversePairTaskTrackTrack { Configurable confPIDPartTwo{"confPIDPartTwo", 2, "Particle 2 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector> /// Partition for particle 2 - Partition partsTwo = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && + Partition partsTwo = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && // (aod::femtouniverseparticle::pt < cfgCutTable->get("PartTwo", "MaxPt")) && ((aod::femtouniverseparticle::cut & confCutPartTwo) == confCutPartTwo); - Partition> partsTwoMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && + Partition> partsTwoMC = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && ((aod::femtouniverseparticle::cut & confCutPartTwo) == confCutPartTwo); /// Histogramming for particle 2 diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack3DMultKtExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack3DMultKtExtended.cxx index def18f1deb1..d75d04567ff 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack3DMultKtExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack3DMultKtExtended.cxx @@ -117,9 +117,9 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { } trackonefilter; /// Partition for particle 1 - Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; + Partition partsOne = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; - Partition partsOneMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; + Partition partsOneMC = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; // /// Histogramming for particle 1 @@ -137,9 +137,9 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { } tracktwofilter; /// Partition for particle 2 - Partition partsTwo = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; + Partition partsTwo = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; - Partition partsTwoMC = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; + Partition partsTwoMC = aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; /// Histogramming for particle 2 FemtoUniverseParticleHisto trackHistoPartTwo; @@ -477,7 +477,7 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { /// Histogramming same event if ((ContType == 1 || ContType == 2) && fillQA) { for (const auto& part : groupPartsOne) { - if (!IsParticleNSigma((int8_t)1, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(1), part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { continue; } trackHistoPartOne.fillQA(part); @@ -487,7 +487,7 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { if ((ContType == 1 || ContType == 3) && fillQA) { for (const auto& part : groupPartsTwo) { - if (!IsParticleNSigma((int8_t)2, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(2), part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { continue; } trackHistoPartTwo.fillQA(part); @@ -499,11 +499,11 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { /// Now build the combinations for non-identical particle pairs for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - if (!IsParticleNSigma((int8_t)1, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(1), p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { continue; } - if (!IsParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(2), p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { continue; } @@ -532,11 +532,11 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { double rand; for (const auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsOne))) { - if (!IsParticleNSigma((int8_t)2, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(2), p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { continue; } - if (!IsParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(2), p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { continue; } @@ -723,11 +723,11 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - if (!IsParticleNSigma((int8_t)2, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(2), p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { continue; } - if (!IsParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(2), p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { continue; } diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackExtended.cxx index fe90355be5b..7e1144e4881 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackExtended.cxx @@ -111,8 +111,8 @@ struct FemtoUniversePairTaskTrackTrackExtended { } trackonefilter; /// Partition for particle 1 - Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackonefilter.confChargePart1 && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; - Partition> partsOneMCReco = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackonefilter.confChargePart1 && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; + Partition partsOne = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackonefilter.confChargePart1 && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; + Partition> partsOneMCReco = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackonefilter.confChargePart1 && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; // && ((aod::femtouniverseparticle::cut & confCutPartOne) == confCutPartOne); Partition> partsOneMCTruth = @@ -134,9 +134,9 @@ struct FemtoUniversePairTaskTrackTrackExtended { Configurable confChargePart2{"confChargePart2", -1, "Particle 2 sign"}; } tracktwofilter; /// Partition for particle 2 - Partition partsTwo = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == tracktwofilter.confChargePart2) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; + Partition partsTwo = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == tracktwofilter.confChargePart2) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; - Partition> partsTwoMCReco = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == tracktwofilter.confChargePart2) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; + Partition> partsTwoMCReco = aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == tracktwofilter.confChargePart2) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; Partition> partsTwoMCTruth = aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack) && @@ -436,7 +436,7 @@ struct FemtoUniversePairTaskTrackTrackExtended { // } if (trackonefilter.confIsTrackOneIdentified) { - if (!isParticleNSigma((int8_t)1, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { + if (!isParticleNSigma(static_cast(1), part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { continue; } } @@ -464,7 +464,7 @@ struct FemtoUniversePairTaskTrackTrackExtended { // } if (tracktwofilter.confIsTrackTwoIdentified) { - if (!isParticleNSigma((int8_t)2, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { + if (!isParticleNSigma(static_cast(2), part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { continue; } } @@ -499,13 +499,13 @@ struct FemtoUniversePairTaskTrackTrackExtended { // } if (trackonefilter.confIsTrackOneIdentified) { - if (!isParticleNSigma((int8_t)1, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { + if (!isParticleNSigma(static_cast(1), p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { continue; } } if (tracktwofilter.confIsTrackTwoIdentified) { - if (!isParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { + if (!isParticleNSigma(static_cast(2), p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { continue; } } @@ -560,13 +560,13 @@ struct FemtoUniversePairTaskTrackTrackExtended { // } if (trackonefilter.confIsTrackOneIdentified) { - if (!isParticleNSigma((int8_t)1, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { + if (!isParticleNSigma(static_cast(1), p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { continue; } } if (tracktwofilter.confIsTrackTwoIdentified) { - if (!isParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { + if (!isParticleNSigma(static_cast(2), p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { continue; } } @@ -678,13 +678,13 @@ struct FemtoUniversePairTaskTrackTrackExtended { // continue; // } if (trackonefilter.confIsTrackOneIdentified) { - if (!isParticleNSigma((int8_t)1, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { + if (!isParticleNSigma(static_cast(1), p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { continue; } } if (tracktwofilter.confIsTrackTwoIdentified) { - if (!isParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { + if (!isParticleNSigma(static_cast(2), p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { continue; } } diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMC.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMC.cxx index b0802f6521b..a6dff3513e9 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMC.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMC.cxx @@ -110,9 +110,9 @@ struct femtoUniversePairTaskTrackTrackMC { } trackonefilter; /// Partition for particle 1 - Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackonefilter.ConfChargePart1 && aod::femtouniverseparticle::pt < trackonefilter.ConfPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.ConfPtLowPart1; + Partition partsOne = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackonefilter.ConfChargePart1 && aod::femtouniverseparticle::pt < trackonefilter.ConfPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.ConfPtLowPart1; - Partition> partsOneMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackonefilter.ConfChargePart1 && aod::femtouniverseparticle::pt < trackonefilter.ConfPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.ConfPtLowPart1; + Partition> partsOneMC = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackonefilter.ConfChargePart1 && aod::femtouniverseparticle::pt < trackonefilter.ConfPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.ConfPtLowPart1; // /// Histogramming for particle 1 @@ -130,9 +130,9 @@ struct femtoUniversePairTaskTrackTrackMC { } tracktwofilter; /// Partition for particle 2 - Partition partsTwo = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == tracktwofilter.ConfChargePart2) && aod::femtouniverseparticle::pt < tracktwofilter.ConfPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.ConfPtLowPart2; + Partition partsTwo = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == tracktwofilter.ConfChargePart2) && aod::femtouniverseparticle::pt < tracktwofilter.ConfPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.ConfPtLowPart2; - Partition> partsTwoMC = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == tracktwofilter.ConfChargePart2) && aod::femtouniverseparticle::pt < tracktwofilter.ConfPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.ConfPtLowPart2; + Partition> partsTwoMC = aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == tracktwofilter.ConfChargePart2) && aod::femtouniverseparticle::pt < tracktwofilter.ConfPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.ConfPtLowPart2; /// Histogramming for particle 2 FemtoUniverseParticleHisto trackHistoPartTwo; @@ -434,7 +434,7 @@ struct femtoUniversePairTaskTrackTrackMC { /// Histogramming same event if ((ContType == 1 || ContType == 2) && fillQA) { for (auto& part : groupPartsOne) { - if (!IsParticleNSigma((int8_t)1, part.pt(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(1), part.pt(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { continue; } trackHistoPartOne.fillQA(part); @@ -443,7 +443,7 @@ struct femtoUniversePairTaskTrackTrackMC { if ((ContType == 1 || ContType == 3) && fillQA) { for (auto& part : groupPartsTwo) { - if (!IsParticleNSigma((int8_t)2, part.pt(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(2), part.pt(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { continue; } trackHistoPartTwo.fillQA(part); @@ -455,11 +455,11 @@ struct femtoUniversePairTaskTrackTrackMC { /// Now build the combinations for non-identical particle pairs for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - if (!IsParticleNSigma((int8_t)1, p1.pt(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(1), p1.pt(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { continue; } - if (!IsParticleNSigma((int8_t)2, p2.pt(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(2), p2.pt(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { continue; } @@ -487,11 +487,11 @@ struct femtoUniversePairTaskTrackTrackMC { /// Now build the combinations for identical particles pairs for (auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsOne))) { - if (!IsParticleNSigma((int8_t)2, p1.pt(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(2), p1.pt(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { continue; } - if (!IsParticleNSigma((int8_t)2, p2.pt(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(2), p2.pt(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { continue; } @@ -601,11 +601,11 @@ struct femtoUniversePairTaskTrackTrackMC { for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - if (!IsParticleNSigma((int8_t)2, p1.pt(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(2), p1.pt(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { continue; } - if (!IsParticleNSigma((int8_t)2, p2.pt(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { + if (!IsParticleNSigma(static_cast(2), p2.pt(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { continue; } diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMcTruth.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMcTruth.cxx index 297cc03cfbd..f6ecfa0f6b4 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMcTruth.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMcTruth.cxx @@ -63,7 +63,7 @@ struct FemtoUniversePairTaskTrackTrackMcTruth { Configurable confPtHighPart1{"confPtHighPart1", 2.5, "Higher limit for Pt for the first particle"}; /// Partition for particle 1 - Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && + Partition partsOne = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < confPtHighPart1) && (aod::femtouniverseparticle::pt > confPtLowPart1) && (nabs(aod::femtouniverseparticle::eta) < confEtaMax); /// Histogramming for particle 1 @@ -77,7 +77,7 @@ struct FemtoUniversePairTaskTrackTrackMcTruth { Configurable confPtHighPart2{"confPtHighPart2", 2.5, "Higher limit for Pt for the second particle"}; /// Partition for particle 2 - Partition partsTwo = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && + Partition partsTwo = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < confPtHighPart2) && (aod::femtouniverseparticle::pt > confPtLowPart2) && (nabs(aod::femtouniverseparticle::eta) < confEtaMax); /// Histogramming for particle 2 diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx index e1f2f92f773..c98b08fd906 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx @@ -137,16 +137,16 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { } trackonefilter; /// Partition for particle 1 - Partition partsOne = (nabs(aod::track::dcaXY) < (twotracksconfigs.confDcaXYCustom1FilterCut + twotracksconfigs.confDcaXYCustom2FilterCut / aod::femtouniverseparticle::pt)) && (aod::femtouniverseparticle::tpcNClsFound) > as(twotracksconfigs.confTrkTPCnclsMin) && (aod::femtouniverseparticle::tpcNClsCrossedRows) > as(twotracksconfigs.confTrkTPCcRowsMin) && (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt trackonefilter.confpLowPart1; - Partition partsOneITS = (nabs(aod::track::dcaXY) < (twotracksconfigs.confDcaXYCustom1FilterCut + twotracksconfigs.confDcaXYCustom2FilterCut / aod::femtouniverseparticle::pt)) && (aod::femtouniverseparticle::tpcNClsFound) > as(twotracksconfigs.confTrkTPCnclsMin) && (aod::femtouniverseparticle::tpcNClsCrossedRows) > as(twotracksconfigs.confTrkTPCcRowsMin) && (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt trackonefilter.confpLowPart1; + Partition partsOne = (nabs(aod::track::dcaXY) < (twotracksconfigs.confDcaXYCustom1FilterCut + twotracksconfigs.confDcaXYCustom2FilterCut / aod::femtouniverseparticle::pt)) && (aod::femtouniverseparticle::tpcNClsFound) > as(twotracksconfigs.confTrkTPCnclsMin) && (aod::femtouniverseparticle::tpcNClsCrossedRows) > as(twotracksconfigs.confTrkTPCcRowsMin) && (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt trackonefilter.confpLowPart1; + Partition partsOneITS = (nabs(aod::track::dcaXY) < (twotracksconfigs.confDcaXYCustom1FilterCut + twotracksconfigs.confDcaXYCustom2FilterCut / aod::femtouniverseparticle::pt)) && (aod::femtouniverseparticle::tpcNClsFound) > as(twotracksconfigs.confTrkTPCnclsMin) && (aod::femtouniverseparticle::tpcNClsCrossedRows) > as(twotracksconfigs.confTrkTPCcRowsMin) && (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt trackonefilter.confpLowPart1; - Partition partsOneSigma = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confpLowPart1; - Partition partsOneSigmaITS = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confpLowPart1; + Partition partsOneSigma = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confpLowPart1; + Partition partsOneSigmaITS = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confpLowPart1; - Partition partsOneMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confpLowPart1; - Partition partsOneMCITS = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confpLowPart1; + Partition partsOneMC = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confpLowPart1; + Partition partsOneMCITS = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confpLowPart1; - Partition partsOneMCTruth = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confpLowPart1; + Partition partsOneMCTruth = aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confpLowPart1; /// Histogramming for particle 1 FemtoUniverseParticleHisto trackHistoPartOne; @@ -160,16 +160,16 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { } tracktwofilter; /// Partition for particle 2 - Partition partsTwo = (nabs(aod::track::dcaXY) < (twotracksconfigs.confDcaXYCustom1FilterCut + twotracksconfigs.confDcaXYCustom2FilterCut / aod::femtouniverseparticle::pt)) && (aod::femtouniverseparticle::tpcNClsFound > as(twotracksconfigs.confTrkTPCnclsMin)) && aod::femtouniverseparticle::tpcNClsCrossedRows > as(twotracksconfigs.confTrkTPCcRowsMin) && (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2) && aod::femtouniverseparticle::pt tracktwofilter.confpLowPart2; - Partition partsTwoITS = (nabs(aod::track::dcaXY) < (twotracksconfigs.confDcaXYCustom1FilterCut + twotracksconfigs.confDcaXYCustom2FilterCut / aod::femtouniverseparticle::pt)) && (aod::femtouniverseparticle::tpcNClsFound > as(twotracksconfigs.confTrkTPCnclsMin)) && aod::femtouniverseparticle::tpcNClsCrossedRows > as(twotracksconfigs.confTrkTPCcRowsMin) && (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2) && aod::femtouniverseparticle::pt tracktwofilter.confpLowPart2; + Partition partsTwo = (nabs(aod::track::dcaXY) < (twotracksconfigs.confDcaXYCustom1FilterCut + twotracksconfigs.confDcaXYCustom2FilterCut / aod::femtouniverseparticle::pt)) && (aod::femtouniverseparticle::tpcNClsFound > as(twotracksconfigs.confTrkTPCnclsMin)) && aod::femtouniverseparticle::tpcNClsCrossedRows > as(twotracksconfigs.confTrkTPCcRowsMin) && (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2) && aod::femtouniverseparticle::pt tracktwofilter.confpLowPart2; + Partition partsTwoITS = (nabs(aod::track::dcaXY) < (twotracksconfigs.confDcaXYCustom1FilterCut + twotracksconfigs.confDcaXYCustom2FilterCut / aod::femtouniverseparticle::pt)) && (aod::femtouniverseparticle::tpcNClsFound > as(twotracksconfigs.confTrkTPCnclsMin)) && aod::femtouniverseparticle::tpcNClsCrossedRows > as(twotracksconfigs.confTrkTPCcRowsMin) && (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2) && aod::femtouniverseparticle::pt tracktwofilter.confpLowPart2; - Partition partsTwoSigma = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confpLowPart2; - Partition partsTwoSigmaITS = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confpLowPart2; + Partition partsTwoSigma = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confpLowPart2; + Partition partsTwoSigmaITS = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confpLowPart2; - Partition partsTwoMC = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confpLowPart2; - Partition partsTwoMCITS = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confpLowPart2; + Partition partsTwoMC = aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confpLowPart2; + Partition partsTwoMCITS = aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confpLowPart2; - Partition partsTwoMCTruth = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confpLowPart2; + Partition partsTwoMCTruth = aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confpLowPart2; /// Histogramming for particle 2 FemtoUniverseParticleHisto trackHistoPartTwo; @@ -608,7 +608,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { /// Histogramming same event if ((pairType == type1 || pairType == type2) && fillQA) { for (const auto& part : groupPartsOne) { - if (!isParticleNSigma((int8_t)1, part)) { + if (!isParticleNSigma(static_cast(1), part)) { continue; } trackHistoPartOne.fillQA(part); @@ -617,7 +617,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { if ((pairType == type1 || pairType == type3) && fillQA) { for (const auto& part : groupPartsTwo) { - if (!isParticleNSigma((int8_t)2, part)) { + if (!isParticleNSigma(static_cast(2), part)) { continue; } trackHistoPartTwo.fillQA(part); @@ -629,11 +629,11 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { /// Now build the combinations for non-identical particle pairs for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - if (!isParticleNSigma((int8_t)1, p1)) { + if (!isParticleNSigma(static_cast(1), p1)) { continue; } - if (!isParticleNSigma((int8_t)2, p2)) { + if (!isParticleNSigma(static_cast(2), p2)) { continue; } @@ -678,11 +678,11 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { /// Now build the combinations for identical particles pairs for (const auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsOne))) { - if (!isParticleNSigma((int8_t)2, p1)) { + if (!isParticleNSigma(static_cast(2), p1)) { continue; } - if (!isParticleNSigma((int8_t)2, p2)) { + if (!isParticleNSigma(static_cast(2), p2)) { continue; } @@ -778,7 +778,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { float const multCol = col.multV0M(); for (const auto& part : thegroupPartsOne) { - if (!isParticleNSigma((int8_t)1, part)) { + if (!isParticleNSigma(static_cast(1), part)) { continue; } @@ -790,7 +790,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { if (!isPairIdentical) { // fill second for (const auto& part : thegroupPartsTwo) { - if (!isParticleNSigma((int8_t)2, part)) { + if (!isParticleNSigma(static_cast(2), part)) { continue; } trackHistoPartTwo.fillQA(part); @@ -817,7 +817,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { float const multCol = col.multV0M(); for (const auto& part : thegroupPartsOne) { - if (!isParticleNSigma((int8_t)1, part)) { + if (!isParticleNSigma(static_cast(1), part)) { continue; } @@ -829,7 +829,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { if (!isPairIdentical) { // fill second for (const auto& part : thegroupPartsTwo) { - if (!isParticleNSigma((int8_t)2, part)) { + if (!isParticleNSigma(static_cast(2), part)) { continue; } trackHistoPartTwo.fillQA(part); @@ -941,11 +941,11 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { { for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - if (!isParticleNSigma((int8_t)2, p1)) { + if (!isParticleNSigma(static_cast(2), p1)) { continue; } - if (!isParticleNSigma((int8_t)2, p2)) { + if (!isParticleNSigma(static_cast(2), p2)) { continue; } @@ -1157,7 +1157,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { template void doFractions(PartType const& p1, PartType const& p2, PartsType const& parts, PartsMcType const& mparts, float magFieldTesla, int partType) { - if (!isParticleNSigma((int8_t)2, p1) || !isParticleNSigma((int8_t)2, p2)) { + if (!isParticleNSigma(static_cast(2), p1) || !isParticleNSigma(static_cast(2), p2)) { return; } diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx index 3f622883254..11167f9608d 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx @@ -199,9 +199,9 @@ struct FemtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } trackonefilter; /// Partition for particle 1 - Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; - Partition partsOneMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; - Partition partsOneMCTruth = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack); + Partition partsOne = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; + Partition partsOneMC = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; + Partition partsOneMCTruth = aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack); // @@ -220,9 +220,9 @@ struct FemtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } tracktwofilter; /// Partition for particle 2 - Partition partsTwo = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; - Partition partsTwoMC = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; - Partition partsTwoMCTruth = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack); + Partition partsTwo = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; + Partition partsTwoMC = aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; + Partition partsTwoMCTruth = aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack); /// Histogramming for particle 2 FemtoUniverseParticleHisto trackHistoPartTwo; @@ -899,7 +899,7 @@ struct FemtoUniversePairTaskTrackTrackSpherHarMultKtExtended { /// Histogramming same event if ((cfgProcessPM || cfgProcessPP) && fillQA) { for (const auto& part : groupPartsOne) { - if (part.partType() == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { + if (part.partType() == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { int pdgCode = static_cast(part.tempFitVar()); const auto& pdgParticle = pdg->GetParticle(pdgCode); if (pdgParticle) { @@ -911,7 +911,7 @@ struct FemtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if ((cfgProcessPM || cfgProcessMM) && fillQA) { for (const auto& part : groupPartsTwo) { - if (part.partType() == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { + if (part.partType() == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { int pdgCode = static_cast(part.tempFitVar()); const auto& pdgParticle = pdg->GetParticle(pdgCode); if (pdgParticle) { diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtendedItsPid.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtendedItsPid.cxx index 10ababfb0a5..863e81b502e 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtendedItsPid.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtendedItsPid.cxx @@ -194,7 +194,7 @@ struct FemtoUniversePairTaskTrackTrackSpherHarMultKtExtendedItsPid { } trackonefilter; /// Partition for particle 1 - Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; + Partition partsOne = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == as(trackonefilter.confChargePart1) && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; /// Histogramming for particle 1 FemtoUniverseParticleHisto trackHistoPartOne; @@ -211,7 +211,7 @@ struct FemtoUniversePairTaskTrackTrackSpherHarMultKtExtendedItsPid { } tracktwofilter; /// Partition for particle 2 - Partition partsTwo = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; + Partition partsTwo = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(tracktwofilter.confChargePart2)) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; /// Histogramming for particle 2 FemtoUniverseParticleHisto trackHistoPartTwo; diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.cxx index 1e3738446d9..12226e6a141 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.cxx @@ -119,14 +119,14 @@ struct FemtoUniversePairTaskTrackV0Extended { using FilteredFDCollision = FilteredFDCollisions::iterator; /// Partition for particle 1 using extended table (track) - Partition partsOneFull = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(ConfTrkSelection.confChargePart1)) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < ConfTrkSelection.confHPtPart1) && (aod::femtouniverseparticle::pt > ConfTrkSelection.confLPtPart1) && (nabs(aod::track::dcaXY) < (ConfTrkSelection.confDcaXYCustom1FilterCut + ConfTrkSelection.confDcaXYCustom2FilterCut / aod::femtouniverseparticle::pt)) && (aod::femtouniverseparticle::tpcNClsFound) > as(ConfTrkSelection.confTrkTPCnclsMin) && (aod::femtouniverseparticle::tpcNClsCrossedRows) > as(ConfTrkSelection.confTrkTPCcRowsMin); - Partition partsOneMCFull = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < ConfTrkSelection.confHPtPart1) && (aod::femtouniverseparticle::pt > ConfTrkSelection.confLPtPart1); - Partition partsOneMCRecoFull = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(ConfTrkSelection.confChargePart1)) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < ConfTrkSelection.confHPtPart1) && (aod::femtouniverseparticle::pt > ConfTrkSelection.confLPtPart1); + Partition partsOneFull = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(ConfTrkSelection.confChargePart1)) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < ConfTrkSelection.confHPtPart1) && (aod::femtouniverseparticle::pt > ConfTrkSelection.confLPtPart1) && (nabs(aod::track::dcaXY) < (ConfTrkSelection.confDcaXYCustom1FilterCut + ConfTrkSelection.confDcaXYCustom2FilterCut / aod::femtouniverseparticle::pt)) && (aod::femtouniverseparticle::tpcNClsFound) > as(ConfTrkSelection.confTrkTPCnclsMin) && (aod::femtouniverseparticle::tpcNClsCrossedRows) > as(ConfTrkSelection.confTrkTPCcRowsMin); + Partition partsOneMCFull = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < ConfTrkSelection.confHPtPart1) && (aod::femtouniverseparticle::pt > ConfTrkSelection.confLPtPart1); + Partition partsOneMCRecoFull = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == as(ConfTrkSelection.confChargePart1)) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < ConfTrkSelection.confHPtPart1) && (aod::femtouniverseparticle::pt > ConfTrkSelection.confLPtPart1); /// Partition for particle 1 without extended table (track) - Partition partsOneBasic = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::mAntiLambda == as(ConfTrkSelection.confChargePart1)) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < ConfTrkSelection.confHPtPart1) && (aod::femtouniverseparticle::pt > ConfTrkSelection.confLPtPart1); - Partition partsOneMCBasic = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < ConfTrkSelection.confHPtPart1) && (aod::femtouniverseparticle::pt > ConfTrkSelection.confLPtPart1); - Partition partsOneMCRecoBasic = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::mAntiLambda == as(ConfTrkSelection.confChargePart1)) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < ConfTrkSelection.confHPtPart1) && (aod::femtouniverseparticle::pt > ConfTrkSelection.confLPtPart1); + Partition partsOneBasic = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::mAntiLambda == as(ConfTrkSelection.confChargePart1)) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < ConfTrkSelection.confHPtPart1) && (aod::femtouniverseparticle::pt > ConfTrkSelection.confLPtPart1); + Partition partsOneMCBasic = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < ConfTrkSelection.confHPtPart1) && (aod::femtouniverseparticle::pt > ConfTrkSelection.confLPtPart1); + Partition partsOneMCRecoBasic = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::mAntiLambda == as(ConfTrkSelection.confChargePart1)) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < ConfTrkSelection.confHPtPart1) && (aod::femtouniverseparticle::pt > ConfTrkSelection.confLPtPart1); /// Histogramming for particle 1 FemtoUniverseParticleHisto trackHistoPartOnePos; @@ -167,14 +167,14 @@ struct FemtoUniversePairTaskTrackV0Extended { Partition partsTwoFull = (aod::femtouniverseparticle::decayVtxX < additionalcutsV0.confV0MaxRadius && aod::femtouniverseparticle::decayVtxY < additionalcutsV0.confV0MaxRadius && aod::femtouniverseparticle::decayVtxZ < additionalcutsV0.confV0MaxRadius && aod::femtouniverseparticle::transRadius > additionalcutsV0.confV0MinTransRadius && aod::femtouniverseparticle::daughDCA < additionalcutsV0.confV0DaughMaxDCA && aod::femtouniverseparticle::tempFitVar > additionalcutsV0.confV0MinCosPA && - aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kV0) && (aod::femtouniverseparticle::pt < ConfV0Selection.confHPtPart2) && (aod::femtouniverseparticle::pt > ConfV0Selection.confLPtPart2)); - Partition partsTwoMCFull = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < ConfV0Selection.confHPtPart2) && (aod::femtouniverseparticle::pt > ConfV0Selection.confLPtPart2); - Partition partsTwoMCRecoFull = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kV0)) && (aod::femtouniverseparticle::pt < ConfV0Selection.confHPtPart2) && (aod::femtouniverseparticle::pt > ConfV0Selection.confLPtPart2); + aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kV0) && (aod::femtouniverseparticle::pt < ConfV0Selection.confHPtPart2) && (aod::femtouniverseparticle::pt > ConfV0Selection.confLPtPart2)); + Partition partsTwoMCFull = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < ConfV0Selection.confHPtPart2) && (aod::femtouniverseparticle::pt > ConfV0Selection.confLPtPart2); + Partition partsTwoMCRecoFull = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kV0)) && (aod::femtouniverseparticle::pt < ConfV0Selection.confHPtPart2) && (aod::femtouniverseparticle::pt > ConfV0Selection.confLPtPart2); /// Partition for particle 2 without extended table - Partition partsTwoBasic = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kV0)) && (aod::femtouniverseparticle::pt < ConfV0Selection.confHPtPart2) && (aod::femtouniverseparticle::pt > ConfV0Selection.confLPtPart2); - Partition partsTwoMCBasic = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < ConfV0Selection.confHPtPart2) && (aod::femtouniverseparticle::pt > ConfV0Selection.confLPtPart2); - Partition partsTwoMCRecoBasic = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kV0)) && (aod::femtouniverseparticle::pt < ConfV0Selection.confHPtPart2) && (aod::femtouniverseparticle::pt > ConfV0Selection.confLPtPart2); + Partition partsTwoBasic = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kV0)) && (aod::femtouniverseparticle::pt < ConfV0Selection.confHPtPart2) && (aod::femtouniverseparticle::pt > ConfV0Selection.confLPtPart2); + Partition partsTwoMCBasic = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < ConfV0Selection.confHPtPart2) && (aod::femtouniverseparticle::pt > ConfV0Selection.confLPtPart2); + Partition partsTwoMCRecoBasic = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kV0)) && (aod::femtouniverseparticle::pt < ConfV0Selection.confHPtPart2) && (aod::femtouniverseparticle::pt > ConfV0Selection.confLPtPart2); /// Histogramming for particle 2 FemtoUniverseParticleHisto trackHistoPartTwo; @@ -1496,7 +1496,7 @@ struct FemtoUniversePairTaskTrackV0Extended { void processMCTruth(aod::FDParticles const& parts) { for (const auto& part : parts) { - if (part.partType() != uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { + if (part.partType() != static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) { continue; } diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Helicity.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Helicity.cxx index f7501d0388c..4ba9c2f9839 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Helicity.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Helicity.cxx @@ -103,9 +103,9 @@ struct FemtoUniversePairTaskTrackV0Helicity { using FilteredFDCollision = FilteredFDCollisions::iterator; /// Partitioning for particle 1 - Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == trackconfigs.confChargePart1) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < trackconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackconfigs.confLPtPart1); - Partition partsOneMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < trackconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackconfigs.confLPtPart1); - Partition partsOneMCReco = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == trackconfigs.confChargePart1) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < trackconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackconfigs.confLPtPart1); + Partition partsOne = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == trackconfigs.confChargePart1) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < trackconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackconfigs.confLPtPart1); + Partition partsOneMC = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < trackconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackconfigs.confLPtPart1); + Partition partsOneMCReco = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == trackconfigs.confChargePart1) && (nabs(aod::femtouniverseparticle::eta) < confEta) && (aod::femtouniverseparticle::pt < trackconfigs.confHPtPart1) && (aod::femtouniverseparticle::pt > trackconfigs.confLPtPart1); /// Histogramming for particle 1 FemtoUniverseParticleHisto trackHistoPartOnePos; @@ -131,10 +131,10 @@ struct FemtoUniversePairTaskTrackV0Helicity { } V0configs; /// Partitioning for particle 2 - Partition partsTwo = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kV0)) && (aod::femtouniverseparticle::pt < V0configs.confHPtPart2) && (aod::femtouniverseparticle::pt > V0configs.confLPtPart2); - Partition partsTwoMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < V0configs.confHPtPart2) && (aod::femtouniverseparticle::pt > V0configs.confLPtPart2); - Partition partsTwoMCReco = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kV0)) && (aod::femtouniverseparticle::pt < V0configs.confHPtPart2) && (aod::femtouniverseparticle::pt > V0configs.confLPtPart2); - Partition partsTwoMCTruth = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < V0configs.confHPtPart2) && (aod::femtouniverseparticle::pt > V0configs.confLPtPart2); + Partition partsTwo = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kV0)) && (aod::femtouniverseparticle::pt < V0configs.confHPtPart2) && (aod::femtouniverseparticle::pt > V0configs.confLPtPart2); + Partition partsTwoMC = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < V0configs.confHPtPart2) && (aod::femtouniverseparticle::pt > V0configs.confLPtPart2); + Partition partsTwoMCReco = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kV0)) && (aod::femtouniverseparticle::pt < V0configs.confHPtPart2) && (aod::femtouniverseparticle::pt > V0configs.confLPtPart2); + Partition partsTwoMCTruth = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) && (aod::femtouniverseparticle::pt < V0configs.confHPtPart2) && (aod::femtouniverseparticle::pt > V0configs.confLPtPart2); /// Histogramming for particle 2 /// Track-V0 @@ -1159,7 +1159,7 @@ struct FemtoUniversePairTaskTrackV0Helicity { eventHisto.fillQA(col); auto groupPartsTwo = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache); for (const auto& part : groupPartsTwo) { - if (part.partType() != uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) + if (part.partType() != static_cast(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) continue; int pdgCode = static_cast(part.tempFitVar()); diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskV0CascadeExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskV0CascadeExtended.cxx index 47666260743..354accfa970 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskV0CascadeExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskV0CascadeExtended.cxx @@ -115,16 +115,16 @@ struct FemtoUniversePairTaskV0CascadeExtended { ConfigurableAxis confV0TempFitVarBins{"confV0TempFitVarBins", {300, 0.95, 1.}, "V0: binning of the TempFitVar in the pT vs. TempFitVar plot"}; /// Partition for particle 1 (V0) - Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kV0)) && (aod::femtouniverseparticle::pt < confHPtPart1) && (aod::femtouniverseparticle::pt > confLPtPart1); + Partition partsOne = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kV0)) && (aod::femtouniverseparticle::pt < confHPtPart1) && (aod::femtouniverseparticle::pt > confLPtPart1); /// Partition for particle 1 (V0) without extended table - Partition partsOnebitmask = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kV0)) && (aod::femtouniverseparticle::pt < confHPtPart1) && (aod::femtouniverseparticle::pt > confLPtPart1); + Partition partsOnebitmask = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kV0)) && (aod::femtouniverseparticle::pt < confHPtPart1) && (aod::femtouniverseparticle::pt > confLPtPart1); /// Partition for particle 2 (Cascade) - Partition partsTwo = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kCascade)) && (aod::femtouniverseparticle::pt < confHPtPart2) && (aod::femtouniverseparticle::pt > confLPtPart2); + Partition partsTwo = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kCascade)) && (aod::femtouniverseparticle::pt < confHPtPart2) && (aod::femtouniverseparticle::pt > confLPtPart2); /// Partition for particle 2 (Cascade) without extended table - Partition partsTwobitmask = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kCascade)) && (aod::femtouniverseparticle::pt < confHPtPart2) && (aod::femtouniverseparticle::pt > confLPtPart2); + Partition partsTwobitmask = (aod::femtouniverseparticle::partType == static_cast(aod::femtouniverseparticle::ParticleType::kCascade)) && (aod::femtouniverseparticle::pt < confHPtPart2) && (aod::femtouniverseparticle::pt > confLPtPart2); /// Histogramming for v0 FemtoUniverseParticleHisto trackHistoV0; diff --git a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerReducedTask.cxx b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerReducedTask.cxx index 0a0ba927a22..30a8dcc283e 100644 --- a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerReducedTask.cxx +++ b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerReducedTask.cxx @@ -205,9 +205,9 @@ struct femtoWorldProducerReducedTask { track.dcaXY(), childIDs, 0, 0); if (ConfDebugOutput) { outputDebugTracks(track.sign(), - (uint8_t)track.tpcNClsFound(), + static_cast(track.tpcNClsFound()), track.tpcNClsFindable(), - (uint8_t)track.tpcNClsCrossedRows(), + static_cast(track.tpcNClsCrossedRows()), track.tpcNClsShared(), track.tpcInnerParam(), track.itsNCls(), diff --git a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx index 0460e749cb0..7c2aec1b72e 100644 --- a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx +++ b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx @@ -445,9 +445,9 @@ struct femtoWorldProducerTask { track.tpcChi2NCl(), track.tpcNSigmaKa(), track.tofNSigmaKa(), - (uint8_t)track.tpcNClsFound(), + static_cast(track.tpcNClsFound()), track.tpcNClsFindable(), - (uint8_t)track.tpcNClsCrossedRows(), + static_cast(track.tpcNClsCrossedRows()), track.tpcNClsShared(), track.tpcInnerParam(), track.itsNCls(), @@ -534,9 +534,9 @@ struct femtoWorldProducerTask { track.tpcChi2NCl(), track.tpcNSigmaKa(), track.tofNSigmaKa(), - (uint8_t)track.tpcNClsFound(), + static_cast(track.tpcNClsFound()), track.tpcNClsFindable(), - (uint8_t)track.tpcNClsCrossedRows(), + static_cast(track.tpcNClsCrossedRows()), track.tpcNClsShared(), track.tpcInnerParam(), track.itsNCls(), @@ -614,9 +614,9 @@ struct femtoWorldProducerTask { postrack.tpcChi2NCl(), postrack.tpcNSigmaKa(), postrack.tofNSigmaKa(), - (uint8_t)postrack.tpcNClsFound(), + static_cast(postrack.tpcNClsFound()), postrack.tpcNClsFindable(), - (uint8_t)postrack.tpcNClsCrossedRows(), + static_cast(postrack.tpcNClsCrossedRows()), postrack.tpcNClsShared(), postrack.tpcInnerParam(), postrack.itsNCls(), @@ -670,9 +670,9 @@ struct femtoWorldProducerTask { negtrack.tpcChi2NCl(), negtrack.tpcNSigmaKa(), negtrack.tofNSigmaKa(), - (uint8_t)negtrack.tpcNClsFound(), + static_cast(negtrack.tpcNClsFound()), negtrack.tpcNClsFindable(), - (uint8_t)negtrack.tpcNClsCrossedRows(), + static_cast(negtrack.tpcNClsCrossedRows()), negtrack.tpcNClsShared(), negtrack.tpcInnerParam(), negtrack.itsNCls(), @@ -722,9 +722,9 @@ struct femtoWorldProducerTask { postrack.tpcChi2NCl(), postrack.tpcNSigmaKa(), postrack.tofNSigmaKa(), - (uint8_t)postrack.tpcNClsFound(), + static_cast(postrack.tpcNClsFound()), postrack.tpcNClsFindable(), - (uint8_t)postrack.tpcNClsCrossedRows(), + static_cast(postrack.tpcNClsCrossedRows()), postrack.tpcNClsShared(), postrack.tpcInnerParam(), postrack.itsNCls(), @@ -811,9 +811,9 @@ struct femtoWorldProducerTask { track.tpcChi2NCl(), track.tpcNSigmaKa(), track.tofNSigmaKa(), - (uint8_t)track.tpcNClsFound(), + static_cast(track.tpcNClsFound()), track.tpcNClsFindable(), - (uint8_t)track.tpcNClsCrossedRows(), + static_cast(track.tpcNClsCrossedRows()), track.tpcNClsShared(), track.tpcInnerParam(), track.itsNCls(), @@ -915,9 +915,9 @@ struct femtoWorldProducerTask { p1.tpcChi2NCl(), p1.tpcNSigmaKa(), p1.tofNSigmaKa(), - (uint8_t)p1.tpcNClsFound(), + static_cast(p1.tpcNClsFound()), p1.tpcNClsFindable(), - (uint8_t)p1.tpcNClsCrossedRows(), + static_cast(p1.tpcNClsCrossedRows()), p1.tpcNClsShared(), p1.tpcInnerParam(), p1.itsNCls(), @@ -971,9 +971,9 @@ struct femtoWorldProducerTask { p2.tpcChi2NCl(), p2.tpcNSigmaKa(), p2.tofNSigmaKa(), - (uint8_t)p2.tpcNClsFound(), + static_cast(p2.tpcNClsFound()), p2.tpcNClsFindable(), - (uint8_t)p2.tpcNClsCrossedRows(), + static_cast(p2.tpcNClsCrossedRows()), p2.tpcNClsShared(), p2.tpcInnerParam(), p2.itsNCls(), @@ -1030,7 +1030,7 @@ struct femtoWorldProducerTask { p1.tpcChi2NCl(), p1.tpcNSigmaKa(), p1.tofNSigmaKa(), - (uint8_t)p1.tpcNClsFound(), + static_cast(p1.tpcNClsFound()), 0, // p1.tpcNClsFindable(), 0, //(uint8_t)p1.tpcNClsCrossedRows(), p1.tpcNClsShared(), @@ -1132,9 +1132,9 @@ struct femtoWorldProducerTask { track.tpcChi2NCl(), track.tpcNSigmaKa(), track.tofNSigmaKa(), - (uint8_t)track.tpcNClsFound(), + static_cast(track.tpcNClsFound()), track.tpcNClsFindable(), - (uint8_t)track.tpcNClsCrossedRows(), + static_cast(track.tpcNClsCrossedRows()), track.tpcNClsShared(), track.tpcInnerParam(), track.itsNCls(), @@ -1403,9 +1403,9 @@ struct femtoWorldProducerTask { track.tpcChi2NCl(), track.tpcNSigmaKa(), track.tofNSigmaKa(), - (uint8_t)track.tpcNClsFound(), + static_cast(track.tpcNClsFound()), track.tpcNClsFindable(), - (uint8_t)track.tpcNClsCrossedRows(), + static_cast(track.tpcNClsCrossedRows()), track.tpcNClsShared(), track.tpcInnerParam(), track.itsNCls(), @@ -1492,9 +1492,9 @@ struct femtoWorldProducerTask { track.tpcChi2NCl(), track.tpcNSigmaKa(), track.tofNSigmaKa(), - (uint8_t)track.tpcNClsFound(), + static_cast(track.tpcNClsFound()), track.tpcNClsFindable(), - (uint8_t)track.tpcNClsCrossedRows(), + static_cast(track.tpcNClsCrossedRows()), track.tpcNClsShared(), track.tpcInnerParam(), track.itsNCls(), @@ -1573,9 +1573,9 @@ struct femtoWorldProducerTask { postrack.tpcChi2NCl(), postrack.tpcNSigmaKa(), postrack.tofNSigmaKa(), - (uint8_t)postrack.tpcNClsFound(), + static_cast(postrack.tpcNClsFound()), postrack.tpcNClsFindable(), - (uint8_t)postrack.tpcNClsCrossedRows(), + static_cast(postrack.tpcNClsCrossedRows()), postrack.tpcNClsShared(), postrack.tpcInnerParam(), postrack.itsNCls(), @@ -1629,9 +1629,9 @@ struct femtoWorldProducerTask { negtrack.tpcChi2NCl(), negtrack.tpcNSigmaKa(), negtrack.tofNSigmaKa(), - (uint8_t)negtrack.tpcNClsFound(), + static_cast(negtrack.tpcNClsFound()), negtrack.tpcNClsFindable(), - (uint8_t)negtrack.tpcNClsCrossedRows(), + static_cast(negtrack.tpcNClsCrossedRows()), negtrack.tpcNClsShared(), negtrack.tpcInnerParam(), negtrack.itsNCls(), @@ -1681,9 +1681,9 @@ struct femtoWorldProducerTask { postrack.tpcChi2NCl(), postrack.tpcNSigmaKa(), postrack.tofNSigmaKa(), - (uint8_t)postrack.tpcNClsFound(), + static_cast(postrack.tpcNClsFound()), postrack.tpcNClsFindable(), - (uint8_t)postrack.tpcNClsCrossedRows(), + static_cast(postrack.tpcNClsCrossedRows()), postrack.tpcNClsShared(), postrack.tpcInnerParam(), postrack.itsNCls(), @@ -1771,9 +1771,9 @@ struct femtoWorldProducerTask { track.tpcChi2NCl(), track.tpcNSigmaKa(), track.tofNSigmaKa(), - (uint8_t)track.tpcNClsFound(), + static_cast(track.tpcNClsFound()), track.tpcNClsFindable(), - (uint8_t)track.tpcNClsCrossedRows(), + static_cast(track.tpcNClsCrossedRows()), track.tpcNClsShared(), track.tpcInnerParam(), track.itsNCls(), @@ -1875,9 +1875,9 @@ struct femtoWorldProducerTask { p1.tpcChi2NCl(), p1.tpcNSigmaKa(), p1.tofNSigmaKa(), - (uint8_t)p1.tpcNClsFound(), + static_cast(p1.tpcNClsFound()), p1.tpcNClsFindable(), - (uint8_t)p1.tpcNClsCrossedRows(), + static_cast(p1.tpcNClsCrossedRows()), p1.tpcNClsShared(), p1.tpcInnerParam(), p1.itsNCls(), @@ -1931,9 +1931,9 @@ struct femtoWorldProducerTask { p2.tpcChi2NCl(), p2.tpcNSigmaKa(), p2.tofNSigmaKa(), - (uint8_t)p2.tpcNClsFound(), + static_cast(p2.tpcNClsFound()), p2.tpcNClsFindable(), - (uint8_t)p2.tpcNClsCrossedRows(), + static_cast(p2.tpcNClsCrossedRows()), p2.tpcNClsShared(), p2.tpcInnerParam(), p2.itsNCls(), @@ -1990,7 +1990,7 @@ struct femtoWorldProducerTask { p1.tpcChi2NCl(), p1.tpcNSigmaKa(), p1.tofNSigmaKa(), - (uint8_t)p1.tpcNClsFound(), + static_cast(p1.tpcNClsFound()), 0, // p1.tpcNClsFindable(), 0, //(uint8_t)p1.tpcNClsCrossedRows(), p1.tpcNClsShared(), @@ -2080,9 +2080,9 @@ struct femtoWorldProducerTask { track.tpcChi2NCl(), track.tpcNSigmaKa(), track.tofNSigmaKa(), - (uint8_t)track.tpcNClsFound(), + static_cast(track.tpcNClsFound()), track.tpcNClsFindable(), - (uint8_t)track.tpcNClsCrossedRows(), + static_cast(track.tpcNClsCrossedRows()), track.tpcNClsShared(), track.tpcInnerParam(), track.itsNCls(), diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskPionPion.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskPionPion.cxx index 40ddbac7a6d..f50d41ad99a 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskPionPion.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskPionPion.cxx @@ -96,14 +96,14 @@ struct femtoWorldPairTaskPionPion { Configurable> ConfPIDPartOne{"ConfPIDPartOne", std::vector{2}, "Particle 1 - Read from json file"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector>int>> /// Partition for particle 1 - Partition partsOne = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut + Partition partsOne = (aod::femtoworldparticle::partType == static_cast(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut && (aod::femtoworldparticle::pt < cfgPtHighPart1) && (aod::femtoworldparticle::pt > cfgPtLowPart1) // simple pT cuts && (aod::femtoworldparticle::eta < cfgEtaHighPart1) && (aod::femtoworldparticle::eta > cfgEtaLowPart1) // Eta cuts && (o2::aod::track::dcaXY < cfgDcaXYPart1) && (o2::aod::track::dcaZ < cfgDcaZPart1) // DCA cuts for XY and Z - && (aod::femtoworldparticle::tpcNClsFound > (uint8_t)cfgTpcClPart1) // Number of found TPC clusters - && (aod::femtoworldparticle::tpcNClsCrossedRows > (uint8_t)cfgTpcCrosRoPart1) // Crossed rows TPC + && (aod::femtoworldparticle::tpcNClsFound > static_cast(cfgTpcClPart1)) // Number of found TPC clusters + && (aod::femtoworldparticle::tpcNClsCrossedRows > static_cast(cfgTpcCrosRoPart1)) // Crossed rows TPC && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart1) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart1) //&& // chi2 cuts - && (aod::femtoworldparticle::sign > int8_t(0)) // Sign (Pion+) + && (aod::femtoworldparticle::sign > static_cast(0)) // Sign (Pion+) // todo: globaltrack cut ; @@ -111,10 +111,10 @@ struct femtoWorldPairTaskPionPion { ((aod::femtoworldparticle::pt > cfgPtHighPart1) || (aod::femtoworldparticle::pt < cfgPtLowPart1)) || // pT cuts ((aod::femtoworldparticle::eta > cfgEtaHighPart1) || (aod::femtoworldparticle::eta < cfgEtaLowPart1)) || // Eta cuts (o2::aod::track::dcaXY > cfgDcaXYPart1) || (o2::aod::track::dcaZ > cfgDcaZPart1) || // DCA cuts for XY and Z - (aod::femtoworldparticle::tpcNClsFound < (uint8_t)cfgTpcClPart1) || // Number of found TPC clusters - (aod::femtoworldparticle::tpcNClsCrossedRows < (uint8_t)cfgTpcCrosRoPart1) || // Crossed rows TPC + (aod::femtoworldparticle::tpcNClsFound < static_cast(cfgTpcClPart1)) || // Number of found TPC clusters + (aod::femtoworldparticle::tpcNClsCrossedRows < static_cast(cfgTpcCrosRoPart1)) || // Crossed rows TPC (aod::femtoworldparticle::itsChi2NCl > cfgChi2ItsPart1) || (aod::femtoworldparticle::tpcChi2NCl > cfgChi2TpcPart1) || //&& // chi2 cuts - (aod::femtoworldparticle::sign < int8_t(0)); + (aod::femtoworldparticle::sign < static_cast(0)); /// Histogramming for particle 1 FemtoWorldParticleHisto trackHistoPartOne; FemtoWorldParticleHisto trackHistoPartOneFailed; @@ -125,22 +125,22 @@ struct femtoWorldPairTaskPionPion { Configurable> ConfPIDPartTwo{"ConfPIDPartTwo", std::vector{2}, "Particle 2 - Read from json file"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector> /// Partition for particle 2 - Partition partsTwo = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut + Partition partsTwo = (aod::femtoworldparticle::partType == static_cast(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut && (aod::femtoworldparticle::pt < cfgPtHighPart2) && (aod::femtoworldparticle::pt > cfgPtLowPart2) // pT cuts && (aod::femtoworldparticle::eta < cfgEtaHighPart2) && (aod::femtoworldparticle::eta > cfgEtaLowPart2) // Eta cuts && (o2::aod::track::dcaXY < cfgDcaXYPart2) && (o2::aod::track::dcaZ < cfgDcaZPart2) // DCA cuts for XY and Z - && (aod::femtoworldparticle::tpcNClsFound > (uint8_t)cfgTpcClPart2) // Number of found TPC clusters - && (aod::femtoworldparticle::tpcNClsCrossedRows > (uint8_t)cfgTpcCrosRoPart2) // Crossed rows TPC + && (aod::femtoworldparticle::tpcNClsFound > static_cast(cfgTpcClPart2)) // Number of found TPC clusters + && (aod::femtoworldparticle::tpcNClsCrossedRows > static_cast(cfgTpcCrosRoPart2)) // Crossed rows TPC && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart2) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart2) // // chi2 cuts - && (aod::femtoworldparticle::sign < int8_t(0)) // Sign (K-) + && (aod::femtoworldparticle::sign < static_cast(0)) // Sign (K-) // todo: globaltrack cut ; Partition partsTwoFailed = //(aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) || // particle type cut ((aod::femtoworldparticle::pt > cfgPtHighPart2) || (aod::femtoworldparticle::pt < cfgPtLowPart2)) || // pT cuts ((aod::femtoworldparticle::eta > cfgEtaHighPart2) || (aod::femtoworldparticle::eta < cfgEtaLowPart2)) || // Eta cuts (o2::aod::track::dcaXY > cfgDcaXYPart2) || (o2::aod::track::dcaZ > cfgDcaZPart2) || // DCA cuts for XY and Z - (aod::femtoworldparticle::tpcNClsFound < (uint8_t)cfgTpcClPart2) || // Number of found TPC clusters - (aod::femtoworldparticle::tpcNClsCrossedRows < (uint8_t)cfgTpcCrosRoPart2) || // Crossed rows TPC + (aod::femtoworldparticle::tpcNClsFound < static_cast(cfgTpcClPart2)) || // Number of found TPC clusters + (aod::femtoworldparticle::tpcNClsCrossedRows < static_cast(cfgTpcCrosRoPart2)) || // Crossed rows TPC (aod::femtoworldparticle::itsChi2NCl > cfgChi2ItsPart2) || (aod::femtoworldparticle::tpcChi2NCl > cfgChi2TpcPart2) //&& // chi2 cuts ; /// Histogramming for particle 2 diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskProtonAntiproton.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskProtonAntiproton.cxx index 44e36a37e98..f1498577578 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskProtonAntiproton.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskProtonAntiproton.cxx @@ -92,14 +92,14 @@ struct femtoWorldPairTaskProtonAntiproton { Configurable> ConfPIDPartOne{"ConfPIDPartOne", std::vector{2}, "Particle 1 - Read from json file"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector>int>> /// Partition for particle 1 (proton) - Partition partsOne = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut + Partition partsOne = (aod::femtoworldparticle::partType == static_cast(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut && (aod::femtoworldparticle::pt < cfgPtHighPart1) && (aod::femtoworldparticle::pt > cfgPtLowPart1) // simple pT cuts && (aod::femtoworldparticle::eta < cfgEtaHighPart1) && (aod::femtoworldparticle::eta > cfgEtaLowPart1) // Eta cuts && (o2::aod::track::dcaXY < cfgDcaXYPart1) && (o2::aod::track::dcaZ < cfgDcaZPart1) // DCA cuts for XY and Z - && (aod::femtoworldparticle::tpcNClsFound > (uint8_t)cfgTpcClPart1) // Number of found TPC clusters - && (aod::femtoworldparticle::tpcNClsCrossedRows > (uint8_t)cfgTpcCrosRoPart1) // Crossed rows TPC + && (aod::femtoworldparticle::tpcNClsFound > static_cast(cfgTpcClPart1)) // Number of found TPC clusters + && (aod::femtoworldparticle::tpcNClsCrossedRows > static_cast(cfgTpcCrosRoPart1)) // Crossed rows TPC && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart1) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart1) //&& // chi2 cuts - && (aod::femtoworldparticle::sign > int8_t(0)) // Sign (K+) + && (aod::femtoworldparticle::sign > static_cast(0)) // Sign (K+) // todo: globaltrack cut ; @@ -107,10 +107,10 @@ struct femtoWorldPairTaskProtonAntiproton { ((aod::femtoworldparticle::pt > cfgPtHighPart1) || (aod::femtoworldparticle::pt < cfgPtLowPart1)) || // pT cuts ((aod::femtoworldparticle::eta > cfgEtaHighPart1) || (aod::femtoworldparticle::eta < cfgEtaLowPart1)) || // Eta cuts (o2::aod::track::dcaXY > cfgDcaXYPart1) || (o2::aod::track::dcaZ > cfgDcaZPart1) || // DCA cuts for XY and Z - (aod::femtoworldparticle::tpcNClsFound < (uint8_t)cfgTpcClPart1) || // Number of found TPC clusters - (aod::femtoworldparticle::tpcNClsCrossedRows < (uint8_t)cfgTpcCrosRoPart1) || // Crossed rows TPC + (aod::femtoworldparticle::tpcNClsFound < static_cast(cfgTpcClPart1)) || // Number of found TPC clusters + (aod::femtoworldparticle::tpcNClsCrossedRows < static_cast(cfgTpcCrosRoPart1)) || // Crossed rows TPC (aod::femtoworldparticle::itsChi2NCl > cfgChi2ItsPart1) || (aod::femtoworldparticle::tpcChi2NCl > cfgChi2TpcPart1) || //&& // chi2 cuts - (aod::femtoworldparticle::sign < int8_t(0)); + (aod::femtoworldparticle::sign < static_cast(0)); /// Histogramming for particle 1 FemtoWorldParticleHisto trackHistoPartOne; FemtoWorldParticleHisto trackHistoPartOneFailed; @@ -121,22 +121,22 @@ struct femtoWorldPairTaskProtonAntiproton { Configurable> ConfPIDPartTwo{"ConfPIDPartTwo", std::vector{2}, "Particle 2 - Read from json file"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector> /// Partition for particle 2 - Partition partsTwo = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut + Partition partsTwo = (aod::femtoworldparticle::partType == static_cast(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut && (aod::femtoworldparticle::pt < cfgPtHighPart2) && (aod::femtoworldparticle::pt > cfgPtLowPart2) // pT cuts && (aod::femtoworldparticle::eta < cfgEtaHighPart2) && (aod::femtoworldparticle::eta > cfgEtaLowPart2) // Eta cuts && (o2::aod::track::dcaXY < cfgDcaXYPart2) && (o2::aod::track::dcaZ < cfgDcaZPart2) // DCA cuts for XY and Z - && (aod::femtoworldparticle::tpcNClsFound > (uint8_t)cfgTpcClPart2) // Number of found TPC clusters - && (aod::femtoworldparticle::tpcNClsCrossedRows > (uint8_t)cfgTpcCrosRoPart2) // Crossed rows TPC + && (aod::femtoworldparticle::tpcNClsFound > static_cast(cfgTpcClPart2)) // Number of found TPC clusters + && (aod::femtoworldparticle::tpcNClsCrossedRows > static_cast(cfgTpcCrosRoPart2)) // Crossed rows TPC && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart2) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart2) // // chi2 cuts - && (aod::femtoworldparticle::sign < int8_t(0)) // Sign (K-) + && (aod::femtoworldparticle::sign < static_cast(0)) // Sign (K-) // todo: globaltrack cut ; Partition partsTwoFailed = //(aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) || // particle type cut ((aod::femtoworldparticle::pt > cfgPtHighPart2) || (aod::femtoworldparticle::pt < cfgPtLowPart2)) || // pT cuts ((aod::femtoworldparticle::eta > cfgEtaHighPart2) || (aod::femtoworldparticle::eta < cfgEtaLowPart2)) || // Eta cuts (o2::aod::track::dcaXY > cfgDcaXYPart2) || (o2::aod::track::dcaZ > cfgDcaZPart2) || // DCA cuts for XY and Z - (aod::femtoworldparticle::tpcNClsFound < (uint8_t)cfgTpcClPart2) || // Number of found TPC clusters - (aod::femtoworldparticle::tpcNClsCrossedRows < (uint8_t)cfgTpcCrosRoPart2) || // Crossed rows TPC + (aod::femtoworldparticle::tpcNClsFound < static_cast(cfgTpcClPart2)) || // Number of found TPC clusters + (aod::femtoworldparticle::tpcNClsCrossedRows < static_cast(cfgTpcCrosRoPart2)) || // Crossed rows TPC (aod::femtoworldparticle::itsChi2NCl > cfgChi2ItsPart2) || (aod::femtoworldparticle::tpcChi2NCl > cfgChi2TpcPart2) //&& // chi2 cuts ; /// Histogramming for particle 2 diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackD0.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackD0.cxx index 1357578f0fa..006c3957701 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackD0.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackD0.cxx @@ -96,13 +96,13 @@ struct femtoWorldPairTaskTrackD0 { Configurable cfgChi2ItsPart1{"cfgChi2ItsPart1", 36.0, "Chi2 / cluster for the ITS track segment for the first particle"}; /// Partition for particle 1 (proton) - Partition partsOne = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) && (aod::femtoworldparticle::pt < cfgPtHighPart1) && (aod::femtoworldparticle::pt > cfgPtLowPart1) // simple pT cuts - && (aod::femtoworldparticle::eta < cfgEtaHighPart1) && (aod::femtoworldparticle::eta > cfgEtaLowPart1) // Eta cuts - && (o2::aod::track::dcaXY < cfgDcaXYPart1) && (o2::aod::track::dcaZ < cfgDcaZPart1) // DCA cuts for XY and Z - && (aod::femtoworldparticle::tpcNClsFound > (uint8_t)cfgTpcClPart1) // Number of found TPC clusters - && (aod::femtoworldparticle::tpcNClsCrossedRows > (uint8_t)cfgTpcCrosRoPart1) // Crossed rows TPC - && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart1) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart1) //&& // chi2 cuts - && (aod::femtoworldparticle::sign > int8_t(0)); + Partition partsOne = (aod::femtoworldparticle::partType == static_cast(aod::femtoworldparticle::ParticleType::kTrack)) && (aod::femtoworldparticle::pt < cfgPtHighPart1) && (aod::femtoworldparticle::pt > cfgPtLowPart1) // simple pT cuts + && (aod::femtoworldparticle::eta < cfgEtaHighPart1) && (aod::femtoworldparticle::eta > cfgEtaLowPart1) // Eta cuts + && (o2::aod::track::dcaXY < cfgDcaXYPart1) && (o2::aod::track::dcaZ < cfgDcaZPart1) // DCA cuts for XY and Z + && (aod::femtoworldparticle::tpcNClsFound > static_cast(cfgTpcClPart1)) // Number of found TPC clusters + && (aod::femtoworldparticle::tpcNClsCrossedRows > static_cast(cfgTpcCrosRoPart1)) // Crossed rows TPC + && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart1) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart1) //&& // chi2 cuts + && (aod::femtoworldparticle::sign > static_cast(0)); /// Histogramming for particle 1 FemtoWorldParticleHisto trackHistoPartOne; @@ -116,8 +116,8 @@ struct femtoWorldPairTaskTrackD0 { Configurable cfgEtaHighPart2{"cfgEtaHighPart2", 0.8, "Higher limit for Eta for the second particle"}; // Partition for D0/D0bar mesons - Partition partsD0D0barMesons = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kD0D0bar)); - Partition partsD0D0barDaughters = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kD0D0barChild)); + Partition partsD0D0barMesons = (aod::femtoworldparticle::partType == static_cast(aod::femtoworldparticle::ParticleType::kD0D0bar)); + Partition partsD0D0barDaughters = (aod::femtoworldparticle::partType == static_cast(aod::femtoworldparticle::ParticleType::kD0D0barChild)); // HIstogramin for particle 2 // FemtoWorldParticleHisto trackHistoPartThree; diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackPhi.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackPhi.cxx index c339defa68e..01786e65a1e 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackPhi.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackPhi.cxx @@ -96,13 +96,13 @@ struct femtoWorldPairTaskTrackPhi { Configurable cfgChi2ItsPart1{"cfgChi2ItsPart1", 36.0, "Chi2 / cluster for the ITS track segment for the first particle"}; /// Partition for particle 1 (proton) - Partition partsOne = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) && (aod::femtoworldparticle::pt < cfgPtHighPart1) && (aod::femtoworldparticle::pt > cfgPtLowPart1) // simple pT cuts - && (aod::femtoworldparticle::eta < cfgEtaHighPart1) && (aod::femtoworldparticle::eta > cfgEtaLowPart1) // Eta cuts - && (o2::aod::track::dcaXY < cfgDcaXYPart1) && (o2::aod::track::dcaZ < cfgDcaZPart1) // DCA cuts for XY and Z - && (aod::femtoworldparticle::tpcNClsFound > (uint8_t)cfgTpcClPart1) // Number of found TPC clusters - && (aod::femtoworldparticle::tpcNClsCrossedRows > (uint8_t)cfgTpcCrosRoPart1) // Crossed rows TPC - && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart1) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart1) //&& // chi2 cuts - && (aod::femtoworldparticle::sign > int8_t(0)); + Partition partsOne = (aod::femtoworldparticle::partType == static_cast(aod::femtoworldparticle::ParticleType::kTrack)) && (aod::femtoworldparticle::pt < cfgPtHighPart1) && (aod::femtoworldparticle::pt > cfgPtLowPart1) // simple pT cuts + && (aod::femtoworldparticle::eta < cfgEtaHighPart1) && (aod::femtoworldparticle::eta > cfgEtaLowPart1) // Eta cuts + && (o2::aod::track::dcaXY < cfgDcaXYPart1) && (o2::aod::track::dcaZ < cfgDcaZPart1) // DCA cuts for XY and Z + && (aod::femtoworldparticle::tpcNClsFound > static_cast(cfgTpcClPart1)) // Number of found TPC clusters + && (aod::femtoworldparticle::tpcNClsCrossedRows > static_cast(cfgTpcCrosRoPart1)) // Crossed rows TPC + && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart1) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart1) //&& // chi2 cuts + && (aod::femtoworldparticle::sign > static_cast(0)); /// Histogramming for particle 1 FemtoWorldParticleHisto trackHistoPartOne; @@ -116,14 +116,14 @@ struct femtoWorldPairTaskTrackPhi { Configurable cfgEtaHighPart2{"cfgEtaHighPart2", 0.8, "Higher limit for Eta for the second particle"}; /// Partition for particle 2 - Partition partsTwo = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kPhi)) && (aod::femtoworldparticle::pt < cfgPtHighPart2) && (aod::femtoworldparticle::pt > cfgPtLowPart2) // pT cuts - && (aod::femtoworldparticle::eta < cfgEtaHighPart2) && (aod::femtoworldparticle::eta > cfgEtaLowPart2); // Eta cuts + Partition partsTwo = (aod::femtoworldparticle::partType == static_cast(aod::femtoworldparticle::ParticleType::kPhi)) && (aod::femtoworldparticle::pt < cfgPtHighPart2) && (aod::femtoworldparticle::pt > cfgPtLowPart2) // pT cuts + && (aod::femtoworldparticle::eta < cfgEtaHighPart2) && (aod::femtoworldparticle::eta > cfgEtaLowPart2); // Eta cuts /// Histogramming for particle 2 FemtoWorldParticleHisto trackHistoPartTwo; // Partition for particle 3 (Phi daughters (K+ K-)) - Partition partsThree = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kPhiChild)); + Partition partsThree = (aod::femtoworldparticle::partType == static_cast(aod::femtoworldparticle::ParticleType::kPhiChild)); /// Histogramming for particle 3 FemtoWorldParticleHisto trackHistoPartThree; diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx index b8e514a06fe..a2db5c88b6b 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx @@ -94,14 +94,14 @@ struct femtoWorldPairTaskTrackTrack { Configurable> ConfPIDPartOne{"ConfPIDPartOne", std::vector{2}, "Particle 1 - Read from json file"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector>int>> /// Partition for particle 1 - Partition partsOne = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut + Partition partsOne = (aod::femtoworldparticle::partType == static_cast(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut && (aod::femtoworldparticle::pt < cfgPtHighPart1) && (aod::femtoworldparticle::pt > cfgPtLowPart1) // simple pT cuts && (aod::femtoworldparticle::eta < cfgEtaHighPart1) && (aod::femtoworldparticle::eta > cfgEtaLowPart1) // Eta cuts && (o2::aod::track::dcaXY < cfgDcaXYPart1) && (o2::aod::track::dcaZ < cfgDcaZPart1) // DCA cuts for XY and Z - && (aod::femtoworldparticle::tpcNClsFound > (uint8_t)cfgTpcClPart1) // Number of found TPC clusters - && (aod::femtoworldparticle::tpcNClsCrossedRows > (uint8_t)cfgTpcCrosRoPart1) // Crossed rows TPC + && (aod::femtoworldparticle::tpcNClsFound > static_cast(cfgTpcClPart1)) // Number of found TPC clusters + && (aod::femtoworldparticle::tpcNClsCrossedRows > static_cast(cfgTpcCrosRoPart1)) // Crossed rows TPC && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart1) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart1) //&& // chi2 cuts - && (aod::femtoworldparticle::sign > int8_t(0)) // Sign (K+) + && (aod::femtoworldparticle::sign > static_cast(0)) // Sign (K+) // todo: globaltrack cut ; @@ -109,10 +109,10 @@ struct femtoWorldPairTaskTrackTrack { ((aod::femtoworldparticle::pt > cfgPtHighPart1) || (aod::femtoworldparticle::pt < cfgPtLowPart1)) || // pT cuts ((aod::femtoworldparticle::eta > cfgEtaHighPart1) || (aod::femtoworldparticle::eta < cfgEtaLowPart1)) || // Eta cuts (o2::aod::track::dcaXY > cfgDcaXYPart1) || (o2::aod::track::dcaZ > cfgDcaZPart1) || // DCA cuts for XY and Z - (aod::femtoworldparticle::tpcNClsFound < (uint8_t)cfgTpcClPart1) || // Number of found TPC clusters - (aod::femtoworldparticle::tpcNClsCrossedRows < (uint8_t)cfgTpcCrosRoPart1) || // Crossed rows TPC + (aod::femtoworldparticle::tpcNClsFound < static_cast(cfgTpcClPart1)) || // Number of found TPC clusters + (aod::femtoworldparticle::tpcNClsCrossedRows < static_cast(cfgTpcCrosRoPart1)) || // Crossed rows TPC (aod::femtoworldparticle::itsChi2NCl > cfgChi2ItsPart1) || (aod::femtoworldparticle::tpcChi2NCl > cfgChi2TpcPart1) || //&& // chi2 cuts - (aod::femtoworldparticle::sign < int8_t(0)); + (aod::femtoworldparticle::sign < static_cast(0)); /// Histogramming for particle 1 FemtoWorldParticleHisto trackHistoPartOne; FemtoWorldParticleHisto trackHistoPartOneFailed; @@ -123,22 +123,22 @@ struct femtoWorldPairTaskTrackTrack { Configurable> ConfPIDPartTwo{"ConfPIDPartTwo", std::vector{2}, "Particle 2 - Read from json file"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector> /// Partition for particle 2 - Partition partsTwo = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut + Partition partsTwo = (aod::femtoworldparticle::partType == static_cast(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut && (aod::femtoworldparticle::pt < cfgPtHighPart2) && (aod::femtoworldparticle::pt > cfgPtLowPart2) // pT cuts && (aod::femtoworldparticle::eta < cfgEtaHighPart2) && (aod::femtoworldparticle::eta > cfgEtaLowPart2) // Eta cuts && (o2::aod::track::dcaXY < cfgDcaXYPart2) && (o2::aod::track::dcaZ < cfgDcaZPart2) // DCA cuts for XY and Z - && (aod::femtoworldparticle::tpcNClsFound > (uint8_t)cfgTpcClPart2) // Number of found TPC clusters - && (aod::femtoworldparticle::tpcNClsCrossedRows > (uint8_t)cfgTpcCrosRoPart2) // Crossed rows TPC + && (aod::femtoworldparticle::tpcNClsFound > static_cast(cfgTpcClPart2)) // Number of found TPC clusters + && (aod::femtoworldparticle::tpcNClsCrossedRows > static_cast(cfgTpcCrosRoPart2)) // Crossed rows TPC && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart2) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart2) // // chi2 cuts - && (aod::femtoworldparticle::sign < int8_t(0)) // Sign (K-) + && (aod::femtoworldparticle::sign < static_cast(0)) // Sign (K-) // todo: globaltrack cut ; Partition partsTwoFailed = //(aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) || // particle type cut ((aod::femtoworldparticle::pt > cfgPtHighPart2) || (aod::femtoworldparticle::pt < cfgPtLowPart2)) || // pT cuts ((aod::femtoworldparticle::eta > cfgEtaHighPart2) || (aod::femtoworldparticle::eta < cfgEtaLowPart2)) || // Eta cuts (o2::aod::track::dcaXY > cfgDcaXYPart2) || (o2::aod::track::dcaZ > cfgDcaZPart2) || // DCA cuts for XY and Z - (aod::femtoworldparticle::tpcNClsFound < (uint8_t)cfgTpcClPart2) || // Number of found TPC clusters - (aod::femtoworldparticle::tpcNClsCrossedRows < (uint8_t)cfgTpcCrosRoPart2) || // Crossed rows TPC + (aod::femtoworldparticle::tpcNClsFound < static_cast(cfgTpcClPart2)) || // Number of found TPC clusters + (aod::femtoworldparticle::tpcNClsCrossedRows < static_cast(cfgTpcCrosRoPart2)) || // Crossed rows TPC (aod::femtoworldparticle::itsChi2NCl > cfgChi2ItsPart2) || (aod::femtoworldparticle::tpcChi2NCl > cfgChi2TpcPart2) //&& // chi2 cuts ; /// Histogramming for particle 2 diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx index 95bd3db42ec..aab0b258993 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx @@ -87,12 +87,12 @@ struct FemtoWorldIdenticalPionPair { Configurable cfgSignPartTwo{"cfgSignPartTwo", 1, "Sign of Second particle"}; /// Partition for particle 1 - Partition partsOne = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut + Partition partsOne = (aod::femtoworldparticle::partType == static_cast(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut && (aod::femtoworldparticle::pt < cfgPtHighPart1) && (aod::femtoworldparticle::pt > cfgPtLowPart1) // simple pT cuts && (aod::femtoworldparticle::eta < cfgEtaHighPart1) && (aod::femtoworldparticle::eta > cfgEtaLowPart1) // Eta cuts && (nabs(o2::aod::track::dcaXY) < cfgDcaXYPart1) && (nabs(o2::aod::track::dcaZ) < cfgDcaZPart1) // DCA cuts for XY and Z - && (aod::femtoworldparticle::tpcNClsFound > (uint8_t)cfgTpcClPart1) // Number of found TPC clusters - && (aod::femtoworldparticle::tpcNClsCrossedRows > (uint8_t)cfgTpcCrosRoPart1) // Crossed rows TPC + && (aod::femtoworldparticle::tpcNClsFound > static_cast(cfgTpcClPart1)) // Number of found TPC clusters + && (aod::femtoworldparticle::tpcNClsCrossedRows > static_cast(cfgTpcCrosRoPart1)) // Crossed rows TPC && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart1) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart1); //&& // chi2 cuts /// Histogramming for particle 1 diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx index 200ea018be9..1e3232ebb74 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx @@ -95,14 +95,14 @@ struct femtoWorldPionPairTaskTrackTrack { Configurable> ConfPIDPartOne{"ConfPIDPartOne", std::vector{2}, "Particle 1 - Read from json file"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector>int>> /// Partition for particle 1 - Partition partsOne = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut + Partition partsOne = (aod::femtoworldparticle::partType == static_cast(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut && (aod::femtoworldparticle::pt < cfgPtHighPart1) && (aod::femtoworldparticle::pt > cfgPtLowPart1) // simple pT cuts && (aod::femtoworldparticle::eta < cfgEtaHighPart1) && (aod::femtoworldparticle::eta > cfgEtaLowPart1) // Eta cuts && (o2::aod::track::dcaXY < cfgDcaXYPart1) && (o2::aod::track::dcaZ < cfgDcaZPart1) // DCA cuts for XY and Z - && (aod::femtoworldparticle::tpcNClsFound > (uint8_t)cfgTpcClPart1) // Number of found TPC clusters - && (aod::femtoworldparticle::tpcNClsCrossedRows > (uint8_t)cfgTpcCrosRoPart1) // Crossed rows TPC + && (aod::femtoworldparticle::tpcNClsFound > static_cast(cfgTpcClPart1)) // Number of found TPC clusters + && (aod::femtoworldparticle::tpcNClsCrossedRows > static_cast(cfgTpcCrosRoPart1)) // Crossed rows TPC && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart1) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart1) //&& // chi2 cuts - && (aod::femtoworldparticle::sign > int8_t(0)) // Sign (K+) + && (aod::femtoworldparticle::sign > static_cast(0)) // Sign (K+) // todo: globaltrack cut ; @@ -110,10 +110,10 @@ struct femtoWorldPionPairTaskTrackTrack { ((aod::femtoworldparticle::pt > cfgPtHighPart1) || (aod::femtoworldparticle::pt < cfgPtLowPart1)) || // pT cuts ((aod::femtoworldparticle::eta > cfgEtaHighPart1) || (aod::femtoworldparticle::eta < cfgEtaLowPart1)) || // Eta cuts (o2::aod::track::dcaXY > cfgDcaXYPart1) || (o2::aod::track::dcaZ > cfgDcaZPart1) || // DCA cuts for XY and Z - (aod::femtoworldparticle::tpcNClsFound < (uint8_t)cfgTpcClPart1) || // Number of found TPC clusters - (aod::femtoworldparticle::tpcNClsCrossedRows < (uint8_t)cfgTpcCrosRoPart1) || // Crossed rows TPC + (aod::femtoworldparticle::tpcNClsFound < static_cast(cfgTpcClPart1)) || // Number of found TPC clusters + (aod::femtoworldparticle::tpcNClsCrossedRows < static_cast(cfgTpcCrosRoPart1)) || // Crossed rows TPC (aod::femtoworldparticle::itsChi2NCl > cfgChi2ItsPart1) || (aod::femtoworldparticle::tpcChi2NCl > cfgChi2TpcPart1) || //&& // chi2 cuts - (aod::femtoworldparticle::sign < int8_t(0)); + (aod::femtoworldparticle::sign < static_cast(0)); /// Histogramming for particle 1 FemtoWorldParticleHisto trackHistoPartOne; FemtoWorldParticleHisto trackHistoPartOneFailed; @@ -124,22 +124,22 @@ struct femtoWorldPionPairTaskTrackTrack { Configurable> ConfPIDPartTwo{"ConfPIDPartTwo", std::vector{2}, "Particle 2 - Read from json file"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector> /// Partition for particle 2 - Partition partsTwo = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut + Partition partsTwo = (aod::femtoworldparticle::partType == static_cast(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut && (aod::femtoworldparticle::pt < cfgPtHighPart2) && (aod::femtoworldparticle::pt > cfgPtLowPart2) // pT cuts && (aod::femtoworldparticle::eta < cfgEtaHighPart2) && (aod::femtoworldparticle::eta > cfgEtaLowPart2) // Eta cuts && (o2::aod::track::dcaXY < cfgDcaXYPart2) && (o2::aod::track::dcaZ < cfgDcaZPart2) // DCA cuts for XY and Z - && (aod::femtoworldparticle::tpcNClsFound > (uint8_t)cfgTpcClPart2) // Number of found TPC clusters - && (aod::femtoworldparticle::tpcNClsCrossedRows > (uint8_t)cfgTpcCrosRoPart2) // Crossed rows TPC + && (aod::femtoworldparticle::tpcNClsFound > static_cast(cfgTpcClPart2)) // Number of found TPC clusters + && (aod::femtoworldparticle::tpcNClsCrossedRows > static_cast(cfgTpcCrosRoPart2)) // Crossed rows TPC && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart2) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart2) // // chi2 cuts - && (aod::femtoworldparticle::sign < int8_t(0)) // Sign (K-) + && (aod::femtoworldparticle::sign < static_cast(0)) // Sign (K-) // todo: globaltrack cut ; Partition partsTwoFailed = //(aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) || // particle type cut ((aod::femtoworldparticle::pt > cfgPtHighPart2) || (aod::femtoworldparticle::pt < cfgPtLowPart2)) || // pT cuts ((aod::femtoworldparticle::eta > cfgEtaHighPart2) || (aod::femtoworldparticle::eta < cfgEtaLowPart2)) || // Eta cuts (o2::aod::track::dcaXY > cfgDcaXYPart2) || (o2::aod::track::dcaZ > cfgDcaZPart2) || // DCA cuts for XY and Z - (aod::femtoworldparticle::tpcNClsFound < (uint8_t)cfgTpcClPart2) || // Number of found TPC clusters - (aod::femtoworldparticle::tpcNClsCrossedRows < (uint8_t)cfgTpcCrosRoPart2) || // Crossed rows TPC + (aod::femtoworldparticle::tpcNClsFound < static_cast(cfgTpcClPart2)) || // Number of found TPC clusters + (aod::femtoworldparticle::tpcNClsCrossedRows < static_cast(cfgTpcCrosRoPart2)) || // Crossed rows TPC (aod::femtoworldparticle::itsChi2NCl > cfgChi2ItsPart2) || (aod::femtoworldparticle::tpcChi2NCl > cfgChi2TpcPart2) //&& // chi2 cuts ; /// Histogramming for particle 2 diff --git a/PWGCF/Flow/TableProducer/zdcQVectors.cxx b/PWGCF/Flow/TableProducer/zdcQVectors.cxx index 0aade4713d6..b530db86ecd 100644 --- a/PWGCF/Flow/TableProducer/zdcQVectors.cxx +++ b/PWGCF/Flow/TableProducer/zdcQVectors.cxx @@ -162,7 +162,7 @@ struct ZdcQVectors { using UsedCollisions = soa::Join; using BCsRun3 = soa::Join; - Filter trackFilter = nabs(aod::track::eta) < cfgTrackSelsEta && aod::track::pt > cfgTrackSelsPtmin&& aod::track::pt < cfgTrackSelsPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && nabs(aod::track::dcaXY) < cfgTrackSelsDCAxy&& nabs(aod::track::dcaZ) < cfgTrackSelsDCAz; + Filter trackFilter = nabs(aod::track::eta) < cfgTrackSelsEta && aod::track::pt > cfgTrackSelsPtmin&& aod::track::pt < cfgTrackSelsPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && nabs(aod::track::dcaXY) < cfgTrackSelsDCAxy&& nabs(aod::track::dcaZ) < cfgTrackSelsDCAz; using UnfilteredTracks = soa::Join; using UsedTracks = soa::Filtered; @@ -1122,22 +1122,36 @@ struct ZdcQVectors { fillCommonRegistry(q[0], q[1], q[2], q[3], cal.v, cent, rsTimestamp); } - // vector of 4 - std::vector corrQxA; - std::vector corrQyA; - std::vector corrQxC; - std::vector corrQyC; + // vector of 4 + std::vector corrQxA; + std::vector corrQyA; + std::vector corrQxC; + std::vector corrQyC; - int pb = 0; + int pb = 0; - int nIterations = 5; - int nSteps = 5; + int nIterations = 5; + int nSteps = 5; - for (int it = 1; it <= nIterations; it++) { - corrQxA.push_back(getCorrection(names[0][0].Data(), it, 1)); - corrQyA.push_back(getCorrection(names[0][1].Data(), it, 1)); - corrQxC.push_back(getCorrection(names[0][2].Data(), it, 1)); - corrQyC.push_back(getCorrection(names[0][3].Data(), it, 1)); + for (int it = 1; it <= nIterations; it++) { + corrQxA.push_back(getCorrection(names[0][0].Data(), it, 1)); + corrQyA.push_back(getCorrection(names[0][1].Data(), it, 1)); + corrQxC.push_back(getCorrection(names[0][2].Data(), it, 1)); + corrQyC.push_back(getCorrection(names[0][3].Data(), it, 1)); + + if (cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { + registry.get(HIST("recentering/QXA_vs_iteration"))->Fill(pb + 1, q[0] - std::accumulate(corrQxA.begin(), corrQxA.end(), 0.0)); + registry.get(HIST("recentering/QYA_vs_iteration"))->Fill(pb + 1, q[1] - std::accumulate(corrQyA.begin(), corrQyA.end(), 0.0)); + registry.get(HIST("recentering/QXC_vs_iteration"))->Fill(pb + 1, q[2] - std::accumulate(corrQxC.begin(), corrQxC.end(), 0.0)); + registry.get(HIST("recentering/QYC_vs_iteration"))->Fill(pb + 1, q[3] - std::accumulate(corrQyC.begin(), corrQyC.end(), 0.0)); + } + pb++; + + for (int step = 2; step <= nSteps; step++) { + corrQxA.push_back(getCorrection(names[step - 1][0].Data(), it, step)); + corrQyA.push_back(getCorrection(names[step - 1][1].Data(), it, step)); + corrQxC.push_back(getCorrection(names[step - 1][2].Data(), it, step)); + corrQyC.push_back(getCorrection(names[step - 1][3].Data(), it, step)); if (cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { registry.get(HIST("recentering/QXA_vs_iteration"))->Fill(pb + 1, q[0] - std::accumulate(corrQxA.begin(), corrQxA.end(), 0.0)); @@ -1145,226 +1159,212 @@ struct ZdcQVectors { registry.get(HIST("recentering/QXC_vs_iteration"))->Fill(pb + 1, q[2] - std::accumulate(corrQxC.begin(), corrQxC.end(), 0.0)); registry.get(HIST("recentering/QYC_vs_iteration"))->Fill(pb + 1, q[3] - std::accumulate(corrQyC.begin(), corrQyC.end(), 0.0)); } - pb++; - for (int step = 2; step <= nSteps; step++) { - corrQxA.push_back(getCorrection(names[step - 1][0].Data(), it, step)); - corrQyA.push_back(getCorrection(names[step - 1][1].Data(), it, step)); - corrQxC.push_back(getCorrection(names[step - 1][2].Data(), it, step)); - corrQyC.push_back(getCorrection(names[step - 1][3].Data(), it, step)); - - if (cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { - registry.get(HIST("recentering/QXA_vs_iteration"))->Fill(pb + 1, q[0] - std::accumulate(corrQxA.begin(), corrQxA.end(), 0.0)); - registry.get(HIST("recentering/QYA_vs_iteration"))->Fill(pb + 1, q[1] - std::accumulate(corrQyA.begin(), corrQyA.end(), 0.0)); - registry.get(HIST("recentering/QXC_vs_iteration"))->Fill(pb + 1, q[2] - std::accumulate(corrQxC.begin(), corrQxC.end(), 0.0)); - registry.get(HIST("recentering/QYC_vs_iteration"))->Fill(pb + 1, q[3] - std::accumulate(corrQyC.begin(), corrQyC.end(), 0.0)); - } + pb++; + } - pb++; - } + if (extraTS.cfgCCDBDir_RecenterForTimestamp) { + corrQxA.push_back(getCorrection(namesTS[0].Data(), it, 6)); + corrQyA.push_back(getCorrection(namesTS[1].Data(), it, 6)); + corrQxC.push_back(getCorrection(namesTS[2].Data(), it, 6)); + corrQyC.push_back(getCorrection(namesTS[3].Data(), it, 6)); - if (extraTS.cfgCCDBDir_RecenterForTimestamp) { - corrQxA.push_back(getCorrection(namesTS[0].Data(), it, 6)); - corrQyA.push_back(getCorrection(namesTS[1].Data(), it, 6)); - corrQxC.push_back(getCorrection(namesTS[2].Data(), it, 6)); - corrQyC.push_back(getCorrection(namesTS[3].Data(), it, 6)); - - if (cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { - registry.get(HIST("recentering/QXA_vs_iteration"))->Fill(pb + 1, q[0] - std::accumulate(corrQxA.begin(), corrQxA.end(), 0.0)); - registry.get(HIST("recentering/QYA_vs_iteration"))->Fill(pb + 1, q[1] - std::accumulate(corrQyA.begin(), corrQyA.end(), 0.0)); - registry.get(HIST("recentering/QXC_vs_iteration"))->Fill(pb + 1, q[2] - std::accumulate(corrQxC.begin(), corrQxC.end(), 0.0)); - registry.get(HIST("recentering/QYC_vs_iteration"))->Fill(pb + 1, q[3] - std::accumulate(corrQyC.begin(), corrQyC.end(), 0.0)); - } - pb++; + if (cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { + registry.get(HIST("recentering/QXA_vs_iteration"))->Fill(pb + 1, q[0] - std::accumulate(corrQxA.begin(), corrQxA.end(), 0.0)); + registry.get(HIST("recentering/QYA_vs_iteration"))->Fill(pb + 1, q[1] - std::accumulate(corrQyA.begin(), corrQyA.end(), 0.0)); + registry.get(HIST("recentering/QXC_vs_iteration"))->Fill(pb + 1, q[2] - std::accumulate(corrQxC.begin(), corrQxC.end(), 0.0)); + registry.get(HIST("recentering/QYC_vs_iteration"))->Fill(pb + 1, q[3] - std::accumulate(corrQyC.begin(), corrQyC.end(), 0.0)); } + pb++; } + } - double totalCorrectionQxA = std::accumulate(corrQxA.begin(), corrQxA.end(), 0.0); - double totalCorrectionQyA = std::accumulate(corrQyA.begin(), corrQyA.end(), 0.0); - double totalCorrectionQxC = std::accumulate(corrQxC.begin(), corrQxC.end(), 0.0); - double totalCorrectionQyC = std::accumulate(corrQyC.begin(), corrQyC.end(), 0.0); + double totalCorrectionQxA = std::accumulate(corrQxA.begin(), corrQxA.end(), 0.0); + double totalCorrectionQyA = std::accumulate(corrQyA.begin(), corrQyA.end(), 0.0); + double totalCorrectionQxC = std::accumulate(corrQxC.begin(), corrQxC.end(), 0.0); + double totalCorrectionQyC = std::accumulate(corrQyC.begin(), corrQyC.end(), 0.0); - qRec[0] -= totalCorrectionQxA; - qRec[1] -= totalCorrectionQyA; - qRec[2] -= totalCorrectionQxC; - qRec[3] -= totalCorrectionQyC; + qRec[0] -= totalCorrectionQxA; + qRec[1] -= totalCorrectionQyA; + qRec[2] -= totalCorrectionQxC; + qRec[3] -= totalCorrectionQyC; - // do shift for psi. - double psiZDCA = 1.0 * std::atan2(qRec[1], qRec[0]); - double psiZDCC = 1.0 * std::atan2(qRec[3], qRec[2]); + // do shift for psi. + double psiZDCA = 1.0 * std::atan2(qRec[1], qRec[0]); + double psiZDCC = 1.0 * std::atan2(qRec[3], qRec[2]); - int nshift = 10; // no. of iterations + int nshift = 10; // no. of iterations - double psiZDCAshift = psiZDCA; - double psiZDCCshift = psiZDCC; + double psiZDCAshift = psiZDCA; + double psiZDCCshift = psiZDCC; - double deltaPsiZDCA = 0; - double deltaPsiZDCC = 0; + double deltaPsiZDCA = 0; + double deltaPsiZDCC = 0; - if (!cfgCCDBdir_Shift.value.empty() && !cal.isShiftProfileFound) { - LOGF(info, "Getting shift profile from CCDB for runnumber: %d", runnumber); - auto hcorrList = ccdb->getForTimeStamp(cfgCCDBdir_Shift.value, foundBC.timestamp()); - auto shiftProfileC = dynamic_cast(hcorrList->FindObject("ShiftZDCC")); - if (shiftProfileC) { - cal.shiftprofileC = shiftProfileC; - } - auto shiftProfileA = dynamic_cast(hcorrList->FindObject("ShiftZDCA")); - if (shiftProfileA) { - cal.shiftprofileA = shiftProfileA; - } - if (!cal.shiftprofileC || !cal.shiftprofileA) { - LOGF(error, "Shift profile not found in CCDB for runnumber: %d", runnumber); - cal.isShiftProfileFound = false; - } else { - LOGF(info, "Shift profile found in CCDB for runnumber: %d", runnumber); - cal.isShiftProfileFound = true; - } + if (!cfgCCDBdir_Shift.value.empty() && !cal.isShiftProfileFound) { + LOGF(info, "Getting shift profile from CCDB for runnumber: %d", runnumber); + auto hcorrList = ccdb->getForTimeStamp(cfgCCDBdir_Shift.value, foundBC.timestamp()); + auto shiftProfileC = dynamic_cast(hcorrList->FindObject("ShiftZDCC")); + if (shiftProfileC) { + cal.shiftprofileC = shiftProfileC; } - - for (int ishift = 1; ishift <= nshift; ishift++) { - if (!cfgFillNothing && isEventSelected) { - registry.fill(HIST("shift/ShiftZDCC"), cent, 0.5, ishift - 0.5, std::sin(ishift * 1.0 * psiZDCC)); - registry.fill(HIST("shift/ShiftZDCC"), cent, 1.5, ishift - 0.5, std::cos(ishift * 1.0 * psiZDCC)); - registry.fill(HIST("shift/ShiftZDCA"), cent, 0.5, ishift - 0.5, std::sin(ishift * 1.0 * psiZDCA)); - registry.fill(HIST("shift/ShiftZDCA"), cent, 1.5, ishift - 0.5, std::cos(ishift * 1.0 * psiZDCA)); - } + auto shiftProfileA = dynamic_cast(hcorrList->FindObject("ShiftZDCA")); + if (shiftProfileA) { + cal.shiftprofileA = shiftProfileA; } + if (!cal.shiftprofileC || !cal.shiftprofileA) { + LOGF(error, "Shift profile not found in CCDB for runnumber: %d", runnumber); + cal.isShiftProfileFound = false; + } else { + LOGF(info, "Shift profile found in CCDB for runnumber: %d", runnumber); + cal.isShiftProfileFound = true; + } + } - float coeffshiftxZDCC = 0.0; - float coeffshiftyZDCC = 0.0; - float coeffshiftxZDCA = 0.0; - float coeffshiftyZDCA = 0.0; + for (int ishift = 1; ishift <= nshift; ishift++) { + if (!cfgFillNothing && isEventSelected) { + registry.fill(HIST("shift/ShiftZDCC"), cent, 0.5, ishift - 0.5, std::sin(ishift * 1.0 * psiZDCC)); + registry.fill(HIST("shift/ShiftZDCC"), cent, 1.5, ishift - 0.5, std::cos(ishift * 1.0 * psiZDCC)); + registry.fill(HIST("shift/ShiftZDCA"), cent, 0.5, ishift - 0.5, std::sin(ishift * 1.0 * psiZDCA)); + registry.fill(HIST("shift/ShiftZDCA"), cent, 1.5, ishift - 0.5, std::cos(ishift * 1.0 * psiZDCA)); + } + } - if (cal.isShiftProfileFound) { - for (int ishift = 1; ishift <= nshift; ishift++) { - int binshiftxZDCC = cal.shiftprofileC->FindBin(cent, 0.5, ishift - 0.5); // bin 0.5 - int binshiftyZDCC = cal.shiftprofileC->FindBin(cent, 1.5, ishift - 0.5); - int binshiftxZDCA = cal.shiftprofileA->FindBin(cent, 0.5, ishift - 0.5); - int binshiftyZDCA = cal.shiftprofileA->FindBin(cent, 1.5, ishift - 0.5); + float coeffshiftxZDCC = 0.0; + float coeffshiftyZDCC = 0.0; + float coeffshiftxZDCA = 0.0; + float coeffshiftyZDCA = 0.0; - if (binshiftxZDCC > 0) { - coeffshiftxZDCC = cal.shiftprofileC->GetBinContent(binshiftxZDCC); - } - if (binshiftyZDCC > 0) { - coeffshiftyZDCC = cal.shiftprofileC->GetBinContent(binshiftyZDCC); - } - if (binshiftxZDCA > 0) { - coeffshiftxZDCA = cal.shiftprofileA->GetBinContent(binshiftxZDCA); - } - if (binshiftyZDCA > 0) { - coeffshiftyZDCA = cal.shiftprofileA->GetBinContent(binshiftyZDCA); - } + if (cal.isShiftProfileFound) { + for (int ishift = 1; ishift <= nshift; ishift++) { + int binshiftxZDCC = cal.shiftprofileC->FindBin(cent, 0.5, ishift - 0.5); // bin 0.5 + int binshiftyZDCC = cal.shiftprofileC->FindBin(cent, 1.5, ishift - 0.5); + int binshiftxZDCA = cal.shiftprofileA->FindBin(cent, 0.5, ishift - 0.5); + int binshiftyZDCA = cal.shiftprofileA->FindBin(cent, 1.5, ishift - 0.5); - deltaPsiZDCC += ((2 / (1.0 * ishift)) * (-1.0 * coeffshiftxZDCC * std::cos(ishift * 1.0 * psiZDCC) + coeffshiftyZDCC * std::sin(ishift * 1.0 * psiZDCC))); - deltaPsiZDCA += ((2 / (1.0 * ishift)) * (-1.0 * coeffshiftxZDCA * std::cos(ishift * 1.0 * psiZDCA) + coeffshiftyZDCA * std::sin(ishift * 1.0 * psiZDCA))); + if (binshiftxZDCC > 0) { + coeffshiftxZDCC = cal.shiftprofileC->GetBinContent(binshiftxZDCC); + } + if (binshiftyZDCC > 0) { + coeffshiftyZDCC = cal.shiftprofileC->GetBinContent(binshiftyZDCC); + } + if (binshiftxZDCA > 0) { + coeffshiftxZDCA = cal.shiftprofileA->GetBinContent(binshiftxZDCA); } + if (binshiftyZDCA > 0) { + coeffshiftyZDCA = cal.shiftprofileA->GetBinContent(binshiftyZDCA); + } + + deltaPsiZDCC += ((2 / (1.0 * ishift)) * (-1.0 * coeffshiftxZDCC * std::cos(ishift * 1.0 * psiZDCC) + coeffshiftyZDCC * std::sin(ishift * 1.0 * psiZDCC))); + deltaPsiZDCA += ((2 / (1.0 * ishift)) * (-1.0 * coeffshiftxZDCA * std::cos(ishift * 1.0 * psiZDCA) + coeffshiftyZDCA * std::sin(ishift * 1.0 * psiZDCA))); } + } - psiZDCCshift += deltaPsiZDCC; - psiZDCAshift += deltaPsiZDCA; + psiZDCCshift += deltaPsiZDCC; + psiZDCAshift += deltaPsiZDCA; - // Normalize angles to [-pi, pi] - psiZDCCshift = std::atan2(std::sin(psiZDCCshift), std::cos(psiZDCCshift)); - psiZDCAshift = std::atan2(std::sin(psiZDCAshift), std::cos(psiZDCAshift)); + // Normalize angles to [-pi, pi] + psiZDCCshift = std::atan2(std::sin(psiZDCCshift), std::cos(psiZDCCshift)); + psiZDCAshift = std::atan2(std::sin(psiZDCAshift), std::cos(psiZDCAshift)); - if (cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { - registry.fill(HIST("QA/shift/psiZDCA"), psiZDCA, cent); - registry.fill(HIST("QA/shift/psiZDCC"), psiZDCC, cent); - registry.fill(HIST("QA/shift/psiZDCAC"), psiZDCA, psiZDCC); - registry.fill(HIST("QA/shift/psiZDCA_shift"), psiZDCAshift, cent); - registry.fill(HIST("QA/shift/psiZDCC_shift"), psiZDCCshift, cent); - registry.fill(HIST("QA/shift/psiZDCAC_shift"), psiZDCAshift, psiZDCCshift); - registry.fill(HIST("QA/shift/DeltaPsiZDCA"), psiZDCAshift, psiZDCA); - registry.fill(HIST("QA/shift/DeltaPsiZDCC"), psiZDCCshift, psiZDCC); - registry.fill(HIST("QA/shift/DeltaPsiZDCAC"), psiZDCAshift - psiZDCA, psiZDCCshift - psiZDCC); + if (cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { + registry.fill(HIST("QA/shift/psiZDCA"), psiZDCA, cent); + registry.fill(HIST("QA/shift/psiZDCC"), psiZDCC, cent); + registry.fill(HIST("QA/shift/psiZDCAC"), psiZDCA, psiZDCC); + registry.fill(HIST("QA/shift/psiZDCA_shift"), psiZDCAshift, cent); + registry.fill(HIST("QA/shift/psiZDCC_shift"), psiZDCCshift, cent); + registry.fill(HIST("QA/shift/psiZDCAC_shift"), psiZDCAshift, psiZDCCshift); + registry.fill(HIST("QA/shift/DeltaPsiZDCA"), psiZDCAshift, psiZDCA); + registry.fill(HIST("QA/shift/DeltaPsiZDCC"), psiZDCCshift, psiZDCC); + registry.fill(HIST("QA/shift/DeltaPsiZDCAC"), psiZDCAshift - psiZDCA, psiZDCCshift - psiZDCC); + } + + double qXaShift = std::hypot(qRec[1], qRec[0]) * std::cos(psiZDCAshift); + double qYaShift = std::hypot(qRec[1], qRec[0]) * std::sin(psiZDCAshift); + double qXcShift = std::hypot(qRec[2], qRec[3]) * std::cos(psiZDCCshift); + double qYcShift = std::hypot(qRec[2], qRec[3]) * std::sin(psiZDCCshift); + + if (!cal.calibfilesLoaded[kRecShift]) { + if (cal.isSelected && cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { + fillCommonRegistry(qXaShift, qYaShift, qXcShift, qYcShift, cal.v, cent, rsTimestamp); + registry.fill(HIST("QA/centrality_after"), cent); + registry.get(HIST("QA/after/ZNA_Qx"))->Fill(Form("%d", runnumber), qXaShift); + registry.get(HIST("QA/after/ZNA_Qy"))->Fill(Form("%d", runnumber), qYaShift); + registry.get(HIST("QA/after/ZNC_Qx"))->Fill(Form("%d", runnumber), qXcShift); + registry.get(HIST("QA/after/ZNC_Qy"))->Fill(Form("%d", runnumber), qYcShift); } - double qXaShift = std::hypot(qRec[1], qRec[0]) * std::cos(psiZDCAshift); - double qYaShift = std::hypot(qRec[1], qRec[0]) * std::sin(psiZDCAshift); - double qXcShift = std::hypot(qRec[2], qRec[3]) * std::cos(psiZDCCshift); - double qYcShift = std::hypot(qRec[2], qRec[3]) * std::sin(psiZDCCshift); - - if (!cal.calibfilesLoaded[kRecShift]) { - if (cal.isSelected && cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { - fillCommonRegistry(qXaShift, qYaShift, qXcShift, qYcShift, cal.v, cent, rsTimestamp); - registry.fill(HIST("QA/centrality_after"), cent); - registry.get(HIST("QA/after/ZNA_Qx"))->Fill(Form("%d", runnumber), qXaShift); - registry.get(HIST("QA/after/ZNA_Qy"))->Fill(Form("%d", runnumber), qYaShift); - registry.get(HIST("QA/after/ZNC_Qx"))->Fill(Form("%d", runnumber), qXcShift); - registry.get(HIST("QA/after/ZNC_Qy"))->Fill(Form("%d", runnumber), qYcShift); - } + spTableZDC(runnumber, cents, cal.v, foundBC.timestamp(), qXaShift, qYaShift, qXcShift, qYcShift, cal.isSelected, eventSelectionFlags); + qRec = {0, 0, 0, 0}; - spTableZDC(runnumber, cents, cal.v, foundBC.timestamp(), qXaShift, qYaShift, qXcShift, qYcShift, cal.isSelected, eventSelectionFlags); - qRec = {0, 0, 0, 0}; + cal.lastRunNumber = runnumber; + return; + } + // vector of 4 + corrQxA.clear(); + corrQyA.clear(); + corrQxC.clear(); + corrQyC.clear(); + + if (cal.isSelected && cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { + fillCommonRegistry(qXaShift, qYaShift, qXcShift, qYcShift, cal.v, cent, rsTimestamp); + } - cal.lastRunNumber = runnumber; - return; - } - // vector of 4 - corrQxA.clear(); - corrQyA.clear(); - corrQxC.clear(); - corrQyC.clear(); + for (int it = 1; it <= cfgNIterationsAfterShift; it++) { + corrQxA.push_back(getCorrection(names[0][0].Data(), it, 1)); + corrQyA.push_back(getCorrection(names[0][1].Data(), it, 1)); + corrQxC.push_back(getCorrection(names[0][2].Data(), it, 1)); + corrQyC.push_back(getCorrection(names[0][3].Data(), it, 1)); - if (cal.isSelected && cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { - fillCommonRegistry(qXaShift, qYaShift, qXcShift, qYcShift, cal.v, cent, rsTimestamp); + if (cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { + registry.get(HIST("recentering/QXA_vs_iteration"))->Fill(pb + 1, qXaShift - std::accumulate(corrQxA.begin(), corrQxA.end(), 0.0)); + registry.get(HIST("recentering/QYA_vs_iteration"))->Fill(pb + 1, qYaShift - std::accumulate(corrQyA.begin(), corrQyA.end(), 0.0)); + registry.get(HIST("recentering/QXC_vs_iteration"))->Fill(pb + 1, qXcShift - std::accumulate(corrQxC.begin(), corrQxC.end(), 0.0)); + registry.get(HIST("recentering/QYC_vs_iteration"))->Fill(pb + 1, qYcShift - std::accumulate(corrQyC.begin(), corrQyC.end(), 0.0)); } + pb++; - for (int it = 1; it <= cfgNIterationsAfterShift; it++) { - corrQxA.push_back(getCorrection(names[0][0].Data(), it, 1)); - corrQyA.push_back(getCorrection(names[0][1].Data(), it, 1)); - corrQxC.push_back(getCorrection(names[0][2].Data(), it, 1)); - corrQyC.push_back(getCorrection(names[0][3].Data(), it, 1)); + for (int step = 2; step <= nSteps; step++) { + corrQxA.push_back(getCorrection(names[step - 1][0].Data(), it, step)); + corrQyA.push_back(getCorrection(names[step - 1][1].Data(), it, step)); + corrQxC.push_back(getCorrection(names[step - 1][2].Data(), it, step)); + corrQyC.push_back(getCorrection(names[step - 1][3].Data(), it, step)); if (cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { - registry.get(HIST("recentering/QXA_vs_iteration"))->Fill(pb + 1, qXaShift - std::accumulate(corrQxA.begin(), corrQxA.end(), 0.0)); - registry.get(HIST("recentering/QYA_vs_iteration"))->Fill(pb + 1, qYaShift - std::accumulate(corrQyA.begin(), corrQyA.end(), 0.0)); - registry.get(HIST("recentering/QXC_vs_iteration"))->Fill(pb + 1, qXcShift - std::accumulate(corrQxC.begin(), corrQxC.end(), 0.0)); - registry.get(HIST("recentering/QYC_vs_iteration"))->Fill(pb + 1, qYcShift - std::accumulate(corrQyC.begin(), corrQyC.end(), 0.0)); + registry.get(HIST("recentering/QXA_vs_iteration"))->Fill(pb + 1, q[0] - std::accumulate(corrQxA.begin(), corrQxA.end(), 0.0)); + registry.get(HIST("recentering/QYA_vs_iteration"))->Fill(pb + 1, q[1] - std::accumulate(corrQyA.begin(), corrQyA.end(), 0.0)); + registry.get(HIST("recentering/QXC_vs_iteration"))->Fill(pb + 1, q[2] - std::accumulate(corrQxC.begin(), corrQxC.end(), 0.0)); + registry.get(HIST("recentering/QYC_vs_iteration"))->Fill(pb + 1, q[3] - std::accumulate(corrQyC.begin(), corrQyC.end(), 0.0)); } + pb++; + } - for (int step = 2; step <= nSteps; step++) { - corrQxA.push_back(getCorrection(names[step - 1][0].Data(), it, step)); - corrQyA.push_back(getCorrection(names[step - 1][1].Data(), it, step)); - corrQxC.push_back(getCorrection(names[step - 1][2].Data(), it, step)); - corrQyC.push_back(getCorrection(names[step - 1][3].Data(), it, step)); - - if (cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { - registry.get(HIST("recentering/QXA_vs_iteration"))->Fill(pb + 1, q[0] - std::accumulate(corrQxA.begin(), corrQxA.end(), 0.0)); - registry.get(HIST("recentering/QYA_vs_iteration"))->Fill(pb + 1, q[1] - std::accumulate(corrQyA.begin(), corrQyA.end(), 0.0)); - registry.get(HIST("recentering/QXC_vs_iteration"))->Fill(pb + 1, q[2] - std::accumulate(corrQxC.begin(), corrQxC.end(), 0.0)); - registry.get(HIST("recentering/QYC_vs_iteration"))->Fill(pb + 1, q[3] - std::accumulate(corrQyC.begin(), corrQyC.end(), 0.0)); - } + double totalCorrectionQxAshift = std::accumulate(corrQxA.begin(), corrQxA.end(), 0.0); + double totalCorrectionQyAshift = std::accumulate(corrQyA.begin(), corrQyA.end(), 0.0); + double totalCorrectionQxCshift = std::accumulate(corrQxC.begin(), corrQxC.end(), 0.0); + double totalCorrectionQyCshift = std::accumulate(corrQyC.begin(), corrQyC.end(), 0.0); - pb++; - } + qXaShift -= totalCorrectionQxAshift; + qYaShift -= totalCorrectionQyAshift; + qXcShift -= totalCorrectionQxCshift; + qYcShift -= totalCorrectionQyCshift; - double totalCorrectionQxAshift = std::accumulate(corrQxA.begin(), corrQxA.end(), 0.0); - double totalCorrectionQyAshift = std::accumulate(corrQyA.begin(), corrQyA.end(), 0.0); - double totalCorrectionQxCshift = std::accumulate(corrQxC.begin(), corrQxC.end(), 0.0); - double totalCorrectionQyCshift = std::accumulate(corrQyC.begin(), corrQyC.end(), 0.0); - - qXaShift -= totalCorrectionQxAshift; - qYaShift -= totalCorrectionQyAshift; - qXcShift -= totalCorrectionQxCshift; - qYcShift -= totalCorrectionQyCshift; - - if (cal.isSelected && cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { - fillCommonRegistry(qXaShift, qYaShift, qXcShift, qYcShift, cal.v, cent, rsTimestamp); - registry.fill(HIST("QA/centrality_after"), cent); - registry.get(HIST("QA/after/ZNA_Qx"))->Fill(Form("%d", runnumber), qXaShift); - registry.get(HIST("QA/after/ZNA_Qy"))->Fill(Form("%d", runnumber), qYaShift); - registry.get(HIST("QA/after/ZNC_Qx"))->Fill(Form("%d", runnumber), qXcShift); - registry.get(HIST("QA/after/ZNC_Qy"))->Fill(Form("%d", runnumber), qYcShift); - } + if (cal.isSelected && cfgFillHistRegistry && !cfgFillNothing && isEventSelected) { + fillCommonRegistry(qXaShift, qYaShift, qXcShift, qYcShift, cal.v, cent, rsTimestamp); + registry.fill(HIST("QA/centrality_after"), cent); + registry.get(HIST("QA/after/ZNA_Qx"))->Fill(Form("%d", runnumber), qXaShift); + registry.get(HIST("QA/after/ZNA_Qy"))->Fill(Form("%d", runnumber), qYaShift); + registry.get(HIST("QA/after/ZNC_Qx"))->Fill(Form("%d", runnumber), qXcShift); + registry.get(HIST("QA/after/ZNC_Qy"))->Fill(Form("%d", runnumber), qYcShift); + } - spTableZDC(runnumber, cents, cal.v, foundBC.timestamp(), qXaShift, qYaShift, qXcShift, qYcShift, cal.isSelected, eventSelectionFlags); - qRec = {0, 0, 0, 0}; + spTableZDC(runnumber, cents, cal.v, foundBC.timestamp(), qXaShift, qYaShift, qXcShift, qYcShift, cal.isSelected, eventSelectionFlags); + qRec = {0, 0, 0, 0}; - cal.lastRunNumber = runnumber; - return; - } + cal.lastRunNumber = runnumber; + return; + } LOGF(warning, "We return without saving table... -> THis is a problem"); cal.lastRunNumber = runnumber; diff --git a/PWGCF/Flow/Tasks/flowAnalysisGF.cxx b/PWGCF/Flow/Tasks/flowAnalysisGF.cxx index ff45727cfb8..2e951ae516b 100644 --- a/PWGCF/Flow/Tasks/flowAnalysisGF.cxx +++ b/PWGCF/Flow/Tasks/flowAnalysisGF.cxx @@ -739,7 +739,7 @@ struct flowAnalysisGF { } Filter collisionFilter = nabs(aod::collision::posZ) < cfgVtxZ; - Filter trackFilter = nabs(aod::track::eta) < cfgEta && aod::track::pt > cfgPtmin&& aod::track::pt < cfgPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && nabs(aod::track::dcaXY) < cfgDCAxy&& nabs(aod::track::dcaZ) < cfgDCAz; + Filter trackFilter = nabs(aod::track::eta) < cfgEta && aod::track::pt > cfgPtmin&& aod::track::pt < cfgPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && nabs(aod::track::dcaXY) < cfgDCAxy&& nabs(aod::track::dcaZ) < cfgDCAz; using myTracks = soa::Filtered>; diff --git a/PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx b/PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx index 1f886490fcb..54a54a3273a 100644 --- a/PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx +++ b/PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx @@ -238,7 +238,7 @@ struct FlowGfwOmegaXi { AxisSpec axisMultiplicity{{0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90}, "Centrality (%)"}; Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; - Filter trackFilter = (nabs(aod::track::eta) < trkQualityOpts.cfgCutEta.value) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls); + Filter trackFilter = (nabs(aod::track::eta) < trkQualityOpts.cfgCutEta.value) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls); using TracksPID = soa::Join; using AodTracks = soa::Filtered>; // tracks filter diff --git a/PWGCF/Flow/Tasks/flowPbpbPikp.cxx b/PWGCF/Flow/Tasks/flowPbpbPikp.cxx index 8abf37f3f09..76f35287e4c 100644 --- a/PWGCF/Flow/Tasks/flowPbpbPikp.cxx +++ b/PWGCF/Flow/Tasks/flowPbpbPikp.cxx @@ -150,7 +150,7 @@ struct FlowPbpbPikp { std::vector eventCuts; Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; - Filter trackFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtPOIMin) && (aod::track::pt < cfgCutPtPOIMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls); + Filter trackFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtPOIMin) && (aod::track::pt < cfgCutPtPOIMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls); using AodCollisions = soa::Filtered>; using AodTracksWithoutBayes = soa::Filtered>; diff --git a/PWGCF/Flow/Tasks/flowPidCme.cxx b/PWGCF/Flow/Tasks/flowPidCme.cxx index 1194b1d517c..e6a00c174bd 100644 --- a/PWGCF/Flow/Tasks/flowPidCme.cxx +++ b/PWGCF/Flow/Tasks/flowPidCme.cxx @@ -237,7 +237,7 @@ struct FillPIDcolums { if (std::abs(track.eta()) > cfgMaxEtaPID) return false; if (cfgRequireGlobalTrack) { - if (!(track.isGlobalTrackSDD() == (uint8_t)true)) + if (!(track.isGlobalTrackSDD() == static_cast(true))) return false; } if (cfgUseCostomTrackCuts) { @@ -1568,7 +1568,7 @@ struct QAProcessCent { std::vector> vhistnSigmaTOFTPCPtNegKaAfterCen; std::vector> vhistnSigmaTOFTPCPtPosPrAfterCen; std::vector> vhistnSigmaTOFTPCPtNegPrAfterCen; - Filter trackPIDfilter = aod::cme_track_pid_columns::nPidFlag > (int8_t)0; + Filter trackPIDfilter = aod::cme_track_pid_columns::nPidFlag > static_cast(0); void init(InitContext const&) { AxisSpec axisPhicme = {100, 0, 2.1 * constants::math::PI, "#phi"}; @@ -2106,7 +2106,7 @@ struct FlowPidCme { Filter collisionFilter = (nabs(aod::collision::posZ) < cfgVtzCut) && (aod::cent::centFT0C > cfgCentMin) && (aod::cent::centFT0C < cfgCentMax); Filter ptfilter = aod::track::pt > cfgMinPt; Filter etafilter = aod::track::eta < cfgMaxEta; - Filter properPIDfilter = aod::cme_track_pid_columns::nPidFlag >= (int8_t)0; + Filter properPIDfilter = aod::cme_track_pid_columns::nPidFlag >= static_cast(0); Partition>> tracksSet1 = ((aod::cme_track_pid_columns::nPidFlag == pid_flags::kPion) || (aod::cme_track_pid_columns::nPidFlag == pid_flags::kPionKaon) || (aod::cme_track_pid_columns::nPidFlag == pid_flags::kPionProton) || (aod::cme_track_pid_columns::nPidFlag == pid_flags::kPionKaonProton)); Partition>> tracksSet2 = ((aod::cme_track_pid_columns::nPidFlag == pid_flags::kKaon) || (aod::cme_track_pid_columns::nPidFlag == pid_flags::kPionKaon) || (aod::cme_track_pid_columns::nPidFlag == pid_flags::kKaonProton) || (aod::cme_track_pid_columns::nPidFlag == pid_flags::kPionKaonProton)); diff --git a/PWGCF/Flow/Tasks/flowQa.cxx b/PWGCF/Flow/Tasks/flowQa.cxx index 2221f27a321..305644c9e60 100644 --- a/PWGCF/Flow/Tasks/flowQa.cxx +++ b/PWGCF/Flow/Tasks/flowQa.cxx @@ -459,7 +459,7 @@ struct FlowQa { } LOGF(info, "Loaded acceptance weights list from %s (%p)", cfgAcceptanceList.value.c_str(), (void*)mAcceptanceList); - mAcceptance = static_cast(mAcceptanceList->FindObject(Form("%d", runNumber))); + mAcceptance = dynamic_cast(mAcceptanceList->FindObject(Form("%d", runNumber))); if (mAcceptance == nullptr) { LOGF(fatal, "Could not find acceptance weights for run %d in acceptance list", runNumber); } diff --git a/PWGCF/Flow/Tasks/flowRunbyRun.cxx b/PWGCF/Flow/Tasks/flowRunbyRun.cxx index bf4bb37d581..378b63d820c 100644 --- a/PWGCF/Flow/Tasks/flowRunbyRun.cxx +++ b/PWGCF/Flow/Tasks/flowRunbyRun.cxx @@ -127,7 +127,7 @@ struct FlowRunbyRun { ConfigurableAxis axisT0A{"axisT0A", {200, 0, 200000}, "N_{ch} (T0A)"}; Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; - Filter trackFilter = ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz); + Filter trackFilter = ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz); // Corrections TH1D* mEfficiency = nullptr; @@ -341,7 +341,7 @@ struct FlowRunbyRun { } LOGF(info, "Loaded acceptance weights list from %s (%p)", cfgAcceptanceList.value.c_str(), (void*)mAcceptanceList); - mAcceptance = static_cast(mAcceptanceList->FindObject(Form("%d", runNumber))); + mAcceptance = dynamic_cast(mAcceptanceList->FindObject(Form("%d", runNumber))); if (mAcceptance == nullptr) { LOGF(fatal, "Could not find acceptance weights for run %d in acceptance list", runNumber); } diff --git a/PWGCF/Flow/Tasks/flowSP.cxx b/PWGCF/Flow/Tasks/flowSP.cxx index 26b96ec9c80..f15ac08fe19 100644 --- a/PWGCF/Flow/Tasks/flowSP.cxx +++ b/PWGCF/Flow/Tasks/flowSP.cxx @@ -173,7 +173,7 @@ struct FlowSP { RCTFlagsChecker rctChecker; Filter collisionFilter = nabs(aod::collision::posZ) < cfg.cEvSelsVtxZ; - Filter trackFilter = nabs(aod::track::eta) < cfg.cTrackSelsEta && aod::track::pt > cfg.cTrackSelsPtmin&& aod::track::pt < cfg.cTrackSelsPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true) || cfg.cIsMCReco) && nabs(aod::track::dcaXY) < cfg.cTrackSelsDCAxy&& nabs(aod::track::dcaZ) < cfg.cTrackSelsDCAz; + Filter trackFilter = nabs(aod::track::eta) < cfg.cTrackSelsEta && aod::track::pt > cfg.cTrackSelsPtmin&& aod::track::pt < cfg.cTrackSelsPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true)) || cfg.cIsMCReco) && nabs(aod::track::dcaXY) < cfg.cTrackSelsDCAxy&& nabs(aod::track::dcaZ) < cfg.cTrackSelsDCAz; Filter trackFilterMC = nabs(aod::mcparticle::eta) < cfg.cTrackSelsEta && aod::mcparticle::pt > cfg.cTrackSelsPtmin&& aod::mcparticle::pt < cfg.cTrackSelsPtmax; using GeneralCollisions = soa::Join; using UnfilteredTracksPID = soa::Join; diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index ec583bdabd8..a5b7c0ae5f7 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -253,7 +253,7 @@ struct FlowTask { ConfigurableAxis axisDCAxy{"axisDCAxy", {200, -1, 1}, "DCA_{xy} (cm)"}; Filter collisionFilter = (nabs(aod::collision::posZ) < cfgCutVertex) && (aod::cent::centFT0C > cfgCentFT0CMin) && (aod::cent::centFT0C < cfgCentFT0CMax); - Filter trackFilter = ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax); + Filter trackFilter = ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax); using FilteredCollisions = soa::Filtered>; using FilteredTracks = soa::Filtered>; // Filter for MCcollisions diff --git a/PWGCF/Flow/Tasks/flowTransmutation.cxx b/PWGCF/Flow/Tasks/flowTransmutation.cxx index fa0fe8210f4..2b7592eeaca 100644 --- a/PWGCF/Flow/Tasks/flowTransmutation.cxx +++ b/PWGCF/Flow/Tasks/flowTransmutation.cxx @@ -123,7 +123,7 @@ struct FlowTransmutation { HistogramRegistry registryQA{"registryQA"}; HistogramRegistry registryCorr{"registryCorr"}; Filter collisionFilter = (nabs(aod::collision::posZ) < cfgEventSelection.cfgCutVertex); - Filter trackFilter = ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax); + Filter trackFilter = ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax); Service ccdb{}; RCTFlagsChecker rctChecker{"CBT"}; enum TrackSelectionGroup { diff --git a/PWGCF/Flow/Tasks/flowZdcTask.cxx b/PWGCF/Flow/Tasks/flowZdcTask.cxx index 0186d851235..2bbe231a9b4 100644 --- a/PWGCF/Flow/Tasks/flowZdcTask.cxx +++ b/PWGCF/Flow/Tasks/flowZdcTask.cxx @@ -122,7 +122,7 @@ struct FlowZdcTask { using ColEvSels = soa::Join; using AodCollisions = soa::Filtered>; using AodTracks = soa::Filtered>; - Partition tracksIUWithTPC = (aod::track::tpcNClsFindable > (uint8_t)0); + Partition tracksIUWithTPC = (aod::track::tpcNClsFindable > static_cast(0)); using BCsRun3 = soa::Join; using TracksSel = soa::Join; using CollisionDataTable = soa::Join; diff --git a/PWGCF/Flow/Tasks/pidFlowPtCorr.cxx b/PWGCF/Flow/Tasks/pidFlowPtCorr.cxx index 60744d63d4a..2855b60e7a5 100644 --- a/PWGCF/Flow/Tasks/pidFlowPtCorr.cxx +++ b/PWGCF/Flow/Tasks/pidFlowPtCorr.cxx @@ -398,7 +398,7 @@ struct PidFlowPtCorr { // filter and using // data Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; - Filter trackFilter = ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (nabs(aod::track::eta) < trkQualityOpts.cfgCutEta.value); + Filter trackFilter = ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (nabs(aod::track::eta) < trkQualityOpts.cfgCutEta.value); using TracksPID = soa::Join; using TracksPIDForDetectorPidQA = soa::Join; diff --git a/PWGCF/Flow/Tasks/resonancesGfwFlow.cxx b/PWGCF/Flow/Tasks/resonancesGfwFlow.cxx index 9909d54112d..bf8dfde5c97 100644 --- a/PWGCF/Flow/Tasks/resonancesGfwFlow.cxx +++ b/PWGCF/Flow/Tasks/resonancesGfwFlow.cxx @@ -241,7 +241,7 @@ struct ResonancesGfwFlow { ConfigurableAxis axisParticles{"axisParticles", {3, 0, 3}, "axis for different hadrons"}; Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; - Filter trackFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtPOIMin) && (aod::track::pt < cfgCutPtPOIMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls); + Filter trackFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtPOIMin) && (aod::track::pt < cfgCutPtPOIMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls); using AodCollisions = soa::Filtered>; using AodTracksWithoutBayes = soa::Filtered>; diff --git a/PWGCF/GenericFramework/Core/BootstrapProfile.cxx b/PWGCF/GenericFramework/Core/BootstrapProfile.cxx index 94bd49a01ac..1dbe0fd28e2 100644 --- a/PWGCF/GenericFramework/Core/BootstrapProfile.cxx +++ b/PWGCF/GenericFramework/Core/BootstrapProfile.cxx @@ -56,10 +56,10 @@ void BootstrapProfile::InitializeSubsamples(Int_t nSub) delete fListOfEntries; fListOfEntries = new TList(); fListOfEntries->SetOwner(kTRUE); - TProfile* dummyPF = reinterpret_cast(this); + TProfile* dummyPF = static_cast(this); for (Int_t i = 0; i < nSub; i++) { - fListOfEntries->Add(reinterpret_cast(dummyPF->Clone(Form("%s_Subpf%i", dummyPF->GetName(), i)))); - reinterpret_cast(fListOfEntries->At(i))->Reset(); + fListOfEntries->Add(dynamic_cast(dummyPF->Clone(Form("%s_Subpf%i", dummyPF->GetName(), i)))); + dynamic_cast(fListOfEntries->At(i))->Reset(); } fNSubs = nSub; } @@ -71,7 +71,7 @@ void BootstrapProfile::FillProfile(const Double_t& xv, const Double_t& yv, const Int_t targetInd = rn * fNSubs; if (targetInd >= fNSubs) targetInd = 0; - reinterpret_cast(fListOfEntries->At(targetInd))->Fill(xv, yv, w); + dynamic_cast(fListOfEntries->At(targetInd))->Fill(xv, yv, w); } void BootstrapProfile::FillProfile(const Double_t& xv, const Double_t& yv, const Double_t& w) { @@ -83,21 +83,21 @@ void BootstrapProfile::RebinMulti(Int_t nbins) if (!fListOfEntries) return; for (Int_t i = 0; i < fListOfEntries->GetEntries(); i++) - reinterpret_cast(fListOfEntries->At(i))->RebinX(nbins); + dynamic_cast(fListOfEntries->At(i))->RebinX(nbins); } TH1* BootstrapProfile::getHist(Int_t ind) { if (fPresetWeights && fMultiRebin > 0) return getWeightBasedRebin(ind); if (ind < 0) { - return getHistRebinned(reinterpret_cast(this)); //((TProfile*)this)->ProjectionX(Form("%s_hist",this->GetName())); + return getHistRebinned(static_cast(this)); //((TProfile*)this)->ProjectionX(Form("%s_hist",this->GetName())); } else { if (!fListOfEntries) { printf("No subprofiles exist!\n"); return 0; } if (ind < fNSubs) { - return getHistRebinned(reinterpret_cast(fListOfEntries->At(ind))); ////((TProfile*)fListOfEntries->At(ind))->ProjectionX(Form("%s_sub%i",((TProfile*)fListOfEntries->At(ind))->GetName(),ind)); + return getHistRebinned(dynamic_cast(fListOfEntries->At(ind))); ////((TProfile*)fListOfEntries->At(ind))->ProjectionX(Form("%s_sub%i",((TProfile*)fListOfEntries->At(ind))->GetName(),ind)); } else { printf("Trying to fetch subprofile no %i out of %i, not possible\n", ind, fNSubs); return 0; @@ -108,14 +108,14 @@ TH1* BootstrapProfile::getHist(Int_t ind) TProfile* BootstrapProfile::getProfile(Int_t ind) { if (ind < 0) { - return reinterpret_cast(this); + return static_cast(this); } else { if (!fListOfEntries) { printf("No subprofiles exist!\n"); return 0; } if (ind < fNSubs) { - return reinterpret_cast(fListOfEntries->At(ind)); + return dynamic_cast(fListOfEntries->At(ind)); } else { printf("Trying to fetch subprofile no %i out of %i, not possible\n", ind, fNSubs); return 0; @@ -127,18 +127,18 @@ Long64_t BootstrapProfile::Merge(TCollection* collist) Long64_t nmergedpf = TProfile::Merge(collist); BootstrapProfile* l_PBS = 0; TIter all_PBS(collist); - while ((l_PBS = reinterpret_cast(all_PBS()))) { - reinterpret_cast(this)->Add(reinterpret_cast(l_PBS)); + while ((l_PBS = dynamic_cast(all_PBS()))) { + static_cast(this)->Add(static_cast(l_PBS)); TList* tarL = l_PBS->fListOfEntries; if (!tarL) continue; if (!fListOfEntries) { - fListOfEntries = reinterpret_cast(tarL->Clone()); + fListOfEntries = dynamic_cast(tarL->Clone()); for (Int_t i = 0; i < fListOfEntries->GetEntries(); i++) - reinterpret_cast(fListOfEntries->At(i))->Reset(); + dynamic_cast(fListOfEntries->At(i))->Reset(); } for (Int_t i = 0; i < fListOfEntries->GetEntries(); i++) - reinterpret_cast(fListOfEntries->At(i))->Add(reinterpret_cast(tarL->At(i))); + dynamic_cast(fListOfEntries->At(i))->Add(dynamic_cast(tarL->At(i))); } return nmergedpf; }; @@ -162,9 +162,9 @@ TH1* BootstrapProfile::getHistRebinned(TProfile* inpf) if (!inpf) return 0; if (fMultiRebin <= 0) - return reinterpret_cast(inpf)->ProjectionX(Form("%s_hist", inpf->GetName())); - TProfile* temppf = reinterpret_cast(inpf->Rebin(fMultiRebin, "tempProfile", fMultiRebinEdges)); - TH1* reth = reinterpret_cast(temppf->ProjectionX(Form("%s_hist", inpf->GetName()))); + return inpf->ProjectionX(Form("%s_hist", inpf->GetName())); + TProfile* temppf = dynamic_cast(inpf->Rebin(fMultiRebin, "tempProfile", fMultiRebinEdges)); + TH1* reth = static_cast(temppf->ProjectionX(Form("%s_hist", inpf->GetName()))); delete temppf; return reth; } @@ -210,12 +210,12 @@ void BootstrapProfile::MergeBS(BootstrapProfile* target) if (!fListOfEntries) { if (!target->fListOfEntries) return; - fListOfEntries = reinterpret_cast(tarL->Clone()); + fListOfEntries = dynamic_cast(tarL->Clone()); for (Int_t i = 0; i < fListOfEntries->GetEntries(); i++) - reinterpret_cast(fListOfEntries->At(i))->Reset(); + dynamic_cast(fListOfEntries->At(i))->Reset(); } for (Int_t i = 0; i < fListOfEntries->GetEntries(); i++) - reinterpret_cast(fListOfEntries->At(i))->Add(reinterpret_cast(tarL->At(i))); + dynamic_cast(fListOfEntries->At(i))->Add(dynamic_cast(tarL->At(i))); } TProfile* BootstrapProfile::getSummedProfiles() { @@ -223,9 +223,9 @@ TProfile* BootstrapProfile::getSummedProfiles() printf("No subprofiles initialized for the BootstrapProfile.\n"); return 0; } - TProfile* retpf = reinterpret_cast(fListOfEntries->At(0)->Clone("SummedProfile")); + TProfile* retpf = dynamic_cast(fListOfEntries->At(0)->Clone("SummedProfile")); for (Int_t i = 1; i < fListOfEntries->GetEntries(); i++) - retpf->Add(reinterpret_cast(fListOfEntries->At(i))); + retpf->Add(dynamic_cast(fListOfEntries->At(i))); return retpf; } void BootstrapProfile::OverrideMainWithSub() @@ -233,7 +233,7 @@ void BootstrapProfile::OverrideMainWithSub() TProfile* sum = getSummedProfiles(); if (!sum) return; - reinterpret_cast(this)->Reset(); - reinterpret_cast(this)->Add(sum); + static_cast(this)->Reset(); + static_cast(this)->Add(sum); delete sum; } diff --git a/PWGCF/GenericFramework/Core/BootstrapProfile.h b/PWGCF/GenericFramework/Core/BootstrapProfile.h index dd7e4d76336..6ab7340f56f 100644 --- a/PWGCF/GenericFramework/Core/BootstrapProfile.h +++ b/PWGCF/GenericFramework/Core/BootstrapProfile.h @@ -47,9 +47,9 @@ class BootstrapProfile : public TProfile void PresetWeights(BootstrapProfile* targetBS) { fPresetWeights = targetBS; } void ResetBin(Int_t nbin) { - ResetBin(reinterpret_cast(this), nbin); + ResetBin(static_cast(this), nbin); for (Int_t i = 0; i < fListOfEntries->GetEntries(); i++) - ResetBin(reinterpret_cast(fListOfEntries->At(i)), nbin); + ResetBin(dynamic_cast(fListOfEntries->At(i)), nbin); }; ClassDef(BootstrapProfile, 2); diff --git a/PWGCF/GenericFramework/Core/FlowContainer.cxx b/PWGCF/GenericFramework/Core/FlowContainer.cxx index 4b94468bde6..bae0e31051b 100644 --- a/PWGCF/GenericFramework/Core/FlowContainer.cxx +++ b/PWGCF/GenericFramework/Core/FlowContainer.cxx @@ -406,7 +406,7 @@ TProfile* FlowContainer::GetCorrXXVsMulti(const char* order, int l_pti) LOGF(info, "Could not find %s!", ybinlab); return 0; } - TProfile* rethist = dynamic_cast(fProf->ProfileX("temp_prof", ybinno, ybinno)); + TProfile* rethist = fProf->ProfileX("temp_prof", ybinno, ybinno); rethist->SetTitle(Form(";multi.;#LT#LT%s#GT#GT", order)); if (!retSubset) { retSubset = dynamic_cast(rethist->Clone(Form("corr_%s", order))); diff --git a/PWGCF/GenericFramework/Core/GFWWeights.cxx b/PWGCF/GenericFramework/Core/GFWWeights.cxx index b707e252764..a24e56c0c53 100644 --- a/PWGCF/GenericFramework/Core/GFWWeights.cxx +++ b/PWGCF/GenericFramework/Core/GFWWeights.cxx @@ -47,7 +47,7 @@ TObjArray* cloneArray(TObjArray* source) for (int i = 0; i < source->GetEntries(); i++) { if (!source->At(i)) continue; - TH3D* hist = reinterpret_cast(source->At(i)->Clone()); + TH3D* hist = dynamic_cast(source->At(i)->Clone()); hist->SetDirectory(0); result->AddAt(hist, i); } @@ -58,7 +58,7 @@ TH3D* cloneTH3D(TH3D* source) { if (!source) return 0; - TH3D* result = reinterpret_cast(source->Clone()); + TH3D* result = dynamic_cast(source->Clone()); result->SetDirectory(0); return result; } @@ -67,7 +67,7 @@ TH1D* cloneTH1D(TH1D* source) { if (!source) return 0; - TH1D* result = reinterpret_cast(source->Clone()); + TH1D* result = dynamic_cast(source->Clone()); result->SetDirectory(0); return result; } @@ -193,8 +193,8 @@ void GFWWeights::init(bool AddData, bool AddMC) gen->SetDirectory(0); fW_mcrec->Add(rec); fW_mcgen->Add(gen); - reinterpret_cast(fW_mcrec->At(fW_mcrec->GetEntries() - 1))->GetXaxis()->Set(fNbinsPt, fbinsPt); - reinterpret_cast(fW_mcgen->At(fW_mcgen->GetEntries() - 1))->GetXaxis()->Set(fNbinsPt, fbinsPt); + dynamic_cast(fW_mcrec->At(fW_mcrec->GetEntries() - 1))->GetXaxis()->Set(fNbinsPt, fbinsPt); + dynamic_cast(fW_mcgen->At(fW_mcgen->GetEntries() - 1))->GetXaxis()->Set(fNbinsPt, fbinsPt); fMCFilled = kTRUE; } }; @@ -217,14 +217,14 @@ void GFWWeights::fill(double phi, double eta, double vz, double pt, double /*cen } if (!tar) return; - TH3D* th3 = reinterpret_cast(tar->FindObject(getBinName(0, 0, pf))); // pT bin 0, V0M bin 0, since all integrated + TH3D* th3 = dynamic_cast(tar->FindObject(getBinName(0, 0, pf))); // pT bin 0, V0M bin 0, since all integrated if (!th3) { if (!htype) { TH3D* hist = new TH3D(getBinName(0, 0, pf), ";#varphi;#eta;v_{z}", 60, 0, TMath::TwoPi(), 64, -1.6, 1.6, 40, -10, 10); // o2-linter: disable=external-pi (ROOT histogram axis uses double-precision two pi) hist->SetDirectory(0); tar->Add(hist); } - th3 = reinterpret_cast(tar->At(tar->GetEntries() - 1)); + th3 = dynamic_cast(tar->At(tar->GetEntries() - 1)); } th3->Fill(htype ? pt : phi, eta, vz, weight); }; @@ -246,7 +246,7 @@ double GFWWeights::getWeight(double phi, double eta, double vz, double pt, doubl } if (!tar) return 1; - TH3D* th3 = reinterpret_cast(tar->FindObject(getBinName(0, 0, pf))); + TH3D* th3 = dynamic_cast(tar->FindObject(getBinName(0, 0, pf))); if (!th3) return 1; //-1; int xind = th3->GetXaxis()->FindBin(htype ? pt : phi); @@ -306,8 +306,8 @@ void GFWWeights::mcToEfficiency() return; } for (int i = 0; i < fW_mcrec->GetEntries(); i++) { - TH3D* hr = reinterpret_cast(fW_mcrec->At(i)); - TH3D* hg = reinterpret_cast(fW_mcgen->At(i)); + TH3D* hr = dynamic_cast(fW_mcrec->At(i)); + TH3D* hg = dynamic_cast(fW_mcgen->At(i)); hr->Sumw2(); hg->Sumw2(); hr->Divide(hg); @@ -319,9 +319,9 @@ void GFWWeights::rebinNUA(int nX, int nY, int nZ) if (!fW_data || fW_data->GetEntries() < 1) return; for (int i = 0; i < fW_data->GetEntries(); i++) { - reinterpret_cast(fW_data->At(i))->RebinX(nX); - reinterpret_cast(fW_data->At(i))->RebinY(nY); - reinterpret_cast(fW_data->At(i))->RebinZ(nZ); + dynamic_cast(fW_data->At(i))->RebinX(nX); + dynamic_cast(fW_data->At(i))->RebinY(nY); + dynamic_cast(fW_data->At(i))->RebinZ(nZ); } }; void GFWWeights::createNUA(bool IntegrateOverCentAndPt) @@ -335,7 +335,7 @@ void GFWWeights::createNUA(bool IntegrateOverCentAndPt) return; if (fAccInt) delete fAccInt; - fAccInt = reinterpret_cast(fW_data->At(0)->Clone("IntegratedAcceptance")); + fAccInt = dynamic_cast(fW_data->At(0)->Clone("IntegratedAcceptance")); fAccInt->SetDirectory(0); fAccInt->Sumw2(); for (int etai = 1; etai <= fAccInt->GetNbinsY(); etai++) { @@ -346,7 +346,7 @@ void GFWWeights::createNUA(bool IntegrateOverCentAndPt) fAccInt->GetZaxis()->SetRange(vzi, vzi); if (fAccInt->Integral() < 1) continue; - h1 = reinterpret_cast(fAccInt->Project3D("x")); + h1 = dynamic_cast(fAccInt->Project3D("x")); double maxv = h1->GetMaximum(); for (int phii = 1; phii <= h1->GetNbinsX(); phii++) { fAccInt->SetBinContent(phii, etai, vzi, fAccInt->GetBinContent(phii, etai, vzi) / maxv); @@ -362,8 +362,8 @@ TH1D* GFWWeights::getdNdPhi() { if (!fW_data || !fW_data->GetEntries()) return 0; - TH3D* temph = reinterpret_cast(fW_data->At(0)->Clone("tempH3")); - TH1D* reth = reinterpret_cast(temph->Project3D("x")); + TH3D* temph = dynamic_cast(fW_data->At(0)->Clone("tempH3")); + TH1D* reth = dynamic_cast(temph->Project3D("x")); reth->SetName("RetHist"); reth->SetDirectory(0); delete temph; @@ -390,8 +390,8 @@ void GFWWeights::createNUE(bool IntegrateOverCentrality) TH3D* den = 0; if (!fW_mcrec || !fW_mcgen || fW_mcrec->GetEntries() < 1 || fW_mcgen->GetEntries() < 1) return; - num = reinterpret_cast(fW_mcrec->At(0)); - den = reinterpret_cast(fW_mcgen->At(0)); + num = dynamic_cast(fW_mcrec->At(0)); + den = dynamic_cast(fW_mcgen->At(0)); num->Sumw2(); den->Sumw2(); num->RebinY(2); @@ -399,7 +399,7 @@ void GFWWeights::createNUE(bool IntegrateOverCentrality) num->RebinZ(5); den->RebinZ(5); delete fEffInt; - fEffInt = reinterpret_cast(num->Clone("Efficiency_Integrated")); + fEffInt = dynamic_cast(num->Clone("Efficiency_Integrated")); fEffInt->SetDirectory(0); fEffInt->Divide(den); }; @@ -490,10 +490,10 @@ void GFWWeights::addArray(TObjArray* targ, TObjArray* sour) return; } for (int i = 0; i < sour->GetEntries(); i++) { - TH3D* sourh = reinterpret_cast(sour->At(i)); - TH3D* targh = reinterpret_cast(targ->FindObject(sourh->GetName())); + TH3D* sourh = dynamic_cast(sour->At(i)); + TH3D* targh = dynamic_cast(targ->FindObject(sourh->GetName())); if (!targh) { - targh = reinterpret_cast(sourh->Clone(sourh->GetName())); + targh = dynamic_cast(sourh->Clone(sourh->GetName())); targh->SetDirectory(0); targ->Add(targh); } else { @@ -508,9 +508,9 @@ void GFWWeights::overwriteNUA() if (!fAccInt || !fW_data || !fW_data->GetEntries()) return; TString ts(fW_data->At(0)->GetName()); - TH3D* trash = reinterpret_cast(fW_data->RemoveAt(0)); + TH3D* trash = dynamic_cast(fW_data->RemoveAt(0)); delete trash; - TH3D* hist = reinterpret_cast(fAccInt->Clone(ts.Data())); + TH3D* hist = dynamic_cast(fAccInt->Clone(ts.Data())); hist->SetDirectory(0); fW_data->AddAt(hist, 0); delete fAccInt; @@ -536,7 +536,7 @@ Long64_t GFWWeights::Merge(TCollection* collist) // o2-linter: disable=root/enti } GFWWeights* weight = 0; TIter allWeights(collist); - while ((weight = (reinterpret_cast(allWeights())))) { + while ((weight = (dynamic_cast(allWeights())))) { addArray(fW_data, weight->getDataArray()); addArray(fW_mcrec, weight->getRecArray()); addArray(fW_mcgen, weight->getGenArray()); @@ -562,17 +562,17 @@ TH1D* GFWWeights::getIntegratedEfficiencyHist() LOGF(warning, "MCRec array is empty!\n"); return 0; } - TH3D* num = reinterpret_cast(fW_mcrec->At(0)->Clone("Numerator")); + TH3D* num = dynamic_cast(fW_mcrec->At(0)->Clone("Numerator")); for (int i = 1; i < fW_mcrec->GetEntries(); i++) - num->Add(reinterpret_cast(fW_mcrec->At(i))); - TH3D* den = reinterpret_cast(fW_mcgen->At(0)->Clone("Denominator")); + num->Add(dynamic_cast(fW_mcrec->At(i))); + TH3D* den = dynamic_cast(fW_mcgen->At(0)->Clone("Denominator")); for (int i = 1; i < fW_mcgen->GetEntries(); i++) - den->Add(reinterpret_cast(fW_mcgen->At(i))); - TH1D* num1d = reinterpret_cast(num->Project3D("x")); + den->Add(dynamic_cast(fW_mcgen->At(i))); + TH1D* num1d = dynamic_cast(num->Project3D("x")); num1d->SetName("retHist"); num1d->SetDirectory(0); num1d->Sumw2(); - TH1D* den1d = reinterpret_cast(den->Project3D("x")); + TH1D* den1d = dynamic_cast(den->Project3D("x")); den1d->SetDirectory(0); den1d->Sumw2(); num1d->Divide(den1d); @@ -603,12 +603,12 @@ TH1D* GFWWeights::getEfficiency(double etamin, double etamax, double vzmin, doub { if (!fW_mcrec || !fW_mcgen || !fW_mcrec->GetEntries() || !fW_mcgen->GetEntries()) return 0; - TH3D* num = reinterpret_cast(fW_mcrec->At(0)->Clone("Numerator")); + TH3D* num = dynamic_cast(fW_mcrec->At(0)->Clone("Numerator")); for (int i = 1; i < fW_mcrec->GetEntries(); i++) - num->Add(reinterpret_cast(fW_mcrec->At(i))); - TH3D* den = reinterpret_cast(fW_mcgen->At(0)->Clone("Denominator")); + num->Add(dynamic_cast(fW_mcrec->At(i))); + TH3D* den = dynamic_cast(fW_mcgen->At(0)->Clone("Denominator")); for (int i = 1; i < fW_mcgen->GetEntries(); i++) - den->Add(reinterpret_cast(fW_mcgen->At(i))); + den->Add(dynamic_cast(fW_mcgen->At(i))); int eb1 = num->GetYaxis()->FindBin(etamin + 1e-6); int eb2 = num->GetYaxis()->FindBin(etamax - 1e-6); int vz1 = num->GetZaxis()->FindBin(vzmin + 1e-6); @@ -617,8 +617,8 @@ TH1D* GFWWeights::getEfficiency(double etamin, double etamax, double vzmin, doub num->GetZaxis()->SetRange(vz1, vz2); den->GetYaxis()->SetRange(eb1, eb2); den->GetZaxis()->SetRange(vz1, vz2); - TH1D* num1d = reinterpret_cast(num->Project3D("x")); - TH1D* den1d = reinterpret_cast(den->Project3D("x")); + TH1D* num1d = dynamic_cast(num->Project3D("x")); + TH1D* den1d = dynamic_cast(den->Project3D("x")); num1d->SetDirectory(0); den1d->SetDirectory(0); delete num; @@ -647,15 +647,15 @@ void GFWWeights::setTH3D(TH3D* th3d) fW_data = new TObjArray(); fW_data->SetName("GFWWeights_Data"); fW_data->SetOwner(kTRUE); - TH3D* hist = reinterpret_cast(th3d->Clone()); + TH3D* hist = dynamic_cast(th3d->Clone()); hist->SetDirectory(0); fW_data->Add(hist); return; } TString ts(fW_data->At(0)->GetName()); - TH3D* trash = reinterpret_cast(fW_data->RemoveAt(0)); + TH3D* trash = dynamic_cast(fW_data->RemoveAt(0)); delete trash; - TH3D* hist = reinterpret_cast(th3d->Clone(ts.Data())); + TH3D* hist = dynamic_cast(th3d->Clone(ts.Data())); hist->SetDirectory(0); fW_data->AddAt(hist, 0); } diff --git a/PWGCF/GenericFramework/Core/GFWWeightsList.cxx b/PWGCF/GenericFramework/Core/GFWWeightsList.cxx index 55332b45986..3cd2d30f385 100644 --- a/PWGCF/GenericFramework/Core/GFWWeightsList.cxx +++ b/PWGCF/GenericFramework/Core/GFWWeightsList.cxx @@ -64,7 +64,7 @@ void GFWWeightsList::addGFWWeightsByName(const char* weightName, int nPtBins, do if (!list) { init("weightList"); } - if (reinterpret_cast(list->FindObject(weightName))) { + if (dynamic_cast(list->FindObject(weightName))) { return; } GFWWeights* weight = new GFWWeights(weightName); @@ -79,7 +79,7 @@ GFWWeights* GFWWeightsList::getGFWWeightsByName(const char* weightName) LOGF(error, "weight list is not initialized\n"); return nullptr; } - return reinterpret_cast(list->FindObject(weightName)); + return dynamic_cast(list->FindObject(weightName)); } void GFWWeightsList::addGFWWeightsByRun(int runNumber, int nPtBins, double* ptBins, bool addData, bool addMC) @@ -121,7 +121,7 @@ void GFWWeightsList::addPIDGFWWeightsByName(const char* weightName, int nPtBins, std::vector refpt(ptbins.begin(), it + 1); for (auto& type : species) { - if (reinterpret_cast(list->FindObject((static_cast(weightName) + type).c_str()))) { + if (dynamic_cast(list->FindObject((static_cast(weightName) + type).c_str()))) { continue; } GFWWeights* weight = new GFWWeights(Form("%s", (static_cast(weightName) + type).c_str())); @@ -141,7 +141,7 @@ GFWWeights* GFWWeightsList::getPIDGFWWeightsByName(const char* weightName, int p LOGF(error, "weight list is not initialized\n"); return nullptr; } - return reinterpret_cast(list->FindObject((static_cast(weightName) + species[pidIndex]).c_str())); + return dynamic_cast(list->FindObject((static_cast(weightName) + species[pidIndex]).c_str())); } void GFWWeightsList::addPIDGFWWeightsByRun(int runNumber, int nPtBins, double* ptBins, double ptrefup, bool addData, bool addMC) { @@ -193,7 +193,7 @@ Long64_t GFWWeightsList::Merge(TCollection* collist) } TIter allWeights(collist); GFWWeightsList* lWeight = 0; - while ((lWeight = (reinterpret_cast(allWeights())))) { + while ((lWeight = (dynamic_cast(allWeights())))) { addArray(list, lWeight->getList()); nmerged++; } @@ -205,10 +205,10 @@ void GFWWeightsList::addArray(TObjArray* target, TObjArray* source) return; } for (int i = 0; i < source->GetEntries(); i++) { - GFWWeights* sourw = reinterpret_cast(source->At(i)); - GFWWeights* targw = reinterpret_cast(target->FindObject(sourw->GetName())); + GFWWeights* sourw = dynamic_cast(source->At(i)); + GFWWeights* targw = dynamic_cast(target->FindObject(sourw->GetName())); if (!targw) { - targw = reinterpret_cast(sourw->Clone(sourw->GetName())); + targw = dynamic_cast(sourw->Clone(sourw->GetName())); target->Add(targw); } else { targw->mergeWeights(sourw); diff --git a/PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx b/PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx index da76264b369..7b649c1d3ee 100644 --- a/PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx +++ b/PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx @@ -3047,7 +3047,7 @@ struct FlowGenericFramework { } o2::framework::expressions::Filter collisionFilter = nabs(aod::collision::posZ) < cfgVtxZ; - o2::framework::expressions::Filter trackFilter = (aod::track::eta > cfgKinematics.cfgEta->first) && (aod::track::eta < cfgKinematics.cfgEta->second) && (aod::track::pt > cfgKinematics.cfgPtMin) && (aod::track::pt < cfgKinematics.cfgPtmax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::itsChi2NCl < cfgTrackCuts.cfgChi2PrITSCls) && (aod::track::tpcChi2NCl < cfgTrackCuts.cfgChi2PrTPCCls) && nabs(aod::track::dcaZ) < cfgTrackCuts.cfgDCAz; + o2::framework::expressions::Filter trackFilter = (aod::track::eta > cfgKinematics.cfgEta->first) && (aod::track::eta < cfgKinematics.cfgEta->second) && (aod::track::pt > cfgKinematics.cfgPtMin) && (aod::track::pt < cfgKinematics.cfgPtmax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::itsChi2NCl < cfgTrackCuts.cfgChi2PrITSCls) && (aod::track::tpcChi2NCl < cfgTrackCuts.cfgChi2PrTPCCls) && nabs(aod::track::dcaZ) < cfgTrackCuts.cfgDCAz; using GFWCollisions = soa::Filtered>; using GFWMCCollisions = soa::Join; diff --git a/PWGCF/GenericFramework/Tasks/flowGfwLightIons.cxx b/PWGCF/GenericFramework/Tasks/flowGfwLightIons.cxx index 02db3917bf4..fe3af2d3855 100644 --- a/PWGCF/GenericFramework/Tasks/flowGfwLightIons.cxx +++ b/PWGCF/GenericFramework/Tasks/flowGfwLightIons.cxx @@ -302,7 +302,7 @@ struct FlowGfwLightIons { TF1* fPtDepDCAxy = nullptr; o2::framework::expressions::Filter collisionFilter = nabs(aod::collision::posZ) < cfgVtxZ; - o2::framework::expressions::Filter trackFilter = nabs(aod::track::eta) < cfgEta && aod::track::pt > cfgPtmin&& aod::track::pt < cfgPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::itsChi2NCl < cfgChi2PrITSCls) && (aod::track::tpcChi2NCl < cfgChi2PrTPCCls) && nabs(aod::track::dcaZ) < cfgDCAz; + o2::framework::expressions::Filter trackFilter = nabs(aod::track::eta) < cfgEta && aod::track::pt > cfgPtmin&& aod::track::pt < cfgPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::itsChi2NCl < cfgChi2PrITSCls) && (aod::track::tpcChi2NCl < cfgChi2PrTPCCls) && nabs(aod::track::dcaZ) < cfgDCAz; Preslice perCollision = aod::track::collisionId; o2::framework::expressions::Filter mcCollFilter = nabs(aod::mccollision::posZ) < cfgVtxZ; diff --git a/PWGCF/GenericFramework/Tasks/flowGfwNonflow.cxx b/PWGCF/GenericFramework/Tasks/flowGfwNonflow.cxx index cdccf5bd2fd..9bc3f2502b8 100644 --- a/PWGCF/GenericFramework/Tasks/flowGfwNonflow.cxx +++ b/PWGCF/GenericFramework/Tasks/flowGfwNonflow.cxx @@ -1205,7 +1205,7 @@ struct FlowGfwNonflow { } o2::framework::expressions::Filter collisionFilter = nabs(aod::collision::posZ) < cfgEventSelection.cfgVtxZ; - o2::framework::expressions::Filter trackFilter = (aod::track::eta > cfgKinematics.cfgEta->first) && (aod::track::eta < cfgKinematics.cfgEta->second) && (aod::track::pt > cfgKinematics.cfgPtCut->first) && (aod::track::pt < cfgKinematics.cfgPtCut->second) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::itsChi2NCl < cfgTrackCuts.cfgChi2PrITSCls) && (aod::track::tpcChi2NCl < cfgTrackCuts.cfgChi2PrTPCCls) && nabs(aod::track::dcaZ) < cfgTrackCuts.cfgDCAz; + o2::framework::expressions::Filter trackFilter = (aod::track::eta > cfgKinematics.cfgEta->first) && (aod::track::eta < cfgKinematics.cfgEta->second) && (aod::track::pt > cfgKinematics.cfgPtCut->first) && (aod::track::pt < cfgKinematics.cfgPtCut->second) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::itsChi2NCl < cfgTrackCuts.cfgChi2PrITSCls) && (aod::track::tpcChi2NCl < cfgTrackCuts.cfgChi2PrTPCCls) && nabs(aod::track::dcaZ) < cfgTrackCuts.cfgDCAz; using GFWCollisions = soa::Filtered>; using GFWMCCollisions = soa::Join; diff --git a/PWGCF/GenericFramework/Tasks/flowGfwV02.cxx b/PWGCF/GenericFramework/Tasks/flowGfwV02.cxx index 5768bb877f7..06dfd324916 100644 --- a/PWGCF/GenericFramework/Tasks/flowGfwV02.cxx +++ b/PWGCF/GenericFramework/Tasks/flowGfwV02.cxx @@ -214,7 +214,7 @@ struct FlowGfwV02 { // // The analysis assumes the data has been subjected to a QA of its selection, // // and thus only the final distributions of the data for analysis are saved. o2::framework::expressions::Filter collFilter = (nabs(aod::collision::posZ) < cfgEventCuts.cfgZvtxMax); - o2::framework::expressions::Filter trackFilter = (aod::track::pt > cfgTrackCuts.cfgPtMin) && (aod::track::pt < cfgTrackCuts.cfgPtMax) && nabs(aod::track::eta) < cfgTrackCuts.cfgEtaMax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::itsChi2NCl < cfgTrackCuts.cfgChi2PrITSCls) && (aod::track::tpcChi2NCl < cfgTrackCuts.cfgChi2PrTPCCls) && nabs(aod::track::dcaZ) < cfgTrackCuts.cfgDCAz; + o2::framework::expressions::Filter trackFilter = (aod::track::pt > cfgTrackCuts.cfgPtMin) && (aod::track::pt < cfgTrackCuts.cfgPtMax) && nabs(aod::track::eta) < cfgTrackCuts.cfgEtaMax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::itsChi2NCl < cfgTrackCuts.cfgChi2PrITSCls) && (aod::track::tpcChi2NCl < cfgTrackCuts.cfgChi2PrTPCCls) && nabs(aod::track::dcaZ) < cfgTrackCuts.cfgDCAz; // Connect to ccdb Service ccdb{}; diff --git a/PWGCF/JCorran/Core/JQVectors.h b/PWGCF/JCorran/Core/JQVectors.h index aadb821fc2b..028fc01b6d1 100644 --- a/PWGCF/JCorran/Core/JQVectors.h +++ b/PWGCF/JCorran/Core/JQVectors.h @@ -80,7 +80,7 @@ class JQVectors : public std::conditional_t, JQ continue; } - UInt_t isub = (UInt_t)(track.eta() > 0.0); + UInt_t isub = static_cast(track.eta() > 0.0); const Double_t phi = track.phi(); const Double_t c1 = TMath::Cos(phi); const Double_t s1 = TMath::Sin(phi); diff --git a/PWGCF/JCorran/TableProducer/JCatalyst.cxx b/PWGCF/JCorran/TableProducer/JCatalyst.cxx index 41b74c4b2be..dd06684dda6 100644 --- a/PWGCF/JCorran/TableProducer/JCatalyst.cxx +++ b/PWGCF/JCorran/TableProducer/JCatalyst.cxx @@ -65,7 +65,7 @@ struct JCatalyst { Filter collisionVertexTypeFilter = (collisionFlags == 0) || ((aod::collision::flags & collisionFlags) == collisionFlags); Filter trackFilter = (nabs(aod::track::eta) < etamax) && (aod::track::pt > ptmin) && (aod::track::pt < ptmax); - Filter trackSelection = (requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true); + Filter trackSelection = (requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true)); Produces particleTrack; Produces collisionData; @@ -106,7 +106,7 @@ struct JMultiplicitySelector { O2_DEFINE_CONFIGURABLE(etamax, float, 0.9f, "Eta range for tracks") Filter trackFilter = (nabs(aod::track::eta) < etamax) && (aod::track::pt > ptmin); - Filter trackSelection = (requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true); + Filter trackSelection = (requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true)); void processTracks(aod::Collision const&, soa::Filtered> const& tracks) { diff --git a/PWGCF/MultiparticleCorrelations/Core/MuPa-MemberFunctions.h b/PWGCF/MultiparticleCorrelations/Core/MuPa-MemberFunctions.h index 3a3a34fccb9..5c3ecff14e1 100644 --- a/PWGCF/MultiparticleCorrelations/Core/MuPa-MemberFunctions.h +++ b/PWGCF/MultiparticleCorrelations/Core/MuPa-MemberFunctions.h @@ -98,7 +98,7 @@ void bookBaseList() fBasePro->Fill(eUseFisherYates, static_cast(tc.fUseFisherYates)); fBasePro->GetXaxis()->SetBinLabel(eFixedNumberOfRandomlySelectedTracks, "fFixedNumberOfRandomlySelectedTracks"); - fBasePro->Fill(eFixedNumberOfRandomlySelectedTracks, static_cast(tc.fFixedNumberOfRandomlySelectedTracks)); + fBasePro->Fill(eFixedNumberOfRandomlySelectedTracks, tc.fFixedNumberOfRandomlySelectedTracks); fBasePro->GetXaxis()->SetBinLabel(eUseStopwatch, "fUseStopwatch"); fBasePro->Fill(eUseStopwatch, static_cast(tc.fUseStopwatch)); @@ -750,7 +750,7 @@ void defaultConfiguration() // ... // *) Toy NUA: - auto lApplyNUAPDF = (std::vector)cf_nua.cfApplyNUAPDF; + auto lApplyNUAPDF = std::vector(cf_nua.cfApplyNUAPDF); if (lApplyNUAPDF.size() != eNUAPDF_N) { LOGF(info, "\033[1;31m lApplyNUAPDF.size() = %d\033[0m", lApplyNUAPDF.size()); LOGF(info, "\033[1;31m eNUAPDF_N = %d\033[0m", static_cast(eNUAPDF_N)); @@ -764,7 +764,7 @@ void defaultConfiguration() // **) Execute the lines below, only if toy NUA (either default or custom) is requested for at least one kine variable: if (nua.fApplyNUAPDF[ePhiNUAPDF] || nua.fApplyNUAPDF[ePtNUAPDF] || nua.fApplyNUAPDF[eEtaNUAPDF] || nua.fApplyNUAPDF[eChargeNUAPDF]) { - auto lUseDefaultNUAPDF = (std::vector)cf_nua.cfUseDefaultNUAPDF; + auto lUseDefaultNUAPDF = std::vector(cf_nua.cfUseDefaultNUAPDF); if (lUseDefaultNUAPDF.size() != eNUAPDF_N) { LOGF(info, "\033[1;31m lUseDefaultNUAPDF.size() = %d\033[0m", lUseDefaultNUAPDF.size()); LOGF(info, "\033[1;31m eNUAPDF_N = %d\033[0m", static_cast(eNUAPDF_N)); @@ -787,7 +787,7 @@ void defaultConfiguration() nua.fFileWithCustomNUA = TString(cf_nua.cfFileWithCustomNUA); // *) histogram names with custom NUA distributions in that file + get those histograms immediately here: - auto lCustomNUAPDFHistNames = (std::vector)cf_nua.cfCustomNUAPDFHistNames; + auto lCustomNUAPDFHistNames = std::vector(cf_nua.cfCustomNUAPDFHistNames); // TBI 20241115 For some reason, the default values of configurable "cfCustomNUAPDFHistNames" are not correctly propagated in the local variables, but I can circumvent that with JSON settings for the time being if (lCustomNUAPDFHistNames.size() != eNUAPDF_N) { LOGF(info, "\033[1;31m lCustomNUAPDFHistNames.size() = %d\033[0m", lCustomNUAPDFHistNames.size()); @@ -1387,7 +1387,7 @@ void defaultBooking() ph.fBookParticleHistograms2D[ePhiEta] = alright(lBookParticleHistograms2D[ePhiEta]) && ph.fFillParticleHistograms2D; // e) Particle sparse histograms: - auto lRebinSparse = (std::vector)cf_ph.cfRebinSparse; + auto lRebinSparse = std::vector(cf_ph.cfRebinSparse); ph.fRebinSparse[eDWPhi][wPhiPhiAxis] = lRebinSparse[wPhiPhiAxis]; ph.fRebinSparse[eDWPhi][wPhiPtAxis] = lRebinSparse[wPhiPtAxis]; @@ -2118,7 +2118,7 @@ void defaultCuts() // *) Use or do not use a cut enumerated in EEventHistograms + eEventCuts. // Default cuts are set in configurable cfUseEventCuts - auto lUseEventCuts = (std::vector)cf_ec.cfUseEventCuts; + auto lUseEventCuts = std::vector(cf_ec.cfUseEventCuts); if (lUseEventCuts.size() != eEventCuts_N) { LOGF(info, "\033[1;31m lUseEventCuts.size() = %d\033[0m", lUseEventCuts.size()); LOGF(info, "\033[1;31m eEventCuts_N = %d\033[0m", static_cast(eEventCuts_N)); @@ -2218,15 +2218,15 @@ void defaultCuts() // **) event cuts defined via [min, max): // Remark: I use this one also for events cuts set only via min or via max. // In this case, I set either min or max intentionally to some value which never can be met (see below example for "MinVertexDistanceFromIP") - auto lNumberOfEvents = (std::vector)cf_ec.cfNumberOfEvents; + auto lNumberOfEvents = std::vector(cf_ec.cfNumberOfEvents); ec.fdEventCuts[eNumberOfEvents][eMin] = lNumberOfEvents[eMin]; ec.fdEventCuts[eNumberOfEvents][eMax] = lNumberOfEvents[eMax]; - auto lTotalMultiplicity = (std::vector)cf_ec.cfTotalMultiplicity; + auto lTotalMultiplicity = std::vector(cf_ec.cfTotalMultiplicity); ec.fdEventCuts[eTotalMultiplicity][eMin] = lTotalMultiplicity[eMin]; ec.fdEventCuts[eTotalMultiplicity][eMax] = lTotalMultiplicity[eMax]; - auto lMultiplicity = (std::vector)cf_ec.cfMultiplicity; + auto lMultiplicity = std::vector(cf_ec.cfMultiplicity); ec.fdEventCuts[eMultiplicity][eMin] = lMultiplicity[eMin]; ec.fdEventCuts[eMultiplicity][eMax] = lMultiplicity[eMax]; // If I have requested fFixedNumberOfRandomlySelectedTracks, then I do not care about events with smaller number of particles: @@ -2234,55 +2234,55 @@ void defaultCuts() ec.fdEventCuts[eMultiplicity][eMin] = tc.fFixedNumberOfRandomlySelectedTracks; } - auto lReferenceMultiplicity = (std::vector)cf_ec.cfReferenceMultiplicity; + auto lReferenceMultiplicity = std::vector(cf_ec.cfReferenceMultiplicity); ec.fdEventCuts[eReferenceMultiplicity][eMin] = lReferenceMultiplicity[eMin]; ec.fdEventCuts[eReferenceMultiplicity][eMax] = lReferenceMultiplicity[eMax]; - auto lCentrality = (std::vector)cf_ec.cfCentrality; + auto lCentrality = std::vector(cf_ec.cfCentrality); ec.fdEventCuts[eCentrality][eMin] = lCentrality[eMin]; ec.fdEventCuts[eCentrality][eMax] = lCentrality[eMax]; - auto lVertexX = (std::vector)cf_ec.cfVertexX; + auto lVertexX = std::vector(cf_ec.cfVertexX); ec.fdEventCuts[eVertexX][eMin] = lVertexX[eMin]; ec.fdEventCuts[eVertexX][eMax] = lVertexX[eMax]; - auto lVertexY = (std::vector)cf_ec.cfVertexY; + auto lVertexY = std::vector(cf_ec.cfVertexY); ec.fdEventCuts[eVertexY][eMin] = lVertexY[eMin]; ec.fdEventCuts[eVertexY][eMax] = lVertexY[eMax]; - auto lVertexZ = (std::vector)cf_ec.cfVertexZ; + auto lVertexZ = std::vector(cf_ec.cfVertexZ); ec.fdEventCuts[eVertexZ][eMin] = lVertexZ[eMin]; ec.fdEventCuts[eVertexZ][eMax] = lVertexZ[eMax]; - auto lNContributors = (std::vector)cf_ec.cfNContributors; + auto lNContributors = std::vector(cf_ec.cfNContributors); ec.fdEventCuts[eNContributors][eMin] = lNContributors[eMin]; ec.fdEventCuts[eNContributors][eMax] = lNContributors[eMax]; - auto lImpactParameter = (std::vector)cf_ec.cfImpactParameter; + auto lImpactParameter = std::vector(cf_ec.cfImpactParameter); ec.fdEventCuts[eImpactParameter][eMin] = lImpactParameter[eMin]; ec.fdEventCuts[eImpactParameter][eMax] = lImpactParameter[eMax]; - auto lEventPlaneAngle = (std::vector)cf_ec.cfEventPlaneAngle; + auto lEventPlaneAngle = std::vector(cf_ec.cfEventPlaneAngle); ec.fdEventCuts[eEventPlaneAngle][eMin] = lEventPlaneAngle[eMin]; ec.fdEventCuts[eEventPlaneAngle][eMax] = lEventPlaneAngle[eMax]; - auto lOccupancy = (std::vector)cf_ec.cfOccupancy; + auto lOccupancy = std::vector(cf_ec.cfOccupancy); ec.fdEventCuts[eOccupancy][eMin] = lOccupancy[eMin]; ec.fdEventCuts[eOccupancy][eMax] = lOccupancy[eMax]; - auto lInteractionRate = (std::vector)cf_ec.cfInteractionRate; + auto lInteractionRate = std::vector(cf_ec.cfInteractionRate); ec.fdEventCuts[eInteractionRate][eMin] = lInteractionRate[eMin]; ec.fdEventCuts[eInteractionRate][eMax] = lInteractionRate[eMax]; - auto lCurrentRunDuration = (std::vector)cf_ec.cfCurrentRunDuration; + auto lCurrentRunDuration = std::vector(cf_ec.cfCurrentRunDuration); ec.fdEventCuts[eCurrentRunDuration][eMin] = lCurrentRunDuration[eMin]; ec.fdEventCuts[eCurrentRunDuration][eMax] = lCurrentRunDuration[eMax]; - auto lMultMCNParticlesEta08 = (std::vector)cf_ec.cfMultMCNParticlesEta08; + auto lMultMCNParticlesEta08 = std::vector(cf_ec.cfMultMCNParticlesEta08); ec.fdEventCuts[eMultMCNParticlesEta08][eMin] = lMultMCNParticlesEta08[eMin]; ec.fdEventCuts[eMultMCNParticlesEta08][eMax] = lMultMCNParticlesEta08[eMax]; - auto lSelectedEvents = (std::vector)cf_ec.cfSelectedEvents; + auto lSelectedEvents = std::vector(cf_ec.cfSelectedEvents); ec.fdEventCuts[eSelectedEvents][eMin] = lSelectedEvents[eMin]; ec.fdEventCuts[eSelectedEvents][eMax] = lSelectedEvents[eMax]; @@ -2309,7 +2309,7 @@ void defaultCuts() // *) Use or do not use a cut enumerated in eParticleHistograms + eParticleCuts. // Default cuts are set in configurable cfUseParticleCuts - auto lUseParticleCuts = (std::vector)cf_pc.cfUseParticleCuts; + auto lUseParticleCuts = std::vector(cf_pc.cfUseParticleCuts); if (lUseParticleCuts.size() != eParticleCuts_N) { LOGF(info, "\033[1;31m lUseParticleCuts.size() = %d\033[0m", lUseParticleCuts.size()); LOGF(info, "\033[1;31m eParticleCuts_N = %d\033[0m", static_cast(eParticleCuts_N)); @@ -2365,75 +2365,75 @@ void defaultCuts() pc.fUseParticleCuts[eisPVContributor] = pc.fUseParticleCuts[eisPVContributor] && cf_pc.cfisPVContributor; // **) particles cuts defined via [min, max): - auto lPhi = (std::vector)cf_pc.cfPhi; + auto lPhi = std::vector(cf_pc.cfPhi); pc.fdParticleCuts[ePhi][eMin] = lPhi[eMin]; pc.fdParticleCuts[ePhi][eMax] = lPhi[eMax]; - auto lPt = (std::vector)cf_pc.cfPt; + auto lPt = std::vector(cf_pc.cfPt); pc.fdParticleCuts[ePt][eMin] = lPt[eMin]; pc.fdParticleCuts[ePt][eMax] = lPt[eMax]; - auto lEta = (std::vector)cf_pc.cfEta; + auto lEta = std::vector(cf_pc.cfEta); pc.fdParticleCuts[eEta][eMin] = lEta[eMin]; pc.fdParticleCuts[eEta][eMax] = lEta[eMax]; - auto lCharge = (std::vector)cf_pc.cfCharge; + auto lCharge = std::vector(cf_pc.cfCharge); pc.fdParticleCuts[eCharge][eMin] = lCharge[eMin]; pc.fdParticleCuts[eCharge][eMax] = lCharge[eMax]; - auto ltpcNClsFindable = (std::vector)cf_pc.cftpcNClsFindable; + auto ltpcNClsFindable = std::vector(cf_pc.cftpcNClsFindable); pc.fdParticleCuts[etpcNClsFindable][eMin] = ltpcNClsFindable[eMin]; pc.fdParticleCuts[etpcNClsFindable][eMax] = ltpcNClsFindable[eMax]; - auto ltpcNClsShared = (std::vector)cf_pc.cftpcNClsShared; + auto ltpcNClsShared = std::vector(cf_pc.cftpcNClsShared); pc.fdParticleCuts[etpcNClsShared][eMin] = ltpcNClsShared[eMin]; pc.fdParticleCuts[etpcNClsShared][eMax] = ltpcNClsShared[eMax]; - auto litsChi2NCl = (std::vector)cf_pc.cfitsChi2NCl; + auto litsChi2NCl = std::vector(cf_pc.cfitsChi2NCl); pc.fdParticleCuts[eitsChi2NCl][eMin] = litsChi2NCl[eMin]; pc.fdParticleCuts[eitsChi2NCl][eMax] = litsChi2NCl[eMax]; - auto ltpcNClsFound = (std::vector)cf_pc.cftpcNClsFound; + auto ltpcNClsFound = std::vector(cf_pc.cftpcNClsFound); pc.fdParticleCuts[etpcNClsFound][eMin] = ltpcNClsFound[eMin]; pc.fdParticleCuts[etpcNClsFound][eMax] = ltpcNClsFound[eMax]; - auto ltpcNClsCrossedRows = (std::vector)cf_pc.cftpcNClsCrossedRows; + auto ltpcNClsCrossedRows = std::vector(cf_pc.cftpcNClsCrossedRows); pc.fdParticleCuts[etpcNClsCrossedRows][eMin] = ltpcNClsCrossedRows[eMin]; pc.fdParticleCuts[etpcNClsCrossedRows][eMax] = ltpcNClsCrossedRows[eMax]; - auto litsNCls = (std::vector)cf_pc.cfitsNCls; + auto litsNCls = std::vector(cf_pc.cfitsNCls); pc.fdParticleCuts[eitsNCls][eMin] = litsNCls[eMin]; pc.fdParticleCuts[eitsNCls][eMax] = litsNCls[eMax]; - auto litsNClsInnerBarrel = (std::vector)cf_pc.cfitsNClsInnerBarrel; + auto litsNClsInnerBarrel = std::vector(cf_pc.cfitsNClsInnerBarrel); pc.fdParticleCuts[eitsNClsInnerBarrel][eMin] = litsNClsInnerBarrel[eMin]; pc.fdParticleCuts[eitsNClsInnerBarrel][eMax] = litsNClsInnerBarrel[eMax]; - auto ltpcCrossedRowsOverFindableCls = (std::vector)cf_pc.cftpcCrossedRowsOverFindableCls; + auto ltpcCrossedRowsOverFindableCls = std::vector(cf_pc.cftpcCrossedRowsOverFindableCls); pc.fdParticleCuts[etpcCrossedRowsOverFindableCls][eMin] = ltpcCrossedRowsOverFindableCls[eMin]; pc.fdParticleCuts[etpcCrossedRowsOverFindableCls][eMax] = ltpcCrossedRowsOverFindableCls[eMax]; - auto ltpcFoundOverFindableCls = (std::vector)cf_pc.cftpcFoundOverFindableCls; + auto ltpcFoundOverFindableCls = std::vector(cf_pc.cftpcFoundOverFindableCls); pc.fdParticleCuts[etpcFoundOverFindableCls][eMin] = ltpcFoundOverFindableCls[eMin]; pc.fdParticleCuts[etpcFoundOverFindableCls][eMax] = ltpcFoundOverFindableCls[eMax]; - auto ltpcFractionSharedCls = (std::vector)cf_pc.cftpcFractionSharedCls; + auto ltpcFractionSharedCls = std::vector(cf_pc.cftpcFractionSharedCls); pc.fdParticleCuts[etpcFractionSharedCls][eMin] = ltpcFractionSharedCls[eMin]; pc.fdParticleCuts[etpcFractionSharedCls][eMax] = ltpcFractionSharedCls[eMax]; - auto ltpcChi2NCl = (std::vector)cf_pc.cftpcChi2NCl; + auto ltpcChi2NCl = std::vector(cf_pc.cftpcChi2NCl); pc.fdParticleCuts[etpcChi2NCl][eMin] = ltpcChi2NCl[eMin]; pc.fdParticleCuts[etpcChi2NCl][eMax] = ltpcChi2NCl[eMax]; - auto ldcaXY = (std::vector)cf_pc.cfdcaXY; + auto ldcaXY = std::vector(cf_pc.cfdcaXY); pc.fdParticleCuts[edcaXY][eMin] = ldcaXY[eMin]; pc.fdParticleCuts[edcaXY][eMax] = ldcaXY[eMax]; - auto ldcaZ = (std::vector)cf_pc.cfdcaZ; + auto ldcaZ = std::vector(cf_pc.cfdcaZ); pc.fdParticleCuts[edcaZ][eMin] = ldcaZ[eMin]; pc.fdParticleCuts[edcaZ][eMax] = ldcaZ[eMax]; - auto lPDG = (std::vector)cf_pc.cfPDG; + auto lPDG = std::vector(cf_pc.cfPDG); pc.fdParticleCuts[ePDG][eMin] = lPDG[eMin]; pc.fdParticleCuts[ePDG][eMax] = lPDG[eMax]; @@ -3760,7 +3760,7 @@ void bookQAHistograms() qa.fQAHistogramsPro->GetXaxis()->SetBinLabel(6, "fFillQACorrelationsVsInteractionRateVsProfiles2D"); qa.fQAHistogramsPro->Fill(5.5, static_cast(qa.fFillQACorrelationsVsInteractionRateVsProfiles2D)); qa.fQAHistogramsPro->GetXaxis()->SetBinLabel(7, "fRebin"); - qa.fQAHistogramsPro->Fill(6.5, static_cast(qa.fRebin)); + qa.fQAHistogramsPro->Fill(6.5, qa.fRebin); // ... @@ -5605,7 +5605,7 @@ void bookParticleSparseHistograms(EnDiffWeightCategory dwc) // *) Determine binning for all dimensions: TArrayI* nBins = new TArrayI(nDimensions); for (int d = 0; d < nDimensions; d++) { - nBins->AddAt(static_cast(ph.fParticleSparseHistogramsNBins[dwc][d]), d); + nBins->AddAt(ph.fParticleSparseHistogramsNBins[dwc][d], d); } // *) Book THnSparse with correct number of bins for each dimension, but void bin edges: @@ -6661,14 +6661,14 @@ void bookNUAHistograms() // TBI 20260312 the binning below is a bit fragile, but ok... if (tc.fUseSetBinLabel) { - nua.fNUAFlagsPro->GetXaxis()->SetBinLabel(static_cast(1 + ePhiNUAPDF), "fApplyNUAPDF[phi]"); - nua.fNUAFlagsPro->GetXaxis()->SetBinLabel(static_cast(1 + ePtNUAPDF), "fApplyNUAPDF[pt]"); - nua.fNUAFlagsPro->GetXaxis()->SetBinLabel(static_cast(1 + eEtaNUAPDF), "fApplyNUAPDF[eta]"); - nua.fNUAFlagsPro->GetXaxis()->SetBinLabel(static_cast(1 + eChargeNUAPDF), "fApplyNUAPDF[charge]"); - nua.fNUAFlagsPro->GetXaxis()->SetBinLabel(static_cast(5 + ePhiNUAPDF), "fUseDefaultNUAPDF[phi]"); - nua.fNUAFlagsPro->GetXaxis()->SetBinLabel(static_cast(5 + ePtNUAPDF), "fUseDefaultNUAPDF[pt]"); - nua.fNUAFlagsPro->GetXaxis()->SetBinLabel(static_cast(5 + eEtaNUAPDF), "fUseDefaultNUAPDF[eta]"); - nua.fNUAFlagsPro->GetXaxis()->SetBinLabel(static_cast(5 + eChargeNUAPDF), "fUseDefaultNUAPDF[charge]"); + nua.fNUAFlagsPro->GetXaxis()->SetBinLabel((1 + ePhiNUAPDF), "fApplyNUAPDF[phi]"); + nua.fNUAFlagsPro->GetXaxis()->SetBinLabel((1 + ePtNUAPDF), "fApplyNUAPDF[pt]"); + nua.fNUAFlagsPro->GetXaxis()->SetBinLabel((1 + eEtaNUAPDF), "fApplyNUAPDF[eta]"); + nua.fNUAFlagsPro->GetXaxis()->SetBinLabel((1 + eChargeNUAPDF), "fApplyNUAPDF[charge]"); + nua.fNUAFlagsPro->GetXaxis()->SetBinLabel((5 + ePhiNUAPDF), "fUseDefaultNUAPDF[phi]"); + nua.fNUAFlagsPro->GetXaxis()->SetBinLabel((5 + ePtNUAPDF), "fUseDefaultNUAPDF[pt]"); + nua.fNUAFlagsPro->GetXaxis()->SetBinLabel((5 + eEtaNUAPDF), "fUseDefaultNUAPDF[eta]"); + nua.fNUAFlagsPro->GetXaxis()->SetBinLabel((5 + eChargeNUAPDF), "fUseDefaultNUAPDF[charge]"); // ... @@ -6677,14 +6677,14 @@ void bookNUAHistograms() // Workaround for SetBinLabel() large memory consumption: TString yAxisTitle = ""; - yAxisTitle += TString::Format("%d:fApplyNUAPDF[phi]; ", static_cast(1 + ePhiNUAPDF)); - yAxisTitle += TString::Format("%d:fApplyNUAPDF[pt]; ", static_cast(1 + ePtNUAPDF)); - yAxisTitle += TString::Format("%d:fApplyNUAPDF[eta]; ", static_cast(1 + eEtaNUAPDF)); - yAxisTitle += TString::Format("%d:fApplyNUAPDF[charge]; ", static_cast(1 + eChargeNUAPDF)); - yAxisTitle += TString::Format("%d:fUseDefaultNUAPDF[phi]; ", static_cast(5 + ePhiNUAPDF)); - yAxisTitle += TString::Format("%d:fUseDefaultNUAPDF[pt]; ", static_cast(5 + ePtNUAPDF)); - yAxisTitle += TString::Format("%d:fUseDefaultNUAPDF[eta]; ", static_cast(5 + eEtaNUAPDF)); - yAxisTitle += TString::Format("%d:fUseDefaultNUAPDF[charge]; ", static_cast(5 + eChargeNUAPDF)); + yAxisTitle += TString::Format("%d:fApplyNUAPDF[phi]; ", (1 + ePhiNUAPDF)); + yAxisTitle += TString::Format("%d:fApplyNUAPDF[pt]; ", (1 + ePtNUAPDF)); + yAxisTitle += TString::Format("%d:fApplyNUAPDF[eta]; ", (1 + eEtaNUAPDF)); + yAxisTitle += TString::Format("%d:fApplyNUAPDF[charge]; ", (1 + eChargeNUAPDF)); + yAxisTitle += TString::Format("%d:fUseDefaultNUAPDF[phi]; ", (5 + ePhiNUAPDF)); + yAxisTitle += TString::Format("%d:fUseDefaultNUAPDF[pt]; ", (5 + ePtNUAPDF)); + yAxisTitle += TString::Format("%d:fUseDefaultNUAPDF[eta]; ", (5 + eEtaNUAPDF)); + yAxisTitle += TString::Format("%d:fUseDefaultNUAPDF[charge]; ", (5 + eChargeNUAPDF)); // ... @@ -6703,28 +6703,28 @@ void bookNUAHistograms() } // else if (nua.fApplyNUAPDF[ePhiNUAPDF]) { - nua.fNUAFlagsPro->Fill(static_cast(1 + ePhiNUAPDF), 1.); + nua.fNUAFlagsPro->Fill((1 + ePhiNUAPDF), 1.); } if (nua.fApplyNUAPDF[ePtNUAPDF]) { - nua.fNUAFlagsPro->Fill(static_cast(1 + ePtNUAPDF), 1.); + nua.fNUAFlagsPro->Fill((1 + ePtNUAPDF), 1.); } if (nua.fApplyNUAPDF[eEtaNUAPDF]) { - nua.fNUAFlagsPro->Fill(static_cast(1 + eEtaNUAPDF), 1.); + nua.fNUAFlagsPro->Fill((1 + eEtaNUAPDF), 1.); } if (nua.fApplyNUAPDF[eChargeNUAPDF]) { - nua.fNUAFlagsPro->Fill(static_cast(1 + eChargeNUAPDF), 1.); + nua.fNUAFlagsPro->Fill((1 + eChargeNUAPDF), 1.); } if (nua.fUseDefaultNUAPDF[ePhiNUAPDF]) { - nua.fNUAFlagsPro->Fill(static_cast(5 + ePhiNUAPDF), 1.); + nua.fNUAFlagsPro->Fill((5 + ePhiNUAPDF), 1.); } if (nua.fUseDefaultNUAPDF[ePtNUAPDF]) { - nua.fNUAFlagsPro->Fill(static_cast(5 + ePtNUAPDF), 1.); + nua.fNUAFlagsPro->Fill((5 + ePtNUAPDF), 1.); } if (nua.fUseDefaultNUAPDF[eEtaNUAPDF]) { - nua.fNUAFlagsPro->Fill(static_cast(5 + eEtaNUAPDF), 1.); + nua.fNUAFlagsPro->Fill((5 + eEtaNUAPDF), 1.); } if (nua.fUseDefaultNUAPDF[eChargeNUAPDF]) { - nua.fNUAFlagsPro->Fill(static_cast(5 + eChargeNUAPDF), 1.); + nua.fNUAFlagsPro->Fill((5 + eChargeNUAPDF), 1.); } nua.fNUAList->Add(nua.fNUAFlagsPro); @@ -6913,7 +6913,7 @@ void bookInternalValidationHistograms() // b) Book and fill container vn amplitudes: iv.fInternalValidationVnPsin[eVn] = new TArrayD(gMaxHarmonic); - auto lInternalValidationAmplitudes = (std::vector)cf_iv.cfInternalValidationAmplitudes; // this is now the local version of that array from configurable + auto lInternalValidationAmplitudes = std::vector(cf_iv.cfInternalValidationAmplitudes); // this is now the local version of that array from configurable if (lInternalValidationAmplitudes.size() < 1) { LOGF(fatal, "\033[1;31m%s at line %d : set at least one vn amplitude in array cfInternalValidationAmplitudes\n \033[0m", __FUNCTION__, __LINE__); } @@ -6926,7 +6926,7 @@ void bookInternalValidationHistograms() // c) Book and fill container for Psin planes: iv.fInternalValidationVnPsin[ePsin] = new TArrayD(gMaxHarmonic); - auto lInternalValidationPlanes = (std::vector)cf_iv.cfInternalValidationPlanes; + auto lInternalValidationPlanes = std::vector(cf_iv.cfInternalValidationPlanes); if (lInternalValidationPlanes.size() < 1) { LOGF(fatal, "\033[1;31m%s at line : %d set at least one Psi plane in array cfInternalValidationPlanes\n \033[0m", __FUNCTION__, __LINE__); } @@ -6941,7 +6941,7 @@ void bookInternalValidationHistograms() } // d) Handle multiplicity for internal validation: - auto lMultRangeInternalValidation = (std::vector)cf_iv.cfMultRangeInternalValidation; + auto lMultRangeInternalValidation = std::vector(cf_iv.cfMultRangeInternalValidation); iv.fMultRangeInternalValidation[eMin] = lMultRangeInternalValidation[eMin]; iv.fMultRangeInternalValidation[eMax] = lMultRangeInternalValidation[eMax]; if (iv.fMultRangeInternalValidation[eMin] >= iv.fMultRangeInternalValidation[eMax]) { diff --git a/PWGCF/MultiparticleCorrelations/Tasks/multiharmonicCorrelations.cxx b/PWGCF/MultiparticleCorrelations/Tasks/multiharmonicCorrelations.cxx index 6768b8dd5bc..e72d4cbfefa 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/multiharmonicCorrelations.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/multiharmonicCorrelations.cxx @@ -230,7 +230,7 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to while ((objectIter = next())) // double round braces are to silence the warnings { if (TString(objectIter->ClassName()).EqualTo("TList")) { - objectFinal = GetObjectFromList(reinterpret_cast(objectIter), objectName); + objectFinal = GetObjectFromList(dynamic_cast(objectIter), objectName); if (objectFinal) return objectFinal; } @@ -281,11 +281,11 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to // Finally, from the top-level TList, get the desired nested TList => the technical problem here is that it can be nested at any level, // for thare there is a helper utility function GetObjectFromList(...) , see its implementation further below - listWithRuns = reinterpret_cast(GetObjectFromList(baseList, runNumber)); + listWithRuns = dynamic_cast(GetObjectFromList(baseList, runNumber)); if (!listWithRuns) { TString runNumberWithLeadingZeroes = "000"; runNumberWithLeadingZeroes += runNumber; // another try, with "000" prepended to run number - listWithRuns = reinterpret_cast(GetObjectFromList(baseList, runNumberWithLeadingZeroes.Data())); + listWithRuns = dynamic_cast(GetObjectFromList(baseList, runNumberWithLeadingZeroes.Data())); if (!listWithRuns) { LOGF(fatal, "\033[1;31m%s at line %d\033[0m", __FUNCTION__, __LINE__); } @@ -295,16 +295,16 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to // File you want to access is in your home dir in CCDB: // Remember that here I do not access the file; instead, I directly access the object in that file. ccdb->setURL("http://alice-ccdb.cern.ch"); // to be able to use "ccdb" this object in your analysis task, see 4b/ below - baseList = reinterpret_cast(ccdb->get(TString(filePath).ReplaceAll("/alice-ccdb.cern.ch/", "").Data())); + baseList = static_cast(ccdb->get(TString(filePath).ReplaceAll("/alice-ccdb.cern.ch/", "").Data())); if (!baseList) { LOGF(fatal, "\033[1;31m%s at line %d\033[0m", __FUNCTION__, __LINE__); } - listWithRuns = reinterpret_cast(GetObjectFromList(baseList, runNumber)); + listWithRuns = dynamic_cast(GetObjectFromList(baseList, runNumber)); if (!listWithRuns) { TString runNumberWithLeadingZeroes = "000"; runNumberWithLeadingZeroes += runNumber; // another try, with "000" prepended to run number - listWithRuns = reinterpret_cast(GetObjectFromList(baseList, runNumberWithLeadingZeroes.Data())); + listWithRuns = dynamic_cast(GetObjectFromList(baseList, runNumberWithLeadingZeroes.Data())); if (!listWithRuns) { LOGF(fatal, "\033[1;31m%s at line %d\033[0m", __FUNCTION__, __LINE__); } @@ -332,11 +332,11 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to LOGF(fatal, "\033[1;31m%s at line %d\033[0m", __FUNCTION__, __LINE__); } - listWithRuns = reinterpret_cast(GetObjectFromList(baseList, runNumber)); + listWithRuns = dynamic_cast(GetObjectFromList(baseList, runNumber)); if (!listWithRuns) { TString runNumberWithLeadingZeroes = "000"; runNumberWithLeadingZeroes += runNumber; // another try, with "000" prepended to run number - listWithRuns = reinterpret_cast(GetObjectFromList(baseList, runNumberWithLeadingZeroes.Data())); + listWithRuns = dynamic_cast(GetObjectFromList(baseList, runNumberWithLeadingZeroes.Data())); if (!listWithRuns) { // baseList->ls(); LOGF(fatal, "\033[1;31m%s at line %d : this crash can happen if in the output file there is no list with weights for the current run number = %s\033[0m", __FUNCTION__, __LINE__ /*, tc.fRunNumber.Data()*/); @@ -348,14 +348,14 @@ struct MultiharmonicCorrelations { // this name is used in lower-case format to // Here comes the common code for all three cases, where from "listWithRuns" you fetch the desired histogram with efficiency corrections: listWithRuns->ls(); - hist = reinterpret_cast(listWithRuns->FindObject("histWithEfficiencyCorrections")); + hist = dynamic_cast(listWithRuns->FindObject("histWithEfficiencyCorrections")); if (!hist) { LOGF(fatal, "no histweight"); } // Once you have a valid pointer to "hist", add these technical lines: - hist->SetDirectory(0); // remove ownerhip from an external file - TH1F* histClone = reinterpret_cast(hist->Clone()); // yes, I have to clone here + hist->SetDirectory(0); // remove ownerhip from an external file + TH1F* histClone = dynamic_cast(hist->Clone()); // yes, I have to clone here return histClone; diff --git a/PWGCF/MultiparticleCorrelations/Tasks/multiparticle-correlations-ar.cxx b/PWGCF/MultiparticleCorrelations/Tasks/multiparticle-correlations-ar.cxx index 411c1ec8426..5f57910e723 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/multiparticle-correlations-ar.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/multiparticle-correlations-ar.cxx @@ -1304,7 +1304,7 @@ struct MultiParticleCorrelationsARTask { harmonic[counter1] = hhold; if (mult == 1) return c - c2; - return c - double(mult) * c2; + return c - static_cast(mult) * c2; } using CollisionsInstance = soa::Join; diff --git a/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx b/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx index b78325f9d01..0decae5c8c5 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx @@ -403,22 +403,22 @@ struct ThreeParticleCorrelations { ccdb->setCaching(true); TList* effListChargedParticles = ccdb->getForTimeStamp("Users/j/jstaa/Efficiency/ChargedParticles", 1); TList* effListLambdas = ccdb->getForTimeStamp("Users/j/jstaa/Efficiency/Lambdas", 1); - hEffPions[0] = static_cast(effListChargedParticles->FindObject("hEfficiencyPionP")); - hEffPions[1] = static_cast(effListChargedParticles->FindObject("hEfficiencyPionN")); - hEffKaons[0] = static_cast(effListChargedParticles->FindObject("hEfficiencyKaonP")); - hEffKaons[1] = static_cast(effListChargedParticles->FindObject("hEfficiencyKaonN")); - hEffProtons[0] = static_cast(effListChargedParticles->FindObject("hEfficiencyProtonP")); - hEffProtons[1] = static_cast(effListChargedParticles->FindObject("hEfficiencyProtonN")); - hEffLambdas[0] = static_cast(effListLambdas->FindObject("hEfficiencyLambdaP")); - hEffLambdas[1] = static_cast(effListLambdas->FindObject("hEfficiencyLambdaN")); + hEffPions[0] = dynamic_cast(effListChargedParticles->FindObject("hEfficiencyPionP")); + hEffPions[1] = dynamic_cast(effListChargedParticles->FindObject("hEfficiencyPionN")); + hEffKaons[0] = dynamic_cast(effListChargedParticles->FindObject("hEfficiencyKaonP")); + hEffKaons[1] = dynamic_cast(effListChargedParticles->FindObject("hEfficiencyKaonN")); + hEffProtons[0] = dynamic_cast(effListChargedParticles->FindObject("hEfficiencyProtonP")); + hEffProtons[1] = dynamic_cast(effListChargedParticles->FindObject("hEfficiencyProtonN")); + hEffLambdas[0] = dynamic_cast(effListLambdas->FindObject("hEfficiencyLambdaP")); + hEffLambdas[1] = dynamic_cast(effListLambdas->FindObject("hEfficiencyLambdaN")); TList* correctionListChargedParticles = ccdb->getForTimeStamp("Users/j/jstaa/SpectraRatios/ChargedParticles", 1); - hCorrectionPions[0] = static_cast(correctionListChargedParticles->FindObject("h2DRatioPionP")); - hCorrectionPions[1] = static_cast(correctionListChargedParticles->FindObject("h2DRatioPionN")); - hCorrectionKaons[0] = static_cast(correctionListChargedParticles->FindObject("h2DRatioKaonP")); - hCorrectionKaons[1] = static_cast(correctionListChargedParticles->FindObject("h2DRatioKaonN")); - hCorrectionProtons[0] = static_cast(correctionListChargedParticles->FindObject("h2DRatioProtonP")); - hCorrectionProtons[1] = static_cast(correctionListChargedParticles->FindObject("h2DRatioProtonN")); + hCorrectionPions[0] = dynamic_cast(correctionListChargedParticles->FindObject("h2DRatioPionP")); + hCorrectionPions[1] = dynamic_cast(correctionListChargedParticles->FindObject("h2DRatioPionN")); + hCorrectionKaons[0] = dynamic_cast(correctionListChargedParticles->FindObject("h2DRatioKaonP")); + hCorrectionKaons[1] = dynamic_cast(correctionListChargedParticles->FindObject("h2DRatioKaonN")); + hCorrectionProtons[0] = dynamic_cast(correctionListChargedParticles->FindObject("h2DRatioProtonP")); + hCorrectionProtons[1] = dynamic_cast(correctionListChargedParticles->FindObject("h2DRatioProtonN")); } //========================================================================================================================================================================================================================================================================== diff --git a/PWGCF/TableProducer/dptDptFilter.cxx b/PWGCF/TableProducer/dptDptFilter.cxx index 592070588c7..b03dcacb10a 100644 --- a/PWGCF/TableProducer/dptDptFilter.cxx +++ b/PWGCF/TableProducer/dptDptFilter.cxx @@ -360,9 +360,9 @@ struct Multiplicity { void setMultiplicityPercentiles(TList* list) { LOGF(info, "setMultiplicityPercentiles(). From list %s", list->GetName()); - fhV0MMultPercentile = reinterpret_cast(list->FindObject("V0MCentMult")); - fhCL1MultPercentile = reinterpret_cast(list->FindObject("CL1MCentMult")); - fhCL1EtaGapMultPercentile = reinterpret_cast(list->FindObject("CL1EtaGapMCentMult")); + fhV0MMultPercentile = dynamic_cast(list->FindObject("V0MCentMult")); + fhCL1MultPercentile = dynamic_cast(list->FindObject("CL1MCentMult")); + fhCL1EtaGapMultPercentile = dynamic_cast(list->FindObject("CL1EtaGapMCentMult")); if (fhV0MMultPercentile == nullptr || fhCL1MultPercentile == nullptr || fhCL1EtaGapMultPercentile == nullptr) { LOGF(fatal, "setMultiplicityPercentiles()", "Percentiles histograms not correctly loaded. ABORTING!!!"); @@ -888,7 +888,7 @@ void DptDptFilter::processReconstructed(CollisionObject const& collision, Tracks fhCentMultB->Fill(tentativecentmult); fhMultB->Fill(mult); fhVertexZB->Fill(collision.posZ()); - uint8_t acceptedevent = uint8_t(false); + uint8_t acceptedevent = static_cast(false); float centormult = tentativecentmult; int64_t orbit = collision.template bc_as().globalBC() / nBCsPerOrbit; bool withinOrbitOfInterest = (cfgEventSelection.minOrbit <= orbit) && (orbit < cfgEventSelection.maxOrbit); @@ -906,7 +906,7 @@ void DptDptFilter::processReconstructed(CollisionObject const& collision, Tracks } else { if (!fullDerivedData) { /* the tracks are done at a different level */ - collisionsinfo(uint8_t(false), 105.0); + collisionsinfo(static_cast(false), 105.0); } } /* report the trigger and event selection */ @@ -1015,9 +1015,9 @@ bool DptDptFilter::processGenerated(CollisionObject const& mccollision, Particle { using namespace dptdptfilter; - uint8_t acceptedevent = uint8_t(false); + uint8_t acceptedevent = static_cast(false); if (isEventSelected(mccollision, centormult)) { - acceptedevent = uint8_t(true); + acceptedevent = static_cast(true); } if (fullDerivedData) { acceptedtrueevents(mccollision.bcId(), mccollision.posZ(), acceptedevent, centormult); @@ -1061,7 +1061,7 @@ void DptDptFilter::processGeneratorLevel(aod::McCollision const& mccollision, } } if (!processed && !fullDerivedData) { - gencollisionsinfo(uint8_t(false), 105.0); + gencollisionsinfo(static_cast(false), 105.0); } } @@ -1095,7 +1095,7 @@ void DptDptFilter::processWithoutCentGeneratorLevel(aod::McCollision const& mcco void DptDptFilter::processOnTheFlyGeneratorLevel(aod::McCollision const& mccollision, aod::McParticles const& mcparticles) { - uint8_t acceptedEvent = uint8_t(false); + uint8_t acceptedEvent = static_cast(false); fhTrueVertexZB->Fill(mccollision.posZ()); /* we assign a default value for the time being */ float centormult = 50.0f; diff --git a/PWGCF/TableProducer/dptDptFilter.h b/PWGCF/TableProducer/dptDptFilter.h index 879b8092209..f593bd54289 100644 --- a/PWGCF/TableProducer/dptDptFilter.h +++ b/PWGCF/TableProducer/dptDptFilter.h @@ -1762,7 +1762,7 @@ struct PIDSpeciesSelection { auto storedetectorwithcharge = [&](auto& detectorstore, auto detectorname, auto charge) { for (uint isp = 0; isp < spadjnames.size(); ++isp) { TString fullhname = TString::Format("%s%s%s_Difference", detectorname, spadjnames[isp].data(), charge); - detectorstore[isp] = static_cast(lst->FindObject(fullhname.Data())); + detectorstore[isp] = dynamic_cast(lst->FindObject(fullhname.Data())); } }; auto reportadjdetectorwithcharge = [&](auto& detectorstore, auto detectorname, auto charge) { diff --git a/PWGCF/TableProducer/filterCorrelations.cxx b/PWGCF/TableProducer/filterCorrelations.cxx index d31f482fa9b..0d294391943 100644 --- a/PWGCF/TableProducer/filterCorrelations.cxx +++ b/PWGCF/TableProducer/filterCorrelations.cxx @@ -127,7 +127,7 @@ struct FilterCF { // TODO how to have this in the second task? For now they are copied Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPt); - Filter trackSelection = (requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true); + Filter trackSelection = (requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true)); Filter mcCollisionFilter = nabs(aod::mccollision::posZ) < cfgCutVertex; @@ -768,7 +768,7 @@ struct MultiplicitySelector { O2_DEFINE_CONFIGURABLE(cfgCutEta, float, 0.8f, "Eta range for tracks"); Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPt); - Filter trackSelection = (requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true); + Filter trackSelection = (requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true)); void init(InitContext&) { diff --git a/PWGCF/Tasks/correlations.cxx b/PWGCF/Tasks/correlations.cxx index 5a5f41d3de2..6833d8a6e13 100644 --- a/PWGCF/Tasks/correlations.cxx +++ b/PWGCF/Tasks/correlations.cxx @@ -158,7 +158,7 @@ struct CorrelationTask { Filter collisionVertexTypeFilter = (aod::collision::flags & static_cast(aod::collision::CollisionFlagsRun2::Run2VertexerTracks)) == static_cast(aod::collision::CollisionFlagsRun2::Run2VertexerTracks); // Track filters - Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPt) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)); + Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPt) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))); Filter cfTrackFilter = (nabs(aod::cftrack::eta) < cfgCutEta) && (aod::cftrack::pt > cfgCutPt) && ncheckbit(aod::track::trackType, as(cfgTrackBitMask)); // MC filters @@ -908,7 +908,7 @@ struct CorrelationTask { if (cfgEfficiencyTrigger.value.empty() == false) { if (cfgLocalEfficiency > 0) { TFile* fEfficiencyTrigger = TFile::Open(cfgEfficiencyTrigger.value.c_str(), "READ"); - cfg.mEfficiencyTrigger = reinterpret_cast(fEfficiencyTrigger->Get("ccdb_object")); + cfg.mEfficiencyTrigger = dynamic_cast(fEfficiencyTrigger->Get("ccdb_object")); } else { cfg.mEfficiencyTrigger = ccdb->getForTimeStamp>(cfgEfficiencyTrigger, timestamp); } @@ -920,7 +920,7 @@ struct CorrelationTask { if (cfgEfficiencyAssociated.value.empty() == false) { if (cfgLocalEfficiency > 0) { TFile* fEfficiencyAssociated = TFile::Open(cfgEfficiencyAssociated.value.c_str(), "READ"); - cfg.mEfficiencyAssociated = reinterpret_cast(fEfficiencyAssociated->Get("ccdb_object")); + cfg.mEfficiencyAssociated = dynamic_cast(fEfficiencyAssociated->Get("ccdb_object")); } else { cfg.mEfficiencyAssociated = ccdb->getForTimeStamp>(cfgEfficiencyAssociated, timestamp); } @@ -1327,7 +1327,7 @@ struct CorrelationTask { } for (const auto& track : groupedTracks) { - if (cfgTrackBitMask > 0 && (track.trackType() & (uint8_t)cfgTrackBitMask) != (uint8_t)cfgTrackBitMask) { + if (cfgTrackBitMask > 0 && (track.trackType() & static_cast(cfgTrackBitMask)) != static_cast(cfgTrackBitMask)) { continue; } if (track.has_cfMCParticle()) { diff --git a/PWGCF/Tasks/dptDptCorrelations.cxx b/PWGCF/Tasks/dptDptCorrelations.cxx index 9f7713c221c..73335b6a4c1 100644 --- a/PWGCF/Tasks/dptDptCorrelations.cxx +++ b/PWGCF/Tasks/dptDptCorrelations.cxx @@ -1266,7 +1266,7 @@ struct DptDptCorrelations { if constexpr (gen) { std::vector ptavgs{tnames.size(), nullptr}; for (uint isp = 0; isp < tnames.size(); ++isp) { - ptavgs[isp] = reinterpret_cast(ccdblst->FindObject( + ptavgs[isp] = dynamic_cast(ccdblst->FindObject( TString::Format("trueptavgetaphi_%02d-%02d_%s", static_cast(fCentMultMin[ixDCE]), static_cast(fCentMultMax[ixDCE]), @@ -1278,7 +1278,7 @@ struct DptDptCorrelations { std::vector corrs{tnames.size(), nullptr}; for (uint isp = 0; isp < tnames.size(); ++isp) { auto hName = TString::Format("correction%s_%02d-%02d_%s", getDimensionStr(), static_cast(fCentMultMin[ixDCE]), static_cast(fCentMultMax[ixDCE]), tnames[isp].c_str()); - corrs[isp] = reinterpret_cast(ccdblst->FindObject(hName.Data())); + corrs[isp] = dynamic_cast(ccdblst->FindObject(hName.Data())); if (corrs[isp] != nullptr) { LOGF(info, "Loaded %s", corrs[isp]->GetName()); } else { @@ -1288,7 +1288,7 @@ struct DptDptCorrelations { storeTrackCorrections(corrs); std::vector ptavgs{tnames.size(), nullptr}; for (uint isp = 0; isp < tnames.size(); ++isp) { - ptavgs[isp] = reinterpret_cast(ccdblst->FindObject( + ptavgs[isp] = dynamic_cast(ccdblst->FindObject( TString::Format("ptavgetaphi_%02d-%02d_%s", static_cast(fCentMultMin[ixDCE]), static_cast(fCentMultMax[ixDCE]), @@ -1341,7 +1341,7 @@ struct DptDptCorrelations { if constexpr (gen) { std::vector ptavgs{tnames.size(), nullptr}; for (uint isp = 0; isp < tnames.size(); ++isp) { - ptavgs[isp] = reinterpret_cast(ccdblst->FindObject( + ptavgs[isp] = dynamic_cast(ccdblst->FindObject( TString::Format("trueptavgetaphi_%02d-%02d_%s", static_cast(fCentMultMin[ixDCE]), static_cast(fCentMultMax[ixDCE]), @@ -1353,7 +1353,7 @@ struct DptDptCorrelations { std::vector corrs{tnames.size(), nullptr}; for (uint isp = 0; isp < tnames.size(); ++isp) { auto hName = TString::Format("correction%s_%02d-%02d_%s", getDimensionStr(), static_cast(fCentMultMin[ixDCE]), static_cast(fCentMultMax[ixDCE]), tnames[isp].c_str()); - corrs[isp] = reinterpret_cast(ccdblst->FindObject(hName.Data())); + corrs[isp] = dynamic_cast(ccdblst->FindObject(hName.Data())); if (corrs[isp] != nullptr) { LOGF(info, "Loaded %s", corrs[isp]->GetName()); } else { @@ -1363,7 +1363,7 @@ struct DptDptCorrelations { dataCEME[ixDCE]->storeTrackCorrections(corrs); std::vector ptavgs{tnames.size(), nullptr}; for (uint isp = 0; isp < tnames.size(); ++isp) { - ptavgs[isp] = reinterpret_cast(ccdblst->FindObject( + ptavgs[isp] = dynamic_cast(ccdblst->FindObject( TString::Format("ptavgetaphi_%02d-%02d_%s", static_cast(fCentMultMin[ixDCE]), static_cast(fCentMultMax[ixDCE]), @@ -1396,8 +1396,8 @@ struct DptDptCorrelations { } } - Filter onlyacceptedcollisions = (aod::dptdptfilter::collisionaccepted == uint8_t(true)); - Filter onlyacceptedtracks = (aod::dptdptfilter::trackacceptedid >= int8_t(0)); + Filter onlyacceptedcollisions = (aod::dptdptfilter::collisionaccepted == static_cast(true)); + Filter onlyacceptedtracks = (aod::dptdptfilter::trackacceptedid >= static_cast(0)); void processRecLevel(soa::Filtered::iterator const& collision, aod::BCsWithTimestamps const&, soa::Filtered const& tracks) { diff --git a/PWGCF/Tasks/dptDptFilterQa.cxx b/PWGCF/Tasks/dptDptFilterQa.cxx index c5771213e62..dd02c6b4fc0 100644 --- a/PWGCF/Tasks/dptDptFilterQa.cxx +++ b/PWGCF/Tasks/dptDptFilterQa.cxx @@ -102,7 +102,7 @@ struct DptDptFilterQa { using namespace o2::analysis::dptdptfilterqa; static constexpr int kNoOfIclusiveParticles = 2; /* number of inclusive charged particles, aka positive and negative */ - if (collision.collisionaccepted() != uint8_t(true)) { + if (collision.collisionaccepted() != static_cast(true)) { histos.fill(HIST(Dirname[dir]) + HIST("SelectedEvents"), 0.5); } else { histos.fill(HIST(Dirname[dir]) + HIST("SelectedEvents"), 1.5); @@ -126,7 +126,7 @@ struct DptDptFilterQa { nTracksTwo++; } } - if (collision.collisionaccepted() != uint8_t(true)) { + if (collision.collisionaccepted() != static_cast(true)) { /* control for non selected events */ histos.fill(HIST(Dirname[dir]) + HIST("TracksOneUnsel"), nTracksOne); histos.fill(HIST(Dirname[dir]) + HIST("TracksTwoUnsel"), nTracksTwo); @@ -140,8 +140,8 @@ struct DptDptFilterQa { } } - Filter onlyacceptedcollisions = (aod::dptdptfilter::collisionaccepted == uint8_t(true)); - Filter onlyacceptedtracks = (int8_t(0) <= aod::dptdptfilter::trackacceptedid); + Filter onlyacceptedcollisions = (aod::dptdptfilter::collisionaccepted == static_cast(true)); + Filter onlyacceptedtracks = (static_cast(0) <= aod::dptdptfilter::trackacceptedid); void processGeneratorLevel(soa::Filtered::iterator const& collision, soa::Filtered const& tracks) { diff --git a/PWGCF/Tasks/matchRecoGen.cxx b/PWGCF/Tasks/matchRecoGen.cxx index b9a995b427d..f2de2f7762e 100644 --- a/PWGCF/Tasks/matchRecoGen.cxx +++ b/PWGCF/Tasks/matchRecoGen.cxx @@ -374,7 +374,7 @@ struct MatchRecoGen { if (!(label < 0)) { if (!(track.collisionId() < 0)) { typename CollisionsObject::iterator coll = collisions.iteratorAt(track.collisionId()); - if (coll.collisionaccepted() == uint8_t(true)) { + if (coll.collisionaccepted() == static_cast(true)) { /* TODO: AcceptTrack does not consider PID */ if (!(track.trackacceptedid() < 0)) { /* the track has been accepted */ diff --git a/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.cxx b/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.cxx index 3181b07d8b5..96e92adf323 100644 --- a/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.cxx +++ b/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.cxx @@ -240,7 +240,7 @@ void EventSelectionFilterAndAnalysis::MultiplicityBrick::initialize() } } } - if (mAlternateEstimatorIndex.size() != (uint)(varlst.GetEntries())) { + if (mAlternateEstimatorIndex.size() != static_cast(varlst.GetEntries())) { LOGF(fatal, "EventSelectionFilterAndAnalysis::InitializeMultiplicityFilter() variant multiplicity class estimators not all implemented"); } } @@ -297,7 +297,7 @@ void EventSelectionFilterAndAnalysis::PileUpRejBrick::initialize() } } } - if (mAlternateEstimatorIndex.size() != (uint)(varlst.GetEntries())) { + if (mAlternateEstimatorIndex.size() != static_cast(varlst.GetEntries())) { LOGF(fatal, "EventSelectionFilterAndAnalysis::InitializeMultiplicityFilter() variant pile-up correlator estimators not all implemented"); } } @@ -425,11 +425,11 @@ void EventSelectionFilterAndAnalysis::ComplexBrickHelper::armedBrick(uint64_t& a if (deflst.GetEntries() > 1) { LOGF(fatal, "EventSelectionFilterAndAnalysis::Filter() expected only one default multiplicity class estimator"); } - armedBrick((CutBrick*)deflst.At(0), true); + armedBrick(dynamic_cast*>(deflst.At(0)), true); /* and now the variants */ TList& varlst = dynamic_cast*>(mBrick)->getVariantBricks(); for (int i = 0; i < varlst.GetEntries(); ++i) { - armedBrick((CutBrick*)varlst.At(i), true); + armedBrick(dynamic_cast*>(varlst.At(i)), true); } } else { /* no alternative estimators, just the default */ diff --git a/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h b/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h index a746cb96248..c65370e2f5b 100644 --- a/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h +++ b/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h @@ -181,12 +181,12 @@ inline bool EventSelectionFilterAndAnalysis::ComplexBrickHelper::Filter(uint64_t } */ /* first the default */ TList& deflst = dynamic_cast*>(mBrick)->getDefaultBricks(); - bool acc = Filter(mask, bit, (CutBrick*)deflst.At(0), mDefaultEstimatorIndex); + bool acc = Filter(mask, bit, dynamic_cast*>(deflst.At(0)), mDefaultEstimatorIndex); atleastonealternative = atleastonealternative || acc; /* and now the variants */ TList& varlst = dynamic_cast*>(mBrick)->getVariantBricks(); for (int i = 0; i < varlst.GetEntries(); ++i) { - bool acc = Filter(mask, bit, (CutBrick*)varlst.At(i), mAlternateEstimatorIndex[i]); + bool acc = Filter(mask, bit, dynamic_cast*>(varlst.At(i)), mAlternateEstimatorIndex[i]); atleastonealternative = atleastonealternative || acc; } acceptcollision = acceptcollision && atleastonealternative; diff --git a/PWGCF/TwoParticleCorrelations/Core/SelectionFilterAndAnalysis.cxx b/PWGCF/TwoParticleCorrelations/Core/SelectionFilterAndAnalysis.cxx index 2af7b649e7b..5ee75a10dbe 100644 --- a/PWGCF/TwoParticleCorrelations/Core/SelectionFilterAndAnalysis.cxx +++ b/PWGCF/TwoParticleCorrelations/Core/SelectionFilterAndAnalysis.cxx @@ -57,7 +57,7 @@ TString SelectionFilterAndAnalysis::printOptionalMasks() const str += ", "; } first = false; - str += TString::Format("0x%016lx", u_long(option)); + str += TString::Format("0x%016lx", static_cast(option)); } str += ")"; return str; diff --git a/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.cxx b/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.cxx index 56563c682ef..e08e2dbc763 100644 --- a/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.cxx +++ b/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.cxx @@ -118,7 +118,7 @@ CutBrickLimit::CutBrickLimit() /// \param value The limit value template CutBrickLimit::CutBrickLimit(const char* name, const TValueToFilter& value) - : CutBrick(name, TString::Format("%s{lim{%f}}", name, float(value))), + : CutBrick(name, TString::Format("%s{lim{%f}}", name, static_cast(value))), mLimit(value) { } @@ -252,7 +252,7 @@ CutBrickThreshold::CutBrickThreshold() /// \param value The threshold value template CutBrickThreshold::CutBrickThreshold(const char* name, const TValueToFilter& value) - : CutBrick(name, TString::Format("%s{th{%f}}", name, float(value))), + : CutBrick(name, TString::Format("%s{th{%f}}", name, static_cast(value))), mThreshold(value) { } @@ -388,7 +388,7 @@ CutBrickRange::CutBrickRange() /// \param high The high value for the cut range template CutBrickRange::CutBrickRange(const char* name, const TValueToFilter& low, const TValueToFilter& high) - : CutBrick(name, TString::Format("%s{rg{%f,%f}}", name, float(low), float(high))), + : CutBrick(name, TString::Format("%s{rg{%f,%f}}", name, static_cast(low), static_cast(high))), mLow(low), mUp(high) { @@ -532,7 +532,7 @@ CutBrickExtToRange::CutBrickExtToRange() /// \param high The high value for the cut excluded range template CutBrickExtToRange::CutBrickExtToRange(const char* name, const TValueToFilter& low, const TValueToFilter& high) - : CutBrick(name, TString::Format("%s{xrg{%f,%f}}", name, float(low), float(high))), + : CutBrick(name, TString::Format("%s{xrg{%f,%f}}", name, static_cast(low), static_cast(high))), mLow(low), mUp(high) { @@ -680,9 +680,9 @@ CutBrickSelectorMultipleRanges::CutBrickSelectorMultipleRanges(c for (auto edge : edges) { mEdges.push_back(edge); if (first) { - title += TString::Format("%.2f", float(edge)); + title += TString::Format("%.2f", static_cast(edge)); } else { - title += TString::Format(",%.2f", float(edge)); + title += TString::Format(",%.2f", static_cast(edge)); } } title += "}"; @@ -951,7 +951,7 @@ std::vector CutWithVariations::IsArmed() int nArmedDefaults = 0; int nArmedVariants = 0; for (int i = 0; i < mDefaultBricks.GetEntries(); ++i) { - std::vector tmp = ((CutBrick*)mDefaultBricks.At(i))->IsArmed(); + std::vector tmp = (dynamic_cast*>(mDefaultBricks.At(i)))->IsArmed(); res.insert(res.end(), tmp.begin(), tmp.end()); for (bool iarmed : tmp) { if (iarmed) { @@ -960,7 +960,7 @@ std::vector CutWithVariations::IsArmed() } } for (int i = 0; i < mVariationBricks.GetEntries(); ++i) { - std::vector tmp = ((CutBrick*)mVariationBricks.At(i))->IsArmed(); + std::vector tmp = (dynamic_cast*>(mVariationBricks.At(i)))->IsArmed(); res.insert(res.end(), tmp.begin(), tmp.end()); for (bool iarmed : tmp) { if (iarmed) { @@ -991,11 +991,11 @@ std::vector CutWithVariations::Filter(const TValueToFilter std::vector res; res.reserve(Length()); for (int i = 0; i < mDefaultBricks.GetEntries(); ++i) { - std::vector tmp = ((CutBrick*)mDefaultBricks.At(i))->Filter(value); + std::vector tmp = (dynamic_cast*>(mDefaultBricks.At(i)))->Filter(value); res.insert(res.end(), tmp.begin(), tmp.end()); } for (int i = 0; i < mVariationBricks.GetEntries(); ++i) { - std::vector tmp = ((CutBrick*)mVariationBricks.At(i))->Filter(value); + std::vector tmp = (dynamic_cast*>(mVariationBricks.At(i)))->Filter(value); res.insert(res.end(), tmp.begin(), tmp.end()); } return res; @@ -1010,10 +1010,10 @@ int CutWithVariations::Length() /* TODO: should a single default cut without variations return zero length? */ int length = 0; for (int i = 0; i < mDefaultBricks.GetEntries(); ++i) { - length += ((CutBrick*)mDefaultBricks.At(i))->Length(); + length += (dynamic_cast*>(mDefaultBricks.At(i)))->Length(); } for (int i = 0; i < mVariationBricks.GetEntries(); ++i) { - length += ((CutBrick*)mVariationBricks.At(i))->Length(); + length += (dynamic_cast*>(mVariationBricks.At(i)))->Length(); } return length; } @@ -1029,7 +1029,7 @@ int CutWithVariations::getArmedIndex() bool found = false; for (int i = 0; not found and i < brklst.GetEntries(); ++i) { index++; - std::vector tmp = ((CutBrick*)brklst.At(i))->IsArmed(); + std::vector tmp = (dynamic_cast*>(brklst.At(i)))->IsArmed(); for (bool iarmed : tmp) { if (iarmed) { found = true; diff --git a/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h b/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h index 05a4c32be31..031e3f90a62 100644 --- a/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h +++ b/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h @@ -77,7 +77,7 @@ class CutBrick : public TNamed void Arm(bool doit = true) { doit ? mMode = kSELECTED : mMode = kUNSELECTED; } /// Setting the value of independent variable for cuts with function levels /// The default behavior is to raise a fatal exception - virtual void setIndependentFnVar(float) + virtual void setIndependentFnVar(float) // NOLINT(readability/casting) { LOGF(fatal, "CutBrick::setIndependentFnVar(). The brick you are using %s does not accept setting the independent variable value"); } diff --git a/PWGCF/TwoParticleCorrelations/Core/TrackSelectionFilterAndAnalysis.cxx b/PWGCF/TwoParticleCorrelations/Core/TrackSelectionFilterAndAnalysis.cxx index 65b9149c6ca..de977a3df8d 100644 --- a/PWGCF/TwoParticleCorrelations/Core/TrackSelectionFilterAndAnalysis.cxx +++ b/PWGCF/TwoParticleCorrelations/Core/TrackSelectionFilterAndAnalysis.cxx @@ -229,10 +229,10 @@ int TrackSelectionFilterAndAnalysis::CalculateMaskLength() { int length = 0; for (int i = 0; i < mTrackSign.GetEntries(); ++i) { - length += ((CutBrick*)mTrackSign.At(i))->Length(); + length += (dynamic_cast*>(mTrackSign.At(i)))->Length(); } for (int i = 0; i < mTrackTypes.GetEntries(); ++i) { - length += ((SpecialCutBrick*)mTrackTypes.At(i))->Length(); + length += (dynamic_cast(mTrackTypes.At(i)))->Length(); } if (mNClustersTPC != nullptr) { length += mNClustersTPC->Length(); @@ -358,42 +358,42 @@ void TrackSelectionFilterAndAnalysis::ConstructCutFromString(const TString& cuts if (m[1].str() == "nclstpc") { storeIntCut(mNClustersTPC); for (int i = 0; i < mTrackTypes.GetEntries(); ++i) { - ((TrackSelectionBrick*)mTrackTypes.At(i))->DisableNClustersTPCCheck(); + (dynamic_cast(mTrackTypes.At(i)))->DisableNClustersTPCCheck(); } } else if (m[1].str() == "nclsits") { storeIntCut(mNClustersITS); for (int i = 0; i < mTrackTypes.GetEntries(); ++i) { - ((TrackSelectionBrick*)mTrackTypes.At(i))->DisableNClustersITSCheck(); + (dynamic_cast(mTrackTypes.At(i)))->DisableNClustersITSCheck(); } } else if (m[1].str() == "nxrtpc") { storeIntCut(mNCrossedRowsTPC); for (int i = 0; i < mTrackTypes.GetEntries(); ++i) { - ((TrackSelectionBrick*)mTrackTypes.At(i))->DisableNCrossedRowsTPCCheck(); + (dynamic_cast(mTrackTypes.At(i)))->DisableNCrossedRowsTPCCheck(); } } else if (m[1].str() == "chi2clustpc") { storeFloatCut(mMaxChi2PerClusterTPC); for (int i = 0; i < mTrackTypes.GetEntries(); ++i) { - ((TrackSelectionBrick*)mTrackTypes.At(i))->DisableMaxChi2PerClusterTPCCheck(); + (dynamic_cast(mTrackTypes.At(i)))->DisableMaxChi2PerClusterTPCCheck(); } } else if (m[1].str() == "chi2clusits") { storeFloatCut(mMaxChi2PerClusterITS); for (int i = 0; i < mTrackTypes.GetEntries(); ++i) { - ((TrackSelectionBrick*)mTrackTypes.At(i))->DisableMaxChi2PerClusterITSCheck(); + (dynamic_cast(mTrackTypes.At(i)))->DisableMaxChi2PerClusterITSCheck(); } } else if (m[1].str() == "xrofctpc") { storeFloatCut(mMinNCrossedRowsOverFindableClustersTPC); for (int i = 0; i < mTrackTypes.GetEntries(); ++i) { - ((TrackSelectionBrick*)mTrackTypes.At(i))->DisableMinNCrossedRowsOverFindableClustersTPCCheck(); + (dynamic_cast(mTrackTypes.At(i)))->DisableMinNCrossedRowsOverFindableClustersTPCCheck(); } } else if (m[1].str() == "dcaxy") { storeFloatCut(mMaxDcaXY); for (int i = 0; i < mTrackTypes.GetEntries(); ++i) { - ((TrackSelectionBrick*)mTrackTypes.At(i))->DisableMaxDcaXYCheck(); + (dynamic_cast(mTrackTypes.At(i)))->DisableMaxDcaXYCheck(); } } else if (m[1].str() == "dcaz") { storeFloatCut(mMaxDcaZ); for (int i = 0; i < mTrackTypes.GetEntries(); ++i) { - ((TrackSelectionBrick*)mTrackTypes.At(i))->DisableMaxDcaZCheck(); + (dynamic_cast(mTrackTypes.At(i)))->DisableMaxDcaZCheck(); } } else if (m[1].str() == "pT") { storeFloatCut(mPtRange); @@ -437,12 +437,12 @@ void TrackSelectionFilterAndAnalysis::StoreArmedMask() optMask = 0UL; for (int i = 0; i < mTrackSign.GetEntries(); ++i) { - armedBrick((CutBrick*)mTrackSign.At(i), true); + armedBrick(dynamic_cast*>(mTrackSign.At(i)), true); } mOptArmedMask.push_back(optMask); optMask = 0UL; for (int i = 0; i < mTrackTypes.GetEntries(); ++i) { - armedBrick((TrackSelectionBrick*)mTrackTypes.At(i), true); + armedBrick(dynamic_cast(mTrackTypes.At(i)), true); } mOptArmedMask.push_back(optMask); optMask = 0UL; diff --git a/PWGCF/TwoParticleCorrelations/Core/TrackSelectionFilterAndAnalysis.h b/PWGCF/TwoParticleCorrelations/Core/TrackSelectionFilterAndAnalysis.h index f1ebbfe9084..118b969c502 100644 --- a/PWGCF/TwoParticleCorrelations/Core/TrackSelectionFilterAndAnalysis.h +++ b/PWGCF/TwoParticleCorrelations/Core/TrackSelectionFilterAndAnalysis.h @@ -164,10 +164,10 @@ uint64_t TrackSelectionFilterAndAnalysis::Filter(TrackToFilter const& track) }; for (int i = 0; i < mTrackSign.GetEntries(); ++i) { - filterBrickValue((CutBrick*)mTrackSign.At(i), track.sign()); + filterBrickValue(dynamic_cast*>(mTrackSign.At(i)), track.sign()); } for (int i = 0; i < mTrackTypes.GetEntries(); ++i) { - filterTrackType((TrackSelectionBrick*)mTrackTypes.At(i), track); + filterTrackType(dynamic_cast(mTrackTypes.At(i)), track); } if (mNClustersTPC != nullptr) { filterBrickValue(mNClustersTPC, track.tpcNClsFound()); diff --git a/PWGCF/TwoParticleCorrelations/TableProducer/longrangeMaker.cxx b/PWGCF/TwoParticleCorrelations/TableProducer/longrangeMaker.cxx index d9d528c64b0..738069c6021 100644 --- a/PWGCF/TwoParticleCorrelations/TableProducer/longrangeMaker.cxx +++ b/PWGCF/TwoParticleCorrelations/TableProducer/longrangeMaker.cxx @@ -367,7 +367,7 @@ struct LongrangeMaker { itsNsigmaCut = itsNsigmaPidCut; tpcNsigmaCut = tpcNsigmaPidCut; - cfgSgCuts = (SGCutParHolder)sgCuts; + cfgSgCuts = SGCutParHolder(sgCuts); } Produces lrmccollision; diff --git a/PWGCF/TwoParticleCorrelations/TableProducer/twoParticleCorrelationsFiltering.cxx b/PWGCF/TwoParticleCorrelations/TableProducer/twoParticleCorrelationsFiltering.cxx index 1733559dd0b..1ef244ba7dc 100644 --- a/PWGCF/TwoParticleCorrelations/TableProducer/twoParticleCorrelationsFiltering.cxx +++ b/PWGCF/TwoParticleCorrelations/TableProducer/twoParticleCorrelationsFiltering.cxx @@ -128,7 +128,7 @@ struct TwoParticleCorrelationsFilter { if ((collision.selflags() & collisionmask_forced) == collisionmask_forced && passOptions(collisionmask_opt, collision.selflags())) { LOGF(TWOPFILTERLOGCOLLISIONS, ">> Accepted collision with mask 0x%016lx and %ld unfiltered tracks", collision.selflags(), tracks.size()); - acceptedcollisions(collision.centmult()[fMultiplicityIndex], uint8_t(true)); + acceptedcollisions(collision.centmult()[fMultiplicityIndex], static_cast(true)); int nAcceptedTracks = 0; for (const auto& track : tracks) { if ((track.trackflags() & trackmask_forced) == trackmask_forced && passOptions(trackmask_opt, track.trackflags())) { @@ -140,7 +140,7 @@ struct TwoParticleCorrelationsFilter { } LOGF(TWOPFILTERLOGCOLLISIONS, ">> Accepted collision with mask 0x%016lx and %d accepted tracks", collision.selflags(), nAcceptedTracks); } else { - acceptedcollisions(collision.centmult()[fMultiplicityIndex], uint8_t(false)); + acceptedcollisions(collision.centmult()[fMultiplicityIndex], static_cast(false)); } } PROCESS_SWITCH(TwoParticleCorrelationsFilter, processRun2, "Process Run 2, i.e. over NOT stored derived data, two particle correlations filtering", true); @@ -159,7 +159,7 @@ struct TwoParticleCorrelationsFilter { if ((collision.selflags() & collisionmask_forced) == collisionmask_forced && passOptions(collisionmask_opt, collision.selflags())) { LOGF(TWOPFILTERLOGCOLLISIONS, ">> Accepted collision with mask 0x%016lx and %ld unfiltered tracks", collision.selflags(), tracks.size()); - acceptedcollisions(collision.centmult()[fMultiplicityIndex], uint8_t(true)); + acceptedcollisions(collision.centmult()[fMultiplicityIndex], static_cast(true)); int nAcceptedTracks = 0; for (const auto& track : tracks) { if ((track.trackflags() & trackmask_forced) == trackmask_forced && passOptions(trackmask_opt, track.trackflags())) { @@ -171,7 +171,7 @@ struct TwoParticleCorrelationsFilter { } LOGF(TWOPFILTERLOGCOLLISIONS, ">> Accepted collision with mask 0x%016lx and %d accepted tracks", collision.selflags(), nAcceptedTracks); } else { - acceptedcollisions(collision.centmult()[fMultiplicityIndex], uint8_t(false)); + acceptedcollisions(collision.centmult()[fMultiplicityIndex], static_cast(false)); } } PROCESS_SWITCH(TwoParticleCorrelationsFilter, processRun3, "Process Run 3, i.e. over stored derived data, two particle correlations filtering", false); diff --git a/PWGCF/TwoParticleCorrelations/Tasks/cascDiHadronCorr.cxx b/PWGCF/TwoParticleCorrelations/Tasks/cascDiHadronCorr.cxx index 79f8efb4720..302a51a3c80 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/cascDiHadronCorr.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/cascDiHadronCorr.cxx @@ -197,7 +197,7 @@ struct CascDiHadronCorr { // make the filters and cuts. Filter collisionFilter = (nabs(aod::collision::posZ) < cfgCutVtxZ); - Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz); + Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz); using FilteredCollisions = soa::Filtered>; using FilteredTracks = soa::Filtered>; using FilteredTracksWithMCLabels = soa::Filtered>; @@ -654,7 +654,7 @@ struct CascDiHadronCorr { if (cfgEfficiency.value.empty() == false) { if (cfgLocalEfficiency > 0) { TFile* fEfficiencyTrigger = TFile::Open(cfgEfficiency.value.c_str(), "READ"); - mEfficiency = reinterpret_cast(fEfficiencyTrigger->Get("ccdb_object")); + mEfficiency = dynamic_cast(fEfficiencyTrigger->Get("ccdb_object")); } else { mEfficiency = ccdb->getForTimeStamp(cfgEfficiency, timestamp); } @@ -666,7 +666,7 @@ struct CascDiHadronCorr { if (cfgEfficiencyCasc.value.empty() == false) { if (cfgLocalEfficiency > 0) { TFile* fEfficiencyTrigger = TFile::Open(cfgEfficiencyCasc.value.c_str(), "READ"); - mEfficiencyCasc = reinterpret_cast(fEfficiencyTrigger->Get("ccdb_object")); + mEfficiencyCasc = dynamic_cast(fEfficiencyTrigger->Get("ccdb_object")); } else { mEfficiencyCasc = ccdb->getForTimeStamp(cfgEfficiencyCasc, timestamp); } diff --git a/PWGCF/TwoParticleCorrelations/Tasks/corrFit.cxx b/PWGCF/TwoParticleCorrelations/Tasks/corrFit.cxx index cc82c070425..3918370ed9e 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/corrFit.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/corrFit.cxx @@ -221,7 +221,7 @@ struct CorrFit { AxisSpec axisChID = {220, 0, 220}; Filter collisionFilter = (nabs(aod::collision::posZ) < cfgEvSel.cfgGlobalCutVertex); - Filter trackFilter = (nabs(aod::track::eta) < cfgTrkSel.cfgGlobalEta) && (aod::track::pt > cfgTrkSel.cfgGlobalPtMin) && (aod::track::pt < cfgTrkSel.cfgGlobalPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (nabs(aod::track::dcaZ) < cfgTrkSel.cfgGlobalDCAz) && (aod::track::tpcChi2NCl < cfgTrkSel.cfgGlobalChi2prTPCcls); + Filter trackFilter = (nabs(aod::track::eta) < cfgTrkSel.cfgGlobalEta) && (aod::track::pt > cfgTrkSel.cfgGlobalPtMin) && (aod::track::pt < cfgTrkSel.cfgGlobalPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (nabs(aod::track::dcaZ) < cfgTrkSel.cfgGlobalDCAz) && (aod::track::tpcChi2NCl < cfgTrkSel.cfgGlobalChi2prTPCcls); using FilteredCollisions = soa::Filtered>; using FilteredTracks = soa::Filtered>; diff --git a/PWGCF/TwoParticleCorrelations/Tasks/corrReso.cxx b/PWGCF/TwoParticleCorrelations/Tasks/corrReso.cxx index f3185668771..8ab5e503593 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/corrReso.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/corrReso.cxx @@ -212,7 +212,7 @@ struct CorrReso { ConfigurableAxis axisNsigmaTPC{"axisNsigmaTPC", {80, -5, 5}, "nsigmaTPC axis"}; ConfigurableAxis axisNsigmaTOF{"axisNsigmaTOF", {80, -5, 5}, "nsigmaTOF axis"}; Filter collisionFilter = (nabs(aod::collision::posZ) < cfgEvSel.cfgGlobalCutVertex); - Filter trackFilter = (nabs(aod::track::eta) < cfgTrkSel.cfgGlobalEta) && (aod::track::pt > cfgTrkSel.cfgGlobalPtMin) && (aod::track::pt < cfgTrkSel.cfgGlobalPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (nabs(aod::track::dcaZ) < cfgTrkSel.cfgGlobalDCAz) && (aod::track::tpcChi2NCl < cfgTrkSel.cfgGlobalChi2prTPCcls); + Filter trackFilter = (nabs(aod::track::eta) < cfgTrkSel.cfgGlobalEta) && (aod::track::pt > cfgTrkSel.cfgGlobalPtMin) && (aod::track::pt < cfgTrkSel.cfgGlobalPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (nabs(aod::track::dcaZ) < cfgTrkSel.cfgGlobalDCAz) && (aod::track::tpcChi2NCl < cfgTrkSel.cfgGlobalChi2prTPCcls); using FilteredCollisions = soa::Filtered>; using FilteredTracks = soa::Filtered>; diff --git a/PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx b/PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx index 61dfa8787c3..300feda8977 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx @@ -164,7 +164,7 @@ struct DiHadronCor { // make the filters and cuts. Filter collisionFilter = (nabs(aod::collision::posZ) < cfgCutVtxZ); - Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz); + Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz); using FilteredCollisions = soa::Filtered>; using FilteredTracks = soa::Filtered>; using FilteredTracksWithMCLabels = soa::Filtered>; @@ -432,7 +432,7 @@ struct DiHadronCor { if (cfgEfficiency.value.empty() == false) { if (cfgLocalEfficiency > 0) { TFile* fEfficiencyTrigger = TFile::Open(cfgEfficiency.value.c_str(), "READ"); - mEfficiency = reinterpret_cast(fEfficiencyTrigger->Get("ccdb_object")); + mEfficiency = dynamic_cast(fEfficiencyTrigger->Get("ccdb_object")); } else { mEfficiency = ccdb->getForTimeStamp(cfgEfficiency, timestamp); } diff --git a/PWGCF/TwoParticleCorrelations/Tasks/dptDptEfficiencyAndQc.cxx b/PWGCF/TwoParticleCorrelations/Tasks/dptDptEfficiencyAndQc.cxx index a531df7a4c7..65c2a4e5c46 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/dptDptEfficiencyAndQc.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/dptDptEfficiencyAndQc.cxx @@ -1307,8 +1307,8 @@ struct DptDptEfficiencyAndQc { using TpcPID = soa::Join; using TofPID = soa::Join; - Filter onlyacceptedcollisions = (aod::dptdptfilter::collisionaccepted == uint8_t(true)); - Filter onlyacceptedtracks = (aod::dptdptfilter::trackacceptedid >= int8_t(0)); + Filter onlyacceptedcollisions = (aod::dptdptfilter::collisionaccepted == static_cast(true)); + Filter onlyacceptedtracks = (aod::dptdptfilter::trackacceptedid >= static_cast(0)); void processReconstructedNotStored(soa::Filtered>::iterator const& collision, soa::Join const& tracks) diff --git a/PWGCF/TwoParticleCorrelations/Tasks/dptDptPerRunExtraQc.cxx b/PWGCF/TwoParticleCorrelations/Tasks/dptDptPerRunExtraQc.cxx index 9cc322d26de..0b38db0b839 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/dptDptPerRunExtraQc.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/dptDptPerRunExtraQc.cxx @@ -80,8 +80,8 @@ struct DptDptPerRunExtraQc { } } - Filter onlyacceptedcollisions = (aod::dptdptfilter::collisionaccepted == uint8_t(true)); - Filter onlyacceptedtracks = (aod::dptdptfilter::trackacceptedid >= int8_t(0)); + Filter onlyacceptedcollisions = (aod::dptdptfilter::collisionaccepted == static_cast(true)); + Filter onlyacceptedtracks = (aod::dptdptfilter::trackacceptedid >= static_cast(0)); void process(soa::Filtered>::iterator const& collision, soa::Filtered> const& tracks, aod::BCsWithTimestamps const&) { diff --git a/PWGCF/TwoParticleCorrelations/Tasks/etaDihadron.cxx b/PWGCF/TwoParticleCorrelations/Tasks/etaDihadron.cxx index 24cf76f210a..6554a778834 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/etaDihadron.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/etaDihadron.cxx @@ -159,7 +159,7 @@ struct EtaDihadron { // make the filters and cuts. Filter collisionFilter = (nabs(aod::collision::posZ) < cfgCutVtxZ); - Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz); + Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz); using FilteredCollisions = soa::Filtered>; using FilteredTracks = soa::Filtered>; using FilteredTracksWithMCLabels = soa::Filtered>; @@ -417,7 +417,7 @@ struct EtaDihadron { if (cfgEfficiency.value.empty() == false) { if (cfgLocalEfficiency > 0) { TFile* fEfficiencyTrigger = TFile::Open(cfgEfficiency.value.c_str(), "READ"); - mEfficiency = reinterpret_cast(fEfficiencyTrigger->Get("ccdb_object")); + mEfficiency = dynamic_cast(fEfficiencyTrigger->Get("ccdb_object")); } else { mEfficiency = ccdb->getForTimeStamp(cfgEfficiency, timestamp); } diff --git a/PWGCF/TwoParticleCorrelations/Tasks/flowDecorrelation.cxx b/PWGCF/TwoParticleCorrelations/Tasks/flowDecorrelation.cxx index 9a2251ed1f5..6b454ee50a3 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/flowDecorrelation.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/flowDecorrelation.cxx @@ -674,7 +674,7 @@ struct FlowDecorrelation { if (cfgEfficiency.value.empty() == false) { if (cfgLocalEfficiency > 0) { TFile* fEfficiencyTrigger = TFile::Open(cfgEfficiency.value.c_str(), "READ"); - mEfficiency = reinterpret_cast(fEfficiencyTrigger->Get("ccdb_object")); + mEfficiency = dynamic_cast(fEfficiencyTrigger->Get("ccdb_object")); } else { mEfficiency = ccdb->getForTimeStamp(cfgEfficiency, timestamp); } diff --git a/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx b/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx index 032a5e988f9..7f47e600b39 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx @@ -3606,7 +3606,7 @@ struct HParticleCorrelation3MixedEvent { // Mixing channels: 8 track channels (h-h, h-pi, h-K, h-p x low/high pT) followed by // 30 resonance channels (5 species x low/high pT x Peak/LSB/RSB) static constexpr int NMassWindows = 3; - static constexpr int NTrackMixChannels = static_cast(kCountHPr + 1) * static_cast(kNCorrCountPt); + static constexpr int NTrackMixChannels = (kCountHPr + 1) * static_cast(kNCorrCountPt); static constexpr int NMixOperationChannels = NTrackMixChannels + static_cast(kNResoCorrCountTypes) * static_cast(kNCorrCountPt) * NMassWindows; static constexpr std::array MixOperationChannelName = { diff --git a/PWGCF/TwoParticleCorrelations/Tasks/lambdaR2Correlation.cxx b/PWGCF/TwoParticleCorrelations/Tasks/lambdaR2Correlation.cxx index 0b25d067843..121ab6edf5f 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/lambdaR2Correlation.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/lambdaR2Correlation.cxx @@ -796,7 +796,7 @@ struct LambdaTableProducer { // Fill Lambda/AntiLambda Table lambdaTrackTable(lambdaCollisionTable.lastIndex(), v0.pt(), v0.eta(), v0.phi(), v0.yLambda(), v0.px(), v0.py(), v0.pz(), lambdaMass, v0.template posTrack_as().index(), v0.template negTrack_as().index(), posTrackKin, negTrackKin, - (int8_t)partType, lambdaCorrFact); + static_cast(partType), lambdaCorrFact); } } @@ -851,7 +851,7 @@ struct LambdaTableProducer { } // Fill table lambdaMCGenTrackTable(lambdaMCGenCollisionTable.lastIndex(), mcpart.pt(), mcpart.eta(), mcpart.phi(), mcpart.y(), mcpart.px(), mcpart.py(), mcpart.pz(), RecoDecay::m(mcpart.p(), mcpart.e()), - daughterIDs[0], daughterIDs[1], (int8_t)partType, 1.); + daughterIDs[0], daughterIDs[1], static_cast(partType), 1.); } } @@ -1309,8 +1309,8 @@ struct LambdaR2Correlation { using LambdaTracks = soa::Join; SliceCache cache; - Partition partLambdaTracks = (aod::lambdatrack::partType == (int8_t)kLambda) && (aod::lambdatrackext::trueLambdaFlag == true); - Partition partAntiLambdaTracks = (aod::lambdatrack::partType == (int8_t)kAntiLambda) && (aod::lambdatrackext::trueLambdaFlag == true); + Partition partLambdaTracks = (aod::lambdatrack::partType == static_cast(kLambda)) && (aod::lambdatrackext::trueLambdaFlag == true); + Partition partAntiLambdaTracks = (aod::lambdatrack::partType == static_cast(kAntiLambda)) && (aod::lambdatrackext::trueLambdaFlag == true); void processDummy(aod::LambdaCollisions::iterator const&) {} @@ -1345,8 +1345,8 @@ struct LambdaR2Correlation { using LambdaMcGenTracks = aod::LambdaMcGenTracks; SliceCache cachemc; - Partition partMcLambdaTracks = (aod::lambdatrack::partType == (int8_t)kLambda); - Partition partMcAntiLambdaTracks = (aod::lambdatrack::partType == (int8_t)kAntiLambda); + Partition partMcLambdaTracks = (aod::lambdatrack::partType == static_cast(kLambda)); + Partition partMcAntiLambdaTracks = (aod::lambdatrack::partType == static_cast(kAntiLambda)); void processMCGen(LambdaMcGenCollisions::iterator const& mcgencol, LambdaMcGenTracks const&) { diff --git a/PWGCF/TwoParticleCorrelations/Tasks/lambdaSpinPolarization.cxx b/PWGCF/TwoParticleCorrelations/Tasks/lambdaSpinPolarization.cxx index 0d0f413c951..8f5174e7ba1 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/lambdaSpinPolarization.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/lambdaSpinPolarization.cxx @@ -1054,7 +1054,7 @@ struct LambdaTableProducer { v0.template posTrack_as().index(), v0.template negTrack_as().index(), v0.v0cosPA(), - v0.dcaV0daughters(), (int8_t)v0Type, + v0.dcaV0daughters(), static_cast(v0Type), v0PrmScdType, corr_fact); ++nWritten; @@ -1173,7 +1173,7 @@ struct LambdaTableProducer { lambdaMCGenCollisionTable.lastIndex(), mcpart.px(), mcpart.py(), mcpart.pz(), mcpart.pt(), mcpart.eta(), mcpart.phi(), mcpart.y(), RecoDecay::m(mcpart.p(), mcpart.e()), prPx, prPy, prPz, - daughterIDs[posDauIdx], daughterIDs[negDauIdx], (int8_t)v0Type, -999., + daughterIDs[posDauIdx], daughterIDs[negDauIdx], static_cast(v0Type), -999., -999., v0PrmScdType, 1.); } } @@ -2525,15 +2525,15 @@ struct LambdaSpinPolarization { Preslice perCollisionLambda = aod::lambdatrack::lambdaCollisionId; SliceCache cache; - Partition partLambdaTracks = (aod::lambdatrack::v0Type == (int8_t)kLambda) && (aod::lambdatrack::v0PrmScd == (int8_t)kPrimary); + Partition partLambdaTracks = (aod::lambdatrack::v0Type == static_cast(kLambda)) && (aod::lambdatrack::v0PrmScd == static_cast(kPrimary)); - Partition partAntiLambdaTracks = (aod::lambdatrack::v0Type == (int8_t)kAntiLambda) && (aod::lambdatrack::v0PrmScd == (int8_t)kPrimary); + Partition partAntiLambdaTracks = (aod::lambdatrack::v0Type == static_cast(kAntiLambda)) && (aod::lambdatrack::v0PrmScd == static_cast(kPrimary)); SliceCache cachemc; - Partition partMcLambdaTracks = (aod::lambdatrack::v0Type == (int8_t)kLambda) && (aod::lambdatrack::v0PrmScd == (int8_t)kPrimary); + Partition partMcLambdaTracks = (aod::lambdatrack::v0Type == static_cast(kLambda)) && (aod::lambdatrack::v0PrmScd == static_cast(kPrimary)); - Partition partMcAntiLambdaTracks = (aod::lambdatrack::v0Type == (int8_t)kAntiLambda) && (aod::lambdatrack::v0PrmScd == (int8_t)kPrimary); + Partition partMcAntiLambdaTracks = (aod::lambdatrack::v0Type == static_cast(kAntiLambda)) && (aod::lambdatrack::v0PrmScd == static_cast(kPrimary)); void processDummy(LambdaCollisions::iterator const&) {} PROCESS_SWITCH(LambdaSpinPolarization, processDummy, "Dummy", false); diff --git a/PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx b/PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx index 8f66d3bfb27..0805780ed1a 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx @@ -770,7 +770,7 @@ struct LongRangeDihadronCor { if (cfgGeneral.cfgEfficiency.value.empty() == false) { if (cfgGeneral.cfgLocalEfficiency > 0) { TFile* fEfficiencyTrigger = TFile::Open(cfgGeneral.cfgEfficiency.value.c_str(), "READ"); - mEfficiency = reinterpret_cast(fEfficiencyTrigger->Get("ccdb_object")); + mEfficiency = dynamic_cast(fEfficiencyTrigger->Get("ccdb_object")); } else { mEfficiency = ccdb->getForTimeStamp(cfgGeneral.cfgEfficiency, timestamp); } diff --git a/PWGCF/TwoParticleCorrelations/Tasks/nucleibalance.cxx b/PWGCF/TwoParticleCorrelations/Tasks/nucleibalance.cxx index 640352fff2f..86bd677bc01 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/nucleibalance.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/nucleibalance.cxx @@ -260,8 +260,8 @@ struct Nucleibalance { Filter collisionVertexTypeFilter = (aod::collision::flags & static_cast(aod::collision::CollisionFlagsRun2::Run2VertexerTracks)) == static_cast(aod::collision::CollisionFlagsRun2::Run2VertexerTracks); // Track filters - Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPt) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)); - Filter cfTrackFilter = (nabs(aod::cftrack::eta) < cfgCutEta) && (aod::cftrack::pt > cfgCutPt) && ((aod::track::trackType & (uint8_t)cfgTrackBitMask) == (uint8_t)cfgTrackBitMask); + Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPt) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))); + Filter cfTrackFilter = (nabs(aod::cftrack::eta) < cfgCutEta) && (aod::cftrack::pt > cfgCutPt) && ((aod::track::trackType & static_cast(cfgTrackBitMask)) == static_cast(cfgTrackBitMask)); // MC filters Filter cfMCCollisionFilter = nabs(aod::mccollision::posZ) < cfgCutVertex; diff --git a/PWGCF/TwoParticleCorrelations/Tasks/particleOriginAnalysis.cxx b/PWGCF/TwoParticleCorrelations/Tasks/particleOriginAnalysis.cxx index 7360e956468..81e0373b04c 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/particleOriginAnalysis.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/particleOriginAnalysis.cxx @@ -328,7 +328,7 @@ struct ParticleOriginAnalysis { } } - Filter onlyacceptedcollisions = (aod::dptdptfilter::collisionaccepted == uint8_t(true)); + Filter onlyacceptedcollisions = (aod::dptdptfilter::collisionaccepted == static_cast(true)); /// \brief Process: one accepted generator-level collision at a time /// with its associated MC particles joined with filter information. diff --git a/PWGCF/TwoParticleCorrelations/Tasks/pidDiHadron.cxx b/PWGCF/TwoParticleCorrelations/Tasks/pidDiHadron.cxx index 5c4102c666d..79a23028600 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/pidDiHadron.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/pidDiHadron.cxx @@ -216,7 +216,7 @@ struct PidDiHadron { // make the filters and cuts. Filter collisionFilter = (nabs(aod::collision::posZ) < cfgEvSel.cfgGlobalCutVertex); - Filter trackFilter = (nabs(aod::track::eta) < cfgTrkSel.cfgGlobalEta) && (aod::track::pt > cfgTrkSel.cfgGlobalPtMin) && (aod::track::pt < cfgTrkSel.cfgGlobalPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgTrkSel.cfgGlobalChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgTrkSel.cfgGlobalDCAz); + Filter trackFilter = (nabs(aod::track::eta) < cfgTrkSel.cfgGlobalEta) && (aod::track::pt > cfgTrkSel.cfgGlobalPtMin) && (aod::track::pt < cfgTrkSel.cfgGlobalPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::tpcChi2NCl < cfgTrkSel.cfgGlobalChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgTrkSel.cfgGlobalDCAz); using FilteredCollisions = soa::Filtered>; using FilteredTracks = soa::Filtered>; diff --git a/PWGCF/TwoParticleCorrelations/Tasks/pidLongRange.cxx b/PWGCF/TwoParticleCorrelations/Tasks/pidLongRange.cxx index 555d4f8de81..ef4014c0033 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/pidLongRange.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/pidLongRange.cxx @@ -218,7 +218,7 @@ struct PidLongRange { ConfigurableAxis axisSigma{"axisSigma", {200, 0, 20}, "sigma axis for TPC"}; Filter collisionFilter = (nabs(aod::collision::posZ) < cfgEvSel.cfgGlobalCutVertex); - Filter trackFilter = (nabs(aod::track::eta) < cfgTrkSel.cfgGlobalEta) && (aod::track::pt > cfgTrkSel.cfgGlobalPtMin) && (aod::track::pt < cfgTrkSel.cfgGlobalPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (nabs(aod::track::dcaZ) < cfgTrkSel.cfgGlobalDCAz) && (aod::track::tpcChi2NCl < cfgTrkSel.cfgGlobalChi2prTPCcls); + Filter trackFilter = (nabs(aod::track::eta) < cfgTrkSel.cfgGlobalEta) && (aod::track::pt > cfgTrkSel.cfgGlobalPtMin) && (aod::track::pt < cfgTrkSel.cfgGlobalPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (nabs(aod::track::dcaZ) < cfgTrkSel.cfgGlobalDCAz) && (aod::track::tpcChi2NCl < cfgTrkSel.cfgGlobalChi2prTPCcls); using FilteredCollisions = soa::Filtered>; using FilteredTracks = soa::Filtered>; diff --git a/PWGCF/TwoParticleCorrelations/Tasks/r2p2-4-id.cxx b/PWGCF/TwoParticleCorrelations/Tasks/r2p2-4-id.cxx index 26d6604a9d7..1d103f5d70e 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/r2p2-4-id.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/r2p2-4-id.cxx @@ -313,7 +313,7 @@ struct r2p24id { void init(InitContext const&) { - iftrack2 = (((int8_t)pid_particle1 != (int8_t)pid_particle2) && (static_cast(ifpid))) || (static_cast(iftrackpartition)); // denotes whether the partiton1 is different from partition2 + iftrack2 = ((static_cast(pid_particle1) != static_cast(pid_particle2)) && (static_cast(ifpid))) || (static_cast(iftrackpartition)); // denotes whether the partiton1 is different from partition2 //-----Defining Histograms--------------------------------------------------- const AxisSpec phi{36, 0, 2.0 * constants::math::PI, "phi"}, eta{24, -0.8, 0.8, "eta"}, etaphi1{864, 0, 864, "etaphi1"}, etaphi2{864, 0, 864, "etaphi2"}; histos.add("h1d_n1_phi", "#phi distribution Particle", kTH1D, {phi}); diff --git a/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelations.cxx b/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelations.cxx index 0e8c2bdb003..ab31d462a56 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelations.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelations.cxx @@ -879,10 +879,10 @@ struct twoParticleCorrelations { int ixDCE = getDCEindex(collision); if (!(ixDCE < 0)) { if (ccdblst != nullptr && !dataCE[ixDCE]->isCCDBstored()) { - dataCE[ixDCE]->storeTrackCorrections(std::vector{static_cast(ccdblst->FindObject(TString::Format("correction_%02d-%02d_p1", static_cast(fCentMultMin[ixDCE]), static_cast(fCentMultMax[ixDCE])).Data())), - static_cast(ccdblst->FindObject(TString::Format("correction_%02d-%02d_m1", static_cast(fCentMultMin[ixDCE]), static_cast(fCentMultMax[ixDCE])).Data()))}); - dataCE[ixDCE]->storePtAverages(std::vector{static_cast(ccdblst->FindObject(TString::Format("ptavgetaphi_%02d-%02d_p", static_cast(fCentMultMin[ixDCE]), static_cast(fCentMultMax[ixDCE])).Data())), - static_cast(ccdblst->FindObject(TString::Format("ptavgetaphi_%02d-%02d_m", static_cast(fCentMultMin[ixDCE]), static_cast(fCentMultMax[ixDCE])).Data()))}); + dataCE[ixDCE]->storeTrackCorrections(std::vector{dynamic_cast(ccdblst->FindObject(TString::Format("correction_%02d-%02d_p1", static_cast(fCentMultMin[ixDCE]), static_cast(fCentMultMax[ixDCE])).Data())), + dynamic_cast(ccdblst->FindObject(TString::Format("correction_%02d-%02d_m1", static_cast(fCentMultMin[ixDCE]), static_cast(fCentMultMax[ixDCE])).Data()))}); + dataCE[ixDCE]->storePtAverages(std::vector{dynamic_cast(ccdblst->FindObject(TString::Format("ptavgetaphi_%02d-%02d_p", static_cast(fCentMultMin[ixDCE]), static_cast(fCentMultMax[ixDCE])).Data())), + dynamic_cast(ccdblst->FindObject(TString::Format("ptavgetaphi_%02d-%02d_m", static_cast(fCentMultMin[ixDCE]), static_cast(fCentMultMax[ixDCE])).Data()))}); } } /* magnetic field equal to zero for the time being */ diff --git a/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMpi.cxx b/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMpi.cxx index d0f62249d26..a4401acb2c8 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMpi.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMpi.cxx @@ -186,7 +186,7 @@ struct TwoParticleCorrelationsMpi { Filter collisionVertexTypeFilter = (aod::collision::flags & static_cast(aod::collision::CollisionFlagsRun2::Run2VertexerTracks)) == static_cast(aod::collision::CollisionFlagsRun2::Run2VertexerTracks); // Track filters - Filter trackFilter = (nabs(aod::track::eta) < cfgGeneral.cfgCutEta) && (aod::track::pt > cfgGeneral.cfgCutPt) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)); + Filter trackFilter = (nabs(aod::track::eta) < cfgGeneral.cfgCutEta) && (aod::track::pt > cfgGeneral.cfgCutPt) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))); Filter cfTrackFilter = (nabs(aod::cftrack::eta) < cfgGeneral.cfgCutEta) && (aod::cftrack::pt > cfgGeneral.cfgCutPt) && ncheckbit(aod::track::trackType, as(cfgTrackBitMask)); // MC filters