Parameters:

  #SM parameters.
  StandardModel_SLHA2: !import StandardModel_SLHA2_scan.yaml

  #Nuclear matrix parameters.
  nuclear_params_sigmas_sigmal:
    sigmas:
      range:  [19, 67]
    sigmal:
      range:  [31, 85]
    deltau:
      fixed_value:  0.842
    deltad:
      fixed_value: -0.427
    deltas:
      fixed_value: -0.085

  #SUSY parameters.
  MSSM7atQ:
    Qin:
      fixed_value: 1000.0
    SignMu:
      fixed_value: 1
    Ad_3:
      prior_type: double_log_flat_join
      ranges: [-1e4, -1e2, 1e2, 1e4]
    Au_3:
      prior_type: double_log_flat_join
      ranges: [-1e4, -1e2, 1e2, 1e4]
    M2:
      prior_type: double_log_flat_join
      ranges: [-1e4, -1e2, 1e2, 1e4]
    TanBeta:
      range: [3.0, 70.0]
    mHd2:
      prior_type: double_log_flat_join
      ranges: [-1e8, -1e4, 1e4, 1e8]
    mHu2:
      prior_type: double_log_flat_join
      ranges: [-1e8, -1e4, 1e4, 1e8]
    mf2:
      prior_type: double_log_flat_join
      ranges: [0, 0, 1e4, 1e8]

  #Dark matter halo parameters.
  Halo_gNFW_rho0:
    rho0:
      range: [.2, .8]
    v0: 235.0
    vesc: 550.0
    vrot: 235.0
    rs: 20.0
    r_sun: 8.5
    alpha: 1
    beta: 3
    gamma: 1

Priors:

  # All the priors are simple for this scan, so they are specified directly in the Parameters section.

Printer:

  printer: hdf5

  options:
    output_file: "MSSM7.hdf5"
    group: "/MSSM7"

Scanner:

  use_scanner: de

  scanners:
    multinest:
      plugin: multinest
      like:  LogLike
      nlive: 4000
      tol: 0.5
      updInt: 1

    de:
      plugin: diver
      like: LogLike
      NP: 6000
      convthresh: 1e-4
      init_population_strategy: 1
      max_initialisation_attempts: 5000
      verbosity: 1
      lambdajDE: false

ObsLikes:

    # LHC likelihoods
    - purpose:    LogLike
      capability: LHC_Combined_LogLike

    - purpose:    LogLike
      capability: LHC_Higgs_LogLike

    # LEP likelihoods
    - purpose:    LogLike
      capability: LEP_Higgs_LogLike

    - purpose:    LogLike
      capability: ALEPH_Selectron_LLike

    - purpose:    LogLike
      capability: ALEPH_Smuon_LLike

    - purpose:    LogLike
      capability: ALEPH_Stau_LLike

    - purpose:    LogLike
      capability: L3_Selectron_LLike

    - purpose:    LogLike
      capability: L3_Smuon_LLike

    - purpose:    LogLike
      capability: L3_Stau_LLike

    - purpose:    LogLike
      capability: L3_Neutralino_Leptonic_LLike

    - purpose:    LogLike
      capability: L3_Chargino_Leptonic_LLike

    - purpose:    LogLike
      capability: OPAL_Chargino_Hadronic_LLike

    - purpose:    LogLike
      capability: OPAL_Chargino_SemiLeptonic_LLike

    - purpose:    LogLike
      capability: OPAL_Chargino_Leptonic_LLike

    - purpose:    LogLike
      capability: OPAL_Neutralino_Hadronic_LLike

    # Flavour physics likelihoods
    - purpose:    LogLike
      capability: b2ll_LL

    - purpose:    LogLike
      capability: SL_LL

    - purpose:    LogLike
      capability: b2sll_LL

    - purpose:    LogLike
      capability: b2sgamma_LL

    # Precision physics likelihoods
    - capability: lnL_W_mass
      purpose:    LogLike

    - capability:  lnL_gm2
      purpose:     LogLike

    # Dark matter likelihoods
    - capability: lnL_oh2
      purpose:    LogLike

    - capability: lnL_FermiLATdwarfs
      purpose:    LogLike

    - capability: XENON100_2012_LogLikelihood
      purpose:    LogLike

    - capability: LUX_2015_LogLikelihood
      purpose:    LogLike

    - capability: LUX_2016_LogLikelihood
      purpose:    LogLike

    - capability: PandaX_2016_LogLikelihood
      purpose:    LogLike

    - capability: PICO_2L_LogLikelihood
      purpose:    LogLike

    - capability: PICO_60_F_LogLikelihood
      purpose:    LogLike

    - capability: SuperCDMS_2014_LogLikelihood
      purpose:    LogLike

    - capability: SIMPLE_2014_LogLikelihood
      purpose:    LogLike

    - capability: IC79_loglike
      purpose:    LogLike

    # SI nuclear nuisance parameter likelihood
    - capability: lnL_SI_nuclear_parameters
      purpose:    LogLike

    # DM Local Halo likelihoods
    - capability: lnL_rho0
      purpose: LogLike

    # SM nuisance parameter likelihoods
    - capability: lnL_t_mass
      purpose:    LogLike

    - capability: lnL_mbmb
      purpose:    LogLike

    - capability: lnL_alpha_s
      purpose:    LogLike

    # Other observables
    - purpose:    Observable
      capability: RD_oh2

    - purpose:    Observable
      capability: mwimp

    - purpose:    Observable
      capability: sigmav

    - purpose:    Observable
      capability: sigma_SI_p

    - purpose:    Observable
      capability: sigma_SI_n

    - purpose:    Observable
      capability: sigma_SD_p

    - purpose:    Observable
      capability: sigma_SD_n

    - purpose:    Observable
      capability: bsgamma

    - purpose:    Observable
      capability: muon_gm2

    - purpose:    Observable
      capability: SLHA1_violation

    - purpose:    Observable
      capability: MSSM_spectrum
      type:       map_str_dbl

Rules:

  # Globally permit maximal mixing between gauge and family eigenstates
  - options:
      gauge_mixing_tolerance: 0.5
      family_mixing_tolerance: 0.5

  # Choose to use gm2calc for g-2
  - capability: muon_gm2
    function: GM2C_SUSY

  # Choose to base the SM prediction for g-2 on e+e- data
  - capability: muon_gm2_SM
    function: gm2_SM_ee

  # Use SuperIso instead of FeynHiggs for b->sgamma
  - capability: bsgamma
    function: SI_bsgamma

  # Use SuperIso instead of FeynHiggs for B_s->mumu
  - capability: Bsmumu_untag
    function: SI_Bsmumu_untag

  # Choose to implement the relic density likelihood as an upper bound, not a detection
  - capability: lnL_oh2
    function: lnL_oh2_upperlimit

  # Choose to rescale signals in direct and indirect detection by the relic density fraction
  - capability: RD_fraction
    function: RD_fraction_leq_one

  # Use MicrOmegas for the relic density; DarkSUSY is too slow for this model
  - capability: RD_oh2
    function: RD_oh2_MicrOmegas
    options:
      fast: 0
      Beps: 1e-5

  # Choose to use detailed Fermi Pass 8 dwarf likelihoood from gamlike
  - capability: lnL_FermiLATdwarfs
    function:  lnL_FermiLATdwarfs_gamLike

  # Choose to use DarkSUSY yield tables for indirect detection
  - capability: SimYieldTable
    function: SimYieldTable_DarkSUSY
    options:
      allow_yield_extrapolation: true

  # Use DarkSUSY for calculating direct detection couplings
  - capability: DD_couplings
    function: DD_couplings_DarkSUSY

  # Choose to get decays from DecayBit proper, not from an SLHA file.
  - capability: decay_rates
    function: all_decays

  # Choose to get the spectrum from SpecBit proper, not an SLHA file.
  # Options set to match benchmark point specified in SpecBit/MSSM_benchmark_points/LesHouches.in.MSSM_1
  - capability: unimproved_MSSM_spectrum
    function: get_MSSMatQ_spectrum
    options:
      precision_goal:        1.0e-4
      max_iterations:        0
      calculate_sm_masses:   false
      pole_mass_loop_order:  2
      ewsb_loop_order:       2
      beta_loop_order:       2
      threshold_corrections_loop_order: 2
      use_higgs_2loop_at_as: true
      use_higgs_2loop_ab_as: true
      use_higgs_2loop_at_at: true
      use_higgs_2loop_atau_atau: true
      invalid_point_fatal: false
      # Only consider neutralino masses > 2.7 GeV, as anything less will be invalidated by the gamma-ray routines anyway.
      mass_cut: [ ["|~chi0_1|", 2.7, 1e6]  ]
      # To force the scan towards the squark co-annihilation region, only consider points with a relatively small squark/neutralino mass ratio.
      mass_ratio_cut: [ ["|~chi+_1|", "|~chi0_1|", 1.05, 1e6], ["|~u_1|", "|~chi0_1|", 1, 1.5] ]

  # Choose where to get the precision spectrum from
  - capability: MSSM_spectrum
    type: Spectrum
    function: make_MSSM_precision_spectrum_none

  # Choose to use functions that get Higgs decays from SUSY-HIT, and t decays from DecayBit native implementation (instead of FeynHiggs)
  - capability: Reference_SM_Higgs_decay_rates
    function: Ref_SM_Higgs_decays_table
  - capability: Reference_SM_other_Higgs_decay_rates
    function: Ref_SM_other_Higgs_decays_table
  - capability: Reference_SM_A0_decay_rates
    function: Ref_SM_A0_decays_table
  - capability: Higgs_decay_rates
    function: MSSM_h0_1_decays
  - capability: h0_2_decay_rates
    function: h0_2_decays
  - capability: A0_decay_rates
    function: A0_decays
  - capability: H_plus_decay_rates
    function: H_plus_decays
  - capability: t_decay_rates
    function: t_decays

  # Choose where to get the Higgs couplings from
  - capability: Higgs_Couplings
    function: MSSM_higgs_couplings_pwid

  # Experimental values to be used in nuclear parameter likelihoods (all values in MeV)
  - capability: lnL_SI_nuclear_parameters
    function: lnL_sigmas_sigmal
    options:
      sigmas_central: 43.0
      sigmas_error: 8.0
      sigmal_central: 58.0
      sigmal_error: 9.0

  # Observed value and uncertainty of local dark matter density (in GeV/cm^3)
  - capability: lnL_rho0
    function: lnL_rho0_lognormal
    options:
      rho0_obs: 0.4
      rho0_obserr: 0.15

  # Choose which type of marginalised Poisson likelihood to use for LHC likelihoods
  - capability: LHC_Combined_LogLike
    backends:
    - {capability: lnlike_marg_poisson_lognormal_error}

  # ATLAS detector simulation
  - capability: SimpleSmearingSim
    type: "ColliderBit::BuckFastSmearATLAS"
    function: getBuckFastATLAS
    options:
      partonOnly: [false]
      antiktR: [0.4]
      useDetector: [true]

  # CMS detector simulation
  - capability: SimpleSmearingSim
    type: "ColliderBit::BuckFastSmearCMS"
    function: getBuckFastCMS
    options:
      partonOnly: [false]
      antiktR: [0.5]
      useDetector: [true]

  # ATLAS analysis setup. Set option useATLAS: false to ignore these analyses.
  - capability: ATLASAnalysisContainer
    function: getATLASAnalysisContainer
    options:
      analyses: [ ["ATLAS_0LEP_20invfb","ATLAS_0LEPStop_20invfb",
                   "ATLAS_1LEPStop_20invfb","ATLAS_2bStop_20invfb",
                   "ATLAS_2LEPEW_20invfb","ATLAS_2LEPStop_20invfb",
                   "ATLAS_3LEPEW_20invfb"] ]

  # CMS analysis setup. Set option useCMS: false to ignore these analyses.
  - capability: CMSAnalysisContainer
    function: getCMSAnalysisContainer
    options:
      analyses: [ ["CMS_1LEPDMTOP_20invfb","CMS_2LEPDMTOP_20invfb",
                   "CMS_3LEPEW_20invfb","CMS_MONOJET_20invfb"] ]

  # Choose Monte Carlo event simulator and number of events to run.
  - capability:  ColliderOperator
    function: operateLHCLoop
    options:
      nEvents: [20000]
      pythiaNames: ["Pythia_SUSY_LHC_8TeV"]
      silenceLoop: true

  # Define Monte Carlo event simulator and associated options.
  - capability:  HardScatteringSim
    function:  getPythia
    options:
      ### Pythia_doc_path defaults to the xmldoc directory of the default Pythia
      ###   backend. So, this must only be set if the user chooses a different Pythia.
      #Pythia_doc_path: "Backends/installed/Pythia/8.212/share/Pythia8/xmldoc/"
      Pythia_SUSY_LHC_8TeV: ["Print:quiet = on",
                             "PartonLevel:MPI = off",
                             "PartonLevel:ISR = on",
                             "PartonLevel:FSR = on",
                             "HadronLevel:all = on",
                             "SUSY:all = on",
                             "TauDecays:mode = 0",
                             "TimeShower:pTmin = 20"]
      xsec_vetos: [0.048]  # 0.048 fb correspond to ~1 expected event at L = 20.7 fb^-1.


Logger:

  redirection:
    [Default] : "default.log"
    [DecayBit] : "DecayBit.log"
    [DarkBit] : "DarkBit.log"
    [PrecisionBit] : "PrecisionBit.log"
    [FlavBit] : "FlavBit.log"
    [ColliderBit] : "ColliderBit.log"
    [SpecBit] : "SpecBit.log"
    [Dependency Resolver] : "dep_resolver.log"

KeyValues:

  # debug: true

  dependency_resolution:
    prefer_model_specific_functions: true

  likelihood:
    model_invalid_for_lnlike_below: -5e5
    model_invalid_for_lnlike_below_alt: -1e5

  default_output_path: "MSSM7_Diver_log_sqcoann_jDE"
