Instructions for Running SingleGen and Reco

Below are instructions for how to create files like the ones in /nova/ana/users/tlackey/testbeam/simfiles/.

Set up your test release

The latest snapshot release at the time this was written was S19-01-16. This release has all the changes made to enable creating files for TestBeam, with a few exceptions which require a test release with a couple packages added to it. Now that the RunHistory gain_setting table has an entry in it, you can technically do everything without a test release. I've left the instructions below because it can be a little easier to stay organized with everything in a test release, but the only files you actually need are Calibrator.fcl and SingleGen.fcl.

  1. Create a test release, add Calibrator and EventGenerator, and then make the changes below. (You can actually make the Calibrator and EventGenerator changes in the fcl that you run with, but adding the packages keeps your job fcl a little tidier and easier to parse.) You can also copy the files below directly from /nova/app/users/tlackey/TestBeam/singlegen.S19-01-16/.
  2. Build your test release.
  3. Copy /nova/app/users/tlackey/TestBeam/singlegen.S19-01-16/prodsingleTB.fcl and /nova/app/users/tlackey/TestBeam/singlegen.S19-01-16/recoTB.fcl into your test release. Also copy evdTB.fcl if you want to view events using the event display.

Produce files!

  1. To change the particle type (PDG code) and central momentum, edit the two lines at the bottom of prodsingleTB.fcl. If you want to change more of the parameters, edit SingleGen.fcl directly.
  2. Create simulated files up through ReadoutSim with:
    nova -c prodsingleTB.fcl -n <nevents> -o <outputfilename.root>
  3. Run reconstruction on the simulated files with:
    nova -c recoTB.fcl -s <inputsimfile.root> -o <outputfilename.root>

If you're producing a file with many events, you may want to use tmux, screen, or nohup. Make sure you put your output files on /nova/ana, where there is more space. There are some example bash scripts to save you from having to edit fcl files by hand in the test release mentioned above.
You can view files in root or with the Event Display (nova -c evdTB.fcl <file.root>).