Skip to content

[PWGHF] treeCreatorDstarSpinAlignMixing: Adding new task for local mix candidate analysis in Dstar spin alignment measurement.#16721

Merged
zhangbiao-phy merged 5 commits into
AliceO2Group:masterfrom
Mingze129:mixcandev
Jun 22, 2026
Merged

[PWGHF] treeCreatorDstarSpinAlignMixing: Adding new task for local mix candidate analysis in Dstar spin alignment measurement.#16721
zhangbiao-phy merged 5 commits into
AliceO2Group:masterfrom
Mingze129:mixcandev

Conversation

@Mingze129

Copy link
Copy Markdown
Contributor

Add a new task to obtain the candidates information required for local mixed-event analysis.

@github-actions github-actions Bot added the pwghf PWG-HF label Jun 17, 2026
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown

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

Comment thread PWGHF/D2H/Tasks/CMakeLists.txt Outdated
fgrosa
fgrosa previously requested changes Jun 18, 2026

@fgrosa fgrosa 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.

Hi @Mingze129 thanks a lot! The implementation looks good to me, I just have a few minor comments (see below)

Comment thread PWGHF/D2H/Tasks/taskMixingDstarCandTreeCreator.cxx Outdated
Comment thread PWGHF/D2H/Tasks/taskMixingDstarCandTreeCreator.cxx Outdated
Comment thread PWGHF/D2H/Tasks/taskMixingDstarCandTreeCreator.cxx Outdated
Comment thread PWGHF/D2H/Tasks/taskMixingDstarCandTreeCreator.cxx Outdated
Comment thread PWGHF/D2H/Tasks/taskMixingDstarCandTreeCreator.cxx Outdated
@vkucera

vkucera commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

@Mingze129 can you please clarify what this workflow is supposed to produce? From the name and path, it is not clear whether it's a task, a candidate creator, or a tree creator.

@Mingze129

Copy link
Copy Markdown
Contributor Author

@Mingze129 can you please clarify what this workflow is supposed to produce? From the name and path, it is not clear whether it's a task, a candidate creator, or a tree creator.

@vkucera Thank you for you comments on this draft.

I need this task to produce derived data for local mixed-event analysis.

I marked it as Draft mainly for two reasons. First, I would like to develop it together with Fabrizio. Second, I am not yet sure how this script should be named, where it should be placed in the repository, or whether we will eventually want to add a complete online mixed-event analysis workflow in the future.

My original plan was to discuss these details with Fabrizio after the script was completed and had passed the tests, and then change the status to Ready. Since you have raised the question now, I look forward to hearing your suggestions and would greatly appreciate any guidance you can offer.

@fgrosa

fgrosa commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

@Mingze129 can you please clarify what this workflow is supposed to produce? From the name and path, it is not clear whether it's a task, a candidate creator, or a tree creator.

@vkucera Thank you for you comments on this draft.

I need this task to produce derived data for local mixed-event analysis.

I marked it as Draft mainly for two reasons. First, I would like to develop it together with Fabrizio. Second, I am not yet sure how this script should be named, where it should be placed in the repository, or whether we will eventually want to add a complete online mixed-event analysis workflow in the future.

My original plan was to discuss these details with Fabrizio after the script was completed and had passed the tests, and then change the status to Ready. Since you have raised the question now, I look forward to hearing your suggestions and would greatly appreciate any guidance you can offer.

Hi @Mingze129, I think you can rename it treeCreatorDstarSpinAlignMixing, move it to the D2H/TableProducer folder and once implemented my few comments, it looks good to me (provided that you tested it locally). Many thanks!

@vkucera

vkucera commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

@Mingze129 can you please clarify what this workflow is supposed to produce? From the name and path, it is not clear whether it's a task, a candidate creator, or a tree creator.

@vkucera Thank you for you comments on this draft.
I need this task to produce derived data for local mixed-event analysis.
I marked it as Draft mainly for two reasons. First, I would like to develop it together with Fabrizio. Second, I am not yet sure how this script should be named, where it should be placed in the repository, or whether we will eventually want to add a complete online mixed-event analysis workflow in the future.
My original plan was to discuss these details with Fabrizio after the script was completed and had passed the tests, and then change the status to Ready. Since you have raised the question now, I look forward to hearing your suggestions and would greatly appreciate any guidance you can offer.

Hi @Mingze129, I think you can rename it treeCreatorDstarSpinAlignMixing, move it to the D2H/TableProducer folder and once implemented my few comments, it looks good to me (provided that you tested it locally). Many thanks!

Thanks @Mingze129 @fgrosa . That sounds reasonable.

@Mingze129 Mingze129 changed the title [PWGHF] taskMixingDstarCandTreeCreator: Adding new task for local mix candidate analysis in Dstar spin alignment measurement. [PWGHF] treeCreatorDstarSpinAlignMixing: Adding new task for local mix candidate analysis in Dstar spin alignment measurement. Jun 18, 2026
@Mingze129 Mingze129 marked this pull request as ready for review June 22, 2026 07:10
@zhangbiao-phy zhangbiao-phy enabled auto-merge (squash) June 22, 2026 11:39
@zhangbiao-phy zhangbiao-phy merged commit f8b07da into AliceO2Group:master Jun 22, 2026
16 checks passed
massDStar = candidate.invMassAntiDstar();
}
etaSoftPi = RecoDecay::eta(std::array{candidate.pxSoftPi(), candidate.pySoftPi(), candidate.pzSoftPi()});
phiSoftPi = RecoDecay::phi(std::array{candidate.pxSoftPi(), candidate.pySoftPi(), candidate.pzSoftPi()});

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.

You only need the px and py to get phi.

@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.

Please don't ignore the warning.

Comment on lines +182 to +184
auto trackProng0 = candidate.template prong0_as<Trk>();
auto trackProng1 = candidate.template prong1_as<Trk>();
auto trackProng2 = candidate.template prongPi_as<Trk>();

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.

Suggested change
auto trackProng0 = candidate.template prong0_as<Trk>();
auto trackProng1 = candidate.template prong1_as<Trk>();
auto trackProng2 = candidate.template prongPi_as<Trk>();
auto const& trackProng0 = candidate.template prong0_as<Trk>();
auto const& trackProng1 = candidate.template prong1_as<Trk>();
auto const& trackProng2 = candidate.template prongPi_as<Trk>();

auto trackProng1 = candidate.template prong1_as<Trk>();
auto trackProng2 = candidate.template prongPi_as<Trk>();
getTrackingInfos(std::vector{trackProng0, trackProng1, trackProng2}, absEtaTrackMin, numItsClsMin, numTpcClsMin);
std::array<float, 3> const Qvector = getQvec(collision, qVecDetector.value);

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.

Don't force the assigned type.

Suggested change
std::array<float, 3> const Qvector = getQvec(collision, qVecDetector.value);
auto const Qvector = getQvec(collision, qVecDetector.value);

Comment on lines +131 to +133
void init(InitContext const&)
{
}

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.

Useless

Comment on lines +135 to +138
/// prongTracks is the vector of daughter tracks
/// etaMin is the minimum eta
/// nItsClsMin is the minumum number of clusters in ITS
/// nTpcClsMin is the minumum number of clusters in TPC

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.

You don't mention what it does.

}
}

template <typename CollType, typename T, typename Trk, typename BcType>

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.

Use meaningful type names.

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

Labels

pwghf PWG-HF

Development

Successfully merging this pull request may close these issues.

5 participants