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

Annotation of /gp2root/pTofHit.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Wed Apr 19 23:35:57 2006 UTC (18 years, 7 months ago) by pamela
Branch: MAIN
Branch point for: v1r0
File MIME type: text/plain
Initial revision

1 pamela 1.1 #ifndef PTOFHIT_H
2     #define PTOFHIT_H
3     #include <iostream>
4     #include "pHit.h"
5     #include "pTofID.h"
6    
7     using std::cout;
8     using std::endl;
9    
10     class pTofHit: public pHit {
11    
12     public:
13    
14     pTofHit(){};
15     pTofHit(const char *c){
16     int *temp = (int*) c;
17     SetHitID( new pTofID(c ));
18     temp++;
19     temp++;
20     SetIpart( *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 << "pTofHit : " << 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     };
78    
79     #endif //PTOFHIT_H

  ViewVC Help
Powered by ViewVC 1.1.23