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
12 changes: 6 additions & 6 deletions PWGLF/Tasks/QC/v0cascadesqa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@
double posx = mcCollision.posX();
double posy = mcCollision.posY();

for (auto& mcparticle : mcParticles) {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.

if (!mcparticle.has_daughters()) {
continue;
Expand All @@ -322,7 +322,7 @@

double vx = 0;
double vy = 0;
for (auto& mcparticleDaughter0 : mcparticle.daughters_as<aod::McParticles>()) {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
vx = mcparticleDaughter0.vx() - posx;
vy = mcparticleDaughter0.vy() - posy;
if (vx != 0 && vy != 0)
Expand All @@ -347,19 +347,19 @@

if (mcparticle.isPhysicalPrimary() && TMath::Abs(mcparticle.y()) < V0_rapidity) {
if (mcparticle.pdgCode() == PDG_t::kK0Short)
histos_eve.fill(HIST("GeneratedParticles"), 0.5, mcparticle.pt(), R_Decay);
histos_eve.fill(HIST("GeneratedParticles"), 0.5, mcparticle.pt(), R_Decay);
if (mcparticle.pdgCode() == PDG_t::kLambda0)
histos_eve.fill(HIST("GeneratedParticles"), 2.5, mcparticle.pt(), R_Decay);
histos_eve.fill(HIST("GeneratedParticles"), 2.5, mcparticle.pt(), R_Decay);
if (mcparticle.pdgCode() == PDG_t::kLambda0Bar)
histos_eve.fill(HIST("GeneratedParticles"), 4.5, mcparticle.pt(), R_Decay);
histos_eve.fill(HIST("GeneratedParticles"), 4.5, mcparticle.pt(), R_Decay);
}
if (mcparticle.isPhysicalPrimary() && TMath::Abs(mcparticle.y()) < Casc_rapidity) {
if (mcparticle.pdgCode() == PDG_t::kXiMinus)
histos_eve.fill(HIST("GeneratedParticles"), 6.5, mcparticle.pt(), R_Decay);
histos_eve.fill(HIST("GeneratedParticles"), 6.5, mcparticle.pt(), R_Decay);
if (mcparticle.pdgCode() == PDG_t::kXiPlusBar)
histos_eve.fill(HIST("GeneratedParticles"), 8.5, mcparticle.pt(), R_Decay);
histos_eve.fill(HIST("GeneratedParticles"), 8.5, mcparticle.pt(), R_Decay);
if (mcparticle.pdgCode() == PDG_t::kOmegaMinus)
histos_eve.fill(HIST("GeneratedParticles"), 10.5, mcparticle.pt(), R_Decay);
histos_eve.fill(HIST("GeneratedParticles"), 10.5, mcparticle.pt(), R_Decay);
if (mcparticle.pdgCode() == PDG_t::kOmegaPlusBar)
histos_eve.fill(HIST("GeneratedParticles"), 12.5, mcparticle.pt(), R_Decay);
}
Expand All @@ -378,7 +378,7 @@
}

int dauEtaFlag = 0;
for (auto& v0 : fullV0s) {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
auto posdau = v0.posTrack_as<DaughterTracks>();
auto negdau = v0.negTrack_as<DaughterTracks>();

Expand Down Expand Up @@ -501,14 +501,14 @@
return;
}

for (auto& v0 : fullV0s) {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.

if (!v0.has_mcParticle()) {
continue;
}
auto v0mcparticle = v0.mcParticle();
Int_t lPDG = 0;
if (TMath::Abs(v0mcparticle.pdgCode()) == 310 || TMath::Abs(v0mcparticle.pdgCode()) == PDG_t::kLambda0) {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
lPDG = v0mcparticle.pdgCode();
}

Expand All @@ -522,7 +522,7 @@
TMath::Abs(v0.dcanegtopv()) > V0_dcanegtopv) {

// K0Short
if (lPDG == 310) {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
if (TMath::Abs(v0.yK0Short()) < V0_rapidity && CtauK0s < lifetimecut->get("lifetimecutK0S")) {
histos_V0.fill(HIST("InvMassK0STrue"), v0.pt(), v0.v0radius(), v0.mK0Short());
}
Expand Down Expand Up @@ -552,7 +552,7 @@
return;
}

for (auto& casc : Cascades) {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
auto bachelor = casc.bachelor_as<DaughterTracks>();
auto posdau = casc.posTrack_as<DaughterTracks>();
auto negdau = casc.negTrack_as<DaughterTracks>();
Expand All @@ -565,7 +565,7 @@
histos_Casc.fill(HIST("CascCosPA"), casc.casccosPA(collision.posX(), collision.posY(), collision.posZ()), casc.sign());
histos_Casc.fill(HIST("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 568 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_Casc.fill(HIST("V0CosPAToXi"), v0cospatoxi, casc.sign());
histos_Casc.fill(HIST("CascRadius"), casc.cascradius(), casc.sign());
Expand Down Expand Up @@ -641,7 +641,7 @@
return;
}

for (auto& casc : Cascades) {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.

histos_Casc.fill(HIST("QA_XiMinusCandidates"), 0.5);

Expand Down Expand Up @@ -671,7 +671,7 @@
}
histos_Casc.fill(HIST("QA_XiMinusCandidates"), 3.5);

for (auto& particleMotherOfBach : bachelor.mothers_as<aod::McParticles>()) {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
for (auto& particleMotherOfNeg : mcnegtrack.mothers_as<aod::McParticles>()) {
for (auto& particleMotherOfPos : mcpostrack.mothers_as<aod::McParticles>()) {
for (auto& particleMotherOfV0 : particleMotherOfNeg.mothers_as<aod::McParticles>()) {
Expand Down
Loading