README radlen_hists
April 15, 2007  D. Lawrence


This directory contins source code to make a plugin that
will generate histograms of the number of radiation lengths
there are in the detector as a function of theta, r, and z.

The advantage of this is that it allows geant to track the
particles through the geometry defined in hdds essentially
integrating the path lengths and keeping track of the 
radiation length of the materials for you.

To use this, you must first generate some events using hdgeant
with the TRAJECTORY card enabled. This card tells GEANT to
write out the step size and radiation length of the material
for every step. It is usually also beneficial to "throw"
non-interacting "geantino" particles. To make it easy, an
example control.in file already exists in this directory.
Note that geantinos are not charged particles. To do this
with charged particles, one should turn off energy loss and
multiple scattering by the LOSS and MULS flags to 0 in
control.in.

To use the plugin, attach it to any DANA executable. For
example, hd_root:

> hd_root --plugin=radlen_hists hdgeant.hddm

The histograms will be placed in the RADLEN directory in
the ROOT file. The histograms whose names start with "i"
are integrals of their non-"i" counterparts. These are
probably the ones you wish to look at. Projections on the
x-axis for a givne theta are most useful (try SetShowProjectionX()).

==== IMPORTANT ===

At this point in time, the results from this package are 
not in full agreement with pencil and paper calculations
nor with the plots shown by Richard Jones at the April, 2007
collaboration meeting. While this tends to show the same
structure, it always seems to report more radiation lengths
than the other methods.