Skip to content

Getting the reco efficiency

jdkio edited this page Sep 9, 2024 · 1 revision

Reco efficiency for tracks is defined as

(Number of special tracks reconstructed) divided by (Total number of special tracks)

By "Special tracks", we mean tracks that match whatever truth cuts we care about. TMS's primary purpose is LAr's muon spectrometer. We can define these cuts for TMS's primary purpose

  • The track is a muon
  • The track started in the LAr
  • The track started at least 30cm from the edge of the LAr to account for hadron containment
  • The track ended in TMS

Other "special track" (aka truth cuts) are possible. One can also add cuts to the numerator. For example, one might change to tracks which were reconstructed and have the correct charge ID to get a better idea of the true reco eff given that we want charge id.

Spills vs time slices

The time slicer takes all the hits in a spill, and spilts them into time slices based on a simple peak detection algorithm, see slide 12 of this talk. The reconstruction can then run on each slice and ignore hits which were likely caused by other neutrino interactions.

Because of this, the output of the dune-tms code is actually per time slice rather than per spill. So each spill has multiple entries in the Reco_Tree, Truth_Info, and Line_Candidates ttrees (Truth_Spill is per spill).

However, the truth info contains all the true particles per spill rather than per time slice. This is because it's difficult to separate the truth info per time slice since there can be overlap.

Because of this, we need to take special care making the reco eff plots. When filling the denominator, only fill once per spill. One can do this in two ways

  1. Fill the denominator using the Truth_Spill ttree. It only has one event per spill so you won't have issues.
  2. When filling the denominator, only fill if the spill number has changed

In the case of option 2,

     if (last_spill_seen != reco.SpillNo) {
        last_spill_seen = reco.SpillNo;
        n_spills_filled += 1;
        // Fill denominator here

You can check and the total number of events with such a guard will equal the number of spills in Truth_Spill.

n_spills_filled: 135
Truth_Spill->GetEntries()
(long long) 135
Clone this wiki locally