subroutine hec_ntuple_ini c c routine to initialize ntuple package c implicit none c c parameter and geometry commons c include'hec_par.inc' ! shared parameters include'hec_cal.inc' ! calibrated energies common include'hec_datacard.inc' ! datacard values include'hec_dig.inc' ! digital filtering common include'hec_geo.inc' ! geometry correspondance tables include'hec_ntuple_sys.inc' ! ntuple system common c integer ic, nc logical c c c book ntuples c call hec_ntuple_book c c build a list of cells to include in the ntuple c m_pref units require c connected has_amp_weights has_calib c 1 adc c 2 adc X X c 3 adc X c 4 adc c 1 nA X X c 2 nA X X X c 3 nA X X c 4 nA X X c c note: eunits_ntp = 1 for adc, = 2 for nA c nc = 0. do ic = 1, i_adc_used c = .false. if (eunits_ntp .eq. 1) then ! adc if (m_pref .eq. 1) then c = .true. elseif (m_pref .eq. 2) then if (ic_connected(ic) .and. ic_has_amp_weights(ic)) + c = .true. elseif (m_pref .eq. 3) then if (ic_connected(ic)) c = .true. elseif (m_pref .eq. 4) then c = .true. endif elseif (eunits_ntp .eq. 2) then ! nA if (m_pref .eq. 1) then if (ic_connected(ic) .and. ic_has_calib(ic)) c = .true. elseif (m_pref .eq. 2) then if (ic_connected(ic) .and. ic_has_amp_weights(ic) .and. + ic_has_calib(ic)) c = .true. elseif (m_pref .eq. 3) then if (ic_connected(ic) .and. ic_has_calib(ic)) c = .true. elseif (m_pref .eq. 4) then if (ic_connected(ic) .and. ic_has_calib(ic)) c = .true. endif endif if (c) then nc = nc + 1 cell_list(nc) = ic endif enddo c i_good_cells = nc c print *, ' *** found ', i_good_cells, ' good cells for ntuple' c end