Commit 8975b829 authored by Juergen Reuter's avatar Juergen Reuter
Browse files

81b0b47 Merge branch 'recombine' into 'master'

parent 6c87de30
......@@ -4,6 +4,9 @@ Use svn log to see detailed changes.
Version 3.0.0_beta+
2021-04-19
Photon recombination implemented
2021-04-14
Bug fix for vertices/status codes with HepMC2/3 event format
......
......@@ -616,8 +616,13 @@ interfaces for QCD environments (BLHA/HOPPET).
The following tables shows some of the major steps (physics
implementation and/or technical improvements) in the development
of \whizard (we break the table into logical and temporal blocks of
\whizard\ development):
\whizard\ development).
 
\newpage
{
{\bf \whizard\ \texttt{1}}, first line of development, ca. 1998-2010:
\nopagebreak[4]
\begin{center}
\begin{tabular}{|l|l|l|}\hline
0.99 & 08/1999 & Beta version \\\hline
......@@ -643,6 +648,14 @@ of \whizard (we break the table into logical and temporal blocks of
1.97 & 05/2011 & Manual for version 1 completed. \\\hline\hline
\end{tabular}
\end{center}
}
\vspace{2cm}
{
{\bf \whizard\ \texttt{2.0-2.2}}: first major refactoring and early new
release, ca. 2007-2015:
\nopagebreak[4]
\begin{center}
\begin{tabular}{|l|l|l|}\hline
2.0.0 & 04/2010 & Major refactoring: automake setup; dynamic
......@@ -672,6 +685,14 @@ of \whizard (we break the table into logical and temporal blocks of
\\\hline
\end{tabular}
\end{center}
}
\newpage
{
{\bf \whizard\ \texttt{2.3-2.8}}, completion of refactoring, continuous
development, ca. 2015-2020:
\nopagebreak[4]
\begin{center}
\begin{tabular}{|l|l|l|}\hline
2.3.0 & 07/2016 & NLO: resonance mappings for FKS subtraction; \\
......@@ -714,6 +735,21 @@ of \whizard (we break the table into logical and temporal blocks of
\\\hline\hline
\end{tabular}
\end{center}
}
\vspace{2cm}
{
{\bf \whizard\ \texttt{3.0}} and onwards, the NLO series:
\nopagebreak[4]
\begin{center}
\begin{tabular}{|l|l|l|}\hline
3.0.0 & 04/2020 & NLO QCD automation \& UFO Majorana support
released
\\\hline\hline
\end{tabular}
\end{center}
}
 
\vspace{.5cm}
 
......@@ -721,6 +757,8 @@ For a detailed overview over the historical development of the code
confer the \ttt{ChangeLog} file and the commit messages in our
revision control system repository.
 
\newpage
%%%%%
 
\section{About examples in this manual}
......@@ -4396,6 +4434,38 @@ like this:
\end{footnotesize}
\end{quote}
 
\subsubsection{photon\_recombination}
\begin{quote}
\begin{footnotesize}
\ttt{photon\_recombination [\textit{photons}, \textit{particles}]} \\
\ttt{photon\_recombination if \textit{condition}} [\textit{photons}, \textit{particles}]
\end{footnotesize}
\end{quote}
This function, which maps subevents into other subevents, is used for
electroweak (and mixed coupling) higher order calculations. It takes
the selection of \texttt{photons} (for the moment, \whizard\ restricts
this to one explicit photon in final state) and recombines it with the
closest particle from \texttt{particles} in $R$-distance, if the
$R$-distance is smaller than the parameter set by
\texttt{photon\_rec\_r0}. Otherwise the \texttt{particles} subevent
is left unchanged. The logical variable
\texttt{?keep\_flavors\_when\_recombining} determines whether
\whizard\ keeps the flavor of the particle with which the photon is
recombined into the pseudoparticle, the default being \texttt{true}.
An example for photon recombination is shown here:
\begin{quote}
\begin{footnotesize}
\begin{verbatim}
alias lep = e1:e2:e3:E1:E2:E3
process eevv = e1, E1 => A, lep, lep, lep, lep
photon_rec_r0 = 0.15
cuts = let subevt @reco =
photon_recombination if abs (Eta) < 2.5 [A, lep] in
....
\end{verbatim}
\end{footnotesize}
\end{quote}
 
\subsubsection{combine}
\begin{quote}
......
......@@ -371,6 +371,8 @@ jet_dcut = 0.000000000000E+00
photon_iso_eps = 1.000000000000E+00
photon_iso_n = 1.000000000000E+00
photon_iso_r0 = 4.000000000000E-01
photon_rec_r0 = 1.000000000000E-01
?keep_flavors_when_recombining = true
$sample = ""
$sample_normalization = "auto"
?sample_pacify = false
......
......@@ -54,6 +54,7 @@ jet_dcut = 0.000000000000E+00
photon_iso_eps = 1.000000000000E+00
photon_iso_n = 1.000000000000E+00
photon_iso_r0 = 4.000000000000E-01
photon_rec_r0 = 1.000000000000E-01
ps_mass_cutoff = 1.000000000000E+00
ps_fsr_lambda = 2.900000000000E-01
ps_isr_lambda = 2.900000000000E-01
......@@ -280,6 +281,7 @@ $fclibs => Fortran-libs
[undefined] ?draw_symbols = [unknown logical]
?analysis_file_only = false
?keep_flavors_when_clustering = false
?keep_flavors_when_recombining = true
?sample_pacify = false
?sample_select = true
?read_raw = true
......@@ -566,6 +568,8 @@ jet_dcut = 0.000000000000E+00
photon_iso_eps = 1.000000000000E+00
photon_iso_n = 1.000000000000E+00
photon_iso_r0 = 4.000000000000E-01
photon_rec_r0 = 1.000000000000E-01
?keep_flavors_when_recombining = true
$sample = ""
$sample_normalization = "auto"
?sample_pacify = false
......@@ -995,6 +999,8 @@ jet_dcut = 0.000000000000E+00
photon_iso_eps = 1.000000000000E+00
photon_iso_n = 1.000000000000E+00
photon_iso_r0 = 4.000000000000E-01
photon_rec_r0 = 1.000000000000E-01
?keep_flavors_when_recombining = true
$sample = ""
$sample_normalization = "auto"
?sample_pacify = false
......
......@@ -179,6 +179,7 @@ seed = 2
[undefined] ?draw_symbols = [unknown logical]
?analysis_file_only = false
?keep_flavors_when_clustering = false
?keep_flavors_when_recombining = true
?sample_pacify = false
?sample_select = true
?read_raw = true
......
......@@ -213,11 +213,12 @@ Syntax table:
SEQUENCE <maybe_else_pexpr> = <else_pexpr>?
SEQUENCE <elsif_pexpr> = elsif <lexpr> then <pexpr>
SEQUENCE <else_pexpr> = else <pexpr>
ALTERNATIVE <prt_function> = <join_fun> | <combine_fun> | <collect_fun> | <cluster_fun> | <select_fun> | <extract_fun> | <sort_fun> | <select_b_jet_fun> | <select_non_b_jet_fun> | <select_c_jet_fun> | <select_light_jet_fun>
ALTERNATIVE <prt_function> = <join_fun> | <combine_fun> | <collect_fun> | <cluster_fun> | <photon_reco_fun> | <select_fun> | <extract_fun> | <sort_fun> | <select_b_jet_fun> | <select_non_b_jet_fun> | <select_c_jet_fun> | <select_light_jet_fun>
SEQUENCE <join_fun> = <join_clause> <pargs2>
SEQUENCE <combine_fun> = <combine_clause> <pargs2>
SEQUENCE <collect_fun> = <collect_clause> <pargs1>
SEQUENCE <cluster_fun> = <cluster_clause> <pargs1>
SEQUENCE <photon_reco_fun> = <photon_reco_clause> <pargs1>
SEQUENCE <select_fun> = <select_clause> <pargs1>
SEQUENCE <extract_fun> = <extract_clause> <pargs1>
SEQUENCE <sort_fun> = <sort_clause> <pargs1>
......@@ -229,6 +230,7 @@ Syntax table:
SEQUENCE <combine_clause> = combine <condition>?
SEQUENCE <collect_clause> = collect <condition>?
SEQUENCE <cluster_clause> = cluster <condition>?
SEQUENCE <photon_reco_clause> = photon_recombination <condition>?
SEQUENCE <select_clause> = select <condition>?
SEQUENCE <extract_clause> = extract <position>?
SEQUENCE <sort_clause> = sort <criterion>?
......@@ -240,6 +242,7 @@ Syntax table:
KEYWORD combine
KEYWORD collect
KEYWORD cluster
KEYWORD photon_recombination
KEYWORD select
SEQUENCE <condition> = if <lexpr>
KEYWORD extract
......
......@@ -225,6 +225,8 @@ jet_dcut = 0.000000000000E+00
photon_iso_eps = 1.000000000000E+00
photon_iso_n = 1.000000000000E+00
photon_iso_r0 = 4.000000000000E-01
photon_rec_r0 = 1.000000000000E-01
?keep_flavors_when_recombining = true
$sample = ""
$sample_normalization = "auto"
?sample_pacify = false
......
......@@ -239,6 +239,8 @@ jet_dcut = 0.000000000000E+00
photon_iso_eps = 1.000000000000E+00
photon_iso_n = 1.000000000000E+00
photon_iso_r0 = 4.000000000000E-01
photon_rec_r0 = 1.000000000000E-01
?keep_flavors_when_recombining = true
$sample = ""
$sample_normalization = "auto"
?sample_pacify = false
......
......@@ -254,6 +254,8 @@ jet_dcut = 0.000000000000E+00
photon_iso_eps = 1.000000000000E+00
photon_iso_n = 1.000000000000E+00
photon_iso_r0 = 4.000000000000E-01
photon_rec_r0 = 1.000000000000E-01
?keep_flavors_when_recombining = true
$sample = ""
$sample_normalization = "auto"
?sample_pacify = false
......@@ -769,6 +771,8 @@ jet_dcut = 0.000000000000E+00
photon_iso_eps = 1.000000000000E+00
photon_iso_n = 1.000000000000E+00
photon_iso_r0 = 4.000000000000E-01
photon_rec_r0 = 1.000000000000E-01
?keep_flavors_when_recombining = true
$sample = ""
$sample_normalization = "auto"
?sample_pacify = false
......
......@@ -3854,6 +3854,7 @@ leafs are literal constants or named-parameter references.
real(default), pointer :: photon_iso_eps => null ()
real(default), pointer :: photon_iso_n => null ()
real(default), pointer :: photon_iso_r0 => null ()
real(default), pointer :: photon_rec_r0 => null ()
type(prt_t), pointer :: prt1 => null ()
type(prt_t), pointer :: prt2 => null ()
procedure(unary_log), nopass, pointer :: op1_log => null ()
......@@ -6382,6 +6383,60 @@ ignored.
end function no_pp
 
@ %def all_pp any_pp no_pp
@ Recombine photons with the particles of the first argument. If [[en0]] is present,
create a mask which is true only for those particles that pass the test.
<<Eval trees: procedures>>=
subroutine photon_recombination_pp (subevt, en1, en2, en0)
type(subevt_t), intent(inout) :: subevt
type(eval_node_t), intent(in) :: en1
type(eval_node_t), intent(in) :: en2
type(eval_node_t), intent(inout), optional :: en0
logical, dimension(:), allocatable :: mask1
type(prt_t), dimension(:), allocatable :: prt_gam0
type(prt_t) :: prt
integer :: n1, i
real(default) :: reco_r0
logical :: keep_flv
reco_r0 = en1%photon_rec_r0
n1 = subevt_get_length (en1%pval)
if (n1 > 1) then
call msg_fatal ("Photon recombination is supported " // &
"only for single photons.")
end if
allocate (prt_gam0 (n1), mask1 (n1))
do i = 1, n1
prt_gam0(i) = subevt_get_prt (en1%pval, i)
end do
if (present (en0)) then
do i = 1, n1
en0%index = i
en0%prt1 = prt_gam0(i)
if (.not. prt_is_photon (en0%prt1)) &
call msg_fatal ("Photon recombination can only " // &
"be applied to photons.")
call eval_node_evaluate (en0)
mask1(i) = en0%lval
end do
else
mask1 = .true.
end if
do i = 1, subevt_get_length (en2%pval)
if (.not. prt_is_recombinable (subevt_get_prt (en2%pval, i))) then
call msg_fatal ("Only charged leptons and QCD partons " //&
"can be recombined with photons")
end if
end do
if (associated (en1%var_list)) then
keep_flv = en1%var_list%get_lval &
(var_str("?keep_flavors_when_recombining"))
else
keep_flv = .false.
end if
call subevt_recombine &
(subevt,en2%pval, prt_gam0(1), mask1(1), reco_r0, keep_flv)
end subroutine photon_recombination_pp
@ %def photon_recombination_pp
The conditional restriction encoded in the [[eval_node_t]] [[en_0]] is
applied only to the photons from [[en1]], not to the objects being
isolated from in [[en2]].
......@@ -9153,7 +9208,7 @@ array.
case ("join_fun", "combine_fun", "collect_fun", "cluster_fun", &
"select_fun", "extract_fun", "sort_fun", "select_b_jet_fun", &
"select_non_bjet_fun", "select_c_jet_fun", &
"select_light_jet_fun")
"select_light_jet_fun", "photon_reco_fun")
call eval_node_compile_prt_function (en, pn, var_list)
case default
call parse_node_mismatch &
......@@ -9171,10 +9226,12 @@ array.
@
\subsubsection{Particle functions}
This combines the treatment of 'join', 'combine', 'collect', 'cluster',
'select', and 'extract' which all have the same syntax. The one or two
argument nodes are allocated. If there is a condition, the condition
node is also allocated as a logical expression, for which the variable
list is augmented by the appropriate (unary/binary) observables.
'select', and 'extract', as well as the functions for $b$, $c$ and
light jet selection and photon recombnation which all have the same
syntax. The one or two argument nodes are allocated. If there is a
condition, the condition node is also allocated as a logical
expression, for which the variable list is augmented by the
appropriate (unary/binary) observables.
<<Eval trees: procedures>>=
recursive subroutine eval_node_compile_prt_function (en, pn, var_list)
type(eval_node_t), pointer :: en
......@@ -9247,6 +9304,11 @@ list is augmented by the appropriate (unary/binary) observables.
call eval_node_init_prt_fun_binary (en, en1, en2, key, select_pp)
case ("sort")
call eval_node_init_prt_fun_binary (en, en1, en2, key, sort_pp)
case ("photon_recombination")
en1%var_list => var_list
call eval_node_init_prt_fun_binary &
(en, en1, en2, key, photon_recombination_pp)
call var_list%get_rptr (var_str ("photon_rec_r0"), en1%photon_rec_r0)
case default
call msg_bug (" Binary particle function '" // char (key) // &
"' undefined")
......@@ -10708,6 +10770,7 @@ We have two different flavors of the syntax: with and without particles.
call ifile_append (ifile, "SEQ else_pexpr = else pexpr")
call ifile_append (ifile, "ALT prt_function = " // &
"join_fun | combine_fun | collect_fun | cluster_fun | " // &
"photon_reco_fun | " // &
"select_fun | extract_fun | sort_fun | " // &
"select_b_jet_fun | select_non_b_jet_fun | " // &
"select_c_jet_fun | select_light_jet_fun")
......@@ -10715,6 +10778,7 @@ We have two different flavors of the syntax: with and without particles.
call ifile_append (ifile, "SEQ combine_fun = combine_clause pargs2")
call ifile_append (ifile, "SEQ collect_fun = collect_clause pargs1")
call ifile_append (ifile, "SEQ cluster_fun = cluster_clause pargs1")
call ifile_append (ifile, "SEQ photon_reco_fun = photon_reco_clause pargs1")
call ifile_append (ifile, "SEQ select_fun = select_clause pargs1")
call ifile_append (ifile, "SEQ extract_fun = extract_clause pargs1")
call ifile_append (ifile, "SEQ sort_fun = sort_clause pargs1")
......@@ -10730,6 +10794,7 @@ We have two different flavors of the syntax: with and without particles.
call ifile_append (ifile, "SEQ combine_clause = combine condition?")
call ifile_append (ifile, "SEQ collect_clause = collect condition?")
call ifile_append (ifile, "SEQ cluster_clause = cluster condition?")
call ifile_append (ifile, "SEQ photon_reco_clause = photon_recombination condition?")
call ifile_append (ifile, "SEQ select_clause = select condition?")
call ifile_append (ifile, "SEQ extract_clause = extract position?")
call ifile_append (ifile, "SEQ sort_clause = sort criterion?")
......@@ -10745,6 +10810,7 @@ We have two different flavors of the syntax: with and without particles.
call ifile_append (ifile, "KEY combine")
call ifile_append (ifile, "KEY collect")
call ifile_append (ifile, "KEY cluster")
call ifile_append (ifile, "KEY photon_recombination")
call ifile_append (ifile, "KEY select")
call ifile_append (ifile, "SEQ condition = if lexpr")
call ifile_append (ifile, "KEY extract")
......
......@@ -3158,6 +3158,18 @@ is not set.
end function prt_is_clustered
@ %def prt_is_clustered
<<Subevents: public>>=
public :: prt_is_recombinable
<<Subevents: procedures>>=
elemental function prt_is_recombinable (prt) result (flag)
logical :: flag
type(prt_t), intent(in) :: prt
flag = prt_is_parton (prt) .or. &
abs(prt%pdg) == TOP_Q .or. &
prt_is_lepton (prt)
end function prt_is_recombinable
@ %def prt_is_recombinable
<<Subevents: public>>=
public :: prt_is_photon
<<Subevents: procedures>>=
......@@ -3183,7 +3195,7 @@ We do not take the top quark into account here.
prt%pdg == GLUON
end function prt_is_parton
@ %def prt_is_photon
@ %def prt_is_parton
<<Subevents: public>>=
public :: prt_is_lepton
<<Subevents: procedures>>=
......@@ -4286,6 +4298,46 @@ that have been constructed by FastJet and its interface.
end subroutine subevt_cluster
@ %def subevt_cluster
@ Do recombination.
<<Subevents: public>>=
public :: subevt_recombine
<<Subevents: procedures>>=
subroutine subevt_recombine (subevt, pl, prt, mask1, reco_r0, keep_flv)
type(subevt_t), intent(inout) :: subevt
type(subevt_t), intent(in) :: pl
type(prt_t), intent(in) :: prt
logical, intent(in) :: mask1, keep_flv
real(default), intent(in) :: reco_r0
real(default), dimension(:), allocatable :: del_rij
integer, dimension(:), allocatable :: i_sortr
type(prt_t) :: prt_comb
logical :: ok
integer :: i, n, pdg_orig
n = subevt_get_length (pl)
allocate (del_rij (n), i_sortr (n))
do i = 1, n
del_rij(i) = eta_phi_distance(prt_get_momentum (prt), &
prt_get_momentum (subevt%prt(i)))
end do
i_sortr = order (del_rij)
do i = 1, n
if (i == i_sortr(n)) then
if (del_rij (i_sortr (n)) <= reco_r0 .and. mask1) then
pdg_orig = prt_get_pdg (subevt%prt (i_sortr (n)))
call prt_combine (prt_comb, prt, subevt%prt(i_sortr (n)), ok)
if (ok) then
subevt%prt(i_sortr (n)) = prt_comb
if (keep_flv) call prt_set_pdg &
(subevt%prt(i_sortr (n)), pdg_orig)
end if
end if
else
subevt%prt(i) = pl%prt(i)
end if
end do
end subroutine subevt_recombine
@ %def subevt_recombine
@ Return a list of all particles for which the mask is true.
<<Subevents: public>>=
public :: subevt_select
......
......@@ -2981,7 +2981,7 @@ procedure with type [[V_NONE]].
call var_list%set_phase_space_defaults ()
call var_list%set_gamelan_defaults ()
call var_list%set_clustering_defaults ()
call var_list%set_isolation_defaults ()
call var_list%set_isolation_recomb_defaults ()
call var_list%set_eio_defaults ()
call var_list%set_shower_defaults ()
call var_list%set_hadronization_defaults ()
......@@ -4944,11 +4944,12 @@ procedure with type [[V_NONE]].
end subroutine var_list_set_clustering_defaults
@ %def var_list_set_clustering_defaults
@ Frixione isolation parameters and all that:
@ Frixione isolation and photon recombination parameters and all that:
<<Variables: var list: TBP>>=
procedure :: set_isolation_defaults => var_list_set_isolation_defaults
procedure :: set_isolation_recomb_defaults => &
var_list_set_isolation_recomb_defaults
<<Variables: procedures>>=
subroutine var_list_set_isolation_defaults (var_list)
subroutine var_list_set_isolation_recomb_defaults (var_list)
class(var_list_t), intent(inout) :: var_list
call var_list%append_real (var_str ("photon_iso_eps"), 1._default, &
intrinsic=.true., &
......@@ -4965,9 +4966,20 @@ procedure with type [[V_NONE]].
description=var_str ('Photon isolation parameter $R_0^\gamma$ ' // &
'(isolation cone radius) from hep-ph/9801442 (cf. also ' // &
'\ttt{photon\_iso\_eps}, \ttt{photon\_iso\_n})'))
end subroutine var_list_set_isolation_defaults
call var_list%append_real (var_str ("photon_rec_r0"), 0.1_default, &
intrinsic=.true., &
description=var_str ('Photon recombination parameter $R_0^\gamma$ ' // &
'for photon recombination in NLO EW calculations'))
call var_list%append_log (&
var_str ("?keep_flavors_when_recombining"), .true., &
intrinsic = .true., &
description=var_str ('The logical variable \ttt{?keep\_flavors\_when\_recombining ' // &
'= true/false} specifies whether the flavor of a particle should be ' // &
'kept during \ttt{photon\_recombination} when a jet/lepton consists of one lepton/quark ' // &
'and zero or more photons (cf. also \ttt{photon\_recombination}).'))
end subroutine var_list_set_isolation_recomb_defaults
@ %def var_list_set_isolation_defaults
@ %def var_list_set_isolation_recomb_defaults
<<Variables: var list: TBP>>=
procedure :: set_eio_defaults => var_list_set_eio_defaults
<<Variables: procedures>>=
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment