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
26 changes: 17 additions & 9 deletions PWGLF/Tasks/Strangeness/cascadecorrelations.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
Configurable<int> minTPCCrossedRows{"minTPCCrossedRows", 80, "min N TPC crossed rows"}; // TODO: finetune! 80 > 159/2, so no split tracks?
Configurable<int> minITSClusters{"minITSClusters", 4, "minimum number of ITS clusters"};
Configurable<float> etaTracks{"etaTracks", 1.0, "min/max of eta for tracks"};
Configurable<float> etaCascades{"etaCascades", 0.8, "min/max of eta for cascades"};

// Selection criteria - compatible with core wagon autodetect - copied from cascadeanalysis.cxx
//*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
Expand Down Expand Up @@ -181,8 +182,9 @@
h->GetXaxis()->SetBinLabel(3, "nITS OK");
h->GetXaxis()->SetBinLabel(4, "Topo OK");
h->GetXaxis()->SetBinLabel(5, "Track eta OK");
h->GetXaxis()->SetBinLabel(6, "V0 PID OK");
h->GetXaxis()->SetBinLabel(7, "Bach PID OK");
h->GetXaxis()->SetBinLabel(6, "Cascade eta OK");
h->GetXaxis()->SetBinLabel(7, "V0 PID OK");
h->GetXaxis()->SetBinLabel(8, "Bach PID OK");

auto hEventSel = registry.add<TH1>("hEventSel", "hEventSel", HistType::kTH1I, {{10, 0, 10, "selection criteria"}});
hEventSel->GetXaxis()->SetBinLabel(1, "All");
Expand Down Expand Up @@ -286,7 +288,7 @@
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 291 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.
// It failed at least one topo selection
cascflags(0);
continue;
Expand All @@ -294,48 +296,54 @@
registry.fill(HIST("hSelectionStatus"), 3); // 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 299 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.
cascflags(0);
continue;
}
registry.fill(HIST("hSelectionStatus"), 4); // passes track eta

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

Check failure on line 305 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.
cascflags(0);
continue;
}
registry.fill(HIST("hSelectionStatus"), 5); // passes candidate eta

// TODO: TOF (for pT > 2 GeV per track?)

//// TPC PID ////
// Lambda check
if (casc.sign() < 0) {
// Proton check:
if (TMath::Abs(posTrack.tpcNSigmaPr()) > tpcNsigmaProton) {

Check failure on line 317 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.
cascflags(0);
continue;
}
// Pion check:
if (TMath::Abs(negTrack.tpcNSigmaPi()) > tpcNsigmaPion) {

Check failure on line 322 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.
cascflags(0);
continue;
}
} else {
// Proton check:
if (TMath::Abs(negTrack.tpcNSigmaPr()) > tpcNsigmaProton) {

Check failure on line 328 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.
cascflags(0);
continue;
}
// Pion check:
if (TMath::Abs(posTrack.tpcNSigmaPi()) > tpcNsigmaPion) {

Check failure on line 333 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.
cascflags(0);
continue;
}
}
registry.fill(HIST("hSelectionStatus"), 5); // passes V0 daughters PID
registry.fill(HIST("hSelectionStatus"), 6); // passes V0 daughters PID
// registry.fill(HIST("hMassXi4"), casc.mXi(), casc.pt());

// Bachelor check
if (TMath::Abs(bachTrack.tpcNSigmaPi()) < tpcNsigmaBachelor) {

Check failure on line 342 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 (TMath::Abs(bachTrack.tpcNSigmaKa()) < tpcNsigmaBachelor) {

Check failure on line 343 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.
// consistent with both!
cascflags(2);
registry.fill(HIST("hSelectionStatus"), 6); // passes bach PID
registry.fill(HIST("hSelectionStatus"), 7); // 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());
Expand All @@ -347,7 +355,7 @@
continue;
}
cascflags(1);
registry.fill(HIST("hSelectionStatus"), 6); // passes bach PID
registry.fill(HIST("hSelectionStatus"), 7); // 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());
Expand All @@ -355,9 +363,9 @@
registry.fill(HIST("hMassXiPlus"), casc.mXi(), casc.pt(), casc.yXi());
}
continue;
} else if (TMath::Abs(bachTrack.tpcNSigmaKa()) < tpcNsigmaBachelor) {

Check failure on line 366 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.
cascflags(3);
registry.fill(HIST("hSelectionStatus"), 6); // passes bach PID
registry.fill(HIST("hSelectionStatus"), 7); // passes bach PID
if (casc.sign() < 0) {
registry.fill(HIST("hMassOmegaMinus"), casc.mOmega(), casc.pt(), casc.yOmega());
} else {
Expand Down Expand Up @@ -427,10 +435,10 @@
mCounter.mSelectPrimaries = true;
}

double getEfficiency(TH1D* h, double pT)
{ // TODO: make 2D (rapidity)
double getEfficiency(TH1* h, double pT, double y = 0)
{
// This function returns the value of histogram h corresponding to the x-coordinate pT
return h->GetBinContent(h->GetXaxis()->FindFixBin(pT));
return h->GetBinContent(h->FindFixBin(pT, y));
}

HistogramRegistry registry{
Expand Down
Loading