Proton and pion candidates must be selected and saved with KVSAVE or KIDSAV before this code is reached (see 9.2.9).
IPROT = KPDIR ('P', KRECO) 10 IF (IPROT .NE. 0) THEN IPIPLU = KPDIR ('PI+', KRECO) 20 IF (IPIPLU .NE. 0) THEN IF (.NOT.XSAME(IPROT,IPIPLU)) THEN <--- important C ... analysis of the p pi+ system ... ENDIF IPIPLU = KFOLLO (IPIPLU) GO TO 20 ENDIF IPROT = KFOLLO (IPROT) GO TO 10 ENDIF
The logical function XSAME (see 8.1.7) tests whether the two contributing particles are based on different reconstructed objects or simply on different mass hypotheses of the same reconstructed object.