Skip to content
Open
Show file tree
Hide file tree
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 PWGCF/Flow/Tasks/CMakeLists.txt
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 PWGCF/Flow/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Use kebab-case for names of workflows and match the name of the workflow file.
# 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 @@ -44,7 +44,7 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::GFWCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(flow-gf

Check failure on line 47 in PWGCF/Flow/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name flow-gf does not match its file name flowAnalysisGF.cxx. (Matches flowGf.cxx.)
SOURCES flowAnalysisGF.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::GFWCore
COMPONENT_NAME Analysis)
Expand All @@ -69,7 +69,7 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::GFWCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(flow-sp

Check failure on line 72 in PWGCF/Flow/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name flow-sp does not match its file name flowSP.cxx. (Matches flowSp.cxx.)
SOURCES flowSP.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::GFWCore
COMPONENT_NAME Analysis)
Expand Down Expand Up @@ -114,7 +114,7 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::GFWCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(flow-gpol-ese
o2physics_add_dpl_workflow(flow-directed-flow-task
SOURCES flowDirectedFlowTask.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Expand Down
39 changes: 12 additions & 27 deletions PWGCF/Flow/Tasks/flowDirectedFlowTask.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 PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// 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 @@ -146,7 +146,6 @@
using EventCandidates = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::SPCalibrationTables, aod::Mults>>;
using AllTrackCandidates = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPi, aod::pidTPCFullPr, aod::pidTPCFullKa>>;
using ResoV0s = aod::V0Datas;
using BCsRun3 = soa::Join<aod::BCsWithTimestamps, aod::Run3MatchedToBCSparse>;

void init(InitContext&)
{
Expand Down Expand Up @@ -222,17 +221,6 @@
histos.add("hSparseAntiLambdaAvgUyQ1", "AntiLambda <u_{y}> vs q1", HistType::kTHnSparseF, axesPolSPQ1, true);
}

float getPhiInRange(float phi)
{
while (phi <= -o2::constants::math::PI) {
phi += o2::constants::math::TwoPI;
}
while (phi > o2::constants::math::PI) {
phi -= o2::constants::math::TwoPI;
}
return phi;
}

template <typename TCollision>
bool eventSelected(TCollision collision)
{
Expand Down Expand Up @@ -291,9 +279,9 @@

if (cfgq1mode == 1) {
q1 = q1A;
} else if (cfgq1mode == 2) {

Check failure on line 282 in PWGCF/Flow/Tasks/flowDirectedFlowTask.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.
q1 = q1C;
} else if (cfgq1mode == 3) {

Check failure on line 284 in PWGCF/Flow/Tasks/flowDirectedFlowTask.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.
q1 = q1Mean;
} else {
q1 = q1Full;
Expand Down Expand Up @@ -388,9 +376,6 @@
if (std::abs(v0.yLambda()) > cfgV0Rap) {
return false;
}
if (std::abs(v0.eta()) > 0.8) {
return false;
}
return true;
}

Expand Down Expand Up @@ -439,12 +424,12 @@

const float cosThetaStar = daughterStar.Pz() / daughterStar.P();
const float sinThetaStar = std::sqrt(std::max(0.0, 1.0 - cosThetaStar * cosThetaStar));
const float sinPhiStar = std::sin(getPhiInRange(phiStar));
const float cosPhiStar = std::cos(getPhiInRange(phiStar));
const float sinPhiStar = std::sin(phiStar);
const float cosPhiStar = std::cos(phiStar);

float polEP_A = std::sin(getPhiInRange(phiStar - psiA));
float polEP_C = std::sin(getPhiInRange(phiStar - psiC));
float polEP = std::sin(getPhiInRange(phiStar - psiFull));
float polEP_A = std::sin(phiStar - psiA);
float polEP_C = std::sin(phiStar - psiC);
float polEP = std::sin(phiStar - psiFull);

const float qxFull = qxC - qxA;
const float qyFull = qyC - qyA;
Expand All @@ -464,8 +449,8 @@
polEP_A /= accDen;
polEP_C /= accDen;

const float cosPsi = std::cos(getPhiInRange(psiFull));
const float sinPsi = std::sin(getPhiInRange(psiFull));
const float cosPsi = std::cos(psiFull);
const float sinPsi = std::sin(psiFull);

if (isLambda) {
histos.fill(HIST("hSparseLambdaPolSPQ1"), mass, v0.pt(), polSP, centrality, q1, wgt);
Expand Down Expand Up @@ -502,7 +487,7 @@
}
}

void processData(EventCandidates::iterator const& collision, AllTrackCandidates const& tracks, ResoV0s const& v0s, BCsRun3 const&)
void processData(EventCandidates::iterator const& collision, AllTrackCandidates const& tracks, ResoV0s const& v0s, aod::BCsWithTimestamps const&)
{
if (!eventSelected(collision)) {
return;
Expand Down Expand Up @@ -539,7 +524,7 @@
float dotAC = qxA * qxC + qyA * qyC;
float resDot = dotAC / (magA * magC);

histos.fill(HIST("hpResCosAC"), centrality, std::cos(getPhiInRange(psiA - psiC)));
histos.fill(HIST("hpResCosAC"), centrality, std::cos(psiA - psiC));
histos.fill(HIST("hpResDotAC"), centrality, resDot);
histos.fill(HIST("hpQxAQxC"), centrality, qxA * qxC);
histos.fill(HIST("hpQyAQyC"), centrality, qyA * qyC);
Expand All @@ -563,9 +548,9 @@
histos.fill(HIST("hV1SPAQ1"), centrality, track.pt(), track.eta(), q1, v1SPA);
histos.fill(HIST("hV1SPCQ1"), centrality, track.pt(), track.eta(), q1, v1SPC);

histos.fill(HIST("hV1EPFullQ1"), centrality, track.pt(), track.eta(), q1, std::cos(getPhiInRange(phi - psiFull)));
histos.fill(HIST("hV1EPAQ1"), centrality, track.pt(), track.eta(), q1, std::cos(getPhiInRange(phi - psiA)));
histos.fill(HIST("hV1EPCQ1"), centrality, track.pt(), track.eta(), q1, std::cos(getPhiInRange(phi - psiC)));
histos.fill(HIST("hV1EPFullQ1"), centrality, track.pt(), track.eta(), q1, std::cos(phi - psiFull));
histos.fill(HIST("hV1EPAQ1"), centrality, track.pt(), track.eta(), q1, std::cos(phi - psiA));
histos.fill(HIST("hV1EPCQ1"), centrality, track.pt(), track.eta(), q1, std::cos(phi - psiC));
}

for (const auto& v0 : v0s) {
Expand Down
Loading