-
Notifications
You must be signed in to change notification settings - Fork 628
[PWGEM] Differentiate between b2c2e and b2cc2e, add function hasNCharmHadrons… #14941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PWGEM/Dilepton/Utils/MCUtilities.h
Outdated
| mothers_pdg2.shrink_to_fit(); | ||
| return static_cast<int>(EM_HFeeType::kBCe_BCe); // b->c->e and b->c->e, decay type = 1 | ||
| int n_c_from_b1 = hasNCharmHadronsInBeautyDecay(p1, mcparticles); | ||
| int n_c_from_b2 = hasNCharmHadronsInBeautyDecay(p2, mcparticles); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dear Florian.
I am not sure this implementation would be backward compatible.
To me, the code looks like while we were before looking at the sum of all the decays, you now implemented a granularity to select decays with multiple charm quarks from 1 b quark.
So, simply running a task that is configured without this new feature would reduce the decay type 1. I think this is not how a new feature should be implemented. Also, it seems you did not test this before, as the compilation failed.
In general, I would prefer it if you changed the central code, there would at least be a test that the default behaviour from before is not changed by a new implementation.
Could you check this locally first please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was tested.
It just appears that I have missed one line when adding the changes for the commit in patch mode.
Yes the decay type 1 (b2c2l) will be reduced by the amount of signal which has more than one charmed hadron in the decay of the beauty hadron.
Currently I don't see an alternative on how to implement this, without touching the decay type,
as the decision on the decay type is made in the IsHF() function of the MCUtilities.h and the information about the decay history is no longer available when filling the histograms in the fillRecHistograms().
One could discuss, whether the mcparticles should be parsed to the fillRecHistograms() function. This would allow me to select the signal within the function hasNCharmHadronsInBeautyDecay() by calling the new function there, but when trying to stay consistent with the current code this is not possible.
And if preferred, I can also add the histograms for b2cc2l_b2c2l and b2cc2l_b2ccl for all tasks.
That way no information should be lost and one can sum up all cases to come back to the inclusive one.
If you have any other suggestions please let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Sebastian,
Hi Florian,
By doing grep -rnw . -e kBCe_BCe, I see that Tasks/studyMCTruth.cxx, Tasks/studyDCAFitter.cxx, Core/DileptonMC.h are using this variable. If there is no other solution, you could for the tasks which do not need the separation do for example for studyMCTruth.cxx L 300:
switch (hfll_type) {
case static_cast(EM_HFeeType::kBCe_BCe): // ULS
fRegistry.fill(HIST("Pair/") + HIST(evNames[evtype]) + HIST("bbbar/") + HIST(dileptonSigns[signtype]) + HIST("hMvsPt"), v12.M(), v12.Pt());
case static_cast(EM_HFeeType::kBCCe_BCe): // ULS
fRegistry.fill(HIST("Pair/") + HIST(evNames[evtype-3]) + HIST("bbbar/") + HIST(dileptonSigns[signtype]) + HIST("hMvsPt"), v12.M(), v12.Pt());
case static_cast(EM_HFeeType::kBCCe_BCCe): // ULS
fRegistry.fill(HIST("Pair/") + HIST(evNames[evtype-4]) + HIST("bbbar/") + HIST(dileptonSigns[signtype]) + HIST("hMvsPt"), v12.M(), v12.Pt());
....
}
So that the output do not change for this task. Something similar but a bit difference can be done for evaluateAcceptance.cxx L 295, studyDCAFitter.cxx L534, L786, DileptonNC.h L1733, L1917, L2435.
Please check with your recent O2Physics that there is no further cases.
My two cents,
Raphaelle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Raphaelle, Florian,
I think Sebastian's point is opposite. He wants to keep DileptonMC.h unchanged. Here, I agree with Sebastian.
Can I modify your PR? I have an idea to minimize the impact and total modification.
best regards, Daiki
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Daiki, yes please go ahead, if you have a solution to modify this in a different way.
|
Error while checking build/O2Physics/o2 for 700f069 at 2026-02-12 17:29: Full log here. |
700f069 to
5ac6cfd
Compare
Apply changes for b2cc2l for CheckMCPairTemplates
|
Error while checking build/O2Physics/o2 for 6fd19f4 at 2026-02-12 21:48: Full log here. |
|
Hi Florian, I modified MCUtilities.h and checkMCPairTemplate.cxx. You should call |
|
Yes, by introducing a boolean as template helps keeping the backward compatibility. |
|
Thanks Daiki ! Elegant way to solve this.... |
alibuild
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto-approving on behalf of @feisenhu.
…InBeautyDecay()
Trying to differentiate in case of the MC signal
b2c2ewhether only one or possibly two/more charmed hadrons were produced in the decay of the beauty hadron.So additional decay types were added:
b2cc2e_b2c2eandb2cc2e_b2cc2e@jjungIKF @rbailhac Could I ask you to check this changes, and if you agree with the implementation?