Project

General

Profile

exercises » History » Version 5

« Previous - Version 5/42 (diff) - Next » - Current version
Eric Church, 02/08/2014 03:17 PM


exercises

Run a simple lar job to create mu-'s of momentum 1.5 GeV/c from a point source.

We will create a file containing events that each have a single muon using the code in the public development release. That means you will not need to build any code.
Go to your test release, that is your working directory. You made this in the tutorial. Set yourself up to run there with an appropriate mrb working directory, as explained at https://cdcvs.fnal.gov/redmine/projects/uboonecode/wiki/Uboone_guide. You are going to run from fcl files and .so libraries -- the heart of the framework -- that live in the official places. You will setup uboonecode nightly (or v1_00_02, say) and against larsoft nightly (or v1_00_02). Namely, you are not using your own code. So, let's first show the setup, which we urge you perform via an alias, like the following. (Use an alias and hand-execute the alias commands each login; do not shove this stuff into your shell-initiated start up scripts like ~/.profile or ~/.bashrc.)

alias ulgmr='source /grid/fermiapp/uboone/software/setup_uboone.sh; cd /uboone/app/users/username/lgm/build; setup uboonecode nightly -qe4:prof;  source /uboone/app/users/username/lgm/localProducts_larsoft_v1_00_02_e4_prof/setup; source mrb slp;'  # a potential setup alias
ulgmr # actually execute the commands in the alias

And now, run the executable on this canned fcl job script file.

lar -c prodsingle_uboone.fcl

This fcl file will produce 5 muons through the set of modules SingleGen, LArG4, and DetSim. That's pretty cool. But where did it find prodsingle_uboone.fcl? How do I know it will run 5 events?
We find our fcl files from sleuthing from the key environment variable $FHICL_FILE_PATH.

<uboonegpvm02.fnal.gov> echo $FHICL_FILE_PATH 
.:./job:/grid/fermiapp/uboone/software/products/uboonecode/nightly/job:.:./job:/grid/fermiapp/products/larsoft/larpandora/nightly/job:/grid/fermiapp/products/larsoft/larana/nightly/job:/grid/fermiapp/products/larsoft/larreco/nightly/job:/grid/fermiapp/products/larsoft/larexamples/nightly/job:/grid/fermiapp/products/larsoft/lareventdisplay/nightly/job:/grid/fermiapp/products/larsoft/larsim/nightly/job:/grid/fermiapp/products/larsoft/larevt/nightly/job:/grid/fermiapp/products/larsoft/lardata/nightly/job:/grid/fermiapp/products/larsoft/nutools/v1_01_05/fcl:/grid/fermiapp/products/larsoft/larcore/nightly/job:/grid/fermiapp/products/larsoft/art/v1_08_10/fcl
<uboonegpvm02.fnal.gov> more /grid/fermiapp/uboone/software/products/uboonecode/nightly/job/prodsingle_uboone.fcl 

It starts each event with a clean slate as indicated by the EmptyEvent key word. If you're running a job with recon modules in it only, EmptyEvent instead says RootInput, as you'll be sucking up an already-written root file in a previous job. Note that in prodsingle_uboone.fcl maxEvents is 5. Note the output root file full of histograms (that we declared and filled in the source code) is specified to be at single_hist_uboone.root and the output ART root file (which serves is the one that we'll pass onto any further modules in subsequent lar jobs) is to be called single_gen_uboone.root. Note, that these did indeed appear in your directory!

Change that to K+'s of lower momentum and originating throughout the TPC.

Add a module to capture some truth information in histograms and TTree branches.