README radlen_hists April 15, 2007 D. Lawrence Sep. 3, 2009 Updated 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 set to 3. 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. You will also want to set the AUTO card to 0 in order to turn off automatic step size calculation so that GEANT doesn't take huge steps through the gas making it appear as though all of their material is concentrated at a specific point. 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()).