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

libCTShower Version 2.30

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 and Elina Brobeck.

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=/home/username/sf:$LD_LIBRARY_PATH
if that's where you put the sourcecode. 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=/home/username/sf:$LD_LIBRARY_PATH

you can findout what shell you're using by

echo $SHELL

once you've done the above, building the library file should be as simple as
make lib

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. 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, 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:
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); ui->DrawChiquita(); //draw it. ui->Reconstruct(); //reconstruct it. ui->DrawFitResuls(); //draw the reconstruction results.

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 variabels 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 Tue Jul 5 15:20:01 2005 for CHICOS Root Library by doxygen 1.3.4