1 |
#ifndef trknuclei_h |
2 |
#define trknuclei_h |
3 |
|
4 |
|
5 |
#if !defined(__CINT__) || defined(__MAKECINT__) |
6 |
|
7 |
#include <PamLevel2.h> |
8 |
|
9 |
#include <TF2.h> |
10 |
#include <TGraph.h> |
11 |
#include <TMath.h> |
12 |
#include <TSpline.h> |
13 |
#include <stdlib.h> |
14 |
|
15 |
|
16 |
#include <iostream> |
17 |
#include <iomanip> |
18 |
using namespace std; |
19 |
|
20 |
#endif |
21 |
/////////////////////////////////////////////////// |
22 |
/// |
23 |
/// |
24 |
/// CLASS FOR INITIALIZATIONS & PARAMETERS |
25 |
/// |
26 |
/// |
27 |
/////////////////////////////////////////////////// |
28 |
|
29 |
class TrkNuclei_parameters : public TObject{ |
30 |
|
31 |
private: |
32 |
|
33 |
TrkNuclei_parameters(){ SetDefault(); }; |
34 |
|
35 |
static TrkNuclei_parameters * _parameters; |
36 |
|
37 |
public: |
38 |
|
39 |
static TrkNuclei_parameters *Get(){ |
40 |
if(_parameters==0) { |
41 |
// cout << "**NEW**"<<endl; |
42 |
_parameters = new TrkNuclei_parameters(); |
43 |
} |
44 |
return _parameters; |
45 |
} |
46 |
|
47 |
// ---------- |
48 |
// PARAMETERS |
49 |
// ---------- |
50 |
TF2 *charge_vs_beta; |
51 |
TF2 *charge_vs_rig; |
52 |
|
53 |
|
54 |
bool SetZ_Beta( TF2* f ); |
55 |
bool SetZ_Beta( const char* formula ); |
56 |
TF2 *GetZ_Beta(){return charge_vs_beta;}; |
57 |
|
58 |
bool SetZ_Rigidity( TF2* f ); |
59 |
bool SetZ_Rigidity( const char* formula ); |
60 |
TF2 *GetZ_Rigidity(){return charge_vs_rig;}; |
61 |
|
62 |
void SetDefault(); |
63 |
|
64 |
void Delete(); |
65 |
|
66 |
ClassDef(TrkNuclei_parameters,1); |
67 |
|
68 |
}; |
69 |
/////////////////////////////////////////////////// |
70 |
/// |
71 |
/// |
72 |
/// CLASS INPLEMENTATION |
73 |
/// |
74 |
/// |
75 |
/////////////////////////////////////////////////// |
76 |
class TrkNuclei : public TObject{ |
77 |
|
78 |
private: |
79 |
|
80 |
/* float dedx_x[6]; */ |
81 |
/* float dedx_y[6]; */ |
82 |
/* int maxs_x[6]; */ |
83 |
/* int maxs_y[6]; */ |
84 |
|
85 |
TrkTrack *nutrk; |
86 |
|
87 |
public: |
88 |
|
89 |
|
90 |
TrkNuclei(){ Reset(); }; |
91 |
TrkNuclei(PamLevel2 *l2, int ntr){ Reset(); Set(l2,ntr); }; |
92 |
TrkNuclei(PamTrack* trk){ Reset(); Set(trk); }; |
93 |
TrkNuclei(TrkTrack *trk){ Reset(); Set(trk); }; |
94 |
|
95 |
~TrkNuclei(){ Reset(); }; |
96 |
|
97 |
void Reset(); |
98 |
void Clear(){ Reset(); }; |
99 |
void Delete(){ Reset(); }; |
100 |
|
101 |
TrkTrack *GetTrkTrack(){ return nutrk; }; |
102 |
|
103 |
bool Set(TrkTrack*); |
104 |
bool Set(PamTrack*); |
105 |
bool Set(PamLevel2*,int); |
106 |
|
107 |
|
108 |
Float_t GetZ_Beta(int ip, int iv, float beta); |
109 |
Float_t GetZ_Beta(int ip, float beta); |
110 |
Float_t GetZ_Beta(float beta); |
111 |
|
112 |
Float_t GetZ_Rigidity(int ip, int iv, float rig); |
113 |
Float_t GetZ_Rigidity(int ip, float rig); |
114 |
Float_t GetZ_Rigidity(float rig); |
115 |
Float_t GetZ_Rigidity(int ip, int iv){return GetZ_Rigidity(ip,iv,nutrk->GetRigidity());}; |
116 |
Float_t GetZ_Rigidity(int ip){return GetZ_Rigidity(ip,nutrk->GetRigidity());}; |
117 |
Float_t GetZ_Rigidity(){return GetZ_Rigidity(nutrk->GetRigidity());}; |
118 |
|
119 |
ClassDef(TrkNuclei,1); |
120 |
|
121 |
}; |
122 |
#endif |