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
38 changes: 28 additions & 10 deletions PWGLF/Tasks/Resonances/kstarqa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -765,11 +765,11 @@
bool selectionMIDPtDep(const T& candidate, int PID)
{
if (PID == PIDParticle::kPion) {
if (candidate.pt() >= 1.0 && candidate.pt() < 2.5 && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaPi()) < selectionConfig.nsigmaCutTPCMID) {

Check failure on line 768 in PWGLF/Tasks/Resonances/kstarqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
}
} else if (PID == PIDParticle::kKaon) {
if (candidate.pt() >= 0.7 && candidate.pt() < 2.5 && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaKa()) < selectionConfig.nsigmaCutTPCMID) {

Check failure on line 772 in PWGLF/Tasks/Resonances/kstarqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
}
}
Expand All @@ -787,13 +787,13 @@
if (candidate.pt() < 1.0 && std::abs(candidate.tpcNSigmaPi()) < selectionConfig.nsigmaCutTPCPi) {
return true;
}
if (candidate.pt() >= 1.0 && candidate.pt() < 2.0 && candidate.tpcNSigmaPi() > -1.5 && candidate.tpcNSigmaPi() < selectionConfig.nsigmaCutTPCPi) {

Check failure on line 790 in PWGLF/Tasks/Resonances/kstarqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
}
if (candidate.pt() >= 2.0 && candidate.pt() < 5.0 && candidate.tpcNSigmaPi() > -1.0 && candidate.tpcNSigmaPi() < selectionConfig.nsigmaCutTPCPi) {

Check failure on line 793 in PWGLF/Tasks/Resonances/kstarqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
}
if (candidate.pt() >= 5.0 && candidate.tpcNSigmaPi() > -0.5 && candidate.tpcNSigmaPi() < selectionConfig.nsigmaCutTPCPi) {

Check failure on line 796 in PWGLF/Tasks/Resonances/kstarqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
}
}
Expand All @@ -801,20 +801,20 @@
return true;
}
} else if (PID == PIDParticle::kKaon) {
if (candidate.pt() < selectionConfig.lowPtCutPID && candidate.tpcNSigmaKa() > -2.0 && candidate.tpcNSigmaKa() < selectionConfig.nsigmaCutTPCKa) {

Check failure on line 804 in PWGLF/Tasks/Resonances/kstarqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
}
if (candidate.pt() >= selectionConfig.lowPtCutPID && !candidate.hasTOF()) {
if (candidate.pt() >= 0.5 && candidate.pt() < 0.6 && candidate.tpcNSigmaKa() > -1.5 && candidate.tpcNSigmaKa() < selectionConfig.nsigmaCutTPCKa) {

Check failure on line 808 in PWGLF/Tasks/Resonances/kstarqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
}
if (candidate.pt() >= 0.6 && candidate.pt() < 0.7 && candidate.tpcNSigmaKa() > -1.0 && candidate.tpcNSigmaKa() < selectionConfig.nsigmaCutTPCKa) {

Check failure on line 811 in PWGLF/Tasks/Resonances/kstarqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
}
if (candidate.pt() >= 0.7 && candidate.pt() < 0.8 && candidate.tpcNSigmaKa() > -0.5 && candidate.tpcNSigmaKa() < selectionConfig.nsigmaCutTPCKa) {

Check failure on line 814 in PWGLF/Tasks/Resonances/kstarqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
}
if (candidate.pt() >= 0.8 && candidate.pt() < 1.0 && candidate.tpcNSigmaKa() > 0.0 && candidate.tpcNSigmaKa() < selectionConfig.nsigmaCutTPCKa) {

Check failure on line 817 in PWGLF/Tasks/Resonances/kstarqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
}
if (candidate.pt() >= 1.0 && candidate.pt() < 2.0 && candidate.tpcNSigmaKa() > -selectionConfig.nsigmaCutTPCKa && candidate.tpcNSigmaKa() < 0.0) {
Expand Down Expand Up @@ -2116,14 +2116,14 @@
// if (selectionMID(track1, 2)) // Pion misidentified as proton
// continue;
}
rEventSelection.fill(HIST("recMCparticles"), 13.5);

if (selectionConfig.isApplyParticleMIDPtDep) {
if (selectionMIDPtDep(track1, 0)) // Kaon misidentified as pion
if (selectionMIDPtDep(track1, 1)) // Kaon misidentified as pion
continue;
if (selectionMIDPtDep(track2, 1)) // Pion misidentified as kaon
if (selectionMIDPtDep(track2, 0)) // Pion misidentified as kaon
continue;
}
rEventSelection.fill(HIST("recMCparticles"), 13.5);

if (std::abs(track1.rapidity(o2::track::PID::getMass(o2::track::PID::Pion))) > selectionConfig.ctrackRapidity)
continue;
Expand All @@ -2140,15 +2140,33 @@
}

} else if (selectionConfig.isPDGCheckMC && (track1PDG == PDG_t::kKPlus)) {
if (!selectionConfig.isapplypTdepPID && !selectionConfig.isapplypTdepPIDTOF && !(selectionPID(track1, 0) && selectionPID(track2, 1))) { // pion and kaon
if (!selectionConfig.isapplypTdepPID && !selectionConfig.isapplypTdepPIDTOF && !(selectionPID(track1, 1) && selectionPID(track2, 0))) { // pion and kaon
continue;
} else if (selectionConfig.isapplypTdepPID && !selectionConfig.isapplypTdepPIDTOF && !(selectionPIDPtDep(track1, 0) && selectionPIDPtDep(track2, 1))) { // pion and kaon
} else if (selectionConfig.isapplypTdepPID && !selectionConfig.isapplypTdepPIDTOF && !(selectionPIDPtDep(track1, 1) && selectionPIDPtDep(track2, 0))) { // pion and kaon
continue;
} else if (!selectionConfig.isapplypTdepPID && selectionConfig.isapplypTdepPIDTOF && !(selectionPIDptDepTOF(track1, 0) && selectionPIDptDepTOF(track2, 1))) { // pion and kaon
} else if (!selectionConfig.isapplypTdepPID && selectionConfig.isapplypTdepPIDTOF && !(selectionPIDptDepTOF(track1, 1) && selectionPIDptDepTOF(track2, 0))) { // pion and kaon
continue;
}
rEventSelection.fill(HIST("recMCparticles"), 12.5);

if (selectionConfig.isApplyParticleMID) {
if (selectionMID(track2, 1)) // Pion misidentified as kaon
continue;
// if (selectionMID(track2, 2)) // Kaon misidentified as proton
// continue;
if (selectionMID(track1, 0)) // Kaon misidentified as pion
continue;
// if (selectionMID(track1, 2)) // Pion misidentified as proton
// continue;
}

if (selectionConfig.isApplyParticleMIDPtDep) {
if (selectionMIDPtDep(track1, 0)) // Kaon misidentified as pion
continue;
if (selectionMIDPtDep(track2, 1)) // Pion misidentified as kaon
continue;
}

if (std::abs(track1.rapidity(o2::track::PID::getMass(o2::track::PID::Kaon))) > selectionConfig.ctrackRapidity)
continue;

Expand Down Expand Up @@ -2360,21 +2378,21 @@
rEventSelection.fill(HIST("recMCparticles"), 11.5);

if (selectionConfig.isApplyParticleMID) {
if (selectionMID(track1, 0)) // Kaon misidentified as pion
if (selectionMID(track1, 1)) // Pion misidentified as kaon
continue;
// if (selectionMID(track1, 2)) // Kaon misidentified as proton
// continue;
if (selectionMID(track2, 1)) // Pion misidentified as kaon
if (selectionMID(track2, 0)) // Kaon misidentified as pion
continue;
// if (selectionMID(track2, 2)) // Pion misidentified as proton
// continue;
}
rEventSelection.fill(HIST("recMCparticles"), 12.5);

if (selectionConfig.isApplyParticleMIDPtDep) {
if (selectionMIDPtDep(track1, 0)) // Kaon misidentified as pion
if (selectionMIDPtDep(track1, 1)) // Pion misidentified as kaon
continue;
if (selectionMIDPtDep(track2, 1)) // Pion misidentified as kaon
if (selectionMIDPtDep(track2, 0)) // Kaon misidentified as pion
continue;
}

Expand Down
Loading