DUNE / dune-tms

DUNE ND Temporary Muon Spectrometer
0 stars 1 forks source link

Muon_TrueKE and Time Slicer don't play well together #42

Closed jdkio closed 3 months ago

jdkio commented 9 months ago

Truth_Info.Muon_TrueKE is used heavily by the reco scripts to decide whether an event has a true muon.

However, the time slicer breaks this variable because each slice doesn't carry forward the true muon information. This makes sense because with pileup, you won't always have a single muon in an event. So it makes more sense to associate truth information with each reconstructed track. But that's not ready.

That means there are two options: 1) If you want Muon_TrueKE, turn off time slicer in config/TMS_Default_Config.toml with RunTimeSlicer = false. 2) Run with time slicer on, but don't use Muon_TrueKE. This is difficult with the current reco scripts and will likely only happen once we have the truth info per reco track.

How to implement truth info per track: On Minerva, we had a way to store exactly how much energy each particle contributed to each true hit. Then we'd have another function to add all the energy sources for a vector of reco hits, ie a vector of hits from the reco track. Then you'd be able to find the particle with the highest contribution of energy of the track, and the second highest, etc. Usually we'd save the highest contributor, its energy and the percentage of energy this represented when you consider all sources. We also had data overlay, so we'd save how much energy was contributed from that. But in this case, we don't.

jdkio commented 3 months ago

This is fixed using the new truth info code

Truth_Info->Scan("Muon_TrueKE")
************************
*    Row   * Muon_True *
************************
*        0 * 128.72357 *
*        1 * 1315.2369 *
*        2 * -999.9899 *
*        3 * 656.28765 *
*        4 * -999.9899 *
*        5 * -999.9899 *