Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions PWGLF/TableProducer/Strangeness/sigmaminustask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
Configurable<float> cutRapMotherMC{"cutRapMotherMC", 1.0f, "Rapidity cut for mother Sigma in MC"};
Configurable<float> cutMinQtAP{"cutMinQtAP", 0.15f, "Minimum Qt for Armenteros-Podolanski cut"};
Configurable<float> cutMaxQtAP{"cutMaxQtAP", 0.20f, "Maximum Qt for Armenteros-Podolanski cut"};
Configurable<float> cutPtGen{"cutPtGen", 0.5f, "Minimum pT for generated sigma particles"};

Configurable<bool> fillOutputTree{"fillOutputTree", true, "If true, fill the output tree with Kink candidates"};

Expand Down Expand Up @@ -129,6 +130,7 @@
rSigmaMinus.add("h2DCAMothPt", "h2DCAMothPt", {HistType::kTH2F, {ptAxis, dcaMothAxis}});
rSigmaMinus.add("h2DCADaugPt", "h2DCADaugPt", {HistType::kTH2F, {ptAxis, dcaDaugAxis}});
rSigmaMinus.add("h2ArmenterosPreCuts", "h2ArmenterosPreCuts", {HistType::kTH2F, {alphaAPAxis, qtAPAxis}});
rSigmaMinus.add("h2ArmenterosPostCuts", "h2ArmenterosPostCuts", {HistType::kTH2F, {alphaAPAxis, qtAPAxis}});
rSigmaMinus.add("h2CosPointingAnglePt", "h2CosPointingAnglePt", {HistType::kTH2F, {ptAxis, cosPointingAngleAxis}});

if (doprocessMC) {
Expand Down Expand Up @@ -179,10 +181,10 @@
rFindable.add("h2PtDaugFilter_plus_pikink", "h2PtDaugFilter_plus_pikink", {HistType::kTH2F, {filtersAxis, ptUnsignedAxis}});
rFindable.add("h2PtDaugFilter_minus_pikink", "h2PtDaugFilter_minus_pikink", {HistType::kTH2F, {filtersAxis, ptUnsignedAxis}});

rFindable.add("h2DCAMothPt_protonkink", "h2DCAMothPt_protonkink", {HistType::kTH2F, {ptAxis, dcaMothAxis}});
rFindable.add("h2DCADaugPt_protonkink", "h2DCADaugPt_protonkink", {HistType::kTH2F, {ptAxis, dcaDaugAxis}});
rFindable.add("h2DCAMothPt_pikink", "h2DCAMothPt_pikink", {HistType::kTH2F, {ptAxis, dcaMothAxis}});
rFindable.add("h2DCADaugPt_pikink", "h2DCADaugPt_pikink", {HistType::kTH2F, {ptAxis, dcaDaugAxis}});
rFindable.add("h2DCAMothPt_protonkink", "h2DCAMothPt_protonkink", {HistType::kTH2F, {ptUnsignedAxis, dcaMothAxis}});
rFindable.add("h2DCADaugPt_protonkink", "h2DCADaugPt_protonkink", {HistType::kTH2F, {ptUnsignedAxis, dcaDaugAxis}});
rFindable.add("h2DCAMothPt_pikink", "h2DCAMothPt_pikink", {HistType::kTH2F, {ptUnsignedAxis, dcaMothAxis}});
rFindable.add("h2DCADaugPt_pikink", "h2DCADaugPt_pikink", {HistType::kTH2F, {ptUnsignedAxis, dcaDaugAxis}});
}
}

Expand Down Expand Up @@ -252,7 +254,7 @@
std::array{0.0f, 0.0f, 0.0f},
std::array{kinkCand.xDecVtx(), kinkCand.yDecVtx(), kinkCand.zDecVtx()});
rSigmaMinus.fill(HIST("h2CosPointingAnglePt"), kinkCand.mothSign() * kinkCand.ptMoth(), cosPointingAngleRec);

rSigmaMinus.fill(HIST("h2ArmenterosPostCuts"), alphaAPValue, qtValue);
rSigmaMinus.fill(HIST("h2MassSigmaMinusPt"), kinkCand.mothSign() * kinkCand.ptMoth(), kinkCand.mSigmaMinus());
rSigmaMinus.fill(HIST("h2SigmaMassVsXiMass"), kinkCand.mXiMinus(), kinkCand.mSigmaMinus());
rSigmaMinus.fill(HIST("h2NSigmaTPCPiPt"), kinkCand.mothSign() * kinkCand.ptMoth(), dauTrack.tpcNSigmaPi());
Expand Down Expand Up @@ -315,10 +317,10 @@
if (piMother.globalIndex() != mcTrackSigma.globalIndex()) {
continue;
}
if (std::abs(mcTrackSigma.pdgCode()) != 3112 && std::abs(mcTrackSigma.pdgCode()) != 3222) {

Check failure on line 320 in PWGLF/TableProducer/Strangeness/sigmaminustask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
continue;
}
if (std::abs(mcTrackPiDau.pdgCode()) != 211 && std::abs(mcTrackPiDau.pdgCode()) != 2212) {

Check failure on line 323 in PWGLF/TableProducer/Strangeness/sigmaminustask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
continue;
}

Expand Down Expand Up @@ -354,10 +356,10 @@
rSigmaMinus.fill(HIST("h2DCAMothPt"), kinkCand.mothSign() * kinkCand.ptMoth(), kinkCand.dcaMothPv());
rSigmaMinus.fill(HIST("h2DCADaugPt"), kinkCand.mothSign() * kinkCand.ptMoth(), kinkCand.dcaDaugPv());
rSigmaMinus.fill(HIST("h2CosPointingAnglePt"), kinkCand.mothSign() * kinkCand.ptMoth(), cosPointingAngleRec);

rSigmaMinus.fill(HIST("h2ArmenterosPostCuts"), alphaAPValue, qtValue);
if (std::abs(mcTrackPiDau.pdgCode()) == 211) {

Check failure on line 360 in PWGLF/TableProducer/Strangeness/sigmaminustask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
rSigmaMinus.fill(HIST("h2NSigmaTOFPiPt"), kinkCand.mothSign() * kinkCand.ptMoth(), dauTrack.tofNSigmaPi());
} else if (std::abs(mcTrackPiDau.pdgCode()) == 2212) {

Check failure on line 362 in PWGLF/TableProducer/Strangeness/sigmaminustask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
rSigmaMinus.fill(HIST("h2NSigmaTOFPrPt"), kinkCand.mothSign() * kinkCand.ptMoth(), dauTrack.tofNSigmaPr());
}

Expand All @@ -380,9 +382,14 @@

// Loop over all generated particles to fill MC histograms
for (const auto& mcPart : particlesMC) {
if ((std::abs(mcPart.pdgCode()) != 3112 && std::abs(mcPart.pdgCode()) != 3222) || std::abs(mcPart.y()) > cutRapMotherMC) { // only sigma mothers and rapidity cut

Check failure on line 385 in PWGLF/TableProducer/Strangeness/sigmaminustask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
continue;
}

if (mcPart.pt() < cutPtGen) {
continue; // Skip if pT is below threshold
}

if (!mcPart.has_daughters()) {
continue; // Skip if no daughters
}
Expand All @@ -391,7 +398,7 @@
std::array<float, 3> secVtx;
std::array<float, 3> momDaug;
for (const auto& daughter : mcPart.daughters_as<aod::McParticles>()) {
if (std::abs(daughter.pdgCode()) == 211 || std::abs(daughter.pdgCode()) == 2212) { // Pi or proton daughter

Check failure on line 401 in PWGLF/TableProducer/Strangeness/sigmaminustask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
hasSigmaDaughter = true;
secVtx = {daughter.vx(), daughter.vy(), daughter.vz()};
momDaug = {daughter.px(), daughter.py(), daughter.pz()};
Expand Down Expand Up @@ -461,7 +468,7 @@
}
auto mcParticle = mcLabel.mcParticle_as<aod::McParticles>();

if (mcParticle.has_daughters() && (std::abs(mcParticle.pdgCode()) == 3112 || std::abs(mcParticle.pdgCode()) == 3222)) {

Check failure on line 471 in PWGLF/TableProducer/Strangeness/sigmaminustask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
allCandsIndices[mcParticle.globalIndex()] = {track.globalIndex(), -1};
}
}
Expand All @@ -473,7 +480,7 @@
}
auto mcParticle = mcLabel.mcParticle_as<aod::McParticles>();

if (mcParticle.has_mothers() && (std::abs(mcParticle.pdgCode()) == 211 || std::abs(mcParticle.pdgCode()) == 2212)) {

Check failure on line 483 in PWGLF/TableProducer/Strangeness/sigmaminustask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
for (const auto& mother : mcParticle.mothers_as<aod::McParticles>()) {
auto it = allCandsIndices.find(mother.globalIndex());
if (it != allCandsIndices.end()) {
Expand All @@ -498,10 +505,10 @@
auto mcMother = mcLabMoth.mcParticle_as<aod::McParticles>();
auto mcDaughter = mcLabDaug.mcParticle_as<aod::McParticles>();

if (std::abs(mcMother.pdgCode()) != 3112 && std::abs(mcMother.pdgCode()) != 3222) {

Check failure on line 508 in PWGLF/TableProducer/Strangeness/sigmaminustask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
continue;
}
if (std::abs(mcDaughter.pdgCode()) != 211 && std::abs(mcDaughter.pdgCode()) != 2212) {

Check failure on line 511 in PWGLF/TableProducer/Strangeness/sigmaminustask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
continue;
}

Expand Down Expand Up @@ -531,7 +538,7 @@
// Compute useful quantities for histograms
bool isSigmaMinus = (std::abs(mcMother.pdgCode()) == 3112);
bool isPiDaughter = (std::abs(mcDaughter.pdgCode()) == 211);
int sigmaSign = mcMother.pdgCode() > 0 ? 1 : -1;

float recPtDaughter = daughterTrack.pt();
float recPtMother = motherTrack.pt();
float mcRadius = std::sqrt((mcMother.vx() - mcDaughter.vx()) * (mcMother.vx() - mcDaughter.vx()) + (mcMother.vy() - mcDaughter.vy()) * (mcMother.vy() - mcDaughter.vy()));
Expand Down Expand Up @@ -617,11 +624,11 @@
float dcaXYMother = std::abs(dcaInfoMoth[0]);
float dcaXYDaughter = std::abs(dcaInfoDaug[0]);
if (isPiDaughter) {
rFindable.fill(HIST("h2DCAMothPt_pikink"), sigmaSign * recPtMother, dcaXYMother);
rFindable.fill(HIST("h2DCADaugPt_pikink"), sigmaSign * recPtDaughter, dcaXYDaughter);
rFindable.fill(HIST("h2DCAMothPt_pikink"), recPtMother, dcaXYMother);
rFindable.fill(HIST("h2DCADaugPt_pikink"), recPtDaughter, dcaXYDaughter);
} else {
rFindable.fill(HIST("h2DCAMothPt_protonkink"), sigmaSign * recPtMother, dcaXYMother);
rFindable.fill(HIST("h2DCADaugPt_protonkink"), sigmaSign * recPtDaughter, dcaXYDaughter);
rFindable.fill(HIST("h2DCAMothPt_protonkink"), recPtMother, dcaXYMother);
rFindable.fill(HIST("h2DCADaugPt_protonkink"), recPtDaughter, dcaXYDaughter);
}

// 6 - max Z difference
Expand Down
Loading