### MacroList Macro Examples Source: https://herwig.hepforge.org/trac/wiki/WikiMacros Illustrates how to use the MacroList macro to get a list of available macros. A wildcard shows all, while appending '?' or passing a macro name provides specific help. ```wiki [[MacroList(*)]] ``` ```wiki [[?]] ``` ```wiki [[MacroList(MacroList)]] ``` ```wiki [[MacroList?]] ``` -------------------------------- ### Download and Install VBFNLO Source: https://herwig.hepforge.org/tutorials/installation/prerequisite.html Download, extract, configure, and install the VBFNLO program. Ensure you have the necessary build tools and specify the installation directory. ```bash wget "http://www.itp.kit.edu/~vbfnloweb/archive/vbfnlo-3.0.0beta3.tgz" tar xzf vbfnlo-3.0.0beta3.tgz cd VBFNLO-3.0.0beta3 ./configure --prefix=$INSTALL_LOC make -s -j$(nproc) make -s install ``` -------------------------------- ### Setup GoSam Environment Source: https://herwig.hepforge.org/tutorials/gettingstarted/extmatrix.html Source the GoSam setup script to ensure environment variables are correctly configured before proceeding with simulations. ```bash source gosam_setup_env.sh ``` -------------------------------- ### Install with Pre-installed Packages Source: https://herwig.hepforge.org/tutorials/installation/bootstrap.html Use --without- to skip a package and ---location to specify its path if already installed. ```bash ./herwig-bootstrap -j 4 --without-boost --boost-location=where/boost/is --without-vbfnlo ${HERWIGPATH} ``` -------------------------------- ### Install LHAPDF Source: https://herwig.hepforge.org/tutorials/installation/prerequisite.html Download, configure, build, and install LHAPDF. Ensure you have Boost installed and specify the installation prefix. ```bash cd /where/to/build/lhapdf wget "https://lhapdf.hepforge.org/downloads/LHAPDF-6.1.6.tar.gz" tar -xvf LHAPDF-6.1.6.tar.gz cd LHAPDF-6.1.6 ./configure --prefix=$INSTALL_LOC --with-boost=$INSTALL_LOC make -j$(nproc) make check make install ``` -------------------------------- ### SMTP Notification Configuration Example Source: https://herwig.hepforge.org/trac/wiki/TracNotification Example configuration for enabling and setting up SMTP for email notifications. Ensure at least smtp_from or smtp_replyto is set. ```ini [notification] smtp_enabled = true smtp_server = mail.example.com smtp_from = notifier@example.com smtp_replyto = myproj@projects.example.com smtp_always_cc = ticketmaster@example.com, theboss+myproj@example.com ``` -------------------------------- ### Install FastJet Package Source: https://herwig.hepforge.org/tutorials/installation/prerequisite.html Download, extract, configure, and install the FastJet package, enabling all plugins. Set the installation prefix to INSTALL_LOC. ```bash cd /where/to/build/fastjet wget http://fastjet.fr/repo/fastjet-3.2.1.tar.gz tar -xvf fastjet-3.2.1.tar.gz cd fastjet-3.2.1 ./configure --prefix=$INSTALL_LOC --enable-allplugins make -j$(nproc) make check make install ``` -------------------------------- ### Install GSL Scientific Library Source: https://herwig.hepforge.org/tutorials/installation/prerequisite.html Download, extract, configure, and install the Gnu Scientific Library (GSL). Set the installation prefix to INSTALL_LOC. ```bash cd /where/to/build/gsl wget "http://ftp.heanet.ie/mirrors/gnu/gsl/gsl-2.2.1.tar.gz" tar -xvf gsl-2.2.1.tar.gz cd gsl-2.2.1 ./configure --prefix=$INSTALL_LOC make -j$(nproc) make check make install ``` -------------------------------- ### Install CT14 PDF Sets Source: https://herwig.hepforge.org/tutorials/installation/prerequisite.html Install the CT14nlo and CT14lo parton density function sets using the lhapdf install command. ```bash lhapdf install CT14nlo lhapdf install CT14lo ``` -------------------------------- ### Install GoSam Source: https://herwig.hepforge.org/tutorials/installation/prerequisite.html Download and run the GoSam installer script to set up the package for calculating tree-level and one-loop amplitudes. It is recommended to perform this in a new directory. ```bash mkdir gosam cd gosam wget "http://gosam.hepforge.org/gosam_installer.py" chmod 0755 ./gosam_installer.py ./gosam_installer.py -b -v --prefix=$INSTALL_LOC ``` -------------------------------- ### Install Boost Libraries Source: https://herwig.hepforge.org/tutorials/installation/prerequisite.html Download, extract, and install Boost libraries with specific configuration for Herwig compatibility. Ensure `--layout=tagged` is used. ```bash cd /where/to/build/boost wget -O boost_1_62_0.tar.gz "http://sourceforge.net/projects/boost/files/boost/1.62.0/boost_1_62_0.tar.gz/download" tar -xvf boost_1_62_0.tar.gz cd boost_1_62_0 ./bootstrap.sh --prefix=$INSTALL_LOC --with-python=$(which python) ./b2 install --layout=tagged ``` -------------------------------- ### Install Trac with Database Support using pip Source: https://herwig.hepforge.org/trac/wiki/TracInstall Install Trac with support for MySQL or PostgreSQL databases by including the respective package names in the pip install command. ```bash pip install Trac[mysql,psycopg2-binary] ``` -------------------------------- ### Build and Install Herwig Source: https://herwig.hepforge.org/tutorials/installation/manual.html Build the Herwig program using make with parallel processing and then install it. The 'make check' command is recommended for verifying the build integrity. ```bash make -j$(nproc) make check make install ``` -------------------------------- ### Install Trac from Source using pip Source: https://herwig.hepforge.org/trac/wiki/TracInstall Use this command to install Trac from a local source archive after extracting it. Ensure you are in the directory containing setup.py. ```bash pip install . ``` -------------------------------- ### Install Trac with Extras using pip Source: https://herwig.hepforge.org/trac/wiki/TracInstall Install Trac along with optional dependencies specified via the 'extras' key. 'rest' includes the docutils dependency. ```bash pip install Trac[babel,rest,pygments,textile] ``` -------------------------------- ### Configure Herwig Installation (Minimal) Source: https://herwig.hepforge.org/tutorials/installation/manual.html Configure Herwig for a minimal installation, excluding matrix element and decay programs. This is useful when only the core Herwig functionality is required. ```bash ./configure --prefix=$INSTALL_LOC --with-thepeg=$INSTALL_LOC \ --with-fastjet=$INSTALL_LOC --with-gsl=$INSTALL_LOC \ --with-boost=$INSTALL_LOC ``` -------------------------------- ### Diff Renderer Example Source: https://herwig.hepforge.org/trac/wiki/WikiProcessors Showcases the `#!diff` processor for rendering differences between two versions of text. It includes an example of Python code snippet with entry points. ```wiki [[BR]] {{{#!diff --- Version 55 +++ Version 56 @@ -115,8 +115,9 @@ name='TracHelloWorld', version='1.0', packages=find_packages(exclude=['*.tests*']), - entry_points = """ - [trac.plugins] - helloworld = myplugs.helloworld - """, + entry_points = { + 'trac.plugins': [ + 'helloworld = myplugs.helloworld', + ], + }, )}}} ``` -------------------------------- ### Wiki Macro Call Examples Source: https://herwig.hepforge.org/trac/wiki/WikiMacros Illustrates different ways to invoke the HelloWorld macro, including with processor arguments and as a standard wiki link. ```wiki {{{#!HelloWorld style="polite" -silent verbose }}} ``` ```wiki {{{#!HelloWorld }}} ``` ```wiki [[HelloWorld()]] ``` -------------------------------- ### Install Tracd as a Windows Service with SRVANY Source: https://herwig.hepforge.org/trac/wiki/TracStandalone Installs Tracd as a Windows service using SRVANY. This involves registering python.exe with tracd.exe as a parameter and configuring the service to start automatically. ```bash C:\path\to\instsrv.exe tracd C:\path\to\srvany.exe reg add HKLM\SYSTEM\CurrentControlSet\Services\tracd\Parameters /v Application /d ""C:\path\to\python.exe" "C:\path\to\python\scripts\tracd.exe" " ``` ```bash net start tracd ``` ```bash sc config tracd start= auto ``` -------------------------------- ### Full Trac workflow configuration example Source: https://herwig.hepforge.org/trac/wiki/TracWorkflow A comprehensive example of a Trac ticket workflow configuration, including default and custom states and actions. This serves as a complete reference for workflow setup. ```trac-workflow [ticket-workflow] create = -> new create.default = 1 create_and_assign = -> assigned create_and_assign.label = assign create_and_assign.permissions = TICKET_MODIFY create_and_assign.operations = may_set_owner accept = new,reviewing -> assigned accept.operations = set_owner_to_self accept.permissions = TICKET_MODIFY leave = * -> * leave.default = 1 leave.operations = leave_status reassign = new,assigned,accepted,reopened -> assigned reassign.operations = set_owner reassign.permissions = TICKET_MODIFY reopen = closed -> reopened reopen.operations = del_resolution reopen.permissions = TICKET_CREATE resolve = new,assigned,reopened,reviewing -> closed resolve.operations = set_resolution resolve.permissions = TICKET_MODIFY review = new,assigned,reopened -> reviewing review.operations = set_owner review.permissions = TICKET_MODIFY reassign_reviewing = reviewing -> * reassign_reviewing.operations = set_owner, leave_status reassign_reviewing.label = reassign review reassign_reviewing.permissions = TICKET_MODIFY ``` -------------------------------- ### Install python-flup for Trac SCGI Capability Source: https://herwig.hepforge.org/trac/wiki/TracFastCgi If tracd fails to start and Cherokee shows a 503 error, the python-flup package might be missing. Install it using apt-get on Debian-based systems. ```bash sudo apt-get install python-flup ``` -------------------------------- ### Display Herwig Bootstrap Help Source: https://herwig.hepforge.org/tutorials/installation/bootstrap.html Show all available options for the Herwig installation process. ```bash ./herwig-bootstrap --help ``` -------------------------------- ### Install Tracd as a Windows Service with WINSERV Source: https://herwig.hepforge.org/trac/wiki/TracStandalone Installs Tracd as a Windows service using the WINSERV utility, suitable for Windows 7 users when SRVANY may not be an option. Configures the service to start automatically. ```bash "C:\path\to\winserv.exe" install tracd -displayname "tracd" -start auto "C:\path\to\python.exe" c:\path\to\python\scripts\tracd.exe " ``` ```bash net start tracd ``` -------------------------------- ### Count Tickets by Status Source: https://herwig.hepforge.org/trac/wiki/TicketQuery Use the 'count' format to get the number of tickets matching specific criteria. This example counts new tickets. ```tracwiki [[TicketQuery(status=new,count)]] ``` -------------------------------- ### Install Development Preview using pip with Find-Links Source: https://herwig.hepforge.org/trac/wiki/TracInstall Install a development preview of Trac using pip, specifying a URL for finding package links. Not recommended for production environments. ```bash pip install --find-links=https://trac.edgewall.org/wiki/TracDownload Trac ``` -------------------------------- ### Test mod_python Installation Source: https://herwig.hepforge.org/trac/wiki/TracModPython Configure this location in Apache to test your mod_python setup. Remove it for security reasons after testing. Requires mod_python 3.2+. ```apache SetHandler mod_python PythonInterpreter main_interpreter PythonHandler mod_python.testhandler # For Apache 2.2 Order allow,deny Allow from all # For Apache 2.4 Require all granted ``` -------------------------------- ### Run Herwig and process with Delphes Source: https://herwig.hepforge.org/tutorials/workflow/inputoutput.html Run Herwig to generate events, then pipe the HepMC output to Delphes for detector simulation. This example assumes Delphes is installed. ```bash Herwig read LHC.in; Herwig run LHC.run -N1000 ``` ```bash rm test.root; cat LHC.hepmc | [path_to_delphes]/DelphesHepMC [path_to_delphes]/cards/delphes_card_ATLAS.tcl test.root ``` -------------------------------- ### Copy Example Input File Source: https://herwig.hepforge.org/tutorials/gettingstarted/firstrun.html Copy a sample input file, such as 'LHC-Matchbox.in', from the Herwig share directory to your current working directory for modification and use. ```bash [example] $ cp /share/Herwig/LHC-Matchbox.in . ``` -------------------------------- ### Run Standalone Trac Server Source: https://herwig.hepforge.org/trac/wiki/TracInstall This command starts the built-in Trac web server for quick testing. Access it via http://localhost:8000/. The '-s' flag skips the environment list for single-project setups. ```bash $ tracd --port 8000 /path/to/myproject ``` ```bash $ tracd -s --port 8000 /path/to/myproject ``` -------------------------------- ### Configure Initial Hard Process (W+W+) Source: https://herwig.hepforge.org/tutorials/mpi/several_hard.html Sets up the initial hard process to be W+W+ production and decay to e+νee+νe. This involves selecting the matrix element and specifying charge and process details. ```bash cd /Herwig/MatrixElements insert SubProcess:MatrixElements[0] MEqq2W2ff # only W+ set MEqq2W2ff:Wcharge 1 # only positrons set MEqq2W2ff:Process 3 ``` -------------------------------- ### InterMapTxt Example Prefixes Source: https://herwig.hepforge.org/trac/wiki/InterWiki Illustrates defining InterWiki prefixes and their mappings within the InterMapTxt wiki page, including comments and parametric URLs. ```text = InterMapTxt = == This is the place for defining InterWiki prefixes == Currently active prefixes: [[InterWiki]] This page is modelled after the MeatBall:InterMapTxt page. In addition, an optional comment is allowed after the mapping. ---- { PEP http://www.python.org/peps/pep-$1.html # Python Enhancement Proposal $1 Trac-ML http://thread.gmane.org/gmane.comp.version-control.subversion.trac.general/$1 # Message $1 in Trac Mailing List tsvn tsvn: # Interact with TortoiseSvn ... MeatBall http://www.usemod.com/cgi-bin/mb.pl? MetaWiki http://sunir.org/apps/meta.pl? MetaWikiPedia http://meta.wikipedia.org/wiki/ MoinMoin http://moinmoin.wikiwikiweb.de/ ... } ``` -------------------------------- ### Resource Matching Examples Source: https://herwig.hepforge.org/trac/wiki/TracFineGrainedPermissions Illustrates glob patterns for matching Trac resources, including WikiStart page and its attachments. ```ini [wiki:*] [wiki:WikiStart*] [wiki:WikiStart@*] [wiki:WikiStart] ``` ```ini [wiki:*] [wiki:WikiStart*] [wiki:WikiStart@*] [wiki:WikiStart@*/attachment:*] [wiki:WikiStart@117/attachment:FOO.JPG] ``` -------------------------------- ### tracd Basic Authentication Example Source: https://herwig.hepforge.org/trac/wiki/TracStandalone A concrete example of running tracd with Basic authentication, specifying the project, the full path to the htpasswd file, and a realm name. ```bash $ tracd -p 8080 --basic-auth="project,/srv/tracenv/testenv/.htpasswd,My Test Env" /path/to/project ``` -------------------------------- ### Install Rivet with Bootstrap Source: https://herwig.hepforge.org/tutorials/installation/prerequisite.html Use the rivet-bootstrap script to install Rivet, ensuring that Boost is not installed by Rivet itself if already managed separately. Set INSTALL_BOOST=0. ```bash INSTALL_PREFIX=$INSTALL_LOC INSTALL_BOOST=0 BOOSTPATH=$INSTALL_LOC MAKE="make -j $(nproc)" ./rivet-bootstrap ``` -------------------------------- ### Wiki Processor Example Source: https://herwig.hepforge.org/trac/wiki/WikiMacros Demonstrates the syntax for using a wiki processor within Trac for tasks like source code highlighting. ```wiki {{{ #!wiki-processor-name ... }}} ``` -------------------------------- ### Download and Install EvtGen Source: https://herwig.hepforge.org/tutorials/installation/prerequisite.html Download, extract, configure, and install the EvtGen decay package. This requires specifying the installation prefix and paths for HepMC, TAUOLA, PHOTOS, and Pythia8. ```bash wget "http://evtgen.warwick.ac.uk/static/srcrep/R01-06-00/EvtGen.R01-06-00.tar.gz" tar xzf EvtGen.R01-06-00.tar.gz cd EvtGen/R01-06-00 ./configure --prefix=$INSTALL_LOC --prefix=$INSTALL_LOC --hepmcdir=$INSTALL_LOC \ --tauoladir=$INSTALL_LOC --photosdir=$INSTALL_LOC --pythiadir=$INSTALL_LOC make -s -j$(nproc) make -s install ``` -------------------------------- ### Run MadGraph Initial Process Source: https://herwig.hepforge.org/tutorials/installation/prerequisite.html Run a simple process with MadGraph to generate initial files and avoid potential issues with read-only filesystems. This is a recommended step after downloading MadGraph. ```bash cd MG5_aMC_v2_5_3/ bin/mg5_aMC generate e+ e- > u u~ output quit() rm -rf PROC_sm_0 ``` -------------------------------- ### HTML Syntax Highlighting Example Source: https://herwig.hepforge.org/trac/wiki/WikiProcessors Demonstrates using the `#!text/html` processor for syntax highlighting of HTML code within a wiki page. The output is rendered as highlighted HTML. ```wiki [[BR]] {{{#!text/html

text

}}} ``` ```html

text

``` -------------------------------- ### Download and Install Pythia8 Source: https://herwig.hepforge.org/tutorials/installation/prerequisite.html Download, extract, configure, and install the Pythia8 event generator, used by EvtGen for hadronization. Ensure you specify the installation prefix and enable shared libraries. ```bash wget "http://home.thep.lu.se/~torbjorn/pythia8/pythia8186.tgz" tar xzf pythia8186.tgz cd pythia8186 ./configure --prefix=$INSTALL_LOC --enable-shared --with-hepmc=$INSTALL_LOC make -s -j$(nproc) make -s install ``` -------------------------------- ### Initialize Trac Environment with Repository Configuration Source: https://herwig.hepforge.org/trac/wiki/TracEnvironment Initialize a Trac environment using `trac-admin` and specify repository settings via a configuration file. This enables source code browsing. ```bash $ trac-admin $ENV initenv --config=config.ini $ cat config.ini [components] tracopt.versioncontrol.* = enabled [repositories] .dir = /path/to/default/type/repos repos1.type = git repos1.dir = /path/to/git/repos repos2.type = svn repos2.dir = /path/to/svn/repos ``` -------------------------------- ### Download and Install PHOTOS Source: https://herwig.hepforge.org/tutorials/installation/prerequisite.html Download, extract, configure, and install the PHOTOS program for simulating QED radiation in decays. This is used by EvtGen and requires a specific prefix and HepMC installation path. ```bash wget "http://photospp.web.cern.ch/photospp/resources/PHOTOS.3.61/PHOTOS.3.61.tar.gz" tar xzf PHOTOS.3.61.tar.gz cd PHOTOS ./configure --prefix=$INSTALL_LOC --with-hepmc=$INSTALL_LOC make -s -j$(nproc) make -s install ``` -------------------------------- ### Download and Install TAUOLA Source: https://herwig.hepforge.org/tutorials/installation/prerequisite.html Download, extract, configure, and install the TAUOLA program for simulating tau lepton decays. This is used by EvtGen and requires a specific prefix and HepMC installation path. ```bash wget "http://tauolapp.web.cern.ch/tauolapp/resources/TAUOLA.1.1.5/TAUOLA.1.1.5.tar.gz" tar xzf TAUOLA.1.1.5.tar.gz cd TAUOLA ./configure --prefix=$INSTALL_LOC --with-hepmc=$INSTALL_LOC make -s -j$(nproc) make -s install ``` -------------------------------- ### Initialize Trac Project Environment Source: https://herwig.hepforge.org/trac/wiki/TracInstall Use this command to create a new Trac environment. It will prompt for project name and database connection details. Ensure the user running this command has write permissions to the project directory. ```bash $ trac-admin /path/to/myproject initenv ``` -------------------------------- ### Install mod_python on Fedora Source: https://herwig.hepforge.org/trac/wiki/TracModPython Use 'yum' to install the mod_python package on Fedora systems. ```bash yum install mod_python ``` -------------------------------- ### Configure and Build ThePEG Source: https://herwig.hepforge.org/tutorials/installation/prerequisite.html Configure and build ThePEG from source. This step requires specifying installation paths for various dependencies including FastJet, GSL, Rivet, HepMC, LHAPDF, and Boost. ```bash cd ThePEG-2.1.0 ./configure --prefix=$INSTALL_LOC --with-fastjet=$INSTALL_LOC \ --with-gsl=$INSTALL_LOC --with-rivet=$INSTALL_LOC \ --with-hepmc=$INSTALL_LOC --with-lhapdf=$INSTALL_LOC \ --with-boost=$INSTALL_LOC make -j$(nproc) make check make install ``` -------------------------------- ### Set Installation Location Source: https://herwig.hepforge.org/tutorials/installation/prerequisite.html Define the environment variable INSTALL_LOC to specify the common installation directory for packages. ```bash export INSTALL_LOC=/where/to/install/the/packages ``` -------------------------------- ### Query Language Examples Source: https://herwig.hepforge.org/trac/wiki/TracQuery Examples demonstrating various operators and filtering conditions in the Trac query language. ```wiki status=closed,keywords~=firefox ``` ```wiki status=closed,keywords~=opera ``` ```wiki status=closed,keywords~=firefox opera ``` ```wiki status=closed,keywords~=firefox|opera ``` ```wiki status=closed,keywords~=firefox,or,keywords~=opera ``` ```wiki status=closed,keywords~=firefox -opera ``` ```wiki status=closed,keywords~=opera -firefox ``` -------------------------------- ### Single Trac Project FastCGI Setup Source: https://herwig.hepforge.org/trac/wiki/TracFastCgi Configure Lighttpd to serve a single Trac project via FastCGI. Ensure 'fcgi_binary' is correctly defined and 'TRAC_ENV' points to your project environment. ```lighttpd fastcgi.server = ("/trac" => ("trac" => ("socket" => "/tmp/trac-fastcgi.sock", "bin-path" => fcgi_binary, "check-local" => "disable", "bin-environment" => ("TRAC_ENV" => "/path/to/projenv") ) ) ) } ```