Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

libCTShower Version 3.02

1

Introduction

libCTShower is a Root-based class library of cosmic ray shower utilities.
it includes visualization, reconstruction, and some simulation utilities.
it is currently what drives the visualization behind the web-based shower shower search and reconstruction utilities, together with a set of perl and Root scripts through cgi.
see the Compound List for the technical documentation

developed mostly by Brant Carlson with some contributions from Chris Jillings, Elina Brobeck and Shawn Ligocki.

Installation

CVS usage:
execute the following commands to get the sourcecode via CVS. username cvs, password cvs.
cvs -d :pserver:cvs@nod.caltech.edu:/home/cvs/cvsroot login cvs -d :pserver:cvs@nod.caltech.edu:/home/cvs/cvsroot checkout sf cvs -d :pserver:cvs@nod.caltech.edu:/home/cvs/cvsroot release sf cvs -d :pserver:cvs@nod.caltech.edu:/home/cvs/cvsroot logout
this will create a subdirectory, "sf", of the directory you issue the commands from, containing the sourcecode.
once you have attained the sourcecode, first, set the environment variable LIBCTSHOWERDIR to somewhere you have write access, hopefully that is also in your LD_LIBRARY_PATH.
how to do this depends on what shell you use.
for bash, do this:
export LIBCTSHOWERDIR="/home/username/sf" export LD_LIBRARY_PATH="$LIBCTSHOWERDIR:$LD_LIBRARY_PATH"
Assuming that you have the source code in /home/username/sf

Note: the double quotes in the above and below examples are only necessary if the directory paths contain spaces in them. Most times it will be safe to leave the quotes out, however I include them for completeness.

if you're lazy, like me, just cd to the directory and do

export LIBCTSHOWERDIR="`pwd`"
and likewise for LD_LIBRARY_PATH.
for tcsh, do this:
setenv LIBCTSHOWERDIR "/home/username/sf" setenv LD_LIBRARY_PATH "$LIBCTSHOWERDIR:$LD_LIBRARY_PATH"

you can find out what shell you're using by

echo $SHELL

additionally, make sure that you have root v4.00.02 on your system, and pointed to by the appropriate environmental variables.
once you've done the above, building the library file should be as simple as
make lib # makes the library file CTShower.so make install # moves library file `CTShower.so'->`$LIBCTSHOWERDIR/libCTShower.so'

it should take less than a minute to compile, depending on the computer you're on.

once you have the library built, you're ready to go.
provided you have doxygen and graphviz (dot) installed, you can generate this documentation with "make docs".
you shouldn't run into build issues, but depending on the version of your compiler, you might. it has been successfully compiled using gcc-2.95, 2.96, and 3.3.1.

Overview

the main meat of the functionality is in the CTShower, CTShowerUI, and CTShowerReconstructor classes.
CTShower is a mostly a data container with some advanced constructor functionality,
CTShowerUI contains most of the visualization code,
CTShowerReconstructor contains the Minuit-based shower reconstruction code.
the detailed documentation for these classes can be found on the subsequent pages.

the shower files CTShowerUI/CTShower can read from are assumed to be accessible via /chiserverhome/chicos/datalogs/xx.xx.xx/shower

Example Code

in a Root interactive session (i.e. command line), (.q to quit)
try something like the following:
gSystem->Load("libCTShower.so"); // Load the library file. gSystem->Load("libPhysics.so"); // Load the Root physics library, for TVector3 operations. gChicosArray = new CTShowerArray(kFALSE); // Load the CHICOS array file. gLatDist = new CTLatDist(5); // Load High energy proton Lateral Distribution Formula. gTimeDist = new CTTimeDist(4); // Load High energy proton Time Distribution Formula. SetDefaultMethod(2); // Sets Shower Analysis method to Shawn's TDF-friendly version, 1=Brant's AGASA TDF specific version.

CTShowerSimulator sim; //create a simulator object. // Use the simulator object to create a shower: (parameters in order) // This creates a shower centered at -200m -200m 0m (ccs coordinates), // with a core hit time of 0microseconds, theta of .3 radians, phi of 1.5 radians, // energy of 1e17 eV, and a minimum number of hits of 0 (minhits is ignored by Generate, sorry). CTShower * shower = sim.Generate(-200, -200, 0, 0, .3, 1.5, 1e17, 0); CTShowerUI * ui = shower.GetUI(); // Get the UI of this shower.

// Visualization is as simple as: ui->DrawChicos(); ui->DrawChiquita(); // Or use one of the lower-level visualizations, // The following code causes errors. Why? --SML ui->DrawShower("sz"); // Draws a zoomed scatterplot of the hit locations. ui->DrawShower("t"); // Draws text a graphical version of the text data.
Other important functionality:
gSystem->Load("libCTShower.so"); // Load the library file. gSystem->Load("libPhysics.so"); // Load the Root physics library, for TVector3 operations. gLatDist = new CTLatDist(5); // Load High energy proton Lateral Distribution Formula. gTimeDist = new CTTimeDist(4); // Load High energy proton Time Distribution Formula. SetDefaultMethod(2); // Sets Shower Analysis method to Shawn's TDF-friendly version, 1=Brant's AGASA TDF specific version.

CTShowerUI * ui = new CTShowerUI(); // Create a new UI object. // Load the shower that happened on 2003 june 1st 10:53:01 from the appropriate shower file. ui->LoadShower(3, 6, 1, 10, 53, 01); // Note: if this crashes, you may have inadvertently set gChicosArray before calling it. In that case, set gChicosArray = NULL before calling LoadShower. ui->DrawChiquita(); // Draw it. ui->Reconstruct(); // Reconstruct it. ui->DrawFitResults(); // Draw the reconstruction results.

// The following code causes errors. Why? --SML TFile f("test.root", "RECREATE"); CTShowerAnalyzer anna; // Create an analyzer object TTree * tr = anna.MakeTree(3, 8, 7); // Create a TTree from year=03, month=8, day=7. // Make a histogram of the times of all the showers in the TTree. tr->Draw("shower->GetHour() + shower->GetMinute() / 60 + shower->GetSecond() / 3600"); f.ls(); f.Write(); f.Close();

Conclusion

hopefully this got you started using libCTShower.
it is a rather complicated system, representing 10 separate classes and several thousand lines of code, spread across over 20 separate source and header files, so you will probably need further documentation than just the above if you want to do more than the cursory loading, drawing, and reconstruction of showers. the documentation for specific class member variables and functions can be found primarily in the Compound List, or alternatively in the Compound Members index, if you're looking for something specific.
beyond that, there are always the raw source files.
good luck.

Brant Carlson, email

Generated on Thu Apr 12 12:51:58 2007 for CHICOS Root Library by doxygen 1.3.4