#======== Input parameter declarations =======
Parameters:

  LCDM:
    T_cmb: 2.72548
    omega_b:
      prior_type: flat
      range: [0.020,0.024]
    omega_cdm:
      prior_type: flat
      range: [0.10,0.15]
    H0:
      prior_type: flat
      range: [50,80]
    tau_reio:
      prior_type: flat
      range: [0.004,0.20]

  Minimal_PowerLaw_ps:
    ln10A_s:
      prior_type: flat
      range: [2.5,3.5]
    n_s:
      prior_type: flat
      range: [0.9,1.10]

  nuclear_params_neutron_lifetime:
    neutron_lifetime:
      range: [876,883]

  StandardModel_mNudiff:
    alphainv:  1.27950000E+02 # alpha^{-1}(mZ)^MSbar !
    GF      :  1.16637870E-05 # G_Fermi !
    alphaS  :  1.18100000E-01 # alpha_s(mZ)^MSbar @
    mZ      :  9.11876000E+01 # mZ(pole) !
    mBmB    :  4.18000000E+00 # mb(mb)^MSbar #
    mT      :  1.73340000E+02 # mtop(pole) $
    mTau    :  1.77686000E+00 # mtau(pole) &
    mE      :  5.10998946E-04 # melectron(pole) &
    mMu     :  1.05658375E-01 # mmuon(pole) &
    mD      :  4.70000000E-03 # md(2 GeV)^MSbar #
    mU      :  2.20000000E-03 # mu(2 GeV)^MSbar #
    mS      :  9.60000000E-02 # ms(2 GeV)^MSbar #
    mCmC    :  1.28000000E+00 # mc(mc)^MSbar #
    CKM_lambda  :  0.22537
    CKM_A       :  0.814
    CKM_rhobar  :  0.117
    CKM_etabar  :  0.353
    theta12 :  0.59027 # solar angle
    theta23 :  0.86568 # atmospheric mixing angle
    theta13 :  0.15097 #
    delta13 :  4.95674 # Dirac CP-violating phase
    alpha1  :  0       # first Majorana CP-violating phase
    alpha2  :  0       # second CP-violating Majorana phase

    # mass of lightest neutrino in eV
    mNu_light:
      prior_type: flat
      range: [ 0., 1.1]

    # mass spliting dmNu21 in eV^2
    dmNu21:
      prior_type: flat
      scale : 1e-5
      range: [6.,9.]

    # mass spliting dmNu3l in eV^2 (NH)
    dmNu3l:
      prior_type: flat
      scale : 1e-3
      range: [-2.8,-2.2]

  # nuisance parameters in Planck likelihood
  cosmo_nuisance_Planck_TTTEEE:
    A_cib_217:
      prior_type: flat
      range: [0.0,200.0]
    cib_index:
      fixed_value: -1.3
    xi_sz_cib:
      prior_type: flat
      range: [0.0,1.0]
    A_sz:
      prior_type: flat
      range: [0.0,10.0]
    ps_A_100_100:
      prior_type: flat
      range: [0.0,400.0]
    ps_A_143_143:
      prior_type: flat
      range: [0.0,400.0]
    ps_A_143_217:
      prior_type: flat
      range: [0.0,400.0]
    ps_A_217_217:
      prior_type: flat
      range: [0.0,400.0]
    ksz_norm:
      prior_type: flat
      range: [0.0,10.0]
    gal545_A_100:
      prior_type: flat
      range: [0.0,50.0]
    gal545_A_143:
      prior_type: flat
      range: [0.0,50.0]
    gal545_A_143_217:
      prior_type: flat
      range: [0.0,100.0]
    gal545_A_217:
      prior_type: flat
      range: [0.0,400.0]
    galf_EE_A_100:
      fixed_value: 0.055
    galf_EE_A_100_143:
      fixed_value: 0.040
    galf_EE_A_100_217:
      fixed_value: 0.094
    galf_EE_A_143:
      fixed_value: 0.086
    galf_EE_A_143_217:
      fixed_value: 0.21
    galf_EE_A_217:
      fixed_value: 0.70
    galf_EE_index:
      fixed_value: -2.4
    galf_TE_A_100:
      prior_type: flat
      range: [0.0,10.0]
    galf_TE_A_100_143:
      prior_type: flat
      range: [0.0,10.0]
    galf_TE_A_100_217:
      prior_type: flat
      range: [0.0,10.0]
    galf_TE_A_143:
      prior_type: flat
      range: [0.0,10.0]
    galf_TE_A_143_217:
      prior_type: flat
      range: [0.0,10.0]
    galf_TE_A_217:
      prior_type: flat
      range: [0.0,10.0]
    galf_TE_index:
      fixed_value: -2.4
    calib_100T:
      prior_type: flat
      range: [0.0,3.0]
    calib_217T:
      prior_type: flat
      range: [0.0,3.0]
    calib_100P:
      fixed_value: 1.021
    calib_143P:
      fixed_value: 0.966
    calib_217P:
      fixed_value: 1.05
    A_pol:
      fixed_value: 1.0
    A_planck:
      prior_type: flat
      range: [0.9,1.1]

  cosmo_nuisance_Pantheon:
   M:
     prior_type: flat
     range: [-20,-18]

#======== Prior setup ========
Priors:

#======== Output setup ========
Printer:

  printer: none

#======== Scanner setup ========
Scanner:
  use_scanner: polychord

  scanners:
    random:
      plugin: random
      like:  LogLike
      point_number: 5 

    polychord:
      plugin: polychord
      like:  LogLike
      nlive: 500
      tol: 0.01
      frac_slow: 0.75
      print_parameters_in_native_output: true
      fast_params:
        - cosmo_nuisance_Pantheon::M
        - cosmo_nuisance_Planck_TTTEEE::A_cib_217
        - cosmo_nuisance_Planck_TTTEEE::A_planck
        - cosmo_nuisance_Planck_TTTEEE::A_pol
        - cosmo_nuisance_Planck_TTTEEE::A_sz
        - cosmo_nuisance_Planck_TTTEEE::calib_100P
        - cosmo_nuisance_Planck_TTTEEE::calib_100T
        - cosmo_nuisance_Planck_TTTEEE::calib_143P
        - cosmo_nuisance_Planck_TTTEEE::calib_217P
        - cosmo_nuisance_Planck_TTTEEE::calib_217T
        - cosmo_nuisance_Planck_TTTEEE::cib_index
        - cosmo_nuisance_Planck_TTTEEE::gal545_A_100
        - cosmo_nuisance_Planck_TTTEEE::gal545_A_143
        - cosmo_nuisance_Planck_TTTEEE::gal545_A_143_217
        - cosmo_nuisance_Planck_TTTEEE::gal545_A_217
        - cosmo_nuisance_Planck_TTTEEE::galf_EE_A_100
        - cosmo_nuisance_Planck_TTTEEE::galf_EE_A_100_143
        - cosmo_nuisance_Planck_TTTEEE::galf_EE_A_100_217
        - cosmo_nuisance_Planck_TTTEEE::galf_EE_A_143
        - cosmo_nuisance_Planck_TTTEEE::galf_EE_A_143_217
        - cosmo_nuisance_Planck_TTTEEE::galf_EE_A_217
        - cosmo_nuisance_Planck_TTTEEE::galf_EE_index
        - cosmo_nuisance_Planck_TTTEEE::galf_TE_A_100
        - cosmo_nuisance_Planck_TTTEEE::galf_TE_A_100_143
        - cosmo_nuisance_Planck_TTTEEE::galf_TE_A_100_217
        - cosmo_nuisance_Planck_TTTEEE::galf_TE_A_143
        - cosmo_nuisance_Planck_TTTEEE::galf_TE_A_143_217
        - cosmo_nuisance_Planck_TTTEEE::galf_TE_A_217
        - cosmo_nuisance_Planck_TTTEEE::galf_TE_index
        - cosmo_nuisance_Planck_TTTEEE::ksz_norm
        - cosmo_nuisance_Planck_TTTEEE::ps_A_100_100
        - cosmo_nuisance_Planck_TTTEEE::ps_A_143_143
        - cosmo_nuisance_Planck_TTTEEE::ps_A_143_217
        - cosmo_nuisance_Planck_TTTEEE::ps_A_217_217
        - cosmo_nuisance_Planck_TTTEEE::xi_sz_cib

#======== Observables of interest ========
ObsLikes:

  # ----- Neutron lifetime ------

  - purpose:      LogLike
    capability:   lnL_neutron_lifetime_bottle

  # ----- BBN ------

  - purpose:      LogLike
    capability:   BBN_LogLike
    sub_capabilities: [Yp, D]

  # ----- CMB (Plank) -------

  - purpose:      LogLike
    capability:   Planck_nuisance_prior_loglike

  - purpose:      LogLike
    capability:   Planck_sz_prior_loglike

  - purpose:      LogLike
    capability:   Planck_highl_loglike
    function:     function_Planck_highl_TTTEEE_2018_loglike

  - purpose:      LogLike
    capability:   Planck_lensing_loglike
    function:     function_Planck_lensing_2018_loglike

  - purpose:      LogLike
    capability:   Planck_lowl_loglike
    function:     function_Planck_lowl_TTEE_2018_loglike

 # ----- BAO+SNe (-> MPLikes) -------

  - purpose:      LogLike
    capability:   MP_Combined_LogLike
    sub_capabilities:
      - bao_correlations
      - bao_smallz_combined_2018
      - des_bao_Y1
      - Pantheon

 # --------- Neutrinos -----

  - purpose:      LogLike
    capability:   md21_md3l_NuFit_v4_1_lnL

  # - purpose:      Observable
  #   capability:   mNu_tot

#======== Rule entries ========
Rules:

  - capability: classy_MPLike_input
    function: set_classy_input_with_MPLike

  - capability: AlterBBN_Input
    options:
      failsafe: 3
      err: 0

  - capability: BBN_abundances
    options:
      isotope_basis: [Yp, D]
      correlation_matrix: [[+1.000e00, +1.524e-2],
                           [+1.524e-2, +1.000e00]]
      relative_errors: [1.348e-3, 1.596e-2]

#======== Logging setup ========
Logger:
  redirection:
    [Default]      : "default.log"

#======== Generic Name/Value Section ========
KeyValues:

  debug: false

  disable_logs_during_scan: true

  default_output_path: "neutrino_scratch/7-IHB_Neff0_PC500/"

  rng:
    generator: ranlux48
    seed: -1

  likelihood:
    model_invalid_for_lnlike_below: -1e30
