How does DBRC block get accessed?

Hi everyone. Newbie here. I’m trying to add a new reaction that makes use of target velocity sampling to calculate the cross sections. But I’m a bit confused on this part of the code from physics.cpp (around line 844):

  [...]
  sampling_method = settings::res_scat_method;
  [...]
  switch (sampling_method) {
  case ResScatMethod::cxs:
    return sample_cxs_target_velocity(nuc.awr_, E, u, kT, seed);
  case ResScatMethod::dbrc:
  case ResScatMethod::rvs: {
   [...]
    if (sampling_method == ResScatMethod::dbrc) {
      [How is this block entered if we're in the ResScatMethod::rvs part of the switch statement?]
    }
   [...]
  }

Should the dbrc block go into the associated case statement instead? What am I missing?

It’s because of switch/case fall-through in C. Any case statement that doesn’t end in break proceeds to the next branch.So it hits dbrc, then proceeds into rvs. Good luck!