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
4 changes: 2 additions & 2 deletions PWGLF/Tasks/Strangeness/lambdalambda.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGLF/Tasks/Strangeness/lambdalambda.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specify task name only when it cannot be derived from the struct name. Only append to the default name.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -42,7 +42,7 @@
#include "Math/Vector3D.h"
#include "Math/Vector4D.h"
#include "TF1.h"
#include "TLorentzVector.h"

Check failure on line 45 in PWGLF/Tasks/Strangeness/lambdalambda.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 "TRandom3.h"
#include "TVector3.h"
#include <TMath.h>
Expand Down Expand Up @@ -379,7 +379,7 @@
ROOT::Math::XYZVector posdiff = v02pos - v01pos;

float d = 1. - TMath::Power(v01mom.Dot(v02mom), 2);
if (d < 1e-5)

Check failure on line 382 in PWGLF/Tasks/Strangeness/lambdalambda.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 999;
float t = posdiff.Dot(v01mom - v01mom.Dot(v02mom) * v02mom) / d;
float s = -posdiff.Dot(v02mom - v01mom.Dot(v02mom) * v01mom) / d;
Expand All @@ -393,7 +393,7 @@

template <typename V01, typename V02, typename Coll>
float getPVPA(V01 const& v01, V02 const& v02, Coll const& coll)
{
{
ROOT::Math::XYZVector v0v0mom;
v0v0mom.SetXYZ(v01.px() + v02.px(), v01.py() + v02.py(), v01.pz() + v02.pz());

Expand All @@ -403,9 +403,9 @@
v01mom.SetXYZ(v01.px() / v01.p(), v01.py() / v01.p(), v01.pz() / v01.p());
v02mom.SetXYZ(v02.px() / v02.p(), v02.py() / v02.p(), v02.pz() / v02.p());
ROOT::Math::XYZVector posdiff = v02pos - v01pos;

float d = 1. - TMath::Power(v01mom.Dot(v02mom), 2);
if (d < 1e-5)

Check failure on line 408 in PWGLF/Tasks/Strangeness/lambdalambda.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 -2;
float t = posdiff.Dot(v01mom - v01mom.Dot(v02mom) * v02mom) / d;
float s = -posdiff.Dot(v02mom - v01mom.Dot(v02mom) * v01mom) / d;
Expand All @@ -415,7 +415,7 @@
pv.SetXYZ(coll.posX(), coll.posY(), coll.posZ());
ROOT::Math::XYZVector reldca = dca - pv;

return v0v0mom.Dot(reldca) / sqrt(v0v0mom.Mag2() * reldca.Mag2());

Check failure on line 418 in PWGLF/Tasks/Strangeness/lambdalambda.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

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

template <typename C1, typename C2, typename V01, typename V02>
Expand All @@ -424,7 +424,7 @@
IsTriggered = false;
IsSelected = false;

for (auto& v01 : V01s) {

Check failure on line 427 in PWGLF/Tasks/Strangeness/lambdalambda.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 postrack_v01 = v01.template posTrack_as<TrackCandidates>();
auto negtrack_v01 = v01.template negTrack_as<TrackCandidates>();

Expand Down Expand Up @@ -457,7 +457,7 @@
RecoV01 = ROOT::Math::PxPyPzMVector(v01.px(), v01.py(), v01.pz(), v01.mAntiLambda());
}

for (auto& v02 : V02s) {

Check failure on line 460 in PWGLF/Tasks/Strangeness/lambdalambda.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 (v01.v0Id() <= v02.v0Id() && doprocessDataSame)
continue;
auto postrack_v02 = v02.template posTrack_as<TrackCandidates>();
Expand Down Expand Up @@ -548,7 +548,7 @@
{
if (cfgCentEst == 1) {
centrality = collision.centFT0C();
} else if (cfgCentEst == 2) {

Check failure on line 551 in PWGLF/Tasks/Strangeness/lambdalambda.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.
centrality = collision.centFT0M();
}
histos.fill(HIST("hEventstat"), 0.5);
Expand Down Expand Up @@ -589,7 +589,7 @@
TrackCandidates const& /*tracks*/, aod::V0Datas const& V0s, aod::BCsWithTimestamps const&)
{
int currentRun = -1;
for (auto& [c1, c2] : selfCombinations(colBinning, cfgNoMixedEvents, -1, collisions, collisions)) {

Check failure on line 592 in PWGLF/Tasks/Strangeness/lambdalambda.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 (c1.index() == c2.index())
continue;

Expand Down Expand Up @@ -626,5 +626,5 @@
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<lambdalambda>(cfgc, TaskName{"lf-lambdalambda"})};

Check failure on line 629 in PWGLF/Tasks/Strangeness/lambdalambda.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specified task name lf-lambdalambda produces device name lf-lambdalambda which does not match the device name lambdalambda from the struct name lambdalambda. (Matching struct name LfLambdalambda)
}
Loading