Skip to content

DPL Analysis: Add TDatabasePDG as O2 Service - #6594

Closed
aalkin wants to merge 3 commits into
AliceO2Group:devfrom
aalkin:pdg-o2-service
Closed

DPL Analysis: Add TDatabasePDG as O2 Service#6594
aalkin wants to merge 3 commits into
AliceO2Group:devfrom
aalkin:pdg-o2-service

Conversation

@aalkin

@aalkin aalkin commented Jul 6, 2021

Copy link
Copy Markdown
Member

Basic version with a tutorial.

@aalkin
aalkin requested review from iarsene and jgrosseo as code owners July 6, 2021 08:53
jgrosseo
jgrosseo previously approved these changes Jul 6, 2021

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

Very good

@aalkin

aalkin commented Jul 7, 2021

Copy link
Copy Markdown
Member Author

@jgrosseo @pzhristov currently this will use ROOT's default text database, which is older and, for example, does not contain nuclei. We can add our own copy instead (maybe taken from the latest ROOT?) and use it to initialize the service.

@ktf

ktf commented Jul 12, 2021

Copy link
Copy Markdown
Member

As I side note, I would use the ServiceSpec API, not a singleton, which will cause issues with multithreading once we add it.

That said, at some point it was proposed to use a set of statically compiled constants. What is the advantage of being dynamic, given that in any case you can only load a single ROOT at the time, and therefore you will have a single file available in any case? On the other hand, if it needs to be dynamic, maybe the best solution is to fetch those values from CCDB, no?

@aalkin

aalkin commented Jul 12, 2021

Copy link
Copy Markdown
Member Author

@ktf even with ServiceSpec API, it would still be used with Service<> in the task itself, right? We can use this PR as is just to unblock analyses, that need to use it, and later improve the internals. We don't really have to use TDatabasePDG, of course (which is a singleton by itself), but it is familiar for the users. Using CCDB does not make a lot of sense, since the information is really static. I can try to implement something with TDatabasePDG interface, though.

@ktf

ktf commented Jul 12, 2021

Copy link
Copy Markdown
Member

Ok, but this still does not solve the issue with using those quantities in the filters, no? Maybe in the end generating a CXX file from TDatabasePDG is the solution which gives users a single way of referring to those.

@aalkin

aalkin commented Jul 12, 2021

Copy link
Copy Markdown
Member Author

I do not see how we can make it completely static and still have lookup-by-code. Something like a bunch of static arrays like float[] masses = {...}; int[] charges = {...}; and an index std::map<int,int> pdg_codes; for lookups?

@aalkin

aalkin commented Jul 30, 2021

Copy link
Copy Markdown
Member Author

Closing in favor of #6782

@aalkin aalkin closed this Jul 30, 2021
@aalkin
aalkin deleted the pdg-o2-service branch May 30, 2022 08:48
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.

3 participants