[PWGJE] Add a new producer in PWGJE - #17400
Conversation
This commit introduces the QuarkGluonJetsProducer, which produces a self-contained quark/gluon jet ML skim from jet event data. It includes configurable parameters for event selections, jet properties, and particle identification methods.
|
O2 linter results: ❌ 1 errors, |
| } | ||
|
|
||
| DECLARE_SOA_TABLE(QGMLJets, "AOD", "QGMLJETS", | ||
| qgmljet::EventId, |
There was a problem hiding this comment.
why do you save event and jet Id? when the merger tool runs it will make these tables obsolete unless you use specific index coloumns. However in that case they should be pointing to other tables
| namespace qgmlconst | ||
| { | ||
| DECLARE_SOA_COLUMN(EventId, eventId, uint64_t); | ||
| DECLARE_SOA_COLUMN(JetId, jetId, uint64_t); |
There was a problem hiding this comment.
this should be an index coloumn pointing to the QGMLJets table
| return result; | ||
| } | ||
|
|
||
| int getJetMcCollisionId(ChargedMCDJets::iterator const& jet) |
There was a problem hiding this comment.
its better to instead do the following:
jet.collision_as().mcCollisionId()
instead of looping through tracks. Also in case of reassociation of track to events you might get a different collision Id
| static_cast<float>(dR), | ||
| jet.pt() > 0.f ? static_cast<float>(track.pt() / jet.pt()) : 0.f, | ||
| track.sign(), | ||
| static_cast<uint8_t>(passes), |
There was a problem hiding this comment.
why do you convert the bool to an int8 here? Also why even save the tracks that dont pass the track selection?
| track.hasTOF() ? static_cast<float>(track.tofNSigmaKa()) : missingTOF, | ||
| track.hasTOF() ? static_cast<float>(track.tofNSigmaPr()) : missingTOF, | ||
| track.hasTOF() ? static_cast<float>(track.beta()) : missingTOF, | ||
| static_cast<uint8_t>(pid.isPion), |
There was a problem hiding this comment.
why do you save both this and the tof Nsigma above?
There was a problem hiding this comment.
The foundation model I started working with uses these PID-derived features as inputs, so I initially wanted to preserve them in the producer. At the same time, I also wanted to keep the lower-level PID observables so I could later study which feature representation works best. However, I agree that the derived flags can be removed from the producer and recreated later in the data loader/preprocessing.
| } | ||
| } | ||
|
|
||
| qgMLJets( |
There was a problem hiding this comment.
write this table out before the track table so you can use its lastIndex() in the track table
|
Thanks for the PR @mulewicz . I have left some comments for you. Also does this build locally for you? I am surprised since the file is not appended with .cxx |
| WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) | ||
| { | ||
| return WorkflowSpec{ | ||
| adaptAnalysisTask<QuarkGluonJetsProducer>(cfgc, TaskName{"quark-gluon-jets-producer"})}; |
| COMPONENT_NAME Analysis) | ||
|
|
||
| o2physics_add_dpl_workflow(quark-gluon-jets-producer | ||
| SOURCES quarkGluonJetsProducer.cxx |
| DECLARE_SOA_COLUMN(NConstituents, nConstituents, int32_t); | ||
| } // namespace qgmljet | ||
|
|
||
| DECLARE_SOA_TABLE(QGMLJets, "AOD", "QGMLJETS", |
There was a problem hiding this comment.
this table does not have a self index coloumn
o2::soa::Index<>
I am not sure if its needed if you want to index on it or if its just needed for the globalIndex() call but add it anyways
|
Error while checking build/O2Physics/code-check for 3f54b4d at 2026-08-18 17:46: Full log here. |
|
@mulewicz Please fix the errors at your earliest convenience. |
The new producer will provide data to develop a machine learning jet tagger by fine-tuning the OmniLearn foundation model.