DeepLearnPhysics / lartpc_mlreco3d

9 stars 32 forks source link

Fix bug in csv logging and simplify bayes estimator tool #155

Closed dkoh0207 closed 11 months ago

dkoh0207 commented 11 months ago

Fixed an issue in which the csv logger using MC truth information TruthInteraction.truth_primary_counts rather than TruthInteraction.primary_counts for counting TruthInteraction primary particles.

In particular, when using analysis.producers.scripts to log information to csvs, using the old behavior will have the following effect:

The fix will separate truth_primary_counts from primary_counts as the following:

scripts:
  run_bidirectional_inference:
    logger:
      append: False
      particles:
        ...
      interactions:
        - id
        - size
        - nu_id
        - volume_id
        - count_primary_particles
        - count_truth_primary_particles

Here, any changes to the visible topology from applying cuts (adjust_interaction_topology) will be applied to count_primary_particles, whereas count_truth_primary_particles will always log MC truth information.