Skip to content

[PWGDQ] Adding new process function for electron-muon analysis#15490

Open
Shunsuke-Kurita wants to merge 6 commits intoAliceO2Group:masterfrom
Shunsuke-Kurita:emu-tableReader-direct
Open

[PWGDQ] Adding new process function for electron-muon analysis#15490
Shunsuke-Kurita wants to merge 6 commits intoAliceO2Group:masterfrom
Shunsuke-Kurita:emu-tableReader-direct

Conversation

@Shunsuke-Kurita
Copy link
Copy Markdown
Contributor

This PR implements processElectronMuonDirect in AnalysisSameEventPairing for direct electron-muon pairing on AO2D tracks, completing the tableReader_withAssoc_direct workflow for EMu analyses. To support this, it also adds processDirectWithFilter to AnalysisEventSelection — enabling filterPPwithAssociation as an upstream pre-filter — and introduces a new AnalysisMuonSelection struct for direct muon selection on AO2D FwdTracks.

@github-actions github-actions bot added the pwgdq label Mar 23, 2026
@github-actions github-actions bot changed the title Adding new process function for electron-muon analysis [PWGDQ] Adding new process function for electron-muon analysis Mar 23, 2026
@vkucera
Copy link
Copy Markdown
Collaborator

vkucera commented Mar 23, 2026

@Shunsuke-Kurita Your PR fails the compilation and the formatting. Please test your changes before making a PR.

@alibuild
Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for 189bde2 at 2026-03-23 12:36:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/15490-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc_direct.cxx:1315:40: error: unused parameter 'events' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/15490-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc_direct.cxx:1997:110: error: unused parameter 'tracks1' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/15490-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc_direct.cxx:1998:107: error: unused parameter 'tracks2' [-Werror=unused-parameter]
ninja: build stopped: subcommand failed.

Full log here.

@vkucera vkucera marked this pull request as draft March 23, 2026 13:32
@Shunsuke-Kurita
Copy link
Copy Markdown
Contributor Author

Dear @vkucera ,
Thank you for your feedback.
The code compiles successfully in my local environment, and I have also tested that the newly added process function works as expected.
However, I see that there are compilation errors in the CI. I will check the issues and update the code accordingly.
Thank you for pointing this out.

Comment thread PWGDQ/Tasks/tableReader_withAssoc_direct.cxx Outdated
@vkucera vkucera marked this pull request as ready for review March 25, 2026 15:48
@alibuild
Copy link
Copy Markdown
Collaborator

alibuild commented Mar 26, 2026

Error while checking build/O2Physics/o2 for efabcf7 at 2026-04-07 23:42:

No log files found

Full log here.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

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

@Shunsuke-Kurita Shunsuke-Kurita force-pushed the emu-tableReader-direct branch from 59b5474 to b5ea9e1 Compare April 13, 2026 06:43

Preslice<soa::Join<aod::TrackAssoc, aod::BarrelTrackCuts, aod::Prefilter>> trackAssocsPerCollision = aod::track_association::collisionId;
// Preslice<soa::Join<aod::ReducedMuonsAssoc, aod::MuonTrackCuts>> muonAssocsPerCollision = aod::reducedtrack_association::reducedeventId;
Preslice<soa::Join<aod::TrackAssoc, aod::BarrelTrackCuts>> trackEmuAssocsPerCollision = aod::track_association::collisionId;
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 do not want to use the prefilter for removing conversion electrons?

// Events not passing the EMu filter bit are skipped entirely, reducing track/muon
// propagation and PID computation for the majority of collisions.
template <uint32_t TEventFillMap, typename TEvents>
void runEventSelectionWithFilter(TEvents const& events, BCsWithTimestamps const& 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.

Its not clear to me what the difference is with respect to the other event selection function. Most if not all the code looks just duplicated.

Comment on lines +2032 to +2057
for (int iTrack = 0; iTrack < fNCutsBarrel; ++iTrack) {
if (!(a1.isBarrelSelected_raw() & (1u << iTrack)))
continue;
for (int iMuon = 0; iMuon < fNCutsMuon; ++iMuon) {
if (!(a2.isMuonSelected_raw() & (1u << iMuon)))
continue;
for (unsigned int iPairCut = 0; iPairCut < (fPairCuts.empty() ? 1u : static_cast<unsigned int>(fPairCuts.size())); iPairCut++) {
if (!fPairCuts.empty()) {
AnalysisCompositeCut cut = fPairCuts.at(iPairCut);
if (!cut.IsSelected(VarManager::fgValues))
continue;
}
int index = iTrack * (fNCutsMuon * nPairCuts) + iMuon * nPairCuts + static_cast<int>(iPairCut);
auto itHist = histNames.find(index);
if (itHist == histNames.end())
continue;
if (sign1 * sign2 < 0) {
fHistMan->FillHistClass(itHist->second[0].Data(), VarManager::fgValues);
} else if (sign1 > 0) {
fHistMan->FillHistClass(itHist->second[1].Data(), VarManager::fgValues);
} else {
fHistMan->FillHistClass(itHist->second[2].Data(), VarManager::fgValues);
}
} // end pair cut loop
} // end muon cut loop
} // end barrel cut loop
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 really using pair cuts ? Normally its easy to just plot in your histograms as a function of the variable you want to cut on (e.g. pt, mass) and then the pair cuts are not really needed. Its up to you, but if you do not need them, i would remove this to avoid complications.

@alibuild
Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for b5ea9e1 at 2026-04-15 00:55:

## sw/BUILD/O2Physics-latest/log
c++: fatal error: Killed signal terminated program cc1plus
ninja: build stopped: subcommand failed.

Full log here.

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.

4 participants