  Computer models, aiming at simulating a complex real system, are often
calibrated in the light of data to improve performance. Standard calibration
methods assume that the optimal values of calibration parameters are invariant
to the model inputs. In several real world applications where models involve
complex parametrizations whose optimal values depend on the model inputs, such
an assumption can be too restrictive and may lead to misleading results. We
propose a fully Bayesian methodology that produces input dependent optimal
values for the calibration parameters, as well as it characterizes the
associated uncertainties via posterior distributions. Central to methodology is
the idea of formulating the calibration parameter as a step function whose
uncertain structure is modeled properly via a binary treed process. Our method
is particularly suitable to address problems where the computer model requires
the selection of a sub-model from a set of competing ones, but the choice of
the `best' sub-model may change with the input values. The method produces a
selection probability for each sub-model given the input. We propose suitable
reversible jump operations to facilitate the challenging computations. We
assess the performance of our method against benchmark examples, and use it to
analyze a real world application with a large-scale climate model.
