BRAT updates

From: Kris Hagel (hagel@comp.tamu.edu)
Date: Sat Mar 06 1999 - 19:27:30 EST


Hello,
I have been doing a bunch of miscellaneous jobs that I thought I would
bring you up on.
The changes I checked into the BRAT repository are summarized below. To
summarize,
the two main things I did was to implement BrFSTrackingModule. That in
itself was
not to big as I just adapted the ideas from BrMRSTrackingModule. But in
the
tracktovertex method, I used the BRAT Geometry classes we have. That
made
tracking through the magnets much more transparent. It will also become
more
seamless to put in real magnetic fields because it would be done in the
BrMagnetVolume class. See details below.

The second main thing I did was to implement BrParameterDbManager. That
was also
done in a really neat way to avoid the cyclic dependencies. It is also
implemented in a
bunch of the detectors. Again, more details below.

You will also note that the summary I have below is also in the CVS log
of the files that were modified.

Kris

1. Implemented BrFSTrackingModule. Started with BrMRSTrackingModule
and made
   appropriate changes to handle the forward spectrometer. It uses the
new
   track classes as well as extensively using geometry classes. It also
uses
   new methods and functionality as described below.
2. Changed BrMagnetVolume
   a. Added method SwimBack(BrLine3D &,Double_t momentum): takes a
       track at the exit of magnet and given the momentum, calculates
       where the track would come into the front of the magnet.
   b. Added method GlobalToLocal(BrLine3D &): does a combination of
       GlobalToLocal(BrVector3D &,BrVector3D&,0) and
       GlobalToLocal(BrVector3D &,BrVector3D&,1)
   c. Added method LocalToGlobal(BrLine3D &): does a combination of
       LocalToGlobal(BrVector3D &,BrVector3D&,0) and
       LocalToGlobal(BrVector3D &,BrVector3D&,1)
   d. Changed BrDetectorVolume: same additions of methods GlobalToLocal

      and LocalToGlobal as in BrMagnetVolume
2. Added a parameter base class BrDetectorParamsBase: helps when
reading
    in database files. Declared ASCII reading routines to be virtual.
    Has main ReadASCIIFile which decodes the ASCII parameter files, then

    calls the detector specific methods SetASCIIParameter
3. Implemented SetASCIIParameter in BrDetectorParamsDC,
BrDetectorParamsTPC,
    BrDetectorParamsTof, BrDetectorParamsBB
4. Implemented BrParameterDbManager. It currently works similarly to
    BrGeometryDbManager and creates the BrDetectorParamsXXX objects when

    called. These objects then read in ASCII parameter files with a
currently
    "well defined" format using the above implemented routines using a
constructor:
    BrDetectorParamsXXX(Char_t *name, Char_t *title,Char_t
*ASCIIFileName);
5. If no parameter file is specified, it executes the constructor we
   have been using so far, namely BrDetectorParamsXXX(Char_t
*name,Char_t *title).
    These constructors generate default parameters and are
semi-intelligent
    which means they generate approximately appropriate parameters
depending
    upon which detector they are. I should say that the parameters were

    deemed appropriate at the time of writing the SetDefaultParams
routine.
    a. It is used in the same way as BrGeometryDbManager, that is:
       BrParameterDbManager *gParamDb =
BrParameterDbManager::Instance();
       gParamDb->SetDbParameterFileName("DetectorParameters.txt");
6. Added a new directory, params, in BRAT. This directory has the file

    DetectorParameters.txt in it. If the BrParameterDbManager is
started
    and the DetectorParameter.txt file is specified, it will look in the

    $BRATSYS/params directory if it cannot find the file in the
directory
    that the user has set default to.
7. Implemented BrParameterDbManager in DC digitize and tracking code.
The
    SetDetectorParams methods have been moved to private and can no
longer be
    used from the macro or program.
8. Implemented BrParameterDbManager in TPC digitize and tracking code.
9. Implemented BrParameterDbManager in Tof Calibrate and GeneratePid
code.
10 Changed the GetEntries() in BrDataTable to use the GetLast()+1
method in
    TObjArray. This should be much faster, but has the caveat that it
assumes
    that all slots in TObjArray are full. That seems to me to be the
case
    in how we use TObjArray at least in BrDataTable, but if problems
arise due
    to this change, it can always be easily changed back. It has been
used a
    fair amount before checking in and no problems were found.



This archive was generated by hypermail 2b29 : Tue Feb 01 2000 - 20:35:04 EST