anchor.diff:          use ccmc_utils, only: add_ex_level_bit_string_provided
           use determinant_data, only: det_info_t
           use const, only: debug
  +        use excitations, only: get_excitation_level
   
           use proc_pointers, only: sc0_ptr
           use dSFMT_interface, only: dSFMT_t
           use spawn_data, only: spawn_t
           use spawning, only: calc_qn_weighting
           use system, only: sys_t
  -        use qmc_data, only: qmc_state_t
  +        use qmc_data, only: qmc_state_t, ccmc_in_t
           use logging, only: logging_t, write_logging_death
   
           type(sys_t), intent(in) :: sys
           type(qmc_state_t), intent(in) :: qs
  +	type (ccmc_in_t), intent (in) :: ccmc_in
           logical, intent(in) :: linked_ccmc, ex_lvl_sort
           type(det_info_t), intent(inout) :: cdet
           type(cluster_t), intent(in) :: cluster
  
positive.code:         type(hmatel_t) :: hmatel, hmatel_save
          real(p) :: pgen, spawn_pgen
          integer(i0) :: fexcit(sys%basis%tot_string_len), funlinked(sys%basis%tot_string_len)
          integer :: excitor_sign, excitor_level
          logical :: linked, single_unlinked, allowed_excitation
          real(p) :: invdiagel
  
  
negative.code:             call create_excited_det(sys%basis, cdet%f, connection, fexcit)
              excitor_level = get_excitation_level(qs%ref%f0, fexcit)
              call convert_excitor_to_determinant(fexcit, excitor_level, excitor_sign, qs%ref%f0)
  	    if (ccmc_in%multiref) then
  	        excitor_level_2 = get_excitation_level(ccmc_in%f0, fexcit)
  	        if (excitor_level > qs%red%ex_level && excitor_level_2 >qs%ref%ex_level) nspawn=0
  	    end if
              if (excitor_sign < 0) nspawn = -nspawn
              if (debug) call write_logging_spawn(logging_info, hmatel_save, pgen, invdiagel, [nspawn], &
                          real(cluster%amplitude,p), sys%read_in%comp, spawn_pgen, cdet%f, fexcit, connection)
  