gibuu is hosted by Hepforge, IPPP Durham
GiBUU

TABLE OF CONTENTS


/monteCarlo [ Modules ]

[ Top ] [ Modules ]

NAME

module monteCarlo

PURPOSE

This module includes routines, which are useful for Monte Carlo decisions.


monteCarlo/MonteCarloChoose [ Functions ]

[ Top ] [ monteCarlo ] [ Functions ]

NAME

integer function MonteCarloChoose(a, total)

PURPOSE

Monte-Carlo decision according to eq. 5.43-5.44 of Oliver Buss' thesis.

Given an array of weigths (which do not have to be normalized or positive), this routine chooses one channel and calculates the weight which this event should then be assigned.

This routine respects negative weights correctly.

INPUTS

  • real, dimension(:), intent(in) :: a -- Array of weights

RESULT

  • real, intent(out), optional :: total -- weight which should be assigned to the chosen channel
  • integer :: channel -- The chosen channel (attention: first channel =1 !!!)


monteCarlo/MonteCarloChoose2Dim [ Functions ]

[ Top ] [ monteCarlo ] [ Functions ]

NAME

function MonteCarloChoose2Dim (a, total_out) result(channel)

PURPOSE

Monte-Carlo decision according to eq. 5.43-5.44 of Oliver Buss' thesis

Given an array of weigths (which do not have to be normalized or positive), this routine chooses one channel and calculates the weight which this event should then be assigned.

This routine respects negative weights correctly.

INPUTS

  • real, dimension(1:,1:), intent(in) :: a -- Array of weights

RESULT

  • real, intent(out), optional :: total_out -- weight which should be assigned to the chosen channel
  • integer, dimension(1:2) :: channel -- The chosen channel (attention: first channel =1 !!!)