Skip to content

PWGHF: Add finding leading particle in correlatorD0Hadrons - #4962

Merged
vkucera merged 29 commits into
AliceO2Group:masterfrom
1481014945:master
Apr 25, 2024
Merged

PWGHF: Add finding leading particle in correlatorD0Hadrons#4962
vkucera merged 29 commits into
AliceO2Group:masterfrom
1481014945:master

Conversation

@1481014945

Copy link
Copy Markdown
Contributor

Dear, experts
I am a newcomer.I'm sorry to bother you again. I'm Xu wang. I come from China. My email is wangxuwx@mails.ccnu.edu.cn.
I want to start my job at PWGHF regarding the D0 meson.The subsequent tasks will also be carried out in this document.
I want to go the correlation analysis of D0 and other hadrons with Pt>1. Then, based on the delta phi, divide it into three regions, labeled as forward, backward, and underlying. Finally, investigate the D0 mesons separately in each of these three regions.

@vkucera

vkucera commented Mar 3, 2024

Copy link
Copy Markdown
Collaborator

Hi Xu, please get familiar with the contribution guidelines:

In particular, pay attention to the conventions on naming, documentation and code organisation.

If you need to change something in your PR, please do not close it, especially if there have already been comments/reviews. Creating a new PR from the same branch is just making another PR identical to the old one. You can edit the title of the PR, edit your comments and push further commits in your branch. Please do not force push which overwrites the PR commit history.

@1481014945 1481014945 reopened this Mar 12, 2024
@fgrosa

fgrosa commented Mar 13, 2024

Copy link
Copy Markdown
Collaborator

Hi @1481014945, sorry if I did not see before this PR. I was however wondering whether what you aim to do cannot be done already with this task

struct HfCorrelatorD0HadronsSelection {
. Did you discuss with the HFC coordinators (@mmazzilli @deepathoms) about this?

@1481014945

1481014945 commented Mar 14, 2024

Copy link
Copy Markdown
Contributor Author

Hi @1481014945, sorry if I did not see before this PR. I was however wondering whether what you aim to do cannot be done already with this task

struct HfCorrelatorD0HadronsSelection {

. Did you discuss with the HFC coordinators (@mmazzilli @deepathoms) about this?

Thank you for your reply. Sorry, I am a newcomer and I am not very clear about this process. I will try to do it next.
I want to search for the hadrons with the higher Pt, then use that hadrons as the leading particle. Afterwards, calculate delta phi and delta eta between the selected D0 and it. Based on the difference in delta phi, divide it into forward, backward, and underlying regions. Based on this information, could you provide me with some advice?

@fgrosa

fgrosa commented Mar 14, 2024

Copy link
Copy Markdown
Collaborator

Hi @1481014945, sorry if I did not see before this PR. I was however wondering whether what you aim to do cannot be done already with this task

struct HfCorrelatorD0HadronsSelection {

. Did you discuss with the HFC coordinators (@mmazzilli @deepathoms) about this?

Thank you for your reply. Sorry, I am a newcomer and I am not very clear about this process. I will try to do it next. I want to search for the hadrons with the higher Pt, then use that hadrons as the leading particle. Afterwards, calculate delta phi and delta eta between the selected D0 and it. Based on the difference in delta phi, divide it into forward, backward, and underlying regions. Based on this information, could you provide me with some advice?

Indeed what you want to do is slightly different than what done in the task I sent you, however it would be enough in my opinion to add an option to compute correlations with respect to the leading particle instead of all the hadrons in the already existing code. However, I would like to also hear the opinion of the PAG coordinators (and @fcolamar who is more expert than me in correlations ;))

@mmazzilli

Copy link
Copy Markdown
Collaborator

Hi @1481014945, sorry if I did not see before this PR. I was however wondering whether what you aim to do cannot be done already with this task

struct HfCorrelatorD0HadronsSelection {

. Did you discuss with the HFC coordinators (@mmazzilli @deepathoms) about this?

Thank you for your reply. Sorry, I am a newcomer and I am not very clear about this process. I will try to do it next. I want to search for the hadrons with the higher Pt, then use that hadrons as the leading particle. Afterwards, calculate delta phi and delta eta between the selected D0 and it. Based on the difference in delta phi, divide it into forward, backward, and underlying regions. Based on this information, could you provide me with some advice?

Indeed what you want to do is slightly different than what done in the task I sent you, however it would be enough in my opinion to add an option to compute correlations with respect to the leading particle instead of all the hadrons in the already existing code. However, I would like to also hear the opinion of the PAG coordinators (and @fcolamar who is more expert than me in correlations ;))

Ciao @fgrosa, me and @deepathoms were discussing this topic with @1481014945 via mail. We indeed pointed him already to the existing tasks and we asked more information about the final observable he is interesting in looking at (as this was not fully clear to me, al least). We hope to have soon the opportunity to discuss deeper the analysis details!

@vkucera

vkucera commented Mar 14, 2024

Copy link
Copy Markdown
Collaborator

Moving to draft while discussion with PAG coordinators is ongoing.

@vkucera
vkucera marked this pull request as draft March 14, 2024 10:37
@1481014945

Copy link
Copy Markdown
Contributor Author

Hi @1481014945, sorry if I did not see before this PR. I was however wondering whether what you aim to do cannot be done already with this task

struct HfCorrelatorD0HadronsSelection {

. Did you discuss with the HFC coordinators (@mmazzilli @deepathoms) about this?

Thank you for your reply. Sorry, I am a newcomer and I am not very clear about this process. I will try to do it next. I want to search for the hadrons with the higher Pt, then use that hadrons as the leading particle. Afterwards, calculate delta phi and delta eta between the selected D0 and it. Based on the difference in delta phi, divide it into forward, backward, and underlying regions. Based on this information, could you provide me with some advice?

Indeed what you want to do is slightly different than what done in the task I sent you, however it would be enough in my opinion to add an option to compute correlations with respect to the leading particle instead of all the hadrons in the already existing code. However, I would like to also hear the opinion of the PAG coordinators (and @fcolamar who is more expert than me in correlations ;))

Ciao @fgrosa, me and @deepathoms were discussing this topic with @1481014945 via mail. We indeed pointed him already to the existing tasks and we asked more information about the final observable he is interesting in looking at (as this was not fully clear to me, al least). We hope to have soon the opportunity to discuss deeper the analysis details!

Thank you for your reply.I think that D0hadrons and hadronsD0 are different. In lines 299 and 344 of the code above, it can be seen that D0 is looped over first, and then the tracks are looped over. However, for hadronsD0, the intention is to loop over tracks first and then loop over D0. Based on this information, could you provide me with some advice?

@fgrosa

fgrosa commented Mar 15, 2024

Copy link
Copy Markdown
Collaborator

Hi @1481014945, sorry if I did not see before this PR. I was however wondering whether what you aim to do cannot be done already with this task

struct HfCorrelatorD0HadronsSelection {

. Did you discuss with the HFC coordinators (@mmazzilli @deepathoms) about this?

Thank you for your reply. Sorry, I am a newcomer and I am not very clear about this process. I will try to do it next. I want to search for the hadrons with the higher Pt, then use that hadrons as the leading particle. Afterwards, calculate delta phi and delta eta between the selected D0 and it. Based on the difference in delta phi, divide it into forward, backward, and underlying regions. Based on this information, could you provide me with some advice?

Indeed what you want to do is slightly different than what done in the task I sent you, however it would be enough in my opinion to add an option to compute correlations with respect to the leading particle instead of all the hadrons in the already existing code. However, I would like to also hear the opinion of the PAG coordinators (and @fcolamar who is more expert than me in correlations ;))

Ciao @fgrosa, me and @deepathoms were discussing this topic with @1481014945 via mail. We indeed pointed him already to the existing tasks and we asked more information about the final observable he is interesting in looking at (as this was not fully clear to me, al least). We hope to have soon the opportunity to discuss deeper the analysis details!

Thank you for your reply.I think that D0hadrons and hadronsD0 are different. In lines 299 and 344 of the code above, it can be seen that D0 is looped over first, and then the tracks are looped over. However, for hadronsD0, the intention is to loop over tracks first and then loop over D0. Based on this information, could you provide me with some advice?

Hi @1481014945. In general I do not think that looping first on the tracks is good. In fact, if you do so you cannot check that the leading particle that you select is not a D0 daughter (and correlating a D0 with one of its daughters does not make much sense).

@1481014945

Copy link
Copy Markdown
Contributor Author

Hi @1481014945, sorry if I did not see before this PR. I was however wondering whether what you aim to do cannot be done already with this task

struct HfCorrelatorD0HadronsSelection {

. Did you discuss with the HFC coordinators (@mmazzilli @deepathoms) about this?

Thank you for your reply. Sorry, I am a newcomer and I am not very clear about this process. I will try to do it next. I want to search for the hadrons with the higher Pt, then use that hadrons as the leading particle. Afterwards, calculate delta phi and delta eta between the selected D0 and it. Based on the difference in delta phi, divide it into forward, backward, and underlying regions. Based on this information, could you provide me with some advice?

Indeed what you want to do is slightly different than what done in the task I sent you, however it would be enough in my opinion to add an option to compute correlations with respect to the leading particle instead of all the hadrons in the already existing code. However, I would like to also hear the opinion of the PAG coordinators (and @fcolamar who is more expert than me in correlations ;))

Ciao @fgrosa, me and @deepathoms were discussing this topic with @1481014945 via mail. We indeed pointed him already to the existing tasks and we asked more information about the final observable he is interesting in looking at (as this was not fully clear to me, al least). We hope to have soon the opportunity to discuss deeper the analysis details!

Thank you for your reply.I think that D0hadrons and hadronsD0 are different. In lines 299 and 344 of the code above, it can be seen that D0 is looped over first, and then the tracks are looped over. However, for hadronsD0, the intention is to loop over tracks first and then loop over D0. Based on this information, could you provide me with some advice?

Hi @1481014945. In general I do not think that looping first on the tracks is good. In fact, if you do so you cannot check that the leading particle that you select is not a D0 daughter (and correlating a D0 with one of its daughters does not make much sense).

1263e690330f60e0973da65ecc1f277e

Can't we skip the correlation between D0 daughters and D0 using a similar approach?

@fgrosa

fgrosa commented Mar 18, 2024

Copy link
Copy Markdown
Collaborator

Hi @1481014945, sorry if I did not see before this PR. I was however wondering whether what you aim to do cannot be done already with this task

struct HfCorrelatorD0HadronsSelection {

. Did you discuss with the HFC coordinators (@mmazzilli @deepathoms) about this?

Thank you for your reply. Sorry, I am a newcomer and I am not very clear about this process. I will try to do it next. I want to search for the hadrons with the higher Pt, then use that hadrons as the leading particle. Afterwards, calculate delta phi and delta eta between the selected D0 and it. Based on the difference in delta phi, divide it into forward, backward, and underlying regions. Based on this information, could you provide me with some advice?

Indeed what you want to do is slightly different than what done in the task I sent you, however it would be enough in my opinion to add an option to compute correlations with respect to the leading particle instead of all the hadrons in the already existing code. However, I would like to also hear the opinion of the PAG coordinators (and @fcolamar who is more expert than me in correlations ;))

Ciao @fgrosa, me and @deepathoms were discussing this topic with @1481014945 via mail. We indeed pointed him already to the existing tasks and we asked more information about the final observable he is interesting in looking at (as this was not fully clear to me, al least). We hope to have soon the opportunity to discuss deeper the analysis details!

Thank you for your reply.I think that D0hadrons and hadronsD0 are different. In lines 299 and 344 of the code above, it can be seen that D0 is looped over first, and then the tracks are looped over. However, for hadronsD0, the intention is to loop over tracks first and then loop over D0. Based on this information, could you provide me with some advice?

Hi @1481014945. In general I do not think that looping first on the tracks is good. In fact, if you do so you cannot check that the leading particle that you select is not a D0 daughter (and correlating a D0 with one of its daughters does not make much sense).

1263e690330f60e0973da65ecc1f277e

Can't we skip the correlation between D0 daughters and D0 using a similar approach?

Technically yes, but if I properly understood what you aim to do, the principle is very different. In the example you reported, we reject DD pairs when they share a daughter track because we are sure that one of the two is background.

If I understood properly instead, you want to use the leading pT particle as proxy of the jet direction and measure the yield in the forward, backward and transverse regions. So, In the case that the leading pT particle is the D0 daughter (and I guess it's in a large fraction of the events with a D0), then you propose to simply skip the D0. However this creates a bias because by construction you reject many D0 mesons in the forward region.
I would suggest to discuss it briefly in the HFC PAG before going on with the implementation. You can maybe prepare 1-2 slides with Physics motivation and how you technically implement it to have a more efficient discussion. Thanks a lot!

@1481014945

Copy link
Copy Markdown
Contributor Author

Hi @1481014945, sorry if I did not see before this PR. I was however wondering whether what you aim to do cannot be done already with this task

struct HfCorrelatorD0HadronsSelection {

. Did you discuss with the HFC coordinators (@mmazzilli @deepathoms) about this?

Thank you for your reply. Sorry, I am a newcomer and I am not very clear about this process. I will try to do it next. I want to search for the hadrons with the higher Pt, then use that hadrons as the leading particle. Afterwards, calculate delta phi and delta eta between the selected D0 and it. Based on the difference in delta phi, divide it into forward, backward, and underlying regions. Based on this information, could you provide me with some advice?

Indeed what you want to do is slightly different than what done in the task I sent you, however it would be enough in my opinion to add an option to compute correlations with respect to the leading particle instead of all the hadrons in the already existing code. However, I would like to also hear the opinion of the PAG coordinators (and @fcolamar who is more expert than me in correlations ;))

Ciao @fgrosa, me and @deepathoms were discussing this topic with @1481014945 via mail. We indeed pointed him already to the existing tasks and we asked more information about the final observable he is interesting in looking at (as this was not fully clear to me, al least). We hope to have soon the opportunity to discuss deeper the analysis details!

Thank you for your reply.I think that D0hadrons and hadronsD0 are different. In lines 299 and 344 of the code above, it can be seen that D0 is looped over first, and then the tracks are looped over. However, for hadronsD0, the intention is to loop over tracks first and then loop over D0. Based on this information, could you provide me with some advice?

Hi @1481014945. In general I do not think that looping first on the tracks is good. In fact, if you do so you cannot check that the leading particle that you select is not a D0 daughter (and correlating a D0 with one of its daughters does not make much sense).

1263e690330f60e0973da65ecc1f277e
Can't we skip the correlation between D0 daughters and D0 using a similar approach?

Technically yes, but if I properly understood what you aim to do, the principle is very different. In the example you reported, we reject DD pairs when they share a daughter track because we are sure that one of the two is background.

If I understood properly instead, you want to use the leading pT particle as proxy of the jet direction and measure the yield in the forward, backward and transverse regions. So, In the case that the leading pT particle is the D0 daughter (and I guess it's in a large fraction of the events with a D0), then you propose to simply skip the D0. However this creates a bias because by construction you reject many D0 mesons in the forward region. I would suggest to discuss it briefly in the HFC PAG before going on with the implementation. You can maybe prepare 1-2 slides with Physics motivation and how you technically implement it to have a more efficient discussion. Thanks a lot!

For this issue, I consulted my supervisor, and he said this's a good point, indeed. But a leading particle from heavy flavor decay should be fine. We should not reject the D0 if it is a daughter of the leading particle as it is assumed from hard processes. Regarding the slice, I am currently attempting to work on it.

@fgrosa

fgrosa commented Mar 25, 2024

Copy link
Copy Markdown
Collaborator

Hi @1481014945, sorry if I did not see before this PR. I was however wondering whether what you aim to do cannot be done already with this task

struct HfCorrelatorD0HadronsSelection {

. Did you discuss with the HFC coordinators (@mmazzilli @deepathoms) about this?

Thank you for your reply. Sorry, I am a newcomer and I am not very clear about this process. I will try to do it next. I want to search for the hadrons with the higher Pt, then use that hadrons as the leading particle. Afterwards, calculate delta phi and delta eta between the selected D0 and it. Based on the difference in delta phi, divide it into forward, backward, and underlying regions. Based on this information, could you provide me with some advice?

Indeed what you want to do is slightly different than what done in the task I sent you, however it would be enough in my opinion to add an option to compute correlations with respect to the leading particle instead of all the hadrons in the already existing code. However, I would like to also hear the opinion of the PAG coordinators (and @fcolamar who is more expert than me in correlations ;))

Ciao @fgrosa, me and @deepathoms were discussing this topic with @1481014945 via mail. We indeed pointed him already to the existing tasks and we asked more information about the final observable he is interesting in looking at (as this was not fully clear to me, al least). We hope to have soon the opportunity to discuss deeper the analysis details!

Thank you for your reply.I think that D0hadrons and hadronsD0 are different. In lines 299 and 344 of the code above, it can be seen that D0 is looped over first, and then the tracks are looped over. However, for hadronsD0, the intention is to loop over tracks first and then loop over D0. Based on this information, could you provide me with some advice?

Hi @1481014945. In general I do not think that looping first on the tracks is good. In fact, if you do so you cannot check that the leading particle that you select is not a D0 daughter (and correlating a D0 with one of its daughters does not make much sense).

1263e690330f60e0973da65ecc1f277e
Can't we skip the correlation between D0 daughters and D0 using a similar approach?

Technically yes, but if I properly understood what you aim to do, the principle is very different. In the example you reported, we reject DD pairs when they share a daughter track because we are sure that one of the two is background.
If I understood properly instead, you want to use the leading pT particle as proxy of the jet direction and measure the yield in the forward, backward and transverse regions. So, In the case that the leading pT particle is the D0 daughter (and I guess it's in a large fraction of the events with a D0), then you propose to simply skip the D0. However this creates a bias because by construction you reject many D0 mesons in the forward region. I would suggest to discuss it briefly in the HFC PAG before going on with the implementation. You can maybe prepare 1-2 slides with Physics motivation and how you technically implement it to have a more efficient discussion. Thanks a lot!

For this issue, I consulted my supervisor, and he said this's a good point, indeed. But a leading particle from heavy flavor decay should be fine. We should not reject the D0 if it is a daughter of the leading particle as it is assumed from hard processes. Regarding the slice, I am currently attempting to work on it.

Hi @1481014945, without considering the concerns about the analysis (which we discussed today in HFC), for what concerns the code, I would suggest you to define a function that does this in the existing code (https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/HFC/TableProducer/correlatorD0Hadrons.cxx) and it returns the index of the leading-pT track, which is executed only in case a configurable is set as true. Then, if enabled via this configurable, for each D0 candidate, you skip all the tracks that have a different index. This allows you to essentially re-use the existing code for your analysis. Let me know if this makes sense to you!

@1481014945
1481014945 marked this pull request as ready for review April 23, 2024 00:36
@1481014945
1481014945 requested a review from hahassan7 as a code owner April 23, 2024 00:36

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

Your last commit e6d7ac5 reverts recent fixes. Please fix that. How did you make that commit?

@vkucera vkucera changed the title PWGHF Add finding leading particle PWGHF: Add finding leading particle in correlatorD0Hadrons Apr 23, 2024
@vkucera

vkucera commented Apr 23, 2024

Copy link
Copy Markdown
Collaborator

As a general advice, please dedicate some time to learning basic Git commands and using GitHub. You can find links to some materials in the official documentation of the O2 analysis framework.

fgrosa
fgrosa previously approved these changes Apr 23, 2024
@fgrosa

fgrosa commented Apr 23, 2024

Copy link
Copy Markdown
Collaborator

Hi @1481014945 the latest implementation looks good to me, thanks! It seems to me that also the reverted fix pointed out by @vkucera has been now corrected (but I let him cross check to be sure).

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

Minor change, otherwise looks good.

Comment thread PWGHF/HFC/TableProducer/correlatorD0Hadrons.cxx Outdated
@1481014945
1481014945 requested a review from vkucera April 25, 2024 04:55
@1481014945

Copy link
Copy Markdown
Contributor Author

Regarding the minor issue you mentioned, I have already made the changes. Are there any other issues?

@fgrosa

fgrosa commented Apr 25, 2024

Copy link
Copy Markdown
Collaborator

Hi @vkucera, if it looks good also to you I would say that we can merge it (you just also need to approve, otherwise we cannot merge it). Thanks!

@vkucera
vkucera enabled auto-merge (squash) April 25, 2024 14:57
@vkucera
vkucera merged commit 1115b33 into AliceO2Group:master Apr 25, 2024
christianreckziegel pushed a commit to christianreckziegel/O2Physics that referenced this pull request May 2, 2024
hahassan7 pushed a commit to hahassan7/O2Physics that referenced this pull request May 17, 2024
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.

4 participants