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
57 changes: 32 additions & 25 deletions PWGLF/Tasks/Strangeness/cascadecorrelations.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@

struct CascadeSelector {
Service<o2::ccdb::BasicCCDBManager> ccdb;
Service<o2::framework::O2DatabasePDG> pdgDB;

Produces<aod::CascadeFlags> cascflags;

Expand All @@ -99,6 +100,8 @@
Configurable<int> INEL{"INEL", 0, "Number of charged tracks within |eta| < 1 has to be greater than value"};
Configurable<double> maxVertexZ{"maxVertexZ", 10., "Maximum value of z coordinate of PV"};
Configurable<float> etaCascades{"etaCascades", 0.8, "min/max of eta for cascades"};
Configurable<bool> doCompetingMassCut{"doCompetingMassCut", true, "Switch to apply a competing mass cut for the Omega's"};
Configurable<float> competingMassWindow{"competingMassWindow", 0.01, "Mass window for the competing mass cut"};

// Tracklevel
Configurable<float> tpcNsigmaBachelor{"tpcNsigmaBachelor", 3, "TPC NSigma bachelor"};
Expand Down Expand Up @@ -302,7 +305,7 @@
if (!gen.isPhysicalPrimary())
return;
int genpdg = gen.pdgCode();
if ((flag < 3 && TMath::Abs(genpdg) == 3312) || (flag > 1 && TMath::Abs(genpdg) == 3334)) {

Check failure on line 308 in PWGLF/Tasks/Strangeness/cascadecorrelations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
// if casc is consistent with Xi and has matched gen Xi OR cand is consistent with Omega and has matched gen omega
// have to do this in case we reco true Xi with only Omega hypothesis (or vice versa) (very unlikely)
registry.fill(HIST("truerec/hV0Radius"), rec.v0radius());
Expand Down Expand Up @@ -413,18 +416,18 @@
casc.v0cosPA(pvx, pvy, pvz) < v0setting_cospa ||
casc.casccosPA(pvx, pvy, pvz) < cascadesetting_cospa ||
casc.dcav0topv(pvx, pvy, pvz) < cascadesetting_mindcav0topv ||
TMath::Abs(casc.mLambda() - 1.115683) > cascadesetting_v0masswindow)

Check failure on line 419 in PWGLF/Tasks/Strangeness/cascadecorrelations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return 0; // It failed at least one topo selection

registry.fill(HIST("hSelectionStatus"), 4); // passes topo
// registry.fill(HIST("hMassXi3"), casc.mXi(), casc.pt());

if (TMath::Abs(posTrack.eta()) > etaTracks || TMath::Abs(negTrack.eta()) > etaTracks || TMath::Abs(bachTrack.eta()) > etaTracks)

Check failure on line 425 in PWGLF/Tasks/Strangeness/cascadecorrelations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return 0;

registry.fill(HIST("hSelectionStatus"), 5); // passes track eta

if (TMath::Abs(casc.eta()) > etaCascades)

Check failure on line 430 in PWGLF/Tasks/Strangeness/cascadecorrelations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return 0;

registry.fill(HIST("hSelectionStatus"), 6); // passes candidate eta
Expand All @@ -435,56 +438,60 @@
// Lambda check
if (casc.sign() < 0) {
// Proton check:
if (TMath::Abs(posTrack.tpcNSigmaPr()) > tpcNsigmaProton)

Check failure on line 441 in PWGLF/Tasks/Strangeness/cascadecorrelations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return 0;
// Pion check:
if (TMath::Abs(negTrack.tpcNSigmaPi()) > tpcNsigmaPion)

Check failure on line 444 in PWGLF/Tasks/Strangeness/cascadecorrelations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return 0;
} else {
// Proton check:
if (TMath::Abs(negTrack.tpcNSigmaPr()) > tpcNsigmaProton)

Check failure on line 448 in PWGLF/Tasks/Strangeness/cascadecorrelations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return 0;
// Pion check:
if (TMath::Abs(posTrack.tpcNSigmaPi()) > tpcNsigmaPion)

Check failure on line 451 in PWGLF/Tasks/Strangeness/cascadecorrelations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return 0;
}
registry.fill(HIST("hSelectionStatus"), 7); // passes V0 daughters PID
// registry.fill(HIST("hMassXi4"), casc.mXi(), casc.pt());

// Bachelor check
if (TMath::Abs(bachTrack.tpcNSigmaPi()) < tpcNsigmaBachelor) {
if (TMath::Abs(bachTrack.tpcNSigmaKa()) < tpcNsigmaBachelor) {
// consistent with both!
// setting selection flag based on bachelor PID (and competing mass cut for omega's)
int flag = 0;
if (TMath::Abs(bachTrack.tpcNSigmaPi()) < tpcNsigmaBachelor)

Check failure on line 459 in PWGLF/Tasks/Strangeness/cascadecorrelations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
flag = 1;
if (TMath::Abs(bachTrack.tpcNSigmaKa()) < tpcNsigmaBachelor && (!doCompetingMassCut || TMath::Abs(pdgDB->Mass(3312) - casc.mXi()) < competingMassWindow))

Check failure on line 461 in PWGLF/Tasks/Strangeness/cascadecorrelations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
Comment thread
romainschotter marked this conversation as resolved.
Outdated
flag = 3 - flag; // 3 if only consistent with omega, 2 if consistent with both

switch (flag) {
case 1: // only Xi
registry.fill(HIST("hSelectionStatus"), 8); // passes bach PID
if (casc.sign() < 0) {
registry.fill(HIST("hMassXiMinus"), casc.mXi(), casc.pt(), casc.yXi());
} else {
registry.fill(HIST("hMassXiPlus"), casc.mXi(), casc.pt(), casc.yXi());
}
break;
case 2: // Xi or Omega
registry.fill(HIST("hSelectionStatus"), 8); // passes bach PID
// registry.fill(HIST("hMassXi5"), casc.mXi(), casc.pt());
if (casc.sign() < 0) {
registry.fill(HIST("hMassXiMinus"), casc.mXi(), casc.pt(), casc.yXi());
registry.fill(HIST("hMassOmegaMinus"), casc.mOmega(), casc.pt(), casc.yOmega());
} else {
registry.fill(HIST("hMassXiPlus"), casc.mXi(), casc.pt(), casc.yXi());
registry.fill(HIST("hMassOmegaPlus"), casc.mOmega(), casc.pt(), casc.yOmega());
}
return 2;
}
registry.fill(HIST("hSelectionStatus"), 8); // passes bach PID
// registry.fill(HIST("hMassXi5"), casc.mXi(), casc.pt());
if (casc.sign() < 0) {
registry.fill(HIST("hMassXiMinus"), casc.mXi(), casc.pt(), casc.yXi());
} else {
registry.fill(HIST("hMassXiPlus"), casc.mXi(), casc.pt(), casc.yXi());
}
return 1;
} else if (TMath::Abs(bachTrack.tpcNSigmaKa()) < tpcNsigmaBachelor) {
registry.fill(HIST("hSelectionStatus"), 8); // passes bach PID
if (casc.sign() < 0) {
registry.fill(HIST("hMassOmegaMinus"), casc.mOmega(), casc.pt(), casc.yOmega());
} else {
registry.fill(HIST("hMassOmegaPlus"), casc.mOmega(), casc.pt(), casc.yOmega());
}
return 3;
break;
case 3: // only Omega
registry.fill(HIST("hSelectionStatus"), 8); // passes bach PID
if (casc.sign() < 0) {
registry.fill(HIST("hMassOmegaMinus"), casc.mOmega(), casc.pt(), casc.yOmega());
} else {
registry.fill(HIST("hMassOmegaPlus"), casc.mOmega(), casc.pt(), casc.yOmega());
}
break;
}
// if we reach here, the bachelor was neither pion nor kaon
return 0;

return flag;

} // processCandidate

void processGenMC(aod::McCollision const&, soa::SmallGroups<soa::Join<aod::McCollisionLabels, MyCollisions>> const& collisions, aod::McParticles const& mcParticles)
Expand Down
Loading