Skip to content
Merged
Changes from 1 commit
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
22 changes: 18 additions & 4 deletions PWGLF/Tasks/Resonances/kstar892LightIon.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ struct Kstar892LightIon {
// PID selections
Configurable<bool> onlyTOF{"onlyTOF", false, "only TOF tracks"};
Configurable<bool> onlyTOFHIT{"onlyTOFHIT", false, "accept only TOF hit tracks at high pt"};
Configurable<bool> onlyTOFVeto{"onlyTOFVeto", false, "only select TOF tracks with TOF and TPC cuts"};
Configurable<bool> onlyTPC{"onlyTPC", false, "only TPC tracks"};
Configurable<bool> isApplypTdepPID{"isApplypTdepPID", false, "Apply pT dependent PID"};
Configurable<bool> isApplypTdepPIDwTOF{"isApplypTdepPIDwTOF", false, "Apply pT dependent PID with compulsory TOF condition in a pT range"};
Expand All @@ -158,6 +159,11 @@ struct Kstar892LightIon {
Configurable<float> cfgFakeTrackCutKa{"cfgFakeTrackCutKa", 0.3, "Cut based on momentum difference in global and TPC tracks for kaons"};
Configurable<float> cfgFakeTrackCutPi{"cfgFakeTrackCutPi", 0.3, "Cut based on momentum difference in global and TPC tracks for pions"};

Configurable<float> pionMIDpTlow{"pionMIDpTlow", 1.0, "Low pT cut for pion in MID"};
Configurable<float> pionMIDpThigh{"pionMIDpThigh", 2.5, "High pT cut for pion in MID"};
Configurable<float> kaonMIDpTlow{"kaonMIDpTlow", 0.7, "Low pT cut for kaon in MID"};
Configurable<float> kaonMIDpThigh{"kaonMIDpThigh", 2.5, "High pT cut for kaon in MID"};

@vkucera vkucera Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use proper lowerCamelCase. I doubt that you want to configure any thighs.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Do not mark suggestions as resolved. Please read the contribution guidelines.
  • You still don't use lowerCamelCase.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Sorry @vkucera for marking the suggestion as resolved. I'll keep this in mind

  • I changed the variable names from pionMIDpTlow to pionMIDpTLow etc. following the lowerCamelCase format. Could you please give me an example of what you want me to do so that I can fix this in my next PR? Do you want it to be like pionMIDPtLow or anything else? Thank you for your help.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proper lowerCamelCase name is pionMidPtLow. If you are not sure how to form the correct name, I recommend this definition: https://google.github.io/styleguide/javaguide.html#s5.3-camel-case


// Fixed variables
float lowPtCutPID = 0.5;

Expand Down Expand Up @@ -646,6 +652,10 @@ struct Kstar892LightIon {
if (!candidate.hasTOF() && std::abs(candidate.tpcNSigmaPi()) < selectionConfig.nsigmaCutTPCPi) {
return true;
}
} else if (selectionConfig.onlyTOFVeto) {
if (candidate.hasTOF() && std::abs(candidate.tofNSigmaPi()) < selectionConfig.nsigmaCutTOFPi && std::abs(candidate.tpcNSigmaPi()) < selectionConfig.nsigmaCutTPCPi) {
return true;
}
} else if (selectionConfig.onlyTPC) {
if (std::abs(candidate.tpcNSigmaPi()) < selectionConfig.nsigmaCutTPCPi) {
return true;
Expand All @@ -670,6 +680,10 @@ struct Kstar892LightIon {
if (!candidate.hasTOF() && std::abs(candidate.tpcNSigmaKa()) < selectionConfig.nsigmaCutTPCKa) {
return true;
}
} else if (selectionConfig.onlyTOFVeto) {
if (candidate.hasTOF() && std::abs(candidate.tofNSigmaKa()) < selectionConfig.nsigmaCutTOFKa && std::abs(candidate.tpcNSigmaKa()) < selectionConfig.nsigmaCutTPCKa) {
return true;
}
} else if (selectionConfig.onlyTPC) {
if (std::abs(candidate.tpcNSigmaKa()) < selectionConfig.nsigmaCutTPCKa) {
return true;
Expand Down Expand Up @@ -797,11 +811,11 @@ struct Kstar892LightIon {
bool selectionMIDpTdep(const T& candidate, int PID)
{
if (PID == PIDParticle::kPion) {
if (candidate.pt() >= pionPIDpTlow && candidate.pt() < pionPIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaPi()) < selectionConfig.nsigmaCutTPCMID) {
if (candidate.pt() >= selectionConfig.pionMIDpTlow && candidate.pt() < selectionConfig.pionMIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaPi()) < selectionConfig.nsigmaCutTPCMID) {
return true;
}
} else if (PID == PIDParticle::kKaon) {
if (candidate.pt() >= kaonPIDpTlow && candidate.pt() < kaonPIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaKa()) < selectionConfig.nsigmaCutTPCMID) {
if (candidate.pt() >= selectionConfig.kaonMIDpTlow && candidate.pt() < selectionConfig.kaonMIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaKa()) < selectionConfig.nsigmaCutTPCMID) {
return true;
}
}
Expand All @@ -812,11 +826,11 @@ struct Kstar892LightIon {
bool selectionMIDPtDepComp(const T& candidate, int PID)
{
if (PID == PIDParticle::kPion) {
if (candidate.pt() >= pionPIDpTlow && candidate.pt() < pionPIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaPi()) < std::abs(candidate.tpcNSigmaKa())) {
if (candidate.pt() >= selectionConfig.pionMIDpTlow && candidate.pt() < selectionConfig.pionMIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaPi()) < std::abs(candidate.tpcNSigmaKa())) {
return true;
}
} else if (PID == PIDParticle::kKaon) {
if (candidate.pt() >= kaonPIDpTlow && candidate.pt() < kaonPIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaKa()) < std::abs(candidate.tpcNSigmaPi())) {
if (candidate.pt() >= selectionConfig.kaonMIDpTlow && candidate.pt() < selectionConfig.kaonMIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaKa()) < std::abs(candidate.tpcNSigmaPi())) {
return true;
}
}
Expand Down
Loading