1 |
#ifndef PCATHIT_H |
2 |
#define PCATHIT_H |
3 |
#include <iostream> |
4 |
#include "pHit.h" |
5 |
#include "pCatID.h" |
6 |
#include "TObject.h" |
7 |
|
8 |
using std::cout; |
9 |
using std::endl; |
10 |
|
11 |
class pCatHit: public pHit { |
12 |
|
13 |
public: |
14 |
|
15 |
pCatHit(){}; |
16 |
pCatHit(const char *c){ |
17 |
int *temp = (int*) c; |
18 |
SetIpart( *temp++ ); |
19 |
SetHitID( new pCatID((char*)temp )); |
20 |
temp++; |
21 |
SetXin( *((float*)temp) ); |
22 |
temp++; |
23 |
SetYin( *((float*)temp) ); |
24 |
temp++; |
25 |
SetZin( *((float*)temp) ); |
26 |
temp++; |
27 |
SetXout( *((float*)temp) ); |
28 |
temp++; |
29 |
SetYout( *((float*)temp) ); |
30 |
temp++; |
31 |
SetZout( *((float*)temp) ); |
32 |
temp++; |
33 |
SetErel( *((float*)temp) ); |
34 |
temp++; |
35 |
SetTime( *((float*)temp) ); |
36 |
temp++; |
37 |
SetPath( *((float*)temp) ); |
38 |
temp++; |
39 |
SetP0( *((float*)temp) ); |
40 |
} |
41 |
|
42 |
void SetXout(const float & x){_xout=x;} |
43 |
void SetYout(const float & x){_yout=x;} |
44 |
void SetZout(const float & x){_zout=x;} |
45 |
void SetTime(const float & x){_time=x;} |
46 |
void SetPath(const float & x){_path=x;} |
47 |
|
48 |
float GetXout() const {return _xout;} |
49 |
float GetYout() const {return _yout;} |
50 |
float GetZout() const {return _zout;} |
51 |
float GetTime() const {return _time;} |
52 |
float GetPath() const {return _path;} |
53 |
|
54 |
void Print() const { |
55 |
cout << "pCatHit : " << endl; |
56 |
GetHitID()->Print() ; |
57 |
cout << " Ipart = " << GetIpart() << endl; |
58 |
cout << " xin,yin,zin = " |
59 |
<< GetXin() <<", " |
60 |
<< GetYin() <<", " |
61 |
<< GetZin() << endl; |
62 |
cout << " xout,yout,zout = " |
63 |
<< GetXout() <<", " |
64 |
<< GetYout() <<", " |
65 |
<< GetZout() << endl; |
66 |
|
67 |
cout << " erel, time, path, p0= " |
68 |
<< GetErel() << ", " |
69 |
<< GetTime() << ", " |
70 |
<< GetPath() << ", " |
71 |
<< GetP0() << endl; |
72 |
}; |
73 |
|
74 |
private: |
75 |
float _xout,_yout,_zout; |
76 |
float _time,_path; |
77 |
public: |
78 |
ClassDef(pCatHit,1); |
79 |
|
80 |
}; |
81 |
|
82 |
#endif //PCATHIT_H |
83 |
|