/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/MdcPatRec/MdcRecoUtil/MdcRecoUtil-00-01-08/MdcRecoUtil/DifPoint.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: DifPoint.h,v 1.2 2009/12/23 02:59:56 zhangy Exp $
00004 //
00005 // Description:
00006 //      Class Header for |DifPoint|
00007 //      What i do ?
00008 //
00009 // Environment:
00010 //      Software developed for the BaBar Detector at the SLAC B-Factory.
00011 //
00012 // Author List:
00013 //      A. Snyder
00014 //
00015 // Copyright Information:
00016 //      Copyright (C) 1996      SLAC
00017 // 
00018 // History:
00019 //      Migration for BESIII MDC
00020 //
00021 //------------------------------------------------------------------------
00022 
00023 #ifndef DifPoint_H
00024 #define DifPoint_H
00025 
00026 #include <assert.h>
00027 #include "MdcRecoUtil/DifVector.h"
00028 #include "CLHEP/Geometry/Point3D.h"
00029 #ifndef ENABLE_BACKWARDS_COMPATIBILITY
00030 typedef HepGeom::Point3D<double> HepPoint3D;
00031 #endif
00032 
00033 
00034 class DifPoint:public DifVector {
00035 
00036 public:
00037   DifPoint(const DifPoint& p)
00038     :DifVector(p) {} 
00039   DifPoint()
00040     :DifVector() {}
00041   DifPoint(const HepPoint3D& p);
00042 
00043   DifPoint(const DifNumber& X,const DifNumber& Y,const DifNumber& Z)
00044     :DifVector(X,Y,Z) {}
00045   DifPoint(double X,double Y,double Z)
00046     :DifVector(X,Y,Z) {}
00047 
00048   //operators - sensible only
00049   inline DifPoint& operator=(const DifPoint& p);
00050   inline DifPoint& operator+=(const DifVector& v);
00051   inline DifPoint& operator-=(const DifVector& v);
00052   inline DifPoint& operator*=(const DifNumber& n);
00053   inline DifPoint& operator/=(const DifNumber& n);
00054 
00055   //binary operators
00056 
00057   inline friend DifPoint operator+
00058   (const DifPoint& p,const DifVector& v);
00059   inline friend DifPoint operator+
00060   (const DifVector& v,const DifPoint& p);
00061   inline friend DifPoint operator-
00062   (const DifPoint& p,const DifVector& v);
00063   inline friend DifVector operator-
00064   (const DifPoint& a,const DifPoint& b);
00065 
00066   //change of scale is ok (e.g. m->cm)
00067   inline friend DifPoint operator*
00068   (const DifPoint& p,const DifNumber& n);
00069   inline friend DifPoint operator*
00070   (const DifNumber& n,const DifPoint& p);
00071   inline friend DifPoint operator/
00072   (const DifPoint& v,const DifNumber& n);
00073 
00074 
00075 private:
00076   //disable senseless operations
00077   DifPoint& operator=(const DifVector& v); 
00078   DifPoint& operator+=(const DifPoint& p);
00079   DifPoint& operator-=(const DifPoint& p);
00080 
00081 public:
00082   //bes interface routines
00083   HepPoint3D hepPoint()const;
00084 };
00085 
00086 #include "MdcRecoUtil/DifPoint.icc"
00087 
00088 
00089 #endif
00090  

Generated on Tue Nov 29 23:13:31 2016 for BOSS_7.0.2 by  doxygen 1.4.7