00001 00002 // 00003 // CLASS QvecBase : is independent of Fortran memory 00004 // and serves as base for tracks, 00005 // eflows etc. 00006 // 00007 // Author : G. Bagliesi 00008 // modified by C. Delaere: - modified lock (recursive) 00009 // - added operator < 00010 // with a variable SortCriterium 00011 // - function add converted to 00012 // operator+ 00013 // 00015 00016 00017 #ifndef _QVECBASE_H_ 00018 #define _QVECBASE_H_ 00019 00020 #include "AlObject.h" 00021 #include "CLHEP/Vector/LorentzVector.h" 00022 class QvrtBase; 00023 00025 class QvecBase : public AlObject 00026 { 00027 00028 public: 00029 00031 QvecBase(); 00032 00034 QvecBase(const QvecBase & origin); 00035 00037 ~QvecBase(){} 00038 00040 bool operator<(const QvecBase& other) const; 00041 00043 virtual void setA4V(float x, float y, float z, float e); 00045 virtual void setA4V(HepLorentzVector vec){_A4V = vec;} 00046 00048 virtual HepLorentzVector A4V() const; 00049 00051 virtual void setQCH(float qch){_qch = qch;} 00052 00054 virtual ALEPHTYPE TYPE() const {return OBJECT;} 00056 virtual QvrtBase* getOriginVertex() const {return oVertex;} 00058 virtual QvrtBase* getEndVertex() const {return eVertex;} 00060 virtual void setOriginVertex(QvrtBase* vrt) {oVertex = vrt;} 00062 virtual void setEndVertex(QvrtBase* vrt) {eVertex = vrt;} 00063 // copies of the ALPHA utility functions (see ALPHA manual) 00064 virtual float sign(float k) const; 00065 virtual float QP() const; 00066 virtual float QX() const; 00067 virtual float QY() const; 00068 virtual float QZ() const; 00069 virtual float QE() const; 00070 virtual float QM() const; 00071 virtual float QCH() const; 00072 virtual float QCT() const; 00073 virtual float QPH() const; 00074 virtual float QPT() const; 00075 virtual float QBETA() const; 00076 virtual float QGAMMA() const; 00077 virtual float QMSQ2(const QvecBase j) const; 00078 virtual float QM2(const QvecBase j) const; 00079 virtual float QDMSQ(const QvecBase j) const; 00080 virtual float QPPAR(const QvecBase j) const; 00081 virtual float QPPER(const QvecBase j) const; 00082 virtual float QDOT3(const QvecBase j) const; 00083 virtual float QDOT4(const QvecBase j) const; 00084 virtual float QCOSA(const QvecBase j) const; 00085 virtual float QDECA2(const QvecBase j) const; 00086 virtual float QDECAN(const QvecBase j) const; 00087 00089 virtual QvecBase operator+(const QvecBase j) const; 00090 00092 virtual HepDouble DECAY_ANG(const QvecBase j) const; 00093 00094 // the locking 00095 virtual void Lock(bool recurse=false ); 00096 virtual void unLock(bool recurse=false ); 00097 virtual int isLocked() const; 00098 00102 00108 static int SortCriterium; 00109 00110 protected: 00111 HepLorentzVector _A4V; 00112 QvrtBase* oVertex; 00113 QvrtBase* eVertex; 00114 int _locked; 00115 float _qch; 00116 00117 private: 00118 static int NERR; 00119 }; 00120 00121 #endif 00122