--- gp2root/pHit.h 2006/04/19 23:35:57 1.1.1.1 +++ gp2root/pHit.h 2006/10/22 08:26:57 1.2 @@ -3,20 +3,28 @@ #include #include "pHitID.h" +#include "TObject.h" - -class pHit { +class pHit :public TObject { public: - pHit( const float & xin=0, const float &yin=0,const float &zin=0, - const float & erel=0,const float & p0=0, const int &ipart=0, - pHitID *hid=0): + pHit() { + _xin=_yin=_zin=_erel=_p0=0.; + _ipart=0; + SetHitID(0); + + }; + + pHit( const float & xin, const float &yin,const float &zin, + const float & erel,const float & p0, const int &ipart, + pHitID *hid): _xin(xin), _yin(yin), _zin(zin), _erel(erel), _p0(p0), _ipart(ipart) { SetHitID(hid); } + virtual ~pHit(){}; void SetHitID(pHitID * hid){_hid=hid;} void SetXin(const float & x){_xin=x;} void SetYin(const float & x){_yin=x;} @@ -35,15 +43,21 @@ virtual void Print() const =0; + private: float _xin,_yin,_zin; float _erel; float _p0; int _ipart; pHitID *_hid; - + +public: + //#ifndef __GNUC__ + ClassDef(pHit,1); + //#endif }; typedef std::vector pHitColl; #endif //PHIT_H +