/[PAMELA software]/gp2root/pCasHit.h
ViewVC logotype

Contents of /gp2root/pCasHit.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Oct 22 08:26:45 2006 UTC (18 years, 1 month ago) by cafagna
Branch: MAIN
CVS Tags: v0r9, v0r10, HEAD
Changes since 1.1: +5 -0 lines
File MIME type: text/plain
Stable version, lot of changes, ROOT support included, persistency not yet activated

1 #ifndef PCASHIT_H
2 #define PCASHIT_H
3 #include <iostream>
4 #include "pHit.h"
5 #include "pCasID.h"
6 #include "TObject.h"
7
8 using std::cout;
9 using std::endl;
10
11 class pCasHit: public pHit {
12
13 public:
14
15 pCasHit(){};
16 pCasHit(const char *c){
17 int *temp = (int*) c;
18 SetIpart( *temp++ );
19 SetHitID( new pCasID((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 << "pCasHit : " << 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(pCasHit,1);
79
80 };
81
82 #endif //PCASHIT_H
83

  ViewVC Help
Powered by ViewVC 1.1.23