From 647c4ee5cca94db7a7185a75240ad165ec6b0ab9 Mon Sep 17 00:00:00 2001 From: Rik Spijkers <78484875+rspijkers@users.noreply.github.com> Date: Wed, 11 Dec 2024 19:34:45 +0100 Subject: [PATCH 01/19] [PWGLF] fix histogram names in ME process in cascade correlations (#8933) --- .../Tasks/Strangeness/cascadecorrelations.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/cascadecorrelations.cxx b/PWGLF/Tasks/Strangeness/cascadecorrelations.cxx index 4209688498d..7cb9a984d9d 100644 --- a/PWGLF/Tasks/Strangeness/cascadecorrelations.cxx +++ b/PWGLF/Tasks/Strangeness/cascadecorrelations.cxx @@ -720,24 +720,24 @@ struct CascadeCorrelations { if (trigger.isSelected() >= 2) { if (trigger.sign() > 0 && trigger.bachelorId() == posIdAssoc) { // K+ from trigger Omega is the same as proton from assoc lambda - registry.fill(HIST("hMEAutoCorrelationOS"), 1); + registry.fill(HIST("MixedEvents/hMEAutoCorrelationOS"), 1); continue; } if (trigger.sign() < 0 && trigger.bachelorId() == negIdAssoc) { // K- from trigger Omega is the same as antiproton from assoc antilambda - registry.fill(HIST("hMEAutoCorrelationOS"), -1); + registry.fill(HIST("MixedEvents/hMEAutoCorrelationOS"), -1); continue; } } if (assoc.isSelected() >= 2) { if (assoc.sign() > 0 && assoc.bachelorId() == posIdTrigg) { // K+ from assoc Omega is the same as proton from trigger lambda - registry.fill(HIST("hMEAutoCorrelationOS"), 1); + registry.fill(HIST("MixedEvents/hMEAutoCorrelationOS"), 1); continue; } if (assoc.sign() < 0 && assoc.bachelorId() == negIdTrigg) { // K- from assoc Omega is the same as antiproton from trigger antilambda - registry.fill(HIST("hMEAutoCorrelationOS"), -1); + registry.fill(HIST("MixedEvents/hMEAutoCorrelationOS"), -1); continue; } } @@ -777,7 +777,7 @@ struct CascadeCorrelations { // make sure to check for autocorrelations - only possible in same-sign correlations (if PID is correct) if (posIdTrigg == posIdAssoc && negIdTrigg == negIdAssoc) { // LOGF(info, "same v0 in SS correlation! %d %d", v0dataTrigg.v0Id(), v0dataAssoc.v0Id()); - registry.fill(HIST("hMEAutoCorrelation"), 0); + registry.fill(HIST("MixedEvents/hMEAutoCorrelation"), 0); continue; } int bachIdTrigg = trigger.bachelorId(); @@ -785,25 +785,25 @@ struct CascadeCorrelations { if (bachIdTrigg == bachIdAssoc) { // LOGF(info, "same bachelor in SS correlation! %d %d", bachIdTrigg, bachIdAssoc); - registry.fill(HIST("hMEAutoCorrelation"), 1); + registry.fill(HIST("MixedEvents/hMEAutoCorrelation"), 1); continue; } // check for same tracks in v0's of cascades if (negIdTrigg == negIdAssoc || posIdTrigg == posIdAssoc) { // LOGF(info, "cascades have a v0-track in common in SS correlation!"); - registry.fill(HIST("hMEAutoCorrelation"), 2); + registry.fill(HIST("MixedEvents/hMEAutoCorrelation"), 2); continue; } if (trigger.sign() < 0) { // neg cascade if (negIdTrigg == bachIdAssoc || negIdAssoc == bachIdTrigg) { // LOGF(info, "bach of casc == v0-pion of other casc in neg SS correlation!"); - registry.fill(HIST("hMEAutoCorrelation"), 3); + registry.fill(HIST("MixedEvents/hMEAutoCorrelation"), 3); continue; } } else { // pos cascade if (posIdTrigg == bachIdAssoc || posIdAssoc == bachIdTrigg) { // LOGF(info, "bach of casc == v0-pion of other casc in pos SS correlation!"); - registry.fill(HIST("hMEAutoCorrelation"), 3); + registry.fill(HIST("MixedEvents/hMEAutoCorrelation"), 3); continue; } } From f4882200e1b53988136787388318cd75e638dd02 Mon Sep 17 00:00:00 2001 From: prottayCMT <61418725+prottayCMT@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:20:38 +0100 Subject: [PATCH 02/19] [PWGLF] Boosting daughter with v0 momentum (#8936) Co-authored-by: Prottay Das --- PWGLF/Tasks/Strangeness/lambdapolsp.cxx | 55 ++++++++++--------------- 1 file changed, 21 insertions(+), 34 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/lambdapolsp.cxx b/PWGLF/Tasks/Strangeness/lambdapolsp.cxx index 54eca5c81fb..bc0993bb77a 100644 --- a/PWGLF/Tasks/Strangeness/lambdapolsp.cxx +++ b/PWGLF/Tasks/Strangeness/lambdapolsp.cxx @@ -77,7 +77,7 @@ struct lambdapolsp { // Configurable mycut{"mycut", false, "select tracks based on my cuts"}; Configurable tofhit{"tofhit", true, "select tracks based on tof hit"}; Configurable globalpt{"globalpt", true, "select tracks based on pt global vs tpc"}; - Configurable usefourvectormass{"usefourvectormass", true, "select invariant mass based on four vector"}; + Configurable useglobal{"useglobal", true, "flag to use global vs v0 momentum"}; Configurable checksign{"checksign", true, "check sign of daughter tracks"}; Configurable useprofile{"useprofile", 3, "flag to select profile vs Sparse"}; Configurable QxyNbins{"QxyNbins", 100, "Number of bins in QxQy histograms"}; @@ -100,7 +100,6 @@ struct lambdapolsp { Configurable cfgTPCcluster{"cfgTPCcluster", 70, "Number of TPC cluster"}; Configurable isPVContributor{"isPVContributor", true, "is PV contributor"}; Configurable checkwithpub{"checkwithpub", true, "checking results with published"}; - Configurable rejectmisident{"rejectmisident", true, "rejecting misidentification"}; Configurable useTPCTOF{"useTPCTOF", true, "flag to use TPC and TOF"}; // Configs for V0 @@ -436,15 +435,6 @@ struct lambdapolsp { if (pid == 1 && TMath::Abs(track.tpcNSigmaPi()) > ConfDaughPIDCuts) { return false; } - // for misidentification - if (rejectmisident) { - if (pid == 0 && TMath::Abs(track.tpcNSigmaPi()) < 3.0) { - return false; - } - if (pid == 1 && TMath::Abs(track.tpcNSigmaPr()) < 3.0) { - return false; - } - } } if (pid == 0 && pt < cfgDaughPrPt) { @@ -690,15 +680,24 @@ struct lambdapolsp { } if (LambdaTag) { - Proton = ROOT::Math::PxPyPzMVector(postrack.px(), postrack.py(), postrack.pz(), massPr); - Pion = ROOT::Math::PxPyPzMVector(negtrack.px(), negtrack.py(), negtrack.pz(), massPi); + if (useglobal) { + Proton = ROOT::Math::PxPyPzMVector(postrack.px(), postrack.py(), postrack.pz(), massPr); + Pion = ROOT::Math::PxPyPzMVector(negtrack.px(), negtrack.py(), negtrack.pz(), massPi); + } else { + Proton = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPr); + Pion = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPi); + } } if (aLambdaTag) { - Proton = ROOT::Math::PxPyPzMVector(negtrack.px(), negtrack.py(), negtrack.pz(), massPr); - Pion = ROOT::Math::PxPyPzMVector(postrack.px(), postrack.py(), postrack.pz(), massPi); + if (useglobal) { + Proton = ROOT::Math::PxPyPzMVector(negtrack.px(), negtrack.py(), negtrack.pz(), massPr); + Pion = ROOT::Math::PxPyPzMVector(postrack.px(), postrack.py(), postrack.pz(), massPi); + } else { + Proton = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPr); + Pion = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPi); + } } Lambda = Proton + Pion; - Lambdacopy = Proton + Pion; Lambda.SetM(massLambda); ROOT::Math::Boost boost{Lambda.BoostToCM()}; @@ -733,15 +732,9 @@ struct lambdapolsp { auto candeta = 0.0; if (LambdaTag) { - if (usefourvectormass) { - candmass = Lambdacopy.M(); - candpt = Lambdacopy.Pt(); - candeta = Lambdacopy.Eta(); - } else { - candmass = v0.mLambda(); - candpt = v0.pt(); - candeta = v0.eta(); - } + candmass = v0.mLambda(); + candpt = v0.pt(); + candeta = v0.eta(); histos.fill(HIST("hSparseLambdaPolA"), candmass, candpt, candeta, PolA, centrality); histos.fill(HIST("hSparseLambdaPolC"), candmass, candpt, candeta, PolC, centrality); @@ -753,15 +746,9 @@ struct lambdapolsp { } if (aLambdaTag) { - if (usefourvectormass) { - candmass = Lambdacopy.M(); - candpt = Lambdacopy.Pt(); - candeta = Lambdacopy.Eta(); - } else { - candmass = v0.mAntiLambda(); - candpt = v0.pt(); - candeta = v0.eta(); - } + candmass = v0.mAntiLambda(); + candpt = v0.pt(); + candeta = v0.eta(); histos.fill(HIST("hSparseAntiLambdaPolA"), candmass, candpt, candeta, PolA, centrality); histos.fill(HIST("hSparseAntiLambdaPolC"), candmass, candpt, candeta, PolC, centrality); From 2791ff2e4e15287931d425b6be9c8a1bd0fe7091 Mon Sep 17 00:00:00 2001 From: Junlee Kim Date: Wed, 11 Dec 2024 21:19:31 +0100 Subject: [PATCH 03/19] [PWGLF] daughter momentum from v0 table (#8939) Co-authored-by: junleekim --- PWGLF/Tasks/Strangeness/lambdapolarization.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/lambdapolarization.cxx b/PWGLF/Tasks/Strangeness/lambdapolarization.cxx index f0d7e63f57f..ae794ce1506 100644 --- a/PWGLF/Tasks/Strangeness/lambdapolarization.cxx +++ b/PWGLF/Tasks/Strangeness/lambdapolarization.cxx @@ -524,12 +524,12 @@ struct lambdapolarization { continue; if (LambdaTag) { - ProtonVec = ROOT::Math::PxPyPzMVector(postrack.px(), postrack.py(), postrack.pz(), massPr); - PionVec = ROOT::Math::PxPyPzMVector(negtrack.px(), negtrack.py(), negtrack.pz(), massPi); + ProtonVec = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPr); + PionVec = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPi); } if (aLambdaTag) { - ProtonVec = ROOT::Math::PxPyPzMVector(negtrack.px(), negtrack.py(), negtrack.pz(), massPr); - PionVec = ROOT::Math::PxPyPzMVector(postrack.px(), postrack.py(), postrack.pz(), massPi); + ProtonVec = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPr); + PionVec = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPi); } LambdaVec = ProtonVec + PionVec; LambdaVec.SetM(massLambda); From a30ebcce8d77e043f05642bf61bc70bd9220046a Mon Sep 17 00:00:00 2001 From: Nicolas Strangmann <77485327+nstrangm@users.noreply.github.com> Date: Wed, 11 Dec 2024 22:49:10 +0100 Subject: [PATCH 04/19] [PWGEM/PhotonMeson] Fix Cluster-Collision assignment in emcQC task (#8942) Co-authored-by: Nicolas Strangmann --- PWGEM/PhotonMeson/Tasks/emcalQC.cxx | 4 ++-- PWGEM/PhotonMeson/Utils/ClusterHistograms.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PWGEM/PhotonMeson/Tasks/emcalQC.cxx b/PWGEM/PhotonMeson/Tasks/emcalQC.cxx index fe81608516c..0b5be17d212 100644 --- a/PWGEM/PhotonMeson/Tasks/emcalQC.cxx +++ b/PWGEM/PhotonMeson/Tasks/emcalQC.cxx @@ -152,9 +152,9 @@ struct emcalQC { o2::aod::pwgem::photonmeson::utils::clusterhistogram::addClusterHistograms(&fRegistry, cfgDo2DQA); } - Preslice perCollision = aod::skimmedcluster::collisionId; + Preslice perCollision = aod::emccluster::emeventId; - void processQC(MyCollisions const& collisions, aod::SkimEMCClusters const& clusters) + void processQC(MyCollisions const& collisions, MyEMCClusters const& clusters) { for (auto& collision : collisions) { diff --git a/PWGEM/PhotonMeson/Utils/ClusterHistograms.h b/PWGEM/PhotonMeson/Utils/ClusterHistograms.h index 5df8ca93de1..677dfa00902 100644 --- a/PWGEM/PhotonMeson/Utils/ClusterHistograms.h +++ b/PWGEM/PhotonMeson/Utils/ClusterHistograms.h @@ -55,8 +55,8 @@ void addClusterHistograms(HistogramRegistry* fRegistry, bool do2DQA) fRegistry->addClone("Cluster/before/", "Cluster/after/"); } -template -void fillClusterHistograms(HistogramRegistry* fRegistry, SkimEMCCluster cluster, bool do2DQA, float weight = 1.f) +template +void fillClusterHistograms(HistogramRegistry* fRegistry, TCluster cluster, bool do2DQA, float weight = 1.f) { static constexpr std::string_view cluster_types[2] = {"before/", "after/"}; fRegistry->fill(HIST("Cluster/") + HIST(cluster_types[cls_id]) + HIST("hE"), cluster.e(), weight); From bfd1b0b7adcd7063aaf19d84c706b0af84a6b23b Mon Sep 17 00:00:00 2001 From: Zhiyong <71517277+Luzhiyongg@users.noreply.github.com> Date: Thu, 12 Dec 2024 05:52:32 +0800 Subject: [PATCH 05/19] [PWGCF] flowtask: fix DCAz bug and draw TPCsector overlap (#8935) --- PWGCF/Flow/Tasks/FlowTask.cxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/PWGCF/Flow/Tasks/FlowTask.cxx b/PWGCF/Flow/Tasks/FlowTask.cxx index 0f4d6977855..55a5bfc40ba 100644 --- a/PWGCF/Flow/Tasks/FlowTask.cxx +++ b/PWGCF/Flow/Tasks/FlowTask.cxx @@ -66,7 +66,8 @@ struct FlowTask { O2_DEFINE_CONFIGURABLE(cfgCutDCAzPtDepEnabled, bool, false, "switch of DCAz pt dependent cut") O2_DEFINE_CONFIGURABLE(cfgTrkSelSwitch, bool, false, "switch for self-defined track selection") O2_DEFINE_CONFIGURABLE(cfgTrkSelRun3ITSMatch, bool, false, "GlobalTrackRun3ITSMatching::Run3ITSall7Layers selection") - O2_DEFINE_CONFIGURABLE(cfgRejectionTPCsectorOverlap, bool, true, "rejection for TPC sector overlap") + O2_DEFINE_CONFIGURABLE(cfgShowTPCsectorOverlap, bool, true, "Draw TPC sector overlap") + O2_DEFINE_CONFIGURABLE(cfgRejectionTPCsectorOverlap, bool, false, "rejection for TPC sector overlap") O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, "Use additional event cut on mult correlations") O2_DEFINE_CONFIGURABLE(cfgTriggerkTVXinTRD, bool, true, "TRD triggered") O2_DEFINE_CONFIGURABLE(cfgEvSelkNoSameBunchPileup, bool, true, "rejects collisions which are associated with the same found-by-T0 bunch crossing") @@ -401,7 +402,7 @@ struct FlowTask { fT0AV0ASigma->SetParameters(463.4144, 6.796509e-02, -9.097136e-07, 7.971088e-12, -2.600581e-17); } - if (cfgRejectionTPCsectorOverlap) { + if (cfgShowTPCsectorOverlap) { fPhiCutLow = new TF1("fPhiCutLow", "0.06/x+pi/18.0-0.06", 0, 100); fPhiCutHigh = new TF1("fPhiCutHigh", "0.1/x+pi/18.0+0.06", 0, 100); } @@ -591,7 +592,7 @@ struct FlowTask { template bool trackSelected(TTrack track) { - if (cfgCutDCAzPtDepEnabled && (track.dcaZ() > (0.004f + 0.013f / track.pt()))) + if (cfgCutDCAzPtDepEnabled && (fabs(track.dcaZ()) > (0.004f + 0.013f / track.pt()))) return false; if (cfgTrkSelSwitch) { @@ -615,8 +616,10 @@ struct FlowTask { phimodn += TMath::Pi() / 18.0; // to center gap in the middle phimodn = fmod(phimodn, TMath::Pi() / 9.0); registry.fill(HIST("pt_phi_bef"), track.pt(), phimodn); - if (phimodn < fPhiCutHigh->Eval(track.pt()) && phimodn > fPhiCutLow->Eval(track.pt())) - return false; // reject track + if (cfgRejectionTPCsectorOverlap) { + if (phimodn < fPhiCutHigh->Eval(track.pt()) && phimodn > fPhiCutLow->Eval(track.pt())) + return false; // reject track + } registry.fill(HIST("pt_phi_aft"), track.pt(), phimodn); return true; } @@ -703,7 +706,7 @@ struct FlowTask { double sum_ptSquare_wSquare_WithinGap08 = 0., sum_pt_wSquare_WithinGap08 = 0.; int Magnetfield = 0; double NTracksCorrected = 0; - if (cfgRejectionTPCsectorOverlap) { + if (cfgShowTPCsectorOverlap) { // magnet field dependence cut Magnetfield = getMagneticField(bc.timestamp()); } @@ -714,7 +717,7 @@ struct FlowTask { for (auto& track : tracks) { if (!trackSelected(track)) continue; - if (cfgRejectionTPCsectorOverlap && !RejectionTPCoverlap(track, Magnetfield)) + if (cfgShowTPCsectorOverlap && !RejectionTPCoverlap(track, Magnetfield)) continue; bool WithinPtPOI = (cfgCutPtPOIMin < track.pt()) && (track.pt() < cfgCutPtPOIMax); // within POI pT range bool WithinPtRef = (cfgCutPtRefMin < track.pt()) && (track.pt() < cfgCutPtRefMax); // within RF pT range From 9579326370dd51f69c836593a6f5965ce26b9ca3 Mon Sep 17 00:00:00 2001 From: Noor Koster <82090643+cnkoster@users.noreply.github.com> Date: Wed, 11 Dec 2024 22:57:07 +0100 Subject: [PATCH 06/19] [PWGCF] Fill registry only when events are selected (#8940) Co-authored-by: ALICE Action Bot --- PWGCF/Flow/TableProducer/zdcQVectors.cxx | 46 ++-- PWGCF/Flow/Tasks/flowSP.cxx | 266 +++++++++++++---------- 2 files changed, 181 insertions(+), 131 deletions(-) diff --git a/PWGCF/Flow/TableProducer/zdcQVectors.cxx b/PWGCF/Flow/TableProducer/zdcQVectors.cxx index c4873eb1246..957460d8b28 100644 --- a/PWGCF/Flow/TableProducer/zdcQVectors.cxx +++ b/PWGCF/Flow/TableProducer/zdcQVectors.cxx @@ -176,6 +176,7 @@ struct ZdcQVectors { for (int step = 0; step < 6; step++) { registry.add(Form("step%i/QA/hSPplaneA", step), "hSPplaneA", kTH2D, {{100, -4, 4}, axisCent10}); registry.add(Form("step%i/QA/hSPplaneC", step), "hSPplaneC", kTH2D, {{100, -4, 4}, axisCent10}); + registry.add(Form("step%i/QA/hSPplaneFull", step), "hSPplaneFull", kTH2D, {{100, -4, 4}, axisCent10}); for (const auto& side : sides) { hQxvsQy[step] = registry.add(Form("step%i/hZN%s_Qx_vs_Qy", step, side), Form("hZN%s_Qx_vs_Qy", side), kTH2F, {axisQ, axisQ}); } @@ -328,6 +329,14 @@ struct ZdcQVectors { registry.fill(HIST("step0/QA/hQXC_vs_vz"), v[2], q[0][0][2]); registry.fill(HIST("step0/QA/hQYC_vs_vz"), v[2], q[0][0][3]); + // add psi!! + double psiA = 1.0 * std::atan2(q[0][0][2], q[0][0][0]); + registry.fill(HIST("step0/QA/hSPplaneA"), psiA, centrality, 1); + double psiC = 1.0 * std::atan2(q[0][0][3], q[0][0][1]); + registry.fill(HIST("step0/QA/hSPplaneC"), psiC, centrality, 1); + double psiFull = 1.0 * std::atan2(q[0][0][2] + q[0][0][3], q[0][0][0] + q[0][0][1]); + registry.fill(HIST("step0/QA/hSPplaneFull"), psiFull, centrality, 1); + static constexpr std::string_view SubDir[] = {"step1/", "step2/", "step3/", "step4/", "step5/"}; static_for<0, 4>([&](auto Ind) { constexpr int Index = Ind.value; @@ -361,11 +370,12 @@ struct ZdcQVectors { registry.fill(HIST(SubDir[Index]) + HIST("QA/hQXC_vs_vz"), v[2], q[iteration][indexRt][2]); registry.fill(HIST(SubDir[Index]) + HIST("QA/hQYC_vs_vz"), v[2], q[iteration][indexRt][3]); - // add psi!! - double psiA = 1.0 * std::atan2(q[iteration][indexRt][2], q[iteration][indexRt][0]); + psiA = 1.0 * std::atan2(q[iteration][indexRt][2], q[iteration][indexRt][0]); registry.fill(HIST(SubDir[Index]) + HIST("QA/hSPplaneA"), psiA, centrality, 1); - double psiC = 1.0 * std::atan2(q[iteration][indexRt][3], q[iteration][indexRt][1]); + psiC = 1.0 * std::atan2(q[iteration][indexRt][3], q[iteration][indexRt][1]); registry.fill(HIST(SubDir[Index]) + HIST("QA/hSPplaneC"), psiC, centrality, 1); + psiFull = 1.0 * std::atan2(q[iteration][indexRt][2] + q[iteration][indexRt][3], q[iteration][indexRt][0] + q[iteration][indexRt][1]); + registry.fill(HIST(SubDir[Index]) + HIST("QA/hSPplaneFull"), psiFull, centrality, 1); }); } @@ -456,7 +466,7 @@ struct ZdcQVectors { } else if (hist->InheritsFrom("TProfile")) { TProfile* h = reinterpret_cast(hist); TString name = h->GetName(); - int bin{}; + int bin; if (name.Contains("mean_vx")) bin = h->GetXaxis()->FindBin(v[0]); if (name.Contains("mean_vy")) @@ -471,20 +481,17 @@ struct ZdcQVectors { } else if (hist->InheritsFrom("THnSparse")) { std::vector sparsePars; THnSparseD* h = reinterpret_cast(hist); - if (step == 0 && iteration > 0) { - // Axis(0) is runnuber, but we don't need this - sparsePars.push_back(h->GetAxis(1)->FindBin(centrality)); - sparsePars.push_back(h->GetAxis(2)->FindBin(v[0])); - sparsePars.push_back(h->GetAxis(3)->FindBin(v[1])); - sparsePars.push_back(h->GetAxis(4)->FindBin(v[2])); - } + sparsePars.push_back(h->GetAxis(0)->FindBin(centrality)); + sparsePars.push_back(h->GetAxis(1)->FindBin(v[0])); + sparsePars.push_back(h->GetAxis(2)->FindBin(v[1])); + sparsePars.push_back(h->GetAxis(3)->FindBin(v[2])); - for (std::size_t i = 0; i < sparsePars.size() + 1; i++) { - h->GetAxis(i + 1)->SetRange(sparsePars[i], sparsePars[i]); + for (std::size_t i = 0; i < sparsePars.size(); i++) { + h->GetAxis(i)->SetRange(sparsePars[i], sparsePars[i]); } - calibConstant = h->Projection(5)->GetMean(); + calibConstant = h->Projection(4)->GetMean(); - if (h->Projection(sparsePars.size())->GetEntries() < cfgMinEntriesSparseBin) { + if (h->Projection(4)->GetEntries() < cfgMinEntriesSparseBin) { LOGF(debug, "1 entry in sparse bin! Not used... (increase binsize)"); calibConstant = 0; isSelected = false; @@ -694,7 +701,8 @@ struct ZdcQVectors { if (cal.atIteration == 0) { if (counter < 1) LOGF(warning, "Calibation files missing!!! Output created with q-vectors right after energy gain eq. !!"); - fillAllRegistries(0, 0); + if (isSelected) + fillAllRegistries(0, 0); spTableZDC(runnumber, centrality, v[0], v[1], v[2], q[0][0][0], q[0][0][1], q[0][0][2], q[0][0][3], isSelected, 0, 0); counter++; return; @@ -722,8 +730,10 @@ struct ZdcQVectors { if (counter < 1) LOGF(info, "Output created with q-vectors at iteration %i and step %i!!!!", cal.atIteration, cal.atStep + 1); - fillAllRegistries(cal.atIteration, cal.atStep + 1); - registry.fill(HIST("QA/centrality_after"), centrality); + if (isSelected) { + fillAllRegistries(cal.atIteration, cal.atStep + 1); + registry.fill(HIST("QA/centrality_after"), centrality); + } spTableZDC(runnumber, centrality, v[0], v[1], v[2], q[cal.atIteration][cal.atStep][0], q[cal.atIteration][cal.atStep][1], q[cal.atIteration][cal.atStep][2], q[cal.atIteration][cal.atStep][3], isSelected, cal.atIteration, cal.atStep); counter++; return; diff --git a/PWGCF/Flow/Tasks/flowSP.cxx b/PWGCF/Flow/Tasks/flowSP.cxx index e64492dfa06..f89d0728364 100644 --- a/PWGCF/Flow/Tasks/flowSP.cxx +++ b/PWGCF/Flow/Tasks/flowSP.cxx @@ -32,7 +32,6 @@ #include "Common/DataModel/TrackSelectionTables.h" #include "Common/DataModel/Multiplicity.h" #include "Common/DataModel/Centrality.h" -#include "Common/DataModel/Qvectors.h" #include "Common/Core/RecoDecay.h" #include "PWGCF/DataModel/SPTableZDC.h" @@ -57,8 +56,9 @@ struct FlowSP { O2_DEFINE_CONFIGURABLE(cfgMagField, float, 99999, "Configurable magnetic field; default CCDB will be queried"); O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, true, "Bool to enable Additional Event Cut"); O2_DEFINE_CONFIGURABLE(cfgUseAdditionalTrackCut, bool, true, "Bool to enable Additional Track Cut"); - O2_DEFINE_CONFIGURABLE(cfgCentMax, float, 60, "Maximum cenrality for selected events"); - O2_DEFINE_CONFIGURABLE(cfgCentMin, float, 10, "Minimum cenrality for selected events"); + O2_DEFINE_CONFIGURABLE(cfgCentMax, float, 90, "Maximum cenrality for selected events"); + O2_DEFINE_CONFIGURABLE(cfgCentMin, float, 0, "Minimum cenrality for selected events"); + O2_DEFINE_CONFIGURABLE(cfgFillWeights, bool, false, "Fill NUA weights") O2_DEFINE_CONFIGURABLE(cfgDoubleTrackFunction, bool, true, "Include track cut at low pt"); O2_DEFINE_CONFIGURABLE(cfgTrackCutSize, float, 0.06, "Spread of track cut"); @@ -68,12 +68,22 @@ struct FlowSP { O2_DEFINE_CONFIGURABLE(cfgNoCollInTimeRangeStandard, bool, true, "kNoCollInTimeRangeStandard"); O2_DEFINE_CONFIGURABLE(cfgDoOccupancySel, bool, true, "Bool for event selection on detector occupancy"); O2_DEFINE_CONFIGURABLE(cfgMultCut, bool, true, "Use additional evenr cut on mult correlations"); - O2_DEFINE_CONFIGURABLE(cfgTVXinTRD, bool, true, "Use kTVXinTRD (reject TRD triggered events)"); + O2_DEFINE_CONFIGURABLE(cfgTVXinTRD, bool, false, "Use kTVXinTRD (reject TRD triggered events)"); O2_DEFINE_CONFIGURABLE(cfgIsVertexITSTPC, bool, true, "Selects collisions with at least one ITS-TPC track"); + ConfigurableAxis axisDCAz{"axisDCAz", {200, -.5, .5}, "DCA_{z} (cm)"}; + ConfigurableAxis axisDCAxy{"axisDCAxy", {200, -.5, .5}, "DCA_{xy} (cm)"}; + ConfigurableAxis axisPhiMod = {"axisPhiMod", {100, 0, constants::math::PI / 9}, "fmod(#varphi,#pi/9)"}; + ConfigurableAxis axisPhi = {"axisPhi", {60, 0, constants::math::TwoPI}, "#varphi"}; + ConfigurableAxis axisEta = {"axisEta", {64, -1, 1}, "#eta"}; + ConfigurableAxis axisEtaV1 = {"axisEtaV1", {8, -.8, .8}, "#eta"}; + ConfigurableAxis axisVz = {"axisVz", {40, -10, 10}, "v_{z}"}; + ConfigurableAxis axisCent = {"axisCent", {90, 0, 90}, "Centrality(%)"}; + ConfigurableAxis axisPhiPlane = {"axisPhiPlane", {100, -constants::math::PI, constants::math::PI}, "#Psi"}; + 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; - using UsedCollisions = soa::Filtered>; + using UsedCollisions = soa::Filtered>; using UsedTracks = soa::Filtered>; // Connect to ccdb @@ -92,11 +102,6 @@ struct FlowSP { void init(InitContext const&) { - std::vector ptbinning = {0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.2, 2.4, 2.6, 2.8, 3, 3.5, 4, 5, 6, 8, 10}; - - AxisSpec phiModAxis = {100, 0, constants::math::PI / 9, "fmod(#varphi,#pi/9)"}; - AxisSpec ptAxis = {ptbinning, "#it{p}_{T} GeV/#it{c}"}; - ccdb->setURL("http://alice-ccdb.cern.ch"); ccdb->setCaching(true); ccdb->setLocalObjectValidityChecking(); @@ -104,46 +109,67 @@ struct FlowSP { int64_t now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); ccdb->setCreatedNotAfter(now); - registry.add("hSPplaneA", "hSPplaneA", kTH1D, {{100, -3, 3}}); - registry.add("hSPplaneC", "hSPplaneC", kTH1D, {{100, -3, 3}}); - registry.add("hSPplaneA-C", "hSPplaneA-C", kTH1D, {{100, -3, 3}}); - registry.add("hCent", "hCent", kTH1D, {{80, 0, 80}}); - - registry.add("hqIm", "hqIm", kTH1D, {{100, -2, 2}}); - registry.add("hqRe", "hqRe", kTH1D, {{100, -2, 2}}); - - registry.add("hCosdPhi", "hCosdPhi; Centrality(%); #LT Cos( #Psi^{A}-#Psi^{C})#GT", kTProfile, {{80, 0, 80}}); - registry.add("hSindPhi", "hSindPhi; Centrality(%); #LT Sin( #Psi^{A}-#Psi^{C})#GT", kTProfile, {{80, 0, 80}}); - registry.add("hSPlaneRes", "hSPlaneRes; Centrality(%); ", kTProfile, {{80, 0, 80}}); - - registry.add("pt_phi_bef", "", {HistType::kTH2D, {ptAxis, phiModAxis}}); - registry.add("pt_phi_aft", "", {HistType::kTH2D, {ptAxis, phiModAxis}}); - - registry.add("v1_eta", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - registry.add("v1A_eta", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - registry.add("v1C_eta", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - registry.add("v1AC_eta", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - - registry.add("v1_eta_odd", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - registry.add("v1_eta_even", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - - registry.add("v1_eta_odd_dev", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - registry.add("v1_eta_even_dev", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - - registry.add("v1_eta_odd_dev_pos", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - registry.add("v1_eta_even_dev_pos", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - registry.add("v1_eta_odd_pos", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - registry.add("v1_eta_even_pos", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - - registry.add("v1_eta_odd_dev_neg", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - registry.add("v1_eta_even_dev_neg", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - registry.add("v1_eta_odd_neg", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - registry.add("v1_eta_even_neg", "", kTProfile2D, {{10, -.8, .8}, ptAxis}); - - registry.add("v2_cent", "", kTProfile2D, {{80, 0, 80}, ptAxis}); - registry.add("v2A_cent", "", kTProfile2D, {{80, 0, 80}, ptAxis}); - registry.add("v2C_cent", "", kTProfile2D, {{80, 0, 80}, ptAxis}); - registry.add("v2AC_cent", "", kTProfile2D, {{80, 0, 80}, ptAxis}); + std::vector ptbinning = {0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.2, 2.4, 2.6, 2.8, 3, 3.5, 4, 5, 6, 8, 10}; + AxisSpec axisPt = {ptbinning, "#it{p}_{T} GeV/#it{c}"}; + AxisSpec nchAxis = {4000, 0, 4000, "N_{ch}"}; + AxisSpec t0cAxis = {70, 0, 70000, "N_{ch} (T0C)"}; + AxisSpec t0aAxis = {200, 0, 200, "N_{ch}"}; + AxisSpec multpvAxis = {4000, 0, 4000, "N_{ch} (PV)"}; + + registry.add("hSPplaneA", "hSPplaneA", kTH1D, {axisPhiPlane}); + registry.add("hSPplaneC", "hSPplaneC", kTH1D, {axisPhiPlane}); + registry.add("hSPplaneFull", "hSPplaneFull", kTH1D, {axisPhiPlane}); + + registry.add("hCosPhiACosPhiC", "hCosPhiACosPhiC; Centrality(%); #LT Cos(#Psi^{A})Cos(#Psi^{C})#GT", kTProfile, {axisCent}); + registry.add("hSinPhiASinPhiC", "hSinPhiASinPhiC; Centrality(%); #LT Sin(#Psi^{A})Sin(#Psi^{C})#GT", kTProfile, {axisCent}); + registry.add("hSinPhiACosPhiC", "hSinPhiACosPhiC; Centrality(%); #LT Sin(#Psi^{A})Cos(#Psi^{C})#GT", kTProfile, {axisCent}); + registry.add("hCosPhiASinsPhiC", "hCosPhiASinsPhiC; Centrality(%); #LT Cos(#Psi^{A})Sin(#Psi^{C})#GT", kTProfile, {axisCent}); + registry.add("hFullEvPlaneRes", "hFullEvPlaneRes; Centrality(%); #sqrt{2#LT Cos(#Psi^{A} - #Psi^{C})#GT} ", kTProfile, {axisCent}); + + registry.add("QA/after/hCent", "", {HistType::kTH1D, {axisCent}}); + registry.add("QA/after/globalTracks_centT0C", "", {HistType::kTH2D, {axisCent, nchAxis}}); + registry.add("QA/after/PVTracks_centT0C", "", {HistType::kTH2D, {axisCent, multpvAxis}}); + registry.add("QA/after/globalTracks_PVTracks", "", {HistType::kTH2D, {multpvAxis, nchAxis}}); + registry.add("QA/after/globalTracks_multT0A", "", {HistType::kTH2D, {t0aAxis, nchAxis}}); + registry.add("QA/after/globalTracks_multV0A", "", {HistType::kTH2D, {t0aAxis, nchAxis}}); + registry.add("QA/after/multV0A_multT0A", "", {HistType::kTH2D, {t0aAxis, t0aAxis}}); + registry.add("QA/after/multT0C_centT0C", "", {HistType::kTH2D, {axisCent, t0cAxis}}); + registry.addClone("QA/after/", "QA/before/"); + + registry.add("QA/after/pt_phi_bef", "", {HistType::kTH2D, {axisPt, axisPhiMod}}); + registry.add("QA/after/pt_phi_aft", "", {HistType::kTH2D, {axisPt, axisPhiMod}}); + registry.add("QA/after/hPhi_Eta_vz", "", {HistType::kTH3D, {axisPhi, axisEta, axisVz}}); + registry.add("QA/after/hDCAxy", "", {HistType::kTH1D, {axisDCAxy}}); + registry.add("QA/after/hDCAz", "", {HistType::kTH1D, {axisDCAz}}); + + // track properties per centrality and per eta, pt bin + registry.add("uxqxA_eta_pt", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("uyqyA_eta_pt", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("uxqxC_eta_pt", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("uyqyC_eta_pt", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("v1A_eta_pt", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("v1C_eta_pt", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("v1Full_eta_pt", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + + registry.add("uxqxA_eta_pt_pos", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("uyqyA_eta_pt_pos", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("uxqxC_eta_pt_pos", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("uyqyC_eta_pt_pos", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("v1A_eta_pt_pos", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("v1C_eta_pt_pos", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("v1Full_eta_pt_pos", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + + registry.add("uxqxA_eta_pt_neg", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("uyqyA_eta_pt_neg", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("uxqxC_eta_pt_neg", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("uyqyC_eta_pt_neg", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("v1A_eta_pt_neg", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("v1C_eta_pt_neg", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("v1Full_eta_pt_neg", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + + registry.add("qAqCX", "", kTProfile, {axisCent}); + registry.add("qAqCY", "", kTProfile, {axisCent}); + registry.add("qAqCXY", "", kTProfile, {axisCent}); registry.add("hEventCount", "Number of Event;; Count", {HistType::kTH1D, {{11, 0, 11}}}); registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(1, "Filtered event"); @@ -283,13 +309,38 @@ struct FlowSP { phimodn += o2::constants::math::PI / 18.0; // to center gap in the middle phimodn = fmod(phimodn, o2::constants::math::PI / 9.0); - registry.fill(HIST("pt_phi_bef"), track.pt(), phimodn); + registry.fill(HIST("QA/after/pt_phi_bef"), track.pt(), phimodn); if (phimodn < fPhiCutHigh->Eval(track.pt()) && phimodn > fPhiCutLow->Eval(track.pt())) return false; // reject track - registry.fill(HIST("pt_phi_aft"), track.pt(), phimodn); + registry.fill(HIST("QA/after/pt_phi_aft"), track.pt(), phimodn); return true; } + template + inline void fillEventQA(CollisionObject collision, TracksObject tracks, bool before) + { + if (before) { + registry.fill(HIST("QA/before/hCent"), collision.centFT0C()); + registry.fill(HIST("QA/before/globalTracks_centT0C"), collision.centFT0C(), tracks.size()); + registry.fill(HIST("QA/before/PVTracks_centT0C"), collision.centFT0C(), collision.multNTracksPV()); + registry.fill(HIST("QA/before/globalTracks_PVTracks"), collision.multNTracksPV(), tracks.size()); + registry.fill(HIST("QA/before/globalTracks_multT0A"), collision.multFT0A(), tracks.size()); + registry.fill(HIST("QA/before/globalTracks_multV0A"), collision.multFV0A(), tracks.size()); + registry.fill(HIST("QA/before/multV0A_multT0A"), collision.multFT0A(), collision.multFV0A()); + registry.fill(HIST("QA/before/multT0C_centT0C"), collision.centFT0C(), collision.multFT0C()); + } else { + registry.fill(HIST("QA/after/hCent"), collision.centFT0C()); + registry.fill(HIST("QA/after/globalTracks_centT0C"), collision.centFT0C(), tracks.size()); + registry.fill(HIST("QA/after/PVTracks_centT0C"), collision.centFT0C(), collision.multNTracksPV()); + registry.fill(HIST("QA/after/globalTracks_PVTracks"), collision.multNTracksPV(), tracks.size()); + registry.fill(HIST("QA/after/globalTracks_multT0A"), collision.multFT0A(), tracks.size()); + registry.fill(HIST("QA/after/globalTracks_multV0A"), collision.multFV0A(), tracks.size()); + registry.fill(HIST("QA/after/multV0A_multT0A"), collision.multFT0A(), collision.multFV0A()); + registry.fill(HIST("QA/after/multT0C_centT0C"), collision.centFT0C(), collision.multFT0C()); + } + return; + } + void process(UsedCollisions::iterator const& collision, aod::BCsWithTimestamps const&, UsedTracks const& tracks) { // Hier sum over collisions and get ZDC data. @@ -307,10 +358,13 @@ struct FlowSP { if (!eventSelected(collision, tracks.size(), centrality)) return; + fillEventQA(collision, tracks, true); + if (collision.isSelected()) { + registry.fill(HIST("hEventCount"), 10.5); - registry.fill(HIST("hCent"), centrality); + fillEventQA(collision, tracks, false); double qxA = collision.qxA(); double qyA = collision.qyA(); @@ -323,94 +377,80 @@ struct FlowSP { double psiC = 1.0 * std::atan2(qyC, qxC); registry.fill(HIST("hSPplaneC"), psiC, 1); - registry.fill(HIST("hSPplaneA-C"), psiA - psiC, 1); + // https://twiki.cern.ch/twiki/pub/ALICE/DirectedFlowAnalysisNote/v1_ZDC_ALICE_INT_NOTE_version02.pdf + double psiFull = 1.0 * std::atan2(qyA + qyC, qxA + qxC); + registry.fill(HIST("hSPplaneFull"), psiFull, 1); - registry.fill(HIST("hCosdPhi"), centrality, std::cos(psiA - psiC)); - if (std::cos(psiA - psiC) < 0) - registry.fill(HIST("hSPlaneRes"), centrality, std::sqrt(-1. * std::cos(psiA - psiC))); + registry.fill(HIST("hCosPhiACosPhiC"), centrality, std::cos(psiA) * std::cos(psiC)); + registry.fill(HIST("hSinPhiASinPhiC"), centrality, std::sin(psiA) * std::sin(psiC)); + registry.fill(HIST("hSinPhiACosPhiC"), centrality, std::sin(psiA) * std::cos(psiC)); + registry.fill(HIST("hCosPhiASinsPhiC"), centrality, std::cos(psiA) * std::sin(psiC)); - registry.fill(HIST("hSindPhi"), centrality, std::sin(psiA - psiC)); + if (std::cos(psiA) - std::cos(psiC) < 0) + registry.fill(HIST("hFullEvPlaneRes"), centrality, std::sqrt(-2. * (std::cos(psiA) - std::cos(psiC)))); - auto qxAqxC = qxA * qxC; - auto qyAqyC = qyA * qyC; + registry.fill(HIST("qAqCXY"), centrality, qxA * qxC + qyA * qyC); + registry.fill(HIST("qAqCX"), centrality, qxA * qxC); + registry.fill(HIST("qAqCY"), centrality, qyA * qyC); for (const auto& track : tracks) { if (!trackSelected(track, field)) continue; - bool pos; if (track.sign() == 0.0) continue; - if (track.sign() > 0) { - pos = true; - } else { - pos = false; - } + bool pos = (track.sign() > 0) ? true : false; // constrain angle to 0 -> [0,0+2pi] auto phi = RecoDecay::constrainAngle(track.phi(), 0); + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - auto ux = std::cos(phi); auto uy = std::sin(phi); + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // auto uxQxA = ux * qxA; - // auto uyQyA = uy * qyA; - // auto uxyQxyA = uxQxA + uyQyA; - // auto uxQxC = ux * qxC; - // auto uyQyC = uy * qyC; - // auto uxyQxyC = uxQxC + uyQyC; + double uxqxA = ux * qxA; + double uyqyA = uy * qyA; - auto oddv1 = ux * (qxA - qxC) + uy * (qyA - qyC); - auto evenv1 = ux * (qxA + qxC) + uy * (qyA + qyC); + registry.fill(HIST("uxqxA_eta_pt"), track.eta(), track.pt(), centrality, uxqxA); + registry.fill(HIST("uyqyA_eta_pt"), track.eta(), track.pt(), centrality, uyqyA); - auto oddv1Dev = ux * (qxA - qxC) / std::sqrt(std::abs(qxAqxC)) + uy * (qyA - qyC) / std::sqrt(std::abs(qyAqyC)); - auto evenv1Dev = ux * (qxA + qxC) / std::sqrt(std::abs(qxAqxC)) + uy * (qyA + qyC) / std::sqrt(std::abs(qyAqyC)); + double uxqxC = ux * qxC; + double uyqyC = uy * qyC; + + registry.fill(HIST("uxqxC_eta_pt"), track.eta(), track.pt(), centrality, uxqxC); + registry.fill(HIST("uyqyC_eta_pt"), track.eta(), track.pt(), centrality, uyqyC); double v1A = std::cos(phi - psiA); double v1C = std::cos(phi - psiC); + double v1Full = std::cos(phi - psiFull); - double v1AC = std::cos(phi - (psiA - psiC)); - - registry.fill(HIST("v1_eta"), track.eta(), track.pt(), (1. / std::sqrt(2)) * (v1A - v1C)); - registry.fill(HIST("v1A_eta"), track.eta(), track.pt(), (v1A)); - registry.fill(HIST("v1C_eta"), track.eta(), track.pt(), (v1C)); - registry.fill(HIST("v1AC_eta"), track.eta(), track.pt(), (v1AC)); - - registry.fill(HIST("v1_eta_odd"), track.eta(), track.pt(), oddv1); - registry.fill(HIST("v1_eta_even"), track.eta(), track.pt(), evenv1); - - registry.fill(HIST("v1_eta_odd_dev"), track.eta(), track.pt(), oddv1Dev); - registry.fill(HIST("v1_eta_even_dev"), track.eta(), track.pt(), evenv1Dev); + registry.fill(HIST("v1A_eta_pt"), track.eta(), track.pt(), centrality, v1A); + registry.fill(HIST("v1C_eta_pt"), track.eta(), track.pt(), centrality, v1C); + registry.fill(HIST("v1Full_eta_pt"), track.eta(), track.pt(), centrality, v1Full); if (pos) { - registry.fill(HIST("v1_eta_odd_pos"), track.eta(), track.pt(), oddv1); - registry.fill(HIST("v1_eta_even_pos"), track.eta(), track.pt(), evenv1); - - registry.fill(HIST("v1_eta_odd_dev_pos"), track.eta(), track.pt(), oddv1Dev); - registry.fill(HIST("v1_eta_even_dev_pos"), track.eta(), track.pt(), evenv1Dev); + registry.fill(HIST("uxqxA_eta_pt_pos"), track.eta(), track.pt(), centrality, uxqxA); + registry.fill(HIST("uyqyA_eta_pt_pos"), track.eta(), track.pt(), centrality, uyqyA); + registry.fill(HIST("uxqxC_eta_pt_pos"), track.eta(), track.pt(), centrality, uxqxC); + registry.fill(HIST("uyqyC_eta_pt_pos"), track.eta(), track.pt(), centrality, uyqyC); + registry.fill(HIST("v1A_eta_pt_pos"), track.eta(), track.pt(), centrality, v1A); + registry.fill(HIST("v1C_eta_pt_pos"), track.eta(), track.pt(), centrality, v1C); + registry.fill(HIST("v1Full_eta_pt_pos"), track.eta(), track.pt(), centrality, v1Full); } else { - registry.fill(HIST("v1_eta_odd_neg"), track.eta(), track.pt(), oddv1); - registry.fill(HIST("v1_eta_even_neg"), track.eta(), track.pt(), evenv1); - - registry.fill(HIST("v1_eta_odd_dev_neg"), track.eta(), track.pt(), oddv1Dev); - registry.fill(HIST("v1_eta_even_dev_neg"), track.eta(), track.pt(), evenv1Dev); + registry.fill(HIST("uxqxA_eta_pt_neg"), track.eta(), track.pt(), centrality, uxqxA); + registry.fill(HIST("uyqyA_eta_pt_neg"), track.eta(), track.pt(), centrality, uyqyA); + registry.fill(HIST("uxqxC_eta_pt_neg"), track.eta(), track.pt(), centrality, uxqxC); + registry.fill(HIST("uyqyC_eta_pt_neg"), track.eta(), track.pt(), centrality, uyqyC); + registry.fill(HIST("v1A_eta_pt_neg"), track.eta(), track.pt(), centrality, v1A); + registry.fill(HIST("v1C_eta_pt_neg"), track.eta(), track.pt(), centrality, v1C); + registry.fill(HIST("v1Full_eta_pt_neg"), track.eta(), track.pt(), centrality, v1Full); } - - double v2A = std::cos(2 * (phi - psiA)); - double v2C = std::cos(2 * (phi - psiC)); - double v2AC = std::cos(2 * (phi - (psiA - psiC))); - - registry.fill(HIST("v2_cent"), centrality, track.pt(), (1. / std::sqrt(2)) * (v2A - v2C)); - registry.fill(HIST("v2A_cent"), centrality, track.pt(), (v2A)); - registry.fill(HIST("v2C_cent"), centrality, track.pt(), (v2C)); - registry.fill(HIST("v2AC_cent"), centrality, track.pt(), (v2AC)); + // QA plots + registry.fill(HIST("QA/after/hPhi_Eta_vz"), track.phi(), track.eta(), collision.posZ()); + registry.fill(HIST("QA/after/hDCAxy"), track.dcaXY()); + registry.fill(HIST("QA/after/hDCAz"), track.dcaZ()); } - - float qIm = collision.qvecIm()[0]; - float qRe = collision.qvecRe()[0]; - - registry.fill(HIST("hqIm"), qIm); - registry.fill(HIST("hqRe"), qRe); } } }; From 81cd73ea324f051af0f506ec4a30322939bc55ab Mon Sep 17 00:00:00 2001 From: EmilGorm <50658075+EmilGorm@users.noreply.github.com> Date: Wed, 11 Dec 2024 23:10:35 +0100 Subject: [PATCH 07/19] [PWGCF] Added PID, Added RBR NUA (#8938) Co-authored-by: Emil Gorm Nielsen --- .../GenericFramework/Core/FlowPtContainer.cxx | 5 +- PWGCF/GenericFramework/Core/FlowPtContainer.h | 1 + .../Tasks/flowGenericFramework.cxx | 572 ++++++++++++++---- 3 files changed, 459 insertions(+), 119 deletions(-) diff --git a/PWGCF/GenericFramework/Core/FlowPtContainer.cxx b/PWGCF/GenericFramework/Core/FlowPtContainer.cxx index 239107ce0ad..70bb53206bb 100644 --- a/PWGCF/GenericFramework/Core/FlowPtContainer.cxx +++ b/PWGCF/GenericFramework/Core/FlowPtContainer.cxx @@ -10,6 +10,9 @@ // or submit itself to any jurisdiction. #include "FlowPtContainer.h" +#include +#include +#include FlowPtContainer::FlowPtContainer() : TNamed("name", "name"), fCMTermList(0), @@ -796,7 +799,7 @@ void FlowPtContainer::RebinMulti(Int_t nbins, Double_t* binedges) } TH1* FlowPtContainer::getCorrHist(int ind, int m) { - return dynamic_cast(fCorrList->FindObject(Form("mpt%i", m + 1)))->getHist(ind); + return dynamic_cast(fCorrList->FindObject(Form("mpt%i", m)))->getHist(ind); } TH1* FlowPtContainer::getCentralMomentHist(int ind, int m) { diff --git a/PWGCF/GenericFramework/Core/FlowPtContainer.h b/PWGCF/GenericFramework/Core/FlowPtContainer.h index 5455859cf05..5b1006017f7 100644 --- a/PWGCF/GenericFramework/Core/FlowPtContainer.h +++ b/PWGCF/GenericFramework/Core/FlowPtContainer.h @@ -78,6 +78,7 @@ class FlowPtContainer : public TNamed void SetUseCentralMoments(bool newval) { fUseCentralMoments = newval; } void SetUseGapMethod(bool newval) { fUseGap = newval; } bool usesCentralMoments() { return fUseCentralMoments; } + bool usesGap() { return fUseGap; } void RebinMulti(Int_t nbins); void RebinMulti(Int_t nbins, double* binedges); TH1* getCentralMomentHist(int ind, int m); diff --git a/PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx b/PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx index d9b969ffbf6..2278333a5d0 100644 --- a/PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx +++ b/PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx @@ -16,6 +16,7 @@ #include #include #include +#include #include "Framework/runDataProcessing.h" #include "Framework/AnalysisTask.h" @@ -28,6 +29,7 @@ #include "Common/DataModel/TrackSelectionTables.h" #include "Common/DataModel/Multiplicity.h" #include "Common/DataModel/Centrality.h" +#include "Common/DataModel/PIDResponse.h" #include "GFWPowerArray.h" #include "GFW.h" @@ -49,11 +51,7 @@ using namespace o2::analysis; namespace o2::analysis::genericframework { -std::vector ptbinning = { - 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, - 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, - 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, - 2, 2.2, 2.4, 2.6, 2.8, 3, 3.5, 4, 5, 6, 8, 10}; +std::vector ptbinning = {0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.2, 2.4, 2.6, 2.8, 3, 3.5, 4, 5, 6, 8, 10}; float ptpoilow = 0.2, ptpoiup = 10.0; float ptreflow = 0.2, ptrefup = 3.0; float ptlow = 0.2, ptup = 10.0; @@ -81,10 +79,12 @@ struct GenericFramework { O2_DEFINE_CONFIGURABLE(cfgMpar, int, 8, "Highest order of pt-pt correlations") O2_DEFINE_CONFIGURABLE(cfgUseNch, bool, false, "Do correlations as function of Nch") O2_DEFINE_CONFIGURABLE(cfgFillWeights, bool, false, "Fill NUA weights") + O2_DEFINE_CONFIGURABLE(cfgRunByRunWeights, bool, false, "Use run by run NUA corrections") O2_DEFINE_CONFIGURABLE(cfgFillQA, bool, false, "Fill QA histograms") O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, "Use additional event cut on mult correlations") O2_DEFINE_CONFIGURABLE(cfgUseAdditionalTrackCut, bool, false, "Use additional track cut on phi") O2_DEFINE_CONFIGURABLE(cfgUseCentralMoments, bool, true, "Use central moments in vn-pt calculations") + O2_DEFINE_CONFIGURABLE(cfgUsePID, bool, true, "Enable PID information") O2_DEFINE_CONFIGURABLE(cfgUseGapMethod, bool, false, "Use gap method in vn-pt calculations") O2_DEFINE_CONFIGURABLE(cfgEfficiency, std::string, "", "CCDB path to efficiency object") O2_DEFINE_CONFIGURABLE(cfgAcceptance, std::string, "", "CCDB path to acceptance object") @@ -96,6 +96,14 @@ struct GenericFramework { O2_DEFINE_CONFIGURABLE(cfgEta, float, 0.8, "eta cut"); O2_DEFINE_CONFIGURABLE(cfgEtaPtPt, float, 0.4, "eta cut for pt-pt correlations"); O2_DEFINE_CONFIGURABLE(cfgVtxZ, float, 10, "vertex cut (cm)"); + O2_DEFINE_CONFIGURABLE(cfgOccupancySelection, int, -999, "Max occupancy selection, -999 to disable"); + O2_DEFINE_CONFIGURABLE(cfgNoSameBunchPileupCut, bool, true, "kNoSameBunchPileupCut"); + O2_DEFINE_CONFIGURABLE(cfgIsGoodZvtxFT0vsPV, bool, true, "kIsGoodZvtxFT0vsPV"); + O2_DEFINE_CONFIGURABLE(cfgNoCollInTimeRangeStandard, bool, true, "kNoCollInTimeRangeStandard"); + O2_DEFINE_CONFIGURABLE(cfgDoOccupancySel, bool, true, "Bool for event selection on detector occupancy"); + O2_DEFINE_CONFIGURABLE(cfgMultCut, bool, true, "Use additional evenr cut on mult correlations"); + O2_DEFINE_CONFIGURABLE(cfgTVXinTRD, bool, true, "Use kTVXinTRD (reject TRD triggered events)"); + O2_DEFINE_CONFIGURABLE(cfgIsVertexITSTPC, bool, true, "Selects collisions with at least one ITS-TPC track"); O2_DEFINE_CONFIGURABLE(cfgMagField, float, 99999, "Configurable magnetic field; default CCDB will be queried"); Configurable cfgGFWBinning{"cfgGFWBinning", {40, 16, 72, 300, 0, 3000, 0.2, 10.0, 0.2, 3.0, {0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.2, 2.4, 2.6, 2.8, 3, 3.5, 4, 5, 6, 8, 10}, {0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90}}, "Configuration for binning"}; @@ -109,7 +117,7 @@ struct GenericFramework { struct Config { TH1D* mEfficiency = nullptr; - GFWWeights* mAcceptance = nullptr; + std::vector mAcceptance; bool correctionsLoaded = false; } cfg; @@ -117,7 +125,7 @@ struct GenericFramework { OutputObj fFC{FlowContainer("FlowContainer")}; OutputObj fFCpt{FlowPtContainer("FlowPtContainer")}; OutputObj fFC_gen{FlowContainer("FlowContainer_gen")}; - OutputObj fWeights{GFWWeights("weights")}; + OutputObj fWeightList{"WeightList", OutputObjHandlingPolicy::AnalysisObject}; HistogramRegistry registry{"registry"}; // define global variables @@ -125,6 +133,7 @@ struct GenericFramework { std::vector corrconfigs; TRandom3* fRndm = new TRandom3(0); TAxis* fPtAxis; + int lastRun = 0; // Event selection cuts - Alex TF1* fPhiCutLow = nullptr; @@ -195,28 +204,66 @@ struct GenericFramework { int ptbins = ptbinning.size() - 1; fPtAxis = new TAxis(ptbins, &ptbinning[0]); - if (cfgFillWeights) { - fWeights->SetPtBins(ptbins, &ptbinning[0]); - fWeights->Init(true, false); + TList* weightlist = new TList(); + weightlist->SetOwner(true); + fWeightList.setObject(weightlist); + + if (!cfgRunByRunWeights && cfgFillWeights) { + if (cfgUsePID) { + std::vector weights; + std::vector species = {"ref", "ch", "pi", "ka", "pr"}; + for (size_t i = 0; i < species.size(); ++i) { + weights.push_back(new GFWWeights(Form("w_%s", species[i].c_str()))); + if (i == 0) { + auto it = std::find(ptbinning.begin(), ptbinning.end(), ptrefup); + std::vector refpt(ptbinning.begin(), it + 1); + weights[i]->SetPtBins(refpt.size() - 1, &refpt[0]); + } else { + weights[i]->SetPtBins(fPtAxis->GetNbins(), &ptbinning[0]); + } + weights[i]->Init(true, false); + fWeightList->Add(weights[i]); + } + } else { + GFWWeights* weight = new GFWWeights("w_ch"); + weight->SetPtBins(fPtAxis->GetNbins(), &ptbinning[0]); + weight->Init(true, false); + fWeightList->Add(weight); + } } if (doprocessMCGen) { - registry.add("pt_gen", "", {HistType::kTH1D, {ptAxis}}); - registry.add("phi_eta_vtxZ_gen", "", {HistType::kTH3D, {phiAxis, etaAxis, vtxAxis}}); + registry.add("MCGen/before/pt_gen", "", {HistType::kTH1D, {ptAxis}}); + registry.add("MCGen/before/phi_eta_vtxZ_gen", "", {HistType::kTH3D, {phiAxis, etaAxis, vtxAxis}}); + registry.addClone("MCGen/before/", "MCGen/after/"); } if (doprocessMCReco || doprocessData || doprocessRun2) { - registry.add("phi_eta_vtxZ", "", {HistType::kTH3D, {phiAxis, etaAxis, vtxAxis}}); - registry.add("pt_dcaXY_dcaZ", "", {HistType::kTH3D, {ptAxis, dcaXYAXis, dcaZAXis}}); - registry.add("pt_phi_bef", "", {HistType::kTH2D, {ptAxis, phiModAxis}}); - registry.add("pt_phi_aft", "", {HistType::kTH2D, {ptAxis, phiModAxis}}); - registry.add("phi_eta_vtxZ_corrected", "", {HistType::kTH3D, {phiAxis, etaAxis, vtxAxis}}); - registry.add("globalTracks_centT0C", "", {HistType::kTH2D, {centAxis, nchAxis}}); - registry.add("PVTracks_centT0C", "", {HistType::kTH2D, {centAxis, multpvAxis}}); - registry.add("globalTracks_PVTracks", "", {HistType::kTH2D, {multpvAxis, nchAxis}}); - registry.add("globalTracks_multT0A", "", {HistType::kTH2D, {t0aAxis, nchAxis}}); - registry.add("globalTracks_multV0A", "", {HistType::kTH2D, {t0aAxis, nchAxis}}); - registry.add("multV0A_multT0A", "", {HistType::kTH2D, {t0aAxis, t0aAxis}}); - registry.add("multT0C_centT0C", "", {HistType::kTH2D, {centAxis, t0cAxis}}); + registry.add("trackQA/before/phi_eta_vtxZ", "", {HistType::kTH3D, {phiAxis, etaAxis, vtxAxis}}); + registry.add("trackQA/before/pt_dcaXY_dcaZ", "", {HistType::kTH3D, {ptAxis, dcaXYAXis, dcaZAXis}}); + registry.add("trackQA/before/pt_phi", "", {HistType::kTH2D, {ptAxis, phiModAxis}}); + registry.addClone("trackQA/before/", "trackQA/after/"); + registry.add("trackQA/after/pt_ref", "", {HistType::kTH1D, {{100, ptreflow, ptrefup}}}); + registry.add("trackQA/after/pt_poi", "", {HistType::kTH1D, {{100, ptpoilow, ptpoiup}}}); + + registry.add("eventQA/before/globalTracks_centT0C", "", {HistType::kTH2D, {centAxis, nchAxis}}); + registry.add("eventQA/before/PVTracks_centT0C", "", {HistType::kTH2D, {centAxis, multpvAxis}}); + registry.add("eventQA/before/globalTracks_PVTracks", "", {HistType::kTH2D, {multpvAxis, nchAxis}}); + registry.add("eventQA/before/globalTracks_multT0A", "", {HistType::kTH2D, {t0aAxis, nchAxis}}); + registry.add("eventQA/before/globalTracks_multV0A", "", {HistType::kTH2D, {t0aAxis, nchAxis}}); + registry.add("eventQA/before/multV0A_multT0A", "", {HistType::kTH2D, {t0aAxis, t0aAxis}}); + registry.add("eventQA/before/multT0C_centT0C", "", {HistType::kTH2D, {centAxis, t0cAxis}}); + registry.addClone("eventQA/before/", "eventQA/after/"); + registry.add("eventQA/eventSel", "Number of Events;; Counts", {HistType::kTH1D, {{10, 0, 10}}}); + registry.get(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(1, "Filtered event"); + registry.get(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(2, "sel8"); + registry.get(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(3, "occupancy"); + registry.get(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(4, "kTVXinTRD"); + registry.get(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(5, "kNoSameBunchPileup"); + registry.get(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(6, "kIsGoodZvtxFT0vsPV"); + registry.get(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(7, "kNoCollInTimeRangeStandard"); + registry.get(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(8, "kIsVertexITSTPC"); + registry.get(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(9, "after Mult cuts"); + registry.get(HIST("eventQA/eventSel"))->GetXaxis()->SetBinLabel(10, "has track + within cent"); } if (regions.GetSize() < 0) @@ -279,6 +326,13 @@ struct GenericFramework { } } + static constexpr std::string_view moment[] = {"before/", "after/"}; + + enum QAFillTime { + kBefore, + kAfter + }; + void AddConfigObjectsToObjArray(TObjArray* oba, const std::vector& configs) { for (auto it = configs.begin(); it != configs.end(); ++it) { @@ -311,50 +365,173 @@ struct GenericFramework { return grpo->getNominalL3Field(); } - void loadCorrections(uint64_t timestamp) + void loadCorrections(aod::BCsWithTimestamps::iterator const& bc) { - if (cfg.correctionsLoaded) - return; - if (cfgAcceptance.value.empty() == false) { - cfg.mAcceptance = ccdb->getForTimeStamp(cfgAcceptance, timestamp); - if (cfg.mAcceptance) - LOGF(info, "Loaded acceptance weights from %s (%p)", cfgAcceptance.value.c_str(), (void*)cfg.mAcceptance); - else - LOGF(warning, "Could not load acceptance weights from %s (%p)", cfgAcceptance.value.c_str(), (void*)cfg.mAcceptance); + uint64_t timestamp = bc.timestamp(); + int run = bc.runNumber(); + if (cfg.correctionsLoaded) { + if (!cfgRunByRunWeights) + return; + if (run == lastRun) + return; + } + if (cfgUsePID) { + if (cfgAcceptance.value.empty() == false) { + if (cfgRunByRunWeights) { // run-by-run NUA weights from ccdb, stored in TList to hold PID weights + TList* weightlist = ccdb->getForTimeStamp(cfgAcceptance, timestamp); + cfg.mAcceptance.push_back(dynamic_cast(weightlist->FindObject(Form("w%i_ref", run)))); + cfg.mAcceptance.push_back(dynamic_cast(weightlist->FindObject(Form("w%i_ch", run)))); + cfg.mAcceptance.push_back(dynamic_cast(weightlist->FindObject(Form("w%i_pi", run)))); + cfg.mAcceptance.push_back(dynamic_cast(weightlist->FindObject(Form("w%i_ka", run)))); + cfg.mAcceptance.push_back(dynamic_cast(weightlist->FindObject(Form("w%i_pr", run)))); + } else { // run-averaged weights, stored in TList to hold PID weights + TList* weightlist = ccdb->getForTimeStamp(cfgAcceptance, timestamp); + weightlist->ls(); + cfg.mAcceptance.push_back(dynamic_cast(weightlist->FindObject("weights_ref"))); + cfg.mAcceptance.push_back(dynamic_cast(weightlist->FindObject("weights_ch"))); + cfg.mAcceptance.push_back(dynamic_cast(weightlist->FindObject("weights_pi"))); + cfg.mAcceptance.push_back(dynamic_cast(weightlist->FindObject("weights_ka"))); + cfg.mAcceptance.push_back(dynamic_cast(weightlist->FindObject("weights_pr"))); + } + if (!cfg.mAcceptance.empty()) + LOGF(info, "Loaded acceptance weights from %s", cfgAcceptance.value.c_str()); + else + LOGF(warning, "Could not load acceptance weights from %s", cfgAcceptance.value.c_str()); + } + } else { + if (cfgAcceptance.value.empty() == false) { + if (cfgRunByRunWeights) { // run-by-run NUA weights from ccdb, stored in TList + TList* weightlist = ccdb->getForTimeStamp(cfgAcceptance, timestamp); + cfg.mAcceptance.push_back(dynamic_cast(weightlist->FindObject(Form("w%i_ch", run)))); + } else { // run-averaged weights, stored in TList + TList* weightlist = ccdb->getForTimeStamp(cfgAcceptance, timestamp); + cfg.mAcceptance.push_back(dynamic_cast(weightlist->FindObject("w_ch"))); + } + if (!cfg.mAcceptance.empty()) + LOGF(info, "Loaded acceptance weights from %s", cfgAcceptance.value.c_str()); + else + LOGF(warning, "Could not load acceptance weights from %s", cfgAcceptance.value.c_str()); + } } if (cfgEfficiency.value.empty() == false) { cfg.mEfficiency = ccdb->getForTimeStamp(cfgEfficiency, timestamp); if (cfg.mEfficiency == nullptr) { - LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgEfficiency.value.c_str()); + LOGF(fatal, "Could not load efficiency histogram from %s", cfgEfficiency.value.c_str()); } LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), (void*)cfg.mEfficiency); } cfg.correctionsLoaded = true; } - bool setCurrentParticleWeights(float& weight_nue, float& weight_nua, const float& phi, const float& eta, const float& pt, const float& vtxz) - { - float eff = 1.; + template + double getAcceptance(TTrack track, const double& vtxz, int index) + { //-1 ref, 0 ch, 1 pi, 2 ka, 3 pr + double wacc = 1; + index += 1; + if (!cfg.mAcceptance.empty()) { + if (cfgUsePID) { + wacc = cfg.mAcceptance[index]->GetNUA(track.phi(), track.eta(), vtxz); + } else { + wacc = cfg.mAcceptance[0]->GetNUA(track.phi(), track.eta(), vtxz); + } + } + return wacc; + } + + template + double getEfficiency(TTrack track) + { //-1 ref, 0 ch, 1 pi, 2 ka, 3 pr + double eff = 1.; if (cfg.mEfficiency) - eff = cfg.mEfficiency->GetBinContent(cfg.mEfficiency->FindBin(pt)); - else - eff = 1.0; + eff = cfg.mEfficiency->GetBinContent(cfg.mEfficiency->FindBin(track.pt())); if (eff == 0) - return false; - weight_nue = 1. / eff; - if (cfg.mAcceptance) - weight_nua = cfg.mAcceptance->GetNUA(phi, eta, vtxz); + return -1.; else - weight_nua = 1; - return true; + return 1. / eff; + } + // Obsolete for now untill service wagons get added + /* template + int getBayesPIDIndex(TTrack track) { + float maxProb[3] = {0.95,0.85,0.85}; + int pidID = 0; + if(track.bayesID()==o2::track::PID::Pion || track.bayesID()==o2::track::PID::Kaon || track.bayesID()==o2::track::PID::Proton){ + pidID = track.bayesID()-1; //Realign + float nsigmaTPC[3] = {track.tpcNSigmaPi(),track.tpcNSigmaKa(),track.tpcNSigmaPr()}; + float nsigmaTOF[3] = {track.tofNSigmaPi(),track.tofNSigmaKa(),track.tofNSigmaPr()}; + if(track.bayesProb() > maxProb[pidID-1]) { + if(abs(nsigmaTPC[pidID-1]) > 3) return 0; + if(abs(nsigmaTOF[pidID-1]) > 3) return 0; + return pidID; + } + else return 0; + } + return 0; + } */ + + template + int GetNsigmaPID(TTrack track) + { + // Computing Nsigma arrays for pion, kaon, and protons + std::array nSigmaTPC = {track.tpcNSigmaPi(), track.tpcNSigmaKa(), track.tpcNSigmaPr()}; + std::array nSigmaCombined = {std::hypot(track.tpcNSigmaPi(), track.tofNSigmaPi()), std::hypot(track.tpcNSigmaKa(), track.tofNSigmaKa()), std::hypot(track.tpcNSigmaPr(), track.tofNSigmaPr())}; + int pid = -1; + float nsigma = 3.0; + + // Choose which nSigma to use + std::array nSigmaToUse = (track.pt() > 0.4 && track.hasTOF()) ? nSigmaCombined : nSigmaTPC; + + // Select particle with the lowest nsigma + for (int i = 0; i < 3; ++i) { + if (std::abs(nSigmaToUse[i]) < nsigma) { + pid = i; + nsigma = std::abs(nSigmaToUse[i]); + } + } + return pid + 1; // shift the pid by 1, 1 = pion, 2 = kaon, 3 = proton } template bool eventSelected(TCollision collision, const int& multTrk, const float& centrality) { - if (collision.alias_bit(kTVXinTRD)) { - // TRD triggered - return 0; + if (cfgTVXinTRD) { + if (collision.alias_bit(kTVXinTRD)) { + // TRD triggered + // "CMTVX-B-NOPF-TRD,minbias_TVX" + return 0; + } + registry.fill(HIST("eventQA/eventSel"), 3.5); + } + + if (cfgNoSameBunchPileupCut) { + if (!collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { + // rejects collisions which are associated with the same "found-by-T0" bunch crossing + // https://indico.cern.ch/event/1396220/#1-event-selection-with-its-rof + return 0; + } + registry.fill(HIST("eventQA/eventSel"), 4.5); + } + if (cfgIsGoodZvtxFT0vsPV) { + if (!collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + // removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference + // use this cut at low multiplicities with caution + return 0; + } + registry.fill(HIST("eventQA/eventSel"), 5.5); + } + if (cfgNoCollInTimeRangeStandard) { + if (!collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + // Rejection of the collisions which have other events nearby + return 0; + } + registry.fill(HIST("eventQA/eventSel"), 6.5); + } + + if (cfgIsVertexITSTPC) { + if (!collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) { + // selects collisions with at least one ITS-TPC track, and thus rejects vertices built from ITS-only tracks + return 0; + } + registry.fill(HIST("eventQA/eventSel"), 7.5); } float vtxz = -999; if (collision.numContrib() > 1) { @@ -378,7 +555,7 @@ struct GenericFramework { return 0; if (multTrk > fMultCutHigh->Eval(centrality)) return 0; - + registry.fill(HIST("eventQA/eventSel"), 8.5); /* 22s if (multNTracksPV < fMultPVCutLow->Eval(centrality)) return 0; @@ -407,10 +584,12 @@ struct GenericFramework { phimodn += TMath::Pi() / 18.0; // to center gap in the middle phimodn = fmod(phimodn, TMath::Pi() / 9.0); - registry.fill(HIST("pt_phi_bef"), track.pt(), phimodn); + if (cfgFillQA) + registry.fill(HIST("trackQA/before/pt_phi"), track.pt(), phimodn); if (phimodn < fPhiCutHigh->Eval(track.pt()) && phimodn > fPhiCutLow->Eval(track.pt())) return false; // reject track - registry.fill(HIST("pt_phi_aft"), track.pt(), phimodn); + if (cfgFillQA) + registry.fill(HIST("trackQA/after/pt_phi"), track.pt(), phimodn); return true; } @@ -419,6 +598,62 @@ struct GenericFramework { kGen }; + template + void FillWeights(const TTrack track, const double vtxz, const double multcent, int pid_index) + { + if (cfgUsePID) { + std::vector species = {"ref", "ch", "pi", "ka", "pr"}; + double ptpidmins[] = {ptpoilow, ptpoilow, 0.3, 0.5}; // min pt for ch, pi, ka, pr + double ptpidmaxs[] = {ptpoiup, ptpoiup, 6.0, 6.0}; // max pt for ch, pi, ka, pr + bool withinPtPOI = (ptpidmins[pid_index] < track.pt()) && (track.pt() < ptpidmaxs[pid_index]); // within POI pT range + bool withinPtRef = (ptreflow < track.pt()) && (track.pt() < ptrefup); // within RF pT range + if (cfgRunByRunWeights) { + if (withinPtRef && !pid_index) + dynamic_cast(fWeightList->FindObject(Form("w%i_%s", lastRun, species[pid_index].c_str())))->Fill(track.phi(), track.eta(), vtxz, track.pt(), multcent, 0); // pt-subset of charged particles for ref flow + if (withinPtPOI) + dynamic_cast(fWeightList->FindObject(Form("w%i_%s", lastRun, species[pid_index + 1].c_str())))->Fill(track.phi(), track.eta(), vtxz, track.pt(), multcent, 0); // charged and id'ed particle weights + } else { + if (withinPtRef && !pid_index) + dynamic_cast(fWeightList->FindObject(Form("w_%s", species[pid_index].c_str())))->Fill(track.phi(), track.eta(), vtxz, track.pt(), multcent, 0); // pt-subset of charged particles for ref flow + if (withinPtPOI) + dynamic_cast(fWeightList->FindObject(Form("w_%s", species[pid_index + 1].c_str())))->Fill(track.phi(), track.eta(), vtxz, track.pt(), multcent, 0); // charged and id'ed particle weights + } + } else { + if (cfgRunByRunWeights) + dynamic_cast(fWeightList->FindObject(Form("w%i_ch", lastRun)))->Fill(track.phi(), track.eta(), vtxz, track.pt(), multcent, 0); + else + dynamic_cast(fWeightList->FindObject("w_ch"))->Fill(track.phi(), track.eta(), vtxz, track.pt(), multcent, 0); + } + return; + } + + void CreateRunByRunWeights() + { + if (cfgUsePID) { + std::vector weights; + std::vector species = {"ref", "ch", "pi", "ka", "pr"}; + for (size_t i = 0; i < species.size(); ++i) { + weights.push_back(new GFWWeights(Form("w%i_%s", lastRun, species[i].c_str()))); + if (i == 0) { + auto it = std::find(ptbinning.begin(), ptbinning.end(), ptrefup); + std::vector refpt(ptbinning.begin(), it + 1); + weights[i]->SetPtBins(refpt.size() - 1, &refpt[0]); + } else { + weights[i]->SetPtBins(fPtAxis->GetNbins(), &ptbinning[0]); + } + weights[i]->Init(true, false); + fWeightList->Add(weights[i]); + } + } else { + GFWWeights* weight = new GFWWeights(Form("w%i_ch", lastRun)); + weight->SetPtBins(fPtAxis->GetNbins(), &ptbinning[0]); + weight->Init(true, false); + fWeightList->Add(weight); + } + + return; + } + template void FillOutputContainers(const float& centmult, const double& rndm) { @@ -428,10 +663,10 @@ struct GenericFramework { if (!cfgUseGapMethod) fFCpt->FillVnPtStdProfiles(centmult, rndm); for (uint l_ind = 0; l_ind < corrconfigs.size(); ++l_ind) { - auto dnx = fGFW->Calculate(corrconfigs.at(l_ind), 0, kTRUE).real(); - if (dnx == 0) - continue; if (!corrconfigs.at(l_ind).pTDif) { + auto dnx = fGFW->Calculate(corrconfigs.at(l_ind), 0, kTRUE).real(); + if (dnx == 0) + continue; auto val = fGFW->Calculate(corrconfigs.at(l_ind), 0, kFALSE).real() / dnx; if (TMath::Abs(val) < 1) { (dt == kGen) ? fFC_gen->FillProfile(corrconfigs.at(l_ind).Head.c_str(), centmult, val, dnx, rndm) : fFC->FillProfile(corrconfigs.at(l_ind).Head.c_str(), centmult, val, dnx, rndm); @@ -441,7 +676,7 @@ struct GenericFramework { continue; } for (Int_t i = 1; i <= fPtAxis->GetNbins(); i++) { - dnx = fGFW->Calculate(corrconfigs.at(l_ind), i - 1, kTRUE).real(); + auto dnx = fGFW->Calculate(corrconfigs.at(l_ind), i - 1, kTRUE).real(); if (dnx == 0) continue; auto val = fGFW->Calculate(corrconfigs.at(l_ind), i - 1, kFALSE).real() / dnx; @@ -459,6 +694,7 @@ struct GenericFramework { return; if (centrality < centbinning.front() || centrality > centbinning.back()) return; + registry.fill(HIST("eventQA/eventSel"), 9.5); float vtxz = collision.posZ(); fGFW->Clear(); fFCpt->ClearVector(); @@ -467,126 +703,216 @@ struct GenericFramework { for (auto& track : tracks) { ProcessTrack(track, centrality, vtxz, field); } - FillOutputContainers
((cfgUseNch) ? tracks.size() : centrality, l_Random); + if (!cfgFillWeights) + FillOutputContainers
((cfgUseNch) ? tracks.size() : centrality, l_Random); } - template - inline void ProcessTrack(TrackObject const& track, const float& centrality, const float& vtxz, const int& field) + template + inline void ProcessTrack(TTrack const& track, const float& centrality, const float& vtxz, const int& field) { - float weff = 1, wacc = 1; - if constexpr (framework::has_type_v) { + if constexpr (framework::has_type_v) { if (track.mcParticleId() < 0 || !(track.has_mcParticle())) return; auto mcParticle = track.mcParticle(); - if (!mcParticle.isPhysicalPrimary() || mcParticle.eta() < etalow || mcParticle.eta() > etaup || mcParticle.pt() < ptlow || mcParticle.pt() > ptup || track.tpcNClsFound() < cfgNcls) + if (!mcParticle.isPhysicalPrimary()) + return; + if (cfgFillQA) + FillTrackQA(track, vtxz); + + if (mcParticle.eta() < etalow || mcParticle.eta() > etaup || mcParticle.pt() < ptlow || mcParticle.pt() > ptup || track.tpcNClsFound() < cfgNcls) return; if (cfgUseAdditionalTrackCut && !trackSelected(track, field)) return; - if (cfgFillWeights) - fWeights->Fill(mcParticle.phi(), mcParticle.eta(), vtxz, mcParticle.pt(), centrality, 0); + int pid_index = 0; + if (cfgUsePID) { + if (mcParticle.pdgCode() == 211) + pid_index = 1; + if (mcParticle.pdgCode() == 321) + pid_index = 2; + if (mcParticle.pdgCode() == 2212) + pid_index = 3; + } - if (!setCurrentParticleWeights(weff, wacc, mcParticle.phi(), mcParticle.eta(), mcParticle.pt(), vtxz)) - return; + if (cfgFillWeights) { + FillWeights(mcParticle, vtxz, centrality, 0); + } else { + FillPtSums(track, vtxz); + FillGFW(mcParticle, vtxz, pid_index); + } - registry.fill(HIST("phi_eta_vtxZ_corrected"), mcParticle.phi(), mcParticle.eta(), vtxz, wacc); if (cfgFillQA) - FillTrackQA(track, vtxz); + FillTrackQA(track, vtxz); - FillGFW(mcParticle, weff, wacc); - } else if constexpr (framework::has_type_v) { - if (!track.isPhysicalPrimary() || track.eta() < etalow || track.eta() > etaup || track.pt() < ptlow || track.pt() > ptup) + } else if constexpr (framework::has_type_v) { + if (!track.isPhysicalPrimary()) return; - if (cfgFillQA) - FillTrackQA(track, vtxz); + FillTrackQA(track, vtxz); + + if (track.eta() < etalow || track.eta() > etaup || track.pt() < ptlow || track.pt() > ptup) + return; - FillGFW(track, 1., 1.); + int pid_index = 0; + if (cfgUsePID) { + if (track.pdgCode() == 211) + pid_index = 1; + if (track.pdgCode() == 321) + pid_index = 2; + if (track.pdgCode() == 2212) + pid_index = 3; + } + + FillPtSums(track, vtxz); + FillGFW(track, vtxz, pid_index); + + if (cfgFillQA) + FillTrackQA(track, vtxz); } else { + if (cfgFillQA) + FillTrackQA(track, vtxz); if (track.tpcNClsFound() < cfgNcls) return; if (cfgUseAdditionalTrackCut && !trackSelected(track, field)) return; - if (cfgFillWeights) - fWeights->Fill(track.phi(), track.eta(), vtxz, track.pt(), centrality, 0); - - if (!setCurrentParticleWeights(weff, wacc, track.phi(), track.eta(), track.pt(), vtxz)) - return; - - registry.fill(HIST("phi_eta_vtxZ_corrected"), track.phi(), track.eta(), vtxz, wacc); + int pid_index = 0; + if (cfgUsePID) { + // pid_index = getBayesPIDIndex(track); + pid_index = GetNsigmaPID(track); + } + if (cfgFillWeights) { + FillWeights(track, vtxz, centrality, pid_index); + } else { + FillPtSums(track, vtxz); + FillGFW(track, vtxz, pid_index); + } if (cfgFillQA) - FillTrackQA(track, vtxz); - - FillGFW(track, weff, wacc); + FillTrackQA(track, vtxz); } } - template - inline void FillGFW(TrackObject track, float weff, float wacc) + template + inline void FillPtSums(TTrack track, const double& vtxz) { - if (fabs(track.eta()) < cfgEtaPtPt) + double wacc = (dt == kGen) ? 1. : getAcceptance(track, vtxz, -1); + double weff = (dt == kGen) ? 1. : getEfficiency(track); + if (weff < 0) + return; + if (fabs(track.eta()) < cfgEtaPtPt) { fFCpt->Fill(weff, track.pt()); - std::complex q2p = {weff * wacc * cos(2 * track.phi()), weff * wacc * sin(2 * track.phi())}; - std::complex q2n = {weff * wacc * cos(-2 * track.phi()), weff * wacc * sin(-2 * track.phi())}; + } if (!cfgUseGapMethod) { + std::complex q2p = {weff * wacc * cos(2 * track.phi()), weff * wacc * sin(2 * track.phi())}; + std::complex q2n = {weff * wacc * cos(-2 * track.phi()), weff * wacc * sin(-2 * track.phi())}; fFCpt->FillArray(q2p, q2n, weff * track.pt(), weff); fFCpt->FillArray(weff * wacc, weff * wacc, weff, weff); } - bool WithinPtPOI = (ptpoilow < track.pt()) && (track.pt() < ptpoiup); // within POI pT range - bool WithinPtRef = (ptreflow < track.pt()) && (track.pt() < ptrefup); // within RF pT range - if (WithinPtRef) + } + + template + inline void FillGFW(TTrack track, const double& vtxz, int pid_index) + { + if (cfgUsePID) { // Analysing POI flow with id'ed particles + double ptmins[] = {ptpoilow, ptpoilow, 0.3, 0.5}; + double ptmaxs[] = {ptpoiup, ptpoiup, 6.0, 6.0}; + bool WithinPtRef = (track.pt() > ptreflow && track.pt() < ptrefup); + bool WithinPtPOI = (track.pt() > ptmins[pid_index] && track.pt() < ptmaxs[pid_index]); + bool WithinPtNch = (track.pt() > ptmins[0] && track.pt() < ptmaxs[0]); + if (!WithinPtPOI && !WithinPtRef) + return; + double wacc_ref = (dt == kGen) ? 1. : getAcceptance(track, vtxz, -1); + double wacc_poi = (dt == kGen) ? 1. : WithinPtPOI ? getAcceptance(track, vtxz, pid_index) + : getAcceptance(track, vtxz, 0); // + if (WithinPtRef && WithinPtPOI && pid_index) + wacc_ref = wacc_poi; // if particle is both (then it's overlap), override ref with POI + if (WithinPtRef) + fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc_ref, 1); + if (WithinPtPOI && pid_index) + fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc_poi, (1 << (pid_index + 1))); + if (WithinPtNch) + fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc_poi, 2); + if (WithinPtPOI && WithinPtRef && pid_index) + fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc_poi, (1 << (pid_index + 5))); + if (WithinPtNch && WithinPtRef) + fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc_poi, 32); + } else { // Analysing only integrated flow + double weff = (dt == kGen) ? 1. : getEfficiency(track); + if (weff < 0) + return; + double wacc = (dt == kGen) ? 1. : getAcceptance(track, vtxz, -1); fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), weff * wacc, 1); - if (WithinPtPOI) - fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), weff * wacc, 2); - if (WithinPtPOI && WithinPtRef) - fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), weff * wacc, 4); + } return; } - template - inline void FillTrackQA(TrackObject track, const float vtxz) + template + inline void FillTrackQA(TTrack track, const float vtxz) { if constexpr (dt == kGen) { - registry.fill(HIST("phi_eta_vtxZ_gen"), track.phi(), track.eta(), vtxz); - registry.fill(HIST("pt_gen"), track.pt()); + registry.fill(HIST("MCGen/") + HIST(moment[ft]) + HIST("phi_eta_vtxZ_gen"), track.phi(), track.eta(), vtxz); + registry.fill(HIST("MCGen/") + HIST(moment[ft]) + HIST("pt_gen"), track.pt()); } else { - registry.fill(HIST("phi_eta_vtxZ"), track.phi(), track.eta(), vtxz); - registry.fill(HIST("pt_dcaXY_dcaZ"), track.pt(), track.dcaXY(), track.dcaZ()); + double wacc = getAcceptance(track, vtxz, -1); + registry.fill(HIST("trackQA/") + HIST(moment[ft]) + HIST("phi_eta_vtxZ"), track.phi(), track.eta(), vtxz, wacc); + registry.fill(HIST("trackQA/") + HIST(moment[ft]) + HIST("pt_dcaXY_dcaZ"), track.pt(), track.dcaXY(), track.dcaZ()); + if (ft == kAfter) { + registry.fill(HIST("trackQA/") + HIST(moment[ft]) + HIST("pt_ref"), track.pt()); + registry.fill(HIST("trackQA/") + HIST(moment[ft]) + HIST("pt_poi"), track.pt()); + } } } - template + template inline void FillEventQA(CollisionObject collision, TracksObject tracks) { - registry.fill(HIST("globalTracks_centT0C"), collision.centFT0C(), tracks.size()); - registry.fill(HIST("PVTracks_centT0C"), collision.centFT0C(), collision.multNTracksPV()); - registry.fill(HIST("globalTracks_PVTracks"), collision.multNTracksPV(), tracks.size()); - registry.fill(HIST("globalTracks_multT0A"), collision.multFT0A(), tracks.size()); - registry.fill(HIST("globalTracks_multV0A"), collision.multFV0A(), tracks.size()); - registry.fill(HIST("multV0A_multT0A"), collision.multFT0A(), collision.multFV0A()); - registry.fill(HIST("multT0C_centT0C"), collision.centFT0C(), collision.multFT0C()); + registry.fill(HIST("eventQA/") + HIST(moment[ft]) + HIST("globalTracks_centT0C"), collision.centFT0C(), tracks.size()); + registry.fill(HIST("eventQA/") + HIST(moment[ft]) + HIST("PVTracks_centT0C"), collision.centFT0C(), collision.multNTracksPV()); + registry.fill(HIST("eventQA/") + HIST(moment[ft]) + HIST("globalTracks_PVTracks"), collision.multNTracksPV(), tracks.size()); + registry.fill(HIST("eventQA/") + HIST(moment[ft]) + HIST("globalTracks_multT0A"), collision.multFT0A(), tracks.size()); + registry.fill(HIST("eventQA/") + HIST(moment[ft]) + HIST("globalTracks_multV0A"), collision.multFV0A(), tracks.size()); + registry.fill(HIST("eventQA/") + HIST(moment[ft]) + HIST("multV0A_multT0A"), collision.multFT0A(), collision.multFV0A()); + registry.fill(HIST("eventQA/") + HIST(moment[ft]) + HIST("multT0C_centT0C"), collision.centFT0C(), collision.multFT0C()); return; } 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; - using myTracks = soa::Filtered>; + using myTracks = soa::Filtered>; void processData(soa::Filtered>::iterator const& collision, aod::BCsWithTimestamps const&, myTracks const& tracks) { + auto bc = collision.bc_as(); + int run = bc.runNumber(); + if (run != lastRun) { + lastRun = run; + if (cfgFillWeights && cfgRunByRunWeights) + CreateRunByRunWeights(); + } + registry.fill(HIST("eventQA/eventSel"), 0.5); if (!collision.sel8()) return; + registry.fill(HIST("eventQA/eventSel"), 1.5); + + if (cfgOccupancySelection != -999) { + int occupancy = collision.trackOccupancyInTimeRange(); + if (occupancy < 0 || occupancy > cfgOccupancySelection) + return; + } + registry.fill(HIST("eventQA/eventSel"), 2.5); const auto centrality = collision.centFT0C(); - auto bc = collision.bc_as(); + + if (cfgFillQA) + FillEventQA(collision, tracks); if (cfgUseAdditionalEventCut && !eventSelected(collision, tracks.size(), centrality)) return; if (cfgFillQA) - FillEventQA(collision, tracks); - loadCorrections(bc.timestamp()); + FillEventQA(collision, tracks); + if (!cfgFillWeights) + loadCorrections(bc); auto field = (cfgMagField == 99999) ? getMagneticField(bc.timestamp()) : cfgMagField; processCollision(collision, tracks, centrality, field); } @@ -594,15 +920,25 @@ struct GenericFramework { void processMCReco(soa::Filtered>::iterator const& collision, aod::BCsWithTimestamps const&, soa::Filtered> const& tracks, aod::McParticles const&) { + auto bc = collision.bc_as(); + int run = bc.runNumber(); + if (run != lastRun) { + lastRun = run; + if (cfgFillWeights && cfgRunByRunWeights) + CreateRunByRunWeights(); + } if (!collision.sel8()) return; const auto centrality = collision.centFT0C(); - auto bc = collision.bc_as(); + if (cfgFillQA) + FillEventQA(collision, tracks); if (cfgUseAdditionalEventCut && !eventSelected(collision, tracks.size(), centrality)) return; if (cfgFillQA) - FillEventQA(collision, tracks); - loadCorrections(bc.timestamp()); + FillEventQA(collision, tracks); + + if (!cfgFillWeights) + loadCorrections(bc); auto field = (cfgMagField == 99999) ? getMagneticField(bc.timestamp()) : cfgMagField; processCollision(collision, tracks, centrality, field); } @@ -627,7 +963,7 @@ struct GenericFramework { return; const auto centrality = collision.centRun2V0M(); auto bc = collision.bc_as(); - loadCorrections(bc.timestamp()); + loadCorrections(bc); auto field = (cfgMagField == 99999) ? getMagneticField(bc.timestamp()) : cfgMagField; processCollision(collision, tracks, centrality, field); } From d2a9ead9b681f2b64f859fe36007d9163461d5ff Mon Sep 17 00:00:00 2001 From: JStaa <39123272+JStaa@users.noreply.github.com> Date: Wed, 11 Dec 2024 23:12:46 +0100 Subject: [PATCH 08/19] [PWGCF] Added the full TOF NSigma distribution to the Track QA (#8945) Co-authored-by: ALICE Action Bot --- .../Tasks/ThreeParticleCorrelations.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/PWGCF/MultiparticleCorrelations/Tasks/ThreeParticleCorrelations.cxx b/PWGCF/MultiparticleCorrelations/Tasks/ThreeParticleCorrelations.cxx index fdb4ff9dcca..800ec9fc3b2 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/ThreeParticleCorrelations.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/ThreeParticleCorrelations.cxx @@ -59,7 +59,7 @@ struct ThreePartCorr { using MyFilteredV0s = soa::Filtered; using MyFilteredTracks = soa::Filtered>; + aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr, aod::pidTOFbeta>>; // Table aliases - MC using MyFilteredMCGenCollision = soa::Filtered::iterator; @@ -130,6 +130,10 @@ struct ThreePartCorr { QARegistry.add("hNSigmaKaon", "hNSigmaKaon", {HistType::kTH2D, {{201, -5.025, 5.025}, {201, -5.025, 5.025}}}); QARegistry.add("hNSigmaProton", "hNSigmaProton", {HistType::kTH2D, {{201, -5.025, 5.025}, {201, -5.025, 5.025}}}); + QARegistry.add("hTOFPion", "hTOFPion", {HistType::kTH2D, {{TrackPtAxis}, {1000, -50, 50}}}); + QARegistry.add("hTOFKaon", "hTOFKaon", {HistType::kTH2D, {{TrackPtAxis}, {1000, -50, 50}}}); + QARegistry.add("hTOFProton", "hTOFProton", {HistType::kTH2D, {{TrackPtAxis}, {1000, -50, 50}}}); + QARegistry.add("hInvMassLambda", "hInvMassLambda", {HistType::kTH3D, {{LambdaInvMassAxis}, {V0PtAxis}, {CentralityAxis}}}); QARegistry.add("hInvMassAntiLambda", "hInvMassAntiLambda", {HistType::kTH3D, {{LambdaInvMassAxis}, {V0PtAxis}, {CentralityAxis}}}); @@ -199,6 +203,12 @@ struct ThreePartCorr { // Start of the Track QA for (const auto& track : tracks) { + if (track.hasTOF()) { + QARegistry.fill(HIST("hTOFPion"), track.pt(), track.tofNSigmaPi()); + QARegistry.fill(HIST("hTOFKaon"), track.pt(), track.tofNSigmaKa()); + QARegistry.fill(HIST("hTOFProton"), track.pt(), track.tofNSigmaPr()); + } + A_PID = TrackPID(track); if (A_PID[1] < 4.0) { QARegistry.fill(HIST("hTrackPt"), track.pt()); From 49d7c3a4133f4ed572544afe3943c499eb061b6f Mon Sep 17 00:00:00 2001 From: skundu692 <86804743+skundu692@users.noreply.github.com> Date: Wed, 11 Dec 2024 23:14:27 +0100 Subject: [PATCH 09/19] [PWGLF] Add rotation background for f1-p correlation + correction term in resonance flow + modified table producer entry for f1-p analysis (#8947) --- .../Resonances/f1protonreducedtable.cxx | 59 +++---- .../Tasks/Resonances/f1protoncorrelation.cxx | 145 ++++++++---------- PWGLF/Tasks/Resonances/phipbpb.cxx | 5 + 3 files changed, 99 insertions(+), 110 deletions(-) diff --git a/PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx b/PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx index 87fcc6ab1d5..50eb1ba4ffd 100644 --- a/PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx +++ b/PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx @@ -513,19 +513,19 @@ struct f1protonreducedtable { std::vector PionCharge = {}; std::vector KaonCharge = {}; std::vector ProtonCharge = {}; - std::vector ProtonChargeFinal = {}; + // std::vector ProtonChargeFinal = {}; // keep TPC PID of proton std::vector ProtonTPCNsigma = {}; - std::vector ProtonTPCNsigmaFinal = {}; + // std::vector ProtonTPCNsigmaFinal = {}; // keep TOF PID of proton std::vector ProtonTOFNsigma = {}; - std::vector ProtonTOFNsigmaFinal = {}; + // std::vector ProtonTOFNsigmaFinal = {}; // keep TOF Hit of proton std::vector ProtonTOFHit = {}; - std::vector ProtonTOFHitFinal = {}; + // std::vector ProtonTOFHitFinal = {}; // keep TOF Hit of pion std::vector PionTOFHit = {}; @@ -542,7 +542,8 @@ struct f1protonreducedtable { std::vector f1signal = {}; // Prepare vectors for different species - std::vector protons, kaons, pions, kshorts, f1resonance, f1resonanced1, f1resonanced2, f1resonanced3, protonsfinal; + std::vector protons, kaons, pions, kshorts, f1resonance, f1resonanced1, f1resonanced2, f1resonanced3; + // , protonsfinal; float kstar = 999.f; currentRunNumber = collision.bc_as().runNumber(); @@ -577,8 +578,8 @@ struct f1protonreducedtable { zorroSelected = true; } if (zorroSelected) { + hProcessedEvents->Fill(1.5); for (auto& track : tracks) { - hProcessedEvents->Fill(1.5); if (!isSelectedTrack(track)) continue; qaRegistry.fill(HIST("hDCAxy"), track.dcaXY()); @@ -746,22 +747,14 @@ struct f1protonreducedtable { numberF1 = numberF1 + 1; for (auto iproton = protons.begin(); iproton != protons.end(); ++iproton) { auto i4 = std::distance(protons.begin(), iproton); - ProtonVectorDummy = protons.at(i4); - if (numberF1 == 1) { - //////////// Fill final proton information after pairing////////// - ROOT::Math::PtEtaPhiMVector temp(ProtonVectorDummy.Pt(), ProtonVectorDummy.Eta(), ProtonVectorDummy.Phi(), massPr); - protonsfinal.push_back(temp); // 4 vector - ProtonChargeFinal.push_back(ProtonCharge.at(i4)); // Charge - ProtonTOFHitFinal.push_back(ProtonTOFHit.at(i4)); // TOF Hit - ProtonTOFNsigmaFinal.push_back(ProtonTOFNsigma.at(i4)); // Nsigma TOF - ProtonTPCNsigmaFinal.push_back(ProtonTPCNsigma.at(i4)); // Nsigma TPC - F1ProtonIndex.push_back(ProtonIndex.at(i4)); // proton index for share track - } - - if ((ProtonIndex.at(i4) == PionIndex.at(i1)) || (ProtonIndex.at(i4) == KaonIndex.at(i2)) || (ProtonIndex.at(i4) == KshortPosDaughIndex.at(i3)) || (ProtonIndex.at(i4) == KshortNegDaughIndex.at(i3))) { + if (ProtonIndex.at(i4) == PionIndex.at(i1)) + continue; + if (ProtonIndex.at(i4) == KaonIndex.at(i2)) + continue; + if (ProtonIndex.at(i4) == KshortPosDaughIndex.at(i3)) + continue; + if (ProtonIndex.at(i4) == KshortNegDaughIndex.at(i3)) continue; - } - kstar = getkstar(F1Vector, *iproton); qaRegistry.fill(HIST("hkstarDist"), kstar); if (kstar > cMaxRelMom) { @@ -769,8 +762,19 @@ struct f1protonreducedtable { } qaRegistry.fill(HIST("hInvMassf1kstar"), F1Vector.M(), F1Vector.Pt(), kstar); keepEventF1Proton = true; + /*ProtonVectorDummy = protons.at(i4); + if (numberF1 == 1 && keepEventF1Proton) { + //////////// Fill final proton information after pairing////////// + ROOT::Math::PtEtaPhiMVector temp(ProtonVectorDummy.Pt(), ProtonVectorDummy.Eta(), ProtonVectorDummy.Phi(), massPr); + protonsfinal.push_back(temp); // 4 vector + ProtonChargeFinal.push_back(ProtonCharge.at(i4)); // Charge + ProtonTOFHitFinal.push_back(ProtonTOFHit.at(i4)); // TOF Hit + ProtonTOFNsigmaFinal.push_back(ProtonTOFNsigma.at(i4)); // Nsigma TOF + ProtonTPCNsigmaFinal.push_back(ProtonTPCNsigma.at(i4)); // Nsigma TPC + F1ProtonIndex.push_back(ProtonIndex.at(i4)); // proton index for share track + }*/ } - } + } // pair sign } } } @@ -782,7 +786,8 @@ struct f1protonreducedtable { qaRegistry.fill(HIST("hEventstat"), 1.5); if (keepEventF1Proton) { qaRegistry.fill(HIST("hEventstat"), 2.5); - auto eventspherocity = ComputeSpherocity(tracks, trackSphMin, trackSphDef); + auto eventspherocity = 0.0; + // ComputeSpherocity(tracks, trackSphMin, trackSphDef); /////////// Fill collision table/////////////// redf1pevents(bc.globalBC(), currentRunNumber, bc.timestamp(), collision.posZ(), collision.numContrib(), eventspherocity); auto indexEvent = redf1pevents.lastIndex(); @@ -796,10 +801,10 @@ struct f1protonreducedtable { f1track(indexEvent, f1signal.at(i5), F1VectorDummy.Px(), F1VectorDummy.Py(), F1VectorDummy.Pz(), F1d1dummy.Px(), F1d1dummy.Py(), F1d1dummy.Pz(), F1d2dummy.Px(), F1d2dummy.Py(), F1d2dummy.Pz(), F1d3dummy.Px(), F1d3dummy.Py(), F1d3dummy.Pz(), PionTOFHitFinal.at(i5), KaonTOFHitFinal.at(i5), F1VectorDummy.M(), f1kaonkshortmass.at(i5), F1PionIndex.at(i5), F1KaonIndex.at(i5), F1KshortDaughterPositiveIndex.at(i5), F1KshortDaughterNegativeIndex.at(i5)); } //// Fill track table for proton////////////////// - for (auto iproton = protonsfinal.begin(); iproton != protonsfinal.end(); ++iproton) { - auto i6 = std::distance(protonsfinal.begin(), iproton); - ProtonVectorDummy2 = protonsfinal.at(i6); - protontrack(indexEvent, ProtonChargeFinal.at(i6), ProtonVectorDummy2.Px(), ProtonVectorDummy2.Py(), ProtonVectorDummy2.Pz(), ProtonTPCNsigmaFinal.at(i6), ProtonTOFHitFinal.at(i6), ProtonTOFNsigmaFinal.at(i6), F1ProtonIndex.at(i6)); + for (auto iproton = protons.begin(); iproton != protons.end(); ++iproton) { + auto i6 = std::distance(protons.begin(), iproton); + ProtonVectorDummy2 = protons.at(i6); + protontrack(indexEvent, ProtonCharge.at(i6), ProtonVectorDummy2.Px(), ProtonVectorDummy2.Py(), ProtonVectorDummy2.Pz(), ProtonTPCNsigma.at(i6), ProtonTOFHit.at(i6), ProtonTOFNsigma.at(i6), ProtonIndex.at(i6)); } } } diff --git a/PWGLF/Tasks/Resonances/f1protoncorrelation.cxx b/PWGLF/Tasks/Resonances/f1protoncorrelation.cxx index 012d5e638a4..31d72363498 100644 --- a/PWGLF/Tasks/Resonances/f1protoncorrelation.cxx +++ b/PWGLF/Tasks/Resonances/f1protoncorrelation.cxx @@ -40,8 +40,10 @@ struct f1protoncorrelation { Configurable nsigmaCutTPC{"nsigmacutTPC", 3.0, "Value of the TPC Nsigma cut"}; Configurable nsigmaCutCombined{"nsigmaCutCombined", 3.0, "Value of the TOF Nsigma cut"}; // PID selection + Configurable fillRotation{"fillRotation", 1, "Fill rotation"}; Configurable strategyPIDPion{"strategyPIDPion", 0, "PID strategy Pion"}; Configurable strategyPIDKaon{"strategyPIDKaon", 0, "PID strategy Kaon"}; + Configurable maxKKS0Mass{"maxKKS0Mass", 1.025, "Maximum kaon kshort mass"}; Configurable maxMomentumPion{"maxMomentumPion", 4.0, "Maximum momentum Pion"}; Configurable maxMomentumKaon{"maxMomentumKaon", 4.0, "Maximum momentum Kaon"}; Configurable momentumTOFPion{"momentumTOFPion", 0.8, "Pion momentum TOF"}; @@ -60,22 +62,14 @@ struct f1protoncorrelation { histos.add("hNsigmaProtonTPCSE", "Nsigma Proton TPC distribution same event", kTH2F, {{200, -10.0f, 10.0f}, {100, 0.0f, 1.0f}}); histos.add("hNsigmaProtonTPCME", "Nsigma Proton TPC distribution mixed event", kTH2F, {{200, -10.0f, 10.0f}, {100, 0.0f, 1.0f}}); histos.add("h2SameEventPtCorrelation", "Pt correlation of F1 and proton", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {100, 0.0, 10.0}}); - histos.add("h2SameEventInvariantMassUnlike_mass104", "Unlike Sign Invariant mass of f1 same event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); - histos.add("h2MixEventInvariantMassUnlike_mass104", "Unlike Sign Invariant mass of f1 mix event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); - histos.add("h2SameEventInvariantMassLike_mass104", "Like Sign Invariant mass of f1 same event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); - histos.add("h2MixEventInvariantMassLike_mass104", "Like Sign Invariant mass of f1 mix event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); - histos.add("h2SameEventInvariantMassUnlike_mass103", "Unlike Sign Invariant mass of f1 same event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); - histos.add("h2MixEventInvariantMassUnlike_mass103", "Unlike Sign Invariant mass of f1 mix event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); - histos.add("h2SameEventInvariantMassLike_mass103", "Like Sign Invariant mass of f1 same event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); - histos.add("h2MixEventInvariantMassLike_mass103", "Like Sign Invariant mass of f1 mix event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); - histos.add("h2SameEventInvariantMassUnlike_mass102", "Unlike Sign Invariant mass of f1 same event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); - histos.add("h2MixEventInvariantMassUnlike_mass102", "Unlike Sign Invariant mass of f1 mix event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); - histos.add("h2SameEventInvariantMassLike_mass102", "Like Sign Invariant mass of f1 same event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); - histos.add("h2MixEventInvariantMassLike_mass102", "Like Sign Invariant mass of f1 mix event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); - histos.add("h2SameEventInvariantMassUnlike_mass101", "Unlike Sign Invariant mass of f1 same event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); - histos.add("h2MixEventInvariantMassUnlike_mass101", "Unlike Sign Invariant mass of f1 mix event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); - histos.add("h2SameEventInvariantMassLike_mass101", "Like Sign Invariant mass of f1 same event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); - histos.add("h2MixEventInvariantMassLike_mass101", "Like Sign Invariant mass of f1 mix event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); + + histos.add("h2SameEventInvariantMassUnlike_mass", "Unlike Sign Invariant mass of f1 same event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); + histos.add("h2SameEventInvariantMassLike_mass", "Like Sign Invariant mass of f1 same event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); + histos.add("h2SameEventInvariantMassRot_mass", "Rotational Invariant mass of f1 same event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); + + histos.add("h2MixEventInvariantMassUnlike_mass", "Unlike Sign Invariant mass of f1 mix event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); + histos.add("h2MixEventInvariantMassLike_mass", "Like Sign Invariant mass of f1 mix event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); + histos.add("h2MixEventInvariantMassRot_mass", "Rotational Sign Invariant mass of f1 mix event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); } // get kstar @@ -101,17 +95,20 @@ struct f1protoncorrelation { return 0.5 * trackRelK.P(); } - TLorentzVector F1, Proton, F1ProtonPair, Pion, Kaon; + TLorentzVector F1, Proton, F1ProtonPair, Pion, Kaon, Kshort; + TLorentzVector F1Rot, PionRot, KaonKshortPair; // Process the data in same event void process(aod::RedF1PEvents::iterator const& /*collision*/, aod::F1Tracks const& f1tracks, aod::ProtonTracks const& protontracks) { for (auto f1track : f1tracks) { - F1.SetXYZM(f1track.f1Px(), f1track.f1Py(), f1track.f1Pz(), f1track.f1Mass()); - if (f1track.f1MassKaonKshort() > 1.04 || F1.Pt() < lowPtF1) { + if (f1track.f1MassKaonKshort() > maxKKS0Mass) { continue; } + F1.SetXYZM(f1track.f1Px(), f1track.f1Py(), f1track.f1Pz(), f1track.f1Mass()); Pion.SetXYZM(f1track.f1d1Px(), f1track.f1d1Py(), f1track.f1d1Pz(), 0.139); Kaon.SetXYZM(f1track.f1d2Px(), f1track.f1d2Py(), f1track.f1d2Pz(), 0.493); + Kshort.SetXYZM(f1track.f1d3Px(), f1track.f1d3Py(), f1track.f1d3Pz(), 0.497); + KaonKshortPair = Kaon + Kshort; if (Pion.P() > maxMomentumPion || Kaon.P() > maxMomentumKaon) { continue; } @@ -134,37 +131,27 @@ struct f1protoncorrelation { } auto relative_momentum = getkstar(F1, Proton); histos.fill(HIST("h2SameEventPtCorrelation"), relative_momentum, F1.Pt(), Proton.Pt()); - if (f1track.f1MassKaonKshort() < 1.04) { - if (f1track.f1SignalStat() == 1) { - histos.fill(HIST("h2SameEventInvariantMassUnlike_mass104"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like - histos.fill(HIST("hNsigmaProtonTPCSE"), protontrack.protonNsigmaTPC(), relative_momentum); - } - if (f1track.f1SignalStat() == -1) { - histos.fill(HIST("h2SameEventInvariantMassLike_mass104"), relative_momentum, F1.Pt(), F1.M()); - } - } - if (f1track.f1MassKaonKshort() < 1.03) { - if (f1track.f1SignalStat() == 1) { - histos.fill(HIST("h2SameEventInvariantMassUnlike_mass103"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like - } - if (f1track.f1SignalStat() == -1) { - histos.fill(HIST("h2SameEventInvariantMassLike_mass103"), relative_momentum, F1.Pt(), F1.M()); - } - } - if (f1track.f1MassKaonKshort() < 1.02) { - if (f1track.f1SignalStat() == 1) { - histos.fill(HIST("h2SameEventInvariantMassUnlike_mass102"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like - } - if (f1track.f1SignalStat() == -1) { - histos.fill(HIST("h2SameEventInvariantMassLike_mass102"), relative_momentum, F1.Pt(), F1.M()); - } - } - if (f1track.f1MassKaonKshort() < 1.01) { - if (f1track.f1SignalStat() == 1) { - histos.fill(HIST("h2SameEventInvariantMassUnlike_mass101"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like - } - if (f1track.f1SignalStat() == -1) { - histos.fill(HIST("h2SameEventInvariantMassLike_mass101"), relative_momentum, F1.Pt(), F1.M()); + if (f1track.f1SignalStat() == 1) { + histos.fill(HIST("h2SameEventInvariantMassUnlike_mass"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like + histos.fill(HIST("hNsigmaProtonTPCSE"), protontrack.protonNsigmaTPC(), relative_momentum); + } + if (f1track.f1SignalStat() == -1) { + histos.fill(HIST("h2SameEventInvariantMassLike_mass"), relative_momentum, F1.Pt(), F1.M()); + } + if (fillRotation) { + for (int nrotbkg = 0; nrotbkg < 9; nrotbkg++) { + auto anglestart = 5.0 * TMath::Pi() / 6.0; + auto angleend = 7.0 * TMath::Pi() / 6.0; + auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0)); + auto rotangle = anglestart + nrotbkg * anglestep; + auto rotPionPx = f1track.f1d1Px() * std::cos(rotangle) - f1track.f1d1Py() * std::sin(rotangle); + auto rotPionPy = f1track.f1d1Px() * std::sin(rotangle) + f1track.f1d1Py() * std::cos(rotangle); + PionRot.SetXYZM(rotPionPx, rotPionPy, f1track.f1d1Pz(), 0.139); + F1Rot = PionRot + KaonKshortPair; + auto relative_momentum_rot = getkstar(F1Rot, Proton); + if (f1track.f1SignalStat() == 1) { + histos.fill(HIST("h2SameEventInvariantMassRot_mass"), relative_momentum_rot, F1Rot.Pt(), F1Rot.M()); + } } } } @@ -200,12 +187,14 @@ struct f1protoncorrelation { // for (auto& [t1, t2] : soa::combinations(o2::soa::CombinationsFullIndexPolicy(f1tracks, protontracks))) { for (auto& [t1, t2] : soa::combinations(o2::soa::CombinationsFullIndexPolicy(groupF1, groupProton))) { // LOGF(info, "Mixed event collision1 track1: (%d, %d)", collision1.index(), t1.index()); - F1.SetXYZM(t1.f1Px(), t1.f1Py(), t1.f1Pz(), t1.f1Mass()); - if (t1.f1MassKaonKshort() > 1.04 || F1.Pt() < lowPtF1) { + if (t1.f1MassKaonKshort() > maxKKS0Mass) { continue; } + F1.SetXYZM(t1.f1Px(), t1.f1Py(), t1.f1Pz(), t1.f1Mass()); Pion.SetXYZM(t1.f1d1Px(), t1.f1d1Py(), t1.f1d1Pz(), 0.139); Kaon.SetXYZM(t1.f1d2Px(), t1.f1d2Py(), t1.f1d2Pz(), 0.493); + Kshort.SetXYZM(t1.f1d3Px(), t1.f1d3Py(), t1.f1d3Pz(), 0.497); + KaonKshortPair = Kaon + Kshort; if (Pion.P() > maxMomentumPion || Kaon.P() > maxMomentumKaon) { continue; } @@ -223,37 +212,27 @@ struct f1protoncorrelation { continue; } auto relative_momentum = getkstar(F1, Proton); - if (t1.f1MassKaonKshort() < 1.04) { - if (t1.f1SignalStat() == 1) { - histos.fill(HIST("h2MixEventInvariantMassUnlike_mass104"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like - histos.fill(HIST("hNsigmaProtonTPCME"), t2.protonNsigmaTPC(), relative_momentum); - } - if (t1.f1SignalStat() == -1) { - histos.fill(HIST("h2MixEventInvariantMassLike_mass104"), relative_momentum, F1.Pt(), F1.M()); - } - } - if (t1.f1MassKaonKshort() < 1.03) { - if (t1.f1SignalStat() == 1) { - histos.fill(HIST("h2MixEventInvariantMassUnlike_mass103"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like - } - if (t1.f1SignalStat() == -1) { - histos.fill(HIST("h2MixEventInvariantMassLike_mass103"), relative_momentum, F1.Pt(), F1.M()); - } - } - if (t1.f1MassKaonKshort() < 1.02) { - if (t1.f1SignalStat() == 1) { - histos.fill(HIST("h2MixEventInvariantMassUnlike_mass102"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like - } - if (t1.f1SignalStat() == -1) { - histos.fill(HIST("h2MixEventInvariantMassLike_mass102"), relative_momentum, F1.Pt(), F1.M()); - } - } - if (t1.f1MassKaonKshort() < 1.01) { - if (t1.f1SignalStat() == 1) { - histos.fill(HIST("h2MixEventInvariantMassUnlike_mass101"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like - } - if (t1.f1SignalStat() == -1) { - histos.fill(HIST("h2MixEventInvariantMassLike_mass101"), relative_momentum, F1.Pt(), F1.M()); + if (t1.f1SignalStat() == 1) { + histos.fill(HIST("h2MixEventInvariantMassUnlike_mass104"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like + histos.fill(HIST("hNsigmaProtonTPCME"), t2.protonNsigmaTPC(), relative_momentum); + } + if (t1.f1SignalStat() == -1) { + histos.fill(HIST("h2MixEventInvariantMassLike_mass104"), relative_momentum, F1.Pt(), F1.M()); + } + if (fillRotation) { + for (int nrotbkg = 0; nrotbkg < 9; nrotbkg++) { + auto anglestart = 5.0 * TMath::Pi() / 6.0; + auto angleend = 7.0 * TMath::Pi() / 6.0; + auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0)); + auto rotangle = anglestart + nrotbkg * anglestep; + auto rotPionPx = t1.f1d1Px() * std::cos(rotangle) - t1.f1d1Py() * std::sin(rotangle); + auto rotPionPy = t1.f1d1Px() * std::sin(rotangle) + t1.f1d1Py() * std::cos(rotangle); + PionRot.SetXYZM(rotPionPx, rotPionPy, t1.f1d1Pz(), 0.139); + F1Rot = PionRot + KaonKshortPair; + auto relative_momentum_rot = getkstar(F1Rot, Proton); + if (t1.f1SignalStat() == 1) { + histos.fill(HIST("h2MixEventInvariantMassRot_mass"), relative_momentum_rot, F1Rot.Pt(), F1Rot.M()); + } } } } diff --git a/PWGLF/Tasks/Resonances/phipbpb.cxx b/PWGLF/Tasks/Resonances/phipbpb.cxx index 8d837d8314f..350d6664115 100644 --- a/PWGLF/Tasks/Resonances/phipbpb.cxx +++ b/PWGLF/Tasks/Resonances/phipbpb.cxx @@ -184,6 +184,9 @@ struct phipbpb { histos.add("hSparseV2SameEventCosDeltaPhi", "hSparseV2SameEventCosDeltaPhi", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisCentrality}); histos.add("hSparseV2MixedEventCosDeltaPhi", "hSparseV2MixedEventCosDeltaPhi", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisCentrality}); + histos.add("hSparseV2SameEventCosDeltaPhiSquare", "hSparseV2SameEventCosDeltaPhiSquare", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisCentrality}); + histos.add("hSparseV2MixedEventCosDeltaPhiSquare", "hSparseV2MixedEventCosDeltaPhiSquare", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisCentrality}); + histos.add("hSparseV2SameEventSinDeltaPhi", "hSparseV2SameEventSinDeltaPhi", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisCentrality}); histos.add("hSparseV2MixedEventSinDeltaPhi", "hSparseV2MixedEventSinDeltaPhi", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisCentrality}); @@ -465,6 +468,7 @@ struct phipbpb { histos.fill(HIST("hpTvsRapidity"), PhiMesonMother.Pt(), PhiMesonMother.Rapidity()); if (TMath::Abs(PhiMesonMother.Rapidity()) < confRapidity) { histos.fill(HIST("hSparseV2SameEventCosDeltaPhi"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2 * QFT0C, centrality); + histos.fill(HIST("hSparseV2SameEventCosDeltaPhiSquare"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2 * v2, centrality); histos.fill(HIST("hSparseV2SameEventSinDeltaPhi"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2sin * QFT0C, centrality); histos.fill(HIST("hSparseV2SameEventCosPhi"), PhiMesonMother.M(), PhiMesonMother.Pt(), TMath::Cos(2.0 * phimother), centrality); @@ -559,6 +563,7 @@ struct phipbpb { histos.fill(HIST("hpTvsRapidity"), PhiMesonMother.Pt(), PhiMesonMother.Rapidity()); if (TMath::Abs(PhiMesonMother.Rapidity()) < confRapidity) { histos.fill(HIST("hSparseV2MixedEventCosDeltaPhi"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2 * QFT0C, centrality); + histos.fill(HIST("hSparseV2MixedEventCosDeltaPhiSquare"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2 * v2, centrality); histos.fill(HIST("hSparseV2MixedEventSinDeltaPhi"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2sin * QFT0C, centrality); } ROOT::Math::Boost boost{PhiMesonMother.BoostToCM()}; From a132fbfe75e5f7a34cff8ce852bee0081e450f7d Mon Sep 17 00:00:00 2001 From: Zhengqing Wang Date: Thu, 12 Dec 2024 06:15:11 +0800 Subject: [PATCH 10/19] [PWGCF] add self corr (#8870) Co-authored-by: ALICE Action Bot --- PWGCF/Flow/Tasks/pidcme.cxx | 303 ++++++++++++++++++++++++------------ 1 file changed, 200 insertions(+), 103 deletions(-) diff --git a/PWGCF/Flow/Tasks/pidcme.cxx b/PWGCF/Flow/Tasks/pidcme.cxx index 882e97aabec..5c7714ddce6 100644 --- a/PWGCF/Flow/Tasks/pidcme.cxx +++ b/PWGCF/Flow/Tasks/pidcme.cxx @@ -9,7 +9,11 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +/// \author ZhengqingWang(zhengqing.wang@cern.ch) +/// \file pidcme.cxx +/// \brief task to calculate the pikp cme signal and bacground. // C++/ROOT includes. +// o2-linter: disable=name/workflow-file #include #include #include @@ -47,11 +51,11 @@ using namespace o2::framework::expressions; namespace o2::aod { -namespace CMETrackPIDcolums +namespace cme_track_pid_columns { -DECLARE_SOA_COLUMN(NPIDFlag, Npid, int8_t); // Flag tracks without proper binning as -1, and indicate type of particle 0->un-Id, 1->pion, 2->kaon, 3->proton -} // namespace CMETrackPIDcolums -DECLARE_SOA_TABLE(Flags, "AOD", "Flags", CMETrackPIDcolums::NPIDFlag); +DECLARE_SOA_COLUMN(NPidFlag, nPidFlag, int8_t); // Flag tracks without proper binning as -1, and indicate type of particle 0->un-Id, 1->pion, 2->kaon, 3->proton +} // namespace cme_track_pid_columns +DECLARE_SOA_TABLE(Flags, "AOD", "Flags", cme_track_pid_columns::NPidFlag); } // namespace o2::aod using TracksPID = soa::Join; @@ -77,7 +81,7 @@ struct FillPIDcolums { bool onlyTPC = true; template - bool SelTrack_PID(const TrackType track) + bool selTrackPid(const TrackType track) { if (!(track.pt() > cfgMinPtPID)) return false; @@ -101,7 +105,7 @@ struct FillPIDcolums { } template - bool selectionPID(const T& candidate, int8_t PID) + bool selectionPid(const T& candidate, int8_t PID) { if (candidate.pt() > cfgPtMaxforTPCOnlyPID) { onlyTPC = false; @@ -204,29 +208,29 @@ struct FillPIDcolums { histosQA.add(Form("QA/PID/histnSigma_Pr"), "", {HistType::kTH1F, {axisnSigma}}); histosQA.add(Form("QA/PID/histnSigma_Pt_Pr"), "", {HistType::kTH2F, {axisPtPID, axisnSigma}}); } - Produces PIDCMEtable; + Produces pidCmeTable; void process(TracksPID const& tracks) { - int8_t PID_flag; - for (auto& track : tracks) { - if (!SelTrack_PID(track)) { - PID_flag = -1; + int8_t pidFlag; + for (const auto& track : tracks) { + if (!selTrackPid(track)) { + pidFlag = -1; } else { histosQA.fill(HIST("QA/PID/histdEdxTPC_All"), track.sign() * track.tpcInnerParam(), track.tpcSignal()); - float nsigma_array[3] = {track.tpcNSigmaPi(), track.tpcNSigmaKa(), track.tpcNSigmaPr()}; - PID_flag = 0; + float nSigmaArray[3] = {track.tpcNSigmaPi(), track.tpcNSigmaKa(), track.tpcNSigmaPr()}; + pidFlag = 0; for (int8_t i = 0; i < 3; i++) { - if (selectionPID(track, i)) - PID_flag = PID_flag * 10 + i + 1; - if (PID_flag > 10) { // If a track is identified as two different tracks. - if (fabs(nsigma_array[(PID_flag / 10) - 1]) < fabs(nsigma_array[(PID_flag % 10) - 1])) // The track is identified as the particle whose |nsigma| is the least. - PID_flag /= 10; + if (selectionPid(track, i)) + pidFlag = pidFlag * 10 + i + 1; + if (pidFlag > 10) { // If a track is identified as two different tracks. + if (std::abs(nSigmaArray[(pidFlag / 10) - 1]) < std::abs(nSigmaArray[(pidFlag % 10) - 1])) // The track is identified as the particle whose |nsigma| is the least. + pidFlag /= 10; else - PID_flag %= 10; + pidFlag %= 10; } } - switch (PID_flag) { + switch (pidFlag) { case 1: histosQA.fill(HIST("QA/PID/histdEdxTPC_Pi"), track.sign() * track.tpcInnerParam(), track.tpcSignal()); histosQA.fill(HIST("QA/PID/histnSigma_Pi"), track.tpcNSigmaPi()); @@ -244,12 +248,12 @@ struct FillPIDcolums { break; } } - PIDCMEtable(PID_flag); + pidCmeTable(pidFlag); } } }; -struct pidcme { +struct pidcme { // o2-linter: disable=name/struct HistogramRegistry histosQA{"histosmain", {}, OutputObjHandlingPolicy::AnalysisObject}; Configurable> cfgnMods{"cfgnMods", {2}, "Modulation of interest"}; @@ -275,18 +279,18 @@ struct pidcme { ConfigurableAxis cfgaxissumpt{"cfgaxissumpt", {7, 1, 8}, "Binning for #gamma and #delta pt(particle1 + particle2)"}; ConfigurableAxis cfgaxisdeltaeta{"cfgaxisdeltaeta", {5, 0, 1}, "Binning for #gamma and #delta |#eta(particle1 - particle2)|"}; - Configurable OpenCME = {"cfgkOpeanCME", true, "open PID CME"}; + Configurable cfgkOpeanCME{"cfgkOpeanCME", true, "open PID CME"}; EventPlaneHelper helperEP; SliceCache cache; unsigned int mult1, mult2, mult3; - int DetId; - int RefAId; - int RefBId; + int detId; + int refAId; + int refBId; template - int GetDetId(const T& name) + int getDetId(const T& name) { if (name.value == "BPos" || name.value == "BNeg" || name.value == "BTot") { LOGF(warning, "Using deprecated label: %s. Please use TPCpos, TPCneg, TPCall instead.", name.value); @@ -314,23 +318,23 @@ struct pidcme { Filter collisionFilter = (nabs(aod::collision::posZ) < 10.f); Filter ptfilter = aod::track::pt > cfgMinPt; Filter etafilter = aod::track::eta < cfgMaxEta; - Filter properPIDfilter = aod::CMETrackPIDcolums::Npid != -1; + Filter properPIDfilter = aod::cme_track_pid_columns::nPidFlag != -1; - Partition>> Tracks_set1 = aod::CMETrackPIDcolums::Npid == 1; - Partition>> Tracks_set2 = aod::CMETrackPIDcolums::Npid == 2; - Partition>> Tracks_set3 = aod::CMETrackPIDcolums::Npid == 3; + Partition>> tracksSet1 = aod::cme_track_pid_columns::nPidFlag == 1; + Partition>> tracksSet2 = aod::cme_track_pid_columns::nPidFlag == 2; + Partition>> tracksSet3 = aod::cme_track_pid_columns::nPidFlag == 3; void init(InitContext const&) { - DetId = GetDetId(cfgDetName); - RefAId = GetDetId(cfgRefAName); - RefBId = GetDetId(cfgRefBName); + detId = getDetId(cfgDetName); + refAId = getDetId(cfgRefAName); + refBId = getDetId(cfgRefBName); - if (DetId == RefAId || DetId == RefBId || RefAId == RefBId) { + if (detId == refAId || detId == refBId || refAId == refBId) { LOGF(info, "Wrong detector configuration \n The FT0C will be used to get Q-Vector \n The TPCpos and TPCneg will be used as reference systems"); - DetId = 0; - RefAId = 4; - RefBId = 5; + detId = 0; + refAId = 4; + refBId = 5; } AxisSpec axisCent{cfgaxisCent, "centrality"}; @@ -373,13 +377,19 @@ struct pidcme { histosQA.add(Form("V2/PID/histCosDetV2_Ka_Neg"), "", {HistType::kTH3F, {axisCentMerged, axisPt, axisCos}}); histosQA.add(Form("V2/PID/histCosDetV2_Pr_Neg"), "", {HistType::kTH3F, {axisCentMerged, axisPt, axisCos}}); - if (OpenCME) { + if (cfgkOpeanCME) { histosQA.add(Form("PIDCME/histgamama_PiKa_ss"), "", {HistType::kTProfile, {axisCentMerged}}); histosQA.add(Form("PIDCME/histgamama_PiKa_os"), "", {HistType::kTProfile, {axisCentMerged}}); histosQA.add(Form("PIDCME/histgamama_PiPr_ss"), "", {HistType::kTProfile, {axisCentMerged}}); histosQA.add(Form("PIDCME/histgamama_PiPr_os"), "", {HistType::kTProfile, {axisCentMerged}}); histosQA.add(Form("PIDCME/histgamama_KaPr_ss"), "", {HistType::kTProfile, {axisCentMerged}}); histosQA.add(Form("PIDCME/histgamama_KaPr_os"), "", {HistType::kTProfile, {axisCentMerged}}); + histosQA.add(Form("PIDCME/histgamama_PiPi_ss"), "", {HistType::kTProfile, {axisCentMerged}}); + histosQA.add(Form("PIDCME/histgamama_PiPi_os"), "", {HistType::kTProfile, {axisCentMerged}}); + histosQA.add(Form("PIDCME/histgamama_KaKa_ss"), "", {HistType::kTProfile, {axisCentMerged}}); + histosQA.add(Form("PIDCME/histgamama_KaKa_os"), "", {HistType::kTProfile, {axisCentMerged}}); + histosQA.add(Form("PIDCME/histgamama_PrPr_ss"), "", {HistType::kTProfile, {axisCentMerged}}); + histosQA.add(Form("PIDCME/histgamama_PrPr_os"), "", {HistType::kTProfile, {axisCentMerged}}); histosQA.add(Form("PIDCME/histdelta_PiKa_ss"), "", {HistType::kTProfile, {axisCentMerged}}); histosQA.add(Form("PIDCME/histdelta_PiKa_os"), "", {HistType::kTProfile, {axisCentMerged}}); @@ -387,6 +397,12 @@ struct pidcme { histosQA.add(Form("PIDCME/histdelta_PiPr_os"), "", {HistType::kTProfile, {axisCentMerged}}); histosQA.add(Form("PIDCME/histdelta_KaPr_ss"), "", {HistType::kTProfile, {axisCentMerged}}); histosQA.add(Form("PIDCME/histdelta_KaPr_os"), "", {HistType::kTProfile, {axisCentMerged}}); + histosQA.add(Form("PIDCME/histdelta_PiPi_ss"), "", {HistType::kTProfile, {axisCentMerged}}); + histosQA.add(Form("PIDCME/histdelta_PiPi_os"), "", {HistType::kTProfile, {axisCentMerged}}); + histosQA.add(Form("PIDCME/histdelta_KaKa_ss"), "", {HistType::kTProfile, {axisCentMerged}}); + histosQA.add(Form("PIDCME/histdelta_KaKa_os"), "", {HistType::kTProfile, {axisCentMerged}}); + histosQA.add(Form("PIDCME/histdelta_PrPr_ss"), "", {HistType::kTProfile, {axisCentMerged}}); + histosQA.add(Form("PIDCME/histdelta_PrPr_os"), "", {HistType::kTProfile, {axisCentMerged}}); histosQA.add(Form("PIDCME/Differential/histgamama_PiKa_ss_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); histosQA.add(Form("PIDCME/Differential/histgamama_PiKa_os_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); @@ -394,6 +410,12 @@ struct pidcme { histosQA.add(Form("PIDCME/Differential/histgamama_PiPr_os_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); histosQA.add(Form("PIDCME/Differential/histgamama_KaPr_ss_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); histosQA.add(Form("PIDCME/Differential/histgamama_KaPr_os_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); + histosQA.add(Form("PIDCME/Differential/histgamama_PiPi_ss_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); + histosQA.add(Form("PIDCME/Differential/histgamama_PiPi_os_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); + histosQA.add(Form("PIDCME/Differential/histgamama_KaKa_ss_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); + histosQA.add(Form("PIDCME/Differential/histgamama_KaKa_os_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); + histosQA.add(Form("PIDCME/Differential/histgamama_PrPr_ss_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); + histosQA.add(Form("PIDCME/Differential/histgamama_PrPr_os_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); histosQA.add(Form("PIDCME/Differential/histdelta_PiKa_ss_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); histosQA.add(Form("PIDCME/Differential/histdelta_PiKa_os_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); @@ -401,11 +423,17 @@ struct pidcme { histosQA.add(Form("PIDCME/Differential/histdelta_PiPr_os_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); histosQA.add(Form("PIDCME/Differential/histdelta_KaPr_ss_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); histosQA.add(Form("PIDCME/Differential/histdelta_KaPr_os_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); + histosQA.add(Form("PIDCME/Differential/histdelta_PiPi_ss_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); + histosQA.add(Form("PIDCME/Differential/histdelta_PiPi_os_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); + histosQA.add(Form("PIDCME/Differential/histdelta_KaKa_ss_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); + histosQA.add(Form("PIDCME/Differential/histdelta_KaKa_os_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); + histosQA.add(Form("PIDCME/Differential/histdelta_PrPr_ss_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); + histosQA.add(Form("PIDCME/Differential/histdelta_PrPr_os_Dif"), "", {HistType::kTProfile3D, {axisCentMerged, axissumpt, axisdeltaeta}}); } } template - bool SelEvent(const CollType& collision) + bool selEvent(const CollType& collision) { if (!collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) { return 0; @@ -420,7 +448,7 @@ struct pidcme { } template - bool SelTrack(const TrackType track) + bool selTrack(const TrackType track) { if (!track.passedITSNCls()) return false; @@ -442,139 +470,208 @@ struct pidcme { template void fillHistosQvec(const CollType& collision, int nmode) { - int DetInd = DetId * 4 + cfgnTotalSystem * 4 * (nmode - 2); - int RefAInd = RefAId * 4 + cfgnTotalSystem * 4 * (nmode - 2); - int RefBInd = RefBId * 4 + cfgnTotalSystem * 4 * (nmode - 2); + int detInd = detId * 4 + cfgnTotalSystem * 4 * (nmode - 2); + int refAInd = refAId * 4 + cfgnTotalSystem * 4 * (nmode - 2); + int refBInd = refBId * 4 + cfgnTotalSystem * 4 * (nmode - 2); if (nmode == 2) { - if (collision.qvecAmp()[DetId] > 1e-8) { - histosQA.fill(HIST("QA/histQvec_CorrL0_V2"), collision.qvecRe()[DetInd], collision.qvecIm()[DetInd], collision.centFT0C()); - histosQA.fill(HIST("QA/histQvec_CorrL1_V2"), collision.qvecRe()[DetInd + 1], collision.qvecIm()[DetInd + 1], collision.centFT0C()); - histosQA.fill(HIST("QA/histQvec_CorrL2_V2"), collision.qvecRe()[DetInd + 2], collision.qvecIm()[DetInd + 2], collision.centFT0C()); - histosQA.fill(HIST("QA/histQvec_CorrL3_V2"), collision.qvecRe()[DetInd + 3], collision.qvecIm()[DetInd + 3], collision.centFT0C()); - histosQA.fill(HIST("QA/histEvtPl_CorrL0_V2"), helperEP.GetEventPlane(collision.qvecRe()[DetInd], collision.qvecIm()[DetInd], nmode), collision.centFT0C()); - histosQA.fill(HIST("QA/histEvtPl_CorrL1_V2"), helperEP.GetEventPlane(collision.qvecRe()[DetInd + 1], collision.qvecIm()[DetInd + 1], nmode), collision.centFT0C()); - histosQA.fill(HIST("QA/histEvtPl_CorrL2_V2"), helperEP.GetEventPlane(collision.qvecRe()[DetInd + 2], collision.qvecIm()[DetInd + 2], nmode), collision.centFT0C()); - histosQA.fill(HIST("QA/histEvtPl_CorrL3_V2"), helperEP.GetEventPlane(collision.qvecRe()[DetInd + 3], collision.qvecIm()[DetInd + 3], nmode), collision.centFT0C()); + if (collision.qvecAmp()[detId] > 1e-8) { + histosQA.fill(HIST("QA/histQvec_CorrL0_V2"), collision.qvecRe()[detInd], collision.qvecIm()[detInd], collision.centFT0C()); + histosQA.fill(HIST("QA/histQvec_CorrL1_V2"), collision.qvecRe()[detInd + 1], collision.qvecIm()[detInd + 1], collision.centFT0C()); + histosQA.fill(HIST("QA/histQvec_CorrL2_V2"), collision.qvecRe()[detInd + 2], collision.qvecIm()[detInd + 2], collision.centFT0C()); + histosQA.fill(HIST("QA/histQvec_CorrL3_V2"), collision.qvecRe()[detInd + 3], collision.qvecIm()[detInd + 3], collision.centFT0C()); + histosQA.fill(HIST("QA/histEvtPl_CorrL0_V2"), helperEP.GetEventPlane(collision.qvecRe()[detInd], collision.qvecIm()[detInd], nmode), collision.centFT0C()); + histosQA.fill(HIST("QA/histEvtPl_CorrL1_V2"), helperEP.GetEventPlane(collision.qvecRe()[detInd + 1], collision.qvecIm()[detInd + 1], nmode), collision.centFT0C()); + histosQA.fill(HIST("QA/histEvtPl_CorrL2_V2"), helperEP.GetEventPlane(collision.qvecRe()[detInd + 2], collision.qvecIm()[detInd + 2], nmode), collision.centFT0C()); + histosQA.fill(HIST("QA/histEvtPl_CorrL3_V2"), helperEP.GetEventPlane(collision.qvecRe()[detInd + 3], collision.qvecIm()[detInd + 3], nmode), collision.centFT0C()); } - if (collision.qvecAmp()[DetId] > 1e-8 && collision.qvecAmp()[RefAId] > 1e-8 && collision.qvecAmp()[RefBId] > 1e-8) { - histosQA.fill(HIST("QA/histQvecRes_SigRefAV2"), helperEP.GetResolution(helperEP.GetEventPlane(collision.qvecRe()[DetInd + 3], collision.qvecIm()[DetInd + 3], nmode), helperEP.GetEventPlane(collision.qvecRe()[RefAInd + 3], collision.qvecIm()[RefAInd + 3], nmode), nmode), collision.centFT0C()); - histosQA.fill(HIST("QA/histQvecRes_SigRefBV2"), helperEP.GetResolution(helperEP.GetEventPlane(collision.qvecRe()[DetInd + 3], collision.qvecIm()[DetInd + 3], nmode), helperEP.GetEventPlane(collision.qvecRe()[RefBInd + 3], collision.qvecIm()[RefBInd + 3], nmode), nmode), collision.centFT0C()); - histosQA.fill(HIST("QA/histQvecRes_RefARefBV2"), helperEP.GetResolution(helperEP.GetEventPlane(collision.qvecRe()[RefAInd + 3], collision.qvecIm()[RefAInd + 3], nmode), helperEP.GetEventPlane(collision.qvecRe()[RefBInd + 3], collision.qvecIm()[RefBInd + 3], nmode), nmode), collision.centFT0C()); + if (collision.qvecAmp()[detId] > 1e-8 && collision.qvecAmp()[refAId] > 1e-8 && collision.qvecAmp()[refBId] > 1e-8) { + histosQA.fill(HIST("QA/histQvecRes_SigRefAV2"), helperEP.GetResolution(helperEP.GetEventPlane(collision.qvecRe()[detInd + 3], collision.qvecIm()[detInd + 3], nmode), helperEP.GetEventPlane(collision.qvecRe()[refAInd + 3], collision.qvecIm()[refAInd + 3], nmode), nmode), collision.centFT0C()); + histosQA.fill(HIST("QA/histQvecRes_SigRefBV2"), helperEP.GetResolution(helperEP.GetEventPlane(collision.qvecRe()[detInd + 3], collision.qvecIm()[detInd + 3], nmode), helperEP.GetEventPlane(collision.qvecRe()[refBInd + 3], collision.qvecIm()[refBInd + 3], nmode), nmode), collision.centFT0C()); + histosQA.fill(HIST("QA/histQvecRes_RefARefBV2"), helperEP.GetResolution(helperEP.GetEventPlane(collision.qvecRe()[refAInd + 3], collision.qvecIm()[refAInd + 3], nmode), helperEP.GetEventPlane(collision.qvecRe()[refBInd + 3], collision.qvecIm()[refBInd + 3], nmode), nmode), collision.centFT0C()); } } } template - void fillHistosFlow_gamma_delta(const CollType& collision, const TrackType& track1, const TrackType& track2, const TrackType& track3, int nmode) + void fillHistosFlowGammaDelta(const CollType& collision, const TrackType& track1, const TrackType& track2, const TrackType& track3, int nmode) { - if (collision.qvecAmp()[DetId] < 1e-8) { + if (collision.qvecAmp()[detId] < 1e-8) { return; } - int DetInd = DetId * 4 + cfgnTotalSystem * 4 * (nmode - 2); - float Psi_n = helperEP.GetEventPlane(collision.qvecRe()[DetInd + 3], collision.qvecIm()[DetInd + 3], nmode); - for (auto& trk : track1) { - if (!SelTrack(trk)) + int detInd = detId * 4 + cfgnTotalSystem * 4 * (nmode - 2); + float psiN = helperEP.GetEventPlane(collision.qvecRe()[detInd + 3], collision.qvecIm()[detInd + 3], nmode); + for (const auto& trk : track1) { + if (!selTrack(trk)) continue; if (nmode == 2) { if (trk.sign() > 0) { histosQA.fill(HIST("V2/PID/histCosDetV2_Pi"), collision.centFT0C(), trk.pt(), - std::cos(static_cast(nmode) * (trk.phi() - Psi_n))); + std::cos(static_cast(nmode) * (trk.phi() - psiN))); } else if (trk.sign() < 0) { histosQA.fill(HIST("V2/PID/histCosDetV2_Pi_Neg"), collision.centFT0C(), trk.pt(), - std::cos(static_cast(nmode) * (trk.phi() - Psi_n))); + std::cos(static_cast(nmode) * (trk.phi() - psiN))); } } } - for (auto& trk : track2) { - if (!SelTrack(trk)) + for (const auto& trk : track2) { + if (!selTrack(trk)) continue; if (nmode == 2) { if (trk.sign() > 0) { histosQA.fill(HIST("V2/PID/histCosDetV2_Ka"), collision.centFT0C(), trk.pt(), - std::cos(static_cast(nmode) * (trk.phi() - Psi_n))); + std::cos(static_cast(nmode) * (trk.phi() - psiN))); } else if (trk.sign() < 0) { histosQA.fill(HIST("V2/PID/histCosDetV2_Ka_Neg"), collision.centFT0C(), trk.pt(), - std::cos(static_cast(nmode) * (trk.phi() - Psi_n))); + std::cos(static_cast(nmode) * (trk.phi() - psiN))); } } } - for (auto& trk : track3) { - if (!SelTrack(trk)) + for (const auto& trk : track3) { + if (!selTrack(trk)) continue; if (nmode == 2) { if (trk.sign() > 0) { histosQA.fill(HIST("V2/PID/histCosDetV2_Pr"), collision.centFT0C(), trk.pt(), - std::cos(static_cast(nmode) * (trk.phi() - Psi_n))); + std::cos(static_cast(nmode) * (trk.phi() - psiN))); } else if (trk.sign() < 0) { histosQA.fill(HIST("V2/PID/histCosDetV2_Pr_Neg"), collision.centFT0C(), trk.pt(), - std::cos(static_cast(nmode) * (trk.phi() - Psi_n))); + std::cos(static_cast(nmode) * (trk.phi() - psiN))); } } } - if (OpenCME) { - for (auto& trk1 : track1) { - for (auto& trk2 : track2) { + if (cfgkOpeanCME) { + for (const auto& trk1 : track1) { + for (const auto& trk2 : track1) { if (trk1.globalIndex() == trk2.globalIndex()) continue; if (nmode == 2) { if (trk1.sign() == trk2.sign()) { - histosQA.fill(HIST("PIDCME/histgamama_PiKa_ss"), collision.centFT0C(), std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * Psi_n))); + histosQA.fill(HIST("PIDCME/histgamama_PiPi_ss"), collision.centFT0C(), std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); + histosQA.fill(HIST("PIDCME/histdelta_PiPi_ss"), collision.centFT0C(), std::cos((trk1.phi() - trk2.phi()))); + histosQA.fill(HIST("PIDCME/Differential/histgamama_PiPi_ss_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), + std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); + histosQA.fill(HIST("PIDCME/Differential/histdelta_PiPi_ss_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), + std::cos((trk1.phi() - trk2.phi()))); + } else { + histosQA.fill(HIST("PIDCME/histgamama_PiPi_os"), collision.centFT0C(), std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); + histosQA.fill(HIST("PIDCME/histdelta_PiPi_os"), collision.centFT0C(), std::cos((trk1.phi() - trk2.phi()))); + histosQA.fill(HIST("PIDCME/Differential/histgamama_PiPi_os_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), + std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); + histosQA.fill(HIST("PIDCME/Differential/histdelta_PiPi_os_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), + std::cos((trk1.phi() - trk2.phi()))); + } + } + } + } + for (const auto& trk1 : track2) { + for (const auto& trk2 : track2) { + if (trk1.globalIndex() == trk2.globalIndex()) + continue; + if (nmode == 2) { + if (trk1.sign() == trk2.sign()) { + histosQA.fill(HIST("PIDCME/histgamama_KaKa_ss"), collision.centFT0C(), std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); + histosQA.fill(HIST("PIDCME/histdelta_KaKa_ss"), collision.centFT0C(), std::cos((trk1.phi() - trk2.phi()))); + histosQA.fill(HIST("PIDCME/Differential/histgamama_KaKa_ss_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), + std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); + histosQA.fill(HIST("PIDCME/Differential/histdelta_KaKa_ss_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), + std::cos((trk1.phi() - trk2.phi()))); + } else { + histosQA.fill(HIST("PIDCME/histgamama_KaKa_os"), collision.centFT0C(), std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); + histosQA.fill(HIST("PIDCME/histdelta_KaKa_os"), collision.centFT0C(), std::cos((trk1.phi() - trk2.phi()))); + histosQA.fill(HIST("PIDCME/Differential/histgamama_KaKa_os_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), + std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); + histosQA.fill(HIST("PIDCME/Differential/histdelta_KaKa_os_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), + std::cos((trk1.phi() - trk2.phi()))); + } + } + } + } + for (const auto& trk1 : track3) { + for (const auto& trk2 : track3) { + if (trk1.globalIndex() == trk2.globalIndex()) + continue; + if (nmode == 2) { + if (trk1.sign() == trk2.sign()) { + histosQA.fill(HIST("PIDCME/histgamama_PrPr_ss"), collision.centFT0C(), std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); + histosQA.fill(HIST("PIDCME/histdelta_PrPr_ss"), collision.centFT0C(), std::cos((trk1.phi() - trk2.phi()))); + histosQA.fill(HIST("PIDCME/Differential/histgamama_PrPr_ss_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), + std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); + histosQA.fill(HIST("PIDCME/Differential/histdelta_PrPr_ss_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), + std::cos((trk1.phi() - trk2.phi()))); + } else { + histosQA.fill(HIST("PIDCME/histgamama_PrPr_os"), collision.centFT0C(), std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); + histosQA.fill(HIST("PIDCME/histdelta_PrPr_os"), collision.centFT0C(), std::cos((trk1.phi() - trk2.phi()))); + histosQA.fill(HIST("PIDCME/Differential/histgamama_PrPr_os_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), + std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); + histosQA.fill(HIST("PIDCME/Differential/histdelta_PrPr_os_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), + std::cos((trk1.phi() - trk2.phi()))); + } + } + } + } + for (const auto& trk1 : track1) { + for (const auto& trk2 : track2) { + if (trk1.globalIndex() == trk2.globalIndex()) + continue; + if (nmode == 2) { + if (trk1.sign() == trk2.sign()) { + histosQA.fill(HIST("PIDCME/histgamama_PiKa_ss"), collision.centFT0C(), std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); histosQA.fill(HIST("PIDCME/histdelta_PiKa_ss"), collision.centFT0C(), std::cos((trk1.phi() - trk2.phi()))); histosQA.fill(HIST("PIDCME/Differential/histgamama_PiKa_ss_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), - std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * Psi_n))); + std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); histosQA.fill(HIST("PIDCME/Differential/histdelta_PiKa_ss_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), std::cos((trk1.phi() - trk2.phi()))); } else { - histosQA.fill(HIST("PIDCME/histgamama_PiKa_os"), collision.centFT0C(), std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * Psi_n))); + histosQA.fill(HIST("PIDCME/histgamama_PiKa_os"), collision.centFT0C(), std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); histosQA.fill(HIST("PIDCME/histdelta_PiKa_os"), collision.centFT0C(), std::cos((trk1.phi() - trk2.phi()))); histosQA.fill(HIST("PIDCME/Differential/histgamama_PiKa_os_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), - std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * Psi_n))); + std::cos((trk1.phi() + trk2.phi() - static_cast(nmode) * psiN))); histosQA.fill(HIST("PIDCME/Differential/histdelta_PiKa_os_Dif"), collision.centFT0C(), trk1.pt() + trk2.pt(), std::abs(trk1.eta() - trk2.eta()), std::cos((trk1.phi() - trk2.phi()))); } } } } - for (auto& trk1 : track1) { - for (auto& trk3 : track3) { + for (const auto& trk1 : track1) { + for (const auto& trk3 : track3) { if (trk1.globalIndex() == trk3.globalIndex()) continue; if (nmode == 2) { if (trk1.sign() == trk3.sign()) { - histosQA.fill(HIST("PIDCME/histgamama_PiPr_ss"), collision.centFT0C(), std::cos((trk1.phi() + trk3.phi() - static_cast(nmode) * Psi_n))); + histosQA.fill(HIST("PIDCME/histgamama_PiPr_ss"), collision.centFT0C(), std::cos((trk1.phi() + trk3.phi() - static_cast(nmode) * psiN))); histosQA.fill(HIST("PIDCME/histdelta_PiPr_ss"), collision.centFT0C(), std::cos((trk1.phi() - trk3.phi()))); histosQA.fill(HIST("PIDCME/Differential/histgamama_PiPr_ss_Dif"), collision.centFT0C(), trk1.pt() + trk3.pt(), std::abs(trk1.eta() - trk3.eta()), - std::cos((trk1.phi() + trk3.phi() - static_cast(nmode) * Psi_n))); + std::cos((trk1.phi() + trk3.phi() - static_cast(nmode) * psiN))); histosQA.fill(HIST("PIDCME/Differential/histdelta_PiPr_ss_Dif"), collision.centFT0C(), trk1.pt() + trk3.pt(), std::abs(trk1.eta() - trk3.eta()), std::cos((trk1.phi() - trk3.phi()))); } else { - histosQA.fill(HIST("PIDCME/histgamama_PiPr_os"), collision.centFT0C(), std::cos((trk1.phi() + trk3.phi() - static_cast(nmode) * Psi_n))); + histosQA.fill(HIST("PIDCME/histgamama_PiPr_os"), collision.centFT0C(), std::cos((trk1.phi() + trk3.phi() - static_cast(nmode) * psiN))); histosQA.fill(HIST("PIDCME/histdelta_PiPr_os"), collision.centFT0C(), std::cos((trk1.phi() - trk3.phi()))); histosQA.fill(HIST("PIDCME/Differential/histgamama_PiPr_os_Dif"), collision.centFT0C(), trk1.pt() + trk3.pt(), std::abs(trk1.eta() - trk3.eta()), - std::cos((trk1.phi() + trk3.phi() - static_cast(nmode) * Psi_n))); + std::cos((trk1.phi() + trk3.phi() - static_cast(nmode) * psiN))); histosQA.fill(HIST("PIDCME/Differential/histdelta_PiPr_os_Dif"), collision.centFT0C(), trk1.pt() + trk3.pt(), std::abs(trk1.eta() - trk3.eta()), std::cos((trk1.phi() - trk3.phi()))); } } } } - for (auto& trk2 : track2) { - for (auto& trk3 : track3) { + for (const auto& trk2 : track2) { + for (const auto& trk3 : track3) { if (trk2.globalIndex() == trk3.globalIndex()) continue; if (nmode == 2) { if (trk2.sign() == trk3.sign()) { - histosQA.fill(HIST("PIDCME/histgamama_KaPr_ss"), collision.centFT0C(), std::cos((trk2.phi() + trk3.phi() - static_cast(nmode) * Psi_n))); + histosQA.fill(HIST("PIDCME/histgamama_KaPr_ss"), collision.centFT0C(), std::cos((trk2.phi() + trk3.phi() - static_cast(nmode) * psiN))); histosQA.fill(HIST("PIDCME/histdelta_KaPr_ss"), collision.centFT0C(), std::cos((trk2.phi() - trk3.phi()))); histosQA.fill(HIST("PIDCME/Differential/histgamama_KaPr_ss_Dif"), collision.centFT0C(), trk2.pt() + trk3.pt(), std::abs(trk2.eta() - trk3.eta()), - std::cos((trk2.phi() + trk3.phi() - static_cast(nmode) * Psi_n))); + std::cos((trk2.phi() + trk3.phi() - static_cast(nmode) * psiN))); histosQA.fill(HIST("PIDCME/Differential/histdelta_KaPr_ss_Dif"), collision.centFT0C(), trk2.pt() + trk3.pt(), std::abs(trk2.eta() - trk3.eta()), std::cos((trk2.phi() - trk3.phi()))); } else { - histosQA.fill(HIST("PIDCME/histgamama_KaPr_os"), collision.centFT0C(), std::cos((trk2.phi() + trk3.phi() - static_cast(nmode) * Psi_n))); + histosQA.fill(HIST("PIDCME/histgamama_KaPr_os"), collision.centFT0C(), std::cos((trk2.phi() + trk3.phi() - static_cast(nmode) * psiN))); histosQA.fill(HIST("PIDCME/histdelta_KaPr_os"), collision.centFT0C(), std::cos((trk2.phi() - trk3.phi()))); histosQA.fill(HIST("PIDCME/Differential/histgamama_KaPr_os_Dif"), collision.centFT0C(), trk2.pt() + trk3.pt(), std::abs(trk2.eta() - trk3.eta()), - std::cos((trk2.phi() + trk3.phi() - static_cast(nmode) * Psi_n))); + std::cos((trk2.phi() + trk3.phi() - static_cast(nmode) * psiN))); histosQA.fill(HIST("PIDCME/Differential/histdelta_KaPr_os_Dif"), collision.centFT0C(), trk2.pt() + trk3.pt(), std::abs(trk2.eta() - trk3.eta()), std::cos((trk2.phi() - trk3.phi()))); } @@ -587,33 +684,33 @@ struct pidcme { void process(soa::Filtered>::iterator const& collision, soa::Filtered> const& tracks) { histosQA.fill(HIST("QA/histEventCount"), 0.5); - if (!SelEvent(collision)) { + if (!selEvent(collision)) { return; } histosQA.fill(HIST("QA/histEventCount"), 1.5); histosQA.fill(HIST("QA/histCentrality"), collision.centFT0C()); histosQA.fill(HIST("QA/histVertexZRec"), collision.posZ()); - auto tracks1 = Tracks_set1->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); - auto tracks2 = Tracks_set2->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); - auto tracks3 = Tracks_set3->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); + auto tracks1 = tracksSet1->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); + auto tracks2 = tracksSet2->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); + auto tracks3 = tracksSet3->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); mult1 = tracks1.size(); mult2 = tracks2.size(); mult3 = tracks3.size(); if (mult1 < 1 || mult2 < 1 || mult3 < 1) // Reject Collisions without sufficient particles return; for (auto i = 0; i < static_cast(cfgnMods->size()); i++) { - int DetInd_global = DetId * 4 + cfgnTotalSystem * 4 * (cfgnMods->at(i) - 2); - float Psi_n_global = helperEP.GetEventPlane(collision.qvecRe()[DetInd_global + 3], collision.qvecIm()[DetInd_global + 3], cfgnMods->at(i)); - for (auto& trk : tracks) { - if (!SelTrack(trk)) + int detIndGlobal = detId * 4 + cfgnTotalSystem * 4 * (cfgnMods->at(i) - 2); + float psiNGlobal = helperEP.GetEventPlane(collision.qvecRe()[detIndGlobal + 3], collision.qvecIm()[detIndGlobal + 3], cfgnMods->at(i)); + for (const auto& trk : tracks) { + if (!selTrack(trk)) continue; histosQA.fill(HIST("V2/histSinDetV2"), collision.centFT0C(), trk.pt(), - std::sin(static_cast(cfgnMods->at(i)) * (trk.phi() - Psi_n_global))); + std::sin(static_cast(cfgnMods->at(i)) * (trk.phi() - psiNGlobal))); histosQA.fill(HIST("V2/histCosDetV2"), collision.centFT0C(), trk.pt(), - std::cos(static_cast(cfgnMods->at(i)) * (trk.phi() - Psi_n_global))); + std::cos(static_cast(cfgnMods->at(i)) * (trk.phi() - psiNGlobal))); } fillHistosQvec(collision, cfgnMods->at(i)); - fillHistosFlow_gamma_delta(collision, tracks1, tracks2, tracks3, cfgnMods->at(i)); + fillHistosFlowGammaDelta(collision, tracks1, tracks2, tracks3, cfgnMods->at(i)); } } }; From 9df5dc2388492dc896d15f4a4e8579614a0ec42f Mon Sep 17 00:00:00 2001 From: Chiara Pinto <48326672+chiarapinto@users.noreply.github.com> Date: Wed, 11 Dec 2024 23:21:32 +0100 Subject: [PATCH 11/19] [PWGLF] added configurable selections and new histos (#8943) Co-authored-by: ALICE Action Bot --- .../Nuspex/AngularCorrelationsInJets.cxx | 218 +++++++++--------- 1 file changed, 103 insertions(+), 115 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx index 6d751cde7c1..da2c47fa790 100644 --- a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx +++ b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx @@ -34,6 +34,7 @@ #include "PWGJE/Core/JetBkgSubUtils.h" #include "TVector2.h" #include "TVector3.h" +#include "TPDGCode.h" using namespace o2; using namespace o2::framework; @@ -75,10 +76,8 @@ struct AngularCorrelationsInJets { Configurable fProtonTPCTOFpT{"protonTPCTOFswitchpT", 0.7, "[proton] pT for switch in TPC/TOF nsigma"}; Configurable fProtonTPCnsigLowYield{"protonTPCnsigmaLowPtYield", 4.0, "[proton] max TPC nsigma with low pT for yield"}; Configurable fProtonTPCnsigHighYield{"protonTPCnsigmaHighPtYield", 4.0, "[proton] max TPC nsigma with high pT for yield"}; - Configurable fProtonTPCnsigLowCF{"protonTPCnsigmaLowPtCF", 2.0, "[proton] max TPC nsigma with low pT for CF"}; - Configurable fProtonTPCnsigHighCF{"protonTPCnsigmaHighPtCF", 3.0, "[proton] max TPC nsigma with high pT for CF"}; Configurable fProtonTOFnsigYield{"protonTOFnsigmaHighPtYield", 4.0, "[proton] max TOF nsigma with high pT yield"}; - Configurable fProtonTOFnsigCF{"protonTOFnsigmaHighPtCF", 4.0, "[proton] max TOF nsigma for CF"}; + Configurable fProtonNsigma{"protonNsigma", 2.0, "[proton] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; // Antiproton Cuts Configurable fAntiprotonDCAxyYield{"antiprotonDCAxyYield", 0.05, "[antiproton] DCAxy cut for yield"}; @@ -88,10 +87,8 @@ struct AngularCorrelationsInJets { Configurable fAntiprotonTPCTOFpT{"antiprotonTPCTOFswitchpT", 0.7, "[antiproton] pT for switch in TPC/TOF nsigma"}; Configurable fAntiprotonTPCnsigLowYield{"antiprotonTPCnsigmaLowPtYield", 4.0, "[antiproton] max TPC nsigma with low pT for yield"}; Configurable fAntiprotonTPCnsigHighYield{"antiprotonTPCnsigmaHighPtYield", 4.0, "[antiproton] max TPC nsigma with high pT for yield"}; - Configurable fAntiprotonTPCnsigLowCF{"antiprotonTPCnsigmaLowPtCF", 2.0, "[antiproton] max TPC nsigma with low pT for CF"}; - Configurable fAntiprotonTPCnsigHighCF{"antiprotonTPCnsigmaHighPtCF", 3.0, "[antiproton] max TPC nsigma with high pT for CF"}; Configurable fAntiprotonTOFnsigYield{"antiprotonTOFnsigmaHighPtYield", 4.0, "[antiproton] min TOF nsigma with high pT for yield"}; - Configurable fAntiprotonTOFnsigCF{"antiprotonTOFnsigmaHighPtCF", 4.0, "[antiproton] max TOF nsigma for CF"}; + Configurable fAntiprotonNsigma{"antiprotonNsigma", 2.0, "[antiproton] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; // Nuclei Cuts Configurable fNucleiDCAxyYield{"nucleiDCAxyYield", 0.05, "[nuclei] DCAxy cut for yield"}; @@ -101,10 +98,8 @@ struct AngularCorrelationsInJets { Configurable fNucleiTPCTOFpT{"nucleiTPCTOFswitchpT", 0.7, "[nuclei] pT for switch in TPC/TOF nsigma"}; Configurable fNucleiTPCnsigLowYield{"nucleiTPCnsigmaLowPtYield", 4.0, "[nuclei] max TPC nsigma with low pT for yield"}; Configurable fNucleiTPCnsigHighYield{"nucleiTPCnsigmaHighPtYield", 4.0, "[nuclei] max TPC nsigma with high pT for yield"}; - Configurable fNucleiTPCnsigLowCF{"nucleiTPCnsigmaLowPtCF", 2.0, "[nuclei] max TPC nsigma with low pT for CF"}; - Configurable fNucleiTPCnsigHighCF{"nucleiTPCnsigmaHighPtCF", 3.0, "[nuclei] max TPC nsigma with high pT for CF"}; Configurable fNucleiTOFnsigYield{"nucleiTOFnsigmaHighPtYield", 4.0, "[nuclei] min TOF nsigma with high pT for yield"}; - Configurable fNucleiTOFnsigCF{"nucleiTOFnsigmaHighPtCF", 4.0, "[nuclei] max TOF nsigma for CF"}; + Configurable fNucleiNsigma{"nucleiNsigma", 2.0, "[nuclei] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; // Antinuclei Cuts Configurable fAntinucleiDCAxyYield{"antinucleiDCAxyYield", 0.05, "[antinuclei] DCAxy cut for yield"}; @@ -114,27 +109,31 @@ struct AngularCorrelationsInJets { Configurable fAntinucleiTPCTOFpT{"antinucleiTPCTOFswitchpT", 0.7, "[antinuclei] pT for switch in TPC/TOF nsigma"}; Configurable fAntinucleiTPCnsigLowYield{"antinucleiTPCnsigmaLowPtYield", 4.0, "[antinuclei] max TPC nsigma with low pT for yield"}; Configurable fAntinucleiTPCnsigHighYield{"antinucleiTPCnsigmaHighPtYield", 4.0, "[antinuclei] max TPC nsigma with high pT for yield"}; - Configurable fAntinucleiTPCnsigLowCF{"antinucleiTPCnsigmaLowPtCF", 2.0, "[antinuclei] max TPC nsigma with low pT for CF"}; - Configurable fAntinucleiTPCnsigHighCF{"antinucleiTPCnsigmaHighPtCF", 3.0, "[antinuclei] max TPC nsigma with high pT for CF"}; Configurable fAntinucleiTOFnsigYield{"antinucleiTOFnsigmaHighPtYield", 4.0, "[antinuclei] min TOF nsigma with high pT for yield"}; - Configurable fAntinucleiTOFnsigCF{"antinucleiTOFnsigmaHighPtCF", 4.0, "[antinuclei] max TOF nsigma for CF"}; + Configurable fAntinucleiNsigma{"antinucleiNsigma", 2.0, "[nuclei] max combined nsigma for CF (sqrt(nsigTPC^2 + nsigTOF^2))"}; + Configurable fDeuteronAnalysis{"deuteronAnalysis", true, "true [false]: analyse (anti)deuterons [(anti)helium-3]"}; Configurable fUseTOFMass{"useTOFmass", true, "use TOF mass instead of pion mass if available"}; - Configurable fBufferSize{"trackBufferSize", 2000, "Number of mixed-event tracks being stored"}; + Configurable fBufferSize{"trackBufferSize", 200, "Number of mixed-event tracks being stored"}; // QC Configurables - Configurable fZVtx{"zVtx", 9999, "max zVertex"}; + Configurable fZVtx{"zVtx", 10.0, "max zVertex"}; Configurable fRmax{"Rmax", 0.4, "Maximum radius for jet and UE regions"}; Service ccdb; int mRunNumber; using FullTracksRun2 = soa::Join; + aod::TrackSelectionExtension, aod::TracksDCA, aod::pidTPCFullPr, aod::pidTPCFullDe, aod::pidTPCFullHe, aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullHe, aod::pidTOFmass, aod::pidTOFbeta, aod::pidTPCEl, aod::pidTPCMu, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCTr, aod::pidTPCAl>; using FullTracksRun3 = soa::Join; + aod::TracksDCA, aod::pidTPCFullPr, aod::pidTPCFullDe, aod::pidTPCFullHe, aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullHe, aod::pidTOFmass, aod::pidTOFbeta, aod::pidTPCEl, aod::pidTPCMu, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCTr, aod::pidTPCAl>; + // using McTracksRun2 = soa::Join; + // using McTracksRun3 = soa::Join; using BCsWithRun2Info = soa::Join; + // using McCollisions = soa::Join::iterator; Filter prelimTrackCuts = (aod::track::itsChi2NCl < fMaxChi2ITS && aod::track::tpcChi2NCl < fMaxChi2TPC && @@ -144,11 +143,15 @@ struct AngularCorrelationsInJets { Preslice perCollisionFullTracksRun2 = o2::aod::track::collisionId; Preslice perCollisionFullTracksRun3 = o2::aod::track::collisionId; + // PreSlice perCollisionMcTracksRun2 = o2::aod::track::collisionId; + // PreSlice perCollisionMcTracksRun3 = o2::aod::track::collisionId; AxisSpecs axisSpecs; HistogramRegistry registryData{"dataOutput", {}, OutputObjHandlingPolicy::AnalysisObject, false, true}; + // HistogramRegistry registryMC("MCOutput", {}, OutputObjHandlingPolicy::AnalysisObject, false, true); HistogramRegistry registryQA{"dataQA", {}, OutputObjHandlingPolicy::AnalysisObject, false, true}; + // HistogramRegistry registryMCQA("MCQA", {}, OutputObjHandlingPolicy::AnalysisObject, false, true); JetBkgSubUtils bkgSub; @@ -196,6 +199,10 @@ struct AngularCorrelationsInJets { registryQA.add("hPtJetAntinuclei_20", "Antinuclei p_{T} for jet p_{T} < 20 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); registryQA.add("hPtJetAntinuclei_30", "Antinuclei p_{T} for jet p_{T} < 30 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); registryQA.add("hPtJetAntinuclei_50", "Antinuclei p_{T} for jet p_{T} < 50 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos}); + registryQA.add("hPtJetProtonVsTotalJet", "Proton p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500}}); + registryQA.add("hPtJetAntiprotonVsTotalJet", "Antiproton p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500}}); + registryQA.add("hPtJetNucleiVsTotalJet", "Nuclei p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500}}); + registryQA.add("hPtJetAntinucleiVsTotalJet", "Antinuclei p_{T} vs. jet p_{T}", HistType::kTH2D, {axisSpecs.ptAxisPos, {1000, 0, 500}}); // nSigma registryData.add("hTPCsignal", "TPC signal", HistType::kTH2F, {{1000, -100, 100, "#it{p} [GeV/#it{c}]"}, {5000, 0, 5000, "d#it{E}/d#it{X} (a.u.)"}}); @@ -315,7 +322,7 @@ struct AngularCorrelationsInJets { } template - bool selectTrack(T const& track) + bool selectTrack(T const& track) // preliminary track selections { if (track.tpcNClsCrossedRows() < fMinRatioCrossedRowsTPC * track.tpcNClsFindable() || track.tpcNClsCrossedRows() < fMinNCrossedRowsTPC || @@ -333,9 +340,26 @@ struct AngularCorrelationsInJets { return true; } + template + bool singleSpeciesTPCNSigma(T const& track, int species) // make cut configurable + { // reject any track that has nsigma < 3 for more than 1 species + if (track.tpcNSigmaStoreEl() < 3.0 || track.tpcNSigmaStoreMu() < 3.0 || track.tpcNSigmaStorePi() < 3.0 || track.tpcNSigmaStoreKa() < 3.0 || track.tpcNSigmaStoreTr() < 3.0 || track.tpcNSigmaStoreAl() < 3.0) + return false; + switch (species) { + case 1: // (anti)proton + return (track.tpcNSigmaPr() < 3.0 && track.tpcNSigmaDe() > 3.0 && track.tpcNSigmaHe() > 3.0); + case 2: // (anti)deuteron + return (track.tpcNSigmaDe() < 3.0 && track.tpcNSigmaPr() > 3.0 && track.tpcNSigmaHe() > 3.0); + case 3: // (anti)helium-3 + return (track.tpcNSigmaHe() < 3.0 && track.tpcNSigmaDe() > 3.0 && track.tpcNSigmaPr() > 3.0); + } + } + template bool isProton(const T& track, bool tightCuts) { + // if (doprocessMCRun3) + // return (track.mcParticle().pdgCode() == 2212); if (track.sign() < 0) return false; @@ -347,20 +371,15 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaProtonCF"), track.pt(), track.tpcNSigmaPr()); - - // TPC - if (track.pt() < fProtonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > fProtonTPCnsigLowCF) - return false; - if (track.pt() > fProtonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > fProtonTPCnsigHighCF) - return false; - registryData.fill(HIST("hTOFnsigmaProtonCF"), track.pt(), track.tofNSigmaPr()); - // TOF - if (track.hasTOF()) { - if (track.pt() > fProtonTPCTOFpT && TMath::Abs(track.tofNSigmaPr()) > fProtonTOFnsigCF) + // nsigma + double tofNsigma = track.hasTOF() ? track.tofNSigmaPr() : 999; + if ((track.pt() < fProtonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > fProtonNsigma)) || (track.pt() > fProtonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + tofNsigma * tofNsigma) > fProtonNsigma))) + if (TMath::Sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + tofNsigma * tofNsigma) > fProtonNsigma) return false; - } + if (!singleSpeciesTPCNSigma(track, 1)) + return false; } else { // for yields // DCA if (TMath::Abs(track.dcaXY()) > fProtonDCAxyYield) @@ -391,6 +410,8 @@ struct AngularCorrelationsInJets { template bool isAntiproton(const T& track, bool tightCuts) { + // if (doprocessMCRun3) + // return (track.mcParticle().pdgCode() == -2212); if (track.sign() > 0) return false; @@ -402,20 +423,14 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaAntiprotonCF"), track.pt(), track.tpcNSigmaPr()); + registryData.fill(HIST("hTOFnsigmaAntiprotonCF"), track.pt(), track.tofNSigmaPr()); - // TPC - if (track.pt() < fAntiprotonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > fAntiprotonTPCnsigLowCF) + // nsigma + double tofNsigma = track.hasTOF() ? track.tofNSigmaPr() : 999; + if ((track.pt() < fAntiprotonTPCTOFpT && (TMath::Abs(track.tpcNSigmaPr()) > fAntiprotonNsigma)) || (track.pt() > fAntiprotonTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + tofNsigma * tofNsigma) > fAntiprotonNsigma))) return false; - if (track.pt() > fAntiprotonTPCTOFpT && TMath::Abs(track.tpcNSigmaPr()) > fAntiprotonTPCnsigHighCF) + if (!singleSpeciesTPCNSigma(track, 1)) return false; - - registryData.fill(HIST("hTOFnsigmaAntiprotonCF"), track.pt(), track.tofNSigmaPr()); - - // TOF - if (track.hasTOF()) { - if (track.pt() > fAntiprotonTPCTOFpT && TMath::Abs(track.tofNSigmaPr()) > fAntiprotonTOFnsigCF) - return false; - } } else { // for yields // DCA if (TMath::Abs(track.dcaXY()) > fAntiprotonDCAxyYield) @@ -446,6 +461,8 @@ struct AngularCorrelationsInJets { template bool isNucleus(const T& track, bool tightCuts) { + // if (doprocessMCRun3) + // return (track.mcParticle().pdgCode() == (fDeuteronAnalysis) ? 1000010020 : 1000020030); if (track.sign() < 0) return false; if (fDeuteronAnalysis) { @@ -457,20 +474,14 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaNucleiCF"), track.pt(), track.tpcNSigmaDe()); + registryData.fill(HIST("hTOFnsigmaNucleiCF"), track.pt(), track.tofNSigmaDe()); - // TPC - if (track.pt() < fNucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > fNucleiTPCnsigLowCF) + // nsigma + double tofNsigma = track.hasTOF() ? track.tofNSigmaDe() : 999; + if ((track.pt() < fNucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > fNucleiNsigma)) || (track.pt() > fNucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe() * track.tpcNSigmaDe() + tofNsigma * tofNsigma) > fNucleiNsigma))) return false; - if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > fNucleiTPCnsigHighCF) + if (!singleSpeciesTPCNSigma(track, 2)) return false; - - registryData.fill(HIST("hTOFnsigmaNucleiCF"), track.pt(), track.tofNSigmaDe()); - - // TOF - if (track.hasTOF()) { - if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tofNSigmaDe()) > fNucleiTOFnsigCF) - return false; - } } else { // for yields // DCA if (TMath::Abs(track.dcaXY()) > fNucleiDCAxyYield) @@ -503,20 +514,14 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaNucleiCF"), track.pt(), track.tpcNSigmaHe()); + registryData.fill(HIST("hTOFnsigmaNucleiCF"), track.pt(), track.tofNSigmaHe()); - // TPC - if (track.pt() < fNucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > fNucleiTPCnsigLowCF) + // nsigma + double tofNsigma = track.hasTOF() ? track.tofNSigmaHe() : 999; + if ((track.pt() < fNucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > fNucleiNsigma)) || (track.pt() > fNucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe() * track.tpcNSigmaHe() + tofNsigma * tofNsigma) > fNucleiNsigma))) return false; - if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > fNucleiTPCnsigHighCF) + if (!singleSpeciesTPCNSigma(track, 3)) return false; - - registryData.fill(HIST("hTOFnsigmaNucleiCF"), track.pt(), track.tofNSigmaHe()); - - // TOF - if (track.hasTOF()) { - if (track.pt() > fNucleiTPCTOFpT && TMath::Abs(track.tofNSigmaHe()) > fNucleiTOFnsigCF) - return false; - } } else { // for yields // DCA if (TMath::Abs(track.dcaXY()) > fNucleiDCAxyYield) @@ -548,6 +553,8 @@ struct AngularCorrelationsInJets { template bool isAntinucleus(const T& track, bool tightCuts) { + // if (doprocessMCRun3) + // return (track.mcParticle().pdgCode() == (fDeuteronAnalysis) ? -1000010020 : -1000020030); if (track.sign() > 0) return false; @@ -560,17 +567,13 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaAntinucleiCF"), track.pt(), track.tpcNSigmaDe()); - - // TPC - if (track.pt() < fAntinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > fAntinucleiTPCnsigLowCF) - return false; - if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaDe()) > fAntinucleiTPCnsigHighCF) - return false; - registryData.fill(HIST("hTOFnsigmaAntinucleiCF"), track.pt(), track.tofNSigmaDe()); - // TOF - if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tofNSigmaDe()) > fAntinucleiTOFnsigCF) + // nsigma + double tofNsigma = track.hasTOF() ? track.tofNSigmaDe() : 999; + if ((track.pt() < fAntinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaDe()) > fAntinucleiNsigma)) || (track.pt() > fAntinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaDe() * track.tpcNSigmaDe() + tofNsigma * tofNsigma) > fAntinucleiNsigma))) + return false; + if (!singleSpeciesTPCNSigma(track, 2)) return false; } else { // for yields // DCA @@ -602,17 +605,13 @@ struct AngularCorrelationsInJets { return false; registryData.fill(HIST("hTPCnsigmaAntinucleiCF"), track.pt(), track.tpcNSigmaHe()); - - // TPC - if (track.pt() < fAntinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > fAntinucleiTPCnsigLowCF) - return false; - if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tpcNSigmaHe()) > fAntinucleiTPCnsigHighCF) - return false; - registryData.fill(HIST("hTOFnsigmaAntinucleiCF"), track.pt(), track.tofNSigmaHe()); - // TOF - if (track.pt() > fAntinucleiTPCTOFpT && TMath::Abs(track.tofNSigmaHe()) > fAntinucleiTOFnsigCF) + // nsigma + double tofNsigma = track.hasTOF() ? track.tofNSigmaHe() : 999; + if ((track.pt() < fAntinucleiTPCTOFpT && (TMath::Abs(track.tpcNSigmaHe()) > fAntinucleiNsigma)) || (track.pt() > fAntinucleiTPCTOFpT && (TMath::Sqrt(track.tpcNSigmaHe() * track.tpcNSigmaHe() + tofNsigma * tofNsigma) > fAntinucleiNsigma))) + return false; + if (!singleSpeciesTPCNSigma(track, 3)) return false; } else { // for yields // DCA @@ -640,7 +639,7 @@ struct AngularCorrelationsInJets { return true; } - void setTrackBuffer(const auto& tempBuffer, auto& buffer) + void setTrackBuffer(const auto& tempBuffer, auto& buffer) // refresh track buffer { for (const auto& pair : tempBuffer) { if (static_cast(buffer.size()) == fBufferSize) { @@ -652,7 +651,7 @@ struct AngularCorrelationsInJets { } } - void fillMixedEventDeltas(const auto& track, const auto& buffer, int particleType, const TVector3 jetAxis) + void fillMixedEventDeltas(const auto& track, const auto& buffer, int particleType, const TVector3 jetAxis) // correlate tracks from current event with tracks from buffer, i.e. other events { if (buffer.size() == 0) return; @@ -876,7 +875,7 @@ struct AngularCorrelationsInJets { if (Delta > maxRadius) maxRadius = Delta; } - registryQA.fill(HIST("hMaxRadiusVsPt"), jet.pt(), maxRadius); // no entries - weird! + registryQA.fill(HIST("hMaxRadiusVsPt"), jet.pt(), maxRadius); // QA for comparison with nuclei_in_jets TVector3 pJet(0., 0., 0.); @@ -978,6 +977,7 @@ struct AngularCorrelationsInJets { continue; if (isProton(jetParticle, false)) { // collect protons in jet registryData.fill(HIST("hPtJetProton"), jetParticle.pt()); + registryQA.fill(HIST("hPtJetProtonVsTotalJet"), jetParticle.pt(), subtractedJetPerp.pt()); if (subtractedJetPerp.pt() < 15) { registryQA.fill(HIST("hPtJetProton_15"), jetParticle.pt()); } else if (subtractedJetPerp.pt() < 20) { @@ -987,8 +987,6 @@ struct AngularCorrelationsInJets { } else if (subtractedJetPerp.pt() < 50) { registryQA.fill(HIST("hPtJetProton_50"), jetParticle.pt()); } - if (jetParticle.hasTOF()) - registryData.fill(HIST("hTOFnsigmaProton"), jetParticle.pt(), jetParticle.tofNSigmaPr()); registryData.fill(HIST("hTrackProtocol"), 4); // # protons if (isProton(jetParticle, true)) { registryData.fill(HIST("hTrackProtocol"), 5); // # high purity protons @@ -997,6 +995,7 @@ struct AngularCorrelationsInJets { } } else if (isAntiproton(jetParticle, false)) { // collect antiprotons in jet registryData.fill(HIST("hPtJetAntiproton"), jetParticle.pt()); + registryQA.fill(HIST("hPtJetAntiprotonVsTotalJet"), jetParticle.pt(), subtractedJetPerp.pt()); if (subtractedJetPerp.pt() < 15) { registryQA.fill(HIST("hPtJetAntiproton_15"), jetParticle.pt()); } else if (subtractedJetPerp.pt() < 20) { @@ -1006,9 +1005,6 @@ struct AngularCorrelationsInJets { } else if (subtractedJetPerp.pt() < 50) { registryQA.fill(HIST("hPtJetAntiproton_50"), jetParticle.pt()); } - registryData.fill(HIST("hTPCnsigmaAntiproton"), jetParticle.pt(), jetParticle.tpcNSigmaPr()); - if (jetParticle.hasTOF()) - registryData.fill(HIST("hTOFnsigmaAntiproton"), jetParticle.pt(), jetParticle.tofNSigmaPr()); registryData.fill(HIST("hTrackProtocol"), 6); // # antiprotons if (isAntiproton(jetParticle, true)) { registryData.fill(HIST("hTrackProtocol"), 7); // # high purity antiprotons @@ -1017,6 +1013,7 @@ struct AngularCorrelationsInJets { } } else if (isNucleus(jetParticle, false)) { // collect nuclei in jet registryData.fill(HIST("hPtJetNuclei"), jetParticle.pt()); + registryQA.fill(HIST("hPtJetNucleiVsTotalJet"), jetParticle.pt(), subtractedJetPerp.pt()); if (subtractedJetPerp.pt() < 15) { registryQA.fill(HIST("hPtJetNuclei_15"), jetParticle.pt()); } else if (subtractedJetPerp.pt() < 20) { @@ -1026,18 +1023,6 @@ struct AngularCorrelationsInJets { } else if (subtractedJetPerp.pt() < 50) { registryQA.fill(HIST("hPtJetNuclei_50"), jetParticle.pt()); } - if (fDeuteronAnalysis) { - registryData.fill(HIST("hTPCnsigmaNuclei"), jetParticle.pt(), jetParticle.tpcNSigmaDe()); - } else { - registryData.fill(HIST("hTPCnsigmaNuclei"), jetParticle.pt(), jetParticle.tpcNSigmaHe()); - } - if (jetParticle.hasTOF()) { - if (fDeuteronAnalysis) { - registryData.fill(HIST("hTOFnsigmaNuclei"), jetParticle.pt(), jetParticle.tofNSigmaDe()); - } else { - registryData.fill(HIST("hTOFnsigmaNuclei"), jetParticle.pt(), jetParticle.tofNSigmaHe()); - } - } registryData.fill(HIST("hTrackProtocol"), 8); // # nuclei if (isNucleus(jetParticle, true)) { registryData.fill(HIST("hTrackProtocol"), 9); // # high purity nuclei @@ -1046,6 +1031,7 @@ struct AngularCorrelationsInJets { } } else if (isAntinucleus(jetParticle, false)) { registryData.fill(HIST("hPtJetAntinuclei"), jetParticle.pt()); + registryQA.fill(HIST("hPtJetAntinucleiVsTotalJet"), jetParticle.pt(), subtractedJetPerp.pt()); if (subtractedJetPerp.pt() < 15) { registryQA.fill(HIST("hPtJetAntinuclei_15"), jetParticle.pt()); } else if (subtractedJetPerp.pt() < 20) { @@ -1055,18 +1041,6 @@ struct AngularCorrelationsInJets { } else if (subtractedJetPerp.pt() < 50) { registryQA.fill(HIST("hPtJetAntinuclei_50"), jetParticle.pt()); } - if (fDeuteronAnalysis) { - registryData.fill(HIST("hTPCnsigmaAntinuclei"), jetParticle.pt(), jetParticle.tpcNSigmaDe()); - } else { - registryData.fill(HIST("hTPCnsigmaAntinuclei"), jetParticle.pt(), jetParticle.tpcNSigmaHe()); - } - if (jetParticle.hasTOF()) { - if (fDeuteronAnalysis) { - registryData.fill(HIST("hTOFnsigmaAntinuclei"), jetParticle.pt(), jetParticle.tofNSigmaDe()); - } else { - registryData.fill(HIST("hTOFnsigmaAntinuclei"), jetParticle.pt(), jetParticle.tofNSigmaHe()); - } - } registryData.fill(HIST("hTrackProtocol"), 10); // # antinuclei if (isAntinucleus(jetParticle, true)) { registryData.fill(HIST("hTrackProtocol"), 11); // # high purity antinuclei @@ -1144,10 +1118,6 @@ struct AngularCorrelationsInJets { mass = 0.139; } - // if (track.pt() > fMinLeadingPt) { - // leadingID = track.globalIndex(); - // } - if (track.tpcNClsFindable() != 0) { registryQA.fill(HIST("hRatioCrossedRowsTPC"), track.pt(), track.tpcNClsCrossedRows() / track.tpcNClsFindable()); } @@ -1246,6 +1216,24 @@ struct AngularCorrelationsInJets { } } PROCESS_SWITCH(AngularCorrelationsInJets, processRun3, "process Run 3 data", false); + + // void processMCRun3(McCollisions const& collisions, soa::Filtered const& tracks) + // { + // for (const auto& collision : collisions) { + // registryMC.fill(HIST("hEventProtocol"), 0); + // if (!collision.sel8()) + // continue; + // registryMC.fill(HIST("hNumberOfEvents"), 0); + // registryMC.fill(HIST("hEventProtocol"), 1); + // if (TMath::Abs(collision.posZ()) > fZVtx) + // continue; + + // auto slicedTracks = tracks.sliceBy(perCollisionMcTracksRun3, collision.globalIndex()); + + // fillHistograms(slicedTracks); + // } + // } + // PROCESS_SWITCH(AngularCorrelationsInJets, processMCRun3, "process Run 3 MC", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) From ac16c807899601430456885d4797a613e71fb631 Mon Sep 17 00:00:00 2001 From: Andrea Sofia Triolo Date: Wed, 11 Dec 2024 23:54:23 +0100 Subject: [PATCH 12/19] [PWGLF] nonPromptCascade task: fixed check on cascades from HF (#8944) --- PWGLF/Tasks/Strangeness/nonPromptCascade.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/nonPromptCascade.cxx b/PWGLF/Tasks/Strangeness/nonPromptCascade.cxx index 45e7e635847..00478a4cef5 100644 --- a/PWGLF/Tasks/Strangeness/nonPromptCascade.cxx +++ b/PWGLF/Tasks/Strangeness/nonPromptCascade.cxx @@ -597,9 +597,11 @@ struct NonPromptCascadeTask { int pdgCodeMom = 0; std::tuple fromHF{false, false}; - if (isGoodCascade && isGoodMatch) { + if (isGoodCascade) { fromHF = isFromHF(track.mcParticle()); - pdgCodeMom = track.mcParticle().has_mothers() ? track.mcParticle().mothers_as()[0].pdgCode() : 0; + if (isGoodMatch) { + pdgCodeMom = track.mcParticle().has_mothers() ? track.mcParticle().mothers_as()[0].pdgCode() : 0; + } } int itsTrackPDG = ITStrack.has_mcParticle() ? ITStrack.mcParticle().pdgCode() : 0; float deltaPtITSCascade = std::hypot(cascadeMomentum[0], cascadeMomentum[1]) - ITStrack.pt(); From 4e50c1d9dc76a156d9b3b5c0d77ac38600a699a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Thu, 12 Dec 2024 00:26:42 +0100 Subject: [PATCH 13/19] [PWGHF] Fix compilation warnings (#8946) --- PWGHF/HFC/Tasks/taskFlow.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PWGHF/HFC/Tasks/taskFlow.cxx b/PWGHF/HFC/Tasks/taskFlow.cxx index bd84b6982b1..fd87b1c5fe0 100644 --- a/PWGHF/HFC/Tasks/taskFlow.cxx +++ b/PWGHF/HFC/Tasks/taskFlow.cxx @@ -1677,7 +1677,7 @@ struct HfTaskFlow { // return size; // }; - auto getMultiplicity = [&collisions, this](FilteredCollisionsWSelMult::iterator const& collision) { + auto getMultiplicity = [](FilteredCollisionsWSelMult::iterator const& collision) { auto multiplicity = collision.numContrib(); return multiplicity; }; @@ -1696,7 +1696,7 @@ struct HfTaskFlow { HfCandidatesSelD0 const& candidates) { // we want to group collisions based on charged-track multiplicity - auto getMultiplicity = [&collisions, this](FilteredCollisionsWSelMult::iterator const& collision) { + auto getMultiplicity = [](FilteredCollisionsWSelMult::iterator const& collision) { auto multiplicity = collision.numContrib(); return multiplicity; }; @@ -1740,7 +1740,7 @@ struct HfTaskFlow { // return size; // }; - auto getMultiplicity = [&collisions, this](FilteredCollisionsWSelMult::iterator const& collision) { + auto getMultiplicity = [](FilteredCollisionsWSelMult::iterator const& collision) { auto multiplicity = collision.numContrib(); return multiplicity; }; @@ -1759,7 +1759,7 @@ struct HfTaskFlow { TracksWDcaSel const& /*tracks*/) { // we want to group collisions based on charged-track multiplicity - auto getMultiplicity = [&collisions, this](FilteredCollisionsWSelMult::iterator const& collision) { + auto getMultiplicity = [](FilteredCollisionsWSelMult::iterator const& collision) { auto multiplicity = collision.numContrib(); return multiplicity; }; @@ -1778,7 +1778,7 @@ struct HfTaskFlow { { // we want to group collisions based on charged-track multiplicity - auto getMultiplicity = [&collisions, this](FilteredCollisionsWSelMult::iterator const& collision) { + auto getMultiplicity = [](FilteredCollisionsWSelMult::iterator const& collision) { auto multiplicity = collision.numContrib(); return multiplicity; }; From 2894a2dea78d22f17ee1a5d4e4739dfe45d39601 Mon Sep 17 00:00:00 2001 From: Daiki Sekihata Date: Thu, 12 Dec 2024 00:28:43 +0100 Subject: [PATCH 14/19] [PWGEM/Dilepton] update dilepton HBT (#8948) --- PWGEM/Dilepton/Core/DielectronCut.cxx | 2 +- PWGEM/Dilepton/Core/Dilepton.h | 1 + PWGEM/Dilepton/Core/DileptonMC.h | 1 + PWGEM/Dilepton/Core/PhotonHBT.h | 134 ++++++++++-------- PWGEM/Dilepton/Core/SingleTrackQC.h | 1 + PWGEM/Dilepton/Core/SingleTrackQCMC.h | 1 + .../TableProducer/filterDielectronEvent.cxx | 56 ++++++-- PWGEM/Dilepton/Tasks/vpPairQC.cxx | 12 ++ PWGEM/Dilepton/Tasks/vpPairQCMC.cxx | 1 + PWGEM/PhotonMeson/Tasks/pcmQC.cxx | 11 +- PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx | 11 +- 11 files changed, 151 insertions(+), 80 deletions(-) diff --git a/PWGEM/Dilepton/Core/DielectronCut.cxx b/PWGEM/Dilepton/Core/DielectronCut.cxx index baeeda564ec..ba55fc3e86a 100644 --- a/PWGEM/Dilepton/Core/DielectronCut.cxx +++ b/PWGEM/Dilepton/Core/DielectronCut.cxx @@ -34,7 +34,7 @@ void DielectronCut::SetPairYRange(float minY, float maxY) { mMinPairY = minY; mMaxPairY = maxY; - LOG(info) << "Dielectron Cut, set pair eta range: " << mMinPairY << " - " << mMaxPairY; + LOG(info) << "Dielectron Cut, set pair y range: " << mMinPairY << " - " << mMaxPairY; } void DielectronCut::SetPairDCARange(float min, float max) { diff --git a/PWGEM/Dilepton/Core/Dilepton.h b/PWGEM/Dilepton/Core/Dilepton.h index 757c8d04a56..f0a9ff8fc2b 100644 --- a/PWGEM/Dilepton/Core/Dilepton.h +++ b/PWGEM/Dilepton/Core/Dilepton.h @@ -636,6 +636,7 @@ struct Dilepton { fEMEventCut.SetRequireNoCollInTimeRangeStrict(eventcuts.cfgRequireNoCollInTimeRangeStrict); fEMEventCut.SetRequireNoCollInITSROFStandard(eventcuts.cfgRequireNoCollInITSROFStandard); fEMEventCut.SetRequireNoCollInITSROFStrict(eventcuts.cfgRequireNoCollInITSROFStrict); + fEMEventCut.SetRequireNoHighMultCollInPrevRof(eventcuts.cfgRequireNoHighMultCollInPrevRof); } o2::analysis::MlResponseDielectronSingleTrack mlResponseSingleTrack; diff --git a/PWGEM/Dilepton/Core/DileptonMC.h b/PWGEM/Dilepton/Core/DileptonMC.h index d4291adb641..c6dca140962 100644 --- a/PWGEM/Dilepton/Core/DileptonMC.h +++ b/PWGEM/Dilepton/Core/DileptonMC.h @@ -537,6 +537,7 @@ struct DileptonMC { fEMEventCut.SetRequireNoCollInTimeRangeStrict(eventcuts.cfgRequireNoCollInTimeRangeStrict); fEMEventCut.SetRequireNoCollInITSROFStandard(eventcuts.cfgRequireNoCollInITSROFStandard); fEMEventCut.SetRequireNoCollInITSROFStrict(eventcuts.cfgRequireNoCollInITSROFStrict); + fEMEventCut.SetRequireNoHighMultCollInPrevRof(eventcuts.cfgRequireNoHighMultCollInPrevRof); } o2::analysis::MlResponseDielectronSingleTrack mlResponseSingleTrack; diff --git a/PWGEM/Dilepton/Core/PhotonHBT.h b/PWGEM/Dilepton/Core/PhotonHBT.h index f52b2e626b3..9b395559216 100644 --- a/PWGEM/Dilepton/Core/PhotonHBT.h +++ b/PWGEM/Dilepton/Core/PhotonHBT.h @@ -100,8 +100,6 @@ struct PhotonHBT { Configurable cfgOccupancyEstimator{"cfgOccupancyEstimator", 0, "FT0C:0, Track:1"}; Configurable cfgCentMin{"cfgCentMin", 0, "min. centrality"}; Configurable cfgCentMax{"cfgCentMax", 999, "max. centrality"}; - // Configurable cfgSpherocityMin{"cfgSpherocityMin", -999.f, "min. spherocity"}; - // Configurable cfgSpherocityMax{"cfgSpherocityMax", +999.f, "max. spherocity"}; Configurable maxY{"maxY", 0.8, "maximum rapidity for reconstructed particles"}; Configurable cfgDoMix{"cfgDoMix", true, "flag for event mixing"}; Configurable ndepth{"ndepth", 100, "depth for event mixing"}; @@ -114,8 +112,12 @@ struct PhotonHBT { Configurable cfgNtracksPV08Min{"cfgNtracksPV08Min", -1, "min. multNTracksPV"}; Configurable cfgNtracksPV08Max{"cfgNtracksPV08Max", static_cast(1e+9), "max. multNTracksPV"}; Configurable cfgApplyWeightTTCA{"cfgApplyWeightTTCA", true, "flag to apply weighting by 1/N"}; + Configurable cfgUseLCMS{"cfgUseLCMS", true, "measure relative momentum in LCMS for 1D"}; // always in LCMS for 3D + ConfigurableAxis ConfQBins{"ConfQBins", {60, 0, +0.3f}, "q bins for output histograms"}; ConfigurableAxis ConfKtBins{"ConfKtBins", {VARIABLE_WIDTH, 0.0, 0.1, 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}, "kT bins for output histograms"}; + ConfigurableAxis ConfM1Bins{"ConfM1Bins", {VARIABLE_WIDTH, 0.0, 0.14, 0.5, 1.1, 2.7, 3.2, 4.0}, "m1 bins for output histograms"}; + ConfigurableAxis ConfM2Bins{"ConfM2Bins", {VARIABLE_WIDTH, 0.0, 0.14, 0.5, 1.1, 2.7, 3.2, 4.0}, "m1 bins for output histograms"}; EMEventCut fEMEventCut; struct : ConfigurableGroup { @@ -137,6 +139,7 @@ struct PhotonHBT { Configurable cfgRequireNoCollInTimeRangeStrict{"cfgRequireNoCollInTimeRangeStrict", false, "require no collision in time range strict"}; Configurable cfgRequireNoCollInITSROFStandard{"cfgRequireNoCollInITSROFStandard", false, "require no collision in time range standard"}; Configurable cfgRequireNoCollInITSROFStrict{"cfgRequireNoCollInITSROFStrict", false, "require no collision in time range strict"}; + Configurable cfgRequireNoHighMultCollInPrevRof{"cfgRequireNoHighMultCollInPrevRof", false, "require no HM collision in previous ITS ROF"}; } eventcuts; V0PhotonCut fV0PhotonCut; @@ -177,20 +180,16 @@ struct PhotonHBT { Configurable cfg_min_pair_y{"cfg_min_pair_y", -0.8, "min pair rapidity"}; Configurable cfg_max_pair_y{"cfg_max_pair_y", +0.8, "max pair rapidity"}; Configurable cfg_min_pair_dca3d{"cfg_min_pair_dca3d", 0.0, "min pair dca3d in sigma"}; - Configurable cfg_max_pair_dca3d{"cfg_max_pair_dca3d", 2.0, "max pair dca3d in sigma"}; + Configurable cfg_max_pair_dca3d{"cfg_max_pair_dca3d", 1e+10, "max pair dca3d in sigma"}; Configurable cfg_apply_phiv{"cfg_apply_phiv", true, "flag to apply phiv cut"}; Configurable cfg_apply_pf{"cfg_apply_pf", false, "flag to apply phiv prefilter"}; - Configurable cfg_require_itsib_any{"cfg_require_itsib_any", false, "flag to require ITS ib any hits"}; - Configurable cfg_require_itsib_1st{"cfg_require_itsib_1st", true, "flag to require ITS ib 1st hit"}; Configurable cfg_phiv_slope{"cfg_phiv_slope", 0.0185, "slope for m vs. phiv"}; Configurable cfg_phiv_intercept{"cfg_phiv_intercept", -0.0280, "intercept for m vs. phiv"}; - Configurable cfg_apply_phiv_meedep{"cfg_apply_phiv_meedep", true, "flag to apply mee-dependent phiv cut"}; Configurable cfg_min_phiv{"cfg_min_phiv", 0.0, "min phiv (constant)"}; Configurable cfg_max_phiv{"cfg_max_phiv", 3.2, "max phiv (constant)"}; - Configurable cfg_min_mee_for_phiv{"cfg_min_mee_for_phiv", 0.0, "min mee for phiv (constant)"}; - Configurable cfg_max_mee_for_phiv{"cfg_max_mee_for_phiv", 1e+10, "max mee for phiv (constant)"}; Configurable cfg_min_pt_track{"cfg_min_pt_track", 0.2, "min pT for single track"}; + Configurable cfg_max_pt_track{"cfg_max_pt_track", 1e+10, "max pT for single track"}; Configurable cfg_min_eta_track{"cfg_min_eta_track", -0.8, "max eta for single track"}; Configurable cfg_max_eta_track{"cfg_max_eta_track", +0.8, "max eta for single track"}; Configurable cfg_max_dca3dsigma_track{"cfg_max_dca3dsigma_track", 1e+10, "max DCA 3D in sigma"}; @@ -201,14 +200,16 @@ struct PhotonHBT { Configurable cfg_max_chi2tpc{"cfg_max_chi2tpc", 4.0, "max chi2/NclsTPC"}; Configurable cfg_max_chi2its{"cfg_max_chi2its", 5.0, "max chi2/NclsITS"}; Configurable cfg_max_chi2tof{"cfg_max_chi2tof", 1e+10, "max chi2 TOF"}; - Configurable cfg_max_dcaxy{"cfg_max_dcaxy", 1.0, "max dca XY for single track in cm"}; - Configurable cfg_max_dcaz{"cfg_max_dcaz", 1.0, "max dca Z for single track in cm"}; + Configurable cfg_max_dcaxy{"cfg_max_dcaxy", 0.1, "max dca XY for single track in cm"}; + Configurable cfg_max_dcaz{"cfg_max_dcaz", 0.2, "max dca Z for single track in cm"}; Configurable cfg_min_its_cluster_size{"cfg_min_its_cluster_size", 0.f, "min ITS cluster size"}; Configurable cfg_max_its_cluster_size{"cfg_max_its_cluster_size", 16.f, "max ITS cluster size"}; Configurable cfg_min_p_its_cluster_size{"cfg_min_p_its_cluster_size", 0.0, "min p to apply ITS cluster size cut"}; Configurable cfg_max_p_its_cluster_size{"cfg_max_p_its_cluster_size", 0.0, "max p to apply ITS cluster size cut"}; Configurable cfg_min_rel_diff_pin{"cfg_min_rel_diff_pin", -1e+10, "min rel. diff. between pin and ppv"}; Configurable cfg_max_rel_diff_pin{"cfg_max_rel_diff_pin", +1e+10, "max rel. diff. between pin and ppv"}; + Configurable cfg_require_itsib_any{"cfg_require_itsib_any", false, "flag to require ITS ib any hits"}; + Configurable cfg_require_itsib_1st{"cfg_require_itsib_1st", true, "flag to require ITS ib 1st hit"}; Configurable cfg_pid_scheme{"cfg_pid_scheme", static_cast(DielectronCut::PIDSchemes::kTPChadrejORTOFreq), "pid scheme [kTOFreq : 0, kTPChadrej : 1, kTPChadrejORTOFreq : 2, kTPConly : 3, kTOFif = 4, kPIDML = 5]"}; Configurable cfg_min_TPCNsigmaEl{"cfg_min_TPCNsigmaEl", -2.0, "min. TPC n sigma for electron inclusion"}; @@ -368,7 +369,7 @@ struct PhotonHBT { engine = std::mt19937(seed_gen()); dist01 = std::uniform_int_distribution(0, 1); - fRegistry.add("Pair/mix/hDiffBC", "diff. global BC in mixed event;|BC_{current} - BC_{mixed}|", kTH1D, {{1001, -0.5, 1000.5}}, true); + fRegistry.add("Pair/mix/hDiffBC", "diff. global BC in mixed event;|BC_{current} - BC_{mixed}|", kTH1D, {{10001, -0.5, 10000.5}}, true); if (doprocessTriggerAnalysis) { fRegistry.add("Event/hNInspectedTVX", "N inspected TVX;run number;N_{TVX}", kTProfile, {{80000, 520000.5, 600000.5}}, true); } @@ -427,27 +428,41 @@ struct PhotonHBT { fRegistry.add("Event/after/hEP2_CentFT0C_forMix", Form("2nd harmonics event plane for mix;centrality FT0C (%%);#Psi_{2}^{%s} (rad.)", qvec_det_names[cfgEP2Estimator_for_Mix].data()), kTH2F, {{110, 0, 110}, {180, -M_PI_2, +M_PI_2}}, false); // pair info - const AxisSpec axis_kt{ConfKtBins, "k_{T} (GeV/c)"}; - const AxisSpec axis_qinv{60, 0.0, +0.3, "q_{inv} (GeV/c)"}; - const AxisSpec axis_kstar{60, 0.0, +0.3, "k* (GeV/c)"}; - const AxisSpec axis_qabs_lcms{60, 0.0, +0.3, "|#bf{q}|^{LCMS} (GeV/c)"}; - const AxisSpec axis_qout{60, 0.0, +0.3, "q_{out} (GeV/c)"}; // qout does not change between LAB and LCMS frame - const AxisSpec axis_qside{60, 0.0, +0.3, "q_{side} (GeV/c)"}; // qside does not change between LAB and LCMS frame - const AxisSpec axis_qlong{60, 0.0, +0.3, "q_{long} (GeV/c)"}; + std::string m1_axis_title = "m_{#gamma} (GeV/c^{2})"; + std::string m2_axis_title = "m_{#gamma*} (GeV/c^{2})"; + if constexpr (pairtype == ggHBTPairType::kPCMPCM) { + m1_axis_title = "m_{#gamma} (GeV/c^{2})"; + m2_axis_title = "m_{#gamma} (GeV/c^{2})"; + } else if constexpr (pairtype == ggHBTPairType::kPCMEE) { + m1_axis_title = "m_{#gamma} (GeV/c^{2})"; + m2_axis_title = "m_{#gamma*} (GeV/c^{2})"; + } else if constexpr (pairtype == ggHBTPairType::kEEEE) { + m1_axis_title = "m_{#gamma*} (GeV/c^{2})"; + m2_axis_title = "m_{#gamma*} (GeV/c^{2})"; + } + const AxisSpec axis_m1{ConfM1Bins, m1_axis_title}; + const AxisSpec axis_m2{ConfM2Bins, m2_axis_title}; - if (cfgDo3D) { - fRegistry.add("Pair/same/hs_3d", "diphoton correlation 3D LCMS", kTHnSparseD, {axis_qout, axis_qside, axis_qlong, axis_kt}, true); - } else { - if constexpr (pairtype == ggHBTPairType::kPCMPCM) { // identical particle femtoscopy - fRegistry.add("Pair/same/hs_1d", "diphoton correlation 1D", kTHnSparseD, {axis_qinv, axis_qabs_lcms, axis_kt}, true); - } else { // non-identical particle femtoscopy - fRegistry.add("Pair/same/hs_1d", "diphoton correlation 1D", kTHnSparseD, {axis_kstar, axis_qabs_lcms, axis_kt}, true); + const AxisSpec axis_kt{ConfKtBins, "k_{T} (GeV/c)"}; + const AxisSpec axis_qinv{ConfQBins, "q_{inv} (GeV/c)"}; + const AxisSpec axis_qabs_lcms{ConfQBins, "|#bf{q}|^{LCMS} (GeV/c)"}; + const AxisSpec axis_qout{ConfQBins, "q_{out} (GeV/c)"}; // qout does not change between LAB and LCMS frame + const AxisSpec axis_qside{ConfQBins, "q_{side} (GeV/c)"}; // qside does not change between LAB and LCMS frame + const AxisSpec axis_qlong{ConfQBins, "q_{long} (GeV/c)"}; + + if (cfgDo3D) { // 3D + fRegistry.add("Pair/same/hs_3d", "diphoton correlation 3D LCMS", kTHnSparseD, {axis_qout, axis_qside, axis_qlong, axis_kt, axis_m1, axis_m2}, true); + } else { // 1D + if (cfgUseLCMS) { + fRegistry.add("Pair/same/hs_1d", "diphoton correlation 1D LCMS", kTHnSparseD, {axis_qabs_lcms, axis_kt, axis_m1, axis_m2}, true); + } else { + fRegistry.add("Pair/same/hs_1d", "diphoton correlation 1D", kTHnSparseD, {axis_qinv, axis_kt, axis_m1, axis_m2}, true); } } - fRegistry.add("Pair/same/hDeltaEtaDeltaPhi", "distance between 2 LS tracks in #eta-#varphi plane;#Delta#varphi (rad.);#Delta#eta", kTH2D, {{80, -0.2, +0.2}, {80, -0.2, 0.2}}, true); // deta, dphi of track momentum - if constexpr (pairtype == ggHBTPairType::kPCMPCM) { // dr, dz of conversion points - fRegistry.add("Pair/same/hDeltaRDeltaZ", "diphoton distance in RZ;#Deltar = #sqrt{(#Deltax)^{2} + (#Deltay)^{2}} (cm);|#Deltaz| (cm)", kTH2D, {{40, 0, 20}, {40, 0, 20}}, true); + fRegistry.add("Pair/same/hDeltaEtaDeltaPhi", "distance between 2 LS tracks in #eta-#varphi plane;#Delta#varphi (rad.);#Delta#eta", kTH2D, {{180, -M_PI, M_PI}, {200, -1, +1}}, true); // deta, dphi of track momentum + if constexpr (pairtype == ggHBTPairType::kPCMPCM) { + fRegistry.add("Pair/same/hDeltaRDeltaZ", "diphoton distance in RZ;#Deltar = #sqrt{(#Deltax)^{2} + (#Deltay)^{2}} (cm);|#Deltaz| (cm)", kTH2D, {{100, 0, 50}, {100, 0, 50}}, true); // dr, dz of conversion points } fRegistry.addClone("Pair/same/", "Pair/mix/"); @@ -468,6 +483,7 @@ struct PhotonHBT { fEMEventCut.SetRequireNoCollInTimeRangeStrict(eventcuts.cfgRequireNoCollInTimeRangeStrict); fEMEventCut.SetRequireNoCollInITSROFStandard(eventcuts.cfgRequireNoCollInITSROFStandard); fEMEventCut.SetRequireNoCollInITSROFStrict(eventcuts.cfgRequireNoCollInITSROFStrict); + fEMEventCut.SetRequireNoHighMultCollInPrevRof(eventcuts.cfgRequireNoHighMultCollInPrevRof); } void DefinePCMCut() @@ -516,7 +532,7 @@ struct PhotonHBT { if (pcmcuts.cfg_require_v0_with_tpconly) { fV0PhotonCut.SetRequireTPConly(true); fV0PhotonCut.SetMaxPCA(3.0); - fV0PhotonCut.SetRxyRange(36, 90); + fV0PhotonCut.SetRxyRange(32, 90); } if (pcmcuts.cfg_require_v0_on_wwire_ib) { fV0PhotonCut.SetMaxPCA(0.3); @@ -543,7 +559,7 @@ struct PhotonHBT { fDielectronCut.RequireITSib1st(dielectroncuts.cfg_require_itsib_1st); // for track - fDielectronCut.SetTrackPtRange(dielectroncuts.cfg_min_pt_track, 1e+10f); + fDielectronCut.SetTrackPtRange(dielectroncuts.cfg_min_pt_track, dielectroncuts.cfg_max_pt_track); fDielectronCut.SetTrackEtaRange(dielectroncuts.cfg_min_eta_track, dielectroncuts.cfg_max_eta_track); fDielectronCut.SetTrackDca3DRange(0.f, dielectroncuts.cfg_max_dca3dsigma_track); // in sigma fDielectronCut.SetMinNClustersTPC(dielectroncuts.cfg_min_ncluster_tpc); @@ -615,8 +631,8 @@ struct PhotonHBT { ROOT::Math::PxPyPzEVector v2_cartesian(v2); ROOT::Math::PxPyPzEVector q12_cartesian = (v1_cartesian - v2_cartesian) * rndm; float beta = (v1 + v2).Beta(); - float beta_x = beta * std::cos((v1 + v2).Phi()) * std::sin((v1 + v2).Theta()); - float beta_y = beta * std::sin((v1 + v2).Phi()) * std::sin((v1 + v2).Theta()); + // float beta_x = beta * std::cos((v1 + v2).Phi()) * std::sin((v1 + v2).Theta()); + // float beta_y = beta * std::sin((v1 + v2).Phi()) * std::sin((v1 + v2).Theta()); float beta_z = beta * std::cos((v1 + v2).Theta()); // longitudinally co-moving system (LCMS) @@ -631,13 +647,13 @@ struct PhotonHBT { // float qabs_lcms_tmp = std::sqrt(std::pow(qout_lcms, 2) + std::pow(qside_lcms, 2) + std::pow(qlong_lcms, 2)); // LOGF(info, "qabs_lcms = %f, qabs_lcms_tmp = %f", qabs_lcms, qabs_lcms_tmp); - // pair rest frame (PRF) - ROOT::Math::Boost boostPRF = ROOT::Math::Boost(-beta_x, -beta_y, -beta_z); - ROOT::Math::PxPyPzEVector v1_prf = boostPRF(v1_cartesian); - ROOT::Math::PxPyPzEVector v2_prf = boostPRF(v2_cartesian); - ROOT::Math::PxPyPzEVector rel_k = (v1_prf - v2_prf) * rndm; - float kstar = 0.5 * rel_k.P(); - // LOGF(info, "qabs_lcms = %f, qinv = %f, kstar = %f", qabs_lcms, qinv, kstar); + // // pair rest frame (PRF) + // ROOT::Math::Boost boostPRF = ROOT::Math::Boost(-beta_x, -beta_y, -beta_z); + // ROOT::Math::PxPyPzEVector v1_prf = boostPRF(v1_cartesian); + // ROOT::Math::PxPyPzEVector v2_prf = boostPRF(v2_cartesian); + // ROOT::Math::PxPyPzEVector rel_k = (v1_prf - v2_prf) * rndm; + // float kstar = 0.5 * rel_k.P(); + // // LOGF(info, "qabs_lcms = %f, qinv = %f, kstar = %f", qabs_lcms, qinv, kstar); // ROOT::Math::PxPyPzEVector v1_lcms_cartesian = bst_z(v1_cartesian); // ROOT::Math::PxPyPzEVector v2_lcms_cartesian = bst_z(v2_cartesian); @@ -654,12 +670,12 @@ struct PhotonHBT { // LOGF(info, "qabs_lcms = %f, qabs_lcms_tmp = %f", qabs_lcms, qabs_lcms_tmp); if (cfgDo3D) { - fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("hs_3d"), fabs(qout_lcms), fabs(qside_lcms), fabs(qlong_lcms), kt, weight); // qosl can be [-inf, +inf] and CF is symmetric for pos and neg qosl. To reduce stat. unc. absolute value is taken here. + fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("hs_3d"), fabs(qout_lcms), fabs(qside_lcms), fabs(qlong_lcms), kt, v1.M(), v2.M(), weight); // qosl can be [-inf, +inf] and CF is symmetric for pos and neg qosl. To reduce stat. unc. absolute value is taken here. } else { - if constexpr (pairtype == ggHBTPairType::kPCMPCM) { // identical particle femtoscopy - fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("hs_1d"), qinv, qabs_lcms, kt, weight); + if (cfgUseLCMS) { + fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("hs_1d"), qabs_lcms, kt, v1.M(), v2.M(), weight); } else { - fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("hs_1d"), kstar, qabs_lcms, kt, weight); + fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("hs_1d"), qinv, kt, v1.M(), v2.M(), weight); } } } @@ -763,11 +779,11 @@ struct PhotonHBT { continue; } - float deta_pos = pos1.eta() - pos2.eta(); - float dphi_pos = pos1.phi() - pos2.phi(); + float deta_pos = pos1.sign() * pos1.pt() > pos2.sign() * pos2.pt() ? pos1.eta() - pos2.eta() : pos2.eta() - pos1.eta(); + float dphi_pos = pos1.sign() * pos1.pt() > pos2.sign() * pos2.pt() ? pos1.phi() - pos2.phi() : pos2.phi() - pos1.phi(); o2::math_utils::bringToPMPi(dphi_pos); - float deta_ele = ele1.eta() - ele2.eta(); - float dphi_ele = ele1.phi() - ele2.phi(); + float deta_ele = ele1.sign() * ele1.pt() > ele2.sign() * ele2.pt() ? ele1.eta() - ele2.eta() : ele2.eta() - ele1.eta(); + float dphi_ele = ele1.sign() * ele1.pt() > ele2.sign() * ele2.pt() ? ele1.phi() - ele2.phi() : ele2.phi() - ele1.phi(); o2::math_utils::bringToPMPi(dphi_ele); if (ggpaircuts.applydEtadPhi && std::pow(deta_pos / ggpaircuts.cfgMinDeltaEta, 2) + std::pow(dphi_pos / ggpaircuts.cfgMinDeltaPhi, 2) < 1.f) { continue; @@ -872,11 +888,11 @@ struct PhotonHBT { std::pair pair_tmp = std::make_pair(std::make_pair(pos1.trackId(), ele1.trackId()), std::make_pair(pos2.trackId(), ele2.trackId())); if (std::find(used_pairs_per_collision.begin(), used_pairs_per_collision.end(), pair_tmp) == used_pairs_per_collision.end()) { - float deta_pos = pos1.eta() - pos2.eta(); - float dphi_pos = pos1.phi() - pos2.phi(); + float deta_pos = pos1.sign() * pos1.pt() > pos2.sign() * pos2.pt() ? pos1.eta() - pos2.eta() : pos2.eta() - pos1.eta(); + float dphi_pos = pos1.sign() * pos1.pt() > pos2.sign() * pos2.pt() ? pos1.phi() - pos2.phi() : pos2.phi() - pos1.phi(); o2::math_utils::bringToPMPi(dphi_pos); - float deta_ele = ele1.eta() - ele2.eta(); - float dphi_ele = ele1.phi() - ele2.phi(); + float deta_ele = ele1.sign() * ele1.pt() > ele2.sign() * ele2.pt() ? ele1.eta() - ele2.eta() : ele2.eta() - ele1.eta(); + float dphi_ele = ele1.sign() * ele1.pt() > ele2.sign() * ele2.pt() ? ele1.phi() - ele2.phi() : ele2.phi() - ele1.phi(); o2::math_utils::bringToPMPi(dphi_ele); if (ggpaircuts.applydEtadPhi && std::pow(deta_pos / ggpaircuts.cfgMinDeltaEta, 2) + std::pow(dphi_pos / ggpaircuts.cfgMinDeltaPhi, 2) < 1.f) { continue; @@ -981,11 +997,11 @@ struct PhotonHBT { ROOT::Math::PtEtaPhiMVector v_ele2(ele2.pt(), ele2.eta(), ele2.phi(), o2::constants::physics::MassElectron); ROOT::Math::PtEtaPhiMVector v2_ee = v_pos2 + v_ele2; - float deta_pos = pos1.eta() - pos2.eta(); - float dphi_pos = pos1.phi() - pos2.phi(); + float deta_pos = pos1.sign() * pos1.pt() > pos2.sign() * pos2.pt() ? pos1.eta() - pos2.eta() : pos2.eta() - pos1.eta(); + float dphi_pos = pos1.sign() * pos1.pt() > pos2.sign() * pos2.pt() ? pos1.phi() - pos2.phi() : pos2.phi() - pos1.phi(); o2::math_utils::bringToPMPi(dphi_pos); - float deta_ele = ele1.eta() - ele2.eta(); - float dphi_ele = ele1.phi() - ele2.phi(); + float deta_ele = ele1.sign() * ele1.pt() > ele2.sign() * ele2.pt() ? ele1.eta() - ele2.eta() : ele2.eta() - ele1.eta(); + float dphi_ele = ele1.sign() * ele1.pt() > ele2.sign() * ele2.pt() ? ele1.phi() - ele2.phi() : ele2.phi() - ele1.phi(); o2::math_utils::bringToPMPi(dphi_ele); if (ggpaircuts.applydEtadPhi && std::pow(deta_pos / ggpaircuts.cfgMinDeltaEta, 2) + std::pow(dphi_pos / ggpaircuts.cfgMinDeltaPhi, 2) < 1.f) { continue; @@ -1068,11 +1084,11 @@ struct PhotonHBT { continue; } - float deta_pos = pos1.Eta() - pos2.Eta(); - float dphi_pos = pos1.Phi() - pos2.Phi(); + float deta_pos = pos1.Pt() > pos2.Pt() ? pos1.Eta() - pos2.Eta() : pos2.Eta() - pos1.Eta(); + float dphi_pos = pos1.Pt() > pos2.Pt() ? pos1.Phi() - pos2.Phi() : pos2.Phi() - pos1.Phi(); o2::math_utils::bringToPMPi(dphi_pos); - float deta_ele = ele1.Eta() - ele2.Eta(); - float dphi_ele = ele1.Phi() - ele2.Phi(); + float deta_ele = ele1.Pt() < ele2.Pt() ? ele1.Eta() - ele2.Eta() : ele2.Eta() - ele1.Eta(); // flipped + float dphi_ele = ele1.Pt() < ele2.Pt() ? ele1.Phi() - ele2.Phi() : ele2.Phi() - ele1.Phi(); // flipped o2::math_utils::bringToPMPi(dphi_ele); if (ggpaircuts.applydEtadPhi && std::pow(deta_pos / ggpaircuts.cfgMinDeltaEta, 2) + std::pow(dphi_pos / ggpaircuts.cfgMinDeltaPhi, 2) < 1.f) { continue; diff --git a/PWGEM/Dilepton/Core/SingleTrackQC.h b/PWGEM/Dilepton/Core/SingleTrackQC.h index b1efa7d026d..a57c14309d4 100644 --- a/PWGEM/Dilepton/Core/SingleTrackQC.h +++ b/PWGEM/Dilepton/Core/SingleTrackQC.h @@ -317,6 +317,7 @@ struct SingleTrackQC { fEMEventCut.SetRequireNoCollInTimeRangeStrict(eventcuts.cfgRequireNoCollInTimeRangeStrict); fEMEventCut.SetRequireNoCollInITSROFStandard(eventcuts.cfgRequireNoCollInITSROFStandard); fEMEventCut.SetRequireNoCollInITSROFStrict(eventcuts.cfgRequireNoCollInITSROFStrict); + fEMEventCut.SetRequireNoHighMultCollInPrevRof(eventcuts.cfgRequireNoHighMultCollInPrevRof); } o2::analysis::MlResponseDielectronSingleTrack mlResponseSingleTrack; diff --git a/PWGEM/Dilepton/Core/SingleTrackQCMC.h b/PWGEM/Dilepton/Core/SingleTrackQCMC.h index 6082f774fc3..45c40aa5c1f 100644 --- a/PWGEM/Dilepton/Core/SingleTrackQCMC.h +++ b/PWGEM/Dilepton/Core/SingleTrackQCMC.h @@ -369,6 +369,7 @@ struct SingleTrackQCMC { fEMEventCut.SetRequireNoCollInTimeRangeStrict(eventcuts.cfgRequireNoCollInTimeRangeStrict); fEMEventCut.SetRequireNoCollInITSROFStandard(eventcuts.cfgRequireNoCollInITSROFStandard); fEMEventCut.SetRequireNoCollInITSROFStrict(eventcuts.cfgRequireNoCollInITSROFStrict); + fEMEventCut.SetRequireNoHighMultCollInPrevRof(eventcuts.cfgRequireNoHighMultCollInPrevRof); } o2::analysis::MlResponseDielectronSingleTrack mlResponseSingleTrack; diff --git a/PWGEM/Dilepton/TableProducer/filterDielectronEvent.cxx b/PWGEM/Dilepton/TableProducer/filterDielectronEvent.cxx index 7e9155c04bc..3377fe4f3f6 100644 --- a/PWGEM/Dilepton/TableProducer/filterDielectronEvent.cxx +++ b/PWGEM/Dilepton/TableProducer/filterDielectronEvent.cxx @@ -13,6 +13,11 @@ /// \author daiki.sekihata@cern.ch #include +#include +#include +#include +#include + #include "Math/Vector4D.h" #include "Framework/runDataProcessing.h" #include "Framework/AnalysisTask.h" @@ -66,26 +71,30 @@ struct filterDielectronEvent { // Operation and minimisation criteria Configurable fillQAHistogram{"fillQAHistogram", false, "flag to fill QA histograms"}; Configurable d_bz_input{"d_bz_input", -999, "bz field in kG, -999 is automatic"}; - Configurable min_ncluster_tpc{"min_ncluster_tpc", 10, "min ncluster tpc"}; - Configurable mincrossedrows{"mincrossedrows", 70, "min. crossed rows"}; + Configurable min_ncluster_tpc{"min_ncluster_tpc", 0, "min ncluster tpc"}; + Configurable mincrossedrows{"mincrossedrows", 80, "min. crossed rows"}; Configurable min_tpc_cr_findable_ratio{"min_tpc_cr_findable_ratio", 0.8, "min. TPC Ncr/Nf ratio"}; Configurable max_mean_its_cluster_size{"max_mean_its_cluster_size", 16.f, "max. x cos(lambda)"}; - Configurable max_p_for_its_cluster_size{"max_p_for_its_cluster_size", 0.2, "its cluster size cut is applied below this p"}; + Configurable max_p_for_its_cluster_size{"max_p_for_its_cluster_size", 0, "its cluster size cut is applied below this p"}; Configurable max_pin_for_pion_rejection{"max_pin_for_pion_rejection", -1, "pion rejection is applied below this pin"}; Configurable minitsncls{"minitsncls", 4, "min. number of ITS clusters"}; Configurable maxchi2tpc{"maxchi2tpc", 5.0, "max. chi2/NclsTPC"}; Configurable maxchi2its{"maxchi2its", 6.0, "max. chi2/NclsITS"}; Configurable minpt{"minpt", 0.15, "min pt for track"}; Configurable maxeta{"maxeta", 0.9, "eta acceptance"}; - Configurable dca_xy_max{"dca_xy_max", 1.0f, "max DCAxy in cm"}; - Configurable dca_z_max{"dca_z_max", 1.0f, "max DCAz in cm"}; - Configurable dca_3d_sigma_max{"dca_3d_sigma_max", 1e+10, "max DCA 3D in sigma"}; + Configurable dca_xy_max{"dca_xy_max", 0.1f, "max DCAxy in cm"}; + Configurable dca_z_max{"dca_z_max", 0.1f, "max DCAz in cm"}; + Configurable dca_3d_sigma_max{"dca_3d_sigma_max", 1.5, "max DCA 3D in sigma"}; Configurable minTPCNsigmaEl{"minTPCNsigmaEl", -2.5, "min. TPC n sigma for electron inclusion"}; Configurable maxTPCNsigmaEl{"maxTPCNsigmaEl", 3.5, "max. TPC n sigma for electron inclusion"}; Configurable maxTOFNsigmaEl{"maxTOFNsigmaEl", 3.5, "max. TOF n sigma for electron inclusion"}; Configurable minTPCNsigmaPi{"minTPCNsigmaPi", -1e+10, "min. TPC n sigma for pion exclusion"}; Configurable maxTPCNsigmaPi{"maxTPCNsigmaPi", 2.0, "max. TPC n sigma for pion exclusion"}; - Configurable maxMee{"maxMee", 0.02, "max mee for virtual photon selection"}; + Configurable minTPCNsigmaKa{"minTPCNsigmaKa", -3.0, "min. TPC n sigma for kaon exclusion"}; + Configurable maxTPCNsigmaKa{"maxTPCNsigmaKa", +3.0, "max. TPC n sigma for kaon exclusion"}; + Configurable minTPCNsigmaPr{"minTPCNsigmaPr", -3.0, "min. TPC n sigma for proton exclusion"}; + Configurable maxTPCNsigmaPr{"maxTPCNsigmaPr", +3.0, "max. TPC n sigma for proton exclusion"}; + Configurable maxMee{"maxMee", 1e+10, "max mee for virtual photon selection"}; Configurable apply_phiv{"apply_phiv", true, "flag to apply phiv cut"}; Configurable slope{"slope", 0.0181, "slope for mee vs. phiv"}; @@ -280,14 +289,37 @@ struct filterDielectronEvent { template bool isElectron(TTrack const& track) { - if (track.tpcInnerParam() < max_pin_for_pion_rejection && (minTPCNsigmaPi < track.tpcNSigmaPi() && track.tpcNSigmaPi() < maxTPCNsigmaPi)) { + return isElectron_TPChadrej(track) || isElectron_TOFreq(track); + } + + template + bool isElectron_TPChadrej(TTrack const& track) + { + if (track.tpcNSigmaEl() < minTPCNsigmaEl || maxTPCNsigmaEl < track.tpcNSigmaEl()) { return false; } - if (track.hasTOF()) { - return minTPCNsigmaEl < track.tpcNSigmaEl() && track.tpcNSigmaEl() < maxTPCNsigmaEl && fabs(track.tofNSigmaEl()) < maxTOFNsigmaEl; - } else { - return minTPCNsigmaEl < track.tpcNSigmaEl() && track.tpcNSigmaEl() < maxTPCNsigmaEl; + if (minTPCNsigmaPi < track.tpcNSigmaPi() && track.tpcNSigmaPi() < maxTPCNsigmaPi) { + return false; + } + if (minTPCNsigmaKa < track.tpcNSigmaKa() && track.tpcNSigmaKa() < maxTPCNsigmaKa) { + return false; + } + if (minTPCNsigmaPr < track.tpcNSigmaPr() && track.tpcNSigmaPr() < maxTPCNsigmaPr) { + return false; + } + if (track.hasTOF() && (maxTOFNsigmaEl < fabs(track.tofNSigmaEl()))) { + return false; + } + return true; + } + + template + bool isElectron_TOFreq(TTrack const& track) + { + if (minTPCNsigmaPi < track.tpcNSigmaPi() && track.tpcNSigmaPi() < maxTPCNsigmaPi) { + return false; } + return minTPCNsigmaEl < track.tpcNSigmaEl() && track.tpcNSigmaEl() < maxTPCNsigmaEl && fabs(track.tofNSigmaEl()) < maxTOFNsigmaEl; } template diff --git a/PWGEM/Dilepton/Tasks/vpPairQC.cxx b/PWGEM/Dilepton/Tasks/vpPairQC.cxx index 29c0738f7f2..c3a2aaa06e3 100644 --- a/PWGEM/Dilepton/Tasks/vpPairQC.cxx +++ b/PWGEM/Dilepton/Tasks/vpPairQC.cxx @@ -115,6 +115,7 @@ struct vpPairQC { Configurable cfg_min_ncluster_tpc{"cfg_min_ncluster_tpc", 0, "min ncluster tpc"}; Configurable cfg_min_ncluster_its{"cfg_min_ncluster_its", 5, "min ncluster its"}; Configurable cfg_min_ncrossedrows{"cfg_min_ncrossedrows", 100, "min ncrossed rows"}; + Configurable cfg_max_frac_shared_clusters_tpc{"cfg_max_frac_shared_clusters_tpc", 999.f, "max fraction of shared clusters in TPC"}; Configurable cfg_max_chi2tpc{"cfg_max_chi2tpc", 4.0, "max chi2/NclsTPC"}; Configurable cfg_max_chi2its{"cfg_max_chi2its", 5.0, "max chi2/NclsITS"}; Configurable cfg_max_chi2tof{"cfg_max_chi2tof", 1e+10, "max chi2 TOF"}; @@ -238,16 +239,19 @@ struct vpPairQC { fRegistry.add("Track/positive/hDCAxyzSigma", "DCA xy vs. z;DCA_{xy} (#sigma);DCA_{z} (#sigma)", kTH2F, {{200, -10.0f, 10.0f}, {200, -10.0f, 10.0f}}, false); fRegistry.add("Track/positive/hDCAxyRes_Pt", "DCA_{xy} resolution vs. pT;p_{T} (GeV/c);DCA_{xy} resolution (#mum)", kTH2F, {{200, 0, 10}, {200, 0., 400}}, false); fRegistry.add("Track/positive/hDCAzRes_Pt", "DCA_{z} resolution vs. pT;p_{T} (GeV/c);DCA_{z} resolution (#mum)", kTH2F, {{200, 0, 10}, {200, 0., 400}}, false); + fRegistry.add("Track/positive/hDeltaPin", "p_{in} vs. p_{pv};p_{pv} (GeV/c);(p_{in} - p_{pv})/p_{pv}", kTH2F, {{1000, 0, 10}, {200, -1, +1}}, false); fRegistry.add("Track/positive/hNclsTPC", "number of TPC clusters", kTH1F, {{161, -0.5, 160.5}}, false); fRegistry.add("Track/positive/hNcrTPC", "number of TPC crossed rows", kTH1F, {{161, -0.5, 160.5}}, false); fRegistry.add("Track/positive/hChi2TPC", "chi2/number of TPC clusters", kTH1F, {{100, 0, 10}}, false); fRegistry.add("Track/positive/hTPCNcr2Nf", "TPC Ncr/Nfindable", kTH1F, {{200, 0, 2}}, false); fRegistry.add("Track/positive/hTPCNcls2Nf", "TPC Ncls/Nfindable", kTH1F, {{200, 0, 2}}, false); + fRegistry.add("Track/positive/hTPCNclsShared", "TPC Ncls shared/Ncls;p_{T} (GeV/c);N_{cls}^{shared}/N_{cls} in TPC", kTH2F, {{1000, 0, 10}, {100, 0, 1}}, false); fRegistry.add("Track/positive/hNclsITS", "number of ITS clusters", kTH1F, {{8, -0.5, 7.5}}, false); fRegistry.add("Track/positive/hChi2ITS", "chi2/number of ITS clusters", kTH1F, {{100, 0, 10}}, false); fRegistry.add("Track/positive/hITSClusterMap", "ITS cluster map", kTH1F, {{128, -0.5, 127.5}}, false); fRegistry.add("Track/positive/hTPCdEdx", "TPC dE/dx;p_{in} (GeV/c);TPC dE/dx (a.u.)", kTH2F, {{1000, 0, 10}, {200, 0, 200}}, false); fRegistry.add("Track/positive/hTOFbeta", "TOF #beta;p_{pv} (GeV/c);#beta", kTH2F, {{1000, 0, 10}, {240, 0, 1.2}}, false); + fRegistry.add("Track/positive/hChi2TOF", "TOF Chi2;p_{pv} (GeV/c);chi2", kTH2F, {{1000, 0, 10}, {100, 0, 10}}, false); fRegistry.add("Track/positive/hMeanClusterSizeITS", "mean cluster size ITS;p_{pv} (GeV/c); on ITS #times cos(#lambda);", kTH2F, {{1000, 0.f, 10.f}, {160, 0, 16}}, false); fRegistry.add("Track/positive/hTPCNsigmaEl", "TPC n sigma el;p_{in} (GeV/c);n #sigma_{e}^{TPC}", kTH2F, {{1000, 0, 10}, {100, -5, +5}}, false); fRegistry.add("Track/positive/hTPCNsigmaMu", "TPC n sigma mu;p_{in} (GeV/c);n #sigma_{#mu}^{TPC}", kTH2F, {{1000, 0, 10}, {100, -5, +5}}, false); @@ -288,6 +292,7 @@ struct vpPairQC { fEMEventCut.SetRequireNoCollInTimeRangeStrict(eventcuts.cfgRequireNoCollInTimeRangeStrict); fEMEventCut.SetRequireNoCollInITSROFStandard(eventcuts.cfgRequireNoCollInITSROFStandard); fEMEventCut.SetRequireNoCollInITSROFStrict(eventcuts.cfgRequireNoCollInITSROFStrict); + fEMEventCut.SetRequireNoHighMultCollInPrevRof(eventcuts.cfgRequireNoHighMultCollInPrevRof); } o2::analysis::MlResponseDielectronSingleTrack mlResponseSingleTrack; @@ -313,6 +318,7 @@ struct vpPairQC { fDielectronCut.SetMinNClustersTPC(dielectroncuts.cfg_min_ncluster_tpc); fDielectronCut.SetMinNCrossedRowsTPC(dielectroncuts.cfg_min_ncrossedrows); fDielectronCut.SetMinNCrossedRowsOverFindableClustersTPC(0.8); + fDielectronCut.SetMaxFracSharedClustersTPC(dielectroncuts.cfg_max_frac_shared_clusters_tpc); fDielectronCut.SetChi2PerClusterTPC(0.0, dielectroncuts.cfg_max_chi2tpc); fDielectronCut.SetChi2PerClusterITS(0.0, dielectroncuts.cfg_max_chi2its); fDielectronCut.SetNClustersITS(dielectroncuts.cfg_min_ncluster_its, 7); @@ -425,8 +431,11 @@ struct vpPairQC { fRegistry.fill(HIST("Track/positive/hTPCNcr2Nf"), track.tpcCrossedRowsOverFindableCls()); fRegistry.fill(HIST("Track/positive/hTPCNcls2Nf"), track.tpcFoundOverFindableCls()); fRegistry.fill(HIST("Track/positive/hChi2TPC"), track.tpcChi2NCl()); + fRegistry.fill(HIST("Track/positive/hTPCNclsShared"), track.pt(), track.tpcFractionSharedCls()); + fRegistry.fill(HIST("Track/positive/hDeltaPin"), track.p(), (track.tpcInnerParam() - track.p()) / track.p()); fRegistry.fill(HIST("Track/positive/hChi2ITS"), track.itsChi2NCl()); fRegistry.fill(HIST("Track/positive/hITSClusterMap"), track.itsClusterMap()); + fRegistry.fill(HIST("Track/positive/hChi2TOF"), track.p(), track.tofChi2()); fRegistry.fill(HIST("Track/positive/hTPCdEdx"), track.tpcInnerParam(), track.tpcSignal()); fRegistry.fill(HIST("Track/positive/hTOFbeta"), track.p(), track.beta()); @@ -459,8 +468,11 @@ struct vpPairQC { fRegistry.fill(HIST("Track/negative/hTPCNcr2Nf"), track.tpcCrossedRowsOverFindableCls()); fRegistry.fill(HIST("Track/negative/hTPCNcls2Nf"), track.tpcFoundOverFindableCls()); fRegistry.fill(HIST("Track/negative/hChi2TPC"), track.tpcChi2NCl()); + fRegistry.fill(HIST("Track/negative/hTPCNclsShared"), track.pt(), track.tpcFractionSharedCls()); + fRegistry.fill(HIST("Track/negative/hDeltaPin"), track.p(), (track.tpcInnerParam() - track.p()) / track.p()); fRegistry.fill(HIST("Track/negative/hChi2ITS"), track.itsChi2NCl()); fRegistry.fill(HIST("Track/negative/hITSClusterMap"), track.itsClusterMap()); + fRegistry.fill(HIST("Track/negative/hChi2TOF"), track.p(), track.tofChi2()); fRegistry.fill(HIST("Track/negative/hTPCdEdx"), track.tpcInnerParam(), track.tpcSignal()); fRegistry.fill(HIST("Track/negative/hTOFbeta"), track.p(), track.beta()); diff --git a/PWGEM/Dilepton/Tasks/vpPairQCMC.cxx b/PWGEM/Dilepton/Tasks/vpPairQCMC.cxx index a687e5469a2..13bda4c1d87 100644 --- a/PWGEM/Dilepton/Tasks/vpPairQCMC.cxx +++ b/PWGEM/Dilepton/Tasks/vpPairQCMC.cxx @@ -299,6 +299,7 @@ struct vpPairQCMC { fEMEventCut.SetRequireNoCollInTimeRangeStrict(eventcuts.cfgRequireNoCollInTimeRangeStrict); fEMEventCut.SetRequireNoCollInITSROFStandard(eventcuts.cfgRequireNoCollInITSROFStandard); fEMEventCut.SetRequireNoCollInITSROFStrict(eventcuts.cfgRequireNoCollInITSROFStrict); + fEMEventCut.SetRequireNoHighMultCollInPrevRof(eventcuts.cfgRequireNoHighMultCollInPrevRof); } o2::analysis::MlResponseDielectronSingleTrack mlResponseSingleTrack; diff --git a/PWGEM/PhotonMeson/Tasks/pcmQC.cxx b/PWGEM/PhotonMeson/Tasks/pcmQC.cxx index aa034a2ec39..2e8a39ed8de 100644 --- a/PWGEM/PhotonMeson/Tasks/pcmQC.cxx +++ b/PWGEM/PhotonMeson/Tasks/pcmQC.cxx @@ -56,8 +56,10 @@ struct PCMQC { Configurable cfgRequireNoSameBunchPileup{"cfgRequireNoSameBunchPileup", false, "require no same bunch pileup in event cut"}; Configurable cfgRequireVertexITSTPC{"cfgRequireVertexITSTPC", false, "require Vertex ITSTPC in event cut"}; // ITS-TPC matched track contributes PV. Configurable cfgRequireGoodZvtxFT0vsPV{"cfgRequireGoodZvtxFT0vsPV", false, "require good Zvtx between FT0 vs. PV in event cut"}; - Configurable cfgOccupancyMin{"cfgOccupancyMin", -1, "min. occupancy"}; - Configurable cfgOccupancyMax{"cfgOccupancyMax", 1000000000, "max. occupancy"}; + Configurable cfgTrackOccupancyMin{"cfgTrackOccupancyMin", -2, "min. occupancy"}; + Configurable cfgTrackOccupancyMax{"cfgTrackOccupancyMax", 1000000000, "max. occupancy"}; + Configurable cfgFT0COccupancyMin{"cfgFT0COccupancyMin", -2, "min. FT0C occupancy"}; + Configurable cfgFT0COccupancyMax{"cfgFT0COccupancyMax", 1000000000, "max. FT0C occupancy"}; Configurable cfgRequireNoCollInTimeRangeStandard{"cfgRequireNoCollInTimeRangeStandard", false, "require no collision in time range standard"}; } eventcuts; @@ -233,7 +235,7 @@ struct PCMQC { if (pcmcuts.cfg_require_v0_with_tpconly) { fV0PhotonCut.SetRequireTPConly(true); fV0PhotonCut.SetMaxPCA(3.0); - fV0PhotonCut.SetRxyRange(36, 90); + fV0PhotonCut.SetRxyRange(32, 90); } if (pcmcuts.cfg_require_v0_on_wwire_ib) { fV0PhotonCut.SetMaxPCA(0.3); @@ -339,7 +341,8 @@ struct PCMQC { Preslice perCollision = aod::v0photonkf::emeventId; Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax); - Filter collisionFilter_occupancy = eventcuts.cfgOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgOccupancyMax; + Filter collisionFilter_occupancy_track = eventcuts.cfgTrackOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgTrackOccupancyMax; + Filter collisionFilter_occupancy_ft0c = eventcuts.cfgFT0COccupancyMin < o2::aod::evsel::ft0cOccupancyInTimeRange && o2::aod::evsel::ft0cOccupancyInTimeRange < eventcuts.cfgFT0COccupancyMax; using FilteredMyCollisions = soa::Filtered; void processQC(FilteredMyCollisions const& collisions, MyV0Photons const& v0photons, aod::V0Legs const&) diff --git a/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx b/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx index 54ad5d116d1..b1f445e558d 100644 --- a/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx @@ -70,8 +70,10 @@ struct PCMQCMC { Configurable cfgRequireNoSameBunchPileup{"cfgRequireNoSameBunchPileup", false, "require no same bunch pileup in event cut"}; Configurable cfgRequireVertexITSTPC{"cfgRequireVertexITSTPC", false, "require Vertex ITSTPC in event cut"}; // ITS-TPC matched track contributes PV. Configurable cfgRequireGoodZvtxFT0vsPV{"cfgRequireGoodZvtxFT0vsPV", false, "require good Zvtx between FT0 vs. PV in event cut"}; - Configurable cfgOccupancyMin{"cfgOccupancyMin", -1, "min. occupancy"}; - Configurable cfgOccupancyMax{"cfgOccupancyMax", 1000000000, "max. occupancy"}; + Configurable cfgTrackOccupancyMin{"cfgTrackOccupancyMin", -2, "min. occupancy"}; + Configurable cfgTrackOccupancyMax{"cfgTrackOccupancyMax", 1000000000, "max. occupancy"}; + Configurable cfgFT0COccupancyMin{"cfgFT0COccupancyMin", -2, "min. FT0C occupancy"}; + Configurable cfgFT0COccupancyMax{"cfgFT0COccupancyMax", 1000000000, "max. FT0C occupancy"}; Configurable cfgRequireNoCollInTimeRangeStandard{"cfgRequireNoCollInTimeRangeStandard", false, "require no collision in time range standard"}; } eventcuts; @@ -290,7 +292,7 @@ struct PCMQCMC { if (pcmcuts.cfg_require_v0_with_tpconly) { fV0PhotonCut.SetRequireTPConly(true); fV0PhotonCut.SetMaxPCA(3.0); - fV0PhotonCut.SetRxyRange(36, 90); + fV0PhotonCut.SetRxyRange(32, 90); } if (pcmcuts.cfg_require_v0_on_wwire_ib) { fV0PhotonCut.SetMaxPCA(0.3); @@ -407,7 +409,8 @@ struct PCMQCMC { } Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax); - Filter collisionFilter_occupancy = eventcuts.cfgOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgOccupancyMax; + Filter collisionFilter_occupancy_track = eventcuts.cfgTrackOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgTrackOccupancyMax; + Filter collisionFilter_occupancy_ft0c = eventcuts.cfgFT0COccupancyMin < o2::aod::evsel::ft0cOccupancyInTimeRange && o2::aod::evsel::ft0cOccupancyInTimeRange < eventcuts.cfgFT0COccupancyMax; using FilteredMyCollisions = soa::Filtered; Preslice perCollision = aod::v0photonkf::emeventId; From 0391495f6493e1df469d7dc10316b3c3bf19d0a5 Mon Sep 17 00:00:00 2001 From: Fernanda Torres <135931275+mtorresc15@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:59:28 -0600 Subject: [PATCH 15/19] [PWGLF] Update on mother's decay length. (#8949) --- PWGLF/Tasks/Nuspex/spectraTOF.cxx | 51 +++++++++++++++++-------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/spectraTOF.cxx b/PWGLF/Tasks/Nuspex/spectraTOF.cxx index dd7d43705f6..5c766a92a6f 100644 --- a/PWGLF/Tasks/Nuspex/spectraTOF.cxx +++ b/PWGLF/Tasks/Nuspex/spectraTOF.cxx @@ -340,7 +340,7 @@ struct tofSpectra { const AxisSpec phiAxis{200, 0, 7, "#it{#varphi} (rad)"}; const AxisSpec dcaZAxis{binsOptions.binsDca, "DCA_{z} (cm)"}; const AxisSpec lengthAxis{100, 0, 600, "Track length (cm)"}; - const AxisSpec decayLengthAxis{100, 0, 0.1, "Decay Length (cm)"}; + const AxisSpec decayLengthAxis{100, 0, 0.5, "Decay Length (cm)"}; if (enableTrackCutHistograms) { const AxisSpec chargeAxis{2, -2.f, 2.f, "Charge"}; @@ -1650,12 +1650,15 @@ struct tofSpectra { histos.fill(HIST(hdcaxystr[i]), track.pt(), track.dcaXY()); histos.fill(HIST(hdcazstr[i]), track.pt(), track.dcaZ()); } - if (mcParticle.has_daughters()) { - auto daughter0 = mcParticle.template daughters_as().begin(); - double vertexDau[3] = {daughter0.vx(), daughter0.vy(), daughter0.vz()}; - double vertexPrimary[3] = {mcCollision.posX(), mcCollision.posY(), mcCollision.posZ()}; - auto decayLength = RecoDecay::distance(vertexPrimary, vertexDau) / 10000; - hDecayLengthStr[i]->Fill(track.pt(), decayLength); + + if (mcParticle.has_mothers()) { + for (const auto& mother : mcParticle.template mothers_as()) { + auto daughter0 = mother.template daughters_as().begin(); + double vertexDau[3] = {daughter0.vx(), daughter0.vy(), daughter0.vz()}; + double vertexMoth[3] = {mother.vx(), mother.vy(), mother.vz()}; + auto decayLength = RecoDecay::distance(vertexMoth, vertexDau); + hDecayLengthStr[i]->Fill(track.pt(), decayLength); + } } } else { if (enableDCAxyzHistograms) { @@ -1722,23 +1725,25 @@ struct tofSpectra { hDcaZMCNotHF[i]->Fill(track.pt(), track.dcaZ()); } - if (mcParticle.has_daughters()) { - auto daughter0 = mcParticle.template daughters_as().begin(); - double vertexDau[3] = {daughter0.vx(), daughter0.vy(), daughter0.vz()}; - double vertexPrimary[3] = {mcCollision.posX(), mcCollision.posY(), mcCollision.posZ()}; - auto decayLength = RecoDecay::distance(vertexPrimary, vertexDau) / 10000; + if (mcParticle.has_mothers()) { + for (const auto& mother : mcParticle.template mothers_as()) { + auto daughter0 = mother.template daughters_as().begin(); + double vertexDau[3] = {daughter0.vx(), daughter0.vy(), daughter0.vz()}; + double vertexMoth[3] = {mother.vx(), mother.vy(), mother.vz()}; + auto decayLength = RecoDecay::distance(vertexMoth, vertexDau); - if (IsD0Mother) { - hDecayLengthMCD0[i]->Fill(track.pt(), decayLength); - } - if (IsCharmMother) { - hDecayLengthMCCharm[i]->Fill(track.pt(), decayLength); - } - if (IsBeautyMother) { - hDecayLengthMCBeauty[i]->Fill(track.pt(), decayLength); - } - if (IsNotHFMother) { - hDecayLengthMCNotHF[i]->Fill(track.pt(), decayLength); + if (IsD0Mother) { + hDecayLengthMCD0[i]->Fill(track.pt(), decayLength); + } + if (IsCharmMother) { + hDecayLengthMCCharm[i]->Fill(track.pt(), decayLength); + } + if (IsBeautyMother) { + hDecayLengthMCBeauty[i]->Fill(track.pt(), decayLength); + } + if (IsNotHFMother) { + hDecayLengthMCNotHF[i]->Fill(track.pt(), decayLength); + } } } } From 9d5643536b4609a07b1a72dc10b8246af26f9f15 Mon Sep 17 00:00:00 2001 From: Bong-Hwi Lim Date: Thu, 12 Dec 2024 09:07:10 +0100 Subject: [PATCH 16/19] [PWGLF] Update Data Model and Improve DF Mixing Study for Resonances (#8950) --- PWGLF/DataModel/LFResonanceTables.h | 63 +++++++ PWGLF/DataModel/LFResonanceTablesMergeDF.h | 158 ------------------ .../Resonances/LFResonanceMergeDF.cxx | 18 +- PWGLF/Tasks/Resonances/lambda1520_PbPb.cxx | 11 +- 4 files changed, 78 insertions(+), 172 deletions(-) delete mode 100644 PWGLF/DataModel/LFResonanceTablesMergeDF.h diff --git a/PWGLF/DataModel/LFResonanceTables.h b/PWGLF/DataModel/LFResonanceTables.h index b72dd1e745f..a446b97abc0 100644 --- a/PWGLF/DataModel/LFResonanceTables.h +++ b/PWGLF/DataModel/LFResonanceTables.h @@ -15,6 +15,8 @@ /// Inspired by StrangenessTables.h, FemtoDerived.h /// /// \author Bong-Hwi Lim +/// \author Nasir Mehdi Malik +/// #ifndef PWGLF_DATAMODEL_LFRESONANCETABLES_H_ #define PWGLF_DATAMODEL_LFRESONANCETABLES_H_ @@ -113,6 +115,25 @@ DECLARE_SOA_TABLE(ResoEvtPlCollisions, "AOD", "RESOEVTPLCOLL", resocollision::EvtPlResBC); using ResoEvtPlCollision = ResoEvtPlCollisions::iterator; +// For DF mixing study +DECLARE_SOA_TABLE(ResoCollisionDFs, "AOD", "RESOCOLLISIONDF", + o2::soa::Index<>, + resocollision::CollisionId, + o2::aod::mult::MultNTracksPV, + collision::PosX, + collision::PosY, + collision::PosZ, + resocollision::Cent, + resocollision::Spherocity, + resocollision::EvtPl, + resocollision::EvtPlResAB, + resocollision::EvtPlResAC, + resocollision::EvtPlResBC, + resocollision::BMagField, + timestamp::Timestamp, + evsel::NumTracksInTimeRange); +using ResoCollisionDF = ResoCollisionDFs::iterator; + // Resonance Daughters // inspired from PWGCF/DataModel/FemtoDerived.h namespace resodaughter @@ -230,6 +251,48 @@ DECLARE_SOA_TABLE(ResoTracks, "AOD", "RESOTRACKS", o2::aod::track::TPCChi2NCl); using ResoTrack = ResoTracks::iterator; +// For DF mixing study +DECLARE_SOA_TABLE(ResoTrackDFs, "AOD", "RESOTRACKDFs", + o2::soa::Index<>, + resodaughter::ResoCollisionId, + resodaughter::TrackId, + resodaughter::Pt, + resodaughter::Px, + resodaughter::Py, + resodaughter::Pz, + resodaughter::Eta, + resodaughter::Phi, + resodaughter::Sign, + resodaughter::TPCNClsCrossedRows, + resodaughter::TPCNClsFound, + resodaughter::ITSNCls, + o2::aod::track::DcaXY, + o2::aod::track::DcaZ, + o2::aod::track::X, + o2::aod::track::Alpha, + resodaughter::HasITS, + resodaughter::HasTPC, + resodaughter::HasTOF, + o2::aod::pidtpc::TPCNSigmaPi, + o2::aod::pidtpc::TPCNSigmaKa, + o2::aod::pidtpc::TPCNSigmaPr, + o2::aod::pidtpc::TPCNSigmaEl, + o2::aod::pidtof::TOFNSigmaPi, + o2::aod::pidtof::TOFNSigmaKa, + o2::aod::pidtof::TOFNSigmaPr, + o2::aod::pidtof::TOFNSigmaEl, + o2::aod::track::TPCSignal, + o2::aod::track::PassedITSRefit, + o2::aod::track::PassedTPCRefit, + resodaughter::IsGlobalTrackWoDCA, + resodaughter::IsGlobalTrack, + resodaughter::IsPrimaryTrack, + resodaughter::IsPVContributor, + resodaughter::TPCCrossedRowsOverFindableCls, + o2::aod::track::ITSChi2NCl, + o2::aod::track::TPCChi2NCl); +using ResoTrackDF = ResoTrackDFs::iterator; + DECLARE_SOA_TABLE(ResoV0s, "AOD", "RESOV0S", o2::soa::Index<>, resodaughter::ResoCollisionId, diff --git a/PWGLF/DataModel/LFResonanceTablesMergeDF.h b/PWGLF/DataModel/LFResonanceTablesMergeDF.h deleted file mode 100644 index 00ec4741956..00000000000 --- a/PWGLF/DataModel/LFResonanceTablesMergeDF.h +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. -// -// This software is distributed under the terms of the GNU General Public -// License v3 (GPL Version 3), copied verbatim in the file "COPYING". -// -// In applying this license CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -/// \file LFResonanceTables.h -/// \brief Definitions of tables of resonance decay candidates -/// -/// Inspired by StrangenessTables.h, FemtoDerived.h -/// -/// \author Bong-Hwi Lim -/// Nasir Mehdi Malik - -#ifndef PWGLF_DATAMODEL_LFRESONANCETABLESMERGEDF_H_ -#define PWGLF_DATAMODEL_LFRESONANCETABLESMERGEDF_H_ - -#include -#include - -#include "Common/DataModel/PIDResponse.h" -#include "Common/Core/RecoDecay.h" -#include "PWGLF/DataModel/LFStrangenessTables.h" -#include "Common/DataModel/TrackSelectionTables.h" -#include "Framework/AnalysisDataModel.h" - -namespace o2::aod -{ -/// Resonance Collisions -namespace resocollisiondf -{ -DECLARE_SOA_COLUMN(Cent, cent, float); //! Centrality (Multiplicity) percentile (Default: FT0M) -DECLARE_SOA_COLUMN(Spherocity, spherocity, float); //! Spherocity of the event -DECLARE_SOA_COLUMN(EvtPl, evtPl, float); //! Second harmonic event plane -DECLARE_SOA_COLUMN(EvtPlResAB, evtPlResAB, float); //! Second harmonic event plane resolution of A-B sub events -DECLARE_SOA_COLUMN(EvtPlResAC, evtPlResAC, float); //! Second harmonic event plane resolution of A-C sub events -DECLARE_SOA_COLUMN(EvtPlResBC, evtPlResBC, float); //! Second harmonic event plane resolution of B-C sub events -DECLARE_SOA_COLUMN(BMagField, bMagField, float); //! Magnetic field -} // namespace resocollisiondf -DECLARE_SOA_TABLE(ResoCollisionDFs, "AOD", "RESOCOLLISIONDF", - o2::soa::Index<>, - o2::aod::mult::MultNTracksPV, - collision::PosX, - collision::PosY, - collision::PosZ, - resocollisiondf::Cent, - resocollisiondf::Spherocity, - resocollisiondf::EvtPl, - resocollisiondf::EvtPlResAB, - resocollisiondf::EvtPlResAC, - resocollisiondf::EvtPlResBC, - resocollisiondf::BMagField, - timestamp::Timestamp, - evsel::NumTracksInTimeRange); -using ResoCollisionDF = ResoCollisionDFs::iterator; - -// Resonance Daughters -// inspired from PWGCF/DataModel/FemtoDerived.h -namespace resodaughterdf -{ - -DECLARE_SOA_INDEX_COLUMN(ResoCollisionDF, resoCollisiondf); -DECLARE_SOA_COLUMN(Pt, pt, float); //! p_T (GeV/c) -DECLARE_SOA_COLUMN(Px, px, float); //! p_x (GeV/c) -DECLARE_SOA_COLUMN(Py, py, float); //! p_y (GeV/c) -DECLARE_SOA_COLUMN(Pz, pz, float); //! p_z (GeV/c) -DECLARE_SOA_COLUMN(Eta, eta, float); //! Eta -DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi -DECLARE_SOA_COLUMN(PartType, partType, uint8_t); //! Type of the particle, according to resodaughter::ParticleType -DECLARE_SOA_COLUMN(TempFitVar, tempFitVar, float); //! Observable for the template fitting (Track: DCA_xy, V0: CPA) -DECLARE_SOA_COLUMN(Indices, indices, int[2]); //! Field for the track indices to remove auto-correlations -DECLARE_SOA_COLUMN(CascadeIndices, cascIndices, int[3]); //! Field for the track indices to remove auto-correlations (ordered: positive, negative, bachelor) -DECLARE_SOA_COLUMN(Sign, sign, int8_t); //! Sign of the track charge -DECLARE_SOA_COLUMN(TPCNClsCrossedRows, tpcNClsCrossedRows, uint8_t); //! Number of TPC crossed rows -DECLARE_SOA_COLUMN(TPCNClsFound, tpcNClsFound, uint8_t); //! Number of TPC clusters found -DECLARE_SOA_COLUMN(ITSNCls, itsNCls, uint8_t); //! Number of ITS clusters found -DECLARE_SOA_COLUMN(IsGlobalTrackWoDCA, isGlobalTrackWoDCA, bool); //! Is global track without DCA -DECLARE_SOA_COLUMN(IsGlobalTrack, isGlobalTrack, bool); //! Is global track -DECLARE_SOA_COLUMN(IsPrimaryTrack, isPrimaryTrack, bool); //! Is primary track -DECLARE_SOA_COLUMN(IsPVContributor, isPVContributor, bool); //! Is primary vertex contributor -DECLARE_SOA_COLUMN(HasITS, hasITS, bool); -DECLARE_SOA_COLUMN(HasTPC, hasTPC, bool); -DECLARE_SOA_COLUMN(HasTOF, hasTOF, bool); //! Has TOF -DECLARE_SOA_COLUMN(TPCCrossedRowsOverFindableCls, tpcCrossedRowsOverFindableCls, float); -DECLARE_SOA_COLUMN(DaughDCA, daughDCA, float); //! DCA between daughters -DECLARE_SOA_COLUMN(CascDaughDCA, cascdaughDCA, float); //! DCA between daughters from cascade -DECLARE_SOA_COLUMN(V0CosPA, v0CosPA, float); //! V0 Cosine of Pointing Angle -DECLARE_SOA_COLUMN(CascCosPA, cascCosPA, float); //! Cascade Cosine of Pointing Angle -DECLARE_SOA_COLUMN(MLambda, mLambda, float); //! The invariant mass of V0 candidate, assuming lambda -DECLARE_SOA_COLUMN(MAntiLambda, mAntiLambda, float); //! The invariant mass of V0 candidate, assuming antilambda -DECLARE_SOA_COLUMN(MK0Short, mK0Short, float); //! The invariant mass of V0 candidate, assuming k0s -DECLARE_SOA_COLUMN(MXi, mXi, float); //! The invariant mass of Xi candidate -DECLARE_SOA_COLUMN(TransRadius, transRadius, float); //! Transverse radius of the decay vertex -DECLARE_SOA_COLUMN(CascTransRadius, casctransRadius, float); //! Transverse radius of the decay vertex from cascade -DECLARE_SOA_COLUMN(DecayVtxX, decayVtxX, float); //! X position of the decay vertex -DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, float); //! Y position of the decay vertex -DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! Z position of the decay vertex -// For MC -DECLARE_SOA_INDEX_COLUMN(McParticle, mcParticle); //! Index of the corresponding MC particle -DECLARE_SOA_COLUMN(IsPhysicalPrimary, isPhysicalPrimary, bool); -DECLARE_SOA_COLUMN(ProducedByGenerator, producedByGenerator, bool); -DECLARE_SOA_COLUMN(MothersId, motherId, int); //! Id of the mother particle -DECLARE_SOA_COLUMN(MotherPDG, motherPDG, int); //! PDG code of the mother particle -DECLARE_SOA_COLUMN(DaughterPDG1, daughterPDG1, int); //! PDG code of the first Daughter particle -DECLARE_SOA_COLUMN(DaughterPDG2, daughterPDG2, int); //! PDG code of the second Daughter particle -DECLARE_SOA_COLUMN(DaughterID1, daughterId1, int); //! Id of the first Daughter particle -DECLARE_SOA_COLUMN(DaughterID2, daughterId2, int); //! Id of the second Daughter particle -DECLARE_SOA_COLUMN(SiblingIds, siblingIds, int[2]); //! Index of the particles with the same mother -DECLARE_SOA_COLUMN(BachTrkID, bachtrkID, int); //! Id of the bach track from cascade -DECLARE_SOA_COLUMN(V0ID, v0ID, int); //! Id of the V0 from cascade -} // namespace resodaughterdf -DECLARE_SOA_TABLE(ResoTrackDFs, "AOD", "RESOTRACKDFs", - o2::soa::Index<>, - resodaughterdf::ResoCollisionDFId, - resodaughterdf::Pt, - resodaughterdf::Px, - resodaughterdf::Py, - resodaughterdf::Pz, - resodaughterdf::Eta, - resodaughterdf::Phi, - resodaughterdf::Sign, - resodaughterdf::TPCNClsCrossedRows, - resodaughterdf::TPCNClsFound, - resodaughterdf::ITSNCls, - o2::aod::track::DcaXY, - o2::aod::track::DcaZ, - o2::aod::track::X, - o2::aod::track::Alpha, - resodaughterdf::HasITS, - resodaughterdf::HasTPC, - resodaughterdf::HasTOF, - o2::aod::pidtpc::TPCNSigmaPi, - o2::aod::pidtpc::TPCNSigmaKa, - o2::aod::pidtpc::TPCNSigmaPr, - o2::aod::pidtpc::TPCNSigmaEl, - o2::aod::pidtof::TOFNSigmaPi, - o2::aod::pidtof::TOFNSigmaKa, - o2::aod::pidtof::TOFNSigmaPr, - o2::aod::pidtof::TOFNSigmaEl, - o2::aod::track::TPCSignal, - o2::aod::track::PassedITSRefit, - o2::aod::track::PassedTPCRefit, - resodaughterdf::IsGlobalTrackWoDCA, - resodaughterdf::IsGlobalTrack, - resodaughterdf::IsPrimaryTrack, - resodaughterdf::IsPVContributor, - resodaughterdf::TPCCrossedRowsOverFindableCls, - o2::aod::track::ITSChi2NCl, - o2::aod::track::TPCChi2NCl); -using ResoTrackDF = ResoTrackDFs::iterator; - -} // namespace o2::aod -#endif // PWGLF_DATAMODEL_LFRESONANCETABLESMERGEDF_H_ diff --git a/PWGLF/TableProducer/Resonances/LFResonanceMergeDF.cxx b/PWGLF/TableProducer/Resonances/LFResonanceMergeDF.cxx index 9850a7bf23a..3d27c68d40e 100644 --- a/PWGLF/TableProducer/Resonances/LFResonanceMergeDF.cxx +++ b/PWGLF/TableProducer/Resonances/LFResonanceMergeDF.cxx @@ -44,7 +44,6 @@ #include "Framework/runDataProcessing.h" #include "Framework/O2DatabasePDGPlugin.h" #include "PWGLF/DataModel/LFStrangenessTables.h" -#include "PWGLF/DataModel/LFResonanceTablesMergeDF.h" #include "PWGLF/DataModel/LFResonanceTables.h" #include "PWGLF/Utils/collisionCuts.h" #include "ReconstructionDataFormats/Track.h" @@ -89,8 +88,8 @@ struct reso2dfmerged { Produces reso2trksdf; int df = 0; - std::vector> vecOfTuples; - std::vector> vecOfTuples; + std::vector(tuple)); - resoCollisionsdf(0, std::get<0>(tuple), std::get<1>(tuple), std::get<2>(tuple), std::get<3>(tuple), std::get<4>(tuple), std::get<5>(tuple), 0., 0., 0., 0., 0, collision.trackOccupancyInTimeRange()); + resoCollisionsdf(std::get<0>(tuple), 0, std::get<1>(tuple), std::get<2>(tuple), std::get<3>(tuple), std::get<4>(tuple), std::get<5>(tuple), std::get<6>(tuple), 0., 0., 0., 0., 0, collision.trackOccupancyInTimeRange()); // LOGF(info, "collisions: Index = %d ) %f - %f - %f %f %d -- %d", std::get<0>(tuple).globalIndex(),std::get<1>(tuple),std::get<2>(tuple), std::get<3>(tuple), std::get<4>(tuple), std::get<5>(tuple).size(),resoCollisionsdf.lastIndex()); for (const auto& tuple : innerVector) { @@ -223,7 +223,8 @@ struct reso2dfmerged { std::get<31>(tuple), std::get<32>(tuple), std::get<33>(tuple), - std::get<34>(tuple)); + std::get<34>(tuple), + std::get<35>(tuple)); } } @@ -242,7 +243,7 @@ struct reso2dfmerged { histos.fill(HIST("Event/h1d_ft0_mult_percentile"), collision.cent()); - resoCollisionsdf(0, collision.posX(), collision.posY(), collision.posZ(), collision.cent(), collision.spherocity(), collision.evtPl(), 0., 0., 0., 0., 0, collision.trackOccupancyInTimeRange()); + resoCollisionsdf(collision.globalIndex(), 0, collision.posX(), collision.posY(), collision.posZ(), collision.cent(), collision.spherocity(), collision.evtPl(), 0., 0., 0., 0., 0, collision.trackOccupancyInTimeRange()); for (auto& track : tracks) { if (isPrimary && !track.isPrimaryTrack()) @@ -270,6 +271,7 @@ struct reso2dfmerged { continue; reso2trksdf(resoCollisionsdf.lastIndex(), + track.globalIndex(), track.pt(), track.px(), track.py(), diff --git a/PWGLF/Tasks/Resonances/lambda1520_PbPb.cxx b/PWGLF/Tasks/Resonances/lambda1520_PbPb.cxx index 74234cb8bd1..e7fc0ee3de9 100644 --- a/PWGLF/Tasks/Resonances/lambda1520_PbPb.cxx +++ b/PWGLF/Tasks/Resonances/lambda1520_PbPb.cxx @@ -13,7 +13,7 @@ /// /// Invariant Mass Reconstruction of Lambda(1520) Resonance. /// /// \author Yash Patley -/// \author Nasir Mehdi Malik +/// \author Nasir Mehdi Malik #include #include @@ -30,7 +30,6 @@ #include "Framework/ASoAHelpers.h" #include "Framework/runDataProcessing.h" #include "PWGLF/DataModel/LFResonanceTables.h" -#include "PWGLF/DataModel/LFResonanceTablesMergeDF.h" #include "CommonConstants/PhysicsConstants.h" using namespace o2; @@ -654,9 +653,9 @@ struct lambdaAnalysis_pb { PROCESS_SWITCH(lambdaAnalysis_pb, processMix, "Process for Mixed Events", false); - Preslice perRColdf = aod::resodaughterdf::resoCollisiondfId; + Preslice perRColdf = aod::resodaughter::resoCollisionId; - using resoColDFs = aod::ResoCollisionDFs; + using resoColDFs = aod::ResoCollisions; using resoTrackDFs = aod::ResoTrackDFs; void processDatadf(resoColDFs::iterator const& collision, resoTrackDFs const& tracks) @@ -673,7 +672,7 @@ struct lambdaAnalysis_pb { PROCESS_SWITCH(lambdaAnalysis_pb, processDatadf, "Process for data merged DF", false); - using BinningTypeDF = ColumnBinningPolicy; + using BinningTypeDF = ColumnBinningPolicy; void processMixDF(resoColDFs& collisions, resoTrackDFs const& tracks) { if (doprocessMix) @@ -696,7 +695,7 @@ struct lambdaAnalysis_pb { PROCESS_SWITCH(lambdaAnalysis_pb, processMixDF, "Process for merged DF Mixed Events", false); - using BinningTypeEP = ColumnBinningPolicy; + using BinningTypeEP = ColumnBinningPolicy; void processMixepDF(resoColDFs& collisions, resoTrackDFs const& tracks) { if (doprocessMix || doprocessMixDF) From 256939a185164b4953fb1efd4f8642d38d815028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Thu, 12 Dec 2024 09:24:07 +0100 Subject: [PATCH 17/19] [PWGCF] Fix compilation warnings (#8952) --- PWGCF/Flow/TableProducer/zdcQVectors.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/Flow/TableProducer/zdcQVectors.cxx b/PWGCF/Flow/TableProducer/zdcQVectors.cxx index 957460d8b28..6a1048ad692 100644 --- a/PWGCF/Flow/TableProducer/zdcQVectors.cxx +++ b/PWGCF/Flow/TableProducer/zdcQVectors.cxx @@ -466,7 +466,7 @@ struct ZdcQVectors { } else if (hist->InheritsFrom("TProfile")) { TProfile* h = reinterpret_cast(hist); TString name = h->GetName(); - int bin; + int bin{}; if (name.Contains("mean_vx")) bin = h->GetXaxis()->FindBin(v[0]); if (name.Contains("mean_vy")) From 88f0a2fd6ec02b39e4a8ccd90d5647ff495955b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Thu, 12 Dec 2024 09:35:52 +0100 Subject: [PATCH 18/19] [PWGLF] Fix compilation warnings (#8951) --- PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx index da2c47fa790..e30155b61a9 100644 --- a/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx +++ b/PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx @@ -353,6 +353,7 @@ struct AngularCorrelationsInJets { case 3: // (anti)helium-3 return (track.tpcNSigmaHe() < 3.0 && track.tpcNSigmaDe() > 3.0 && track.tpcNSigmaPr() > 3.0); } + return false; } template From a8d5ca287b8a608bb2947e1bf24b774fb3b7161d Mon Sep 17 00:00:00 2001 From: Marian Ivanov Date: Thu, 12 Dec 2024 10:25:08 +0100 Subject: [PATCH 19/19] [Common] TrackQAConverter002- for TOF modification (#8901) Signed-off-by: Felix Schlepper Co-authored-by: Felix Schlepper --- .../TableProducer/Converters/CMakeLists.txt | 5 + .../Converters/trackQA002Converter.cxx | 97 +++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 Common/TableProducer/Converters/trackQA002Converter.cxx diff --git a/Common/TableProducer/Converters/CMakeLists.txt b/Common/TableProducer/Converters/CMakeLists.txt index 0bf0ff823d4..eda31568123 100644 --- a/Common/TableProducer/Converters/CMakeLists.txt +++ b/Common/TableProducer/Converters/CMakeLists.txt @@ -88,3 +88,8 @@ o2physics_add_dpl_workflow(trackqa-converter SOURCES trackQAConverter.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(trackqa-converter-002 + SOURCES trackQA002Converter.cxx + PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore + COMPONENT_NAME Analysis) diff --git a/Common/TableProducer/Converters/trackQA002Converter.cxx b/Common/TableProducer/Converters/trackQA002Converter.cxx new file mode 100644 index 00000000000..3e1bc82dbaf --- /dev/null +++ b/Common/TableProducer/Converters/trackQA002Converter.cxx @@ -0,0 +1,97 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. +#include + +#include "Framework/runDataProcessing.h" +#include "Framework/AnalysisTask.h" +#include "Framework/AnalysisDataModel.h" + +using namespace o2; +using namespace o2::framework; + +struct TrackQAConverter002 { + Produces tracksQA_002; + + void process000(aod::TracksQA_000 const& tracksQA_002) + { + for (const auto& trackQA : tracksQA_000) { + tracksQA_002( + trackQA.trackId(), + trackQA.tpcTime0(), + trackQA.tpcdcaR(), + trackQA.tpcdcaZ(), + trackQA.tpcClusterByteMask(), + trackQA.tpcdEdxMax0R(), + trackQA.tpcdEdxMax1R(), + trackQA.tpcdEdxMax2R(), + trackQA.tpcdEdxMax3R(), + trackQA.tpcdEdxTot0R(), + trackQA.tpcdEdxTot1R(), + trackQA.tpcdEdxTot2R(), + trackQA.tpcdEdxTot3R(), + // dummy values, not available in _000 + std::numeric_limits::min(), // deltaRefContParamY + std::numeric_limits::min(), // deltaRefContParamZ + std::numeric_limits::min(), // deltaRefContParamSnp + std::numeric_limits::min(), // deltaRefContParamTgl + std::numeric_limits::min(), // deltaRefContParamQ2Pt + std::numeric_limits::min(), // deltaRefGloParamY + std::numeric_limits::min(), // deltaRefGloParamZ + std::numeric_limits::min(), // deltaRefGloParamSnp + std::numeric_limits::min(), // deltaRefGloParamTgl + std::numeric_limits::min(), // deltaRefGloParamQ2Pt + std::numeric_limits::min(), // dTofdX + std::numeric_limits::min()); // dTofdY + } + } + PROCESS_SWITCH(TrackQAConverter002, process000, "process v000-to-v002 conversion", false); + + void process001(aod::TracksQA_001 const& tracksQA_002) + { + for (const auto& trackQA : tracksQA_001) { + tracksQA_002( + trackQA.trackId(), + trackQA.tpcTime0(), + trackQA.tpcdcaR(), + trackQA.tpcdcaZ(), + trackQA.tpcClusterByteMask(), + trackQA.tpcdEdxMax0R(), + trackQA.tpcdEdxMax1R(), + trackQA.tpcdEdxMax2R(), + trackQA.tpcdEdxMax3R(), + trackQA.tpcdEdxTot0R(), + trackQA.tpcdEdxTot1R(), + trackQA.tpcdEdxTot2R(), + trackQA.tpcdEdxTot3R(), + trackQA.deltaRefContParamY(), + trackQA.deltaRefITSParamZ(), + trackQA.deltaRefContParamSnp(), + trackQA.deltaRefContParamTgl(), + trackQA.deltaRefContParamQ2Pt(), + trackQA.deltaRefGloParamY(), + trackQA.deltaRefGloParamZ(), + trackQA.deltaRefGloParamSnp(), + trackQA.deltaRefGloParamTgl(), + trackQA.deltaRefGloParamQ2Pt(), + // dummy values, not available in _001 + std::numeric_limits::min(), // dTofdX + std::numeric_limits::min()); // dTofdY + } + } + PROCESS_SWITCH(TrackQAConverter002, process001, "process v001-to-v002 conversion", false); +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{ + adaptAnalysisTask(cfgc), + }; +}