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: 12 additions & 14 deletions PWGLF/Tasks/QC/v0cascadesqa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
kXiM,
kXiP,
kOmegaM,
kOmegaP};
kOmegaP };

// using DaughterTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::pidTOFPi, aod::pidTPCPi, aod::pidTOFPr, aod::pidTPCPr, aod::pidTOFKa, aod::pidTPCKa>;
using DaughterTracks = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksDCA, aod::pidTPCPi, aod::pidTPCPr, aod::pidTPCKa>;
Expand Down Expand Up @@ -292,7 +292,7 @@
ConfigurableAxis axisCascDCABachToPV{"axisCascDCABachToPV", {100, -1.0f, 1.0f}, "DCA bach. to PV (cm)"};
ConfigurableAxis axisInvMassXi{"axisInvMassXi", {80, 1.28f, 1.36f}, "Inv. mass (GeV/#it{c}%{2})"};
ConfigurableAxis axisInvMassOmega{"axisInvMassOmega", {80, 1.63f, 1.71f}, "Inv. mass (GeV/#it{c}%{2})"};

} axisConfigurations;

int dauEtaFlag = 0;
Expand Down Expand Up @@ -646,7 +646,7 @@
return false;

// armenteros (for K0s only)
if (v0Type == kK0s && v0Selections.armPodCut > 1e-4 && v0.qtarm() * v0Selections.armPodCut < std::abs(v0.alpha()))

Check failure on line 649 in PWGLF/Tasks/QC/v0cascadesqa.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 false;

// rapidity
Expand Down Expand Up @@ -690,7 +690,7 @@
if (negTrackExtra.itsChi2NCl() > v0Selections.maxITSchi2PerNcls)
return false;

// ITS only tag
// ITS only tag
if (v0Selections.requirePosITSonly) {
if (posTrackExtra.tpcNClsCrossedRows() > 0)
return false;
Expand All @@ -712,7 +712,7 @@
if (negTrackExtra.tpcChi2NCl() > v0Selections.maxTPCchi2PerNcls)
return false;

// check the maximum fraction of allowed shared TPC
// check the maximum fraction of allowed shared TPC
if (posTrackExtra.tpcFractionSharedCls() > v0Selections.maxFractionTPCSharedClusters)
return false;
if (negTrackExtra.tpcFractionSharedCls() > v0Selections.maxFractionTPCSharedClusters)
Expand Down Expand Up @@ -745,7 +745,7 @@
if (std::fabs(negTrackExtra.tpcNSigmaPr()) > v0Selections.tpcPidNsigmaCutLaPr)
return false;
}

// TOF Requirement checks
if (v0Selections.requirePosHasTOF && !v0.positiveHasTOF()) {
return false;
Expand All @@ -760,26 +760,26 @@

// TOF Nsigma
if (v0Type == kK0s) {
if (v0Selections.tofPidNsigmaCutK0Pi < 1e+5 && v0.positiveHasTOF() && std::fabs(v0.tofNSigmaK0PiPlus()) > v0Selections.tofPidNsigmaCutK0Pi) {

Check failure on line 763 in PWGLF/Tasks/QC/v0cascadesqa.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 false;
}
if (v0Selections.tofPidNsigmaCutK0Pi < 1e+5 && v0.negativeHasTOF() && std::fabs(v0.tofNSigmaK0PiMinus()) > v0Selections.tofPidNsigmaCutK0Pi) {

Check failure on line 766 in PWGLF/Tasks/QC/v0cascadesqa.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 false;
}
}
if (v0Type == kLambda) {
if (v0Selections.tofPidNsigmaCutLaPr < 1e+5 && v0.positiveHasTOF() && std::fabs(v0.tofNSigmaLaPr()) > v0Selections.tofPidNsigmaCutLaPr) {

Check failure on line 771 in PWGLF/Tasks/QC/v0cascadesqa.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 false;
}
if (v0Selections.tofPidNsigmaCutLaPi < 1e+5 && v0.negativeHasTOF() && std::fabs(v0.tofNSigmaLaPi()) > v0Selections.tofPidNsigmaCutLaPi) {

Check failure on line 774 in PWGLF/Tasks/QC/v0cascadesqa.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 false;
}
}
if (v0Type == kAntiLambda) {
if (v0Selections.tofPidNsigmaCutLaPi < 1e+5 && v0.positiveHasTOF() && std::fabs(v0.tofNSigmaLaPi()) > v0Selections.tofPidNsigmaCutLaPi) {

Check failure on line 779 in PWGLF/Tasks/QC/v0cascadesqa.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 false;
}
if (v0Selections.tofPidNsigmaCutLaPr < 1e+5 && v0.negativeHasTOF() && std::fabs(v0.tofNSigmaLaPr()) > v0Selections.tofPidNsigmaCutLaPr) {

Check failure on line 782 in PWGLF/Tasks/QC/v0cascadesqa.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 false;
}
}
Expand All @@ -793,7 +793,7 @@
}

int posTRDhits = 0, negTRDhits = 0;
for (unsigned int i = 0; i <= 5; i++) {

Check failure on line 796 in PWGLF/Tasks/QC/v0cascadesqa.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.
if (posTrackExtra.trdPattern() & (1 << i)) {
posTRDhits++;
}
Expand All @@ -808,7 +808,7 @@
if (negTrackExtra.hasTRD() && negTRDhits < v0Selections.minTRDclusters) {
return false;
}

return true;
}

Expand Down Expand Up @@ -1001,7 +1001,7 @@
}

int bachTRDhits = 0, posTRDhits = 0, negTRDhits = 0;
for (unsigned int i = 0; i <= 5; i++) {

Check failure on line 1004 in PWGLF/Tasks/QC/v0cascadesqa.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.
if (bachTrackExtra.trdPattern() & (1 << i)) {
bachTRDhits++;
}
Expand Down Expand Up @@ -1032,7 +1032,7 @@
{
if (!v0.isPhysicalPrimary())
return false;

bool isPositiveProton = v0.pdgCodePositive() == PDG_t::kProton;
bool isPositivePion = v0.pdgCodePositive() == PDG_t::kPiPlus || (doTreatPiToMuon && v0.pdgCodePositive() == PDG_t::kMuonPlus);
bool isNegativeProton = v0.pdgCodeNegative() == PDG_t::kProtonBar;
Expand Down Expand Up @@ -1094,7 +1094,7 @@
histos.fill(HIST("histos_event/hEventCounter"), 1.5);

for (const auto& v0 : fullV0s) {
if (std::abs(v0.negativeeta()) > v0Selections.daughterEtaCut ||
if (std::abs(v0.negativeeta()) > v0Selections.daughterEtaCut ||
std::abs(v0.positiveeta()) > v0Selections.daughterEtaCut)
continue; // remove acceptance that's badly reproduced by MC / superfluous in future

Expand Down Expand Up @@ -1200,7 +1200,7 @@
}

for (const auto& casc : fullCascades) {
if (std::abs(casc.negativeeta()) > cascSelections.daughterEtaCut ||
if (std::abs(casc.negativeeta()) > cascSelections.daughterEtaCut ||
std::abs(casc.positiveeta()) > cascSelections.daughterEtaCut ||
std::abs(casc.bacheloreta()) > cascSelections.daughterEtaCut)
continue; // remove acceptance that's badly reproduced by MC / superfluous in future
Expand All @@ -1208,7 +1208,7 @@
histos.fill(HIST("histos_Casc/CascCosPA"), casc.casccosPA(collision.posX(), collision.posY(), collision.posZ()), casc.sign());
histos.fill(HIST("histos_Casc/V0CosPA"), casc.v0cosPA(collision.posX(), collision.posY(), collision.posZ()), casc.sign());

double v0cospatoxi = RecoDecay::cpa(array{casc.x(), casc.y(), casc.z()}, array{casc.xlambda(), casc.ylambda(), casc.zlambda()}, array{casc.pxpos() + casc.pxneg(), casc.pypos() + casc.pyneg(), casc.pzpos() + casc.pzneg()});

Check failure on line 1211 in PWGLF/Tasks/QC/v0cascadesqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.

histos.fill(HIST("histos_Casc/V0CosPAToXi"), v0cospatoxi, casc.sign());
histos.fill(HIST("histos_Casc/CascRadius"), casc.cascradius(), casc.sign());
Expand Down Expand Up @@ -1255,13 +1255,12 @@
}
}
}


////////////////////////////////
////////// QA - MC /////////////
////////////////////////////////

void processMonteCarlo(soa::Join<aod::Collisions, aod::EvSels, aod::PVMults, aod::McCollisionLabels>::iterator const& collision, soa::Join<aod::McCollisions, aod::MultsExtraMC> const&, soa::Join<aod::V0Datas, aod::V0TOFPIDs, aod::V0TOFNSigmas, aod::V0CoreMCLabels> const& fullV0s, soa::Join<aod::V0MCDatas, aod::V0MCCollRefs> const&, soa::Join<aod::CascDatas, aod::CascTOFPIDs, aod::CascTOFNSigmas, aod::CascCoreMCLabels> const& fullCascades, soa::Join<aod::CascMCDatas, aod::CascMCCollRefs> const&, DaughterTracks const&, aod::BCsWithTimestamps const&)
void processMonteCarlo(soa::Join<aod::Collisions, aod::EvSels, aod::PVMults, aod::McCollisionLabels>::iterator const& collision, soa::Join<aod::McCollisions, aod::MultsExtraMC> const&, soa::Join<aod::V0Datas, aod::V0TOFPIDs, aod::V0TOFNSigmas, aod::V0CoreMCLabels> const& fullV0s, soa::Join<aod::V0MCDatas, aod::V0MCCollRefs> const&, soa::Join<aod::CascDatas, aod::CascTOFPIDs, aod::CascTOFNSigmas, aod::CascCoreMCLabels> const& fullCascades, soa::Join<aod::CascMCDatas, aod::CascMCCollRefs> const&, DaughterTracks const&, aod::BCsWithTimestamps const&)
{
if (!isEventAccepted(collision, false)) {
return;
Expand All @@ -1281,7 +1280,7 @@
}

for (const auto& v0 : fullV0s) {
if (std::abs(v0.negativeeta()) > v0Selections.daughterEtaCut ||
if (std::abs(v0.negativeeta()) > v0Selections.daughterEtaCut ||
std::abs(v0.positiveeta()) > v0Selections.daughterEtaCut)
continue; // remove acceptance that's badly reproduced by MC / superfluous in future

Expand All @@ -1308,7 +1307,7 @@
}

for (const auto& casc : fullCascades) {
if (std::abs(casc.negativeeta()) > cascSelections.daughterEtaCut ||
if (std::abs(casc.negativeeta()) > cascSelections.daughterEtaCut ||
std::abs(casc.positiveeta()) > cascSelections.daughterEtaCut ||
std::abs(casc.bacheloreta()) > cascSelections.daughterEtaCut)
continue; // remove acceptance that's badly reproduced by MC / superfluous in future
Expand Down Expand Up @@ -1425,7 +1424,6 @@
}
}


PROCESS_SWITCH(v0cascadesQA, processReconstructed, "Process reconstructed event and V0s+cascades in data", true);
PROCESS_SWITCH(v0cascadesQA, processMonteCarlo, "Process reconstructed event and V0s+cascades in MC", false);
PROCESS_SWITCH(v0cascadesQA, processGenerated, "Process MC level event and V0s+cascades in MC", false);
Expand Down
Loading