Changes between Version 5 and Version 6 of LOEventGenerationBias
- Timestamp:
- Aug 20, 2016, 4:28:29 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
LOEventGenerationBias
v5 v6 46 46 In 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: 47 47 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 thebias 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) 52 52 53 53 You 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}}}'. … … 58 58 === Mandatory file : '{{{<BIAS_MODULE_NAME>/<BIAS_MODULE_NAME>.f}}}' 59 59 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 prototype60 This fortran file must bear the name of the module with the suffix '{{{.f}}}' and contain the subroutine '{{{bias_wgt}}}' with the prototype 61 61 62 62 {{{ … … 113 113 }}} 114 114 115 One variable in particular defined in this include files is '{{{character*(maxEventLength) event_record}}}' which stores the full current event record in the LHE format. 115 116 There are also other include files that you can add to access other information like the cuts values, the run card parameters, etc... 116 117 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}}}'. 118 The 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. 119 For 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}}}'. 118 120 119 121 === Mandatory file : '{{{<BIAS_MODULE_NAME>/makefile}}}' … … 164 166 You can then add to this makefile whatever target and dependencies that are necessary for compiling your module. 165 167 166 We show herethe full makefile corresponding to our example module '{{{PY8_CKKW}}}'.168 You 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}}}'. 167 169 168 170 === Optional file : '{{{<BIAS_MODULE_NAME>/bias_dependencies}}}' … … 171 173 To 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. 172 174 173 Here is what this optional file '{{{bias_dependencies}}}' looks like in our example module '{{{PY8_CKKW}}}' :175 Here 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]): 174 176 175 177 {{{