1 |
pamela |
1.1 |
/** |
2 |
|
|
* \file ToFNuclei.h |
3 |
|
|
* \author Emiliano Mocchiutti / Wolfgang Menn |
4 |
|
|
*/ |
5 |
pamelats |
1.2 |
|
6 |
|
|
//***************************************************** |
7 |
|
|
// WM 24-feb-2009: introduced "Set_Beta": |
8 |
|
|
// The user can set beta used in the code with "Set_Beta", |
9 |
|
|
// this beta is taken for the calculations. |
10 |
|
|
//***************************************************** |
11 |
|
|
|
12 |
|
|
|
13 |
pamela |
1.1 |
#ifndef tofnuclei_h |
14 |
|
|
#define tofnuclei_h |
15 |
|
|
|
16 |
|
|
#include <PamLevel2.h> |
17 |
|
|
|
18 |
|
|
#include <TTree.h> |
19 |
|
|
#include <TFriendElement.h> |
20 |
|
|
#include <TChain.h> |
21 |
|
|
#include <TFile.h> |
22 |
|
|
#include <TGraph.h> |
23 |
|
|
#include <TSpline.h> |
24 |
|
|
#include <TList.h> |
25 |
|
|
#include <TKey.h> |
26 |
|
|
#include <TSystemFile.h> |
27 |
|
|
#include <TSystemDirectory.h> |
28 |
|
|
#include <TSQLServer.h> |
29 |
|
|
|
30 |
|
|
#include <iostream> |
31 |
|
|
|
32 |
|
|
using namespace std; |
33 |
|
|
|
34 |
|
|
/** |
35 |
|
|
* |
36 |
|
|
*/ |
37 |
|
|
class ToFNuclei : public TObject { |
38 |
|
|
|
39 |
|
|
private: |
40 |
|
|
// |
41 |
|
|
PamLevel2 *L2; |
42 |
|
|
Bool_t debug; |
43 |
|
|
// |
44 |
|
|
// needed to avoid reprocessing the same event over and over to obtain the variables |
45 |
|
|
// |
46 |
|
|
UInt_t OBT; |
47 |
|
|
UInt_t PKT; |
48 |
|
|
UInt_t atime; |
49 |
|
|
Int_t tr; |
50 |
|
|
Int_t sntr; |
51 |
|
|
|
52 |
pamelats |
1.2 |
Float_t beta_in; |
53 |
pamela |
1.1 |
// |
54 |
|
|
Int_t ncount_trk; |
55 |
|
|
Float_t charge_trk; |
56 |
|
|
Float_t charge_layer_trk[6]; |
57 |
pamelats |
1.2 |
Float_t charge_PMT_trk[48]; |
58 |
pamela |
1.1 |
Int_t layerinfo_trk[6]; |
59 |
|
|
|
60 |
|
|
Int_t ncount_std; |
61 |
|
|
Float_t charge_std; |
62 |
|
|
Float_t charge_layer_std[6]; |
63 |
pamelats |
1.2 |
Float_t charge_PMT_std[48]; |
64 |
pamela |
1.1 |
Int_t layerinfo_std[6]; |
65 |
|
|
// |
66 |
|
|
|
67 |
|
|
public: |
68 |
|
|
// |
69 |
pamelats |
1.2 |
|
70 |
|
|
void Set_Beta(Float_t beta){ beta_in=beta;}; |
71 |
pamela |
1.1 |
// |
72 |
|
|
Int_t Get_Ncount_ToF_trk(){ Process(); return ncount_trk;}; |
73 |
|
|
Float_t Get_Charge_ToF_trk(){ Process(); return charge_trk;}; |
74 |
|
|
Float_t *Get_Charge_ToF_trk_layer(){ Process(); return charge_layer_trk;}; |
75 |
pamelats |
1.2 |
Float_t Get_Charge_ToF_trk_layer(Int_t layer){ Process(); return charge_layer_trk[layer];}; |
76 |
|
|
Float_t *Get_Charge_ToF_trk_PMT(){ Process(); return charge_PMT_trk;}; |
77 |
|
|
Float_t Get_Charge_ToF_trk_PMT(Int_t ipmt){ Process(); return charge_PMT_trk[ipmt];}; |
78 |
pamela |
1.1 |
Int_t *Get_Layerinfo_trk(){ Process(); return layerinfo_trk;}; |
79 |
pamelats |
1.2 |
Int_t Get_Layerinfo_trk(Int_t layer){ Process(); return layerinfo_trk[layer];}; |
80 |
pamela |
1.1 |
// |
81 |
|
|
Int_t Get_Ncount_ToF_std(){ Process(); return ncount_std;}; |
82 |
|
|
Float_t Get_Charge_ToF_std(){ Process(); return charge_std;}; |
83 |
|
|
Float_t *Get_Charge_ToF_std_layer(){ Process(); return charge_layer_std;}; |
84 |
|
|
Int_t *Get_Layerinfo_std(){ Process(); return layerinfo_std;}; |
85 |
pamelats |
1.2 |
Float_t *Get_Charge_ToF_std_PMT(){ Process(); return charge_PMT_std;}; |
86 |
|
|
Float_t Get_Charge_ToF_std_PMT(Int_t ipmt){ Process(); return charge_PMT_std[ipmt];}; |
87 |
|
|
Float_t Get_Charge_ToF_std_layer(Int_t layer){ Process(); return charge_layer_std[layer];}; |
88 |
|
|
Int_t Get_Layerinfo_std(Int_t layer){ Process(); return layerinfo_std[layer];}; |
89 |
pamela |
1.1 |
|
90 |
|
|
// |
91 |
|
|
ToFNuclei(); |
92 |
|
|
ToFNuclei(PamLevel2 *L2); |
93 |
|
|
~ToFNuclei(){ Delete(); }; |
94 |
|
|
// |
95 |
|
|
void SetDebug(Bool_t d){ debug=d; }; |
96 |
|
|
// |
97 |
|
|
void Clear(); |
98 |
|
|
void Clear(Option_t *option){Clear();}; |
99 |
|
|
void Delete(); |
100 |
|
|
void Delete(Option_t *option){Delete();}; |
101 |
|
|
// |
102 |
|
|
void Process(); ///< Process data for track number 0 |
103 |
|
|
void Process(Int_t ntr); ///< Process data for track number ntr |
104 |
|
|
void Print(); |
105 |
|
|
void Print(Option_t *option){Print();}; |
106 |
|
|
// |
107 |
|
|
ClassDef(ToFNuclei,1); |
108 |
|
|
}; |
109 |
|
|
|
110 |
|
|
#endif |
111 |
|
|
|