Skip to content

[PWGJE] Add diffusion wake analysis#16570

Draft
nicola-wilson wants to merge 29 commits into
AliceO2Group:masterfrom
nicola-wilson:table_branch_14May
Draft

[PWGJE] Add diffusion wake analysis#16570
nicola-wilson wants to merge 29 commits into
AliceO2Group:masterfrom
nicola-wilson:table_branch_14May

Conversation

@nicola-wilson

Copy link
Copy Markdown

This task aims to write tables with collisions that contain at least one high pT track. These are then used by a Bachelor student at GSI who works on diffusion wakes and wants to apply his Run 2 analysis to Run 3 data (therefore, trees are needed). To reduce memory size, some variables are stored in a different format (for example px,py,pz)

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

O2 linter results: ❌ 1 errors, ⚠️ 0 warnings, 🔕 0 disabled

@nzardosh nzardosh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR :) Please find some comments below

Comment thread PWGJE/TableProducer/tableDiffWake.cxx Outdated
{

// Track properties
DECLARE_SOA_COLUMN(ColID, colid, int32_t); // Collision ID

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be an index coloumn

Comment thread PWGJE/TableProducer/tableDiffWake.cxx Outdated
}

using bcs = aod::BCs;
void process(soa::Join<aod::Collisions, aod::EvSels,aod::CentFT0Cs, aod::TPCMults, aod::QvectorFT0Cs>::iterator const& col,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if you could use the JE tables like JCollisions to remove as much dependency as possible on non derived formats

Comment thread PWGJE/TableProducer/tableDiffWake.cxx Outdated
testtrack::ColID,
testtrack::Charge,
testtrack::P,
testtrack::DEdx,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the purpose of this fir diffusion wake studies?

Comment thread PWGJE/TableProducer/tableDiffWake.cxx Outdated
Comment on lines +17 to +37
#include <Framework/ASoA.h>
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisHelpers.h>
#include <Framework/AnalysisTask.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/InitContext.h>
#include <Framework/OutputObjHeader.h>
#include <Framework/runDataProcessing.h>
// For centrality:
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
// For TPC Mult
#include "Common/DataModel/Multiplicity.h"
// For DCA and TrackSelection
#include "Common/DataModel/TrackSelectionTables.h"
// For EP
#include "Common/Core/EventPlaneHelper.h"
#include "Common/DataModel/Qvectors.h"
// For occupancy bit
#include "Common/CCDB/EventSelectionParams.h"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all comments (or move them to the ends of lines). They block the sorting and grouping.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also make sure you include exactly what you use.

Comment on lines 16 to +17
o2physics_add_dpl_workflow(jet-deriveddata-producer
SOURCES derivedDataProducer.cxx
SOURCES jetDeriveddataProducer.cxx

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These files are not modified in this PR.

@vkucera vkucera marked this pull request as draft June 8, 2026 21:29

@vkucera vkucera left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the errors and warnings introduced by your PR.

histos.fill(HIST("etaHistogram"), track.eta());
histos.fill(HIST("pTHistogram"), track.pt());

//------------ Translate values to less memory consuming values --------------------

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is a nice idea to do this type of packing, however, I see no guards against maximum values. Are you sure no reasonable values can cause an overflow of your bits allocated for packing?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reduction factor?

Comment thread PWGJE/TableProducer/tableDiffWake.cxx Outdated
void init(InitContext const&)
{
const AxisSpec axisEta{30, -1.5, +1.5, "#eta"};
const AxisSpec axispT{nBinsPt, 0, 10, "p_{T}"};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure you want pt only to be 0-10? this seems too small to me, do you mean 100 GeV?

Updated pT axis range to accommodate higher values and added overflow checks for track momentum.
wirthni added 3 commits June 9, 2026 11:05
Removed unused track properties and added collision index column.
Removed unused includes and commented out a declaration.
Updated data types for various variables to improve memory usage and consistency. Changed float and short types to more appropriate fixed-width integer types.
wirthni added 7 commits June 9, 2026 16:05
Removed commented-out block detailing track and event data compression before and after compression.
Added file documentation for clarity.
Replaced C-style casts with C++ style static_cast for type safety.
@vkucera

vkucera commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Revert the .mega-linter.yml. modification. If you want to update your branch, do it properly as per the instructions.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is not a table definition, it's a table producer, so don't start the name with table....

Comment thread PWGJE/TableProducer/tableDiffWake.cxx Outdated
Comment on lines +228 to +234
if (particlePx < 0)
substituteP |= static_cast<uint64_t>1 << uppermostBit;
if (particlePx < 0)
particlePx = (-1) * particlePx;
for (int8_t i_bit = lowermostBit; i_bit < uppermostBit; i_bit++) {
if ((particlePx & (static_cast<int64_t>1 << i_bit)))
substituteP |= static_cast<uint64_t>1 << i_bit;

@vkucera vkucera Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not look like a valid cast syntax. Why don't you just use SETBIT?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why wouldn't it? Looks fine to me

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it does not compile.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made the mapping simpler now

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you test it?

@vkucera vkucera changed the title [PWGJE] Created new task: Produce tables for diffusion wake analysis [PWGJE] Add diffusion wake analysis Jun 9, 2026
Removed REPOSITORY_OSV_SCANNER from the configuration.
@vkucera

vkucera commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

@wirthni Who are you?

Replaced bitwise operations in Px, Py, and Pz calculations with bitmasking for efficiency.
@wirthni

wirthni commented Jun 9, 2026

Copy link
Copy Markdown

@wirthni Who are you?

I'm a bachelor's student of Nicola Wilson

@vkucera

vkucera commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

@wirthni Who are you?

I'm a bachelor's student of Nicola Wilson

Please add your full name on your GitHub profile. Your colleagues should know who is contributing in the code.

histos.add("pTHistogram", "pTHistogram", kTH1F, {axispT});
}

using Bcs = aod::BCs;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need this alias?

soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection> const& tracks,
Bcs const&)
{
const float maxMomentum = 173.0;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this come from?

// or submit itself to any jurisdiction.
///
/// \file tableDiffWake.cxx
/// \brief This task writes a collision and track table which are further used in a diffusion wake analysis

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the analysis task?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

6 participants