subroutine make_kpi_list(ldedx, npi, listpi, nk, listk) c >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> C Make k, pi lists. c c Inputs: c ldedx logical variable c TRUE ==> use energy correction c FALSE ==> do not use energy correction c c Outputs: c npi integer variable c Number of pi's c c listpi integer array c List of KN track numbers for pi's c c nk integer variable c Number of K's c c listk integer array c List of KN track numbers for K's c >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> implicit none #include "seq/clinc/anlccd.inc" #include "seq/clinc/anlclev.inc" c Externals c Calling argument logical ldedx integer npi, listpi(*), nk, listk(*) c Local variables integer icd, error, dummy, ikpi, ikk c >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * Put pions into the kw list with covariance matrix * Curvature must be non-zero and track must be associated with * main vertex npi = 0 do icd=1,ntrkcd if(cucd(icd).ne.0. .and. kincd(icd).eq.0) then call kfil_track_cd(icd, 3, ldedx, .TRUE., ikpi, error) if(error .eq. 0) then npi = npi + 1 listpi(npi) = ikpi endif endif 100 continue enddo * Put kaons into the kw list with covariance matrix nk = 0 do icd=1,ntrkcd if(cucd(icd).ne.0. .and. kincd(icd).eq.0) then call kfil_track_cd(icd, 4, ldedx, .TRUE., ikk, error) if(error .eq. 0) then nk = nk + 1 listk(nk) = ikk endif endif 200 continue enddo return end