Index: trunk/src/pythia8/pythia8.nw =================================================================== --- trunk/src/pythia8/pythia8.nw (revision 8442) +++ trunk/src/pythia8/pythia8.nw (revision 8443) @@ -1,1775 +1,1775 @@ %% -*- ess-noweb-default-code-mode: f90-mode; noweb-default-code-mode: f90-mode; -*- % WHIZARD code as NOWEB source: LHA user process interface and Pythia8 interface %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{LHA User Process and Pythia8} \label{cha:lha-pythia8} We implement the Les Houches Accord interface for C++ specified in Pythia8 and interface the Pythia with the given LHA User Process object of WHIZARD. \section{LHA User Process WHIZARD} \label{sec:lha-whizard} <<[[whizard_lha.f90]]>>= <> module whizard_lha <> <> <> <> <> <> <> contains <> end module whizard_lha @ %def whizard_lha @ <>= use, intrinsic :: iso_c_binding use diagnostics use format_utils, only: write_separator use lorentz use io_units, only: given_output_unit use polarizations use particles use subevents, only: PRT_BEAM, PRT_INCOMING, PRT_OUTGOING, & PRT_UNDEFINED, PRT_VIRTUAL, PRT_RESONANT, PRT_BEAM_REMNANT @ %def whizard_lha_modules @ We define a transport type for a particle corresponding to C-struct. <>= public :: lha_particle_t <>= type, bind(C) :: lha_particle_t integer(c_int) :: id, status integer(c_int), dimension(2) :: mother integer(c_int), dimension(2) :: color real(c_double), dimension(4) :: momentum real(c_double) :: mass, tau, spin end type lha_particle_t @ %def lha_particle_t @ Private print routine for [[lha_particle_t]]. <>= interface lha_particle_write module procedure lha_particle_write_single, lha_particle_write_array end interface lha_particle_write <>= subroutine lha_particle_write_single (particle, unit) type(lha_particle_t) :: particle integer, intent(in), optional :: unit integer :: u u = given_output_unit (unit) write (u, "(I9,1X)", advance="no") particle%id write (u, "(I4,1X)", advance="no") particle%status write (u, "(2(I5,1X))", advance="no") particle%mother(1), particle%mother(2) write (u, "(2(I5,1X))", advance="no") particle%color(1), particle%color(2) write (u, "(5(F11.3,1X))", advance="no") particle%momentum(2), particle%momentum(3), & particle%momentum(4), particle%momentum(1), particle%mass write (u, "(F8.3,1X)", advance="no") particle%tau write (u, "(F8.3,1X)", advance="no") particle%tau write (u, "(A)") end subroutine lha_particle_write_single subroutine lha_particle_write_array (particle_set, unit) type(lha_particle_t), dimension(:), intent(in) :: particle_set integer, intent(in), optional :: unit integer :: u, i u = given_output_unit (unit) write (u, "(1X,A)") "LHA Particle set:" call write_separator (u) write (u, "((A4,1X),(A9,1X),(A4,1X),(1X,A10,1X),(1X,A10,1X),5(A11,1X),2(A8,1X))") & "No", "ID", "Stat", "Mothers", "Colours", & "P(1)", "P(2)", "P(3)", "E", "M", "Tau", "Spin" if (size (particle_set) == 0) then write (u, "(3X,A)") "[empty]" else do i = 1, size(particle_set) write (u, "(I4,1X)", advance="no") i call lha_particle_write_single (particle_set(i), unit) end do end if call write_separator (u) end subroutine lha_particle_write_array @ %def lha_particle_write_single, lha_particle_write_array @ We define the [[whizard_lha_t]] type which handles the C++ implementation of the LHA User Procces class [[LHAupWhizard]]. <>= public :: whizard_lha_t <>= type :: whizard_lha_t private type(c_ptr) :: cptr logical :: new_event = .false. contains <> end type whizard_lha_t @ %def whizard_lha_t @ Initialize. Construct a new C++ object of type [[LHAupWhizard]]. <>= procedure :: init => whizard_lha_init <>= interface function new_whizard_lha () bind(C) result (cptr) import type(c_ptr) :: cptr end function new_whizard_lha end interface <>= subroutine whizard_lha_init (whizard_lha) class(whizard_lha_t), intent(out) :: whizard_lha whizard_lha%cptr = new_whizard_lha () end subroutine whizard_lha_init @ %def whizard_lha_init @ Finalize. Call the Destructor of the [[LHAupWhizard]] object. <>= procedure :: final => whizard_lha_final <>= interface subroutine lhaup_whizard_delete (cptr) bind(C) import ! Attribute value cannot have intent(inout). type(c_ptr), value :: cptr end subroutine lhaup_whizard_delete end interface <>= subroutine whizard_lha_final (whizard_lha) class(whizard_lha_t), intent(inout) :: whizard_lha call lhaup_whizard_delete (whizard_lha%cptr) end subroutine whizard_lha_final @ %def whizard_lha_final @ Get [[c_ptr]]. <>= procedure :: get_ptr => whizard_lha_get_ptr <>= function whizard_lha_get_ptr (whizard_lha) result (cptr) class(whizard_lha_t), intent(in) :: whizard_lha type(c_ptr) :: cptr cptr = whizard_lha%cptr end function whizard_lha_get_ptr @ %def whizard_lha_get_ptr @ Set initialisation parameter. <>= procedure :: set_init => whizard_lha_set_init <>= interface function lhaup_whizard_set_init (cptr, beam_pdg, beam_energy, n_processes, unweighted, negative_weights) bind(C) result (flag) import type(c_ptr), value :: cptr integer(c_int), dimension(2), intent(in) :: beam_pdg real(c_double), dimension(2), intent(in) :: beam_energy integer(c_int), intent(in), value :: n_processes logical(c_bool), intent(in), value :: unweighted, negative_weights logical(c_bool) :: flag end function lhaup_whizard_set_init end interface <>= subroutine whizard_lha_set_init (whizard_lha, beam_pdg, beam_energy, n_processes, unweighted, negative_weights) class(whizard_lha_t), intent(inout) :: whizard_lha integer, dimension(2), intent(in) :: beam_pdg real(default), dimension(2), intent(in) :: beam_energy integer, intent(in) :: n_processes logical, intent(in) :: unweighted logical, intent(in) :: negative_weights logical(c_bool) :: flag integer(c_int) :: c_n_processes integer(c_int), dimension(2) :: c_beam_pdg real(c_double), dimension(2) :: c_beam_energy logical(c_bool) :: c_unweighted, c_negative_weights c_beam_pdg = int (beam_pdg, c_int) c_beam_energy = real (beam_energy, c_double) c_n_processes = int (n_processes, c_int) c_unweighted = unweighted c_negative_weights = negative_weights flag = lhaup_whizard_set_init (whizard_lha%cptr, c_beam_pdg, & c_beam_energy, c_n_processes, c_unweighted, c_negative_weights) if (.not. flag) then call msg_fatal ("[whizard_lha_set_init] could not " // & "initialize the LHAUpWhizard interface.") end if end subroutine whizard_lha_set_init @ %def whizard_lha_set_init @ Set process parameters. <>= procedure :: set_process_parameters => whizard_lha_set_process_parameters <>= interface function lhaup_whizard_set_process_parameters & (cptr, process_id, cross_section, error, max_weight) & bind(C) result (flag) import type(c_ptr), value :: cptr integer(c_int), intent(in), value :: process_id real(c_double), intent(in), value :: cross_section, error, max_weight logical(c_bool) :: flag end function lhaup_whizard_set_process_parameters end interface <>= ! get this directly from event_sample_data_t subroutine whizard_lha_set_process_parameters (whizard_lha, process_id, cross_section, error, max_weight) class(whizard_lha_t), intent(inout) :: whizard_lha integer, intent(in) :: process_id real(default), intent(in), optional :: cross_section, error, max_weight real(default), parameter :: pb_per_fb = 1.e-3_default integer(c_int) :: c_process_id real(c_double) :: c_cross_section, c_error, c_max_weight logical(c_bool) :: flag c_process_id = int (process_id, c_int) if (present (cross_section)) then c_cross_section = real (cross_section * pb_per_fb, c_double) else c_cross_section = 0._c_double end if if (present (error)) then c_error = real (error * pb_per_fb, c_double) else c_error = 0._c_double end if if (present (max_weight)) then c_max_weight = real (max_weight, c_double) else c_max_weight = 0._c_double end if flag = lhaup_whizard_set_process_parameters (whizard_lha%cptr, & c_process_id, c_cross_section, c_error, c_max_weight) if (.not. flag) then call msg_fatal ("[whizard_lha_add_process] could not add a process.") end if end subroutine whizard_lha_set_process_parameters @ %def whizard_lha_set_process_parameters @ Print LHA User Process initialisation. <>= procedure :: list_init => whizard_lha_list_init procedure :: list_event => whizard_lha_list_event <>= interface subroutine lhaup_whizard_list_init (cptr) bind(C) import type(c_ptr), value :: cptr end subroutine lhaup_whizard_list_init end interface interface subroutine lhaup_whizard_list_event (cptr) bind(C) import type(c_ptr), value :: cptr end subroutine lhaup_whizard_list_event end interface <>= subroutine whizard_lha_list_init (whizard_lha) class(whizard_lha_t), intent(in) :: whizard_lha call lhaup_whizard_list_init (whizard_lha%cptr) end subroutine whizard_lha_list_init subroutine whizard_lha_list_event (whizard_lha) class(whizard_lha_t), intent(in) :: whizard_lha call lhaup_whizard_list_event (whizard_lha%cptr) end subroutine whizard_lha_list_event @ %def whizard_lha_list_init, whizard_lha_list_event @ Set the event process information. We set the process’ scale, the coupling and the weight, iff we handle weighted events. Also, we clean up and prepare the particle list. <>= procedure :: set_event_process => whizard_lha_set_event_process <>= interface subroutine lhaup_whizard_set_event_process & (cptr, process_id, scale, alpha_qcd, alpha_qed, weight) bind(C) import type(c_ptr), value :: cptr integer(c_int), intent(in), value :: process_id real(c_double), intent(in), value :: scale, alpha_qcd, alpha_qed, weight end subroutine lhaup_whizard_set_event_process end interface <>= subroutine whizard_lha_set_event_process & (whizard_lha, process_id, scale, alpha_qcd, alpha_qed, weight) class(whizard_lha_t), intent(inout) :: whizard_lha integer, intent(in) :: process_id real(default), intent(in) :: scale, alpha_qcd, alpha_qed, weight integer(c_int) :: c_process_id real(c_double) :: c_scale, c_alpha_qcd, c_alpha_qed, c_weight c_scale = real (scale, c_double) c_alpha_qcd = real (alpha_qcd, c_double) c_alpha_qed = real (alpha_qed, c_double) c_weight = real (weight, c_double) c_process_id = int (process_id, c_int) call lhaup_whizard_set_event_process (whizard_lha%cptr, & c_process_id, c_scale, c_alpha_qcd, c_alpha_qed, c_weight) whizard_lha%new_event = .true. end subroutine whizard_lha_set_event_process @ %def whizard_lha_set_event_process @ Set particles in to LHA event record. Must be called after [[whizard_lha_set_event_process]]. We first create a new particle set that contains only the particles that are supported by the Les Houches Accord. These are: beam, incoming, resonant or outgoing. We drop particles with unknown, virtual or beam-remnant status. From this we fill the LHA particle type. <>= procedure :: set_event => whizard_lha_set_event <>= interface function lhaup_whizard_set_event (cptr, process_id, n_particles, & particle_set) bind(C) result (flag) import type(c_ptr), value :: cptr integer(c_int), intent(in), value :: process_id integer(c_int), intent(in), value :: n_particles ! IMPORTANT NOTE: Assumed-size array has to be defined by *. type(lha_particle_t), dimension(*), intent(in) :: particle_set logical(c_bool) :: flag end function lhaup_whizard_set_event end interface <>= subroutine whizard_lha_set_event (whizard_lha, process_id, particle_set,& keep_beams, keep_remnants, polarization) class(whizard_lha_t), intent(inout) :: whizard_lha integer, intent(in) :: process_id type(particle_set_t), intent(in) :: particle_set logical, intent(in), optional :: keep_beams, keep_remnants, polarization type(particle_set_t) :: pset logical :: kr, pol type(lha_particle_t), dimension(:), allocatable :: c_particle_set integer(c_int) :: c_process_id, c_n_particles logical(c_bool) :: flag kr = .true.; if (present (keep_remnants)) kr = keep_remnants pol = .true.; if (present (polarization)) pol = polarization if (.not. whizard_lha%new_event) then call msg_bug ("[whizard_lha_set_event] new event was not prepared.") end if call particle_set%filter_particles (pset, real_parents = .true., & keep_beams = keep_beams, keep_virtuals = .false.) if (debug_active (D_SHOWER) .or. debug_active(D_TRANSFORMS)) then print *, "After particle_set%filter: pset" call pset%write (summary = .true., compressed = .true.) end if allocate (c_particle_set (pset%get_n_tot ())) call fill_c_particle_set (pset, c_particle_set, kr, pol) if (debug_active (D_SHOWER) .or. debug_active (D_TRANSFORMS)) & call lha_particle_write (c_particle_set) c_n_particles = pset%get_n_tot (); c_process_id = process_id flag = lhaup_whizard_set_event (whizard_lha%cptr, c_process_id, c_n_particles, c_particle_set) whizard_lha%new_event = .false. contains subroutine fill_c_particle_set (particle_set, c_particle_set, keep_remnants, polarization) type(particle_set_t), intent(in) :: particle_set type(lha_particle_t), dimension(:), intent(out) :: c_particle_set logical, intent(in) :: keep_remnants, polarization integer :: i, status integer, dimension(:), allocatable :: parent integer, dimension(2) :: color type(vector4_t) :: p do i = 1, particle_set%get_n_tot () associate (c_prt => c_particle_set, prt => particle_set%prt(i)) c_prt(i)%id = prt%get_pdg () status = prt%get_status () if (keep_remnants .and. status == PRT_BEAM_REMNANT & .and. prt%get_n_children () == 0) then status = PRT_OUTGOING end if select case (status) case (PRT_BEAM); c_prt(i)%status = -9 case (PRT_INCOMING); c_prt(i)%status = -1 case (PRT_OUTGOING); c_prt(i)%status = 1 case (PRT_RESONANT); c_prt(i)%status = 2 case (PRT_VIRTUAL); c_prt(i)%status = 3 case default; c_prt(i)%status = 0 end select parent = prt%get_parents () select case (size (parent)) case (0) c_prt(i)%mother(1) = 0; c_prt(i)%mother(2) = 0 case (1) c_prt(i)%mother(1) = parent(1); c_prt(i)%mother(2) = 0 case (2) c_prt(i)%mother(1) = parent(1); c_prt(i)%mother(2) = parent(2) case default call msg_bug("[c_fill_particle_set] Too many parents. & &Please contact the WHIZARD developers.") end select color = prt%get_color () where (color > 0) c_prt(i)%color = 500 + color elsewhere c_prt(i)%color = 0 end where p = prt%get_momentum () c_prt(i)%momentum = p%p c_prt(i)%mass = invariant_mass(p) c_prt(i)%tau = prt%get_lifetime () c_prt(i)%spin = 9 if (polarization) then select case (prt%get_polarization_status ()) case (PRT_GENERIC_POLARIZATION) if (prt%get_n_parents () == 1) then parent = prt%get_parents () c_prt(i)%spin = polarization_to_spin & (prt%get_momentum (), prt%get_polarization (), & particle_set%prt(parent(1))%get_momentum ()) end if end select end if end associate end do end subroutine fill_c_particle_set real(default) function polarization_to_spin (p, pol, p_mother) result (spin) type(vector4_t), intent(in) :: p type(polarization_t), intent(in) :: pol type(vector4_t), intent(in) :: p_mother type(vector3_t) :: s3, p3 type(vector4_t) :: s4 ! TODO sbrass move the conversion of polarization to spin to a better place (with documentation) s3 = vector3_moving (pol%get_axis ()) p3 = space_part (p) s4 = rotation_to_2nd (3, p3) * vector4_moving (0._default, s3) spin = enclosed_angle_ct (s4, p_mother) end function polarization_to_spin end subroutine whizard_lha_set_event @ %def whizard_lha_set_event @ \subsection{Unit tests} \label{sec:whizard-lha-ut} Test module, followed by the corresponding implementation module. <<[[whizard_lha_ut.f90]]>>= <> module whizard_lha_ut use unit_tests use whizard_lha_uti <> <> contains <> end module whizard_lha_ut @ %def whizard_lha_ut @ <<[[whizard_lha_uti.f90]]>>= <> module whizard_lha_uti <> use io_units use whizard_lha use flavors, only: flavor_t use lorentz, only: vector4_at_rest use subevents, only: PRT_BEAM, PRT_INCOMING, PRT_OUTGOING, & PRT_UNDEFINED, PRT_VIRTUAL, PRT_RESONANT, PRT_BEAM_REMNANT use particles, only: particle_set_t <> <> contains <> end module whizard_lha_uti @ %def whizard_lha_uti @ API: driver for the unit tests below. <>= public :: whizard_lha_test <>= subroutine whizard_lha_test (u, results) integer, intent(in) :: u type(test_results_t), intent(inout) :: results <> end subroutine whizard_lha_test @ %def whizard_lha_test @ \subsubsection{Setup LHA User Process} <>= call test (whizard_lha_1, "whizard_lha_1", "Setup LHAupWhizard and& &initialize Beams.", u, results) <>= public :: whizard_lha_1 <>= subroutine whizard_lha_1 (u) integer, intent(in) :: u type(whizard_lha_t) :: lha integer :: i integer, parameter :: N_PROC = 5 real(default), dimension(N_PROC) :: xsec, xerror, max_weight write (u, "(A)") "* Test output: whizard_lha_1" write (u, "(A)") "* Purpose: Construct LHAupWhizard object and initialize the beams." write (u, *) xsec = [1.0, 1.2, 1.4, 1.6, 1.8] * 1e3 ! fb xerror = 0.05 * xsec max_weight = 1e-3 * xsec call lha%init () write (u, "(A)") write (u, "(A)") "* Set initialisation (Beams) and weighting strategy." write (u, "(A)") call lha%set_init & ([2212, 2212], [6500._default, 6500._default], 1, .true., .true.) write (u, "(A)") write (u, "(A)") "* Set process parameters for 5 different processes." write (u, "(A)") do i = 1, N_PROC call lha%set_process_parameters (process_id = i, & cross_section = xsec(i), error = xerror(i), & max_weight = max_weight(i)) end do call lha%list_init () write (u, "(A)") write (u, "(A)") "* Cleanup" call lha%final () end subroutine whizard_lha_1 @ %def whizard_lha_1 @ <>= call test (whizard_lha_2, "whizard_lha_2", "Setup LHAupWhizard& & and set event record.", u, results) <>= public :: whizard_lha_2 <>= subroutine whizard_lha_2 (u) integer, intent(in) :: u type(whizard_lha_t) :: lha integer :: i integer, parameter :: N_PROC = 1 real(default), dimension(N_PROC) :: xsec, xerror, max_weight type(particle_set_t) :: pset type(flavor_t), dimension(:), allocatable :: flv pset%n_beam = 2 pset%n_in = 2 pset%n_vir = 2 pset%n_out = 3 pset%n_tot = 9 write (u, "(A)") "* Test output: whizard_lha_2" write (u, "(A)") "* Purpose: Setup LHAupWhizard and set event record." write (u, "(A)") xsec = [1.0] * 1e3 xerror = 0.05 * xsec max_weight = 1e-3 * xsec call lha%init () write (u, "(A)") write (u, "(A)") "* Set initialisation (Beams) and weighting strategy." write (u, "(A)") call lha%set_init & ([2212, 2212], [6500._default, 6500._default], 1, .true., .true.) write (u, "(A)") write (u, "(A)") "* Set process parameters for 5 different processes." write (u, "(A)") do i = 1, N_PROC call lha%set_process_parameters (process_id = i, & cross_section = xsec(i), error = xerror(i), & max_weight = max_weight(i)) end do write (u, "(A)") write (u, "(A)") "* Set event record." write (u, "(A)") allocate (pset%prt (pset%n_tot)) call pset%prt(1)%reset_status (PRT_BEAM) call pset%prt(2)%reset_status (PRT_BEAM) call pset%prt(3)%reset_status (PRT_INCOMING) call pset%prt(4)%reset_status (PRT_INCOMING) call pset%prt(5)%reset_status (PRT_BEAM_REMNANT) call pset%prt(6)%reset_status (PRT_BEAM_REMNANT) call pset%prt(7)%reset_status (PRT_OUTGOING) call pset%prt(8)%reset_status (PRT_OUTGOING) call pset%prt(9)%reset_status (PRT_OUTGOING) call pset%prt(1)%set_children ([3,5]) call pset%prt(2)%set_children ([4,6]) call pset%prt(3)%set_children ([7,8,9]) call pset%prt(4)%set_children ([7,8,9]) call pset%prt(3)%set_parents ([1]) call pset%prt(4)%set_parents ([2]) call pset%prt(5)%set_parents ([1]) call pset%prt(6)%set_parents ([2]) call pset%prt(7)%set_parents ([3,4]) call pset%prt(8)%set_parents ([3,4]) call pset%prt(9)%set_parents ([3,4]) call pset%prt(1)%set_momentum (vector4_at_rest (1._default)) call pset%prt(2)%set_momentum (vector4_at_rest (2._default)) call pset%prt(3)%set_momentum (vector4_at_rest (4._default)) call pset%prt(4)%set_momentum (vector4_at_rest (6._default)) call pset%prt(5)%set_momentum (vector4_at_rest (3._default)) call pset%prt(6)%set_momentum (vector4_at_rest (5._default)) call pset%prt(7)%set_momentum (vector4_at_rest (7._default)) call pset%prt(8)%set_momentum (vector4_at_rest (8._default)) call pset%prt(9)%set_momentum (vector4_at_rest (9._default)) allocate (flv (9)) call flv%init ([2011, 2012, 11, 12, 91, 92, 3, 4, 5]) do i = 1, 9 call pset%prt(i)%set_flavor (flv(i)) end do call lha%set_event_process (1, 1000._default, 0.1_default, 1._default / 127., 1._default) call lha%set_event (1, pset) call lha%list_init () write (u, "(A)") write (u, "(A)") "* Cleanup" call lha%final () end subroutine whizard_lha_2 @ %def whizard_lha_2 \section{Pythia8} \label{sec:pythia8} <<[[pythia8.f90]]>>= <> module pythia8 <> <> <> <> <> <> <> <> <> contains <> end module pythia8 @ %def pythia8 @ <>= use, intrinsic :: iso_c_binding use constants, only: tiny_10, tiny_07 use diagnostics use iso_varying_string, string_t => varying_string use lorentz, only: assignment(=), operator(/=), & vector3_moving, vector4_t, vector4_moving, vector4_null, & vector4_write use numeric_utils, only: vanishes, nearly_equal use model_data, only: model_data_t, find_model use pdg_arrays, only: is_elementary, is_colored, is_gluon use colors, only: color_t use flavors, only: flavor_t use helicities, only: helicity_t use particles, only: particle_set_t, particle_t, & PRT_DEFINITE_HELICITY, PRT_GENERIC_POLARIZATION, PRT_UNPOLARIZED use event_base, only: generic_event_t use subevents, only: PRT_BEAM, PRT_INCOMING, PRT_OUTGOING, & PRT_UNDEFINED, PRT_VIRTUAL, PRT_RESONANT, PRT_BEAM_REMNANT use rng_base, only: rng_t use whizard_lha @ %def pythia8_modules @ Random generator wrapper. <>= type :: whizard_rndm_t class(rng_t), pointer :: rng end type whizard_rndm_t @ %def whizard_rndm_t @ <>= public :: pythia8_t <>= type :: pythia8_t private type(c_ptr) :: cptr type(whizard_rndm_t) :: rndm contains <> end type pythia8_t @ %def pythia8_t @ Init. Construct a C++-Pythia8 object and store it in an opaque type. <>= procedure :: init => whizard_pythia8_init <>= interface function new_pythia8 (print_banner) bind(C) result (cptr) import type(c_ptr) :: cptr logical(c_bool), value, intent(in) :: print_banner end function new_pythia8 end interface <>= subroutine whizard_pythia8_init (pythia, verbose) class(pythia8_t), intent(out) :: pythia logical, intent(in), optional :: verbose logical(c_bool) :: verbose_opt verbose_opt = .false. if (present (verbose)) verbose_opt = verbose pythia%cptr = new_pythia8 (verbose_opt) if (.not. verbose_opt) & call pythia%read_string (var_str ("Print:quiet = on")) end subroutine whizard_pythia8_init @ %def whizard_pythia8_init @ Finalize. Destruct the C++-Ptyhia object. <>= procedure :: final => whizard_pythia8_final <>= interface subroutine pythia8_delete (pythia) bind(C) import type(c_ptr), value :: pythia end subroutine pythia8_delete end interface <>= subroutine whizard_pythia8_final (pythia) class(pythia8_t), intent(inout) :: pythia call pythia8_delete (pythia%cptr) end subroutine whizard_pythia8_final @ %def whizard_pythia8_final @ Set pointer to a LHA User Process object. <>= procedure :: set_lhaup_ptr => whizard_pythia8_set_lhaup_ptr <>= interface function pythia8_set_lhaup_ptr (cptr, whizard_lha) bind(C) result (flag) import type(c_ptr), intent(in), value :: cptr type(c_ptr), intent(in), value :: whizard_lha logical(c_bool) :: flag end function pythia8_set_lhaup_ptr end interface <>= subroutine whizard_pythia8_set_lhaup_ptr (pythia, whizard_lha) class(pythia8_t), intent(inout) :: pythia type(whizard_lha_t), intent(in) :: whizard_lha logical(c_bool) :: flag flag = pythia8_set_lhaup_ptr (pythia%cptr, whizard_lha%get_ptr ()) end subroutine whizard_pythia8_set_lhaup_ptr @ %def whizard_pythia8_set_lhaup_ptr @ Import random number generator. We store a pointer to a target [[rng]] provided by the calling function in the container [[whizard_rndm_t]]. The C-interface expects a C-pointer which we retrieve with [[c_loc]] from the container. The container is an opaque objects for C and is a place-holder for the polymorphic object [[rng]]. When [[Pythia8]] requests a random-number, then we have to reverse the containment of [[rng]] inside a container. The container is mapped back to a Fortran pointer where we can access the target [[rng]] and generate a random number. <>= procedure :: import_rng => whizard_pythia8_import_rng <>= interface function pythia8_set_rndm_engine_ptr (pythia, whizard_rndm) bind(C) result (flag) import type(c_ptr), intent(in), value :: pythia type(c_ptr), intent(in), value :: whizard_rndm logical(c_bool) :: flag end function pythia8_set_rndm_engine_ptr end interface <>= subroutine whizard_pythia8_import_rng (pythia, rng) class(pythia8_t), intent(inout), target :: pythia class(rng_t), allocatable, intent(in), target :: rng logical :: flag pythia%rndm%rng => rng flag = pythia8_set_rndm_engine_ptr (pythia%cptr, c_loc (pythia%rndm)) if (.not. flag) then call msg_bug ("[whizard_pythia8_import_rng] Cannot export RNG to Pythia8.") end if end subroutine whizard_pythia8_import_rng function whizard_rndm_generate (whizard_rndm) bind(C) result (c_x) type(c_ptr), intent(in), value :: whizard_rndm real(c_double) :: c_x real(default) :: x type(whizard_rndm_t), pointer :: f_whizard_rndm call c_f_pointer (whizard_rndm, f_whizard_rndm) if (.not. associated (f_whizard_rndm)) then call msg_bug ("[whizard_rndm_generate] Cannot import pointer to RNG object from Pythia8.") end if call f_whizard_rndm%rng%generate (x) c_x = real (x, c_double) end function whizard_rndm_generate @ %def pythia8_import_rng @ Seed [[PYTHIA8]] random generator. Unfortunately, it is impossible to export the random number generator to C and back to Fortran again in such a way that multiple instances of [[PYTHIA8]] could exist coherently. <>= procedure :: set_rng_seed => pythia8_set_rng_seed <>= subroutine pythia8_set_rng_seed (pythia, r) class(pythia8_t), intent(inout) :: pythia real(default), intent(in) :: r real(default), parameter :: MAX_SEED = 900000000._default character(len=10) :: buffer; type(string_t) :: string write (buffer, "(I10)") floor (r * MAX_SEED) string = var_str ("Random:seed = " // buffer) call pythia%read_string (string) end subroutine pythia8_set_rng_seed @ %def pythia8_set_rng_seed @ Read Pythia8 settings from file with path [[filename]]. <>= procedure :: read_file => whizard_pythia8_read_file <>= interface function pythia8_read_file (cptr, filename, subrun) bind(C) result (flag) import type(c_ptr), intent(in), value :: cptr character(kind=c_char), dimension(*), intent(in) :: filename integer(c_int), intent(in), value :: subrun logical(c_bool) :: flag end function pythia8_read_file end interface <>= subroutine whizard_pythia8_read_file (pythia, filename, subrun) class(pythia8_t), intent(inout) :: pythia type(string_t), intent(in) :: filename integer, intent(in), optional :: subrun character(len(filename) + 1, kind=c_char) :: c_filename integer(c_int) :: c_subrun logical(c_bool) :: flag c_filename = filename // c_null_char if (present (subrun)) then c_subrun = subrun else c_subrun = -1 end if flag = pythia8_read_file (pythia%cptr, c_filename, c_subrun) end subroutine whizard_pythia8_read_file @ %def whizard_pythia8_read_file @ Read a single Pythia8 string. <>= integer, parameter :: C_MAX_STR_LEN = 100 <>= procedure :: read_string => whizard_pythia8_read_string <>= interface function pythia8_read_string (cptr, str) bind(C) result (flag) import type(c_ptr), intent(in), value :: cptr character(kind=c_char), dimension(*), intent(in) :: str logical(c_bool) :: flag end function pythia8_read_string end interface <>= subroutine whizard_pythia8_read_string (pythia, str) class(pythia8_t), intent(in) :: pythia type(string_t), intent(in) :: str character(len(str) + 1, kind=c_char) :: c_str logical(c_bool) :: flag c_str = char (str) // c_null_char flag = pythia8_read_string (pythia%cptr, c_str) end subroutine whizard_pythia8_read_string @ %def whizardd_pythia8_read_string @ Parse and set the configuration string. Different options are separeted either by a newline or by [[;]]. First, we separate lines, then we check on [[;]]. If none found, we take the line as valid [[PYTHIA8]] string, else we the separate string into tokens which we expect to be valid [[PYTHIA8]] tokens. We have to take care of the case that the remaining string is empty after splitting with respect to [[;]]. <>= procedure :: parse_and_set_config => whizard_pythia8_parse_and_set_config <>= subroutine whizard_pythia8_parse_and_set_config (pythia, config) class(pythia8_t), intent(in) :: pythia type(string_t), intent(in) :: config type(string_t) :: stream, line, token if (debug_on) call msg_debug (D_SHOWER, "whizard_pythia8_parse_and_set_config") if (len (config) == 0) return stream = config do while (len (stream) > 0) call split (stream, line, new_line("A")) if (debug_active (D_SHOWER)) & print *, "LINE: ", char(line), " | ", char(stream) if (index (line, ";") == 0) then call pythia%read_string (trim(line)) else token = line do while (len (line) > 0) call split (line, token, ";") if (debug_active (D_SHOWER)) & print *, "→ ", char(token), " | ", char(line) call pythia%read_string (trim(token)) end do end if end do end subroutine whizard_pythia8_parse_and_set_config @ %def whizard_pythia8_parse_and_set_config @ @ Initialize the Pythia8 object itself after the complete setup has been done. <>= procedure :: init_pythia => whizard_pythia8_init_pythia <>= interface function pythia8_init (cptr) bind(C) result (flag) import type(c_ptr), intent(in), value :: cptr logical(c_bool) :: flag end function pythia8_init end interface <>= subroutine whizard_pythia8_init_pythia (pythia) class(pythia8_t), intent(in) :: pythia logical(c_bool) :: flag flag = pythia8_init (pythia%cptr) if (.not. flag) then call msg_fatal ("[whizard_pythia8_init_pythia] Pythia8 initialisation failed.") end if end subroutine whizard_pythia8_init_pythia @ %def whizard_pythia8_init_pythia @ Generate the next event in Pythia. Before the a new event has to be set with the LHA User Process interface of WHIZARD. <>= procedure :: next => whizard_pythia8_next <>= interface function pythia8_next (cptr) bind(C) result (flag) import type(c_ptr), intent(in), value :: cptr logical(c_bool) :: flag end function pythia8_next end interface <>= subroutine whizard_pythia8_next (pythia, flag) class(pythia8_t), intent(inout) :: pythia logical, intent(out), optional :: flag logical(c_bool) :: c_flag c_flag = pythia8_next (pythia%cptr) if (present (flag)) flag = c_flag end subroutine whizard_pythia8_next @ %def whizard_pythia8_next @ List the current Les Houches event taken from the LHA Whizard interface or the last event generated by [[PYTHIA8]]. The procedure is for debug purpose only as the information are written to [[cout]] (hard-wired). <>= procedure :: list_lha_event => whizard_pythia8_list_lha_event procedure :: list_event => whizard_pythia8_list_event <>= interface subroutine pythia8_list_lha_event (cptr) bind(C) import type(c_ptr), intent(in), value :: cptr end subroutine pythia8_list_lha_event end interface interface subroutine pythia8_list_event (cptr) bind(C) import type(c_ptr), intent(in), value :: cptr end subroutine pythia8_list_event end interface <>= subroutine whizard_pythia8_list_lha_event (pythia) class(pythia8_t), intent(in) :: pythia call pythia8_list_lha_event (pythia%cptr) end subroutine whizard_pythia8_list_lha_event subroutine whizard_pythia8_list_event (pythia) class(pythia8_t), intent(in) :: pythia call pythia8_list_event (pythia%cptr) end subroutine whizard_pythia8_list_event @ %def whizard_pythia8_list_event @ Get event size. We retrieve the number of particles associated with the last event record in Pythia8. The first event entry is the overall system which we neglect. <>= procedure :: get_event_size => whizard_pythia8_get_event_size <>= interface function pythia8_get_event_size (cptr) bind(C) result(n) import type(c_ptr), intent(in), value :: cptr integer(c_int) :: n end function pythia8_get_event_size end interface <>= function whizard_pythia8_get_event_size (pythia) result(n) class(pythia8_t), intent(in) :: pythia integer :: n integer(c_int) :: c_n c_n = pythia8_get_event_size (pythia%cptr) n = c_n - 1 end function whizard_pythia8_get_event_size @ %def whizard_pythia8_get_event_size @ Get the ith particle from the current event record in Pythia8. <>= procedure, private :: get_single_event => whizard_pythia8_get_single_event <>= interface function pythia8_get_single_event (cptr, index) bind(C) result (particle) import type(c_ptr), intent(in), value :: cptr integer(c_int), intent(in), value :: index type(lha_particle_t) :: particle end function pythia8_get_single_event end interface <>= function whizard_pythia8_get_single_event (pythia, index) result (particle) class(pythia8_t), intent(in) :: pythia integer, intent(in) :: index type(lha_particle_t) :: particle integer(c_int) :: c_index c_index = index particle = pythia8_get_single_event (pythia%cptr, c_index) end function whizard_pythia8_get_single_event @ %def whizard_get_single_event @ Convenient getter methods. <>= interface function pythia8_get_particle_status (cptr, index) bind(C) result (status) import type(c_ptr), intent(in), value :: cptr integer(c_int), intent(in), value :: index integer(c_int) :: status end function pythia8_get_particle_status end interface interface function pythia8_get_particle_id (cptr, index) bind(C) result (status) import type(c_ptr), intent(in), value :: cptr integer(c_int), intent(in), value :: index integer(c_int) :: status end function pythia8_get_particle_id end interface interface subroutine pythia8_get_particle_momentum (cptr, index, momentum) bind(C) import type(c_ptr), intent(in), value :: cptr integer(c_int), intent(in), value :: index real(c_double), dimension(*), intent(out) :: momentum end subroutine pythia8_get_particle_momentum end interface <>= procedure, private :: get_particle_status => & whizard_pythia8_get_particle_status procedure, private :: get_particle_id => whizard_pythia8_get_particle_id procedure, private :: get_particle_momentum => & whizard_pythia8_get_particle_momentum procedure :: get_final_colored_ME_momenta => & whizard_pythia8_get_final_colored_ME_momenta <>= function whizard_pythia8_get_particle_status (pythia, index) result (status) class(pythia8_t), intent(in) :: pythia integer, intent(in) :: index integer :: status status = pythia8_get_particle_status (pythia%cptr, int(index, c_int)) end function whizard_pythia8_get_particle_status function whizard_pythia8_get_particle_id (pythia, index) result (id) class(pythia8_t), intent(in) :: pythia integer, intent(in) :: index integer :: id id = pythia8_get_particle_id (pythia%cptr, int(index, c_int)) end function whizard_pythia8_get_particle_id function whizard_pythia8_get_particle_momentum & (pythia, index) result (momentum) class(pythia8_t), intent(in) :: pythia integer, intent(in) :: index real(default), dimension(4) :: momentum real(c_double), dimension(4) :: c_momentum call pythia8_get_particle_momentum (pythia%cptr, index, c_momentum) momentum = real (c_momentum, kind=default) end function whizard_pythia8_get_particle_momentum subroutine whizard_pythia8_get_final_colored_ME_momenta & (pythia, momenta) class(pythia8_t), intent(in) :: pythia type(vector4_t), dimension(:), allocatable, intent(out) :: momenta logical, dimension(:), allocatable :: mask integer, parameter :: PYTHIA8_HARD_PROCESS_OUTGOING = 23 integer :: i, j, n_particles, id, status if (debug_on) call msg_debug (D_TRANSFORMS, "whizard_pythia8_get_final_colored_ME_momenta") n_particles = pythia%get_event_size () allocate (mask(n_particles), source=.false.) do i = 1, n_particles status = pythia%get_particle_status (i) id = pythia%get_particle_id (i) if (abs (status) == PYTHIA8_HARD_PROCESS_OUTGOING & .and. (id == 21 .or. abs(id) <= 6)) mask(i) = .true. ! Particle record is ordered. First beam, beam remnants, then hard process, second hard process and so on... ! if (abs(status) > 30) exit end do if (all (.not. mask)) return allocate (momenta(count(mask))) j = 1 do i = 1, n_particles if (.not. mask(i)) cycle momenta(j) = pythia%get_particle_momentum(i) j = j + 1 end do end subroutine whizard_pythia8_get_final_colored_ME_momenta @ %def whizard_pythia8_get_particle_status @ %def whizard_pythia8_get_particle_momentum @ Get a logical mask on the shower entries in the current Pythia event record. We skip the zeroth entry whichs holds overall system information. We retrieve beam entries only when [[?ps_isr_active]] else we skip the two beam entries. Furthermore, we check that all [[PYTHIA8]] have a valid status code. We expect that the event record has been generated with [[HadronLevel:all = Off]]. Furthermore, we skip entries which are found in a reference particle set, or are too soft. <>= procedure, private :: get_shower_mask => pythia8_get_shower_mask <>= subroutine pythia8_get_shower_mask (pythia, pset, mask, recover_beams) class(pythia8_t), intent(in) :: pythia type(particle_set_t), intent(in) :: pset logical, dimension(:), allocatable, intent(out) :: mask logical, intent(in) :: recover_beams integer :: skip_beams, i type(lha_particle_t) :: c_prt if (allocated (mask)) deallocate (mask) allocate (mask(pythia%get_event_size ()), source=.true.) if (.not. recover_beams) then skip_beams = 2 mask(1:2) = .false. else skip_beams = 0 end if do i = 1 + skip_beams, size(mask) c_prt = pythia%get_single_event (i) ! Search for unchanged entries mask(i) = (reverse_find_particle (c_prt, pset) == 0) end do end subroutine pythia8_get_shower_mask @ %def pythia8_get_shower_mask @ Reverse find an existing entry in [[particle_set]]. Returns zero if non is found. <>= pure function reverse_find_particle (c_prt, particle_set) result (idx) type(lha_particle_t), intent(in) :: c_prt type(particle_set_t), intent(in) :: particle_set integer :: idx type(vector4_t) :: momentum momentum = real (c_prt%momentum, default) idx = particle_set%reverse_find_particle (c_prt%id, momentum, tiny_10, tiny_07) end function reverse_find_particle @ %def reverse_find_particle # Get a logical mask on the full hadronic entries in the current [[PYTHIA8]] event record. The hadronic event record doesn't hold information about beams as those are only relevant in context of a partonic event. We expect that the event record has been generated with [[ProcessLevel:all = Off]]. Furthermore, we skip entries which are found in a reference particle set. <>= procedure, private :: get_hadron_mask => pythia8_get_hadron_mask <>= subroutine pythia8_get_hadron_mask (pythia, pset, mask) class(pythia8_t), intent(in) :: pythia type(particle_set_t), intent(in) :: pset logical, dimension(:), allocatable, intent(out) :: mask integer :: i integer(c_int) :: c_i_prt type(lha_particle_t) :: c_prt type(vector4_t) :: momentum if (allocated (mask)) deallocate (mask) allocate (mask(pythia%get_event_size ()), source=.true.) do i = 1, size(mask) c_prt = pythia%get_single_event (i) ! Search for unchanged entries mask(i) = (reverse_find_particle (c_prt, pset) == 0) end do end subroutine pythia8_get_hadron_mask @ %def pythia8_get_shower_mask @ Get [[particle_set]] from [[PYTHIA8]]. A model and a fallback model have to be provided to declare the correct particle content with a PDG code. We take a particle set and add the new particles by parton shower. The polarization is explicity set (unpolarized or density matrix) which is common to all particles. Correlated polarization information is not available. We recover beam particles only if explicitly stated. Pythia8 stores [[n_tot + 1]] particles where the zeroth particle represents the overall system. We simply discard the zeroth event. <>= procedure :: get_shower_particles => whizard_pythia8_get_shower_particles <>= interface function pythia8_get_n_mothers (cptr, i_prt) bind(C) result (n_mothers) import type(c_ptr), intent(in), value :: cptr integer(c_int), value, intent(in) :: i_prt integer(c_int) :: n_mothers end function pythia8_get_n_mothers subroutine pythia8_get_mother_array (cptr, i_prt, n_mothers, mother) bind (C) import type(c_ptr), intent(in), value :: cptr integer(c_int), value :: i_prt integer(c_int), value :: n_mothers integer(c_int), dimension(*), intent(out) :: mother end subroutine pythia8_get_mother_array function pythia8_get_n_daughters (cptr, i_prt) bind(C) result (n_daughters) import type(c_ptr), intent(in), value :: cptr integer(c_int), value, intent(in) :: i_prt integer(c_int) :: n_daughters end function pythia8_get_n_daughters subroutine pythia8_get_daughter_array (cptr, i_prt, n_daughters, daughter) bind (C) import type(c_ptr), intent(in), value :: cptr integer(c_int), value :: i_prt integer(c_int), value :: n_daughters integer(c_int), dimension(*), intent(out) :: daughter end subroutine pythia8_get_daughter_array function pythia8_get_status_hepmc (cptr, i_prt) bind(C) result (status) import type(c_ptr), intent(in), value :: cptr integer(c_int), value, intent(in) :: i_prt integer(c_int) :: status end function pythia8_get_status_hepmc subroutine pythia8_get_decay_vertex (cptr, i_prt, time, vertex) bind(C) import type(c_ptr), intent(in), value :: cptr integer(c_int), value, intent(in) :: i_prt real(c_double), intent(out) :: time real(c_double), dimension(3), intent(out) :: vertex end subroutine pythia8_get_decay_vertex end interface <>= subroutine whizard_pythia8_get_shower_particles & (pythia, model, model_fallback, particle_set, helicity, recover_beams) class(pythia8_t), intent(in) :: pythia class(model_data_t), intent(in), target :: model, model_fallback type(particle_set_t), intent(inout) :: particle_set integer, intent(in), optional :: helicity logical, intent(in), optional :: recover_beams integer :: n_particles, n_old logical, dimension(:), allocatable :: mask type(particle_t), dimension(:), allocatable :: particle integer :: helicity_opt logical :: recover_beams_opt if (debug_on) call msg_debug (D_SHOWER, "whizard_pythia8_get_particle_set") recover_beams_opt = .false.; if (present (recover_beams)) & recover_beams_opt = recover_beams helicity_opt = PRT_UNPOLARIZED; if (present (helicity)) & helicity_opt = helicity call pythia%get_shower_mask (particle_set, mask, recover_beams) n_particles = pythia%get_event_size () if (.not. recover_beams_opt) n_particles = n_particles - 2 allocate (particle(n_particles)) call pythia%get_particles (model, model_fallback, mask, particle, particle_set, & helicity_opt, recover_beams_opt) end subroutine whizard_pythia8_get_shower_particles @ %def whizard_pythia8_get_shower_particles @ Get hadron particles. Retrieve the full particle, respective the beam entries. <>= procedure :: get_hadron_particles => whizard_pythia8_get_hadron_particles <>= subroutine whizard_pythia8_get_hadron_particles & (pythia, model, model_fallback, particle_set, helicity) class(pythia8_t), intent(in) :: pythia class(model_data_t), intent(in), target :: model, model_fallback type(particle_set_t), intent(inout) :: particle_set integer, intent(in), optional :: helicity integer :: n_particles logical, dimension(:), allocatable :: mask type(particle_t), dimension(:), allocatable :: particle integer, dimension(:), allocatable :: pythia_idx, whizard_idx integer :: helicity_opt if (debug_on) call msg_debug (D_TRANSFORMS, "whizard_pythia8_get_particle_set") helicity_opt = PRT_UNPOLARIZED; if (present (helicity)) & helicity_opt = helicity call pythia%get_hadron_mask (particle_set, mask) n_particles = pythia%get_event_size () allocate (particle(n_particles)) call pythia%get_particles (model, model_fallback, mask, particle, particle_set, & helicity_opt, recover_beams = .true.) end subroutine whizard_pythia8_get_hadron_particles @ %def whizard_pythia8_get_hadron_particles @ Get particles from [[PYTHIA8]]. We take care of the status code of former outgoing particles (i.e. the unchanged particles entries of the outgoing particles of the hard process) and change it to [[PRT_VIRTUAL]]. <>= procedure, private :: get_particles => whizard_pythia8_get_particles <>= subroutine whizard_pythia8_get_particles (& pythia, model, model_fallback, mask, particle, particle_set, & helicity, recover_beams) class(pythia8_t), intent(in) :: pythia class(model_data_t), intent(in), target :: model, model_fallback logical, dimension(:), intent(in) :: mask type(particle_t), dimension(:), allocatable, intent(inout) :: particle type(particle_set_t), intent(inout) :: particle_set integer, intent(in) :: helicity logical, intent(in) :: recover_beams integer, dimension(:), allocatable :: pythia_idx, whizard_idx if (debug_on) call msg_debug (D_SHOWER, "whizard_pythia8_get_particles") call pythia%import_pythia_particles (& model, model_fallback, mask, particle, particle_set, & pythia_idx, whizard_idx, helicity, recover_beams) call particle_set%replace (particle) call pythia%get_parent_child_relation (& pythia_idx, whizard_idx, particle_set, recover_beams) where (particle_set%prt%status == PRT_OUTGOING .and. & particle_set%prt%has_children ()) & particle_set%prt%status = PRT_VIRTUAL end subroutine whizard_pythia8_get_particles @ %def whizard_pythia8_get_particles <>= procedure, private :: import_pythia_particles => pythia8_import_pythia_particles <>= subroutine pythia8_import_pythia_particles (& pythia, model, model_fallback, mask, particle, particle_set, & pythia_idx, whizard_idx, helicity, recover_beams) class(pythia8_t), intent(in) :: pythia class(model_data_t), intent(in), target :: model, model_fallback logical, dimension(:), intent(in) :: mask type(particle_t), dimension(:), intent(inout) :: particle type(particle_set_t), intent(in) :: particle_set integer, dimension(:), allocatable, intent(out) :: pythia_idx, whizard_idx integer, intent(in) :: helicity logical, intent(in) :: recover_beams integer :: i_whizard, i_pythia, idx, skip_beams real(default) :: time real(default), dimension(3) :: vertex type(vector4_t) :: momentum type(lha_particle_t) :: c_prt allocate (whizard_idx(size (mask)), source = 0) allocate (pythia_idx(size (particle)), source = 0) i_whizard = 0; if (recover_beams) then skip_beams = 0 else skip_beams = 2 end if ADD_PARTICLE: do i_pythia = 1 + skip_beams, size(mask) idx = -1 c_prt = pythia%get_single_event (i_pythia) ! Check on exisiting particle entry if (.not. mask(i_pythia)) then ! Retrieve particle from original particle_set whizard_idx(i_pythia) = reverse_find_particle (c_prt, particle_set) idx = reverse_find_particle (c_prt, particle_set) ! Skip entry completely if (idx > 0) then i_whizard = i_whizard + 1 particle(i_whizard) = particle_set%get_particle (idx) whizard_idx(i_pythia) = i_whizard pythia_idx(i_whizard) = i_pythia if (debug2_active (D_SHOWER)) then print *, "Reverse search for particle ", i_pythia, " with PDG: ", c_prt%id print *, "Momentum: ", c_prt%momentum print *, "Found: ", whizard_idx(i_pythia) end if cycle ADD_PARTICLE end if ! Fallthrough: We could not retrieve the particle from our set, retrieve it from PYTHIA8. end if ! idx is exactly zero iff the reverse particle search failed. if (mask(i_pythia) .or. idx == 0) then i_whizard = i_whizard + 1 call get_particle_status (i_pythia, c_prt, particle(i_whizard)) call fill_particle (model, model_fallback, helicity, c_prt, particle(i_whizard)) ! call get_particle_color (i_color, dangling_color, c_prt%status, particle(i_whizard)) call get_particle_vertex (i_pythia, particle(i_whizard)) whizard_idx(i_pythia) = i_whizard pythia_idx(i_whizard) = i_pythia end if if (debug2_active (D_SHOWER)) then print *, "Shower: ", mask(i_pythia) print *, "i_pythia: ", i_pythia, " → i_whizard: ", whizard_idx(i_pythia) end if end do ADD_PARTICLE contains subroutine get_particle_status (i_pythia, c_particle, particle) integer, intent(in) :: i_pythia type(lha_particle_t), intent(in) :: c_particle type(particle_t), intent(inout) :: particle integer :: whizard_status select case (pythia8_get_status_hepmc & (pythia%cptr, int(i_pythia, c_int))) case(1); whizard_status = (PRT_OUTGOING) case(2); whizard_status = (PRT_RESONANT) case(4); whizard_status = (PRT_BEAM) case default; if (c_particle%status < 0) & whizard_status = PRT_VIRTUAL end select if (debug2_active (D_SHOWER) .or. debug2_active (D_TRANSFORMS)) then write (*, "(1X,A,1X,I0)") "Particle's status code:", i_pythia write (*, "(1X,3(A,1X,I0,1X))") "HEPMC:", pythia8_get_status_hepmc (pythia%cptr, int(i_pythia, c_int)), & "PYTHIA:", c_particle%status, & "WHIZARD:", whizard_status end if call particle%set_status (whizard_status) end subroutine get_particle_status subroutine fill_particle & (model_in, model_fallback, polarization, c_prt, prt) type(lha_particle_t), intent(in) :: c_prt class(model_data_t), intent(in), target :: model_in, model_fallback type(particle_t), intent(inout) :: prt integer, intent(in) :: polarization integer :: whizard_status, hmax class(model_data_t), pointer :: model type(flavor_t) :: flv type(color_t) :: color type(helicity_t) :: hel type(vector4_t) :: p integer :: col, acol call find_model (model, c_prt%id, model_in, model_fallback) call flv%init (c_prt%id, model) col = max (c_prt%color(1), 0) acol = max (c_prt%color(2), 0) call color%init_col_acl (col, acol) if (flv%is_beam_remnant ()) & call prt%set_status (PRT_BEAM_REMNANT) call prt%set_flavor (flv); call prt%set_color (color) p = real (c_prt%momentum, kind=default) call prt%set_momentum (p, real (c_prt%mass**2, default)) select case (polarization) case (PRT_DEFINITE_HELICITY) if (abs (c_prt%spin) <= 1.) then hmax = flv%get_spin_type () / 2. call hel%init (sign (hmax, nint (c_prt%spin))) call prt%set_helicity (hel) end if case (PRT_GENERIC_POLARIZATION) call msg_fatal ("[whizard_pythia8_get_particle_set]" // & "generic polarization with Pythia8 not defined.") case (PRT_UNPOLARIZED) case default call msg_bug ("[whizard_pythia8_get_particle]" // & "Helicity handling is undefined.") end select if (.not. vanishes (real (c_prt%tau, kind=default))) & call prt%set_lifetime (real (c_prt%tau, kind=default)) end subroutine fill_particle subroutine get_particle_vertex (i_pythia, particle) integer, intent(in) :: i_pythia type(particle_t), intent(inout) :: particle real(c_double) :: time real(c_double), dimension(3) :: vertex type(vector4_t) :: vtx4 call pythia8_get_decay_vertex (pythia%cptr, i_pythia, time, vertex) vtx4 = vector4_moving (real (time, kind=default), & vector3_moving (real (vertex, kind=default))) if (vtx4 /= vector4_null) call particle%set_vertex (vtx4) end subroutine get_particle_vertex end subroutine pythia8_import_pythia_particles @ %def pythia8_import_pythia_particles @ Check on beam particle. <>= procedure, private :: is_beam_particle => pythia8_is_beam_particle <>= function pythia8_is_beam_particle (pythia, i_pythia) result (flag) class(pythia8_t), intent(in) :: pythia integer, intent(in) :: i_pythia logical :: flag integer(c_int) :: c_i_pythia integer, parameter :: HEPMC_BEAM_PRT = 4 c_i_pythia = int(i_pythia, c_int) flag = HEPMC_BEAM_PRT == pythia8_get_status_hepmc (pythia%cptr, c_i_pythia) end function pythia8_is_beam_particle @ %pythia8_is_beam_particle @ Get parent child relation from [[PYTHIA8]]. Apply the parent child relations from [[PYTHIA8]] to previously filled particle set. <>= procedure, private :: get_parent_child_relation => pythia8_get_parent_child_relation <>= subroutine pythia8_get_parent_child_relation (& pythia, pythia_idx, whizard_idx, particle_set, recover_beams) class(pythia8_t), intent(in) :: pythia integer, dimension(:), intent(in) :: pythia_idx, whizard_idx type(particle_set_t), intent(inout) :: particle_set logical, intent(in) :: recover_beams integer(c_int) :: c_n_parents, c_n_children, c_i_pythia integer, dimension(:), allocatable :: parent, child integer :: i_pythia, i, skip_beams if (debug_on) call msg_debug (D_SHOWER, "pythia8_get_parent_child_relation") skip_beams = 0; if (recover_beams) skip_beams = 2 do i_pythia = 1 + skip_beams, size(whizard_idx) if (whizard_idx(i_pythia) == 0) cycle c_i_pythia = int(i_pythia, c_int) c_n_parents = pythia8_get_n_mothers (pythia%cptr, c_i_pythia) c_n_children = pythia8_get_n_daughters (pythia%cptr, c_i_pythia) allocate (parent(c_n_parents), child(c_n_children)) parent = 0; child = 0 if (c_n_parents > 0) then call pythia8_get_mother_array (pythia%cptr, c_i_pythia, c_n_parents, parent) if (count (parent > 0) > 0) then if (debug2_active (D_SHOWER) .or. debug2_active (D_TRANSFORMS)) then write (*, "(1X,A,1X,I0)") "Particle's parents ", whizard_idx(i_pythia) do i = 1, c_n_parents if (parent(i) > 0) & write (*, "(1X,I0,1X,'(',I0,')',1X)", advance="no") parent(i), whizard_idx(parent(i)) end do write (*, *) end if call particle_set%prt(whizard_idx(i_pythia))%set_parents (& whizard_idx(pack(parent, parent > 0))) end if end if if (c_n_children > 0) then call pythia8_get_daughter_array (pythia%cptr, c_i_pythia, c_n_children, child) if (count (child > 0) > 0) then if (debug2_active (D_SHOWER) .or. debug2_active (D_TRANSFORMS)) then write (*, "(1X,A,1X,I0)") "Particle's children ", whizard_idx(i_pythia) do i = 1, c_n_children if (child(i) > 0) & write (*, "(1X,I0,1X,'(',I0,')',1X)", advance="no") child(i), whizard_idx(child(i)) end do write (*, *) end if call particle_set%prt(whizard_idx(i_pythia))%set_children (& whizard_idx(pack (child, child > 0))) end if end if deallocate (parent, child) end do end subroutine pythia8_get_parent_child_relation @ %def pythia8_get_parent_child_relation @ \subsection{Unit tests} \label{sec:whizard-lha-ut} Test module, followed by the corresponding implementation module. <<[[pythia8_ut.f90]]>>= <> module pythia8_ut use unit_tests use pythia8_uti <> <> contains <> end module pythia8_ut @ %def pythia8_ut @ <<[[pythia8_uti.f90]]>>= <> module pythia8_uti <> use io_units use iso_varying_string, string_t => varying_string use model_data, only: model_data_t use particles, only: particle_t, PRT_DEFINITE_HELICITY, PRT_GENERIC_POLARIZATION use rng_base, only: rng_t use rng_stream, only: rng_stream_t use whizard_lha use pythia8 <> <> contains <> end module pythia8_uti @ %def pythia8_uti @ API: driver for the unit tests below. <>= public :: pythia8_test <>= subroutine pythia8_test (u, results) integer, intent(in) :: u type(test_results_t), intent(inout) :: results <> end subroutine pythia8_test @ %def pythia8_test @ \subsubsection{Setup Pythia8} <>= call test (pythia8_1, "pythia8_1", "Construct and destruct Pythia8 object", u, results) <>= public :: pythia8_1 <>= subroutine pythia8_1 (u) integer, intent(in) :: u type(pythia8_t) :: pythia type(whizard_lha_t) :: lha write (u, "(A)") "* Test output: pythia8_1" write (u, "(A)") "* Purpose: Construct and destruct a Pythia8 object." write (u, "(A)") write (u, "(A)") write (u, "(A)") "* Construct Pythia8 object." write (u, "(A)") call pythia%init () write (u, "(A)") write (u, "(A)") "* Destruct Pythia8 object." write (u, "(A)") call pythia%final () end subroutine pythia8_1 @ %def pythia8_1 @ <>= call test (pythia8_2, "pythia8_2", "Initialize Pythia8 with a LHA User Process object.", u, results) <>= public :: pythia8_2 <>= subroutine pythia8_2 (u) integer, intent(in) :: u type(pythia8_t) :: pythia type(whizard_lha_t) :: lha integer :: i integer, parameter :: N_PROC = 5 real(default), dimension(N_PROC) :: xsec, xerror, max_weight write (u, "(A)") "* Test output: pythia8_2" write (u, "(A)") & "* Purpose: Initialize Pythia8 with a LHA User Process object.." write (u, "(A)") write (u, "(A)") write (u, "(A)") "* Construct Pythia8 object." write (u, "(A)") call pythia%init () write (u, "(A)") write (u, "(A)") "* Read string 'Beam:frameType = 5' into " // & "Pythia8 allowing for LHA user processes." write (u, "(A)") call pythia%read_string (var_str ("Beams:frameType = 5")) call pythia%read_string (var_str ("Random:setSeed = on")) call pythia%read_string (var_str ("Random:seed = 1234")) write (u, "(A)") write (u, "(A)") & "* Setup LHA User Process object and let Pythia8 point to it." write (u, "(A)") call lha%init () call lha%set_init & - ([2212, 2212], [6500._default, 6500._default], 1, .true., .true.) + ([2212, 2212], [6500._default, 6500._default], 1, .false., .false.) - xsec = [1.0, 1.2, 1.4, 1.6, 1.8] * 1e3 ! fb - xerror = 0.05 * xsec - max_weight = 1e-3 * xsec + xsec = [1.0, 1.2, 1.4, 1.6, 1.8] * 1e3_default ! fb + xerror = 0.05_default * xsec + max_weight = 1e-3_default * xsec do i = 1, N_PROC call lha%set_process_parameters (process_id = i, & cross_section = xsec(i), error = xerror(i), & max_weight = max_weight(i)) end do call pythia%set_lhaup_ptr (lha) write (u, "(A)") write (u, "(A)") "* Initialize Pythia8." write (u, "(A)") call pythia%init_pythia () write (u, "(A)") write (u, "(A)") "* Destruct Pythia8 object." write (u, "(A)") call pythia%final () end subroutine pythia8_2 @ %def pythia8_2 @ Index: trunk/src/pythia8/Pythia8Wrap.cpp =================================================================== --- trunk/src/pythia8/Pythia8Wrap.cpp (revision 8442) +++ trunk/src/pythia8/Pythia8Wrap.cpp (revision 8443) @@ -1,145 +1,151 @@ #include "Pythia8Wrap.h" using namespace Pythia8; // Define external C-function. extern "C" { bool pythia8_available () { return true; } Pythia* new_pythia8 (bool printBanner = true) { Pythia* pythia = new Pythia ("", printBanner); return pythia; } void pythia8_delete (Pythia* pythia) { delete pythia; } +#if PYTHIA_VERSION_INTEGER > 8300 + bool pythia8_set_lhaup_ptr (Pythia* pythia, LHAupWhizard* whizard_lha) { + return pythia->setLHAupPtr ((LHAupPtr)whizard_lha); + } +#else bool pythia8_set_lhaup_ptr (Pythia* pythia, LHAupWhizard* whizard_lha) { return pythia->setLHAupPtr (whizard_lha); } +#endif bool pythia8_set_rndm_engine_ptr (Pythia* pythia, void* rndm) { WhizardRndm* whizard_rndm = new WhizardRndm (rndm); return pythia->setRndmEnginePtr (whizard_rndm); } bool pythia8_read_string (Pythia* pythia, const char* str) { return pythia->readString (string (str)); } bool pythia8_read_file (Pythia* pythia, const char* filename, const int subrun) { return pythia->readFile (string (filename), subrun); } bool pythia8_init (Pythia* pythia) { return pythia->init (); } bool pythia8_next (Pythia* pythia) { return pythia->next (); } int pythia8_get_event_size (Pythia* pythia) { return pythia->event.size (); } lha_particle_t pythia8_get_single_event (Pythia* pythia, const int i) { Particle event = pythia->event[i]; lha_particle_t lha_event; lha_event.idPart = event.id(); lha_event.statusPart = event.status(); lha_event.motherPart[0] = event.mother1(); lha_event.motherPart[1] = event.mother2(); lha_event.colorPart[0] = event.col(); lha_event.colorPart[1] = event.acol(); lha_event.pPart[0] = event.e(); lha_event.pPart[1] = event.px(); lha_event.pPart[2] = event.py(); lha_event.pPart[3] = event.pz(); lha_event.mPart = event.m(); lha_event.tauPart = event.tau(); lha_event.spinPart = event.pol(); // TODO sbrass Implement scale of parton return lha_event; } int pythia8_get_particle_status (Pythia* pythia, const int i) { return pythia->event[i].status(); } int pythia8_get_particle_id (Pythia* pythia, const int i) { return pythia->event[i].id(); } void pythia8_get_particle_momentum (Pythia* pythia, const int i, double* p) { // TODO sbrass implement a check on size of p Particle event = pythia->event[i]; p[0] = event.e(); p[1] = event.px(); p[2] = event.py(); p[3] = event.pz(); } int pythia8_get_n_mothers (Pythia* pythia, const int i) { vector motherList = pythia->event[i].motherList (); return motherList.size (); } int pythia8_get_n_daughters (Pythia* pythia, const int i) { vector daughterList = pythia->event[i].daughterList (); return daughterList.size (); } void pythia8_get_mother_array (Pythia* pythia, const int i, const int n_mothers, int mother[]) { vector motherList = pythia->event[i].motherList (); if (std::size_t (n_mothers) != motherList.size ()) { std::cerr << "[pythia8_get_mother_array] mismatch in array size." << endl; exit(2); } std::copy (motherList.begin (), motherList.end (), mother); } void pythia8_get_daughter_array (Pythia* pythia, const int i, const int n_daughters, int* daughter) { vector daughterList = pythia->event[i].daughterList (); if (std::size_t (n_daughters) != daughterList.size ()) { std::cerr << "[pythia8_get_mother_array] mismatch in array size." << endl; exit(2); } std::copy (daughterList.begin (), daughterList.end (), daughter); } int pythia8_get_status_hepmc (Pythia* pythia, const int i) { return pythia->event[i].statusHepMC(); } void pythia8_get_decay_vertex (Pythia* pythia, const int i, double* time, double space_vertex[3]) { *time = pythia->event[i].tDec(); space_vertex[0] = pythia->event[i].xDec(); space_vertex[1] = pythia->event[i].yDec(); space_vertex[2] = pythia->event[i].zDec(); } void pythia8_get_event_info (Pythia* pythia, double* alpha_s, double* alpha_em, double* scale) { *alpha_s = pythia->info.alphaS(); *alpha_em = pythia->info.alphaEM(); *scale = pythia->info.scalup(); // See: http://home.thep.lu.se/~torbjorn/pythia82html/EventInformation.html } // Debug Output void pythia8_list_lha_event (Pythia* pythia) { pythia->LHAeventList (); } void pythia8_list_event (Pythia* pythia) { pythia->event.list (); } } Index: trunk/ChangeLog =================================================================== --- trunk/ChangeLog (revision 8442) +++ trunk/ChangeLog (revision 8443) @@ -1,2100 +1,2103 @@ ChangeLog -- Summary of changes to the WHIZARD package Use svn log to see detailed changes. Version 3.0.0_beta+ +2020-09-02 + Compatibility fix for PYTHIA v8.301+ interface + 2020-09-01 Support exclusive jet clustering in ee for Fastjet interface ################################################################## 2020-08-30 RELEASE: version 3.0.0_beta 2020-08-27 Major revision of NLO distributions and events for processes with structure functions: - Use parton momenta/flavors (instead of beams) for events - Bug fix for Lorentz boosts and Lorentz frames of momenta - Bug fix: apply cuts to virtual NLO component in correct frame - Correctly assign ISR radiation momenta in data structures - Refactoring on quantum numbers for NLO event data structures - Functional tests for hadron collider NLO distributions - many minor bug fixes regarding NLO hadron collider physics 2020-08-11 Bug fix for linking problem with OpenMPI 2020-08-07 New WHIZARD API: WHIZARD can be externally linked as a library, added examples for Fortran, C, C++ programs ################################################################## 2020-07-08 RELEASE: version 2.8.4 2020-07-07 Bug fix: steering of UFO Majorana models from WHIZARD ################################################################## 2020-07-06 Combined integration also for hadron collider processes at NLO 2020-07-05 Bug fix: correctly steer e+e- FastJet clustering algorithms Major revision of NLO differential distributions and events: - Correctly assign quantum numbers to NLO fixed-order events - Correctly assign weights to NLO fixed-order events for combined simulation - Cut all NLO fixed-order subevents in event groups individually - Only allow "sigma" normalization for NLO fixed-order events - Use correct PDF setup for NLO counter events - Several technical fixes and updates of the NLO testsuite ################################################################## 2020-07-03 RELEASE: version 2.8.3 2020-07-02 Feature-complete UFO implementation for Majorana fermions 2020-06-22 Running width scheme supported for O'Mega matrix elements 2020-06-20 Adding H-s-s coupling to SM_Higgs(_CKM) models 2020-06-17 Completion of ILC 2->6 fermion extended test suite 2020-06-15 Bug fix: PYTHIA6/Tauola, correctly assign tau spins for stau decays 2020-06-09 Bug fix: correctly update calls for additional VAMP/2 iterations Bug fix: correct assignment for tau spins from PYTHIA6 interface 2020-06-04 Bug fix: cascades2 tree merge with empty subtree(s) 2020-05-31 Switch $epa_mode for different EPA implementations 2020-05-26 Bug fix: spin information transferred for resonance histories 2020-04-13 HepMC: correct weighted events for non-xsec event normalizations 2020-04-04 Improved HepMC3 interface: HepMC3 Root/RootTree interface 2020-03-24 ISR: Fix on-shell kinematics for events with ?isr_handler=true (set ?isr_handler_keep_mass=false for old behavior) 2020-03-11 Beam masses are correctly passed to hard matrix element for CIRCE2 EPA with polarized beams: double-counting corrected ################################################################## 2020-03-03 RELEASE: version 3.0.0_alpha 2020-02-25 Bug fix: Scale and alphas can be retrieved from internal event format to external formats 2020-02-17 Bug fix: ?keep_failed_events now forces output of actual event data Bug fix: particle-set reconstruction (rescanning events w/o radiation) 2020-01-28 Bug fix for left-over EPA parameter epa_e_max (replaced by epa_q_max) 2020-01-23 Bug fix for real components of NLO QCD 2->1 processes 2020-01-22 Bug fix: correct random number sequencing during parallel MPI event generation with rng_stream 2020-01-21 Consistent distribution of events during parallel MPI event generation 2020-01-20 Bug fix for configure setup for automake v1.16+ 2020-01-18 General SLHA parameter files for UFO models supported 2020-01-08 Bug fix: correctly register RECOLA processes with flavor sums 2019-12-19 Support for UFO customized propagators O'Mega unit tests for fermion-number violating interactions 2019-12-10 For distribution building: check for graphviz/dot version 2.40 or newer 2019-11-21 Bug fix: alternate setups now work correctly Infrastructure for accessing alpha_QED event-by-event Guard against tiny numbers that break ASCII event output Enable inverse hyperbolic functions as SINDARIN observables Remove old compiler bug workarounds 2019-11-20 Allow quoted -e argument, implemented -f option 2019-11-19 Bug fix: resonance histories now work also with UFO models Fix in numerical precision of ASCII VAMP2 grids 2019-11-06 Add squared matrix elements to the LCIO event header 2019-11-05 Do not include RNG state in MD5 sum for CIRCE1/2 2019-11-04 Full CIRCE2 ILC 250 and 500 GeV beam spectra added Minor update on LCIO event header information 2019-10-30 NLO QCD for final states completed When using Openloops, v2.1.1+ mandatory 2019-10-25 Binary grid files for VAMP2 integrator ################################################################## 2019-10-24 RELEASE: version 2.8.2 2019-10-20 Bug fix for HepMC linker flags 2019-10-19 Support for spin-2 particles from UFO files 2019-09-27 LCIO event format allows rescan and alternate weights 2019-09-24 Compatibility fix for OCaml v4.08.0+ ################################################################## 2019-09-21 RELEASE: version 2.8.1 2019-09-19 Carriage return characters in UFO models can be parsed Mathematica symbols in UFO models possible Unused/undefined parameters in UFO models handled 2019-09-13 New extended NLO test suite for ee and pp processes 2019-09-09 Photon isolation (separation of perturbative and fragmentation part a la Frixione) 2019-09-05 Major progress on NLO QCD for hadron collisions: - correctly assign flavor structures for alpha regions - fix crossing of particles for initial state splittings - correct assignment for PDF factors for real subtractions - fix kinematics for collinear splittings - bug fix for integrated virtual subtraction terms 2019-09-03 b and c jet selection in cuts and analysis 2019-08-27 Support for Intel MPI 2019-08-20 Complete (preliminary) HepMC3 support (incl. backwards HepMC2 write/read mode) 2019-08-08 Bug fix: handle carriage returns in UFO files (non-Unix OS) ################################################################## 2019-08-07 RELEASE: version 2.8.0 2019-07-31 Complete WHIZARD UFO interface: - general Lorentz structures - matrix element support for general color factors - missing features: Majorana fermions and SLHA 2019-07-20 Make WHIZARD compatible with OCaml 4.08.0+ 2019-07-19 Fix version testing for LHAPDF 6.2.3 and newer Minimal required OCaml version is now 4.02.3. 2019-04-18 Correctly generate ordered FKS tuples for alpha regions from all possible underlying Born processes 2019-04-08 Extended O'Mega/Recola matrix element test suite 2019-03-29 Correct identical particle symmetry factors for FKS subtraction 2019-03-28 Correct assertion of spin-correlated matrix elements for hadron collisions 2019-03-27 Bug fix for cut-off parameter delta_i for collinear plus/minus regions ################################################################## 2019-03-27 RELEASE: version 2.7.1 2019-02-19 Further infrastructure for HepMC3 interface (v3.01.00) 2019-02-07 Explicit configure option for using debugging options Bug fix for performance by removing unnecessary debug operations 2019-01-29 Bug fix for DGLAP remnants with cut-off parameter delta_i 2019-01-24 Radiative decay neu2 -> neu1 A added to MSSM_Hgg model ################################################################## 2019-01-21 RELEASE: version 2.7.0 2018-12-18 Support RECOLA for integrated und unintegrated subtractions 2018-12-11 FCNC top-up sector in model SM_top_anom 2018-12-05 Use libtirpc instead of SunRPC on Arch Linux etc. 2018-11-30 Display rescaling factor for weighted event samples with cuts 2018-11-29 Reintroduce check against different masses in flavor sums Bug fix for wrong couplings in the Littlest Higgs model(s) 2018-11-22 Bug fix for rescanning events with beam structure 2018-11-09 Major refactoring of internal process data 2018-11-02 PYTHIA8 interface 2018-10-29 Flat phase space parametrization with RAMBO (on diet) implemented 2018-10-17 Revise extended test suite 2018-09-27 Process container for RECOLA processes 2018-09-15 Fixes by M. Berggren for PYTHIA6 interface 2018-09-14 First fixes after HepForge modernization ################################################################## 2018-08-23 RELEASE: version 2.6.4 2018-08-09 Infrastructure to check colored subevents 2018-07-10 Infrastructure for running WHIZARD in batch mode 2018-07-04 MPI available from distribution tarball 2018-06-03 Support Intel Fortran Compiler under MAC OS X 2018-05-07 FKS slicing parameter delta_i (initial state) implementend 2018-05-03 Refactor structure function assignment for NLO 2018-05-02 FKS slicing parameter xi_cut, delta_0 implemented 2018-04-20 Workspace subdirectory for process integration (grid/phs files) Packing/unpacking of files at job end/start Exporting integration results from scan loops 2018-04-13 Extended QCD NLO test suite 2018-04-09 Bug fix for Higgs Singlet Extension model 2018-04-06 Workspace subdirectory for process generation and compilation --job-id option for creating job-specific names 2018-03-20 Bug fix for color flow matching in hadron collisions with identical initial state quarks 2018-03-08 Structure functions quantum numbers correctly assigned for NLO 2018-02-24 Configure setup includes 'pgfortran' and 'flang' 2018-02-21 Include spin-correlated matrix elements in interactions 2018-02-15 Separate module for QED ISR structure functions ################################################################## 2018-02-10 RELEASE: version 2.6.3 2018-02-08 Improvements in memory management for PS generation 2018-01-31 Partial refactoring: quantum number assigment NLO Initial-state QCD splittings for hadron collisions 2018-01-25 Bug fix for weighted events with VAMP2 2018-01-17 Generalized interface for Recola versions 1.3+ and 2.1+ 2018-01-15 Channel equivalences also for VAMP2 integrator 2018-01-12 Fix for OCaml compiler 4.06 (and newer) 2017-12-19 RECOLA matrix elements with flavor sums can be integrated 2017-12-18 Bug fix for segmentation fault in empty resonance histories 2017-12-16 Fixing a bug in PYTHIA6 PYHEPC routine by omitting CMShowers from transferral between PYTHIA and WHIZARD event records 2017-12-15 Event index for multiple processes in event file correct ################################################################## 2017-12-13 RELEASE: version 2.6.2 2017-12-07 User can set offset in event numbers 2017-11-29 Possibility to have more than one RECOLA process in one file 2017-11-23 Transversal/mixed (and unitarized) dim-8 operators 2017-11-16 epa_q_max replaces epa_e_max (trivial factor 2) 2017-11-15 O'Mega matrix element compilation silent now 2017-11-14 Complete expanded P-wave form factor for top threshold 2017-11-10 Incoming particles can be accessed in SINDARIN 2017-11-08 Improved handling of resonance insertion, additional parameters 2017-11-04 Added Higgs-electron coupling (SM_Higgs) ################################################################## 2017-11-03 RELEASE: version 2.6.1 2017-10-20 More than 5 NLO components possible at same time 2017-10-19 Gaussian cutoff for shower resonance matching 2017-10-12 Alternative (more efficient) method to generate phase space file 2017-10-11 Bug fix for shower resonance histories for processes with multiple components 2017-09-25 Bug fix for process libraries in shower resonance histories 2017-09-21 Correctly generate pT distribution for EPA remnants 2017-09-20 Set branching ratios for unstable particles also by hand 2017-09-14 Correctly generate pT distribution for ISR photons ################################################################## 2017-09-08 RELEASE: version 2.6.0 2017-09-05 Bug fix for initial state NLO QCD flavor structures Real and virtual NLO QCD hadron collider processes work with internal interactions 2017-09-04 Fully validated MPI integration and event generation 2017-09-01 Resonance histories for shower: full support Bug fix in O'Mega model constraints O'Mega allows to output a parsable form of the DAG 2017-08-24 Resonance histories in events for transferral to parton shower (e.g. in ee -> jjjj) 2017-08-01 Alpha version of HepMC v3 interface (not yet really functional) 2017-07-31 Beta version for RECOLA OLP support 2017-07-06 Radiation generator fix for LHC processes 2017-06-30 Fix bug for NLO with structure functions and/or polarization 2017-06-23 Collinear limit for QED corrections works 2017-06-17 POWHEG grids generated already during integration 2017-06-12 Soft limit for QED corrections works 2017-05-16 Beta version of full MPI parallelization (VAMP2) Check consistency of POWHEG grid files Logfile config-summary.log for configure summary 2017-05-12 Allow polarization in top threshold 2017-05-09 Minimal demand automake 1.12.2 Silent rules for make procedures 2017-05-07 Major fix for POWHEG damping Correctly initialize FKS ISR phasespace ################################################################## 2017-05-06 RELEASE: version 2.5.0 2017-05-05 Full UFO support (SM-like models) Fixed-beam ISR FKS phase space 2017-04-26 QED splittings in radiation generator 2017-04-10 Retire deprecated O'Mega vertex cache files ################################################################## 2017-03-24 RELEASE: version 2.4.1 2017-03-16 Distinguish resonance charge in phase space channels Keep track of resonance histories in phase space Complex mass scheme default for OpenLoops amplitudes 2017-03-13 Fix helicities for polarized OpenLoops calculations 2017-03-09 Possibility to advance RNG state in rng_stream 2017-03-04 General setup for partitioning real emission phase space 2017-03-06 Bug fix on rescan command for converting event files 2017-02-27 Alternative multi-channel VEGAS implementation VAMP2: serial backbone for MPI setup Smoothstep top threshold matching 2017-02-25 Single-beam structure function with s-channel mapping supported Safeguard against invalid process libraries 2017-02-16 Radiation generator for photon emission 2017-02-10 Fixes for NLO QCD processes (color correlations) 2017-01-16 LCIO variable takes precedence over LCIO_DIR 2017-01-13 Alternative random number generator rng_stream (cf. L'Ecuyer et al.) 2017-01-01 Fix for multi-flavor BLHA tree matrix elements 2016-12-31 Grid path option for VAMP grids 2016-12-28 Alpha version of Recola OLP support 2016-12-27 Dalitz plots for FKS phase space 2016-12-14 NLO multi-flavor events possible 2016-12-09 LCIO event header information added 2016-12-02 Alpha version of RECOLA interface Bug fix for generator status in LCIO ################################################################## 2016-11-28 RELEASE: version 2.4.0 2016-11-24 Bug fix for OpenLoops interface: EW scheme is set by WHIZARD Bug fixes for top threshold implementation 2016-11-11 Refactoring of dispatching 2016-10-18 Bug fix for LCIO output 2016-10-10 First implementation for collinear soft terms 2016-10-06 First full WHIZARD models from UFO files 2016-10-05 WHIZARD does not support legacy gcc 4.7.4 any longer 2016-09-30 Major refactoring of process core and NLO components 2016-09-23 WHIZARD homogeneous entity: discarding subconfigures for CIRCE1/2, O'Mega, VAMP subpackages; these are reconstructable by script projectors 2016-09-06 Introduce main configure summary 2016-08-26 Fix memory leak in event generation ################################################################## 2016-08-25 RELEASE: version 2.3.1 2016-08-19 Bug fix for EW-scheme dependence of gluino propagators 2016-08-01 Beta version of complex mass scheme support 2016-07-26 Fix bug in POWHEG damping for the matching ################################################################## 2016-07-21 RELEASE: version 2.3.0 2016-07-20 UFO file support (alpha version) in O'Mega 2016-07-13 New (more) stable of WHIZARD GUI Support for EW schemes for OpenLoops Factorized NLO top decays for threshold model 2016-06-15 Passing factorization scale to PYTHIA6 Adding charge and neutral observables 2016-06-14 Correcting angular distribution/tweaked kinematics in non-collinear structure functions splittings 2016-05-10 Include (Fortran) TAUOLA/PHOTOS for tau decays via PYTHIA6 (backwards validation of LC CDR/TDR samples) 2016-04-27 Within OpenLoops virtuals: support for Collier library 2016-04-25 O'Mega vertex tables only loaded at first usage 2016-04-21 New CJ15 PDF parameterizations added 2016-04-21 Support for hadron collisions at NLO QCD 2016-04-05 Support for different (parameter) schemes in model files 2016-03-31 Correct transferral of lifetime/vertex from PYTHIA/TAUOLA into the event record 2016-03-21 New internal implementation of polarization via Bloch vectors, remove pointer constructions 2016-03-13 Extension of cascade syntax for processes: exclude propagators/vertices etc. possible 2016-02-24 Full support for OpenLoops QCD NLO matrix elements, inclusion in test suite 2016-02-12 Substantial progress on QCD NLO support 2016-02-02 Automated resonance mapping for FKS subtraction 2015-12-17 New BSM model WZW for diphoton resonances ################################################################## 2015-11-22 RELEASE: version 2.2.8 2015-11-21 Bug fix for fixed-order NLO events 2015-11-20 Anomalous FCNC top-charm vertices 2015-11-19 StdHEP output via HEPEVT/HEPEV4 supported 2015-11-18 Full set of electroweak dim-6 operators included 2015-10-22 Polarized one-loop amplitudes supported 2015-10-21 Fixes for event formats for showered events 2015-10-14 Callback mechanism for event output 2015-09-22 Bypass matrix elements in pure event sample rescans StdHep frozen final version v5.06.01 included internally 2015-09-21 configure option --with-precision to demand 64bit, 80bit, or 128bit Fortran and bind C precision types 2015-09-07 More extensive tests of NLO infrastructure and POWHEG matching 2015-09-01 NLO decay infrastructure User-defined squared matrix elements Inclusive FastJet algorithm plugin Numerical improvement for small boosts ################################################################## 2015-08-11 RELEASE: version 2.2.7 2015-08-10 Infrastructure for damped POWHEG Massive emitters in POWHEG Born matrix elements via BLHA GoSam filters via SINDARIN Minor running coupling bug fixes Fixed-order NLO events 2015-08-06 CT14 PDFs included (LO, NLO, NNLL) 2015-07-07 Revalidation of ILC WHIZARD-PYTHIA event chain Extended test suite for showered events Alpha version of massive FSR for POWHEG 2015-06-09 Fix memory leak in interaction for long cascades Catch mismatch between beam definition and CIRCE2 spectrum 2015-06-08 Automated POWHEG matching: beta version Infrastructure for GKS matching Alpha version of fixed-order NLO events CIRCE2 polarization averaged spectra with explicitly polarized beams 2015-05-12 Abstract matching type: OO structure for matching/merging 2015-05-07 Bug fix in event record WHIZARD-PYTHIA6 transferral Gaussian beam spectra for lepton colliders ################################################################## 2015-05-02 RELEASE: version 2.2.6 2015-05-01 Models for (unitarized) tensor resonances in VBS 2015-04-28 Bug fix in channel weights for event generation. 2015-04-18 Improved event record transfer WHIZARD/PYTHIA6 2015-03-19 POWHEG matching: alpha version ################################################################## 2015-02-27 RELEASE: version 2.2.5 2015-02-26 Abstract types for quantum numbers 2015-02-25 Read-in of StdHEP events, self-tests 2015-02-22 Bug fix for mother-daughter relations in showered/hadronized events 2015-02-20 Projection on polarization in intermediate states 2015-02-13 Correct treatment of beam remnants in event formats (also LC remnants) ################################################################## 2015-02-06 RELEASE: version 2.2.4 2015-02-06 Bug fix in event output 2015-02-05 LCIO event format supported 2015-01-30 Including state matrices in WHIZARD's internal IO Versioning for WHIZARD's internal IO Libtool update from 2.4.3 to 2.4.5 LCIO event output (beta version) 2015-01-27 Progress on NLO integration Fixing a bug for multiple processes in a single event file when using beam event files 2015-01-19 Bug fix for spin correlations evaluated in the rest frame of the mother particle 2015-01-17 Regression fix for statically linked processes from SARAH and FeynRules 2015-01-10 NLO: massive FKS emitters supported (experimental) 2015-01-06 MMHT2014 PDF sets included 2015-01-05 Handling mass degeneracies in auto_decays 2014-12-19 Fixing bug in rescan of event files ################################################################## 2014-11-30 RELEASE: version 2.2.3 2014-11-29 Beta version of LO continuum/NLL-threshold matched top threshold model for e+e- physics 2014-11-28 More internal refactoring: disentanglement of module dependencies 2014-11-21 OVM: O'Mega Virtual Machine, bytecode instructions instead of compiled Fortran code 2014-11-01 Higgs Singlet extension model included 2014-10-18 Internal restructuring of code; half-way WHIZARD main code file disassembled 2014-07-09 Alpha version of NLO infrastructure ################################################################## 2014-07-06 RELEASE: version 2.2.2 2014-07-05 CIRCE2: correlated LC beam spectra and GuineaPig Interface to LC machine parameters 2014-07-01 Reading LHEF for decayed/factorized/showered/ hadronized events 2014-06-25 Configure support for GoSAM/Ninja/Form/QGraf 2014-06-22 LHAPDF6 interface 2014-06-18 Module for automatic generation of radiation and loop infrastructure code 2014-06-11 Improved internal directory structure ################################################################## 2014-06-03 RELEASE: version 2.2.1 2014-05-30 Extensions of internal PDG arrays 2014-05-26 FastJet interface 2014-05-24 CJ12 PDFs included 2014-05-20 Regression fix for external models (via SARAH or FeynRules) ################################################################## 2014-05-18 RELEASE: version 2.2.0 2014-04-11 Multiple components: inclusive process definitions, syntax: process A + B + ... 2014-03-13 Improved PS mappings for e+e- ISR ILC TDR and CLIC spectra included in CIRCE1 2014-02-23 New models: AltH w\ Higgs for exclusion purposes, SM_rx for Dim 6-/Dim-8 operators, SSC for general strong interactions (w/ Higgs), and NoH_rx (w\ Higgs) 2014-02-14 Improved s-channel mapping, new on-shell production mapping (e.g. Drell-Yan) 2014-02-03 PRE-RELEASE: version 2.2.0_beta 2014-01-26 O'Mega: Feynman diagram generation possible (again) 2013-12-16 HOPPET interface for b parton matching 2013-11-15 PRE-RELEASE: version 2.2.0_alpha-4 2013-10-27 LHEF standards 1.0/2.0/3.0 implemented 2013-10-15 PRE-RELEASE: version 2.2.0_alpha-3 2013-10-02 PRE-RELEASE: version 2.2.0_alpha-2 2013-09-25 PRE-RELEASE: version 2.2.0_alpha-1 2013-09-12 PRE-RELEASE: version 2.2.0_alpha 2013-09-03 General 2HDM implemented 2013-08-18 Rescanning/recalculating events 2013-06-07 Reconstruction of complete event from 4-momenta possible 2013-05-06 Process library stacks 2013-05-02 Process stacks 2013-04-29 Single-particle phase space module 2013-04-26 Abstract interface for random number generator 2013-04-24 More object-orientation on modules Midpoint-rule integrator 2013-04-05 Object-oriented integration and event generation 2013-03-12 Processes recasted object-oriented: MEs, scales, structure functions First infrastructure for general Lorentz structures 2013-01-17 Object-orientated reworking of library and process core, more variable internal structure, unit tests 2012-12-14 Update Pythia version to 6.4.27 2012-12-04 Fix the phase in HAZ vertices 2012-11-21 First O'Mega unit tests, some infrastructure 2012-11-13 Bug fix in anom. HVV Lorentz structures ################################################################## 2012-09-18 RELEASE: version 2.1.1 2012-09-11 Model MSSM_Hgg with Hgg and HAA vertices 2012-09-10 First version of implementation of multiple interactions in WHIZARD 2012-09-05 Infrastructure for internal CKKW matching 2012-09-02 C, C++, Python API 2012-07-19 Fixing particle numbering in HepMC format ################################################################## 2012-06-15 RELEASE: version 2.1.0 2012-06-14 Analytical and kT-ordered shower officially released PYTHIA interface officially released 2012-05-09 Intrisince PDFs can be used for showering 2012-05-04 Anomalous Higgs couplings a la hep-ph/9902321 ################################################################## 2012-03-19 RELEASE: version 2.0.7 2012-03-15 Run IDs are available now More event variables in analysis Modified raw event format (compatibility mode exists) 2012-03-12 Bug fix in decay-integration order MLM matching steered completely internally now 2012-03-09 Special phase space mapping for narrow resonances decaying to 4-particle final states with far off-shell intermediate states Running alphas from PDF collaborations with builtin PDFs 2012-02-16 Bug fix in cascades decay infrastructure 2012-02-04 WHIZARD documentation compatible with TeXLive 2011 2012-02-01 Bug fix in FeynRules interface with --prefix flag 2012-01-29 Bug fix with name clash of O'Mega variable names 2012-01-27 Update internal PYTHIA to version 6.4.26 Bug fix in LHEF output 2012-01-21 Catching stricter automake 1.11.2 rules 2011-12-23 Bug fix in decay cascade setup 2011-12-20 Bug fix in helicity selection rules 2011-12-16 Accuracy goal reimplemented 2011-12-14 WHIZARD compatible with TeXLive 2011 2011-12-09 Option --user-target added ################################################################## 2011-12-07 RELEASE: version 2.0.6 2011-12-07 Bug fixes in SM_top_anom Added missing entries to HepMC format 2011-12-06 Allow to pass options to O'Mega Bug fix for HEPEVT block for showered/hadronized events 2011-12-01 Reenabled user plug-in for external code for cuts, structure functions, routines etc. 2011-11-29 Changed model SM_Higgs for Higgs phenomenology 2011-11-25 Supporting a Y, (B-L) Z' model 2011-11-23 Make WHIZARD compatible for MAC OS X Lion/XCode 4 2011-09-25 WHIZARD paper published: Eur.Phys.J. C71 (2011) 1742 2011-08-16 Model SM_QCD: QCD with one EW insertion 2011-07-19 Explicit output channel for dvips avoids printing 2011-07-10 Test suite for WHIZARD unit tests 2011-07-01 Commands for matrix element tests More OpenMP parallelization of kinematics Added unit tests 2011-06-23 Conversion of CIRCE2 from F77 to F90, major clean-up 2011-06-14 Conversion of CIRCE1 from F77 to F90 2011-06-10 OpenMP parallelization of channel kinematics (by Matthias Trudewind) 2011-05-31 RELEASE: version 1.97 2011-05-24 Minor bug fixes: update grids and elsif statement. ################################################################## 2011-05-10 RELEASE: version 2.0.5 2011-05-09 Fixed bug in final state flavor sums Minor improvements on phase-space setup 2011-05-05 Minor bug fixes 2011-04-15 WHIZARD as a precompiled 64-bit binary available 2011-04-06 Wall clock instead of cpu time for time estimates 2011-04-05 Major improvement on the phase space setup 2011-04-02 OpenMP parallelization for helicity loop in O'Mega matrix elements 2011-03-31 Tools for relocating WHIZARD and use in batch environments 2011-03-29 Completely static builds possible, profiling options 2011-03-28 Visualization of integration history 2011-03-27 Fixed broken K-matrix implementation 2011-03-23 Including the GAMELAN manual in the distribution 2011-01-26 WHIZARD analysis can handle hadronized event files 2011-01-17 MSTW2008 and CT10 PDF sets included 2010-12-23 Inclusion of NMSSM with Hgg couplings 2010-12-21 Advanced options for integration passes 2010-11-16 WHIZARD supports CTEQ6 and possibly other PDFs directly; data files included in the distribution ################################################################## 2010-10-26 RELEASE: version 2.0.4 2010-10-06 Bug fix in MSSM implementation 2010-10-01 Update to libtool 2.4 2010-09-29 Support for anomalous top couplings (form factors etc.) Bug fix for running gauge Yukawa SUSY couplings 2010-09-28 RELEASE: version 1.96 2010-09-21 Beam remnants and pT spectra for lepton collider re-enabled Restructuring subevt class 2010-09-16 Shower and matching are disabled by default PYTHIA as a conditional on these two options 2010-09-14 Possibility to read in beam spectra re-enabled (e.g. Guinea Pig) 2010-09-13 Energy scan as (pseudo-) structure functions re-implemented 2010-09-10 CIRCE2 included again in WHIZARD 2 and validated 2010-09-02 Re-implementation of asymmetric beam energies and collision angles, e-p collisions work, inclusion of a HERA DIS test case ################################################################## 2010-10-18 RELEASE: version 2.0.3 2010-08-08 Bug in CP-violating anomalous triple TGCs fixed 2010-08-06 Solving backwards compatibility problem with O'Caml 3.12.0 2010-07-12 Conserved quantum numbers speed up O'Mega code generation 2010-07-07 Attaching full ISR/FSR parton shower and MPI/ISR module Added SM model containing Hgg, HAA, HAZ vertices 2010-07-02 Matching output available as LHEF and STDHEP 2010-06-30 Various bug fixes, missing files, typos 2010-06-26 CIRCE1 completely re-enabled Chaining structure functions supported 2010-06-25 Partial support for conserved quantum numbers in O'Mega 2010-06-21 Major upgrade of the graphics package: error bars, smarter SINDARIN steering, documentation, and all that... 2010-06-17 MLM matching with PYTHIA shower included 2010-06-16 Added full CIRCE1 and CIRCE2 versions including full documentation and miscellanea to the trunk 2010-06-12 User file management supported, improved variable and command structure 2010-05-24 Improved handling of variables in local command lists 2010-05-20 PYTHIA interface re-enabled 2010-05-19 ASCII file formats for interfacing ROOT and gnuplot in data analysis ################################################################## 2010-05-18 RELEASE: version 2.0.2 2010-05-14 Reimplementation of visualization of phase space channels Minor bug fixes 2010-05-12 Improved phase space - elimination of redundancies 2010-05-08 Interface for polarization completed: polarized beams etc. 2010-05-06 Full quantum numbers appear in process log Integration results are usable as user variables Communication with external programs 2010-05-05 Split module commands into commands, integration, simulation modules 2010-05-04 FSR+ISR for the first time connected to the WHIZARD 2 core ################################################################## 2010-04-25 RELEASE: version 2.0.1 2010-04-23 Automatic compile and integrate if simulate is called Minor bug fixes in O'Mega 2010-04-21 Checkpointing for event generation Flush statements to use WHIZARD inside a pipe 2010-04-20 Reimplementation of signal handling in WGIZARD 2.0 2010-04-19 VAMP is now a separately configurable and installable unit of WHIZARD, included VAMP self-checks Support again compilation in quadruple precision 2010-04-06 Allow for logarithmic plots in GAMELAN, reimplement the possibility to set the number of bins 2010-04-15 Improvement on time estimates for event generation ################################################################## 2010-04-12 RELEASE: version 2.0.0 2010-04-09 Per default, the code for the amplitudes is subdivided to allow faster compiler optimization More advanced and unified and straightforward command language syntax Final bug fixes 2010-04-07 Improvement on SINDARIN syntax; printf, sprintf function thorugh a C interface 2010-04-05 Colorizing DAGs instead of model vertices: speed boost in colored code generation 2010-03-31 Generalized options for normalization of weighted and unweighted events Grid and weight histories added again to log files Weights can be used in analyses 2010-03-28 Cascade decays completely implemented including color and spin correlations 2010-03-07 Added new WHIZARD header with logo 2010-03-05 Removed conflict in O'Mega amplitudes between flavour sums and cascades StdHEP interface re-implemented 2010-03-03 RELEASE: version 2.0.0rc3 Several bug fixes for preventing abuse in input files OpenMP support for amplitudes Reimplementation of WHIZARD 1 HEPEVT ASCII event formats FeynRules interface successfully passed MSSM test 2010-02-26 Eliminating ghost gluons from multi-gluon amplitudes 2010-02-25 RELEASE: version 1.95 HEPEVT format from WHIZARD 1 re-implemented in WHIZARD 2 2010-02-23 Running alpha_s implemented in the FeynRules interface 2010-02-19 MSSM (semi-) automatized self-tests finalized 2010-02-17 RELEASE: version 1.94 2010-02-16 Closed memory corruption in WHIZARD 1 Fixed problems of old MadGraph and CompHep drivers with modern compilers Uncolored vertex selection rules for colored amplitudes in O'Mega 2010-02-15 Infrastructure for color correlation computation in O'Mega finished Forbidden processes are warned about, but treated as non-fatal 2010-02-14 Color correlation computation in O'Mega finalized 2010-02-10 Improving phase space mappings for identical particles in initial and final states Introduction of more extended multi-line error message 2010-02-08 First O'Caml code for computation of color correlations in O'Mega 2010-02-07 First MLM matching with e+ e- -> jets ################################################################## 2010-02-06 RELEASE: version 2.0.0rc2 2010-02-05 Reconsidered the Makefile structure and more extended tests Catch a crash between WHIZARD and O'Mega for forbidden processes Tensor products of arbitrary color structures in jet definitions 2010-02-04 Color correlation computation in O'Mega finalized ################################################################## 2010-02-03 RELEASE: version 2.0.0rc1 ################################################################## 2010-01-31 Reimplemented numerical helicity selection rules Phase space functionality of version 1 restored and improved 2009-12-05 NMSSM validated with FeynRules in WHIZARD 1 (Felix Braam) 2009-12-04 RELEASE: version 2.0.0alpha ################################################################## 2009-04-16 RELEASE: version 1.93 2009-04-15 Clean-up of Makefiles and configure scripts Reconfiguration of BSM model implementation extended supersymmetric models 2008-12-23 New model NMSSM (Felix Braam) SLHA2 added Bug in LHAPDF interface fixed 2008-08-16 Bug fixed in K matrix implementation Gravitino option in the MSSM added 2008-03-20 Improved color and flavor sums ################################################################## 2008-03-12 RELEASE: version 1.92 LHEF (Les Houches Event File) format added Fortran 2003 command-line interface (if supported by the compiler) Automated interface to colored models More bug fixes and workarounds for compiler compatibility ################################################################## 2008-03-06 RELEASE: version 1.91 New model K-matrix (resonances and anom. couplings in WW scattering) EWA spectrum Energy-scan pseudo spectrum Preliminary parton shower module (only from final-state quarks) Cleanup and improvements of configure process Improvements for O'Mega parameter files Quadruple precision works again More plotting options: lines, symbols, errors Documentation with PDF bookmarks enabled Various bug fixes 2007-11-29 New model UED ################################################################## 2007-11-23 RELEASE: version 1.90 O'Mega now part of the WHIZARD tree Madgraph/CompHEP disabled by default (but still usable) Support for LHAPDF (preliminary) Added new models: SMZprime, SM_km, Template Improved compiler recognition and compatibility Minor bug fixes ################################################################## 2006-06-15 RELEASE: version 1.51 Support for anomaly-type Higgs couplings (to gluon and photon/Z) Support for spin 3/2 and spin 2 New models: Little Higgs (4 versions), toy models for extra dimensions and gravitinos Fixes to the whizard.nw source documentation to run through LaTeX Intel 9.0 bug workaround (deallocation of some arrays) 2006-05-15 O'Mega RELEASE: version 0.11 merged JRR's O'Mega extensions ################################################################## 2006-02-07 RELEASE: version 1.50 To avoid confusion: Mention outdated manual example in BUGS file O'Mega becomes part of the WHIZARD generator 2006-02-02 [bug fix update] Bug fix: spurious error when writing event files for weighted events Bug fix: 'r' option for omega produced garbage for some particle names Workaround for ifort90 bug (crash when compiling whizard_event) Workaround for ifort90 bug (crash when compiling hepevt_common) 2006-01-27 Added process definition files for MSSM 2->2 processes Included beam recoil for EPA (T.Barklow) Updated STDHEP byte counts (for STDHEP 5.04.02) Fixed STDHEP compatibility (avoid linking of incomplete .so libs) Fixed issue with comphep requiring Xlibs on Opteron Fixed issue with ifort 8.x on Opteron (compiling 'signal' interface) Fixed color-flow code: was broken for omega with option 'c' and 'w' Workaround hacks for g95 compatibility 2005-11-07 O'Mega RELEASE: version 0.10 O'Mega, merged JRR's and WK's color hack for WHiZard O'Mega, EXPERIMENTAL: cache fusion tables (required for colors a la JRR/WK) O'Mega, make JRR's MSSM official ################################################################## 2005-10-25 RELEASE: version 1.43 Minor fixes in MSSM couplings (Higgs/3rd gen squarks). This should be final, since the MSSM results agree now completely with Madgraph and Sherpa User-defined lower and upper limits for split event file count Allow for counters (events, bytes) exceeding $2^{31}$ Revised checksum treatment and implementation (now MD5) Bug fix: missing process energy scale in raw event file ################################################################## 2005-09-30 RELEASE: version 1.42 Graphical display of integration history ('make history') Allow for switching off signals even if supported (configure option) 2005-09-29 Revised phase space generation code, in particular for flavor sums Negative cut and histogram codes use initial beams instead of initial parton momenta. This allows for computing, e.g., E_miss Support constant-width and zero-width options for O'Mega Width options now denoted by w:X (X=f,c,z). f option obsolescent Bug fix: colorized code: flipped indices could screw up result Bug fix: O'Mega with 'c' and 'w:f' option together (still some problem) Bug fix: dvips on systems where dvips defaults to lpr Bug fix: integer overflow if too many events are requested 2005-07-29 Allow for 2 -> 1 processes (if structure functions are on) 2005-07-26 Fixed and expanded the 'test' matrix element: Unit matrix element with option 'u' / default: normalized phase space ################################################################## 2005-07-15 RELEASE: version 1.41 Bug fix: no result for particle decay processes with width=0 Bug fix: line breaks in O'Mega files with color decomposition 2005-06-02 New self-tests (make test-QED / test-QCD / test-SM) check lists of 2->2 processes Bug fix: HELAS calling convention for wwwwxx and jwwwxx (4W-Vertex) 2005-05-25 Revised Makefile structure Eliminated obsolete references to ISAJET/SUSY (superseded by SLHA) 2005-05-19 Support for color in O'Mega (using color flow decomposition) New model QCD Parameter file changes that correspond to replaced SM module in O'Mega Bug fixes in MSSM (O'Mega) parameter file 2005-05-18 New event file formats, useful for LHC applications: ATHENA and Les Houches Accord (external fragmentation) Naive (i.e., leading 1/N) color factor now implemented both for incoming and outgoing partons 2005-01-26 include missing HELAS files for bundle pgf90 compatibility issues [note: still internal error in pgf90] ################################################################## 2004-12-13 RELEASE: version 1.40 compatibility fix: preprocessor marks in helas code now commented out minor bug fix: format string in madgraph source 2004-12-03 support for arbitray beam energies and directions allow for pT kick in structure functions bug fix: rounding error could result in zero cross section (compiler-dependent) 2004-10-07 simulate decay processes list fraction (of total width/cross section) instead of efficiency in process summary new cut/analysis parameters AA, AAD, CTA: absolute polar angle 2004-10-04 Replaced Madgraph I by Madgraph II. Main improvement: model no longer hardcoded introduced parameter reset_seed_each_process (useful for debugging) bug fix: color initialization for some processes was undefined 2004-09-21 don't compile unix_args module if it is not required ################################################################## 2004-09-20 RELEASE: version 1.30 g95 compatibility issues resolved some (irrelevant) memory leaks closed removed obsolete warning in circe1 manual update (essentially) finished 2004-08-03 O'Mega RELEASE: version 0.9 O'Mega, src/trie.mli, src/trie.ml: make interface compatible with the O'Caml 3.08 library (remains compatible with older versions). Implementation of unused functions still incomplete. 2004-07-26 minor fixes and improvements in make process 2004-06-29 workarounds for new Intel compiler bugs ... no rebuild of madgraph/comphep executables after 'make clean' bug fix in phase space routine: wrong energy for massive initial particles bug fix in (new) model interface: name checks for antiparticles pre-run checks for comphep improved ww-strong model file extended Model files particle name fixes, chep SM vertices included 2004-06-22 O'Mega RELEASE: version 0.8 O'Mega MSSM: sign of W+/W-/A and W+/W-/Z couplings 2004-05-05 Fixed bug in PDFLIB interface: p+pbar was initialized as p+p (ThO) NAG compiler: set number of continuation lines to 200 as default Extended format for cross section summary; appears now in whizard.out Fixed 'bundle' feature 2004-04-28 Fixed compatibility with revised O'Mega SM_ac model Fixed problem with x=0 or x=1 when calling PDFLIB (ThO) Fixed bug in comphep module: Vtb was overlooked ################################################################## 2004-04-15 RELEASE: version 1.28 Fixed bug: Color factor was missing for O'Mega processes with four quarks and more Manual partially updated 2004-04-08 Support for grid files in binary format New default value show_histories=F (reduce output file size) Revised phase space switches: removed annihilation_lines, removed s_channel_resonance, changed meaning of extra_off_shell_lines, added show_deleted_channels Bug fixed which lead to omission of some phase space channels Color flow guessed only if requested by guess_color_flow 2004-03-10 New model interface: Only one model name specified in whizard.prc All model-dependent files reside in conf/models (modellib removed) 2004-03-03 Support for input/output in SUSY Les Houches Accord format Split event files if requested Support for overall time limit Support for CIRCE and CIRCE2 generator mode Support for reading beam events from file 2004-02-05 Fixed compiler problems with Intel Fortran 7.1 and 8.0 Support for catching signals ################################################################## 2003-08-06 RELEASE: version 1.27 User-defined PDF libraries as an alternative to the standard PDFLIB 2003-07-23 Revised phase space module: improved mappings for massless particles, equivalences of phase space channels are exploited Improved mapping for PDF (hadron colliders) Madgraph module: increased max number of color flows from 250 to 1000 ################################################################## 2003-06-23 RELEASE: version 1.26 CIRCE2 support Fixed problem with 'TC' integer kind [Intel compiler complained] 2003-05-28 Support for drawing histograms of grids Bug fixes for MSSM definitions ################################################################## 2003-05-22 RELEASE: version 1.25 Experimental MSSM support with ISAJET interface Improved capabilities of generating/analyzing weighted events Optional drawing phase space diagrams using FeynMF ################################################################## 2003-01-31 RELEASE: version 1.24 A few more fixes and workarounds (Intel and Lahey compiler) 2003-01-15 Fixes and workarounds needed for WHIZARD to run with Intel compiler Command-line option interface for the Lahey compiler Bug fix: problem with reading whizard.phs ################################################################## 2002-12-10 RELEASE: version 1.23 Command-line options (on some systems) Allow for initial particles in the event record, ordered: [beams, initials] - [remnants] - outgoing partons Support for PYTHIA 6.2: Les Houches external process interface String pythia_parameters can be up to 1000 characters long Select color flow states in (internal) analysis Bug fix in color flow content of raw event files Support for transversal polarization of fermion beams Cut codes: PHI now for absolute azimuthal angle, DPHI for distance 'Test' matrix elements optionally respect polarization User-defined code can be inserted for spectra, structure functions and fragmentation Time limits can be specified for adaptation and simulation User-defined file names and file directory Initial weights in input file no longer supported Bug fix in MadGraph (wave function counter could overflow) Bug fix: Gamelan (graphical analysis) was not built if noweb absent ################################################################## 2002-03-16 RELEASE: version 1.22 Allow for beam remnants in the event record 2002-03-01 Handling of aliases in whizard.prc fixed (aliases are whole tokens) 2002-02-28 Optimized phase space handling routines (total execution time reduced by 20-60%, depending on process) ################################################################## 2002-02-26 RELEASE: version 1.21 Fixed ISR formula (ISR was underestimated in previous versions). New version includes ISR in leading-log approximation up to third order. Parameter ISR_sqrts renamed to ISR_scale. ################################################################## 2002-02-19 RELEASE: version 1.20 New process-generating method 'test' (dummy matrix element) Compatibility with autoconf 2.50 and current O'Mega version 2002-02-05 Prevent integration channels from being dropped (optionally) New internal mapping for structure functions improves performance Old whizard.phx file deleted after recompiling (could cause trouble) 2002-01-24 Support for user-defined cuts and matrix element reweighting STDHEP output now written by write_events_format=20 (was 3) 2002-01-16 Improved structure function handling; small changes in user interface: new parameter structured_beams in &process_input parameter fixed_energy in &beam_input removed Support for multiple initial states Eta-phi (cone) cut possible (hadron collider applications) Fixed bug: Whizard library was not always recompiled when necessary Fixed bug: Default cuts were insufficient in some cases Fixed bug: Unusable phase space mappings generated in some cases 2001-12-06 Reorganized document source 2001-12-05 Preliminary CIRCE2 support (no functionality yet) 2001-11-27 Intel compiler support (does not yet work because of compiler bugs) New cut and analysis mode cos-theta* and related Fixed circular jetset_interface dependency warning Some broadcast routines removed (parallel support disabled anyway) Minor shifts in cleanup targets (Makefiles) Modified library search, check for pdflib8* 2001-08-06 Fixed bug: I/O unit number could be undefined when reading phase space Fixed bug: Unitialized variable could cause segfault when event generation was disabled Fixed bug: Undefined subroutine in CIRCE replacement module Enabled feature: TGCs in O'Mega (not yet CompHEP!) matrix elements (CompHEP model sm-GF #5, O'Mega model SM_ac) Fixed portability issue: Makefile did rely on PWD environment variable Fixed portability issue: PYTHIA library search ambiguity resolved 2001-08-01 Default whizard.prc and whizard.in depend on activated modules Fixed bug: TEX=latex was not properly enabled when making plots 2001-07-20 Fixed output settings in PERL script calls Cache enabled in various configure checks 2001-07-13 Support for multiple processes in a single WHIZARD run. The integrations are kept separate, but the generated events are mixed The whizard.evx format has changed (incompatible), including now the color flow information for PYTHIA fragmentation Output files are now process-specific, except for the event file Phase space file whizard.phs (if present) is used only as input, program-generated phase space is now in whizard.phx 2001-07-10 Bug fix: Undefined parameters in parameters_SM_ac.f90 removed 2001-07-04 Bug fix: Compiler options for the case OMEGA is disabled Small inconsistencies in whizard.out format fixed 2001-07-01 Workaround for missing PDFLIB dummy routines in PYTHIA library ################################################################## 2001-06-30 RELEASE: version 1.13 Default path /cern/pro/lib in configure script 2001-06-20 New fragmentation option: Interface for PYTHIA with full color flow information, beam remnants etc. 2001-06-18 Severe bug fixed in madgraph interface: 3-gluon coupling was missing Enabled color flow information in madgraph 2001-06-11 VAMP interface module rewritten Revised output format: Multiple VAMP iterations count as one WHIZARD iteration in integration passes 1 and 3 Improved message and error handling Bug fix in VAMP: handle exceptional cases in rebinning_weights 2001-05-31 new parameters for grid adaptation: accuracy_goal and efficiency_goal ################################################################## 2001-05-29 RELEASE: version 1.12 bug fixes (compilation problems): deleted/modified unused functions 2001-05-16 diagram selection improved and documented 2001-05-06 allow for disabling packages during configuration 2001-05-03 slight changes in whizard.out format; manual extended ################################################################## 2001-04-20 RELEASE: version 1.11 fixed some configuration and compilation problems (PDFLIB etc.) 2001-04-18 linked PDFLIB: support for quark/gluon structure functions 2001-04-05 parameter interface written by PERL script SM_ac model file: fixed error in continuation line 2001-03-13 O'Mega, O'Caml 3.01: incompatible changes O'Mega, src/trie.mli: add covariance annotation to T.t This breaks O'Caml 3.00, but is required for O'Caml 3.01. O'Mega, many instances: replace `sig include Module.T end' by `Module.T', since the bug is fixed in O'Caml 3.01 2001-02-28 O'Mega, src/model.mli: new field Model.vertices required for model functors, will retire Model.fuse2, Model.fuse3, Model.fusen soon. ################################################################## 2001-03-27 RELEASE: version 1.10 reorganized the modules as libraries linked PYTHIA: support for parton fragmentation 2000-12-14 fixed some configuration problems (if noweb etc. are absent) ################################################################## 2000-12-01 RELEASE of first public version: version 1.00beta