Skip to content

GLO VTX: add missing protection against accessing MC labels of background events - #2684

Open
ehellbar wants to merge 1 commit into
AliceO2Group:masterfrom
ehellbar:pr2684
Open

GLO VTX: add missing protection against accessing MC labels of background events#2684
ehellbar wants to merge 1 commit into
AliceO2Group:masterfrom
ehellbar:pr2684

Conversation

@ehellbar

@ehellbar ehellbar commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@ehellbar

Copy link
Copy Markdown
Contributor Author

@sawenzel @shahor02 adding the missing protection against trying to access MC labels of background events

@ehellbar

Copy link
Copy Markdown
Contributor Author

like this, we will fill the data vertex plots, but not the MC plots.

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

thank you

@knopers8
knopers8 enabled auto-merge (squash) August 21, 2026 11:46
@knopers8

Copy link
Copy Markdown
Collaborator

For the record, this fixes O2-7132

mBeamSpot->Fill(x, y);

if (mUseMC && mcLbl[i].isSet()) { // make sure the label was set
if (mUseMC && mcLbl[i].isSet() && mcLbl[i].getSourceID() == 0) { // make sure the label was set and to use only the underlying event

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have some doubts about this: In an O2DPG simulation when using embedding, we will have both SourceID == 0 (the background) and SourceID == 1 (the signal) ... and both might contribute to the vertexing task.

We could however use mcLbl.isNoise() or mcLbl.isValid() or something. ... or directly exclude QED by sourceID != 99.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we do the same check also twice earlier in the function, when we loop over the labels. So for simulations with embedding, this never worked properly, then, always skipping signal and only filling background?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

or, is background == simulated events and signal == embedded signal in this case? Then we might not want the embedded signal in those histogram?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This particular task extracts the MCHeader multiplicity as a very crude alias of the occupancy, relevant only for the PbPb collision. Assuming that the underlying PbPb event is always source 0, a few tracks coming from the overlaid signal with source>0 should be irrelevant.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If it's only used for PbPb then it's probably fine

@knopers8
knopers8 disabled auto-merge August 21, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants