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
76 changes: 36 additions & 40 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

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -9,56 +9,50 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \author Junlee Kim (jikim1290@gmail.com)

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

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

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

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

#include <cmath>
#include <array>
#include <cstdlib>
#include <chrono>
#include <string>
#include <vector>

#include "TLorentzVector.h"
#include "TRandom3.h"
#include "TF1.h"
#include "TVector3.h"
#include "Math/Vector3D.h"
#include "Math/Vector4D.h"
#include "Math/GenVector/Boost.h"
#include <TMath.h>

#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/StepTHn.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/StaticFor.h"
#include "PWGLF/DataModel/LFStrangenessTables.h"

#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/Core/TrackSelection.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/DataModel/EventSelection.h"

#include "Common/Core/trackUtilities.h"
#include "Common/Core/TrackSelection.h"

#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "EventFiltering/Zorro.h"
#include "EventFiltering/ZorroSummary.h"

#include "CCDB/BasicCCDBManager.h"
#include "CCDB/CcdbApi.h"
#include "CommonConstants/PhysicsConstants.h"

#include "ReconstructionDataFormats/Track.h"

#include "DataFormatsParameters/GRPObject.h"
#include "DataFormatsParameters/GRPMagField.h"
#include "DataFormatsParameters/GRPObject.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "Framework/StaticFor.h"
#include "Framework/StepTHn.h"
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/Track.h"

#include "CCDB/CcdbApi.h"
#include "CCDB/BasicCCDBManager.h"
#include "Math/GenVector/Boost.h"
#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>

#include "PWGLF/DataModel/LFStrangenessTables.h"
#include <array>
#include <chrono>
#include <cmath>
#include <cstdlib>
#include <string>
#include <vector>

using namespace o2;
using namespace o2::framework;
Expand Down Expand Up @@ -376,8 +370,8 @@
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);

Check failure on line 373 in PWGLF/Tasks/Strangeness/lambdalambda.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 (d < 1e-5)

Check failure on line 374 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 @@ -392,7 +386,7 @@
IsTriggered = false;
IsSelected = false;

for (auto& v01 : V01s) {

Check failure on line 389 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 @@ -425,7 +419,7 @@
RecoV01 = ROOT::Math::PxPyPzMVector(v01.px(), v01.py(), v01.pz(), v01.mAntiLambda());
}

for (auto& v02 : V02s) {

Check failure on line 422 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 @@ -515,7 +509,7 @@
{
if (cfgCentEst == 1) {
centrality = collision.centFT0C();
} else if (cfgCentEst == 2) {

Check failure on line 512 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 @@ -556,13 +550,15 @@
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 553 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;
if (c1.index() == c2.index())
continue;

auto bc1 = c1.bc_as<aod::BCsWithTimestamps>();
auto bc2 = c2.bc_as<aod::BCsWithTimestamps>();

if (bc1.runNumber() != bc2.runNumber() ) continue;
if (bc1.runNumber() != bc2.runNumber())
continue;

if (bc1.runNumber() != currentRun) {
if (cfgSkimmedProcessing) {
Expand Down
Loading