A loop runs over all pairs of tracks and finds the pair which has the smallest invariant mass M. If (M/EVIS)2 < YCUT, these 2 tracks are merged (i.e., 4-momenta added).
The loop is then rerun over the new list of tracks which has lost 2 particles and gained the merged pair. When no remaining pair has a low enough mass, the track list contains a set of merged tracks called jets.
Input arguments:
Results:
EXAMPLE:
DIMENSION LISTEJ(300) CHARACTER*13 CNAM C---Select option: charged tracks CALL QJOPTR('CH',' ') C---calculate visible energy from input tracks: EVISRE = 0. YCUT = 0.02 CALL QJMMCL(NJT,'MMCLUS_RE_vis',KRECO,YCUT,EVISRE) CNAM = 'MMCLUS_RE_vis' WRITE(KUPRNT,*)' # of jets reconstructed ', CNAM, ':', NJT IF(NJT.GT.0) THEN C--- get ALPHA number for first jet found: JJ = KPDIR(CNAM,KRECO) 20 IF(JJ .NE. 0) THEN C--- get the list of tracks merged into this jet: LL = 0 DO 211 L = KFCHT, KLCHT C--- check if this track belongs to this jet: IF(.NOT.XSAME(JJ,L)) GOTO 211 LL = LL + 1 LISTEJ(LL) = L 211 CONTINUE WRITE(KUPRNT,*) 'Jet # ', J WRITE(KUPRNT,*) QX(JJ),QY(JJ),QZ(JJ),QE(JJ) WRITE(KUPRNT,*) 'List of tracks merged into this jet:' WRITE(KUPRNT,*) (LISTEJ(L),L=1,LL) C--- get ALPHA number for next jet found: JJ = KFOLLO(JJ) GOTO 20 ENDIF ENDIF