Repository navigation
[PWGHF] Adding option to include reconstructed rapidity in MC THnSparse in D2H/Tasks/taskDplus.cxx #18828
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
base: master
Are you sure you want to change the base?
[PWGHF] Adding option to include reconstructed rapidity in MC THnSparse in D2H/Tasks/taskDplus.cxx #18828
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,6 +81,7 @@ struct HfTaskDplus { | |
| Configurable<int> occEstimator{"occEstimator", 0, "Occupancy estimation (None: 0, ITS: 1, FT0C: 2)"}; | ||
| Configurable<std::vector<double>> binsPt{"binsPt", std::vector<double>{hf_cuts_dplus_to_pi_k_pi::vecBinsPt}, "pT bin limits"}; | ||
| Configurable<std::vector<int>> classMl{"classMl", {0, 1, 2}, "Indexes of ML scores to be stored. Three indexes max."}; | ||
| Configurable<bool> storeRecRapidity{"storeRecRapidity", false, "Flag to store rec. rapidity information in MC THnSparse"}; | ||
| Configurable<bool> storeCentrality{"storeCentrality", false, "Flag to store centrality information"}; | ||
| Configurable<bool> storeOccupancy{"storeOccupancy", false, "Flag to store occupancy information"}; | ||
| Configurable<bool> storeIR{"storeIR", false, "Flag to store interaction rate information"}; | ||
|
|
@@ -260,6 +261,10 @@ struct HfTaskDplus { | |
| axes.insert(axes.end(), {thnAxisMlScore0, thnAxisMlScore1, thnAxisMlScore2}); | ||
| axesFD.insert(axesFD.end(), {thnAxisMlScore0, thnAxisMlScore1, thnAxisMlScore2}); | ||
| } | ||
| if (storeRecRapidity) { | ||
| axes.push_back(thnAxisY); | ||
| axesFD.push_back(thnAxisY); | ||
| } | ||
| if (storeCentrality) { | ||
| axes.push_back(thnAxisCent); | ||
| axesFD.push_back(thnAxisCent); | ||
|
|
@@ -367,6 +372,8 @@ struct HfTaskDplus { | |
| registry.fill(HIST("hSparseMassPrompt"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2], occupancy); | ||
| } else if (!storeCentrality && !storeOccupancy && storePvContributors) { | ||
| registry.fill(HIST("hSparseMassPrompt"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2], numPvContributors); | ||
| } else if (!storeCentrality && !storeOccupancy && storeRecRapidity) { | ||
| registry.fill(HIST("hSparseMassPrompt"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2], HfHelper::yDplus(candidate)); | ||
|
Comment on lines
+375
to
+376
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you should in principle add all the combinations, in fact currently if a user enables rapidity the rapidity with other optional variables, it gives a runtime error (or you forbid the activation of rapidity with other optional variables, throwing a FATAL with a meaningful error message)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lmattei01, one more suggestion: you can pack all the values to be filled (depending on boolean configurables) to the vector and then call the |
||
| } else { | ||
| registry.fill(HIST("hSparseMassPrompt"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2]); | ||
| } | ||
|
|
@@ -381,6 +388,8 @@ struct HfTaskDplus { | |
| registry.fill(HIST("hSparseMassFD"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2], occupancy, ptbhad, flagBHad); | ||
| } else if (!storeCentrality && !storeOccupancy && storePvContributors) { | ||
| registry.fill(HIST("hSparseMassFD"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2], numPvContributors, ptbhad, flagBHad); | ||
| } else if (!storeCentrality && !storeOccupancy && storeRecRapidity) { | ||
| registry.fill(HIST("hSparseMassFD"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2], numPvContributors, ptbhad, flagBHad, HfHelper::yDplus(candidate)); | ||
| } else { | ||
| registry.fill(HIST("hSparseMassFD"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2], ptbhad, flagBHad); | ||
| } | ||
|
|
@@ -395,6 +404,8 @@ struct HfTaskDplus { | |
| registry.fill(HIST("hSparseMassBkg"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2], occupancy); | ||
| } else if (!storeCentrality && !storeOccupancy && storePvContributors) { | ||
| registry.fill(HIST("hSparseMassBkg"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2], numPvContributors); | ||
| } else if (!storeCentrality && !storeOccupancy && storeRecRapidity) { | ||
| registry.fill(HIST("hSparseMassBkg"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2], HfHelper::yDplus(candidate)); | ||
| } else { | ||
| registry.fill(HIST("hSparseMassBkg"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2]); | ||
| } | ||
|
|
@@ -409,6 +420,8 @@ struct HfTaskDplus { | |
| registry.fill(HIST("hSparseMassNotMatched"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2], occupancy); | ||
| } else if (!storeCentrality && !storeOccupancy && storePvContributors) { | ||
| registry.fill(HIST("hSparseMassNotMatched"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2], numPvContributors); | ||
| } else if (!storeCentrality && !storeOccupancy && storeRecRapidity) { | ||
| registry.fill(HIST("hSparseMassNotMatched"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2], HfHelper::yDplus(candidate)); | ||
| } else { | ||
| registry.fill(HIST("hSparseMassNotMatched"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2]); | ||
| } | ||
|
|
||
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.
I suggest you to put it at the end of all the configurable axes (after the other
if (store...)); this because other analysers expect axes in a given position, and adding this now might change the position of axes in the outputs, creating confusion in other analyses