Skip to content

Commit c35d8b3

Browse files
jikim1290alibuild
andauthored
[PWGCF] flowDirectedFlowTask.cxx: update to BCsWithTimestamps (#16366)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 1e68664 commit c35d8b3

2 files changed

Lines changed: 13 additions & 28 deletions

File tree

PWGCF/Flow/Tasks/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ o2physics_add_dpl_workflow(pid-flow-pt-corr
114114
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::GFWCore
115115
COMPONENT_NAME Analysis)
116116

117-
o2physics_add_dpl_workflow(flow-gpol-ese
117+
o2physics_add_dpl_workflow(flow-directed-flow-task
118118
SOURCES flowDirectedFlowTask.cxx
119119
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
120120
COMPONENT_NAME Analysis)

PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ struct flowDirectedFlowTask {
146146
using EventCandidates = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::SPCalibrationTables, aod::Mults>>;
147147
using AllTrackCandidates = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPi, aod::pidTPCFullPr, aod::pidTPCFullKa>>;
148148
using ResoV0s = aod::V0Datas;
149-
using BCsRun3 = soa::Join<aod::BCsWithTimestamps, aod::Run3MatchedToBCSparse>;
150149

151150
void init(InitContext&)
152151
{
@@ -222,17 +221,6 @@ struct flowDirectedFlowTask {
222221
histos.add("hSparseAntiLambdaAvgUyQ1", "AntiLambda <u_{y}> vs q1", HistType::kTHnSparseF, axesPolSPQ1, true);
223222
}
224223

225-
float getPhiInRange(float phi)
226-
{
227-
while (phi <= -o2::constants::math::PI) {
228-
phi += o2::constants::math::TwoPI;
229-
}
230-
while (phi > o2::constants::math::PI) {
231-
phi -= o2::constants::math::TwoPI;
232-
}
233-
return phi;
234-
}
235-
236224
template <typename TCollision>
237225
bool eventSelected(TCollision collision)
238226
{
@@ -388,9 +376,6 @@ struct flowDirectedFlowTask {
388376
if (std::abs(v0.yLambda()) > cfgV0Rap) {
389377
return false;
390378
}
391-
if (std::abs(v0.eta()) > 0.8) {
392-
return false;
393-
}
394379
return true;
395380
}
396381

@@ -439,12 +424,12 @@ struct flowDirectedFlowTask {
439424

440425
const float cosThetaStar = daughterStar.Pz() / daughterStar.P();
441426
const float sinThetaStar = std::sqrt(std::max(0.0, 1.0 - cosThetaStar * cosThetaStar));
442-
const float sinPhiStar = std::sin(getPhiInRange(phiStar));
443-
const float cosPhiStar = std::cos(getPhiInRange(phiStar));
427+
const float sinPhiStar = std::sin(phiStar);
428+
const float cosPhiStar = std::cos(phiStar);
444429

445-
float polEP_A = std::sin(getPhiInRange(phiStar - psiA));
446-
float polEP_C = std::sin(getPhiInRange(phiStar - psiC));
447-
float polEP = std::sin(getPhiInRange(phiStar - psiFull));
430+
float polEP_A = std::sin(phiStar - psiA);
431+
float polEP_C = std::sin(phiStar - psiC);
432+
float polEP = std::sin(phiStar - psiFull);
448433

449434
const float qxFull = qxC - qxA;
450435
const float qyFull = qyC - qyA;
@@ -464,8 +449,8 @@ struct flowDirectedFlowTask {
464449
polEP_A /= accDen;
465450
polEP_C /= accDen;
466451

467-
const float cosPsi = std::cos(getPhiInRange(psiFull));
468-
const float sinPsi = std::sin(getPhiInRange(psiFull));
452+
const float cosPsi = std::cos(psiFull);
453+
const float sinPsi = std::sin(psiFull);
469454

470455
if (isLambda) {
471456
histos.fill(HIST("hSparseLambdaPolSPQ1"), mass, v0.pt(), polSP, centrality, q1, wgt);
@@ -502,7 +487,7 @@ struct flowDirectedFlowTask {
502487
}
503488
}
504489

505-
void processData(EventCandidates::iterator const& collision, AllTrackCandidates const& tracks, ResoV0s const& v0s, BCsRun3 const&)
490+
void processData(EventCandidates::iterator const& collision, AllTrackCandidates const& tracks, ResoV0s const& v0s, aod::BCsWithTimestamps const&)
506491
{
507492
if (!eventSelected(collision)) {
508493
return;
@@ -539,7 +524,7 @@ struct flowDirectedFlowTask {
539524
float dotAC = qxA * qxC + qyA * qyC;
540525
float resDot = dotAC / (magA * magC);
541526

542-
histos.fill(HIST("hpResCosAC"), centrality, std::cos(getPhiInRange(psiA - psiC)));
527+
histos.fill(HIST("hpResCosAC"), centrality, std::cos(psiA - psiC));
543528
histos.fill(HIST("hpResDotAC"), centrality, resDot);
544529
histos.fill(HIST("hpQxAQxC"), centrality, qxA * qxC);
545530
histos.fill(HIST("hpQyAQyC"), centrality, qyA * qyC);
@@ -563,9 +548,9 @@ struct flowDirectedFlowTask {
563548
histos.fill(HIST("hV1SPAQ1"), centrality, track.pt(), track.eta(), q1, v1SPA);
564549
histos.fill(HIST("hV1SPCQ1"), centrality, track.pt(), track.eta(), q1, v1SPC);
565550

566-
histos.fill(HIST("hV1EPFullQ1"), centrality, track.pt(), track.eta(), q1, std::cos(getPhiInRange(phi - psiFull)));
567-
histos.fill(HIST("hV1EPAQ1"), centrality, track.pt(), track.eta(), q1, std::cos(getPhiInRange(phi - psiA)));
568-
histos.fill(HIST("hV1EPCQ1"), centrality, track.pt(), track.eta(), q1, std::cos(getPhiInRange(phi - psiC)));
551+
histos.fill(HIST("hV1EPFullQ1"), centrality, track.pt(), track.eta(), q1, std::cos(phi - psiFull));
552+
histos.fill(HIST("hV1EPAQ1"), centrality, track.pt(), track.eta(), q1, std::cos(phi - psiA));
553+
histos.fill(HIST("hV1EPCQ1"), centrality, track.pt(), track.eta(), q1, std::cos(phi - psiC));
569554
}
570555

571556
for (const auto& v0 : v0s) {

0 commit comments

Comments
 (0)