Skip to content

Conversation

@sam-grant
Copy link
Contributor

tnct.ntrk: a counter for distinct tracks

Note: Not sure if this works consistently, sometimes you get unlucky.

The event-level tcnt branch is "MARKED FOR REMOVAL", but a counter for the number of distinct tracks (not hypotheses) would be very useful for signal-like event selection.

Example: An event containing a reflected track produced by a cosmic muon

Subrun 27992 event 280437 in the pure CRY MDC202aw dataset. This event has two distinct track "legs": an upstream muon fit and a downstream electron fit. The types of events are distinct from those which have multiple fit hypotheses to the same physical track.

Signal-like events do not look like this, they have a single track, so we need a way to filter these types of events.

reflection

This event has track PDGs [11, -11, 13, 13], which has a duplicate fit hypothesis.

Strategy: count unique PDGs

Each track gets four fit hypotheses: [e-, e+, mu-, mu+]:

trk.pdg: [-11, 11, -13, 13]

Each hypothesis is stored in EventNtuple if the fit converges, so if the mu+ fit fails:

trk.pdg: [-11, 11, -13]

If there are multiple distinct tracks per event:

trk.pdg: [-11, 11, 11, -11, -13, 13, 13, -13]

We can simply count the maximum number of instances of a unique track PDG.

Demo

1 track

-------------------------------------------------------------------------------------
evt.event: 13046
evt.subrun: 24888
tcnt.ntrk: 1
trk.trk.pdg: [-11, 11, -13, 13]
-------------------------------------------------------------------------------------

2 tracks

-------------------------------------------------------------------------------------
evt.event: 14399
evt.subrun: 24888
tcnt.ntrk: 2
trk.trk.pdg: [-11, 11, 11, -11, -13, 13, 13, -13]
-------------------------------------------------------------------------------------

3 tracks

-------------------------------------------------------------------------------------
evt.event: 2009
evt.subrun: 24939
tcnt.ntrk: 3
trk.trk.pdg: [11, 11, 11, -11, -11, 13, 13, -13, -13]
-------------------------------------------------------------------------------------

4 tracks

-------------------------------------------------------------------------------------
evt.event: 472302
evt.subrun: 24888
tcnt.ntrk: 4
trk.trk.pdg: [-11, -11, -11, 11, -11, 11, -13, -13, 13, 13]
-------------------------------------------------------------------------------------

5 tracks

-------------------------------------------------------------------------------------
evt.event: 230379
evt.subrun: 25843
tcnt.ntrk: 5
trk.trk.pdg: [-11, -11, 11, 11, 11, 11, -11, 11, -11, -13, -13, 13, -13, 13, 13, 13, -13, 13]
-------------------------------------------------------------------------------------

Edge case

You could get unlucky and have unique PDGs by accident, although I have never seen this happen. I'm also not sure if there is a way around this.

Track 1: [-11, 11, -13]  (mu+ failed)
Track 2: [13]  (only mu+ converged)
Result: [-11, 11, -13, 13] (all unique)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant