[PWGLF] Added derived process for Data and MC-Reco#14186
[PWGLF] Added derived process for Data and MC-Reco#14186nkaratze wants to merge 3 commits intoAliceO2Group:masterfrom
Conversation
|
O2 linter results: ❌ 1 errors, |
| // This is the process for Real Data | ||
| void dataProcess(soa::Join<aod::Collisions, aod::EvSels, aod::PVMults, aod::CentFT0Ms /*,aod::CentNGlobals*/>::iterator const& collision, | ||
| void dataProcess(soa::Join<aod::StraCollisions, aod::StraEvSels, aod::PVMults, aod::CentFT0Ms /*,aod::CentNGlobals*/>::iterator const& collision, | ||
| aod::V0Datas const& V0s, |
There was a problem hiding this comment.
Similarly, the subscription to aod::V0Datas will not work because V0Datas = soa::Join<V0Indices, V0TrackXs, V0Cores>; and the tables aod::V0Indices and aod::V0TrackXs are not stored in derived data. That's why we only subscribe to aod::V0CollRefs, aod::V0Cores, aod::V0Extras> (aod::V0CollRefs which stores the index to aod::StraCollisions and aod::V0Extras which stores the index to the daughter track extra table, aod::DauTrackExtras, containing the detector information of the track)
In the similar fashion, the DaughterTracks table subscription needs to be changed to soa::Join<aod::DauTrackExtras, aod::DauTrackTPCPIDs>.
| } | ||
| } | ||
| // This is the process for Real Derived Data | ||
| void dataProcessDerived(soa::Join<aod::StraCollisions, aod::StraEvSels, aod::PVMults, aod::CentFT0Ms /*,aod::CentNGlobals*/>::iterator const& collision, |
There was a problem hiding this comment.
Same comment as for the previous process function
| } | ||
| } | ||
| } | ||
| // This is the Process for the MC reconstructed Data |
There was a problem hiding this comment.
Same comments as previously
Here for the MC information, it is a bit particular as we do not save the table aod::McParticles containing all generated particles. Instead, we save only the V0 and cascade generated information stored in aod::V0MCCores and aod::CascMCCores.
The interlink table aod::V0Cores <-> aod::V0MCCores is not aod::McV0Labels but aod::V0CoreMCLabels
Similarly, aod::McCollisionLabels becomes aod::StraCollLabels and you should uncomment the subscription to the McCollisions (which also need to be changed for derived data)
| } | ||
| // K0sh Signla Split Numerator End | ||
| if (v0.has_mcParticle()) { | ||
| auto v0mcParticle = v0.mcParticle(); |
There was a problem hiding this comment.
Since the aod::McParticles table is not saved in the derived data, the logic has to be slightly changed.
Instead of checking whether the v0 has a mcparticle, we need now to check that it has a V0MCCorewith v0.has_v0MCCore()
To access information about the mother of the V0, we need to subscribe to a new table called aod::MotherMCParts containing the kinematics of the mother particle, as well as the PDG code and whether it is primary or not. These information are accessible by adding a subscription to the v0 table, aod::V0MCMothers.
The code should then look something like:
if (v0.has_v0MCCore()) {
auto v0mcParticle = v0.v0MCCore_as<aod::V0MCCores>();
if (dotruthk0sh && (v0mcParticle.pdgCode() == kK0Short)) { // kzero matched
if (v0mcParticle.isPhysicalPrimary()) {
for (int i = 0; i < nKaonHistograms; i++) {
if (kaonptedgevalues[i] <= v0.pt() && v0.pt() < kaonptedgevalues[i + 1]) { // finding v0s with pt within the range of our bin edges
pthistos::kaonPt[i]->Fill(v0.mK0Short(), collision.centFT0M()); // filling the k0s namespace histograms
}
}
} else {
if (v0.has_motherMCPart()) {
auto v0mother = v0.motherMCPart(); // Get mothers
rFeeddownMatrices.fill(HIST("hK0shFeeddownMatrix"), v0mcParticle.ptMC(), std::hypot(v0mother.px(), v0mother.py()), collision.centFT0M());
if (v0mother.pdgCode() == kPhi) { // Phi Mother Matched
rFeeddownMatrices.fill(HIST("hK0shPhiFeeddownMatrix"), v0mcParticle.ptMC(), std::hypot(v0mother.px(), v0mother.py()), collision.centFT0M());
}
}
}
}
}
|
@nkaratze Don't add the PR title prefix if you cannot do it correctly. |
|
@romainschotter Please convert a PR to a draft if you request major changes. Otherwise it's being recompiled for nothing. |
|
Error while checking build/O2Physics/o2 for fdac2f8 at 2025-12-29 19:30: Full log here. |
|
@nkaratze You are supposed to verify that your branch compiles without warnings before pushing it to GitHub. |
|
Apologies, I was fixing the errors and forgot the warnings, should be corrected now hopefully. |
No description provided.