MuoExamine User's Guide

D. Hedin,V. Sirotenko & L. Stutte (with help from kj)

Version 2.2: May 10, 2007

MuoExamine is a program to access data or Monte Carlo events from files or from the data acquisition stream. It makes hit maps and appropriate histograms of raw hits, processed hits, and segments. It can also perform event dumps via an rcp switch.

MuoExamine is available as the package 'muo_examine' in the D0 RunII code release system. As for all packages, you need to create a working directory, and then check out the muo_examine package from the cvs repository. One can run the library versions of these programs, but building and running local versions is highly recommended, as the library versions are often not up-to-date.

A. Building the Executable

B. Running MuoExamine

Note: The first three steps above are needed if you wish to run during a new interactive session, not one in which you've currently built the executables, as above.

Note: If wanted, add filtering on selected triggers only by editing the file TriggerSelectPkg.rcp. The default has been set to useany triggers, but can be changed in this file. Also provided is a list of sample muon-only triggers.

Note: You can modify the scripts to direct the output and error log information to the files a.out or a.log instead of the screen by add to the end of the line executing the job "-out a.out" or "-log a.log".

C. Looking at Histograms

There are two programs available to view the histograms generated by MuoExamine. The default for offline running is histoscope and for online running is a root based browser, called gmbrowser.

With histoscope:

In one window start MuoExamine:

In a second window view the histograms:

If histo doesn't connect to your histograms, there are some files that need to be removed in the /tmp area of the disk. The actual directory name is controlled by the environment variable TMPDIR which can be set up in one of your login files. These files are called histo*********. Often these are made by other users whose jobs have crashed. If they are owned by group accounts, the passwords are available in the D0 control room. If they are owned by an individual, only that individual, Michael Begel or Stu Fuess can remove them.

With gmbrowser:

In one window start muo_examine:

In a second window view the histograms:

The histograms are displayed in a number of screens that are cycled through.

Note that you have to specify a location for writing out GIF files and for a Web interface.

D. Shifter Version

For the shifter, the process of running muo_examine and gmbrowser are simplified.

E. Associated Files

The files necessary to build the executable (MuoExamine.x) are contained in the subdirectories test_xx/muo_examine/bin. An additional subdirectory test_xx/muo_examine/rcp contains RCP files for both online and offline running. The source code and header files are common to the two versions. These can be found in the subdirectories test_xx/muo_examine/src and test_xx/muo_examine/muo_examine, respectively. The executables themselves are located in test_xx/bin/$BFARCH, where $BFARCH is a platform-dependent name, such as IRIX6-KCC_4_0, or Linux2-KCC_4_0. Scripts for running the executables are located in test_xx/muo_examine/scripts. The configuration file and the reference histogram set for the root based browser are located in test_xx/muo_examine/root.

The RCP files test_xx/muo_examine/rcp/ExamineMgr.rcp (and ExamineMgr_offline.rcp) contain switches for setting up the histogram files. This is the place where you select hbook or root style output files. Note also that you need to specify a location for the histogram output file.

The RCP files test_xx/muo_examine/rcp/MuoExamine.rcp (and MuonlineExamine.rcp) contains most of the switches for job processing. There you will find switches for turning on/off histograms for different detector types or hits and segments. An expert mode switch enables many more of these histogram types. There are also switches for a debug print option, DAQ error checking, and various dumps.

The RCP files test_xx/muo_examine/bin/muo_examine.rcp (and test_xx_muo_examine/online/muonline_examine.rcp) contain a list of the packages which are to be set up and run by the framework.

The RCP file test_xx/muo_examine/bin/ReadEvent.rcp (for file-oriented mode) tells which input file to use and the number of events to process.

The RCP file test_xx/muo_examine/online/ReadEventDaq.rcp (for online mode) sets up various parameters for getting events from the input DAQ stream.

The RCP file test_xx_muo_examine/online/TriggerSelectPkg.rcp (and TriggerSelectPkg_offline.rcp) selects whether or not to filter on a given list of triggers.

F. Modifying Code

There are separate classes for each one of the 4 sub-detector types which are the hooks for booking, filling and accessing raw hits. These are PDTHistograms, MDTHistograms, CMSCHistograms and FMSCHistograms. Class HITSandsegments books and fills hit and segment information. Modify source code and header files as wanted in test_xx/muo_examine/src and test_xx_muo_examine/muo_examine, respectively. Then re-build the executables as above. It may be necessary to type "gmake clean" first on rare occasions.

You sometimes may need to be working on multiple libraries at once. In addition to the addpkg for muo_examine, you would have to "addpkg -h xxx_yyyy". Instead of the "gmake all" if you choose to, you can make each package separately: you would "gmake muo_examine.lib", "gmake xxx_yyyy.lib" and then "gmake muo_examine.bin". RCP files for the additional package are probably in xxx_yyyy/rcp.