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 logoutthis will create a subdirectory, "sf", of the directory you issue the commands from, containing the sourcecode.
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.
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
make lib # makes the library file CTShower.so make install # moves library file `CTShower.so'->`$LIBCTSHOWERDIR/libCTShower.so'
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();
1.4.4