00001
00002
00003
00004
00005 #ifndef ST_TPC_COORDINATE_H
00006 #define ST_TPC_COORDINATE_H
00007 #include "Stiostream.h"
00008 #include "StThreeVector.hh"
00009
00010 class StTpcCoordinate {
00011 public:
00012 StTpcCoordinate(const Double_t x, const Double_t y, const Double_t z, const Int_t sect, Int_t row) :
00013 mPosition(x,y,z), mFromSector(sect), mFromRow(row) {}
00014 StTpcCoordinate(const StThreeVector<double>& position, const Int_t sect, Int_t row) :
00015 mPosition(position), mFromSector(sect), mFromRow(row) {}
00016 virtual ~StTpcCoordinate() {}
00017 Int_t operator==(const StTpcCoordinate& p) const {return p.mPosition == mPosition;}
00018 Int_t operator!=(const StTpcCoordinate& p) const {return !(*this == p);}
00019
00020
00021 virtual const StThreeVector<double>& position() const { return mPosition; }
00022 Int_t fromSector() const { return mFromSector; }
00023 Int_t fromRow() const { return mFromRow; }
00024 Int_t sector() const { return mFromSector; }
00025 Int_t row() const { return mFromRow; }
00026 StThreeVector<double>& position() { return mPosition; }
00027 virtual void setPosition(StThreeVector<double>& position) { mPosition = position; }
00028 virtual void setSector(Int_t sector) { mFromSector = sector; }
00029 virtual void setRow(Int_t row) { mFromRow = row; }
00030 protected:
00031 StThreeVector<double> mPosition;
00032 Int_t mFromSector;
00033 Int_t mFromRow;
00034 };
00035
00036 ostream& operator<<(ostream&, const StTpcCoordinate&);
00037 #endif