Downloading, building and running DigiSim - Java Version

The instructions presented below have been tested within Fedora Linux environments, using g++ version 3.3  or  Sun's Java version 1.5.  If you try to use DigiSim in other environments, please tell us about your experience, good or bad.
The java version of DigiSim is part of the org.lcsim framework, so the download and build instructions are basically the ones provided in the LCSim website.  Only a quick summary is presented here: Please note that all maven commands are issued from the top directory of each package, where the project configuration files project.xml and are located.  The API documents can then be consulted pointing your browser to the local file target/docs/apidocs/index.html.

Running DigiSim / Java

There are two distinct ways of running the java version of DigiSim:

(1) Running in standalone mode, saving the output file with raw hits and digitized hits for further processing; and
(2) Running DigiSim as a driver, from inside JAS3, as a preprocessor to your favourite analysis or reconstruction drivers.

Each of these running modes has its own pros and cons.  For instance, JAS3 GUI is very intuitive and friendly, its event browser and event display features are very helpful to use the drivers as plugins to build complicated reconstruction chains, but making sure one is using the right jars and source code is not always obvious to the uninitiated.  Running in standalone mode is more convenient for running remotely over slow connections, and the user might want more control over an special environment, by tuning the CLASSPATH of a single session without changing the overall
setup.  Moreover,  the standalone steps can be saved in a script for a faster startup.  I personally prefer running long jobs outside of the graphical environment, and use JAS only to look at the plots and produce nice figures.

Running DigiSim/Java in Standalone mode

After building the lcsim jar file following the instructions above, one can run DigiSim standalone by typing:
Alternatively to the next-to-last step, one can edit source code and replace "inputfile" with a specific file name.  I find the use of symbolic links very convenient here.  An output file, digisim.slcio, contains all the raw hits and digitized hits collections, according to the configuration file used.  Note that by default, DigiSim uses a configuration file based on the detector name, so that data files based on e.g. SDJan03 geometry will use the configuration file SDJan03.steer by default.

Note: Please note that "inputfile" is currently hardwired in the source code of DigiSimMain class, despite the line "LCIOInputFiles inputfile" present  in the configuration file.  That line affects only the C++ version of DigiSim, not the Java version.

Running DigiSim/Java from inside JAS3

DigiSim can be run from inside JAS3, using this driver: Open this file in JAS3, compile it and load it.  You may want to load your favourite analysis or reconstruction drivers here as well.  Then open an input LCIO data file to be digitized, and run some events one by one.

You may want to open the LCSim event browser and look at some raw data (RawCalorimeterHit class) or some digitized data (CalorimeterHit class).  Then rewind the data source and run over all events.

Note: Be sure to select org.lcsim plugin when you open the input data file.  If no dialog box opens at this point, make sure you have lcsim.jar file loaded, by checking that the LCSim event browser is available from View menu.