index.html,v 1.2 1994/04/19 23:01:50 burnett Exp
The code, which has numerous improvements (IMHO) in the particle physics part of gismo, may eventually be merged into gismo. This cannot happen as long as gismo demands the NextStep environment and NeXT is out of step with the C++ standard.
hepgismo.tar.gz
.
Those with access to the SLAC unix system can do a cvs checkout
by the sequence
setenv CVSROOT /usr/local/gismo/repo cvs export hepThis will create a directory
hep
containing all the source.
The installation notes should then be consulted for
building a system. Finally, local users can see the code and try out the
test programs by looking under ~burnett/hep
.
Track
,
a sequence of Rays used to store an actual trajectory.
Note that at the moment I only am using gismo's Box. Since hepgismo uses gismo's definition of volume, all of the gismo geometry project can be easily copied. info break
GParticle
),
PDT
,
PDTEntry
,
PData
,
AntiPData
)
See
createDefault.cc
for
code that defines a default set of particles, decays, interactions.
A new class is HepPDT
that has a
method to read a table of PDG particle data.
Interactor
),
MCParticle
,
A MCParticle subclass, Generator
,
is a data member of BaseApp, and is responsible for generating events.
See
test/decay.cc
and
test/mscat.cc
for test programs.
HasParameters
:
system to support data browsers (not used, yet)
error.h
: defines
WARNING()
and FATAL()
ThreeVec
,
FourVec
,
FourVec
, and
Random
, all formerly in the
math subproject, but now just interfaces to the corresponding CLHEP classes.
Viewable
is a base class
for any class that "draws itself";
VwControl
manages a
display list and display commands;
VwDraw
is an abstract
base class for device drivers.
GDisplay
is a subclass
VwControl, that provides display control. It is subclassed again
to generate the actual display, and handle interactive viewing.
EGS
,
which handles all EM interactions. The interface is
EGSInteractor
, a subclass
of particle/Interactor
.
Material properties and cross sections are in the class
PEGSData
, a subclass of
medium/MatData
Gheisha
class wraps the Gheisha fortran code.
The Gheisha system (also used by GEANT) contains a lot of fortran, that
I do not include in the basic source distribution. If you want to use
it, copy or link to the .f files in Gismo.
See the test program
test/mscat.cc
to see how the above interactors are defined and used.
BaseApp
class which
is the base class for application classes.
One useful subclass is
SlabApp
which makes it
easy to define planar geometries.
A test program that constructs a simple detector is
testapp
.
SuitApp
: define a simple application wrapper.
See testsuit.cc
for a simple test program.
GSApp
: combine SuitApp with BaseApp.
SUITdisplay
: used by GSApp for display control.
SUITdraw
: used by SUITDisplay to implement display
primitives.
SUITprinter
: used by GSApp for text display.
decay [[particleName | "list"] count ]with defaults pi0 and 1. The "decay list" will print out the default PDT.
mscat [[[particleName ] materialName ] count ]. Defaults are mu+, Al, 100.
interact [[[particleName ] materialName ] count ]with defaults pi+, Al, 1.
testapp [[particleName] momentum ]with defaults gamma, 0.5 Gev.
HepAList
,
HepAListIterator
: all my lists.
Hep3Vector
:
directly in the view project; as a base class
for support/ThreeVec
, used by geometry
HepLorentzVector
:
base class for particle/GParticle
HepRandom
: base class for support/Random
go to top
Gismo
The 23 March 1994 release of Gismo (0.4.1) is
here.
Documentation (transparencies from Bill Atwood's lectures) corresponding
to the released version is
here.
A paper I wrote for the MC93 conference is
here.
Alan Breakstone has written a very detailed explanation of the geometry project that
is available from him on request.
Authors of Gismo
go to top
Major changes from gismo
The major improvements are:
More specific comments follow.
PDT now has a new method,
static PDT* PDT::createPDT(Interactor* =0, Interactor* =0)
which is intended to replace the static function of the same name,
providing a mechanism to initialize the PDT with our built-in list of
particles, and flexibly specify Interactors to be used for
electromagnetic and hadronic interations. (This is discussed further
under egs.)
GParticle now inherits from HepLorentzVectorF, which gives it all the four vector properties that it used to get from FourVec. It has a new method, void scatterBy(double theta, double phi), a rotation not supported by the clhep three vector classes. GParticle, MCTrack and MCVertex have been combined, and made compatible with the clhep particle. Interactor has been extensively modified, and its relation to MCParticle changed. Its interface is:
virtual int interact(GParticle*,const Medium*); // interact the particle in the Medium virtual float interactionLength(const GParticle*,const Medium*); // return the interaction length for the particle in the Medium virtual void afterStep(float, GParticle*, const Medium*); // peform after step modification of particle: lose energy and // multiple scatter virtual float maxStepSize(const GParticle*, const Medium*); // determine maximum step allowed. Determined by eLossFraction // and Medium::maxStep() virtual float ecut(const GParticle*, const Medium*); // return minimum energy (KE+rest) of the particle allowed static float eLossFraction; // the maximum energy Loss allowed for a step (user-settable)This takes the calculation of the step size out of MCTrack, and allows an Interactor subclass to control the step size and energy cutoff, which is used by egs.
The afterStep above has a more accurate calculation of the multiple scattering.
The only interface class is now EGSInteractor.
The EGS4 routines edgeset and fixtmx, which implement fluorescence and a scheme for adjusting the step size, respectively, have been added.
#ifdef __STREAMABLE_H
to identify them for conversion.
go to top
If you do not have the imake program, first check that you really do have your
X windows binaries in your path. If it really is not on your system, you can
get imake as part of the X distribution. You will need to build imake and
install the configuration files that come with it.
See notes on installation before building anything for an installed copy of
Gismo.
To build Gismo from scratch, do the following steps.
The Imake install target will concatenate all the individual libraries into
one large library call libgismo.a.
When a user runs into problems with his code, it is very frequently necessary
to step into the Gismo kernel to find the bug, even when the bug is in the
user's code. Therefore, it is recommended that the installed copy of Gismo be
compiled "-g -O" as a compromise on speed and ease of use (if you have the
space for two copies, you can do that). This is done with the following set of
make commands (see step (4) above).
Installation of Gismo
Introduction to Imake
Imake is a standard tool from the X Consortium which builds Makefiles out of
Imakefiles. The idea was to simplify the writing of the local Imakefiles and
to provide a platform-independent way of specifying in the dependencies of a
project. Imake is (essentially) the C preprocessor, with the computer
architecture compiled in. It reads a "template" file, which in turn includes
configuration files from a search path of directories. At the end, it includes
the file "Imakefile" from the local directory, and expands all the macros it
knows. The result is a Makefile which is run by make.
Gismo's Imake
The Gismo Imakefiles use the environment variable ARCHNAME to determine where
to put binary files, such as .o files and libraries. Note that this
environment variable does NOT determine the actual architecture (that is
compiled into imake); rather, it determines the name of the directories where
binaries are placed.
If you have troubles, look in Imake.config for parameters that might be set
wrong for your site. Type "make -f Makefile help" for some help on the make
targets.
setenv ARCHNAME `/usr/local/bin/archname`
The script "archname" is different on each architecture.
bin/mkmf [-x
This will create a file "site.config" if it does not exist and then create
the top level Makefile. "[-x
make Makefiles
make includes
make depend
make all
If you would rather build debug libraries, use:
make Makefiles_debug
make includes
make depend_debug
make all_debug
Imake.config, which is a global project customization file, includes the file
site.config at the end. If site.config does not exist when mkmf is run, an
empty copy will be created. If you need to modify variables which are in
Imake.config (eg. because hippo include files are in a different place on your
system), put the new definition in site.config and it will win. You should
note that this file is only needed when running imake to create Makefiles
("bin/mkmf" or "make Makefiles"); therefore, if you compile on
very different systems in the same work directory, you can create two
site.config files (with different names) and use a symbolic link (ln -s) to
point to the correct one when building the Makefiles.
site.config
Installing Gismo
Gismo's Imakefiles include an install target which should handle all the work
for you. Look through Imake.config to see where the different parts will be
installed; if you need to change these, put the correct definition in
site.config. Note that you should set the PEGS4 data path in Imake.config
correctly BEFORE compiling Gismo (if you screw up, fix
Imake.config/site.config, rebuild the Makefiles, and recompile
medium/MatData.cc
)
make Makefiles_debugopt
make includes
make depend_debugopt
make all_debugopt
make install_debugopt
Adding files
If a developer adds a file to the GISMO project, the Imakefile of the
appropriate directory should be modified to include the file. Then repeat
step (4) above to rebuild the library. The "make Makefiles" and
"make depend" steps can be executed from the changed directory to
save time, but be careful of executing the actual build from the subdirectory.
go to top
Developer Notes
Since Gismo is installed as a single directory for the user, the developer is
left with a question of how to operate. Here are my suggestions.
Test Programs inside the Gismo Hierarchy
This section describes how to build a test program as part of the gismo
hierarchy. However, if the code is not part of the Gismo kernel (apart from
temporary test code), I strongly recommend that you read README_USER and the
section below and build your project outside the Gismo hierarchy.
GISMO_LDLIB = -lapplication -lgismo
You may also have to add a -L flag to indicate where libgismo.a is if it is
not in a "standard" place at your site.
Programs outside the Gismo Hierarchy
See the user instructions to see how to write an Imakefile for a project which uses
Gismo. If you are a developer and want to use some or all of your libraries,
use the make variables listed below to add the extra libraries and search
directories; they will be put ahead of the predefined Gismo variables.
APP_CCINCLUDES - your special -I flags APP_CCLDFLAGS - your special -L and other flags APP_CCLDLIBS - any extra librariesYou can also use the "flags" and "libs" fields in the appropriate build macros (eg. MakeCCProgram(name,libs), ProgramCCModuleWithFlags(name,module,flags) ).
At SLAC, the include files are installed in /usr/local/gismo/gismo, and therefore, you need to include the flag -I/usr/local/gismo when compiling.
If you have a number of files with the old style #include lines, you can use the script /usr/local/gismo/bin/fixIncludes (also in top level of gismo project). The syntax is
> fixIncludes a.h b.h > fixIncludes *.h
Remember that Gismo does require the standard Fortran library (listed after -lgismo):
AIX -> -lxlf Sun, Next (f2c) -> -lf2c
Material::addPath("/u/eb/rensing/PEGS4");to prepend a directory to the search path.
Some macros, of the form UseXXX(), are available to automate the use of packages. Currently, there is UseGismo(), UseHippo(), UseCLHEP(), and UseCheetah(). Below is a sample Imake file which uses these macros.
XCOMM XCOMM Gismo test directory XCOMM #ifdef InObjectCodeDir /* specify where libparticleID.a can be found */ APP_CCLDFLAGS = -L$(TOP)/lib.$(ARCHNAME) /* specify where my include files are (these are links) */ APP_CCINCLUDES = -I$(TOP)/include UseGismo() UseCLHEP() UseHippo() ProgramCCModule(TestBarForDIRC,TestBarForDIRC) MakeCCProgram(TestBarForDIRC,-lparticleID) #else MakeInObjectCodeDir() #endif
Also, when using the Imake package, you will need to have some programs/scripts in your path; in particular: imake, makedepend (from X11R4 or later, or the script from the Gismo distribution), fdepend (if you use Fortran), and some scripts provided with the X distribution (eg. mkdirhier).
THB