Skip to content

Use aggregate initialisation for JetFinder - #4699

Closed
ktf wants to merge 3 commits into
AliceO2Group:masterfrom
ktf:aggregate-jet-init
Closed

Use aggregate initialisation for JetFinder#4699
ktf wants to merge 3 commits into
AliceO2Group:masterfrom
ktf:aggregate-jet-init

Conversation

@ktf

@ktfktf commented Feb 13, 2024

Copy link
Copy Markdown
Member

No description provided.

@ktf

ktf commented Feb 13, 2024

Copy link
Copy Markdown
MemberAuthor

@qgp@nzardosh this should actually work...

@qgp

qgp commented Feb 13, 2024

Copy link
Copy Markdown
Contributor

Duplicate of#4697

@ktf

ktf commented Feb 13, 2024

Copy link
Copy Markdown
MemberAuthor

fine with me, although this version handles the ghost* as before. i do not know if that is actually desirable, though.

@qgp

qgp commented Feb 14, 2024

Copy link
Copy Markdown
Contributor

fine with me, although this version handles the ghost* as before. i do not know if that is actually desirable, though.

@ktf What's wrong with default initialisation (instead of zero initialisation) for these variables?

@ktf

ktf commented Feb 14, 2024

Copy link
Copy Markdown
MemberAuthor

Before your fix, the ghost<something> variables were not 0-initialised, but initialised starting from the respecive <something>. For example, ghostEtaMin was using eta_Min as initial value. I guess this was the reason / motivation behind the explicit template. You can still retain that behavior, but then you need to fix your aggregate initialisation using:

structJetFinder {
float etaMin = 0.9;
...
float ghostEtaMin = etaMin;
...
};

This is what would have the same effect as the old constructor.

@ktf

ktf commented Feb 14, 2024

Copy link
Copy Markdown
MemberAuthor

PR updated to show what I mean...

Comment threadPWGJE/Core/JetFinder.h Outdated
@qgp

qgp commented Feb 14, 2024

Copy link
Copy Markdown
Contributor

Sorry, then I missed your point before. Indeed, I discussed this with Nima and we deliberately chose to initialise the ghost<sth> with fixed values and not derive them from the constituent limits. I should have mentioned this in my PR, sorry for the omission.

@ktfktf closed this Feb 14, 2024
@ktf

ktf commented Feb 14, 2024

Copy link
Copy Markdown
MemberAuthor

Ok, fair enough. Thank you for understanding the original issue!

@ktf
ktf deleted the aggregate-jet-init branch February 14, 2024 08:58
Sign up for freeto 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.

2 participants

@ktf@qgp