Skip to content

Conversation

@namapane
Copy link
Contributor

@namapane namapane commented Dec 17, 2025

  • Move LHEAngProbFiller to the normal sequence, without adding it to addAllEvents.
  • Fix a bug in filling angles in cases where hMass - daughters.MTotal()) < 0.01: since no fillBranch was called in that case, the values from the previous events were taken
  • Some improvements to printouts and implementation.

Notes:

  • Updated exampleProbabilities.py for the documentation of "addPAux", "addPmavjj" , "addPmavjj_true". (Documentation should be moved elsewhere at some point)

@namapane
Copy link
Contributor Author

(@pianonick411 you may want to have a look to the changes and to the question above in the meanwhile)

@pianonick411
Copy link
Contributor

I have found where pAux is calculated in the c++ interface to MELA.

mela.getPAux seems to only retrieve some internal variable auxiliaryprob. See here.

It seems that when computeProdP is called for processes that are not VH, the value of auxiliaryprob is modified. In the linked presentation, the probability denoted with pAux is defined with an integral over eta. I believe that the "integration" over eta is evaluated numerically here and has the effect of integrating out one jet. auxiliaryprob ends up taking on the result of this computation.

Hopefully this clears things up at least somewhat.

@namapane
Copy link
Contributor Author

@pianonick411, in the last commit I added a small fix since I observed an event which fails the condition abs(hMass - daughters.MTotal()) < 0.01 (it is event 802250 in the MELA_Test file). The problem is that variables should be filled in any case, also in pathological conditions, otherwise the values from the previous event remain in the ttree buffer and are used for the current event as well.
The elif here had "<" instead of ">" so that also prevented the warning message to be printed.
This fix may become irrelevant if we move angles computation to MELAProbHelper but it's a good idea to fix this right away.

I also added filling of qH, mZ1, mZ2, which were booked but not filled; are they actually needed? If not, we could remove these variables altogether.

@pianonick411
Copy link
Contributor

pianonick411 commented Dec 18, 2025

@namapane, I am not sure what is best to do with qh, mZ1 and mZ2. They are useful for debugging MELA, but otherwise only duplicate information that is already present. I lean more towards getting rid of them. If we need to debug, dumping the MELA computation using an increased verbosity is much more comprehensive, anyways.

@namapane namapane changed the title Reduce/standardize verbosity; minor improvements Keep LHE angles/probs in the Events tree only; Reduce/standardize verbosity; minor fixes Jan 6, 2026
@namapane namapane merged commit 93221ca into CJLST:Run3 Jan 6, 2026
@namapane
Copy link
Contributor Author

namapane commented Jan 6, 2026

@namapane, I am not sure what is best to do with qh, mZ1 and mZ2. They are useful for debugging MELA, but otherwise only duplicate information that is already present. I lean more towards getting rid of them. If we need to debug, dumping the MELA computation using an increased verbosity is much more comprehensive, anyways.

I eventually commented them out; they can be added back when needed.
I also moved LHEAngProbFiller out of the sequence filling the AllEvents tree, so that it is run only for selected events and results are stored only in the Events tree. This significantly reduces processing time and disk space.
We can of course revert this if a need to have some of the variables in the AllEvents tree comes up.
Small note: this change has a small side effect, that is, LHEAngProbFiller would now be called also for background samples (whereas it was called only for signals before, as a side effect of the fact that ADD_ALLEVENTS is generally set True only for signals). I will fix this in a separate PR.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants