00001 /*********************************************************************** 00002 * 00003 * $Id: StGlobalCoordinate.hh,v 1.6 2011/01/18 14:34:28 fisyak Exp $ 00004 * 00005 * Author: brian Feb 6, 1998 00006 * 00007 ************************************************************************ 00008 * 00009 * Description: Raw data information along with access functions 00010 * 00011 ************************************************************************* 00012 * 00013 * $Log: StGlobalCoordinate.hh,v $ 00014 * Revision 1.6 2011/01/18 14:34:28 fisyak 00015 * Clean up TpcDb interfaces and Tpc coordinate transformation 00016 * 00017 * Revision 1.5 2005/07/06 19:10:34 fisyak 00018 * Add TpcCoordinate transormation classes to dictionary, use templated StThreeVector 00019 * 00020 * Revision 1.4 2003/09/02 17:57:51 perev 00021 * gcc 3.2 updates + WarnOff 00022 * 00023 * Revision 1.3 2000/04/28 16:40:35 calderon 00024 * added constructor taking StThreeVectorF, because that's what 00025 * StHits and StMcHits have. 00026 * 00027 * Revision 1.2 2000/02/02 23:01:38 calderon 00028 * Changes for CC5 00029 * Tests withs StTpcDb still going. 00030 * 00031 * Revision 1.1 1999/11/19 19:01:07 calderon 00032 * First version of files for StDbUtilities. 00033 * Note: this package uses StTpcDb. 00034 * There are some parameters 00035 * that are not yet kept in StTpcDb. When StTpcDb has them, the code 00036 * will be changed to use them from StTpcDb. 00037 * There are no Ftpc or Svt Coordinate transformations in here yet. 00038 * 00039 * Revision 1.3 1999/10/25 18:38:29 calderon 00040 * changed mPos and pos() to mPosition and position() to 00041 * be compatible with StEvent/StMcEvent. 00042 * 00043 * Revision 1.2 1998/11/16 19:40:21 lasiuk 00044 * constructors do not use reference for doubles 00045 * 00046 * Revision 1.1 1998/11/10 17:12:04 fisyak 00047 * Put Brian trs versin into StRoot 00048 * 00049 * Revision 1.2 1998/11/01 16:21:06 lasiuk 00050 * remove 'St' from variable declarations 00051 * add set functions in local Coordinates 00052 * 00053 * Revision 1.1 1998/05/21 21:27:37 lasiuk 00054 * Initial revision 00055 * 00056 * 00057 ***********************************************************************/ 00058 #ifndef ST_GLOBAL_COORDINATE_HH 00059 #define ST_GLOBAL_COORDINATE_HH 00060 00061 #include <Stiostream.h> 00062 00063 #include "StThreeVectorF.hh" 00064 00065 class StGlobalCoordinate 00066 { 00067 public: 00068 StGlobalCoordinate() {} 00069 StGlobalCoordinate(const double x, const double y, const double z) : mPosition(x,y,z) { } 00070 StGlobalCoordinate(const double *x) : mPosition(x) { } 00071 StGlobalCoordinate(const StThreeVector<double>& x) : mPosition(x) {} 00072 StGlobalCoordinate(const StThreeVectorF& x) : mPosition(x.x(), x.y(), x.z()) {} 00073 00074 virtual ~StGlobalCoordinate() {} 00075 int operator==(const StGlobalCoordinate& p) const {return p.mPosition == mPosition;} 00076 int operator!=(const StGlobalCoordinate& p) const {return !(*this == p);} 00077 // access functions provided by StThreeVector 00078 virtual const StThreeVector<double>& position() const {return *&mPosition;} 00079 virtual StThreeVector<double>& position() {return *&mPosition;} 00080 virtual void setPosition(const StThreeVector<double>& val) {mPosition = val; } 00081 00082 protected: 00083 StThreeVector<double> mPosition; 00084 00085 }; 00086 // Non-Member 00087 ostream& operator<<(ostream&, const StGlobalCoordinate&); 00088 #endif
1.5.9