// -*- mode: c++ -*- #ifndef BRAT_BrMagnetVolume #define BRAT_BrMagnetVolume // $Id: BrMagnetVolume.h,v 1.7 2002/08/08 15:22:42 ufstasze Exp $ // // Root Classes #ifndef ROOT_TNamed #include "TNamed.h" #endif // BRAHMS Classes #ifndef BRAT_BrVector3D #include "BrVector3D.h" #endif #ifndef BRAT_BrLine3D #include "BrLine3D.h" #endif #ifndef BRAT_BrPlane3D #include "BrPlane3D.h" #endif #ifndef BRAT_BrCoordinateSystem #include "BrCoordinateSystem.h" #endif #ifndef BRAT_BrDetectorVolume #include #endif class BrDbMagnetVolume; class BrMagnetVolume : public BrDetectorVolume { public: BrMagnetVolume(); BrMagnetVolume(const Char_t *name, const Char_t *title); BrMagnetVolume(const Char_t *name, const Char_t *title, const Char_t *FileName); 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(const Char_t *name, TObjArray *asciiVolList); virtual ~BrMagnetVolume(); virtual Bool_t ReadASCIIFile(Char_t *ASCIIFileName, Char_t *name); virtual Double_t GetField() const { return fField;} virtual Double_t GetBdl() const { return fField*(-fEdgeFront+fEdgeBack) ;} virtual Double_t GetBdl(const BrLine3D& FrontLine, const BrLine3D& BackLine); Double_t GetEdgeFront() const { return fEdgeFront;} Double_t GetEdgeBack() const { return fEdgeBack;} Double_t GetCurrent(const Double_t Field); BrLine3D SwimBack(const BrLine3D& line,const Double_t momentum); BrLine3D SwimForward(const BrLine3D& line,const Double_t momentum); Bool_t GetSwimStatus(const BrLine3D& FrontLine, const BrLine3D& BackLine, Float_t FiduCutX=0.0,Float_t FiduCutY=0.0); BrPlane3D GetEffectiveEdgeEntrancePlane(); BrPlane3D GetEffectiveEdgeExitPlane(); virtual void SetField(const Double_t value) {fField = value;} virtual void SetCurrent(const Double_t value, const Char_t* Pol); virtual void SetEdgeFront(const Double_t value) {fEdgeFront = value;} virtual void SetEdgeBack(const Double_t value) {fEdgeBack = value;} virtual void ListParameters() const; virtual void Print(Option_t* option="d") const; // *MENU* virtual void Update(); void UpdateField(Int_t time); protected: Double_t fField; // Nominal field value Double_t fPolarity; // Signed value (-1. == A) // Signed value (+1 == B) 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; void SetDefaultCurrentParameters(const Char_t* ); void SetFieldFromHallProbe(Float_t hallProbeValue); void FillHallProbeList(Int_t start, Int_t end); private: enum EKeithleyHallProbeUnits { kUnitD1 = 2, kChannelD1 = 2, kUnitD2 = 2, kChannelD2 = 6, kUnitD3 = 3, kChannelD3 = 2, kUnitD4 = 3, kChannelD4 = 6, kUnitD5 = 1, kChannelD5 = 2, }; Bool_t FillMagnetParameters(); BrDbMagnetVolume *GetMagnetWithCondition(); public: friend ostream& operator<< (ostream& os,BrMagnetVolume*); friend ostream& operator<< (ostream& os,BrMagnetVolume&); ClassDef(BrMagnetVolume,1) // BRAHMS detector volume class }; extern ostream& operator<< (ostream& os,BrMagnetVolume *volume_p); extern ostream& operator<< (ostream& os,BrMagnetVolume &volume_p); #endif // $Log: BrMagnetVolume.h,v $ // Revision 1.7 2002/08/08 15:22:42 ufstasze // Introduced x and y fiducial cut in GetSwimStatus // // Revision 1.6 2002/04/16 14:44:12 hagel // Implement Hall Probe reading from Db in ySQL mode. Major surgery on BrGeometryDbManager concerning building BrDetectorVolume and BrMagnetVolume // // Revision 1.5 2002/02/22 21:49:15 videbaek // Add Print method, and give warning for ListParameters as becoming obsolete. // // Revision 1.4 2001/11/05 23:41:42 hagel // Changes to MySQL mode for Geometry DB manager // // Revision 1.3 2001/09/22 16:18:18 videbaek // Commit changes to BrDetectorVolume and BrMagnetVolume that // Pawel has made. Check out with test programs as well as reconstruction so declared ok. // // Revision 1.2 2001/07/22 21:32:33 videbaek // Added method GetCurrent // // Revision 1.1.1.1 2001/06/21 14:55:18 hagel // Initial revision of brat2 // // Revision 1.16 2001/05/07 21:19:39 hagel // Changes to implement MySQL Db stuff // // Revision 1.15 2001/03/07 17:32:32 hagel // Changes to use with new MySQL DB access // // Revision 1.14 2000/12/23 21:34:47 videbaek // remove merge conflict // // Revision 1.13 2000/12/22 18:36:30 bramreco // Fix cosmeticUpdate versions // // Revision 1.12 2000/12/16 01:12:47 videbaek // Set proper types for methods. // // Revision 1.11 2000/12/07 22:12:49 videbaek // Added current setting capabilities // // Revision 1.10 2000/11/22 21:04:35 videbaek // BrMagnetVolume is now derived from BrDetectorVolume. Modified and uniform methods // now. // // Revision 1.9 2000/11/15 20:57:57 videbaek // Added SwimForward to magnet volume. Modified internals. The existing // Get methods are stillvalid. Some Set methods has been added. // // Revision 1.8 2000/10/10 18:11:11 videbaek // Update to reflect change in BrRotMatrix // // Revision 1.7 2000/05/02 13:33:43 videbaek // removed excessive log comments // // Revision 1.6 1999/04/22 21:35:34 hagel // Improvements in SwimBack() // // Revision 1.5 1999/03/07 00:00:41 hagel // // Revision 1.4 1999/02/11 15:09:53 hagel // Changes to get to compile under Solaris // // Revision 1.3 1999/01/21 23:23:19 hagel // 1. Changed convention for checking includes. Current convention is: // BRAT_Br...... eg BRAT_BrModule ala ROOT. // 2. Added CVS logs to .h files that didn't have them. // 3. Moved checking of include definition to first line for easier reading // 4. Put checks before all includes in the include files as per BRAT specifications // 5. Added BrGeantHeader to Geant Makefile // 6. All changes have been checked to compile on NT ala Cygnus // // Revision 1.2 1999/01/15 15:32:13 videbaek // Updates to volume files. // Added member histon to BrModule, and member function HistOn(). // Added BrMath as standard math library. // // Revision 1.1 1998/12/18 19:59:24 videbaek // new module // //