Trigger Lists

D0TrigSim should run with specially written MC triggerlists, online lists or any other list that comes from the Trigger Database . Please be aware that new online lists can contain things that your release of D0TrigSim simply can't handle or that the version of COOR released offline cannot yet parse. Don't be suprised if a brand-new trigger list doesn't work with an old version of d0trigsim (though it might).

There is a generic triggerlist for MC studies. You can also search the trigger database for all generic triggerlist versions made so far (i.e. all generic triggerlists whose name begins with "tsim"). Please note that the trigger list labelled "p13" may very well be the default list for the p15 release of d0trigsim as well (for example). If nothing significant changed in the default list then no new list is made.


Instructions

  1. Use the XML generator to extract a trigger list from the database (clued0 or d0mino). Note: These commands must be run in a clean shell environment. DO NOT run "setup D0RunII" before this step. It will complain about the environment variables being too big. First some setup:
         setup d0cvs
         cvs co trigdb_xmlclient
         cd trigdb_xmlclient
         gmake
         source bin/xmlclient_setup
    

    The main executable is called xmlgen.py. It may be run with no arguements to get a list of options:
         ./xmlgen.py
    
    The option --Sim adds the information needed by TrigSim. Run xmlgen.py to generate the xml file you want. If, for example, you wanted the online global triggerlist version 8.20, enter:
         ./xmlgen.py --tlist-name global_CMT --tlist-version 8.20 --file --Sim
    
    OR, to get a special TrigSim list like tsim_p9:
         ./xmlgen.py --tlist-name tsim_p09 --tlist-version 1.00 --file --Sim
    
    OR, as another example, say you wanted to get a Special List that was run Online and that includes a crate list, no inclusive monitor stream, no SMT monitoring process, and assigns unique L1/L2 bits to every trigger even if the triggers share L1/L2 conditions. You would type:
         ./xmlgen.py -tlname %triple% -file -GetCrates -NoMonitor -noSMTMonitor -UniqueL1L2
    
  2. Process the xml file through COORSIM and run D0TrigSim:
         setup d0tools -t
         setup D0RunII p15.02.03
         runD0TrigSim -filelist=filelist -trglst=myfile.xml -format=mc
    
    This will cause COORSIM to run create a subdirectory called trigsim containing a bunch of "sim" files with which to configure the trigger simulation. It will then run d0trigsim on them using these configuration files.
  3. Once you have this directory full of *.sim files you can put those files aside and use them again as often as you'd like without going back to the *.XML file. Just create a trigsim subdirectory, copy the files into it and
         setup d0tools -t
         setup D0RunII version (eg. p15.02.00)
         runD0TrigSim -filelist=filelist -format=mc
    
    D0TrigSim will find your new *.sim files and will override the default set.

Trouble Shooting

  1. Extracting the XML: If you get an error that looks like:
         xargs: environment is too large for exec
    
    when you try to generate an XML triggerlist from the database then you need to run it in a new window in which the "setup D0RunII ..." command has not been given. The "setup D0RunII ..." command sets a lot of environment variables and this can sometimes confuse external packages.
  2. Very new lists: If you are working with a new triggerlist it is possible that the COOR resources needed to parse that XML file are newer than the default set included in your release. If this happens to you it will look something like
         .
         DONE
         TEXT *bad*Bad download request: ./global_CMT_test-12.00.xml:414:37: No
         free item: all resources of this type are already allocated: Cannot
         find a defined trigger manager input term matching the requested name
         mu1pt4wllx l1muo.
         FAIL
         TEXT *bad*Bad start request.
         FAIL
         .
         .
    
    Basically this means that you have tried to use a trigger term (eg. mu1pt4wllx) which COOR has never heard of before. There is an option you can use with d0trigsim which will fix this. Add
         -coorfetch
    
    to the runD0TrigSim commandline. This will make COOR generate its resources from the database instead of the default set in CVS. Please note that this option will not work with versions of COOR before p15-br-02. This means that in p15.03.00 and above it will work fine, but in p15.02.00 you need to checkout the p15-br-02 version of the package coor and compile it in your local area. This option is available in runD0TrigSim in versions of d0tools v03-03-18 and above.