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

Annotation of /gp2root/pCatHit.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Sun Oct 22 08:26:48 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 PCATHIT_H
2     #define PCATHIT_H
3     #include <iostream>
4     #include "pHit.h"
5     #include "pCatID.h"
6 cafagna 1.2 #include "TObject.h"
7 pamela 1.1
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 cafagna 1.2 public:
78     ClassDef(pCatHit,1);
79    
80 pamela 1.1 };
81    
82     #endif //PCATHIT_H
83 cafagna 1.2

  ViewVC Help
Powered by ViewVC 1.1.23