1 |
#ifndef PHIT_H |
2 |
#define PHIT_H |
3 |
|
4 |
#include <vector> |
5 |
#include "pHitID.h" |
6 |
#include "TObject.h" |
7 |
|
8 |
class pHit :public TObject { |
9 |
|
10 |
public: |
11 |
|
12 |
pHit() { |
13 |
_xin=_yin=_zin=_erel=_p0=0.; |
14 |
_ipart=0; |
15 |
SetHitID(0); |
16 |
|
17 |
}; |
18 |
|
19 |
pHit( const float & xin, const float &yin,const float &zin, |
20 |
const float & erel,const float & p0, const int &ipart, |
21 |
pHitID *hid): |
22 |
_xin(xin), _yin(yin), _zin(zin), _erel(erel), _p0(p0), _ipart(ipart) |
23 |
{ |
24 |
SetHitID(hid); |
25 |
} |
26 |
|
27 |
virtual ~pHit(){}; |
28 |
void SetHitID(pHitID * hid){_hid=hid;} |
29 |
void SetXin(const float & x){_xin=x;} |
30 |
void SetYin(const float & x){_yin=x;} |
31 |
void SetZin(const float & x){_zin=x;} |
32 |
void SetErel(const float & x){_erel=x;} |
33 |
void SetP0(const float & x){_p0=x;} |
34 |
void SetIpart(const int & i){_ipart=i;} |
35 |
|
36 |
pHitID* GetHitID() const { return _hid;} |
37 |
float GetXin() const {return _xin;} |
38 |
float GetYin() const {return _yin;} |
39 |
float GetZin() const {return _zin;} |
40 |
float GetErel() const {return _erel;} |
41 |
float GetP0() const {return _p0;} |
42 |
int GetIpart()const {return _ipart;} |
43 |
|
44 |
virtual void Print() const =0; |
45 |
|
46 |
|
47 |
private: |
48 |
float _xin,_yin,_zin; |
49 |
float _erel; |
50 |
float _p0; |
51 |
int _ipart; |
52 |
pHitID *_hid; |
53 |
|
54 |
public: |
55 |
//#ifndef __GNUC__ |
56 |
ClassDef(pHit,1); |
57 |
//#endif |
58 |
}; |
59 |
|
60 |
typedef std::vector<pHit*> pHitColl; |
61 |
|
62 |
#endif //PHIT_H |
63 |
|