From b9d32aa764b71769a56e5b285729b4286dd1ebc6 Mon Sep 17 00:00:00 2001 From: Daiki Sekihata Date: Sat, 22 Aug 2026 15:01:08 +0200 Subject: [PATCH 1/3] [PWGEM/Dilepton] add a flag to use PDG mass of Jpsi --- PWGEM/Dilepton/Tasks/dimuonV1.cxx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/PWGEM/Dilepton/Tasks/dimuonV1.cxx b/PWGEM/Dilepton/Tasks/dimuonV1.cxx index 747f4e54cd0..8c790d3836a 100644 --- a/PWGEM/Dilepton/Tasks/dimuonV1.cxx +++ b/PWGEM/Dilepton/Tasks/dimuonV1.cxx @@ -54,8 +54,6 @@ #include #include -#include - struct dimuonV1 { // // Configurables @@ -82,6 +80,7 @@ struct dimuonV1 { o2::framework::Configurable cfgRotationMin{"cfgRotationMin", -M_PI / 4, "min. rotation angle for rotation bkg"}; o2::framework::Configurable cfgRotationMax{"cfgRotationMax", +M_PI / 4, "max. rotation angle for rotation bkg"}; o2::framework::Configurable cfgUseRapidity{"cfgUseRapidity", true, "flag to use rapidity. if false, pseudorapidity"}; + o2::framework::Configurable cfgUsePDGJPsiMass{"cfgUsePDGJPsiMass", true, "flag to use pdg mass of Jpsi"}; EMEventCut fEMEventCut; struct : o2::framework::ConfigurableGroup { @@ -328,6 +327,7 @@ struct dimuonV1 { ROOT::Math::PtEtaPhiMVector v1(t1.pt(), t1.eta(), RecoDecay::constrainAngle(t1.phi(), 0, 1U), o2::constants::physics::MassMuon); ROOT::Math::PtEtaPhiMVector v2(t2.pt(), t2.eta(), RecoDecay::constrainAngle(t2.phi(), 0, 1U), o2::constants::physics::MassMuon); ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; + ROOT::Math::PtEtaPhiMVector v12pdg(v12.Pt(), v12.Eta(), v12.Phi(), o2::constants::physics::MassJPsi); float phi = RecoDecay::constrainAngle(v12.Phi(), 0, 1U); float uxQxt = std::cos(1.f * phi) * collision.qxZDCC(); @@ -337,7 +337,11 @@ struct dimuonV1 { if (t1.sign() * t2.sign() < 0) { // ULS if (cfgUseRapidity) { - fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hs"), v12.M(), v12.Pt(), v12.Rapidity(), uxQxp - uxQxt, uyQyp - uyQyt, centrality, weight); + if (cfgUsePDGJPsiMass) { + fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hs"), v12.M(), v12.Pt(), v12pdg.Rapidity(), uxQxp - uxQxt, uyQyp - uyQyt, centrality, weight); + } else { + fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hs"), v12.M(), v12.Pt(), v12.Rapidity(), uxQxp - uxQxt, uyQyp - uyQyt, centrality, weight); + } } else { fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hs"), v12.M(), v12.Pt(), v12.Eta(), uxQxp - uxQxt, uyQyp - uyQyt, centrality, weight); } @@ -346,8 +350,13 @@ struct dimuonV1 { float dphi = distDPhi(engine); ROOT::Math::PtEtaPhiMVector v2rot(t2.pt(), t2.eta(), RecoDecay::constrainAngle(t2.phi() + M_PI + dphi, 0, 1U), o2::constants::physics::MassMuon); ROOT::Math::PtEtaPhiMVector v12bkg = v1 + v2rot; + ROOT::Math::PtEtaPhiMVector v12bkgpdg(v12bkg.Pt(), v12bkg.Eta(), v12bkg.Phi(), o2::constants::physics::MassJPsi); if (cfgUseRapidity) { - fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hsRotBkg"), v12bkg.M(), v12bkg.Pt(), v12bkg.Rapidity(), weight * 1.f / static_cast(cfgNrotation)); + if (cfgUsePDGJPsiMass) { + fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hsRotBkg"), v12bkgpdg.M(), v12bkg.Pt(), v12bkg.Rapidity(), weight * 1.f / static_cast(cfgNrotation)); + } else { + fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hsRotBkg"), v12bkg.M(), v12bkg.Pt(), v12bkg.Rapidity(), weight * 1.f / static_cast(cfgNrotation)); + } } else { fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hsRotBkg"), v12bkg.M(), v12bkg.Pt(), v12bkg.Eta(), weight * 1.f / static_cast(cfgNrotation)); } From a53014eba10ff8a678c785a083b72cc550e9b905 Mon Sep 17 00:00:00 2001 From: Daiki Sekihata Date: Sat, 22 Aug 2026 15:14:45 +0200 Subject: [PATCH 2/3] Add math.h header for mathematical functions --- PWGEM/Dilepton/Tasks/dimuonV1.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PWGEM/Dilepton/Tasks/dimuonV1.cxx b/PWGEM/Dilepton/Tasks/dimuonV1.cxx index 8c790d3836a..14da565f7c2 100644 --- a/PWGEM/Dilepton/Tasks/dimuonV1.cxx +++ b/PWGEM/Dilepton/Tasks/dimuonV1.cxx @@ -54,6 +54,8 @@ #include #include +#include + struct dimuonV1 { // // Configurables From dda09ab02002e9707d49871bffe743c7eb6fe635 Mon Sep 17 00:00:00 2001 From: Daiki Sekihata Date: Sat, 22 Aug 2026 15:15:40 +0200 Subject: [PATCH 3/3] Remove destructor implementation in dimuonV1 Removed destructor from dimuonV1 class. --- PWGEM/Dilepton/Tasks/dimuonV1.cxx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/PWGEM/Dilepton/Tasks/dimuonV1.cxx b/PWGEM/Dilepton/Tasks/dimuonV1.cxx index 14da565f7c2..977592b4ad5 100644 --- a/PWGEM/Dilepton/Tasks/dimuonV1.cxx +++ b/PWGEM/Dilepton/Tasks/dimuonV1.cxx @@ -199,14 +199,6 @@ struct dimuonV1 { mRunNumber = collision.runNumber(); } - ~dimuonV1() - { - // delete emh_pos; - // emh_pos = 0x0; - // delete emh_neg; - // emh_neg = 0x0; - } - void addhistograms() { // event info