BRAT 2.4.5
Class index
Full class index
brahmlib
BRAHMS
ROOT page

BrMagnetVolume


class description - source file - inheritance tree

class BrMagnetVolume : public BrDetectorVolume

    private:
Bool_t FillMagnetParameters() BrDbMagnetVolume* GetMagnetWithCondition() protected:
void FillHallProbeList(Int_t start, Int_t end) void SetDefaultCurrentParameters(const Char_t*) void SetFieldFromHallProbe(Float_t hallProbeValue) public:
BrMagnetVolume BrMagnetVolume() BrMagnetVolume BrMagnetVolume(const Char_t* name, const Char_t* title) BrMagnetVolume BrMagnetVolume(const Char_t* name, const Char_t* title, const Char_t* FileName) BrMagnetVolume BrMagnetVolume(const Char_t* name, const Char_t* title, Float_t sizeX, Float_t sizeY, Float_t sizeZ, BrVector3D origin, BrRotMatrix rotMatrix, Float_t frontEdge, Float_t backEdge) BrMagnetVolume BrMagnetVolume(const Char_t* name, TObjArray* asciiVolList) BrMagnetVolume BrMagnetVolume(BrMagnetVolume&) virtual void ~BrMagnetVolume() static TClass* Class() virtual Double_t GetBdl() const virtual Double_t GetBdl(const BrLine3D& FrontLine, const BrLine3D& BackLine) Double_t GetCurrent(const Double_t Field) Double_t GetEdgeBack() const Double_t GetEdgeFront() const BrPlane3D GetEffectiveEdgeEntrancePlane() BrPlane3D GetEffectiveEdgeExitPlane() virtual Double_t GetField() const Bool_t GetSwimStatus(const BrLine3D& FrontLine, const BrLine3D& BackLine, Float_t FiduCutX = 0.0, Float_t FiduCutY = 0.0) virtual TClass* IsA() const virtual void ListParameters() const virtual void Print(Option_t* option = "d") const virtual Bool_t ReadASCIIFile(Char_t* ASCIIFileName, Char_t* name) virtual void SetCurrent(const Double_t value, const Char_t* Pol) virtual void SetEdgeBack(const Double_t value) virtual void SetEdgeFront(const Double_t value) virtual void SetField(const Double_t value) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) BrLine3D SwimBack(const BrLine3D& line, const Double_t momentum) BrLine3D SwimForward(const BrLine3D& line, const Double_t momentum) virtual void Update() void UpdateField(Int_t time)

Data Members


    protected:
Double_t fField Nominal field value Double_t fPolarity Signed value (-1. == A) Double_t fEdgeFront position of front edge (in local coordinate system) Double_t fEdgeBack position of back edge (in local coordinate system) TString fFieldType Field type similar to GBRAHMS Double_t fA Current to B conversion factors Double_t fB Double_t fC TObjArray* fHallProbeList public:
static const BrMagnetVolume::EKeithleyHallProbeUnits kUnitD1 static const BrMagnetVolume::EKeithleyHallProbeUnits kChannelD1 static const BrMagnetVolume::EKeithleyHallProbeUnits kUnitD2 static const BrMagnetVolume::EKeithleyHallProbeUnits kChannelD2 static const BrMagnetVolume::EKeithleyHallProbeUnits kUnitD3 static const BrMagnetVolume::EKeithleyHallProbeUnits kChannelD3 static const BrMagnetVolume::EKeithleyHallProbeUnits kUnitD4 static const BrMagnetVolume::EKeithleyHallProbeUnits kChannelD4 static const BrMagnetVolume::EKeithleyHallProbeUnits kUnitD5 static const BrMagnetVolume::EKeithleyHallProbeUnits kChannelD5

Class Description

 BrMagnetVolume is a BRAHMS data class providing storage and
 access function for magnetic volume and fieldinformation. The
 base class deals with an effective edge approximation. The idea is
 to have derived classes handle more complicated field.


 The magnet filed can now be set using the currents, rather than reading
 field from file. Example
 d5magvol->SetCurrent(350,"B")

 The default polynominal coefficients are sets in the constructor.
 The class is derived from BrDetectorVolume which maintains the coordinate system
 description, while this derived class contains the specific information about
 fields description, and current fiels values.



BrMagnetVolume()
 Constructor. Set counter and list data members to zero.
 Don't use this constructor unless you have to and know
 what you are doing
 Use BrMagnetVolume(Char_t*, Char_t*);

BrMagnetVolume(const Char_t *name, const Char_t *title, const Char_t *FileName) : BrDetectorVolume(name, title, FileName)
 named constructor


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

BrMagnetVolume(const Char_t *name, TObjArray *asciiVolList) : BrDetectorVolume(name, asciiVolList)
 named constructor called by BrGeometryDbManager in MySQL mode

BrMagnetVolume(const Char_t *name, const Char_t *title, Float_t sizeX, Float_t sizeY, Float_t sizeZ, BrVector3D origin, BrRotMatrix rotMatrix, Float_t frontEdge, Float_t backEdge) : BrDetectorVolume(name,title,sizeX,sizeY,sizeZ,origin,rotMatrix)
 -------------------------------------------------------
 Normal constructor specifying origin and rotation matrix
 -------------------------------------------------------

~BrMagnetVolume()
 DTOR

void SetDefaultCurrentParameters(const Char_t* name)
 -----------------------------------
  Default current to field values.
  RD 12/47/2000
 -----------------------------------

void ListParameters() const
 ----------------------------------------------
  List all parameters, maybe should be changed
  to Print(const Option_t*).
  2/22/02 - Slated to become obsolete - use Print() instead
 ----------------------------------------------

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


Bool_t ReadASCIIFile(Char_t *FileName, Char_t *DetectorName)
 ------------------------------------------------------------------
  Read Magnet parameters from a field file. Organized in a similar
  way as to the geometry, but has additional information on the
  field values. Each entry should have the following data.
  ***
  As of (12/11/98) GBRAHMS+gbr2c.f does not yet generate this.


  MAGNET= D5
  gap x        =   35.000 cm
  gap y        =   10.000 cm
  gap z        =   76.200 cm
  rotation ang =  34.000 deg.
  gap center x =  106.247 cm
  gap center y =    0.000 cm
  gap center z =  157.517 cm
  Type=edge
  Field (KG)   =   -6.00
  z min        =  -42.000 cm
  z max        =   42.000 cm

 -------------------------------------------------------------------

void SetCurrent(const Double_t I , const Char_t* Pol)
 ---------------------------------------
 Set field value given the intensity
 and polarity of the current
 ---------------------------------------

Double_t GetCurrent(const Double_t Field )
 Get the current corresponding to a Magnetic field

 ---------------------------------------

BrPlane3D GetEffectiveEdgeEntrancePlane()
 ------------------------------------
 return effective edge entrance plane
 ------------------------------------

BrPlane3D GetEffectiveEdgeExitPlane()
 ------------------------------------
 return effective edge exit plane
 ------------------------------------

BrLine3D SwimBack(const BrLine3D& line, const Double_t momentum)
 --------------------------------------------------------------
 A routine to take a track (represented by a line) which begins
 at the back face of the magnet, use the magnetic field and
 momentum and return a line which contains the coordinate where
 the track exits the front face of the magnet and the direction
 rotated by the change in angle.
 --------------------------------------------------------------

BrLine3D SwimForward(const BrLine3D& line, const Double_t momentum)
 --------------------------------------------------------------
 A routine to take a track (represented by a line) which begins
 at the front face of the magnet, use the magnetic field and
 momentum and return a line which contains the coordinate where
 the track exits the front face of the magnet and the direction
 rotated by the change in angle.
 --------------------------------------------------------------

Bool_t GetSwimStatus(const BrLine3D& FrontLine, const BrLine3D& BackLine, Float_t FiduCutX,Float_t FiduCutY)
 --------------------------------------------------------
 This method fits helix to the entry and exit line
 and check wheter the helix run within the magnet gap
 --------------------------------------------------------

Double_t GetBdl(const BrLine3D& FrontLine, const BrLine3D& BackLine)
 --------------------------------------------------------
 This method fits helix to the entry and exit line
 calculate track lenght in the magnetic field and
 returns Bdl

void Update()
Do an update for a particular run.
For the moment, most of the building is done in geodb manager.
Perhaps, it will be moved soon.  For the moment, we simply update
the Keithley values from the DB.

Bool_t FillMagnetParameters()
Fill the magnet parameters from the DB

BrDbMagnetVolume* GetMagnetWithCondition()
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.

void FillHallProbeList(Int_t start, Int_t end)
Fill the Hall probe list with readings during this run.

void UpdateField(Int_t time)
This is the routine one would use to update the field based
on the hall probe readings.
Search through the list and take the last value that comes before
time

void SetFieldFromHallProbe(Float_t hallProbeValue)
Set the field given the value of the hall probe reading



Inline Functions


              Double_t GetField() const
              Double_t GetBdl(const BrLine3D& FrontLine, const BrLine3D& BackLine)
              Double_t GetEdgeFront() const
              Double_t GetEdgeBack() const
                  void SetField(const Double_t value)
                  void SetEdgeFront(const Double_t value)
                  void SetEdgeBack(const Double_t value)
               TClass* Class()
               TClass* IsA() const
                  void ShowMembers(TMemberInspector& insp, char* parent)
                  void Streamer(TBuffer& b)
                  void StreamerNVirtual(TBuffer& b)
        BrMagnetVolume BrMagnetVolume(BrMagnetVolume&)

This page automatically generated by script docBrat by Christian Holm

Copyright ; 2002 BRAHMS Collaboration <brahmlib@rcf.rhic.bnl.gov>
Last Update on 2002/08/30 17:35:06 $ by videbaek $

Validate HTML
Validate CSS