Skip to content

Commit 03ac1f4

Browse files
store signed pt of the candidate instead of pt, swap hardcoded pdg codes for PDG_t
1 parent d3c92c5 commit 03ac1f4

2 files changed

Lines changed: 19 additions & 14 deletions

File tree

‎PWGLF/DataModel/LFDoubleOmegaTables.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace o2::aod
2121

2222
namespace DoubleOmegaTables
2323
{
24-
DECLARE_SOA_COLUMN(PtDoubleOmega, ptDoubleOmega, float);
24+
DECLARE_SOA_COLUMN(PtDoubleOmega, ptDoubleOmega, float); // Signed transverse momentum of the double-Omega candidate, signed by the charge of the direct kaon.
2525
DECLARE_SOA_COLUMN(EtaDoubleOmega, etaDoubleOmega, float);
2626
DECLARE_SOA_COLUMN(PhiDoubleOmega, phiDoubleOmega, float);
2727
DECLARE_SOA_COLUMN(DecayVtxX, decayVtxX, float);
@@ -55,7 +55,7 @@ DECLARE_SOA_COLUMN(MassDoubleOmega, massDoubleOmega, float);
5555
DECLARE_SOA_COLUMN(MassOmega, massOmega, float);
5656
DECLARE_SOA_COLUMN(MassXi, massXi, float);
5757

58-
DECLARE_SOA_COLUMN(GenPt, genPt, float);
58+
DECLARE_SOA_COLUMN(GenPt, genPt, float); // Signed transverse momentum of the generated double-Omega candidate, signed by the charge of the direct kaon.
5959
DECLARE_SOA_COLUMN(GenEta, genEta, float);
6060
DECLARE_SOA_COLUMN(GenPhi, genPhi, float);
6161
DECLARE_SOA_COLUMN(GenDecayLength, genDecayLength, float);

‎PWGLF/TableProducer/Strangeness/doubleOmegaTreeCreator.cxx‎

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ struct DoubleOmegaCandidate {
9696
float mass = -999.f;
9797
float massOmega = -999.f;
9898
float massXi = -999.f;
99+
int8_t sign = 0;
99100
};
100101

101102
struct DoubleOmegaMCInfo {
@@ -110,6 +111,7 @@ struct DoubleOmegaMCInfo {
110111
std::array<float, 3> genProductionVertex{-999.f, -999.f, -999.f};
111112
std::array<float, 3> genDecayVertex{-999.f, -999.f, -999.f};
112113
std::array<float, 3> genOmegaDecayVertex{-999.f, -999.f, -999.f};
114+
int8_t sign = 0;
113115
};
114116

115117
struct LambdaCandidate {
@@ -669,6 +671,7 @@ struct doubleOmegaTreeCreator {
669671
}
670672
cand.massOmega = omega.massOmega;
671673
cand.massXi = omega.massXi;
674+
cand.sign = omega.sign;
672675
return true;
673676
}
674677

@@ -681,9 +684,9 @@ struct doubleOmegaTreeCreator {
681684

682685
auto mcPosTrack = posTrack.template mcParticle_as<aod::McParticles>();
683686
auto mcNegTrack = negTrack.template mcParticle_as<aod::McParticles>();
684-
const int expectedPosPdg = sign < 0 ? 2212 : 211;
685-
const int expectedNegPdg = sign < 0 ? -211 : -2212;
686-
const int expectedLambdaPdg = sign < 0 ? 3122 : -3122;
687+
const int expectedPosPdg = sign < 0 ? PDG_t::kProton : PDG_t::kPiPlus;
688+
const int expectedNegPdg = sign < 0 ? PDG_t::kPiMinus : PDG_t::kProtonBar;
689+
const int expectedLambdaPdg = sign < 0 ? PDG_t::kLambda0 : PDG_t::kLambda0Bar;
687690
if (mcPosTrack.pdgCode() != expectedPosPdg || mcNegTrack.pdgCode() != expectedNegPdg) {
688691
return -1;
689692
}
@@ -712,8 +715,8 @@ struct doubleOmegaTreeCreator {
712715

713716
auto mcLambda = mcParticles.rawIteratorAt(lambdaLabel);
714717
auto mcBachelor = bachelorTrack.template mcParticle_as<aod::McParticles>();
715-
const int expectedBachelorPdg = sign < 0 ? -321 : 321;
716-
const int expectedOmegaPdg = sign < 0 ? 3334 : -3334;
718+
const int expectedBachelorPdg = sign < 0 ? PDG_t::kKMinus : PDG_t::kKPlus;
719+
const int expectedOmegaPdg = sign < 0 ? PDG_t::kOmegaMinus : PDG_t::kOmegaPlusBar;
717720
if (mcBachelor.pdgCode() != expectedBachelorPdg) {
718721
return -1;
719722
}
@@ -746,7 +749,7 @@ struct doubleOmegaTreeCreator {
746749
auto mcOmega = mcParticles.rawIteratorAt(omegaLabel);
747750
auto mcLambda = mcParticles.rawIteratorAt(lambdaLabel);
748751
auto mcKaon = directKaonTrack.template mcParticle_as<aod::McParticles>();
749-
const int expectedKaonPdg = sign < 0 ? -321 : 321;
752+
const int expectedKaonPdg = sign < 0 ? PDG_t::kKMinus : PDG_t::kKPlus;
750753
const int expectedDoubleOmegaPdg = sign < 0 ? kDoubleOmegaPdg : -kDoubleOmegaPdg;
751754
if (mcKaon.pdgCode() != expectedKaonPdg) {
752755
return false;
@@ -770,6 +773,7 @@ struct doubleOmegaTreeCreator {
770773
mcOmega.vy() - omegaMother.vy(),
771774
mcOmega.vz() - omegaMother.vz());
772775
mcInfo.pdgCode = omegaMother.pdgCode();
776+
mcInfo.sign = sign;
773777
return true;
774778
}
775779
}
@@ -786,9 +790,9 @@ struct doubleOmegaTreeCreator {
786790
}
787791

788792
const bool isMatter = particle.pdgCode() > 0;
789-
const int expectedOmegaPdg = isMatter ? 3334 : -3334;
790-
const int expectedLambdaPdg = isMatter ? 3122 : -3122;
791-
const int expectedKaonPdg = isMatter ? -321 : 321;
793+
const int expectedOmegaPdg = isMatter ? PDG_t::kOmegaMinus : PDG_t::kOmegaPlusBar;
794+
const int expectedLambdaPdg = isMatter ? PDG_t::kLambda0 : PDG_t::kLambda0Bar;
795+
const int expectedKaonPdg = isMatter ? PDG_t::kKMinus : PDG_t::kKPlus;
792796
bool foundOmega = false;
793797
bool foundLambda = false;
794798
bool foundKaon = false;
@@ -825,6 +829,7 @@ struct doubleOmegaTreeCreator {
825829
info.genProductionVertex = {particle.vx(), particle.vy(), particle.vz()};
826830
info.genDecayVertex = decayVertex;
827831
info.genOmegaDecayVertex = omegaDecayVertex;
832+
info.sign = isMatter ? -1 : 1;
828833
return true;
829834
}
830835

@@ -847,7 +852,7 @@ struct doubleOmegaTreeCreator {
847852

848853
void writeDataCandidate(DoubleOmegaCandidate const& cand)
849854
{
850-
doubleOmegaTable(cand.pt,
855+
doubleOmegaTable(cand.pt * cand.sign,
851856
cand.eta,
852857
cand.phi,
853858
cand.x,
@@ -879,7 +884,7 @@ struct doubleOmegaTreeCreator {
879884

880885
void writeMCCandidate(DoubleOmegaCandidate const& cand, DoubleOmegaMCInfo const& mcInfo, bool isReco)
881886
{
882-
doubleOmegaTableMC(cand.pt,
887+
doubleOmegaTableMC(cand.pt * cand.sign,
883888
cand.eta,
884889
cand.phi,
885890
cand.x,
@@ -907,7 +912,7 @@ struct doubleOmegaTreeCreator {
907912
cand.mass,
908913
cand.massOmega,
909914
cand.massXi,
910-
mcInfo.pt,
915+
mcInfo.pt * mcInfo.sign,
911916
mcInfo.eta,
912917
mcInfo.phi,
913918
mcInfo.decayLength,

0 commit comments

Comments
 (0)