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
53 changes: 53 additions & 0 deletions PWGLF/Tasks/Strangeness/lambdaTwoPartPolarization.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/lambdaTwoPartPolarization.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,7 +9,7 @@
// 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/lambdaTwoPartPolarization.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/lambdaTwoPartPolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

#include "PWGLF/DataModel/LFStrangenessTables.h"

Expand Down Expand Up @@ -40,7 +40,7 @@
#include "Math/Vector3D.h"
#include "Math/Vector4D.h"
#include "TF1.h"
#include "TLorentzVector.h"

Check failure on line 43 in PWGLF/Tasks/Strangeness/lambdaTwoPartPolarization.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 @@ -130,6 +130,8 @@
ConfigurableAxis cosSigAxis{"cosSigAxis", {110, -1.05, 1.05}, "Signal cosine axis"};
ConfigurableAxis cosAccAxis{"cosAccAxis", {110, -7.05, 7.05}, "Accepatance cosine axis"};

ConfigurableAxis vertexAxis{"vertexAxis", {5, -10, 10}, "vertex axis for mixing"};

TF1* fMultPVCutLow = nullptr;
TF1* fMultPVCutHigh = nullptr;

Expand All @@ -144,7 +146,7 @@
{
AxisSpec centQaAxis = {100, 0.0, 100.0};
AxisSpec PVzQaAxis = {300, -15.0, 15.0};
AxisSpec epAxis = {6, 0.0, 2.0 * constants::math::PI};

Check failure on line 149 in PWGLF/Tasks/Strangeness/lambdaTwoPartPolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Use multiples/fractions of PI defined in o2::constants::math.

AxisSpec pidAxis = {100, -10, 10};

Expand Down Expand Up @@ -271,7 +273,7 @@
template <typename C1, typename C2, typename V01, typename V02>
void FillHistograms(C1 const& c1, C2 const& c2, V01 const& V01s, V02 const& V02s)
{
for (auto& v01 : V01s) {

Check failure on line 276 in PWGLF/Tasks/Strangeness/lambdaTwoPartPolarization.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 @@ -311,7 +313,7 @@

histos.fill(HIST("Ana/Acceptance"), v01.pt(), centrality, v01.yLambda(), costhetastar1 * costhetastar1);

for (auto& v02 : V02s) {

Check failure on line 316 in PWGLF/Tasks/Strangeness/lambdaTwoPartPolarization.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 @@ -382,7 +384,7 @@
{
if (cfgCentEst == 1) {
centrality = collision.centFT0C();
} else if (cfgCentEst == 2) {

Check failure on line 387 in PWGLF/Tasks/Strangeness/lambdaTwoPartPolarization.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();
}
if (!eventSelected(collision) && cfgEvtSel) {
Expand All @@ -403,6 +405,57 @@
FillHistograms(collision, collision, V0s, V0s);
}
PROCESS_SWITCH(lambdaTwoPartPolarization, processDataSame, "Process Event for same data", true);

SliceCache cache;
using BinningTypeVertexContributorFT0M = ColumnBinningPolicy<aod::collision::PosZ, aod::cent::CentFT0M>;
using BinningTypeVertexContributorFT0C = ColumnBinningPolicy<aod::collision::PosZ, aod::cent::CentFT0C>;
void processDataMixedT0C(EventCandidates const& collisions,
TrackCandidates const& /*tracks*/, aod::V0Datas const& V0s, aod::BCsWithTimestamps const&)
{
auto tracksTuple = std::make_tuple(V0s);
BinningTypeVertexContributorFT0C binningOnPositions{{vertexAxis, centAxis}, true};
SameKindPair<EventCandidates, V0TrackCandidate, BinningTypeVertexContributorFT0C> pair{binningOnPositions, cfgNoMixedEvents, -1, collisions, tracksTuple, &cache};
for (auto& [c1, tracks1, c2, tracks2] : pair) {

Check failure on line 418 in PWGLF/Tasks/Strangeness/lambdaTwoPartPolarization.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.
centrality = c1.centFT0C();
auto bc = c1.bc_as<aod::BCsWithTimestamps>();
if (cfgAccCor) {
AccMap = ccdb->getForTimeStamp<TProfile2D>(cfgAccCorPath.value, bc.timestamp());
}
if (!eventSelected(c1))
continue;
if (!eventSelected(c2))
continue;
if (c1.bcId() == c2.bcId())
continue;

FillHistograms(c1, c2, tracks1, tracks2);
}
}
PROCESS_SWITCH(lambdaTwoPartPolarization, processDataMixedT0C, "Process Event for mixed data in PbPb", false);

void processDataMixedT0M(EventCandidates const& collisions,
TrackCandidates const& /*tracks*/, aod::V0Datas const& V0s, aod::BCsWithTimestamps const&)
{
auto tracksTuple = std::make_tuple(V0s);
BinningTypeVertexContributorFT0M binningOnPositions{{vertexAxis, centAxis}, true};
SameKindPair<EventCandidates, V0TrackCandidate, BinningTypeVertexContributorFT0M> pair{binningOnPositions, cfgNoMixedEvents, -1, collisions, tracksTuple, &cache};
for (auto& [c1, tracks1, c2, tracks2] : pair) {

Check failure on line 442 in PWGLF/Tasks/Strangeness/lambdaTwoPartPolarization.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.
centrality = c1.centFT0M();
auto bc = c1.bc_as<aod::BCsWithTimestamps>();
if (cfgAccCor) {
AccMap = ccdb->getForTimeStamp<TProfile2D>(cfgAccCorPath.value, bc.timestamp());
}
if (!eventSelected(c1))
continue;
if (!eventSelected(c2))
continue;
if (c1.bcId() == c2.bcId())
continue;

FillHistograms(c1, c2, tracks1, tracks2);
}
}
PROCESS_SWITCH(lambdaTwoPartPolarization, processDataMixedT0M, "Process Event for mixed data in pp", false);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
Expand Down
Loading