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

Annotation of /gp2root/pTofHit.h

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.23