[PWGLF] Added derived generated MC process#15089
[PWGLF] Added derived generated MC process#15089nkaratze wants to merge 2 commits intoAliceO2Group:masterAliceO2Group/O2Physics:masterfrom
Conversation
| soa::Join<aod::V0CollRefs, aod::V0Cores, aod::V0Extras, aod::V0CoreMCLabels, aod::V0MCMothers> const& V0s, | ||
| DaughterTracksDerived const&) | ||
| void recMCProcessDerived( | ||
| soa::Join<aod::StraCollisions, aod::StraEvSels, aod::StraCollLabels, aod::StraCents, aod::StraMCCollMults>::iterator const& collision, |
There was a problem hiding this comment.
Unfortunately, this will not work because StraMCCollMults is not joinable with StraCollisions
| DaughterTracksDerived const&) | ||
| void recMCProcessDerived( | ||
| soa::Join<aod::StraCollisions, aod::StraEvSels, aod::StraCollLabels, aod::StraCents, aod::StraMCCollMults>::iterator const& collision, | ||
| soa::Join<aod::V0CollRefs, aod::V0MCCores, aod::V0Datas, aod::V0Extras, aod::V0CoreMCLabels, aod::V0MCMothers> const& V0s, |
There was a problem hiding this comment.
V0Datas is a joined table of 3 tables. In particular, it is a joined table of V0Cores and V0Indices. However, we don't store V0Indices. Instead of subscribing to V0Datas, you should subscribe to V0Cores
| // This si the process for the MC generated derived data | ||
| void genMCProcessDerived( | ||
| // soa::Join<aod::StraMcCollisions, aod::StraMcCents>::iterator const& mcCollision, will include when table is available in the O2 framework | ||
| soa::Join<aod::StraMCCollisions, aod::StraCents, aod::StraMCCollMults>::iterator const& mcCollision, |
There was a problem hiding this comment.
Similarly, StraCents is not joinable with StraMCCollisions
| rMCCorrections.fill(HIST("hNEvents_Corrections"), 1.5, mcCollision.centFT0M()); // Event Efficiency Denominator | ||
| // Particles (of interest) Generated Pt Spectrum and Signal Loss Denominator Loop | ||
| for (const auto& v0 : V0s) { | ||
| if (v0.has_v0MCCore()) { |
There was a problem hiding this comment.
Maybe you should change the table subscription because V0s corresponds to the joined table of V0MCCores and V0CoreMCLabels (--> which is an interlink table in order to refer a V0Cores entry to a V0MCCores entry). However, there is no point to check if v0.has_v0MCCore() since v0 is already an entry of V0MCCores.
Instead, you should maybe switch to a table subscription to V0MCCores
| for (const auto& collision : collisions) { | ||
| rMCCorrections.fill(HIST("hNEvents_Corrections"), 2.5, mcCollision.centFT0M()); // Number of Events Reconsctructed | ||
| if (!acceptEvent(collision)) { // Event Selection | ||
| return; |
There was a problem hiding this comment.
This should be a continue instead of return, no?
| } | ||
| rMCCorrections.fill(HIST("hNEvents_Corrections"), 3.5, mcCollision.centFT0M()); // Event Split Denomimator and Event Efficiency Numenator | ||
| for (const auto& v0 : V0s) { | ||
| if (v0.has_v0MCCore()) { |
There was a problem hiding this comment.
Same comment as before on the table subscription
No description provided.