BRAT 2.4.5
Class index
Full class index
brahmlib
BRAHMS
ROOT page

BrDetectorVolume


class description - source file - inheritance tree

class BrDetectorVolume : public TNamed


    protected:
Bool_t FillVolume() BrDbDetectorVolume* GetDetectorVolumeWithCondition(const Char_t* name, Float_t specAngle, Int_t platformType) public:
BrDetectorVolume BrDetectorVolume() BrDetectorVolume BrDetectorVolume(const Char_t* name, const Char_t* title) BrDetectorVolume BrDetectorVolume(const Char_t* name, const Char_t* title, const Char_t* ASCIIFileName) BrDetectorVolume BrDetectorVolume(const Char_t* name, const Char_t* title, Float_t sizeX, Float_t sizeY, Float_t sizeZ, BrVector3D& origin, BrRotMatrix& rotMatrix) BrDetectorVolume BrDetectorVolume(const Char_t* name, TObjArray* asciiVolList) BrDetectorVolume BrDetectorVolume(BrDetectorVolume&) virtual void ~BrDetectorVolume() void AddVerticalRotation(Float_t& theta2, Float_t& phi2, Float_t& theta3, Float_t& phi3, Float_t beta) static TClass* Class() virtual BrPlane3D GetBackPlane() virtual const BrCoordinateSystem* GetCoordinateSystem() const virtual BrPlane3D GetFrontPlane() virtual BrPlane3D GetMidPlane() virtual BrVector3D GetPosition() virtual BrVector3D GetPosVector3D() virtual const BrRotMatrix* GetRotMatrix() const virtual Float_t* GetSize() virtual void GlobalToLocal(const Float_t* xg, Float_t* xl, Int_t iflag) virtual void GlobalToLocal(const BrVector3D&, BrVector3D&, Int_t iflag) virtual BrLine3D GlobalToLocal(const BrLine3D& line) virtual TClass* IsA() const virtual void ListParameters() virtual void LocalToGlobal(const Float_t* xl, Float_t* xg, Int_t iflag) virtual void LocalToGlobal(const BrVector3D&, BrVector3D&, Int_t iflag) virtual BrLine3D LocalToGlobal(const BrLine3D& line) virtual void Print(Option_t* option = "d") const virtual Bool_t ReadASCIIFile(const Char_t* ASCIIFileName, const Char_t* name) virtual void SetCoordinateSystem(BrCoordinateSystem& system) virtual void SetVerbose(Bool_t verbose) virtual void SetVolumeParameters(Float_t sizeX, Float_t sizeY, Float_t sizeZ, BrVector3D origin, BrRotMatrix rotMatrix) void SetVolumeParameters(Float_t xl, Float_t yl, Float_t zl, Float_t angle, Float_t beta, Float_t xl_center, Float_t yl_center, Float_t zl_center, Char_t* type) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual void Update() virtual Bool_t Verbose() const

Data Members


    protected:
Float_t fSize[3] Detector size (x,y,z) Char_t fType[4] Detector type (for classification) Bool_t fVerbose Verbose output flag BrCoordinateSystem fSystem Coordinate system definition. Bool_t fSetup Int_t fCurrentRunNo Current run number (used in update) BrRunsDb* fRunDb Pointer to run db. BrRunInfoManager* fRunManager Pointer to run manager BrGeometriesDb* fGeometryDb Pointer to geo db. TObjArray* fAsciiVolumeList List of vols to read in ASCII file


See also

BrMagnetVolume

Class Description

 BrDetectorVolume is a BRAHMS base class providing information
 about detector geometry, and uniform access to a specific
 detector that may have additional information.

 Some of the basic functionality is that each detectorvolume
 contains a BrCoordinateSystem information and thus enable transformation
 between Local, Global and other Master Systems. In addition there are definitions
 of other volume parameters as active volume, shape etc. that
 can be helpful in projection of lines to detector specific planes.




BrDetectorVolume():TNamed()
 Default Constructor. Set counter and list data members to zero.
 Don't use this constructor unless you have to and know
 what you are doing

BrDetectorVolume(const Char_t *name, const Char_t *title, const Char_t *ASCIIFileName) :TNamed(name,title)
 This constructor should only be used in stand alone application
/ and not in connection with the VolumeDbManager.

BrDetectorVolume(const Char_t *name, const Char_t *title) :TNamed(name,title)
Normal named constructor

BrDetectorVolume(const Char_t *name, TObjArray *asciiVolList) :TNamed(name,name)
Constructor called from BrGeometryDbManager in MySQL mode

BrDetectorVolume(const Char_t *name, const Char_t *title, Float_t sizeX, Float_t sizeY, Float_t sizeZ, BrVector3D& origin, BrRotMatrix& rotMatrix) :TNamed(name,title)
Constructor specifying size, origin and rotMatrix directly

~BrDetectorVolume()

SetVolumeParameters(float xl, float yl, float zl, float angle, float beta, float xl_center, float yl_center, float zl_center, char *type)

void AddVerticalRotation(Float_t &theta2,Float_t &phi2, Float_t &theta3,Float_t &phi3, Float_t beta)

void SetVolumeParameters(Float_t sizeX, Float_t sizeY, Float_t sizeZ, BrVector3D origin, BrRotMatrix rotMatrix)
Alternate volume parameter setting routine.  More modern KH 4-May-2001
Convenient to use with MySQL mode of DB after calling
name, title constructor

ListParameters()
  2/22/02 - Slated to become obsolete - use Print() instead

ReadASCIIFile(const Char_t *ASCIIFileName, const Char_t *DetectorName)

void GlobalToLocal(const float* xg, float* xl, int flag)

void GlobalToLocal(const BrVector3D& xg, BrVector3D& xl, int flag)

BrLine3D GlobalToLocal(const BrLine3D& line)

void LocalToGlobal(const float xl[3], float xg[3],int flag)

void LocalToGlobal(const BrVector3D& xl, BrVector3D& xg,int flag)
flag = 1 transform direction cosines
flag = 0 transform coordinates

BrLine3D LocalToGlobal(const BrLine3D& line)

GetPosVector3D()
 Return volume position as a vector


GetPosition()
 Return volume position as a vector


GetFrontPlane()
 Get the Front Plane of the detector in the Master Coordinate system


GetBackPlane()
 Return Back in Master Coordinate system.


GetMidPlane()
 Return MidPlane  in Master Coordinate system.


void Print(Option_t* option) const
 Options:
   B         Basic information
   D         Detector information


void Update()
Update the geometry parameters to those of the run currently selected.
Do it only if a new run is being selected.  Not necessary to do it
if this is being called for the same run as it was the last time through.

Bool_t FillVolume()
Fill the detector volume from entries in MySQL database.
By convention, we store the volume parameters in the DB in coordinates
of the volume (platform) they are sitting on.  In addition, the
name of the parent volume (platform volume is placed on) is specified.
To fill the BrDetectorVolume with global values, we start with
the volume name, continue to get other volumes out specified by parent
volume name until we reach the CAVE volume.  This is recognized
by having a parent volume with a length of 0.  After each volume is
extracted from the DB, the coordinates are translated into the master
system of the parent volume and the rotation matrix is convoluted with
the existing rotation matrix.
Once this is done, the parameters are used to fill vol

Return status:
kTRUE if volume found and successfully filled
kFALSE if volume not found or not successfully filled

BrDbDetectorVolume* GetDetectorVolumeWithCondition(const Char_t *name,Float_t specAngle,Int_t platformType)
Get detector volumes out of the DB with name like one specified and
valid time less than run time. Then search through and find
the one valid at the latest time which is earlier than the current run.
We do that by looking for the smallest difference between the start of
validity and the run time.



Inline Functions


                         Float_t* GetSize()
                             void SetCoordinateSystem(BrCoordinateSystem& system)
        const BrCoordinateSystem* GetCoordinateSystem() const
               const BrRotMatrix* GetRotMatrix() const
                             void SetVerbose(Bool_t verbose)
                           Bool_t Verbose() const
                          TClass* Class()
                          TClass* IsA() const
                             void ShowMembers(TMemberInspector& insp, char* parent)
                             void Streamer(TBuffer& b)
                             void StreamerNVirtual(TBuffer& b)
                 BrDetectorVolume BrDetectorVolume(BrDetectorVolume&)

This page automatically generated by script docBrat by Christian Holm

Copyright ; 2002 BRAHMS Collaboration <brahmlib@rcf.rhic.bnl.gov>
Last Update on Wed Sep 11 04:51:25 2002 by hagel $

Validate HTML
Validate CSS