From 1b847a35adf9cfe282407574ba2850f772480392 Mon Sep 17 00:00:00 2001 From: nzardosh Date: Fri, 6 Feb 2026 16:06:11 +0100 Subject: [PATCH] bug fixes to core tasks --- PWGJE/Core/JetFinder.cxx | 4 ++-- PWGJE/Core/JetFinder.h | 6 ++---- PWGJE/JetFinders/jetFinder.h | 7 +++++++ PWGJE/JetFinders/jetFinderHF.h | 6 ++++++ PWGJE/JetFinders/jetFinderHFHFBar.h | 6 ++++++ PWGJE/JetFinders/jetFinderV0.h | 6 ++++++ 6 files changed, 29 insertions(+), 6 deletions(-) diff --git a/PWGJE/Core/JetFinder.cxx b/PWGJE/Core/JetFinder.cxx index 8bd954be1b1..c3c2d091908 100644 --- a/PWGJE/Core/JetFinder.cxx +++ b/PWGJE/Core/JetFinder.cxx @@ -38,9 +38,9 @@ void JetFinder::setParams() } float jetRForClustering = isReclustering ? 5.0 * jetR : jetR; - selGhosts = fastjet::SelectorEtaRange(ghostEtaMin, ghostEtaMax) && fastjet::SelectorPhiRange(phiMin, phiMax); + selGhosts = fastjet::SelectorRapRange(etaMin, etaMax) && fastjet::SelectorPhiRange(phiMin, phiMax); // note that this is rapidity not eta but since ghosts are effectively massless this is ok // ghostAreaSpec=fastjet::GhostedAreaSpec(selGhosts,ghostRepeatN,ghostArea,gridScatter,ktScatter,ghostktMean); - ghostAreaSpec = fastjet::GhostedAreaSpec(selGhosts, ghostRepeatN, ghostArea, gridScatter, ktScatter, ghostktMean); // the first argument is rapidity not pseudorapidity, to be checked + ghostAreaSpec = fastjet::GhostedAreaSpec(selGhosts, ghostRepeatN, ghostArea, gridScatter, ktScatter, ghostktMean); jetDef = fastjet::JetDefinition(fastjet::antikt_algorithm, jetRForClustering, recombScheme, strategy); if (fastjetExtraParam > -98.0) { jetDef.set_extra_param(fastjetExtraParam); diff --git a/PWGJE/Core/JetFinder.h b/PWGJE/Core/JetFinder.h index 94afd0117ec..af78c69eea2 100644 --- a/PWGJE/Core/JetFinder.h +++ b/PWGJE/Core/JetFinder.h @@ -48,7 +48,7 @@ class JetFinder /// \return ClusterSequenceArea object needed to access constituents // fastjet::ClusterSequenceArea findJets(std::vector &inputParticles, std::vector &jets); - float phiMin = 0.; + float phiMin = -2. * M_PI; float phiMax = 2. * M_PI; float etaMin = -.9; float etaMax = .9; @@ -56,14 +56,12 @@ class JetFinder float jetR = .4; float jetPtMin = 0.; float jetPtMax = 1000.; - float jetPhiMin = 0.; + float jetPhiMin = -2. * M_PI; float jetPhiMax = 2. * M_PI; float jetEtaMin = -99.; float jetEtaMax = 99.; bool jetEtaDefault = false; - float ghostEtaMin = -.9; - float ghostEtaMax = .9; float ghostArea = .005; int ghostRepeatN = 1; double ghostktMean = 1.e-100; diff --git a/PWGJE/JetFinders/jetFinder.h b/PWGJE/JetFinders/jetFinder.h index d2865de29bc..123d0e1b4a4 100644 --- a/PWGJE/JetFinders/jetFinder.h +++ b/PWGJE/JetFinders/jetFinder.h @@ -96,6 +96,8 @@ struct JetFinderTask { o2::framework::Configurable> jetRadius{"jetRadius", {0.4}, "jet resolution parameters"}; o2::framework::Configurable jetPtMin{"jetPtMin", 0.0, "minimum jet pT"}; o2::framework::Configurable jetPtMax{"jetPtMax", 1000.0, "maximum jet pT"}; + o2::framework::Configurable jetPhiMin{"jetPhiMin", -99.0, "minimum jet phi"}; + o2::framework::Configurable jetPhiMax{"jetPhiMax", 99.0, "maximum jet phi"}; o2::framework::Configurable jetEWSPtMin{"jetEWSPtMin", 0.0, "minimum event-wise subtracted jet pT"}; o2::framework::Configurable jetEWSPtMax{"jetEWSPtMax", 1000.0, "maximum event-wise subtracted jet pT"}; o2::framework::Configurable jetEtaMin{"jetEtaMin", -99.0, "minimum jet pseudorapidity"}; @@ -135,11 +137,16 @@ struct JetFinderTask { jetFinder.etaMax = trackEtaMax; jetFinder.phiMin = trackPhiMin; jetFinder.phiMax = trackPhiMax; + if (jetPhiMin < -98.0) { + jetFinder.jetPhiMin = -2. * M_PI; + jetFinder.jetPhiMax = 2. * M_PI; + } jetFinder.jetEtaMin = jetEtaMin; jetFinder.jetEtaMax = jetEtaMax; if (jetEtaMin < -98.0) { jetFinder.jetEtaDefault = true; } + jetFinder.algorithm = static_cast(static_cast(jetAlgorithm)); jetFinder.recombScheme = static_cast(static_cast(jetRecombScheme)); jetFinder.ghostArea = jetGhostArea; diff --git a/PWGJE/JetFinders/jetFinderHF.h b/PWGJE/JetFinders/jetFinderHF.h index 021c4e2aaa2..b44b4d497f2 100644 --- a/PWGJE/JetFinders/jetFinderHF.h +++ b/PWGJE/JetFinders/jetFinderHF.h @@ -101,6 +101,8 @@ struct JetFinderHFTask { o2::framework::Configurable> jetRadius{"jetRadius", {0.4}, "jet resolution parameters"}; o2::framework::Configurable jetPtMin{"jetPtMin", 0.0, "minimum jet pT"}; o2::framework::Configurable jetPtMax{"jetPtMax", 1000.0, "maximum jet pT"}; + o2::framework::Configurable jetPhiMin{"jetPhiMin", -99.0, "minimum jet phi"}; + o2::framework::Configurable jetPhiMax{"jetPhiMax", 99.0, "maximum jet phi"}; o2::framework::Configurable jetEWSPtMin{"jetEWSPtMin", 0.0, "minimum event-wise subtracted jet pT"}; o2::framework::Configurable jetEWSPtMax{"jetEWSPtMax", 1000.0, "maximum event-wise subtracted jet pT"}; o2::framework::Configurable jetEtaMin{"jetEtaMin", -99.0, "minimum jet pseudorapidity"}; @@ -140,6 +142,10 @@ struct JetFinderHFTask { jetFinder.etaMax = trackEtaMax; jetFinder.jetPtMin = jetPtMin; jetFinder.jetPtMax = jetPtMax; + if (jetPhiMin < -98.0) { + jetFinder.jetPhiMin = -2. * M_PI; + jetFinder.jetPhiMax = 2. * M_PI; + } jetFinder.jetEtaMin = jetEtaMin; jetFinder.jetEtaMax = jetEtaMax; if (jetEtaMin < -98.0) { diff --git a/PWGJE/JetFinders/jetFinderHFHFBar.h b/PWGJE/JetFinders/jetFinderHFHFBar.h index 9b36af83e6c..ee29349a9cf 100644 --- a/PWGJE/JetFinders/jetFinderHFHFBar.h +++ b/PWGJE/JetFinders/jetFinderHFHFBar.h @@ -101,6 +101,8 @@ struct JetFinderHFHFBarTask { o2::framework::Configurable> jetRadius{"jetRadius", {0.4}, "jet resolution parameters"}; o2::framework::Configurable jetPtMin{"jetPtMin", 0.0, "minimum jet pT"}; o2::framework::Configurable jetPtMax{"jetPtMax", 1000.0, "maximum jet pT"}; + o2::framework::Configurable jetPhiMin{"jetPhiMin", -99.0, "minimum jet phi"}; + o2::framework::Configurable jetPhiMax{"jetPhiMax", 99.0, "maximum jet phi"}; o2::framework::Configurable jetEWSPtMin{"jetEWSPtMin", 0.0, "minimum event-wise subtracted jet pT"}; o2::framework::Configurable jetEWSPtMax{"jetEWSPtMax", 1000.0, "maximum event-wise subtracted jet pT"}; o2::framework::Configurable jetEtaMin{"jetEtaMin", -99.0, "minimum jet pseudorapidity"}; @@ -137,6 +139,10 @@ struct JetFinderHFHFBarTask { jetFinder.etaMax = trackEtaMax; jetFinder.jetPtMin = jetPtMin; jetFinder.jetPtMax = jetPtMax; + if (jetPhiMin < -98.0) { + jetFinder.jetPhiMin = -2. * M_PI; + jetFinder.jetPhiMax = 2. * M_PI; + } jetFinder.jetEtaMin = jetEtaMin; jetFinder.jetEtaMax = jetEtaMax; if (jetEtaMin < -98.0) { diff --git a/PWGJE/JetFinders/jetFinderV0.h b/PWGJE/JetFinders/jetFinderV0.h index 24a7018de4d..89ea38d3d96 100644 --- a/PWGJE/JetFinders/jetFinderV0.h +++ b/PWGJE/JetFinders/jetFinderV0.h @@ -83,6 +83,8 @@ struct JetFinderV0Task { o2::framework::Configurable> jetRadius{"jetRadius", {0.4}, "jet resolution parameters"}; o2::framework::Configurable jetPtMin{"jetPtMin", 0.0, "minimum jet pT"}; o2::framework::Configurable jetPtMax{"jetPtMax", 1000.0, "maximum jet pT"}; + o2::framework::Configurable jetPhiMin{"jetPhiMin", -99.0, "minimum jet phi"}; + o2::framework::Configurable jetPhiMax{"jetPhiMax", 99.0, "maximum jet phi"}; o2::framework::Configurable jetEtaMin{"jetEtaMin", -99.0, "minimum jet pseudorapidity"}; o2::framework::Configurable jetEtaMax{"jetEtaMax", 99.0, "maximum jet pseudorapidity"}; o2::framework::Configurable jetTypeParticleLevel{"jetTypeParticleLevel", 1, "Type of stored jets. 0 = full, 1 = charged, 2 = neutral"}; @@ -121,6 +123,10 @@ struct JetFinderV0Task { jetFinder.etaMax = trackEtaMax; jetFinder.jetPtMin = jetPtMin; jetFinder.jetPtMax = jetPtMax; + if (jetPhiMin < -98.0) { + jetFinder.jetPhiMin = -2. * M_PI; + jetFinder.jetPhiMax = 2. * M_PI; + } jetFinder.jetEtaMin = jetEtaMin; jetFinder.jetEtaMax = jetEtaMax; if (jetEtaMin < -98.0) {