FairShip
Loading...
Searching...
No Matches
split_provenance Namespace Reference

Classes

class  SplitProvenance
class  Desplit

Variables

 NOT_SPLIT
 SURVIVOR
 DECAY
int K_NO_PROCESS = 44

Detailed Description

Provenance of split kaon/pion tracks: which tracks can exist together.

Splitting (exitHadronAbsorber, --kaon-pion-splits) replaces the decay of a
kaon or pion by weighted alternatives. They are mutually exclusive histories,
not particles that exist together, but in the MC track tree they look like
siblings of the split track. ShipMCTrack records them in split sets:

* every track created for one split track shares its split set
  (GetSplitSet(), -1 if none);
* the split track and its continuations are the survivor line
  (kSplitSurvivor), the clones each stand for one of its decays
  (kSplitDecay), with probability weight / GetSplitWeight();
* GetSplitWeight() is the weight of the split track before splitting.

Single-particle quantities need none of this: sum weights as usual. Anything
that combines several tracks of an event does:

* compatible(i, j): can tracks i and j exist in the same real event? Two
  different decay alternatives of one set cannot. A decay at time t and a
  track that left the survivor line at time t' can only if t' < t.
* pair_weight(i, j): the weight that makes pair observables unbiased,
  w_i w_j / w_a, where w_a is the weight of the line at the point where the
  two tracks part. It is 0 for incompatible pairs.
* desplit(rng): draw one outcome per split set with the right probabilities
  and return which tracks exist in that analog-like event. Each kept track
  then stands for the event with the weight of its primary. Useful for
  multiplicities, coincidences, triggers and occupancy, which weights cannot
  describe.

The weights of a survivor line's secondaries must be the line's weight when
they were created. Times are the start times of the tracks (ns).

A minimal example::

    prov = SplitProvenance.from_tracks(event.MCTrack)
    w = prov.pair_weight(mu1, mu2)          # 0 if the muons are alternatives
    keep = prov.desplit(rng).keeps_track    # analog-like selection of tracks

Variable Documentation

◆ DECAY

split_provenance.DECAY

Definition at line 48 of file split_provenance.py.

◆ K_NO_PROCESS

int split_provenance.K_NO_PROCESS = 44

Definition at line 49 of file split_provenance.py.

◆ NOT_SPLIT

split_provenance.NOT_SPLIT

Definition at line 48 of file split_provenance.py.

◆ SURVIVOR

split_provenance.SURVIVOR

Definition at line 48 of file split_provenance.py.