From 2aa695134f9f530f5651643fd15384bbb5995a83 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Mon, 15 Sep 2025 11:53:09 +0200 Subject: [PATCH 01/28] =?UTF-8?q?Add=20UPC=20Polarisation=20J/=CF=88=20Inc?= =?UTF-8?q?orr=20task?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PWGUD/Tasks/CMakeLists.txt | 12 +- PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx | 372 ++++++++++++++++++++++ 2 files changed, 378 insertions(+), 6 deletions(-) create mode 100644 PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx diff --git a/PWGUD/Tasks/CMakeLists.txt b/PWGUD/Tasks/CMakeLists.txt index 37811e8dd4e..cdf53ecaa14 100644 --- a/PWGUD/Tasks/CMakeLists.txt +++ b/PWGUD/Tasks/CMakeLists.txt @@ -9,6 +9,11 @@ # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. +o2physics_add_dpl_workflow(upc-polarisation-jpsiincorr + SOURCES upcPolarisationJPsiIncorr.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase + COMPONENT_NAME Analysis) + o2physics_add_dpl_workflow(upc SOURCES upcAnalysis.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase @@ -230,7 +235,7 @@ o2physics_add_dpl_workflow(upc-quarkonia-central-barrel COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(test-mc-std-tabs-rl - SOURCES testMcStdTabsRl.cxx + SOURCES testMCstdTabsRL.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::ReconstructionDataFormats O2::DetectorsBase O2::DetectorsCommonDataFormats COMPONENT_NAME Analysis) @@ -253,8 +258,3 @@ o2physics_add_dpl_workflow(analysis-mc-dpm-jet-sg-v3 SOURCES analysisMCDPMJetSGv3.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore COMPONENT_NAME Analysis) - -o2physics_add_dpl_workflow(upc-test-rct-tables - SOURCES upcTestRctTables.cxx - PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore - COMPONENT_NAME Analysis) diff --git a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx new file mode 100644 index 00000000000..8f81ba79675 --- /dev/null +++ b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx @@ -0,0 +1,372 @@ +// 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 upcPolarisationJPsiIncorr.cxx +/// \brief copied from FWDMuonsUPC perform some selections on fwd events and saves the results +/// executable name o2-analysis-ud-upc-polarisation-jpsiincorr + +/// \author Niveditha Ram , IP2I + +#include +#include + +#include "Framework/runDataProcessing.h" +#include "Framework/O2DatabasePDGPlugin.h" +#include "Framework/AnalysisTask.h" +#include "Framework/AnalysisDataModel.h" +#include "CCDB/BasicCCDBManager.h" +#include "DataFormatsParameters/GRPLHCIFData.h" +#include "DataFormatsParameters/GRPECSObject.h" +#include "PWGUD/DataModel/UDTables.h" + +#include "TLorentzVector.h" +#include "TSystem.h" +#include "TMath.h" +#include "TRandom3.h" + +// table for saving tree with info on data +namespace dimu +{ +// dimuon +DECLARE_SOA_COLUMN(RunNumber, runNumber, int); +DECLARE_SOA_COLUMN(M, m, float); +DECLARE_SOA_COLUMN(Pt, pt, float); +DECLARE_SOA_COLUMN(Rap, rap, float); +DECLARE_SOA_COLUMN(Phi, phi, float); +} + +namespace o2::aod +{ +DECLARE_SOA_TABLE(DiMu, "AOD", "DIMU", + dimu::RunNumber, + dimu::M, dimu::Pt, dimu::Rap, dimu::Phi); +} // namespace o2::aod + + + + +using namespace o2; +using namespace o2::framework; +using namespace o2::framework::expressions; + +// constants used in the track selection +const float kRAbsMin = 17.6; +const float kRAbsMid = 26.5; +const float kRAbsMax = 89.5; +const float kPDca1 = 200.; +const float kPDca2 = 200.; +float kEtaMin = -4.0; +float kEtaMax = -2.5; +const float kPtMin = 0.; + +const float kMaxAmpV0A = 100.; +const int kReqMatchMIDTracks = 2; +const int kReqMatchMFTTracks = 2; +const int kMaxChi2MFTMatch = 30; +const float kMaxZDCTime = 2.; +const float kMaxZDCTimeHisto = 10.; +const int kMuonPDG = 13; + +struct upcPolarisationJPsiIncorr { + + // a pdg object + Service pdg; + + using CandidatesFwd = soa::Join; + using ForwardTracks = soa::Join; + using CompleteFwdTracks = soa::Join; + + Produces dimuSel; + // defining histograms using histogram registry: different histos for the different process functions + HistogramRegistry registry{"registry", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; + + // CONFIGURABLES + static constexpr double Pi = o2::constants::math::PI; + // pT of muon pairs + Configurable nBinsPt{"nBinsPt", 250, "N bins in pT histo"}; + Configurable lowPt{"lowPt", 0., "lower limit in pT histo"}; + Configurable highPt{"highPt", 2, "upper limit in pT histo"}; + // mass of muon pairs + Configurable nBinsMass{"nBinsMass", 500, "N bins in mass histo"}; + Configurable lowMass{"lowMass", 0., "lower limit in mass histo"}; + Configurable highMass{"highMass", 10., "upper limit in mass histo"}; + // eta of muon pairs + Configurable nBinsEta{"nBinsEta", 600, "N bins in eta histo"}; + Configurable lowEta{"lowEta", -10., "lower limit in eta histo"}; + Configurable highEta{"highEta", -2., "upper limit in eta histo"}; + // rapidity of muon pairs + Configurable nBinsRapidity{"nBinsRapidity", 250, "N bins in rapidity histo"}; + Configurable lowRapidity{"lowRapidity", -4.5, "lower limit in rapidity histo"}; + Configurable highRapidity{"highRapidity", -2., "upper limit in rapidity histo"}; + // phi of muon pairs + Configurable nBinsPhi{"nBinsPhi", 600, "N bins in phi histo"}; + Configurable lowPhi{"lowPhi", -Pi, "lower limit in phi histo"}; + Configurable highPhi{"highPhi", Pi, "upper limit in phi histo"}; + + // Analysis cuts + Configurable maxJpsiMass{"maxJpsiMass", 3.18, "Maximum of the jpsi peak for peak cut"}; + Configurable minJpsiMass{"minJpsiMass", 3.0, "Minimum of the jpsi peak for peak cut"}; + + // my track type + // 0 = MCH-MID-MFT + // 1 = MCH-MID + Configurable myTrackType{"myTrackType", 3, "My track type"}; + + void init(InitContext&) + { + // axis + const AxisSpec axisPt{nBinsPt, lowPt, highPt, "#it{p}_{T} GeV/#it{c}"}; + const AxisSpec axisMass{nBinsMass, lowMass, highMass, "m_{#mu#mu} GeV/#it{c}^{2}"}; + const AxisSpec axisEta{nBinsEta, lowEta, highEta, "#eta"}; + const AxisSpec axisRapidity{nBinsRapidity, lowRapidity, highRapidity, "Rapidity"}; + const AxisSpec axisPhi{nBinsPhi, lowPhi, highPhi, "#varphi"}; + + // histos + // data and reco MC + registry.add("hMass", "Invariant mass of muon pairs;;#counts", kTH1D, {axisMass}); + registry.add("hPt", "Transverse momentum of muon pairs;;#counts", kTH1D, {axisPt}); + registry.add("hEta", "Pseudorapidty of muon pairs;;#counts", kTH1D, {axisEta}); + registry.add("hRapidity", "Rapidty of muon pairs;;#counts", kTH1D, {axisRapidity}); + registry.add("hPhi", "#varphi of muon pairs;;#counts", kTH1D, {axisPhi}); + } + + + // retrieve particle mass (GeV/c^2) from TDatabasePDG + float particleMass(int pid) + { + auto mass = pdg->Mass(pid); + return mass; + } + + // template function that fills a map with the collision id of each udcollision as key + // and a vector with the tracks + // map == (key, element) == (udCollisionId, vector of trks) + template + void collectCandIDs(std::unordered_map>& tracksPerCand, TTracks& tracks) + { + for (const auto& tr : tracks) { + int32_t candId = tr.udCollisionId(); + if (candId < 0) { + continue; + } + tracksPerCand[candId].push_back(tr.globalIndex()); + } + } + + // template function that fills a map with the collision id of each udmccollision as key + // and a vector with the tracks + // map == (key, element) == (udMcCollisionId, vector of mc particles) + template + void collectMcCandIDs(std::unordered_map>& tracksPerCand, TTracks& tracks) + { + for (const auto& tr : tracks) { + int32_t candId = tr.udMcCollisionId(); + if (candId < 0) { + continue; + } + tracksPerCand[candId].push_back(tr.globalIndex()); + } + } + + // struct used to store the ZDC info in a map + struct ZDCinfo { + float timeA; + float timeC; + float enA; + float enC; + int32_t id; + }; + + // function that fills a map with the collision id of each udcollision as key + // and a ZDCinfo struct with the ZDC information + void collectCandZDCInfo(std::unordered_map& zdcPerCand, o2::aod::UDZdcsReduced const& ZDCs) + { + + for (const auto& zdc : ZDCs) { + int32_t candId = zdc.udCollisionId(); + if (candId < 0) { + continue; + } + + zdcPerCand[candId].timeA = zdc.timeZNA(); + zdcPerCand[candId].timeC = zdc.timeZNC(); + zdcPerCand[candId].enA = zdc.energyCommonZNA(); + zdcPerCand[candId].enC = zdc.energyCommonZNC(); + + // take care of the infinity + if (std::isinf(zdcPerCand[candId].timeA)) + zdcPerCand[candId].timeA = -999; + if (std::isinf(zdcPerCand[candId].timeC)) + zdcPerCand[candId].timeC = -999; + if (std::isinf(zdcPerCand[candId].enA)) + zdcPerCand[candId].enA = -999; + if (std::isinf(zdcPerCand[candId].enC)) + zdcPerCand[candId].enC = -999; + } + } + + // function to select muon tracks + template + bool isMuonSelected(const TTracks& fwdTrack) + { + float rAbs = fwdTrack.rAtAbsorberEnd(); + float pDca = fwdTrack.pDca(); + TLorentzVector p; + auto mMu = particleMass(kMuonPDG); + p.SetXYZM(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz(), mMu); + float eta = p.Eta(); + float pt = p.Pt(); + float pDcaMax = rAbs < kRAbsMid ? kPDca1 : kPDca2; + + if (eta < kEtaMin || eta > kEtaMax) + return false; + if (pt < kPtMin) + return false; + if (rAbs < kRAbsMin || rAbs > kRAbsMax) + return false; + if (pDca > pDcaMax) + return false; + return true; + } + + // function that processes the candidates: + // it applies V0 selection, trk selection, kine selection, and fills the histograms + // it also divides the data in neutron classes + // used for real data + void processCand(CandidatesFwd::iterator const& cand, + ForwardTracks::iterator const& tr1, ForwardTracks::iterator const& tr2, + ZDCinfo const& zdc) + { + // V0 selection + const auto& ampsV0A = cand.amplitudesV0A(); + const auto& ampsRelBCsV0A = cand.ampRelBCsV0A(); + for (unsigned int i = 0; i < ampsV0A.size(); ++i) { + if (std::abs(ampsRelBCsV0A[i]) <= 1) { + if (ampsV0A[i] > kMaxAmpV0A) + return; + } + } + + // MCH-MID match selection + int nMIDs = 0; + if (tr1.chi2MatchMCHMID() > 0) + nMIDs++; + if (tr2.chi2MatchMCHMID() > 0) + nMIDs++; + if (nMIDs != kReqMatchMIDTracks) + return; + + // MFT-MID match selection (if MFT is requested by the trackType) + if (myTrackType == 0) { + // if MFT is requested check that the tracks is inside the MFT acceptance + kEtaMin = -3.6; + kEtaMax = -2.5; + + int nMFT = 0; + if (tr1.chi2MatchMCHMFT() > 0 && tr1.chi2MatchMCHMFT() < kMaxChi2MFTMatch) + nMFT++; + if (tr2.chi2MatchMCHMFT() > 0 && tr2.chi2MatchMCHMFT() < kMaxChi2MFTMatch) + nMFT++; + if (nMFT != kReqMatchMFTTracks) + return; + } + // track selection + if (!isMuonSelected(*tr1)) + return; + if (!isMuonSelected(*tr2)) + return; + + // form Lorentz vectors + TLorentzVector p1, p2; + auto mMu = particleMass(kMuonPDG); + p1.SetXYZM(tr1.px(), tr1.py(), tr1.pz(), mMu); + p2.SetXYZM(tr2.px(), tr2.py(), tr2.pz(), mMu); + TLorentzVector p = p1 + p2; + + // cut on pair kinematics + // select mass + if (p.M() < lowMass) + return; + if (p.M() > highMass) + return; + // select pt + if (p.Pt() < lowPt) + return; + if (p.Pt() > highPt) + return; + // select rapidity + if (p.Rapidity() < lowRapidity) + return; + if (p.Rapidity() > highRapidity) + return; + + + // fill the histos without looking at neutron emission + registry.fill(HIST("hMass"), p.M()); + registry.fill(HIST("hPt"), p.Pt()); + registry.fill(HIST("hEta"), p.Eta()); + registry.fill(HIST("hRapidity"), p.Rapidity()); + registry.fill(HIST("hPhi"), p.Phi()); + + dimuSel(cand.runNumber(),p.M(), p.Pt(), p.Rapidity(), p.Phi()); + + + } + + + // PROCESS FUNCTION + void processData(CandidatesFwd const& eventCandidates, + o2::aod::UDZdcsReduced const& ZDCs, + ForwardTracks const& fwdTracks) + { + + // map with the tracks + std::unordered_map> tracksPerCand; + //takes a tracks table with a coloumn of collision ID and makes it into a map of collision ID to each track. + collectCandIDs(tracksPerCand, fwdTracks); + + // map with the ZDC info + std::unordered_map zdcPerCand; + collectCandZDCInfo(zdcPerCand, ZDCs); + + // loop over the candidates + for (const auto& item : tracksPerCand) { + int32_t trId1 = item.second[0]; + int32_t trId2 = item.second[1]; + int32_t candID = item.first; + auto cand = eventCandidates.iteratorAt(candID); + auto tr1 = fwdTracks.iteratorAt(trId1); + auto tr2 = fwdTracks.iteratorAt(trId2); + + ZDCinfo zdc; + + if (zdcPerCand.count(candID) != 0) { + zdc = zdcPerCand.at(candID); + } else { + zdc.timeA = -999; + zdc.timeC = -999; + zdc.enA = -999; + zdc.enC = -999; + } + processCand(cand, tr1, tr2, zdc); + } + } + + PROCESS_SWITCH(upcPolarisationJPsiIncorr, processData, "", true); + +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{ + adaptAnalysisTask(cfgc), + }; +} From 88a0634bb4251b0826c80cf272cb5ced76a593d4 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Tue, 16 Sep 2025 09:46:57 +0200 Subject: [PATCH 02/28] small bug fix --- PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx index 8f81ba79675..c9bec07e24e 100644 --- a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx +++ b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx @@ -61,8 +61,7 @@ using namespace o2::framework::expressions; const float kRAbsMin = 17.6; const float kRAbsMid = 26.5; const float kRAbsMax = 89.5; -const float kPDca1 = 200.; -const float kPDca2 = 200.; +const float kPDca = 200.; float kEtaMin = -4.0; float kEtaMax = -2.5; const float kPtMin = 0.; @@ -118,7 +117,7 @@ struct upcPolarisationJPsiIncorr { // my track type // 0 = MCH-MID-MFT // 1 = MCH-MID - Configurable myTrackType{"myTrackType", 3, "My track type"}; + Configurable myTrackType{"myTrackType", 1, "My track type"}; void init(InitContext&) { @@ -224,15 +223,14 @@ struct upcPolarisationJPsiIncorr { p.SetXYZM(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz(), mMu); float eta = p.Eta(); float pt = p.Pt(); - float pDcaMax = rAbs < kRAbsMid ? kPDca1 : kPDca2; - + if (eta < kEtaMin || eta > kEtaMax) return false; if (pt < kPtMin) return false; if (rAbs < kRAbsMin || rAbs > kRAbsMax) return false; - if (pDca > pDcaMax) + if (pDca > kPDca) return false; return true; } From c8cfa18d2b036f131c343bfcfbae210f96d190af Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Tue, 16 Sep 2025 10:12:11 +0200 Subject: [PATCH 03/28] whitespace and clang format --- PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx | 25 ++++------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx index c9bec07e24e..aeb12244dea 100644 --- a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx +++ b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx @@ -32,10 +32,10 @@ #include "TMath.h" #include "TRandom3.h" -// table for saving tree with info on data +// table for saving tree with info on data namespace dimu { -// dimuon +// dimuon DECLARE_SOA_COLUMN(RunNumber, runNumber, int); DECLARE_SOA_COLUMN(M, m, float); DECLARE_SOA_COLUMN(Pt, pt, float); @@ -48,11 +48,7 @@ namespace o2::aod DECLARE_SOA_TABLE(DiMu, "AOD", "DIMU", dimu::RunNumber, dimu::M, dimu::Pt, dimu::Rap, dimu::Phi); -} // namespace o2::aod - - - - +} // namespace o2::aod using namespace o2; using namespace o2::framework; using namespace o2::framework::expressions; @@ -86,7 +82,6 @@ struct upcPolarisationJPsiIncorr { Produces dimuSel; // defining histograms using histogram registry: different histos for the different process functions HistogramRegistry registry{"registry", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - // CONFIGURABLES static constexpr double Pi = o2::constants::math::PI; // pT of muon pairs @@ -109,7 +104,6 @@ struct upcPolarisationJPsiIncorr { Configurable nBinsPhi{"nBinsPhi", 600, "N bins in phi histo"}; Configurable lowPhi{"lowPhi", -Pi, "lower limit in phi histo"}; Configurable highPhi{"highPhi", Pi, "upper limit in phi histo"}; - // Analysis cuts Configurable maxJpsiMass{"maxJpsiMass", 3.18, "Maximum of the jpsi peak for peak cut"}; Configurable minJpsiMass{"minJpsiMass", 3.0, "Minimum of the jpsi peak for peak cut"}; @@ -127,7 +121,6 @@ struct upcPolarisationJPsiIncorr { const AxisSpec axisEta{nBinsEta, lowEta, highEta, "#eta"}; const AxisSpec axisRapidity{nBinsRapidity, lowRapidity, highRapidity, "Rapidity"}; const AxisSpec axisPhi{nBinsPhi, lowPhi, highPhi, "#varphi"}; - // histos // data and reco MC registry.add("hMass", "Invariant mass of muon pairs;;#counts", kTH1D, {axisMass}); @@ -136,8 +129,6 @@ struct upcPolarisationJPsiIncorr { registry.add("hRapidity", "Rapidty of muon pairs;;#counts", kTH1D, {axisRapidity}); registry.add("hPhi", "#varphi of muon pairs;;#counts", kTH1D, {axisPhi}); } - - // retrieve particle mass (GeV/c^2) from TDatabasePDG float particleMass(int pid) { @@ -223,7 +214,7 @@ struct upcPolarisationJPsiIncorr { p.SetXYZM(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz(), mMu); float eta = p.Eta(); float pt = p.Pt(); - + if (eta < kEtaMin || eta > kEtaMax) return false; if (pt < kPtMin) @@ -252,7 +243,6 @@ struct upcPolarisationJPsiIncorr { return; } } - // MCH-MID match selection int nMIDs = 0; if (tr1.chi2MatchMCHMID() > 0) @@ -261,7 +251,6 @@ struct upcPolarisationJPsiIncorr { nMIDs++; if (nMIDs != kReqMatchMIDTracks) return; - // MFT-MID match selection (if MFT is requested by the trackType) if (myTrackType == 0) { // if MFT is requested check that the tracks is inside the MFT acceptance @@ -305,8 +294,6 @@ struct upcPolarisationJPsiIncorr { return; if (p.Rapidity() > highRapidity) return; - - // fill the histos without looking at neutron emission registry.fill(HIST("hMass"), p.M()); registry.fill(HIST("hPt"), p.Pt()); @@ -315,11 +302,7 @@ struct upcPolarisationJPsiIncorr { registry.fill(HIST("hPhi"), p.Phi()); dimuSel(cand.runNumber(),p.M(), p.Pt(), p.Rapidity(), p.Phi()); - - } - - // PROCESS FUNCTION void processData(CandidatesFwd const& eventCandidates, o2::aod::UDZdcsReduced const& ZDCs, From ced6e4dbca1e49ce1620f01d7a9352724276c01b Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Tue, 16 Sep 2025 10:24:54 +0200 Subject: [PATCH 04/28] whitespace and clang format --- PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx index aeb12244dea..8e8f6d9b237 100644 --- a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx +++ b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx @@ -104,10 +104,9 @@ struct upcPolarisationJPsiIncorr { Configurable nBinsPhi{"nBinsPhi", 600, "N bins in phi histo"}; Configurable lowPhi{"lowPhi", -Pi, "lower limit in phi histo"}; Configurable highPhi{"highPhi", Pi, "upper limit in phi histo"}; - // Analysis cuts + // Analysis cuts Configurable maxJpsiMass{"maxJpsiMass", 3.18, "Maximum of the jpsi peak for peak cut"}; Configurable minJpsiMass{"minJpsiMass", 3.0, "Minimum of the jpsi peak for peak cut"}; - // my track type // 0 = MCH-MID-MFT // 1 = MCH-MID @@ -301,7 +300,7 @@ struct upcPolarisationJPsiIncorr { registry.fill(HIST("hRapidity"), p.Rapidity()); registry.fill(HIST("hPhi"), p.Phi()); - dimuSel(cand.runNumber(),p.M(), p.Pt(), p.Rapidity(), p.Phi()); + dimuSel(cand.runNumber(), p.M(), p.Pt(), p.Rapidity(), p.Phi()); } // PROCESS FUNCTION void processData(CandidatesFwd const& eventCandidates, From cb48fb6ae0215d7aecde06d85eb5d6030bbf7a08 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Tue, 16 Sep 2025 10:34:27 +0200 Subject: [PATCH 05/28] whitespace --- PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx index 8e8f6d9b237..22dc3429bc3 100644 --- a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx +++ b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx @@ -239,9 +239,10 @@ struct upcPolarisationJPsiIncorr { for (unsigned int i = 0; i < ampsV0A.size(); ++i) { if (std::abs(ampsRelBCsV0A[i]) <= 1) { if (ampsV0A[i] > kMaxAmpV0A) - return; + return; } } + // MCH-MID match selection int nMIDs = 0; if (tr1.chi2MatchMCHMID() > 0) From a15f560e965e16ee96741985245cb2045288040f Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Tue, 16 Sep 2025 10:34:48 +0200 Subject: [PATCH 06/28] clang-format --- PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx index 22dc3429bc3..e1f8bd00b11 100644 --- a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx +++ b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx @@ -242,7 +242,7 @@ struct upcPolarisationJPsiIncorr { return; } } - + // MCH-MID match selection int nMIDs = 0; if (tr1.chi2MatchMCHMID() > 0) From dd32cd866df4de3a8ed71fc861a6a88a2bef5679 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Tue, 16 Sep 2025 10:38:50 +0200 Subject: [PATCH 07/28] clang-format --- PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx index e1f8bd00b11..a29a8324e21 100644 --- a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx +++ b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx @@ -15,22 +15,23 @@ /// \author Niveditha Ram , IP2I -#include -#include +#include "PWGUD/DataModel/UDTables.h" -#include "Framework/runDataProcessing.h" -#include "Framework/O2DatabasePDGPlugin.h" -#include "Framework/AnalysisTask.h" -#include "Framework/AnalysisDataModel.h" #include "CCDB/BasicCCDBManager.h" -#include "DataFormatsParameters/GRPLHCIFData.h" #include "DataFormatsParameters/GRPECSObject.h" -#include "PWGUD/DataModel/UDTables.h" +#include "DataFormatsParameters/GRPLHCIFData.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/AnalysisTask.h" +#include "Framework/O2DatabasePDGPlugin.h" +#include "Framework/runDataProcessing.h" #include "TLorentzVector.h" -#include "TSystem.h" #include "TMath.h" #include "TRandom3.h" +#include "TSystem.h" + +#include +#include // table for saving tree with info on data namespace dimu @@ -41,7 +42,7 @@ DECLARE_SOA_COLUMN(M, m, float); DECLARE_SOA_COLUMN(Pt, pt, float); DECLARE_SOA_COLUMN(Rap, rap, float); DECLARE_SOA_COLUMN(Phi, phi, float); -} +} // namespace dimu namespace o2::aod { @@ -311,7 +312,7 @@ struct upcPolarisationJPsiIncorr { // map with the tracks std::unordered_map> tracksPerCand; - //takes a tracks table with a coloumn of collision ID and makes it into a map of collision ID to each track. + // takes a tracks table with a coloumn of collision ID and makes it into a map of collision ID to each track. collectCandIDs(tracksPerCand, fwdTracks); // map with the ZDC info @@ -342,7 +343,6 @@ struct upcPolarisationJPsiIncorr { } PROCESS_SWITCH(upcPolarisationJPsiIncorr, processData, "", true); - }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) From 12926d1575677cb7c6b77b72a3c3a4f547789eb9 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Thu, 18 Sep 2025 11:05:46 +0200 Subject: [PATCH 08/28] changes to TLorentzVector --- PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx index a29a8324e21..42918c8e1c0 100644 --- a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx +++ b/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx @@ -1,4 +1,4 @@ -// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// Copyright 2019-2020 CERN and copyOAright 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. // @@ -17,6 +17,7 @@ #include "PWGUD/DataModel/UDTables.h" +#include "TPDGCode.h" #include "CCDB/BasicCCDBManager.h" #include "DataFormatsParameters/GRPECSObject.h" #include "DataFormatsParameters/GRPLHCIFData.h" @@ -25,7 +26,7 @@ #include "Framework/O2DatabasePDGPlugin.h" #include "Framework/runDataProcessing.h" -#include "TLorentzVector.h" +#include "LorentzVector.h" #include "TMath.h" #include "TRandom3.h" #include "TSystem.h" @@ -33,6 +34,10 @@ #include #include +#include "Math/Vector4D.h" + +using namespace ROOT::Math; + // table for saving tree with info on data namespace dimu { @@ -69,8 +74,7 @@ const int kReqMatchMFTTracks = 2; const int kMaxChi2MFTMatch = 30; const float kMaxZDCTime = 2.; const float kMaxZDCTimeHisto = 10.; -const int kMuonPDG = 13; - +const PDG_t kMuonPDG = kMuonPlus; struct upcPolarisationJPsiIncorr { // a pdg object @@ -209,9 +213,8 @@ struct upcPolarisationJPsiIncorr { { float rAbs = fwdTrack.rAtAbsorberEnd(); float pDca = fwdTrack.pDca(); - TLorentzVector p; auto mMu = particleMass(kMuonPDG); - p.SetXYZM(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz(), mMu); + LorentzVector> p(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz(), mMu); float eta = p.Eta(); float pt = p.Pt(); @@ -273,11 +276,10 @@ struct upcPolarisationJPsiIncorr { return; // form Lorentz vectors - TLorentzVector p1, p2; auto mMu = particleMass(kMuonPDG); - p1.SetXYZM(tr1.px(), tr1.py(), tr1.pz(), mMu); - p2.SetXYZM(tr2.px(), tr2.py(), tr2.pz(), mMu); - TLorentzVector p = p1 + p2; + LorentzVector> p1(tr1.px(), tr1.py(), tr1.pz(), mMu); + LorentzVector> p2(tr2.px(), tr2.py(), tr2.pz(), mMu); + LorentzVector p = p1 + p2; // cut on pair kinematics // select mass From 7bef61daf44aea0eab581151dbf1d6f0076b7d16 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Thu, 18 Sep 2025 11:12:47 +0200 Subject: [PATCH 09/28] change name --- ...pcPolarisationJPsiIncorr.cxx => upcPolarisationJpsiIncorr.cxx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename PWGUD/Tasks/{upcPolarisationJPsiIncorr.cxx => upcPolarisationJpsiIncorr.cxx} (100%) diff --git a/PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx similarity index 100% rename from PWGUD/Tasks/upcPolarisationJPsiIncorr.cxx rename to PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx From bd932dd9d4af5f8398bc1ec71690020c286445ff Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Thu, 18 Sep 2025 11:16:05 +0200 Subject: [PATCH 10/28] whitspace and clang --- PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx index 42918c8e1c0..4f1ed8b1f6f 100644 --- a/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx +++ b/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx @@ -16,7 +16,6 @@ /// \author Niveditha Ram , IP2I #include "PWGUD/DataModel/UDTables.h" - #include "TPDGCode.h" #include "CCDB/BasicCCDBManager.h" #include "DataFormatsParameters/GRPECSObject.h" @@ -67,7 +66,6 @@ const float kPDca = 200.; float kEtaMin = -4.0; float kEtaMax = -2.5; const float kPtMin = 0.; - const float kMaxAmpV0A = 100.; const int kReqMatchMIDTracks = 2; const int kReqMatchMFTTracks = 2; From a58fc3c41b97db04de0f3d421142180d07819651 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 18 Sep 2025 09:16:43 +0000 Subject: [PATCH 11/28] Please consider the following formatting changes --- PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx index 4f1ed8b1f6f..3e5c2b7ea24 100644 --- a/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx +++ b/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx @@ -15,8 +15,10 @@ /// \author Niveditha Ram , IP2I +#include "LorentzVector.h" + #include "PWGUD/DataModel/UDTables.h" -#include "TPDGCode.h" + #include "CCDB/BasicCCDBManager.h" #include "DataFormatsParameters/GRPECSObject.h" #include "DataFormatsParameters/GRPLHCIFData.h" @@ -25,16 +27,15 @@ #include "Framework/O2DatabasePDGPlugin.h" #include "Framework/runDataProcessing.h" -#include "LorentzVector.h" +#include "Math/Vector4D.h" #include "TMath.h" +#include "TPDGCode.h" #include "TRandom3.h" #include "TSystem.h" #include #include -#include "Math/Vector4D.h" - using namespace ROOT::Math; // table for saving tree with info on data @@ -72,7 +73,7 @@ const int kReqMatchMFTTracks = 2; const int kMaxChi2MFTMatch = 30; const float kMaxZDCTime = 2.; const float kMaxZDCTimeHisto = 10.; -const PDG_t kMuonPDG = kMuonPlus; +const PDG_t kMuonPDG = kMuonPlus; struct upcPolarisationJPsiIncorr { // a pdg object From be01067d9e98ed4a39bd222169cd4146c1cbe9e5 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Thu, 18 Sep 2025 11:19:05 +0200 Subject: [PATCH 12/28] copyright text --- PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx index 3e5c2b7ea24..cf9eab3d473 100644 --- a/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx +++ b/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx @@ -9,7 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// \file upcPolarisationJPsiIncorr.cxx +/// \file upcPolarisationJpsiIncorr.cxx /// \brief copied from FWDMuonsUPC perform some selections on fwd events and saves the results /// executable name o2-analysis-ud-upc-polarisation-jpsiincorr From b5d16fb834c755faa14d3f99b40df894cd81f705 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Thu, 18 Sep 2025 11:25:15 +0200 Subject: [PATCH 13/28] copyright text and changing name from JPsi to Jpsi --- PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx index cf9eab3d473..50849739f51 100644 --- a/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx +++ b/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx @@ -1,19 +1,11 @@ -// Copyright 2019-2020 CERN and copyOAright 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. +// 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 upcPolarisationJpsiIncorr.cxx /// \brief copied from FWDMuonsUPC perform some selections on fwd events and saves the results + /// executable name o2-analysis-ud-upc-polarisation-jpsiincorr -/// \author Niveditha Ram , IP2I +/// \author Niveditha Ram , IP2I #include "LorentzVector.h" @@ -74,7 +66,7 @@ const int kMaxChi2MFTMatch = 30; const float kMaxZDCTime = 2.; const float kMaxZDCTimeHisto = 10.; const PDG_t kMuonPDG = kMuonPlus; -struct upcPolarisationJPsiIncorr { +struct upcPolarisationJpsiIncorr { // a pdg object Service pdg; @@ -343,12 +335,12 @@ struct upcPolarisationJPsiIncorr { } } - PROCESS_SWITCH(upcPolarisationJPsiIncorr, processData, "", true); + PROCESS_SWITCH(upcPolarisationJpsiIncorr, processData, "", true); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{ - adaptAnalysisTask(cfgc), + adaptAnalysisTask(cfgc), }; } From 4293e42a0e1cb65740828ef64578cd6e1372bcb2 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Thu, 18 Sep 2025 11:28:59 +0200 Subject: [PATCH 14/28] changing name from JPsi to Jpsi --- PWGUD/Tasks/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGUD/Tasks/CMakeLists.txt b/PWGUD/Tasks/CMakeLists.txt index cdf53ecaa14..68ab93681fb 100644 --- a/PWGUD/Tasks/CMakeLists.txt +++ b/PWGUD/Tasks/CMakeLists.txt @@ -10,7 +10,7 @@ # or submit itself to any jurisdiction. o2physics_add_dpl_workflow(upc-polarisation-jpsiincorr - SOURCES upcPolarisationJPsiIncorr.cxx + SOURCES upcPolarisationJpsiIncorr.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase COMPONENT_NAME Analysis) From a357123b7f0edf601addb56930f07561a658770f Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Thu, 18 Sep 2025 11:34:05 +0200 Subject: [PATCH 15/28] copyright text --- PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx index 50849739f51..13c02fc5b59 100644 --- a/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx +++ b/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx @@ -1,11 +1,20 @@ -// 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. +// 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 upcPolarisationJpsiIncorr.cxx -/// \brief copied from FWDMuonsUPC perform some selections on fwd events and saves the results +/// \brief Workflow to analyse UPC forward events and perform J/psi polarization selections +/// \author Niveditha Ram, IP2I +/// \ingroup PWGUD +/// executable name: o2-analysis-ud-upc-polarisation-jpsiincorr -/// executable name o2-analysis-ud-upc-polarisation-jpsiincorr - -/// \author Niveditha Ram , IP2I #include "LorentzVector.h" From 807ec287b83f4abdfcd9c997e4a5bed1c0986fc2 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Thu, 18 Sep 2025 11:35:17 +0200 Subject: [PATCH 16/28] clang format --- PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx index 13c02fc5b59..8147af039ed 100644 --- a/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx +++ b/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx @@ -15,7 +15,6 @@ /// \ingroup PWGUD /// executable name: o2-analysis-ud-upc-polarisation-jpsiincorr - #include "LorentzVector.h" #include "PWGUD/DataModel/UDTables.h" From 52d964078a6b0546d9df8ddfb496b0ae58393c72 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Thu, 18 Sep 2025 15:05:31 +0200 Subject: [PATCH 17/28] clang format --- ...onJpsiIncorr.cxx => upcPolarisationJpsiIncoh.cxx} | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) rename PWGUD/Tasks/{upcPolarisationJpsiIncorr.cxx => upcPolarisationJpsiIncoh.cxx} (97%) diff --git a/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx similarity index 97% rename from PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx rename to PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx index 8147af039ed..769c0589e99 100644 --- a/PWGUD/Tasks/upcPolarisationJpsiIncorr.cxx +++ b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx @@ -9,13 +9,11 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// \file upcPolarisationJpsiIncorr.cxx +/// \file upcPolarisationJpsiIncoh.cxx /// \brief Workflow to analyse UPC forward events and perform J/psi polarization selections /// \author Niveditha Ram, IP2I /// \ingroup PWGUD -/// executable name: o2-analysis-ud-upc-polarisation-jpsiincorr - -#include "LorentzVector.h" +/// executable name: o2-analysis-ud-upc-polarisation-jpsiincoh #include "PWGUD/DataModel/UDTables.h" @@ -74,7 +72,7 @@ const int kMaxChi2MFTMatch = 30; const float kMaxZDCTime = 2.; const float kMaxZDCTimeHisto = 10.; const PDG_t kMuonPDG = kMuonPlus; -struct upcPolarisationJpsiIncorr { +struct UpcPolarisationJpsiIncoh { // a pdg object Service pdg; @@ -343,12 +341,12 @@ struct upcPolarisationJpsiIncorr { } } - PROCESS_SWITCH(upcPolarisationJpsiIncorr, processData, "", true); + PROCESS_SWITCH(UpcPolarisationJpsiIncoh, processData, "", true); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{ - adaptAnalysisTask(cfgc), + adaptAnalysisTask(cfgc), }; } From ca9e0939f494d189295e409e8edf3156d6ee50a8 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Thu, 18 Sep 2025 15:06:33 +0200 Subject: [PATCH 18/28] name change --- PWGUD/Tasks/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGUD/Tasks/CMakeLists.txt b/PWGUD/Tasks/CMakeLists.txt index 68ab93681fb..9b872482c6c 100644 --- a/PWGUD/Tasks/CMakeLists.txt +++ b/PWGUD/Tasks/CMakeLists.txt @@ -9,8 +9,8 @@ # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. -o2physics_add_dpl_workflow(upc-polarisation-jpsiincorr - SOURCES upcPolarisationJpsiIncorr.cxx +o2physics_add_dpl_workflow(upc-polarisation-jpsiincoh + SOURCES upcPolarisationJpsiIncoh.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase COMPONENT_NAME Analysis) From 29d2a8cd2777397f7368da1db1840219c559fa94 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Thu, 18 Sep 2025 15:10:52 +0200 Subject: [PATCH 19/28] camel to kebab case --- PWGUD/Tasks/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGUD/Tasks/CMakeLists.txt b/PWGUD/Tasks/CMakeLists.txt index 9b872482c6c..a6a6000ba76 100644 --- a/PWGUD/Tasks/CMakeLists.txt +++ b/PWGUD/Tasks/CMakeLists.txt @@ -9,7 +9,7 @@ # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. -o2physics_add_dpl_workflow(upc-polarisation-jpsiincoh +o2physics_add_dpl_workflow(upc-polarisation-jpsi-incoh SOURCES upcPolarisationJpsiIncoh.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase COMPONENT_NAME Analysis) From fabc784a1bc580b986fa5cd909d616717567fa9f Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Fri, 19 Sep 2025 09:34:58 +0200 Subject: [PATCH 20/28] restoring to good version with lines for my task --- PWGUD/Tasks/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PWGUD/Tasks/CMakeLists.txt b/PWGUD/Tasks/CMakeLists.txt index a6a6000ba76..89cd087ef28 100644 --- a/PWGUD/Tasks/CMakeLists.txt +++ b/PWGUD/Tasks/CMakeLists.txt @@ -235,7 +235,7 @@ o2physics_add_dpl_workflow(upc-quarkonia-central-barrel COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(test-mc-std-tabs-rl - SOURCES testMCstdTabsRL.cxx + SOURCES testMcStdTabsRl.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::ReconstructionDataFormats O2::DetectorsBase O2::DetectorsCommonDataFormats COMPONENT_NAME Analysis) @@ -258,3 +258,8 @@ o2physics_add_dpl_workflow(analysis-mc-dpm-jet-sg-v3 SOURCES analysisMCDPMJetSGv3.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(upc-test-rct-tables + SOURCES upcTestRctTables.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) From 1f6ae5dcd52a0ac82ae553a03725a84e81e3eeec Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Fri, 19 Sep 2025 22:11:15 +0200 Subject: [PATCH 21/28] fixing LorentxVector and unsued variables --- PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx | 26 ++++++++++-------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx index 769c0589e99..a32db25ebda 100644 --- a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx +++ b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx @@ -34,6 +34,11 @@ #include #include +#include "Framework/AnalysisDataModel.h" +#include "Common/PhysicsConstants.h" + +#include "Common/RecoDecay.h" + using namespace ROOT::Math; // table for saving tree with info on data @@ -71,7 +76,6 @@ const int kReqMatchMFTTracks = 2; const int kMaxChi2MFTMatch = 30; const float kMaxZDCTime = 2.; const float kMaxZDCTimeHisto = 10.; -const PDG_t kMuonPDG = kMuonPlus; struct UpcPolarisationJpsiIncoh { // a pdg object @@ -130,12 +134,6 @@ struct UpcPolarisationJpsiIncoh { registry.add("hRapidity", "Rapidty of muon pairs;;#counts", kTH1D, {axisRapidity}); registry.add("hPhi", "#varphi of muon pairs;;#counts", kTH1D, {axisPhi}); } - // retrieve particle mass (GeV/c^2) from TDatabasePDG - float particleMass(int pid) - { - auto mass = pdg->Mass(pid); - return mass; - } // template function that fills a map with the collision id of each udcollision as key // and a vector with the tracks @@ -210,11 +208,10 @@ struct UpcPolarisationJpsiIncoh { { float rAbs = fwdTrack.rAtAbsorberEnd(); float pDca = fwdTrack.pDca(); - auto mMu = particleMass(kMuonPDG); - LorentzVector> p(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz(), mMu); - float eta = p.Eta(); - float pt = p.Pt(); - + + float pt = RecoDecay::pt(fwdTrack.px(), fwdTrack.py()); + float eta = RecoDecay::eta(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz()); + if (eta < kEtaMin || eta > kEtaMax) return false; if (pt < kPtMin) @@ -231,8 +228,7 @@ struct UpcPolarisationJpsiIncoh { // it also divides the data in neutron classes // used for real data void processCand(CandidatesFwd::iterator const& cand, - ForwardTracks::iterator const& tr1, ForwardTracks::iterator const& tr2, - ZDCinfo const& zdc) + ForwardTracks::iterator const& tr1, ForwardTracks::iterator const& tr2) { // V0 selection const auto& ampsV0A = cand.amplitudesV0A(); @@ -273,7 +269,7 @@ struct UpcPolarisationJpsiIncoh { return; // form Lorentz vectors - auto mMu = particleMass(kMuonPDG); + auto mMu = o2::constants::physics::MassMuonCharged; LorentzVector> p1(tr1.px(), tr1.py(), tr1.pz(), mMu); LorentzVector> p2(tr2.px(), tr2.py(), tr2.pz(), mMu); LorentzVector p = p1 + p2; From 68fb95fae298ac1b252583210a85d864dd94a70c Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Fri, 19 Sep 2025 22:14:46 +0200 Subject: [PATCH 22/28] whitespace and clang format --- PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx index a32db25ebda..d098eebb9d3 100644 --- a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx +++ b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx @@ -208,10 +208,8 @@ struct UpcPolarisationJpsiIncoh { { float rAbs = fwdTrack.rAtAbsorberEnd(); float pDca = fwdTrack.pDca(); - float pt = RecoDecay::pt(fwdTrack.px(), fwdTrack.py()); float eta = RecoDecay::eta(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz()); - if (eta < kEtaMin || eta > kEtaMax) return false; if (pt < kPtMin) From 4d6efa4c03efa1cffaa23a936011a7385ecccf4b Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Fri, 19 Sep 2025 20:15:26 +0000 Subject: [PATCH 23/28] Please consider the following formatting changes --- PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx index d098eebb9d3..7f495b03fcc 100644 --- a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx +++ b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx @@ -17,6 +17,9 @@ #include "PWGUD/DataModel/UDTables.h" +#include "Common/PhysicsConstants.h" +#include "Common/RecoDecay.h" + #include "CCDB/BasicCCDBManager.h" #include "DataFormatsParameters/GRPECSObject.h" #include "DataFormatsParameters/GRPLHCIFData.h" @@ -34,11 +37,6 @@ #include #include -#include "Framework/AnalysisDataModel.h" -#include "Common/PhysicsConstants.h" - -#include "Common/RecoDecay.h" - using namespace ROOT::Math; // table for saving tree with info on data @@ -208,7 +206,7 @@ struct UpcPolarisationJpsiIncoh { { float rAbs = fwdTrack.rAtAbsorberEnd(); float pDca = fwdTrack.pDca(); - float pt = RecoDecay::pt(fwdTrack.px(), fwdTrack.py()); + float pt = RecoDecay::pt(fwdTrack.px(), fwdTrack.py()); float eta = RecoDecay::eta(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz()); if (eta < kEtaMin || eta > kEtaMax) return false; From e581c4afbb276adf73728783b7c13ba8760b8ca3 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Sat, 20 Sep 2025 16:45:59 +0200 Subject: [PATCH 24/28] local changes --- PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx index 7f495b03fcc..3be151b0f5a 100644 --- a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx +++ b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx @@ -17,7 +17,11 @@ #include "PWGUD/DataModel/UDTables.h" +<<<<<<< HEAD #include "Common/PhysicsConstants.h" +======= +#include "CommonConstants/PhysicsConstants.h" +>>>>>>> 44a10ccb9 (physics constants) #include "Common/RecoDecay.h" #include "CCDB/BasicCCDBManager.h" @@ -25,12 +29,10 @@ #include "DataFormatsParameters/GRPLHCIFData.h" #include "Framework/AnalysisDataModel.h" #include "Framework/AnalysisTask.h" -#include "Framework/O2DatabasePDGPlugin.h" #include "Framework/runDataProcessing.h" #include "Math/Vector4D.h" #include "TMath.h" -#include "TPDGCode.h" #include "TRandom3.h" #include "TSystem.h" @@ -265,7 +267,7 @@ struct UpcPolarisationJpsiIncoh { return; // form Lorentz vectors - auto mMu = o2::constants::physics::MassMuonCharged; + auto mMu = o2::constants::physics::MassMuonMinus; LorentzVector> p1(tr1.px(), tr1.py(), tr1.pz(), mMu); LorentzVector> p2(tr2.px(), tr2.py(), tr2.pz(), mMu); LorentzVector p = p1 + p2; From 5e93ac2f08affc5ff566097a182ad4ae0e5db232 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Sat, 20 Sep 2025 16:30:08 +0200 Subject: [PATCH 25/28] physics constants --- PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx index 3be151b0f5a..decebf81075 100644 --- a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx +++ b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx @@ -17,14 +17,11 @@ #include "PWGUD/DataModel/UDTables.h" -<<<<<<< HEAD -#include "Common/PhysicsConstants.h" -======= #include "CommonConstants/PhysicsConstants.h" ->>>>>>> 44a10ccb9 (physics constants) #include "Common/RecoDecay.h" #include "CCDB/BasicCCDBManager.h" +#include "CommonConstants/PhysicsConstants.h" #include "DataFormatsParameters/GRPECSObject.h" #include "DataFormatsParameters/GRPLHCIFData.h" #include "Framework/AnalysisDataModel.h" From 3f80a343962499ca4512d79d2dc32a7ab6af1429 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Sat, 20 Sep 2025 16:51:19 +0200 Subject: [PATCH 26/28] clang format --- PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx index decebf81075..6bf2836d12d 100644 --- a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx +++ b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx @@ -17,7 +17,6 @@ #include "PWGUD/DataModel/UDTables.h" -#include "CommonConstants/PhysicsConstants.h" #include "Common/RecoDecay.h" #include "CCDB/BasicCCDBManager.h" From cf8aea4a7dde8e2e61df415a00306ff90a152588 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Sun, 21 Sep 2025 14:21:16 +0200 Subject: [PATCH 27/28] clang format --- PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx | 25 ++++-------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx index 6bf2836d12d..b1a2bb769a3 100644 --- a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx +++ b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx @@ -17,8 +17,7 @@ #include "PWGUD/DataModel/UDTables.h" -#include "Common/RecoDecay.h" - +#include "Common/Core/RecoDecay.h" #include "CCDB/BasicCCDBManager.h" #include "CommonConstants/PhysicsConstants.h" #include "DataFormatsParameters/GRPECSObject.h" @@ -60,7 +59,6 @@ using namespace o2::framework::expressions; // constants used in the track selection const float kRAbsMin = 17.6; -const float kRAbsMid = 26.5; const float kRAbsMax = 89.5; const float kPDca = 200.; float kEtaMin = -4.0; @@ -70,13 +68,8 @@ const float kMaxAmpV0A = 100.; const int kReqMatchMIDTracks = 2; const int kReqMatchMFTTracks = 2; const int kMaxChi2MFTMatch = 30; -const float kMaxZDCTime = 2.; -const float kMaxZDCTimeHisto = 10.; struct UpcPolarisationJpsiIncoh { - // a pdg object - Service pdg; - using CandidatesFwd = soa::Join; using ForwardTracks = soa::Join; using CompleteFwdTracks = soa::Join; @@ -205,7 +198,7 @@ struct UpcPolarisationJpsiIncoh { float rAbs = fwdTrack.rAtAbsorberEnd(); float pDca = fwdTrack.pDca(); float pt = RecoDecay::pt(fwdTrack.px(), fwdTrack.py()); - float eta = RecoDecay::eta(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz()); + float eta = RecoDecay::eta(std::array{fwdTrack.px(), fwdTrack.py(), fwdTrack.pz()}); if (eta < kEtaMin || eta > kEtaMax) return false; if (pt < kPtMin) @@ -316,18 +309,7 @@ struct UpcPolarisationJpsiIncoh { auto cand = eventCandidates.iteratorAt(candID); auto tr1 = fwdTracks.iteratorAt(trId1); auto tr2 = fwdTracks.iteratorAt(trId2); - - ZDCinfo zdc; - - if (zdcPerCand.count(candID) != 0) { - zdc = zdcPerCand.at(candID); - } else { - zdc.timeA = -999; - zdc.timeC = -999; - zdc.enA = -999; - zdc.enC = -999; - } - processCand(cand, tr1, tr2, zdc); + processCand(cand, tr1, tr2); } } @@ -336,6 +318,7 @@ struct UpcPolarisationJpsiIncoh { WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { + auto ptr = std::make_shared(); return WorkflowSpec{ adaptAnalysisTask(cfgc), }; From 5c0556c5bba51f02543362973f05f9c7b3357fb8 Mon Sep 17 00:00:00 2001 From: Niveditha Ramasubramanian Date: Sun, 21 Sep 2025 14:28:25 +0200 Subject: [PATCH 28/28] remving constructor pointer --- PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx index b1a2bb769a3..88d8f36d18d 100644 --- a/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx +++ b/PWGUD/Tasks/upcPolarisationJpsiIncoh.cxx @@ -18,6 +18,7 @@ #include "PWGUD/DataModel/UDTables.h" #include "Common/Core/RecoDecay.h" + #include "CCDB/BasicCCDBManager.h" #include "CommonConstants/PhysicsConstants.h" #include "DataFormatsParameters/GRPECSObject.h" @@ -318,7 +319,6 @@ struct UpcPolarisationJpsiIncoh { WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { - auto ptr = std::make_shared(); return WorkflowSpec{ adaptAnalysisTask(cfgc), };