Changes between Version 5 and Version 6 of LOEventGenerationBias


Ignore:
Timestamp:
08/20/16 04:28:29 (4 years ago)
Author:
Valentin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LOEventGenerationBias

    v5 v6  
    4646In order to develop your custom bias module, you must create a directory that bears the name of the module. For the sake of simplicity, we will illustrate the requirements for a custom bias module with the example of a module that applies on each event a CKKW-L type of merging weight obtained from Pythia8. This bias module module consists in a directory called '{{{PY8_CKKW}}}' containing the following four files:
    4747
    48   [wiki:makefile makefile] (mandatory)
    49   [wiki:PY8_CKKW.f PY8_CKKW.f] (mandatory)
    50   [wiki:bias_dependencies bias_dependencies] (optional)
    51   [wiki:py8_mg5amc_bias_interface.cc py8_mg5amc_bias_interface.cc] (irrelevant to MadEvent, internal file of the bias module)
     48 * [https://cp3.irmp.ucl.ac.be/projects/madgraph/attachment/wiki/LOEventGenerationBias/makefile makefile] (mandatory)
     49 * [https://cp3.irmp.ucl.ac.be/projects/madgraph/attachment/wiki/LOEventGenerationBias/PY8_CKKW.f PY8_CKKW.f] (mandatory)
     50 * [https://cp3.irmp.ucl.ac.be/projects/madgraph/attachment/wiki/LOEventGenerationBias/bias_dependencies bias_dependencies] (optional)
     51 * [https://cp3.irmp.ucl.ac.be/projects/madgraph/attachment/wiki/LOEventGenerationBias/py8_mg5amc_bias_interface.cc py8_mg5amc_bias_interface.cc] (irrelevant for MG5aMC; internal resource of this bias module)
    5252
    5353You can also have a look at the structure of the much simpler implementation of the '{{{ptj_bias}}}' module in '{{{<MG5aMC_distrib_path>/Template/LO/Source/BIAS/ptj_bias}}}'.
     
    5858=== Mandatory file : '{{{<BIAS_MODULE_NAME>/<BIAS_MODULE_NAME>.f}}}'
    5959
    60 As you can see, this fortran file must bear the name of the module with the suffix '{{{.f}}}' and contain the subroutine '{{{bias_wgt}}}' with the prototype
     60This fortran file must bear the name of the module with the suffix '{{{.f}}}' and contain the subroutine '{{{bias_wgt}}}' with the prototype
    6161
    6262{{{
     
    113113}}}
    114114
     115One variable in particular defined in this include files is '{{{character*(maxEventLength) event_record}}}' which stores the full current event record in the LHE format.
    115116There are also other include files that you can add to access other information like the cuts values, the run card parameters, etc...
    116117
    117 The illustrative example file {{{PY8_CKKW/PY8_CKKW.f}}} highlights the use of this additional information. For completion we also show the file '{{{py8_mg5amc_bias_interface.cc}}}' which implements the C function '{{{py8_bias_weight}}}' used in '{{{PY8_CKKW.f}}}'.
     118The illustrative example file '[https://cp3.irmp.ucl.ac.be/projects/madgraph/attachment/wiki/LOEventGenerationBias/PY8_CKKW.f PY8_CKKW.f]' highlights the use of this additional information.
     119For the sake of completeness, we also show the file '[https://cp3.irmp.ucl.ac.be/projects/madgraph/attachment/wiki/LOEventGenerationBias/py8_mg5amc_bias_interface.cc py8_mg5amc_bias_interface.cc]' which implements the C function '{{{py8_bias_weight}}}' used in '{{{PY8_CKKW.f}}}'.
    118120
    119121=== Mandatory file : '{{{<BIAS_MODULE_NAME>/makefile}}}'
     
    164166You can then add to this makefile whatever target and dependencies that are necessary for compiling your module.
    165167
    166 We show here the full makefile corresponding to our example module '{{{PY8_CKKW}}}'.
     168You can see [https://cp3.irmp.ucl.ac.be/projects/madgraph/attachment/wiki/LOEventGenerationBias/makefile here] the full makefile corresponding to our example module '{{{PY8_CKKW}}}'.
    167169
    168170=== Optional file : '{{{<BIAS_MODULE_NAME>/bias_dependencies}}}'
     
    171173To specify them, you can add the file '{{{bias_dependencies}}}' to your bias module directory, where you define the variable 'BIASDEPENDENCIES' which will be automatically added to MadEvent makefiles.
    172174
    173 Here is what this optional file '{{{bias_dependencies}}}' looks like in our example module '{{{PY8_CKKW}}}':
     175Here is what this optional file '{{{bias_dependencies}}}' looks like in our example module '{{{PY8_CKKW}}}' (file [https://cp3.irmp.ucl.ac.be/projects/madgraph/attachment/wiki/LOEventGenerationBias/bias_dependencies here]):
    174176
    175177{{{