This routine finds the true flavour of the jets. The true flavour is found by following the decay chain of the heavy flavour particles in the event. The jet that includes the majority of the decay-products of a given h.f. particle (the 'Majority jet' ) is assigned JETFL1 = flavour-code of the heaviest quark in the particle (c=4,b=5). If the decay products of a given h.f. were split in several jets, the jet with second most products (the 'Runner-up jet') will get JETFL2 = flavour-code of the heaviest quark in the particle.
If there were no h.f. products in the jet, or only products from a decay that gave more tracks in an other jet, JETFL1 = 1. (in the second case, then, JETFL2 0, in the first, = 0)
JETFL1 : 'Majority jet' flavour. JETFL2 : 'Runner-up jet' flavour.
From /ZAEVT/ : MTRK, the total number of seen tracks; NJET, the number of jets. From /ZATRS/ : JETNB, jet number of tracks; ANC, ancestor number of tracks; CL, history class of track; TRACK, the current track number, is used locally.
To /ZXSPL/ : NBHAD, number of b-hadrons in event; NCHAD, number of c-hadrons in event; SPLIT, counters of different types of cases when h.f. decays have been split in several jets.