From GlueXWiki
Jump to: navigation, search

Generating simulated data that correctly matches the "real" data you are analyzing requires coordinating several different pieces of software with different inputs, which can be very complex to do correctly! MCWrapper provides a framework to simulate events in GlueX that simplifies some of the complexity.

Generating Simulations

The MCWrapper software can be run on a local batch farm or on the Open Science Grid (OSG) using this website. There is a pdf manual, but it is not fully up-to-date.

  • Generally you should start by submitting MC requests via the website.
  • Usually you will be generating simulations to study the efficiency for some reaction that you are measuring with data that has already been taken. You want to use the latest versions of the simulation software, but the same software that was used to reconstruct the data, so that the simulated data matches the real data. We keep up-to-date suggestions for which software sets to use for different data sets, follow these instructions.
  • The efficiency depends on the beam intensity, and therefore is run-dependent. You want to generate events spread out over the range of runs from a given data set.
    • Here are some common run ranges / RCDB requests: (GlueX Phase-I, Phase-II)
      • 2017-01: runs 30274 - 31057, RCDB query: "@is_production and @status_approved"
      • 2018-01: runs 40856 - 42559, RCDB query: "@is_2018production and @status_approved"
      • 2018-08: runs 50685 - 51768, RCDB query: "@is_2018production and @status_approved and beam_on_current>49"
      • 2019-11: runs 71350-73266, RCDB query: "@is_dirc_production and @status_approved"
  • You also have to pass a configuration file for the event generator you are using. Some example configuration files can be found here. Another set of examples is here (should save some common examples). Note that there are some dummy values for things like beam parameters that get filled in by the system.
  • After generating events, you can simulate additional particle decays using EvtGen. (more detailed documentation at the link)
    • To do this, select "decay_evtgen" in the "Post-processing" pull-down menu
    • There is room to specify a few different configuration files, but the only required one is the "decay_evtgen Config". This is the "user decay" file that specifies the details of the requested particles decays, as shown here.
  • Always use Geant4 - the Geant3 option is kept for development purposes.
  • You probably want to have some PART trees to analyze. Click the "Add Reaction" button to specify the same information that you supplied when requesting your analysis launch.
    • The analysis ROOT trees are made in a separate step from the data reconstruction, though they use the same software package (halld_recon). Under the "analysis version set" tag, select the version listed for your analysis launch under the "Analysis Launches" tab in the Private Wiki.

(will add some notes on running on the command line)

Managing Simulations

  • When you submit a request through the form, you will get an email with information about your request
  • Information about currently running jobs can be found on this page. Completed jobs can be found on this page.
    • MC requests are listed in a table, one request per line, with various summary information available
    • If you click normally on one of these table rows, additional tables below this main table will be filled with information on the individual jobs.
    • If you right click on one of these tables, you can perform various actions on the workflow, including getting a copy of the MCWrapper configuration file for the request, copying the parameters of the request for a new simulation request, cancelling the request, and declaring it done
      • There's usually a few jobs that won't finish for some reason. If your project is sitting at >98% complete for several days, just declare that it is done.
  • All of the files are saved on the JLab farm under /cache/halld/gluex_simulations/REQUESTED_MC