MyVector3.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #ifndef MYVECTOR3_H_
  2. #define MYVECTOR3_H_
  3. class cParticle;
  4. class cMyVector3 {
  5. public:
  6. cMyVector3 (); // +
  7. cMyVector3 (double x_, double y_, double z_); // +
  8. cMyVector3 (const double *array, int starter = 0); // +
  9. ~cMyVector3 (); // not realised
  10. double operator () (int i) const; // +
  11. //inline Double_t operator [] (int) const; // not realised
  12. //Function for add numbers
  13. inline double x () const; // +
  14. inline double y () const; // +
  15. inline double z () const; // +
  16. inline double X () const; // +
  17. inline double Y () const; // +
  18. inline double Z () const; // +
  19. inline double Px () const; // +
  20. inline double Py () const; // +
  21. inline double Pz () const; // +
  22. inline void SetX (double);// +
  23. inline void SetY (double);// +
  24. inline void SetZ (double);// +
  25. inline void SetXYZ (double x_, double y_, double z_); // +
  26. // *** funny good things
  27. inline void GetXYZ (double *carray, int starter = 0) const; // +
  28. inline double Dot (const cMyVector3 &) const;
  29. // *** Not realised, do if you want
  30. /*
  31. void SetPtEtaPhi (Double_t pt, Double_t eta, Double_t phi);
  32. void SetPtThetaPhi (Double_t pt, Double_t theta, Double_t phi);
  33. Double_t Phi () const;
  34. Double_t Theta () const;
  35. inline Double_t CosTheta () const;
  36. inline Double_t Mag2 () const;
  37. Double_t Mag () const;
  38. void SetPhi (Double_t);
  39. void SetTheta (Double_t);
  40. inline void SetMag (Double_t);
  41. inline Double_t Perp2 () const;
  42. inline Double_t Pt () const;
  43. Double_t Perp () const;
  44. inline void SetPerp (Double_t);
  45. */
  46. // *** end
  47. inline cMyVector3 & operator = (const cMyVector3 &); // +
  48. inline bool operator == (const cMyVector3 &) const; // +
  49. inline bool operator != (const cMyVector3 &) const; // +
  50. inline cMyVector3 & operator += (const cMyVector3 &); // +
  51. inline cMyVector3 & operator -= (const cMyVector3 &); // +
  52. inline cMyVector3 operator - () const; // +
  53. inline cMyVector3 & operator *= (double); // +
  54. private:
  55. double fX, fY, fZ;
  56. };
  57. #endif