Project

General

Profile

Converting Offline Monte Carlo to Trigger Input Format

Introduction

The following procedure is used to convert a file that is generated with the standard offline Monte Carlo into a format where it can be injected into the DDT system to test trigger algorithms with. The package that performs this conversion is called "MockDataDAQ" and was developed originally to convert data from MC to the raw DAQ format.

The modified MockDataDAQ package resides in the offline repository and must be run under the offline environment. It is designed to work with the current (head) version of the DAQDataFormats package from the online (DAQ) repository.

The package has been tested by converting a far detector cosmic ray Monte Carlo file.
The test file that was used was:

/nova/data/mc/S12-12-12/cosmics/fd/fd_r0000001_s00_S12-12-12_v1_cosmics_200_20121129_182036.sim.reco.root

The output of the conversion processes are stored on the /nova/ana volume under the trigger area. The conversion produces a set of files corresponding to the data flows that would be generated on a DCM by DCM basis. For the far detector there are 180 DCMs, so the conversion produces 180 files with names like:

  • muon_MicroSlices_Diblock9_Dcmnum5.raw

Where there is an enumeration for both the diblock that the DCM is positioned on and the position (1-12) that is mounted at. Each of these files contains the "millislices" that would be transmitted to the buffer nodes.

These output files are located at and are organized as a single tarball per converted file:

/nova/ana/trigger/mc

Generating Millislice Files

1. Check out MockDataDAQ package to your test_release

addpkg_svn -h MockDataDAQ

2. Compile the package:

gmake MockDataDAQ.all

3. Modify the FHICL file generate_ddt_raw_mc_files.fcl and change the OutputDir to your own directory.
(Note: MockDataDAQ will throw a segmentation fault if the output directory does not exist, so triple-check that your path is right!)

4. Run it over offline MC:

nova -c generate_ddt_raw_mc_files.fcl -s filename

This produces millislice files in the output directory of your choice.

To generate Millislice files from different Offline MC files simultaneously, you should use a script that is executed during your jobsub portion. This way you can generate job fcl files on the fly, replacing the OutputDir with the condor scratch area and FileName to something unique to the job (run_subrun for example). This ensures that no MilliSlice_*.raw files get over written by subsequent jobs.

Running over Millislice Files

1. You need to setup a FHICL file similar to source:trunk/DDTproto/mcjob.fcl to run over the millislice files.

2. Edit your copy of mcjob.fcl to give the right millislice file directory and millislice file prefix, they need to match the values in MockDataDAQ.fcl:
  • millislice_file_directory corresponds to MockDataDAQ.fcl's OutputDir
  • millislice_file_prefix corresponds to MockDataDAQ.fcl's FileName

3. Run your job:

ddt-filter -c mcjob.fcl

4. Generally enjoy your life!