// Complex Numbers Class for ROOT // 8/28/02 #ifndef __TComplex__ #define __TComplex__ #if !defined (__CINT__) || defined (__MAKECINT__) #include "Rtypes.h" #endif #include #include "TObject.h" class TComplex : public TObject{ public: //constructors TComplex(); TComplex(const TComplex & rhs); TComplex(Double_t, Double_t); //destructors virtual ~TComplex(); //getters Double_t GetReal() { return fX; } Double_t GetImaginary() { return fY; } Double_t GetR() { return fR; } Double_t GetPhase() { return fPhase; } //setters void SetReal(Double_t); void SetImaginary(Double_t); //other operations TComplex Add(TComplex&); TComplex Multiply(TComplex&); TComplex Conjugate(); private: Double_t fX; // Real Part Double_t fY; // Imaginary Part Double_t fR; // Amplitude Double_t fPhase; // Phase ClassDef(TComplex,1) //Complex number class }; #endif