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
2 changes: 1 addition & 1 deletion PWGLF/Tasks/Strangeness/cascadecorrelations.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <TFile.h>
#include <TH2F.h>
#include <TList.h>
#include <TLorentzVector.h>

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

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
#include <TPDGCode.h>
#include <TProfile.h>

Expand Down Expand Up @@ -306,7 +306,7 @@
if (!gen.isPhysicalPrimary())
return;
int genpdg = gen.pdgCode();
if ((flag < 3 && std::abs(genpdg) == 3312) || (flag > 1 && std::abs(genpdg) == 3334)) {

Check failure on line 309 in PWGLF/Tasks/Strangeness/cascadecorrelations.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 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 @@ -417,7 +417,7 @@
casc.v0cosPA(pvx, pvy, pvz) < v0setting_cospa ||
casc.casccosPA(pvx, pvy, pvz) < cascadesetting_cospa ||
std::abs(casc.dcav0topv(pvx, pvy, pvz)) < cascadesetting_mindcav0topv ||
std::abs(casc.mLambda() - 1.115683) > cascadesetting_v0masswindow ||

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

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-mass]

Avoid hard-coded particle masses. Use o2::constants::physics::Mass... instead.
std::abs(casc.dcapostopv()) < v0setting_dcapostopv ||
std::abs(casc.dcanegtopv()) < v0setting_dcanegtopv ||
casc.dcaV0daughters() > v0setting_dcav0dau ||
Expand Down Expand Up @@ -464,7 +464,7 @@
int flag = 0;
if (std::abs(bachTrack.tpcNSigmaPi()) < tpcNsigmaBachelor)
flag = 1;
if (std::abs(bachTrack.tpcNSigmaKa()) < tpcNsigmaBachelor && (!doCompetingMassCut || std::abs(pdgDB->Mass(3312) - casc.mXi()) > competingMassWindow))

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

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/known-mass]

Use o2::constants::physics::Mass... instead of calling a database method for a known PDG code.

Check failure on line 467 in PWGLF/Tasks/Strangeness/cascadecorrelations.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.
flag = 3 - flag; // 3 if only consistent with omega, 2 if consistent with both

switch (flag) {
Expand Down Expand Up @@ -685,8 +685,8 @@
bool autoCorrelation(std::array<int, 3> triggerTracks, std::array<int, 3> assocTracks)
{
// function that loops over 2 arrays of track indices, checking for common elements
for (int triggerTrack : triggerTracks) {

Check failure on line 688 in PWGLF/Tasks/Strangeness/cascadecorrelations.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 (int assocTrack : assocTracks) {

Check failure on line 689 in PWGLF/Tasks/Strangeness/cascadecorrelations.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 (triggerTrack == assocTrack)
return true;
}
Expand Down Expand Up @@ -849,7 +849,7 @@
registry.fill(HIST("hEta"), casc.eta());
} // casc loop

for (auto& [c0, c1] : combinations(Cascades, Cascades)) { // combinations automatically applies strictly upper in case of 2 identical tables

Check failure on line 852 in PWGLF/Tasks/Strangeness/cascadecorrelations.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.
// Define the trigger as the particle with the highest pT. As we can't swap the cascade tables themselves, we swap the addresses and later dereference them
auto* triggerAddress = &c0;
auto* assocAddress = &c1;
Expand Down Expand Up @@ -932,7 +932,7 @@
registry.fill(HIST("MixedEvents/hMEVz1"), col1.posZ());
registry.fill(HIST("MixedEvents/hMEVz2"), col2.posZ());

for (auto& [casc1, casc2] : combinations(CombinationsFullIndexPolicy(cascades1, cascades2))) {

Check failure on line 935 in PWGLF/Tasks/Strangeness/cascadecorrelations.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.
// specify FullIndexPolicy since the cascades are from different collisions
auto* triggerAddress = &casc1;
auto* assocAddress = &casc2;
Expand Down Expand Up @@ -1003,7 +1003,7 @@
} // process mixed events

Configurable<float> etaGenCascades{"etaGenCascades", 0.8, "min/max of eta for generated cascades"};
Filter genCascadesFilter = nabs(aod::mcparticle::pdgCode) == 3312;

Check failure on line 1006 in PWGLF/Tasks/Strangeness/cascadecorrelations.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.

void processMC(aod::McCollision const& mcCollision, soa::SmallGroups<soa::Join<aod::McCollisionLabels, MyCollisionsMult>> const& collisions, soa::Filtered<aod::McParticles> const& genCascades, aod::McParticles const& mcParticles)
{
Expand All @@ -1015,7 +1015,7 @@

// Let's do some logic on matched reconstructed collisions - if there less or more than one, fill some QA and skip the rest
double FT0mult = -1; // non-sensible default value just in case
double vtxz = mcCollision.posZ();
double vtxz = mcCollision.posZ();
if (collisions.size() < 1) {
registry.fill(HIST("MC/hSplitEvents"), 0);
registry.fill(HIST("MC/hGenMultNoReco"), mCounter.countFT0A(mcParticles) + mCounter.countFT0C(mcParticles));
Expand Down
Loading