program main
  use xx_kinds
  use xx_prospino_subroutine
  implicit none

  integer                              :: inlo,isq_ng_in,icoll_in,i_error_in,ipart1_in,ipart2_in,isquark1_in,isquark2_in
  logical                              :: lfinal
  character(len=2)                     :: final_state_in

!----------------------------------------------------------------------------
  inlo = 1          ! specify LO only[0] or complete NLO (slower)[1]        !
!----------------------------------------------------------------------------

!----------------------------------------------------------------------------
  isq_ng_in = 1     ! specify degenerate [0] or free [1] squark masses      !
!----------------------------------------------------------------------------

!----------------------------------------------------------------------------
  icoll_in = 1      ! specify the collider : tevatron[0] , lhc[1]           !
!----------------------------------------------------------------------------

!----------------------------------------------------------------------------
  i_error_in = 0    ! with central scale [0] or scale variation [1]         !
!----------------------------------------------------------------------------

!----------------------------------------------------------------------------
!  final_state_in = ng   ! neutralino/chargino + gluino                     !
!                   ns   ! neutralino/chargino + squark                     !
!                   nn   ! neutralino/chargino pair combinations            !
!                   ll   ! slepton pair combinations                        !
!                   sb   ! squark-antisquark                                !
!                   ss   ! squark-squark                                    !
!                   tb   ! stop-antistop                                    !
!                   bb   ! sbottom-antisbottom                              !
!                   gg   ! gluino pair                                      !
!                   sg   ! squark + gluino                                  !
!                   lq   ! leptoquark pairs (using stop1 mass)              !
!                   le   ! leptoquark plus lepton (using stop1 mass)        !
!                   hh   ! charged Higgs pairs, private code only           !
!                   ht   ! charged Higgs with top, private code only        !
!                                                                           !
!  squark and antisquark added, but taking into account different sb or ss  !
!----------------------------------------------------------------------------
  final_state_in = 'sg'

!----------------------------------------------------------------------------
!  final_state_in = ng,ns,nn                                                !
!  ipart1_in   = 1,2,3,4  neutralinos                                       !
!                5,6      positive charge charginos                         !
!                7,8      negative charge charginos                         !
!  ipart2_in the same                                                       !
!      chargino+ and chargino- different processes                          !
!                                                                           !
!  final_state_in = ll                                                      !
!  ipart1_in   = 0        sel,sel + ser,ser                                 !
!                1        sel,sel                                           !
!                2        ser,ser                                           !
!                3        snel,snel                                         !
!                4        sel+,snl                                          !
!                5        sel-,snl                                          !
!                6        stau1,stau1                                       !
!                7        stau2,stau2                                       !
!                8        stau1,stau2                                       !
!                9        sntau,sntau                                       !
!               10        stau1+,sntau                                      !
!               11        stau1-,sntau                                      !
!               12        stau2+,sntau                                      !
!               13        stau2-,sntau                                      !
!               14        H+,H- in Drell-Yan channel                        !
!                                                                           !
!  final_state_in = tb and bb                                               !
!  ipart1_in   = 1        stop1/sbottom1 pairs                              !
!                2        stop2/sbottom2 pairs                              !
!                                                                           !
!  for LO with light-squark flavor in the final state                       !
!  isquark1_in     =  -4,-3,-2,-1,+1,+2,+3,+4                               !
!                    (cL sL dL uL uR dR sR cR) in CteQ ordering             !
!  isquark1_in     = 0 sum over light-flavor squarks throughout             !
!                                                                           !
!----------------------------------------------------------------------------
  ipart1_in = 1
  ipart2_in = 1 
  isquark1_in = 0
  isquark2_in = 0
  
  call PROSPINO_OPEN_CLOSE(0)                                                            ! open all input/output files
  
  call PROSPINO_CHECK_HIGGS(final_state_in)
  call PROSPINO_CHECK_FS(final_state_in,ipart1_in,ipart2_in,lfinal)                      ! check final state 
  if (.not. lfinal ) then
     print*, " final state not correct ",final_state_in,ipart1_in,ipart2_in
     call HARD_STOP                                                                      ! finish if final state bad
  end if

  call PROSPINO(inlo,isq_ng_in,icoll_in,i_error_in,final_state_in,ipart1_in,ipart2_in,isquark1_in,isquark2_in) ! actual prospino call
        
  call PROSPINO_OPEN_CLOSE(1)                                                            ! close all input/output files 

end program main


