diff --git a/bin/xmimsim-conv.c b/bin/xmimsim-conv.c index 563a950e..d7ffd2e3 100644 --- a/bin/xmimsim-conv.c +++ b/bin/xmimsim-conv.c @@ -201,8 +201,9 @@ XMI_MAIN double **channels_conv = g_malloc(sizeof(double *)*(xmso_in->input->general->n_interactions_trajectory+1)); - if (options.custom_detector_response == NULL) + if (options.custom_detector_response == NULL) { xmi_detector_convolute_all(inputFPtr, xmso_in->channels_unconv, channels_conv, NULL, NULL, options, escape_ratios_def, xmso_in->input->general->n_interactions_trajectory, xmso_in->use_zero_interactions); + } else { XmiDetectorConvoluteAll xmi_detector_convolute_all_custom; GModule *module = NULL; diff --git a/bin/xmimsim.c b/bin/xmimsim.c index 7ecbebe4..85aa66d1 100644 --- a/bin/xmimsim.c +++ b/bin/xmimsim.c @@ -517,8 +517,9 @@ XMI_MAIN channels_def_ptrs[i] = channelsdef+i*input->detector->nchannels; - if (options.custom_detector_response == NULL) + if (options.custom_detector_response == NULL) { xmi_detector_convolute_all(inputFPtr, channels_def_ptrs, channels_conv, brute_historydef, options.use_variance_reduction == 1 ? var_red_historydef : NULL, options, escape_ratios_def, input->general->n_interactions_trajectory, zero_sum > 0.0 ? 1 : 0); + } else { XmiDetectorConvoluteAll xmi_detector_convolute_all_custom; GModule *module = NULL; diff --git a/src/xmi_aux_f.F90 b/src/xmi_aux_f.F90 index c4936d7c..ba1b593d 100644 --- a/src/xmi_aux_f.F90 +++ b/src/xmi_aux_f.F90 @@ -2088,6 +2088,7 @@ FUNCTION xmi_get_default_main_options() & !set the number of threads right rv%omp_num_threads = xmi_omp_get_max_threads() + rv%custom_detector_response = C_NULL_PTR RETURN ENDFUNCTION xmi_get_default_main_options