From 4442c41041bbdb63037a0dced4b5837f35677dc4 Mon Sep 17 00:00:00 2001 From: Yiping Wang Date: Mon, 7 Jul 2025 14:44:08 +0200 Subject: [PATCH 1/4] Enable reading collision system info from CCDB --- PWGDQ/Core/VarManager.cxx | 82 ++++++++++++++++++++++++--- PWGDQ/Core/VarManager.h | 25 +++----- PWGDQ/Tasks/tableReader_withAssoc.cxx | 7 +++ 3 files changed, 88 insertions(+), 26 deletions(-) diff --git a/PWGDQ/Core/VarManager.cxx b/PWGDQ/Core/VarManager.cxx index 00e07e5a38a..9165efadbd9 100644 --- a/PWGDQ/Core/VarManager.cxx +++ b/PWGDQ/Core/VarManager.cxx @@ -28,8 +28,6 @@ bool VarManager::fgUsedVars[VarManager::kNVars] = {false}; bool VarManager::fgUsedKF = false; float VarManager::fgMagField = 0.5; float VarManager::fgValues[VarManager::kNVars] = {0.0f}; -float VarManager::fgCenterOfMassEnergy = 13600; // GeV -float VarManager::fgMassofCollidingParticle = 9.382720; // GeV float VarManager::fgTPCInterSectorBoundary = 1.0; // cm int VarManager::fgITSROFbias = 0; int VarManager::fgITSROFlength = 100; @@ -37,6 +35,8 @@ int VarManager::fgITSROFBorderMarginLow = 0; int VarManager::fgITSROFBorderMarginHigh = 0; uint64_t VarManager::fgSOR = 0; uint64_t VarManager::fgEOR = 0; +ROOT::Math::PxPyPzEVector VarManager::fgBeamA(0, 0, 6799.99, 6800); // GeV, beam from A-side 4-momentum vector +ROOT::Math::PxPyPzEVector VarManager::fgBeamC(0, 0, -6799.99, 6800); // GeV, beam from C-side 4-momentum vector o2::vertexing::DCAFitterN<2> VarManager::fgFitterTwoProngBarrel; o2::vertexing::DCAFitterN<3> VarManager::fgFitterThreeProngBarrel; o2::vertexing::DCAFitterN<4> VarManager::fgFitterFourProngBarrel; @@ -114,15 +114,79 @@ void VarManager::SetCollisionSystem(TString system, float energy) // // Set the collision system and the center of mass energy // - fgCenterOfMassEnergy = energy; - - if (system.Contains("PbPb")) { - fgMassofCollidingParticle = MassProton * 208; - } - if (system.Contains("pp")) { - fgMassofCollidingParticle = MassProton; + int NumberOfNucleonsA = 1; // default value for pp collisions + int NumberOfNucleonsC = 1; // default value for pp collisions + int NumberOfProtonsA = 1; // default value for pp collisions + int NumberOfProtonsC = 1; // default value for pp collisions + if (system.EqualTo("PbPb")) { + NumberOfNucleonsA = 208; + NumberOfNucleonsC = 208; + NumberOfProtonsA = 82; // Pb has 82 protons + NumberOfProtonsC = 82; // Pb has 82 protons + } else if (system.EqualTo("pp")) { + NumberOfNucleonsA = 1; + NumberOfNucleonsC = 1; + NumberOfProtonsA = 1; // proton has 1 proton + NumberOfProtonsC = 1; // proton has 1 proton + } else if (system.EqualTo("XeXe")) { + NumberOfNucleonsA = 129; + NumberOfNucleonsC = 129; + NumberOfProtonsA = 54; // Xe has 54 protons + NumberOfProtonsC = 54; // Xe has 54 protons + } else if (system.EqualTo("pPb")) { + NumberOfNucleonsA = 1; + NumberOfNucleonsC = 208; + NumberOfProtonsA = 1; // proton has 1 proton + NumberOfProtonsC = 82; // Pb has 82 protons + } else if (system.EqualTo("Pbp")) { + NumberOfNucleonsA = 208; + NumberOfNucleonsC = 1; + NumberOfProtonsA = 82; // Pb has 82 protons + NumberOfProtonsC = 1; // proton has 1 proton + } else if (system.EqualTo("OO")) { + NumberOfNucleonsA = 16; + NumberOfNucleonsC = 16; + NumberOfProtonsA = 8; // O has 8 protons + NumberOfProtonsC = 8; // O has 8 protons + } else if (system.EqualTo("pO")) { + NumberOfNucleonsA = 1; + NumberOfNucleonsC = 16; + NumberOfProtonsA = 1; // proton has 1 proton + NumberOfProtonsC = 8; // O has 8 protons + } else if (system.EqualTo("NeNe")) { + NumberOfNucleonsA = 20; + NumberOfNucleonsC = 20; + NumberOfProtonsA = 10; // Ne has 5 protons + NumberOfProtonsC = 10; // Ne has 5 protons + } else { + LOGF(WARNING, "Unknown collision system %s, using default pp", system.Data()); } // TO Do: add more systems + + // set the beam 4-momentum vectors + float beamAEnergy = energy / 2.0 * sqrt(NumberOfProtonsA * NumberOfProtonsC / NumberOfProtonsC / NumberOfProtonsA); // GeV + float beamCEnergy = energy / 2.0 * sqrt(NumberOfProtonsC * NumberOfProtonsA / NumberOfProtonsA / NumberOfProtonsC); // GeV + float beamAMomentum = std::sqrt(beamAEnergy * beamAEnergy - NumberOfNucleonsA * NumberOfNucleonsA * MassProton * MassProton); + float beamCMomentum = std::sqrt(beamCEnergy * beamCEnergy - NumberOfNucleonsC * NumberOfNucleonsC * MassProton * MassProton); + fgBeamA.SetPxPyPzE(0, 0, beamAMomentum, beamAEnergy); + fgBeamC.SetPxPyPzE(0, 0, -beamCMomentum, beamCEnergy); +} + +//__________________________________________________________________ +void VarManager::SetCollisionSystem(o2::parameters::GRPLHCIFData* grplhcif) +{ + // + // Set the collision system and the center of mass energy from the GRP information + double beamAEnergy = grplhcif->getBeamEnergyPerNucleonInGeV(o2::constants::lhc::BeamDirection::BeamA); + double beamCEnergy = grplhcif->getBeamEnergyPerNucleonInGeV(o2::constants::lhc::BeamDirection::BeamC); + double beamANucleons = grplhcif->getBeamA(o2::constants::lhc::BeamDirection::BeamA); + double beamCNucleons = grplhcif->getBeamA(o2::constants::lhc::BeamDirection::BeamC); + double beamAMomentum = std::sqrt(beamAEnergy * beamAEnergy - beamANucleons * beamANucleons * MassProton * MassProton); + double beamCMomentum = std::sqrt(beamCEnergy * beamCEnergy - beamCNucleons * beamCNucleons * MassProton * MassProton); + fgBeamA.SetPxPyPzE(0, 0, beamAMomentum, beamAEnergy); + fgBeamC.SetPxPyPzE(0, 0, -beamCMomentum, beamCEnergy); + LOGF(INFO, "Beam A energy = %.2f GeV, beam C energy = %.2f GeV", beamAEnergy, beamCEnergy); + LOGF(INFO, "Beam A with %.0f nucleons, beam C with %.0f nucleons", beamANucleons, beamCNucleons); } //__________________________________________________________________ diff --git a/PWGDQ/Core/VarManager.h b/PWGDQ/Core/VarManager.h index 0d56f77491a..3e4531b357b 100644 --- a/PWGDQ/Core/VarManager.h +++ b/PWGDQ/Core/VarManager.h @@ -67,6 +67,7 @@ #include "KFVertex.h" #include "Common/Core/EventPlaneHelper.h" +#include "Common/Core/CollisionTypeHelper.h" using std::complex; using std::cout; @@ -927,6 +928,7 @@ class VarManager : public TObject // Setup the collision system static void SetCollisionSystem(TString system, float energy); + static void SetCollisionSystem(o2::parameters::GRPLHCIFData* grplhcif); static void SetMagneticField(float magField) { @@ -1197,6 +1199,8 @@ class VarManager : public TObject static int fgITSROFBorderMarginHigh; // ITS ROF border high margin static uint64_t fgSOR; // Timestamp for start of run static uint64_t fgEOR; // Timestamp for end of run + static ROOT::Math::PxPyPzEVector fgBeamA; // beam from A-side 4-momentum vector + static ROOT::Math::PxPyPzEVector fgBeamC; // beam from C-side 4-momentum vector // static void FillEventDerived(float* values = nullptr); static void FillTrackDerived(float* values = nullptr); @@ -2866,16 +2870,11 @@ void VarManager::FillPair(T1 const& t1, T2 const& t2, float* values) bool useRM = fgUsedVars[kCosThetaRM]; // Random frame if (useHE || useCS || usePP || useRM) { - // TO DO: get the correct values from CCDB - double BeamMomentum = TMath::Sqrt(fgCenterOfMassEnergy * fgCenterOfMassEnergy / 4 - fgMassofCollidingParticle * fgMassofCollidingParticle); // GeV - ROOT::Math::PxPyPzEVector Beam1(0., 0., -BeamMomentum, fgCenterOfMassEnergy / 2); - ROOT::Math::PxPyPzEVector Beam2(0., 0., BeamMomentum, fgCenterOfMassEnergy / 2); - ROOT::Math::Boost boostv12{v12.BoostToCM()}; ROOT::Math::XYZVectorF v1_CM{(boostv12(v1).Vect()).Unit()}; ROOT::Math::XYZVectorF v2_CM{(boostv12(v2).Vect()).Unit()}; - ROOT::Math::XYZVectorF Beam1_CM{(boostv12(Beam1).Vect()).Unit()}; - ROOT::Math::XYZVectorF Beam2_CM{(boostv12(Beam2).Vect()).Unit()}; + ROOT::Math::XYZVectorF Beam1_CM{(boostv12(fgBeamA).Vect()).Unit()}; + ROOT::Math::XYZVectorF Beam2_CM{(boostv12(fgBeamC).Vect()).Unit()}; // using positive sign convention for the first track ROOT::Math::XYZVectorF v_CM = (t1.sign() > 0 ? v1_CM : v2_CM); @@ -3381,16 +3380,11 @@ void VarManager::FillPairMC(T1 const& t1, T2 const& t2, float* values) bool useRM = fgUsedVars[kMCCosThetaRM]; // Random frame if (useHE || useCS || usePP || useRM) { - // TO DO: get the correct values from CCDB - double BeamMomentum = TMath::Sqrt(fgCenterOfMassEnergy * fgCenterOfMassEnergy / 4 - fgMassofCollidingParticle * fgMassofCollidingParticle); // GeV - ROOT::Math::PxPyPzEVector Beam1(0., 0., -BeamMomentum, fgCenterOfMassEnergy / 2); - ROOT::Math::PxPyPzEVector Beam2(0., 0., BeamMomentum, fgCenterOfMassEnergy / 2); - ROOT::Math::Boost boostv12{v12.BoostToCM()}; ROOT::Math::XYZVectorF v1_CM{(boostv12(v1).Vect()).Unit()}; ROOT::Math::XYZVectorF v2_CM{(boostv12(v2).Vect()).Unit()}; - ROOT::Math::XYZVectorF Beam1_CM{(boostv12(Beam1).Vect()).Unit()}; - ROOT::Math::XYZVectorF Beam2_CM{(boostv12(Beam2).Vect()).Unit()}; + ROOT::Math::XYZVectorF Beam1_CM{(boostv12(fgBeamA).Vect()).Unit()}; + ROOT::Math::XYZVectorF Beam2_CM{(boostv12(fgBeamC).Vect()).Unit()}; // using positive sign convention for the first track ROOT::Math::XYZVectorF v_CM = (t1.pdgCode() > 0 ? v1_CM : v2_CM); @@ -4848,9 +4842,6 @@ void VarManager::FillPairVn(T1 const& t1, T2 const& t2, float* values) // global polarization parameters bool useGlobalPolarizatiobSpinOne = fgUsedVars[kCosThetaStarTPC] || fgUsedVars[kCosThetaStarFT0A] || fgUsedVars[kCosThetaStarFT0C]; if (useGlobalPolarizatiobSpinOne) { - double BeamMomentum = TMath::Sqrt(fgCenterOfMassEnergy * fgCenterOfMassEnergy / 4 - fgMassofCollidingParticle * fgMassofCollidingParticle); // GeV - ROOT::Math::PxPyPzEVector Beam1(0., 0., -BeamMomentum, fgCenterOfMassEnergy / 2); - ROOT::Math::Boost boostv12{v12.BoostToCM()}; ROOT::Math::XYZVectorF v1_CM{(boostv12(v1).Vect()).Unit()}; ROOT::Math::XYZVectorF v2_CM{(boostv12(v2).Vect()).Unit()}; diff --git a/PWGDQ/Tasks/tableReader_withAssoc.cxx b/PWGDQ/Tasks/tableReader_withAssoc.cxx index ebb21398062..11c63afc903 100644 --- a/PWGDQ/Tasks/tableReader_withAssoc.cxx +++ b/PWGDQ/Tasks/tableReader_withAssoc.cxx @@ -1217,6 +1217,7 @@ struct AnalysisSameEventPairing { Configurable grpMagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"}; Configurable lutPath{"lutPath", "GLO/Param/MatLUT", "Path of the Lut parametrization"}; Configurable geoPath{"geoPath", "GLO/Config/GeometryAligned", "Path of the geometry file"}; + Configurable GrpLhcIfPath{"grplhcif", "GLO/Config/GRPLHCIF", "Path on the CCDB for the GRPLHCIF object"}; } fConfigCCDB; struct : ConfigurableGroup { @@ -1231,6 +1232,7 @@ struct AnalysisSameEventPairing { Configurable collisionSystem{"syst", "pp", "Collision system, pp or PbPb"}; Configurable centerMassEnergy{"energy", 13600, "Center of mass energy in GeV"}; Configurable propTrack{"cfgPropTrack", true, "Propgate tracks to associated collision to recalculate DCA and momentum vector"}; + Configurable useRemoteCollisionInfo{"cfgUseRemoteCollisionInfo", false, "Use remote collision information from CCDB"}; } fConfigOptions; Service fCCDB; @@ -1551,6 +1553,11 @@ struct AnalysisSameEventPairing { uint64_t sor = std::atol(header["SOR"].c_str()); uint64_t eor = std::atol(header["EOR"].c_str()); VarManager::SetSORandEOR(sor, eor); + + if (fConfigOptions.useRemoteCollisionInfo) { + o2::parameters::GRPLHCIFData* grpo = fCCDB->getForTimeStamp(fConfigCCDB.GrpLhcIfPath, timestamp); + VarManager::SetCollisionSystem(grpo); + } } // Template function to run same event pairing (barrel-barrel, muon-muon, barrel-muon) From 11c079afb17b4e5665270cb29b2b633ef21830f1 Mon Sep 17 00:00:00 2001 From: Yiping Wang Date: Mon, 7 Jul 2025 14:50:49 +0200 Subject: [PATCH 2/4] Add polarization table for dilepton --- PWGDQ/DataModel/ReducedInfoTables.h | 21 +++++++++++++++++++++ PWGDQ/Tasks/tableReader_withAssoc.cxx | 12 ++++++++++++ 2 files changed, 33 insertions(+) diff --git a/PWGDQ/DataModel/ReducedInfoTables.h b/PWGDQ/DataModel/ReducedInfoTables.h index 68673e81de2..ff0c99669c0 100644 --- a/PWGDQ/DataModel/ReducedInfoTables.h +++ b/PWGDQ/DataModel/ReducedInfoTables.h @@ -739,6 +739,19 @@ DECLARE_SOA_COLUMN(PairDCAxy, pairDCAxy, float); DECLARE_SOA_COLUMN(DeviationPairKF, deviationPairKF, float); //! Pair chi2 deviation to PV from KFParticle DECLARE_SOA_COLUMN(DeviationxyPairKF, deviationxyPairKF, float); //! Pair chi2 deviation to PV in XY from KFParticle // DECLARE_SOA_INDEX_COLUMN(ReducedMuon, reducedmuon2); //! +DECLARE_SOA_COLUMN(CosThetaHE, costhetaHE, float); //! Cosine in the helicity frame +DECLARE_SOA_COLUMN(PhiHE, phiHe, float); //! Phi in the helicity frame +DECLARE_SOA_COLUMN(PhiTildeHE, phiTildeHe, float); //! Tilde Phi in the helicity frame +DECLARE_SOA_COLUMN(CosThetaCS, costhetaCS, float); //! Cosine in the Collins-Soper frame +DECLARE_SOA_COLUMN(PhiCS, phiCS, float); //! Phi in the Collins-Soper frame +DECLARE_SOA_COLUMN(PhiTildeCS, phiTildeCS, float); //! Tilde Phi in the Collins-Soper frame +DECLARE_SOA_COLUMN(CosThetaPP, costhetaPP, float); //! Cosine in the Production Plane frame +DECLARE_SOA_COLUMN(PhiPP, phiPP, float); //! Phi in the Production Plane frame +DECLARE_SOA_COLUMN(PhiTildePP, phiTildePP, float); //! Tilde Phi in the Production Plane frame +DECLARE_SOA_COLUMN(CosThetaRM, costhetaRM, float); //! Cosine in the Random frame +DECLARE_SOA_COLUMN(CosThetaStarTPC, costhetaStarTPC, float); //! global polarization, event plane reconstructed from TPC tracks +DECLARE_SOA_COLUMN(CosThetaStarFT0A, costhetaStarFT0A, float); //! global polarization, event plane reconstructed from FT0A tracks +DECLARE_SOA_COLUMN(CosThetaStarFT0C, costhetaStarFT0C, float); //! global polarization, event plane reconstructed from FT0C tracks DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //! [](float pt, float phi) -> float { return pt * std::cos(phi); }); DECLARE_SOA_DYNAMIC_COLUMN(Py, py, //! @@ -875,6 +888,13 @@ DECLARE_SOA_TABLE(DileptonsMiniTreeRec, "AOD", "RTDILMTREEREC", //! dilepton_track_index::Pt1, dilepton_track_index::Eta1, dilepton_track_index::Phi1, dilepton_track_index::Pt2, dilepton_track_index::Eta2, dilepton_track_index::Phi2); +DECLARE_SOA_TABLE(DileptonsPolarization, "AOD", "RTDILPOLAR", //! + reducedpair::CosThetaHE, reducedpair::PhiHE, reducedpair::PhiTildeHE, + reducedpair::CosThetaCS, reducedpair::PhiCS, reducedpair::PhiTildeCS, + reducedpair::CosThetaPP, reducedpair::PhiPP, reducedpair::PhiTildePP, + reducedpair::CosThetaRM, + reducedpair::CosThetaStarTPC, reducedpair::CosThetaStarFT0A, reducedpair::CosThetaStarFT0C); + using Dielectron = Dielectrons::iterator; using StoredDielectron = StoredDielectrons::iterator; using Dimuon = Dimuons::iterator; @@ -888,6 +908,7 @@ using DimuonAll = DimuonsAll::iterator; using DileptonMiniTree = DileptonsMiniTree::iterator; using DileptonMiniTreeGen = DileptonsMiniTreeGen::iterator; using DileptonMiniTreeRec = DileptonsMiniTreeRec::iterator; +using DileptonPolarization = DileptonsPolarization::iterator; // Tables for using analysis-dilepton-track with analysis-asymmetric-pairing DECLARE_SOA_TABLE(Ditracks, "AOD", "RTDITRACK", //! diff --git a/PWGDQ/Tasks/tableReader_withAssoc.cxx b/PWGDQ/Tasks/tableReader_withAssoc.cxx index 11c63afc903..9111debabf8 100644 --- a/PWGDQ/Tasks/tableReader_withAssoc.cxx +++ b/PWGDQ/Tasks/tableReader_withAssoc.cxx @@ -1192,6 +1192,7 @@ struct AnalysisSameEventPairing { Produces dileptonFlowList; Produces dileptonInfoList; Produces PromptNonPromptSepTable; + Produces dileptonPolarList; o2::base::MatLayerCylSet* fLUT = nullptr; int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc. @@ -1224,6 +1225,7 @@ struct AnalysisSameEventPairing { Configurable useRemoteField{"cfgUseRemoteField", false, "Chose whether to fetch the magnetic field from ccdb or set it manually"}; Configurable magField{"cfgMagField", 5.0f, "Manually set magnetic field"}; Configurable flatTables{"cfgFlatTables", false, "Produce a single flat tables with all relevant information of the pairs and single tracks"}; + Configurable polarTables{"cfgPolarTables", false, "Produce tables with dilepton polarization information"}; Configurable useKFVertexing{"cfgUseKFVertexing", false, "Use KF Particle for secondary vertex reconstruction (DCAFitter is used by default)"}; Configurable useAbsDCA{"cfgUseAbsDCA", false, "Use absolute DCA minimization instead of chi^2 minimization in secondary vertexing"}; Configurable propToPCA{"cfgPropToPCA", false, "Propagate tracks to secondary vertex"}; @@ -1608,6 +1610,9 @@ struct AnalysisSameEventPairing { dielectronAllList.reserve(1); dimuonAllList.reserve(1); } + if (fConfigOptions.polarTables.value) { + dielectronPolarList.reserve(1); + } fAmbiguousPairs.clear(); constexpr bool eventHasQvector = ((TEventFillMap & VarManager::ObjTypes::ReducedEventQvector) > 0); constexpr bool eventHasQvectorCentr = ((TEventFillMap & VarManager::ObjTypes::CollisionQvect) > 0); @@ -1682,6 +1687,13 @@ struct AnalysisSameEventPairing { dielectronInfoList(t1.collisionId(), t1.trackId(), t2.trackId()); dileptonInfoList(t1.collisionId(), event.posX(), event.posY(), event.posZ()); } + if (fConfigOptions.polarTables.value) { + dileptonPolarizationTable(VarManager::fgValues[VarManager::kCosThetaHE], VarManager::fgValues[VarManager::kPhiHE], VarManager::fgValues[VarManager::kPhiTildeHE], + VarManager::fgValues[VarManager::kCosThetaCS], VarManager::fgValues[VarManager::kPhiCS], VarManager::fgValues[VarManager::kPhiTildeCS], + VarManager::fgValues[VarManager::kCosThetaPP], VarManager::fgValues[VarManager::kPhiPP], VarManager::fgValues[VarManager::kPhiTildePP], + VarManager::fgValues[VarManager::kCosThetaRM], + VarManager::fgValues[VarManager::kCosThetaStarTPC], VarManager::fgValues[VarManager::kCosThetaStarFT0A], VarManager::fgValues[VarManager::kCosThetaStarFT0C]); + } if constexpr (trackHasCov && TTwoProngFitter) { dielectronsExtraList(t1.globalIndex(), t2.globalIndex(), VarManager::fgValues[VarManager::kVertexingTauzProjected], VarManager::fgValues[VarManager::kVertexingLzProjected], VarManager::fgValues[VarManager::kVertexingLxyProjected]); if constexpr ((TTrackFillMap & VarManager::ObjTypes::ReducedTrackBarrelPID) > 0) { From 81a16ca209b5babb795191706d81b46e8bfef121 Mon Sep 17 00:00:00 2001 From: Yiping Wang Date: Mon, 7 Jul 2025 15:32:04 +0200 Subject: [PATCH 3/4] fix bug --- PWGDQ/Core/VarManager.cxx | 4 ---- PWGDQ/Tasks/tableReader_withAssoc.cxx | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/PWGDQ/Core/VarManager.cxx b/PWGDQ/Core/VarManager.cxx index 9165efadbd9..84f692af3c0 100644 --- a/PWGDQ/Core/VarManager.cxx +++ b/PWGDQ/Core/VarManager.cxx @@ -158,8 +158,6 @@ void VarManager::SetCollisionSystem(TString system, float energy) NumberOfNucleonsC = 20; NumberOfProtonsA = 10; // Ne has 5 protons NumberOfProtonsC = 10; // Ne has 5 protons - } else { - LOGF(WARNING, "Unknown collision system %s, using default pp", system.Data()); } // TO Do: add more systems @@ -185,8 +183,6 @@ void VarManager::SetCollisionSystem(o2::parameters::GRPLHCIFData* grplhcif) double beamCMomentum = std::sqrt(beamCEnergy * beamCEnergy - beamCNucleons * beamCNucleons * MassProton * MassProton); fgBeamA.SetPxPyPzE(0, 0, beamAMomentum, beamAEnergy); fgBeamC.SetPxPyPzE(0, 0, -beamCMomentum, beamCEnergy); - LOGF(INFO, "Beam A energy = %.2f GeV, beam C energy = %.2f GeV", beamAEnergy, beamCEnergy); - LOGF(INFO, "Beam A with %.0f nucleons, beam C with %.0f nucleons", beamANucleons, beamCNucleons); } //__________________________________________________________________ diff --git a/PWGDQ/Tasks/tableReader_withAssoc.cxx b/PWGDQ/Tasks/tableReader_withAssoc.cxx index 9111debabf8..5217cc83dc3 100644 --- a/PWGDQ/Tasks/tableReader_withAssoc.cxx +++ b/PWGDQ/Tasks/tableReader_withAssoc.cxx @@ -1611,7 +1611,7 @@ struct AnalysisSameEventPairing { dimuonAllList.reserve(1); } if (fConfigOptions.polarTables.value) { - dielectronPolarList.reserve(1); + dileptonPolarList.reserve(1); } fAmbiguousPairs.clear(); constexpr bool eventHasQvector = ((TEventFillMap & VarManager::ObjTypes::ReducedEventQvector) > 0); @@ -1688,7 +1688,7 @@ struct AnalysisSameEventPairing { dileptonInfoList(t1.collisionId(), event.posX(), event.posY(), event.posZ()); } if (fConfigOptions.polarTables.value) { - dileptonPolarizationTable(VarManager::fgValues[VarManager::kCosThetaHE], VarManager::fgValues[VarManager::kPhiHE], VarManager::fgValues[VarManager::kPhiTildeHE], + dileptonPolarList(VarManager::fgValues[VarManager::kCosThetaHE], VarManager::fgValues[VarManager::kPhiHE], VarManager::fgValues[VarManager::kPhiTildeHE], VarManager::fgValues[VarManager::kCosThetaCS], VarManager::fgValues[VarManager::kPhiCS], VarManager::fgValues[VarManager::kPhiTildeCS], VarManager::fgValues[VarManager::kCosThetaPP], VarManager::fgValues[VarManager::kPhiPP], VarManager::fgValues[VarManager::kPhiTildePP], VarManager::fgValues[VarManager::kCosThetaRM], From 98912f17cfe383f491acb908409e1a29b274e39c Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 7 Jul 2025 13:32:59 +0000 Subject: [PATCH 4/4] Please consider the following formatting changes --- PWGDQ/Core/VarManager.cxx | 10 ++-- PWGDQ/Core/VarManager.h | 67 +++++++++++++-------------- PWGDQ/DataModel/ReducedInfoTables.h | 26 +++++------ PWGDQ/Tasks/tableReader_withAssoc.cxx | 8 ++-- 4 files changed, 55 insertions(+), 56 deletions(-) diff --git a/PWGDQ/Core/VarManager.cxx b/PWGDQ/Core/VarManager.cxx index 84f692af3c0..912dc06740a 100644 --- a/PWGDQ/Core/VarManager.cxx +++ b/PWGDQ/Core/VarManager.cxx @@ -35,7 +35,7 @@ int VarManager::fgITSROFBorderMarginLow = 0; int VarManager::fgITSROFBorderMarginHigh = 0; uint64_t VarManager::fgSOR = 0; uint64_t VarManager::fgEOR = 0; -ROOT::Math::PxPyPzEVector VarManager::fgBeamA(0, 0, 6799.99, 6800); // GeV, beam from A-side 4-momentum vector +ROOT::Math::PxPyPzEVector VarManager::fgBeamA(0, 0, 6799.99, 6800); // GeV, beam from A-side 4-momentum vector ROOT::Math::PxPyPzEVector VarManager::fgBeamC(0, 0, -6799.99, 6800); // GeV, beam from C-side 4-momentum vector o2::vertexing::DCAFitterN<2> VarManager::fgFitterTwoProngBarrel; o2::vertexing::DCAFitterN<3> VarManager::fgFitterThreeProngBarrel; @@ -116,8 +116,8 @@ void VarManager::SetCollisionSystem(TString system, float energy) // int NumberOfNucleonsA = 1; // default value for pp collisions int NumberOfNucleonsC = 1; // default value for pp collisions - int NumberOfProtonsA = 1; // default value for pp collisions - int NumberOfProtonsC = 1; // default value for pp collisions + int NumberOfProtonsA = 1; // default value for pp collisions + int NumberOfProtonsC = 1; // default value for pp collisions if (system.EqualTo("PbPb")) { NumberOfNucleonsA = 208; NumberOfNucleonsC = 208; @@ -136,13 +136,13 @@ void VarManager::SetCollisionSystem(TString system, float energy) } else if (system.EqualTo("pPb")) { NumberOfNucleonsA = 1; NumberOfNucleonsC = 208; - NumberOfProtonsA = 1; // proton has 1 proton + NumberOfProtonsA = 1; // proton has 1 proton NumberOfProtonsC = 82; // Pb has 82 protons } else if (system.EqualTo("Pbp")) { NumberOfNucleonsA = 208; NumberOfNucleonsC = 1; NumberOfProtonsA = 82; // Pb has 82 protons - NumberOfProtonsC = 1; // proton has 1 proton + NumberOfProtonsC = 1; // proton has 1 proton } else if (system.EqualTo("OO")) { NumberOfNucleonsA = 16; NumberOfNucleonsC = 16; diff --git a/PWGDQ/Core/VarManager.h b/PWGDQ/Core/VarManager.h index 3e4531b357b..dfcba891bfc 100644 --- a/PWGDQ/Core/VarManager.h +++ b/PWGDQ/Core/VarManager.h @@ -24,50 +24,49 @@ #define HomogeneousField #endif -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include "TRandom.h" -#include "TH3F.h" -#include "Math/Vector4D.h" -#include "Math/Vector3D.h" -#include "Math/GenVector/Boost.h" -#include "Math/VectorUtil.h" - -#include "Framework/DataTypes.h" -#include "TGeoGlobalMagField.h" -#include "Field/MagneticField.h" -#include "ReconstructionDataFormats/Track.h" -#include "ReconstructionDataFormats/Vertex.h" -#include "DCAFitter/DCAFitterN.h" #include "Common/CCDB/EventSelectionParams.h" #include "Common/CCDB/TriggerAliases.h" -#include "ReconstructionDataFormats/DCA.h" -#include "DetectorsBase/Propagator.h" +#include "Common/Core/CollisionTypeHelper.h" +#include "Common/Core/EventPlaneHelper.h" #include "Common/Core/trackUtilities.h" -#include "Math/SMatrix.h" -#include "ReconstructionDataFormats/TrackFwd.h" +#include "CommonConstants/LHCConstants.h" +#include "CommonConstants/PhysicsConstants.h" +#include "DCAFitter/DCAFitterN.h" #include "DCAFitter/FwdDCAFitterN.h" +#include "DetectorsBase/Propagator.h" +#include "Field/MagneticField.h" +#include "Framework/DataTypes.h" #include "GlobalTracking/MatchGlobalFwd.h" -#include "CommonConstants/PhysicsConstants.h" -#include "CommonConstants/LHCConstants.h" +#include "ReconstructionDataFormats/DCA.h" +#include "ReconstructionDataFormats/Track.h" +#include "ReconstructionDataFormats/TrackFwd.h" +#include "ReconstructionDataFormats/Vertex.h" + +#include "Math/GenVector/Boost.h" +#include "Math/SMatrix.h" +#include "Math/Vector3D.h" +#include "Math/Vector4D.h" +#include "Math/VectorUtil.h" +#include "TGeoGlobalMagField.h" +#include "TH3F.h" +#include "TRandom.h" +#include +#include -#include "KFParticle.h" #include "KFPTrack.h" #include "KFPVertex.h" +#include "KFParticle.h" #include "KFParticleBase.h" #include "KFVertex.h" -#include "Common/Core/EventPlaneHelper.h" -#include "Common/Core/CollisionTypeHelper.h" +#include +#include +#include +#include +#include +#include +#include using std::complex; using std::cout; @@ -1199,8 +1198,8 @@ class VarManager : public TObject static int fgITSROFBorderMarginHigh; // ITS ROF border high margin static uint64_t fgSOR; // Timestamp for start of run static uint64_t fgEOR; // Timestamp for end of run - static ROOT::Math::PxPyPzEVector fgBeamA; // beam from A-side 4-momentum vector - static ROOT::Math::PxPyPzEVector fgBeamC; // beam from C-side 4-momentum vector + static ROOT::Math::PxPyPzEVector fgBeamA; // beam from A-side 4-momentum vector + static ROOT::Math::PxPyPzEVector fgBeamC; // beam from C-side 4-momentum vector // static void FillEventDerived(float* values = nullptr); static void FillTrackDerived(float* values = nullptr); diff --git a/PWGDQ/DataModel/ReducedInfoTables.h b/PWGDQ/DataModel/ReducedInfoTables.h index ff0c99669c0..ae5fd853bf9 100644 --- a/PWGDQ/DataModel/ReducedInfoTables.h +++ b/PWGDQ/DataModel/ReducedInfoTables.h @@ -739,19 +739,19 @@ DECLARE_SOA_COLUMN(PairDCAxy, pairDCAxy, float); DECLARE_SOA_COLUMN(DeviationPairKF, deviationPairKF, float); //! Pair chi2 deviation to PV from KFParticle DECLARE_SOA_COLUMN(DeviationxyPairKF, deviationxyPairKF, float); //! Pair chi2 deviation to PV in XY from KFParticle // DECLARE_SOA_INDEX_COLUMN(ReducedMuon, reducedmuon2); //! -DECLARE_SOA_COLUMN(CosThetaHE, costhetaHE, float); //! Cosine in the helicity frame -DECLARE_SOA_COLUMN(PhiHE, phiHe, float); //! Phi in the helicity frame -DECLARE_SOA_COLUMN(PhiTildeHE, phiTildeHe, float); //! Tilde Phi in the helicity frame -DECLARE_SOA_COLUMN(CosThetaCS, costhetaCS, float); //! Cosine in the Collins-Soper frame -DECLARE_SOA_COLUMN(PhiCS, phiCS, float); //! Phi in the Collins-Soper frame -DECLARE_SOA_COLUMN(PhiTildeCS, phiTildeCS, float); //! Tilde Phi in the Collins-Soper frame -DECLARE_SOA_COLUMN(CosThetaPP, costhetaPP, float); //! Cosine in the Production Plane frame -DECLARE_SOA_COLUMN(PhiPP, phiPP, float); //! Phi in the Production Plane frame -DECLARE_SOA_COLUMN(PhiTildePP, phiTildePP, float); //! Tilde Phi in the Production Plane frame -DECLARE_SOA_COLUMN(CosThetaRM, costhetaRM, float); //! Cosine in the Random frame -DECLARE_SOA_COLUMN(CosThetaStarTPC, costhetaStarTPC, float); //! global polarization, event plane reconstructed from TPC tracks -DECLARE_SOA_COLUMN(CosThetaStarFT0A, costhetaStarFT0A, float); //! global polarization, event plane reconstructed from FT0A tracks -DECLARE_SOA_COLUMN(CosThetaStarFT0C, costhetaStarFT0C, float); //! global polarization, event plane reconstructed from FT0C tracks +DECLARE_SOA_COLUMN(CosThetaHE, costhetaHE, float); //! Cosine in the helicity frame +DECLARE_SOA_COLUMN(PhiHE, phiHe, float); //! Phi in the helicity frame +DECLARE_SOA_COLUMN(PhiTildeHE, phiTildeHe, float); //! Tilde Phi in the helicity frame +DECLARE_SOA_COLUMN(CosThetaCS, costhetaCS, float); //! Cosine in the Collins-Soper frame +DECLARE_SOA_COLUMN(PhiCS, phiCS, float); //! Phi in the Collins-Soper frame +DECLARE_SOA_COLUMN(PhiTildeCS, phiTildeCS, float); //! Tilde Phi in the Collins-Soper frame +DECLARE_SOA_COLUMN(CosThetaPP, costhetaPP, float); //! Cosine in the Production Plane frame +DECLARE_SOA_COLUMN(PhiPP, phiPP, float); //! Phi in the Production Plane frame +DECLARE_SOA_COLUMN(PhiTildePP, phiTildePP, float); //! Tilde Phi in the Production Plane frame +DECLARE_SOA_COLUMN(CosThetaRM, costhetaRM, float); //! Cosine in the Random frame +DECLARE_SOA_COLUMN(CosThetaStarTPC, costhetaStarTPC, float); //! global polarization, event plane reconstructed from TPC tracks +DECLARE_SOA_COLUMN(CosThetaStarFT0A, costhetaStarFT0A, float); //! global polarization, event plane reconstructed from FT0A tracks +DECLARE_SOA_COLUMN(CosThetaStarFT0C, costhetaStarFT0C, float); //! global polarization, event plane reconstructed from FT0C tracks DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //! [](float pt, float phi) -> float { return pt * std::cos(phi); }); DECLARE_SOA_DYNAMIC_COLUMN(Py, py, //! diff --git a/PWGDQ/Tasks/tableReader_withAssoc.cxx b/PWGDQ/Tasks/tableReader_withAssoc.cxx index 5217cc83dc3..d6b29b461d2 100644 --- a/PWGDQ/Tasks/tableReader_withAssoc.cxx +++ b/PWGDQ/Tasks/tableReader_withAssoc.cxx @@ -1689,10 +1689,10 @@ struct AnalysisSameEventPairing { } if (fConfigOptions.polarTables.value) { dileptonPolarList(VarManager::fgValues[VarManager::kCosThetaHE], VarManager::fgValues[VarManager::kPhiHE], VarManager::fgValues[VarManager::kPhiTildeHE], - VarManager::fgValues[VarManager::kCosThetaCS], VarManager::fgValues[VarManager::kPhiCS], VarManager::fgValues[VarManager::kPhiTildeCS], - VarManager::fgValues[VarManager::kCosThetaPP], VarManager::fgValues[VarManager::kPhiPP], VarManager::fgValues[VarManager::kPhiTildePP], - VarManager::fgValues[VarManager::kCosThetaRM], - VarManager::fgValues[VarManager::kCosThetaStarTPC], VarManager::fgValues[VarManager::kCosThetaStarFT0A], VarManager::fgValues[VarManager::kCosThetaStarFT0C]); + VarManager::fgValues[VarManager::kCosThetaCS], VarManager::fgValues[VarManager::kPhiCS], VarManager::fgValues[VarManager::kPhiTildeCS], + VarManager::fgValues[VarManager::kCosThetaPP], VarManager::fgValues[VarManager::kPhiPP], VarManager::fgValues[VarManager::kPhiTildePP], + VarManager::fgValues[VarManager::kCosThetaRM], + VarManager::fgValues[VarManager::kCosThetaStarTPC], VarManager::fgValues[VarManager::kCosThetaStarFT0A], VarManager::fgValues[VarManager::kCosThetaStarFT0C]); } if constexpr (trackHasCov && TTwoProngFitter) { dielectronsExtraList(t1.globalIndex(), t2.globalIndex(), VarManager::fgValues[VarManager::kVertexingTauzProjected], VarManager::fgValues[VarManager::kVertexingLzProjected], VarManager::fgValues[VarManager::kVertexingLxyProjected]);