1 |
mocchiut |
1.1 |
#ifndef ToFLevel2_h |
2 |
|
|
#define ToFLevel2_h |
3 |
|
|
// |
4 |
|
|
#include <TObject.h> |
5 |
mocchiut |
1.4 |
#include <TArrayI.h> |
6 |
|
|
#include <TArrayF.h> |
7 |
mocchiut |
1.1 |
#include <TClonesArray.h> |
8 |
pam-fi |
1.6 |
|
9 |
|
|
#include <ToFStruct.h> |
10 |
mocchiut |
1.1 |
// |
11 |
|
|
// class which contains track related variables |
12 |
|
|
// |
13 |
|
|
#define ZTOF11 53.74 |
14 |
|
|
#define ZTOF12 53.04 |
15 |
|
|
#define ZTOF21 23.94 |
16 |
|
|
#define ZTOF22 23.44 |
17 |
|
|
#define ZTOF31 -23.49 |
18 |
|
|
#define ZTOF32 -24.34 |
19 |
|
|
|
20 |
mocchiut |
1.4 |
|
21 |
|
|
class ToFPMT : public TObject { |
22 |
|
|
|
23 |
|
|
private: |
24 |
|
|
|
25 |
|
|
public: |
26 |
|
|
Int_t pmt_id; |
27 |
|
|
Float_t adc; |
28 |
|
|
Float_t tdc_tw; |
29 |
|
|
// |
30 |
|
|
ToFPMT(); |
31 |
|
|
ToFPMT(const ToFPMT&); |
32 |
|
|
// |
33 |
|
|
ToFPMT* GetToFPMT(){return this;}; |
34 |
|
|
void Clear(); |
35 |
|
|
|
36 |
|
|
ClassDef(ToFPMT,1); |
37 |
|
|
}; |
38 |
|
|
|
39 |
|
|
|
40 |
mocchiut |
1.1 |
class ToFTrkVar : public TObject { |
41 |
|
|
|
42 |
|
|
private: |
43 |
|
|
|
44 |
|
|
public: |
45 |
mocchiut |
1.4 |
// |
46 |
mocchiut |
1.1 |
Int_t trkseqno; // tracker entry coming from tracker, 100 if image track is used, -100 if the track is not consistent with MyDetector2 one |
47 |
|
|
// |
48 |
mocchiut |
1.4 |
Int_t npmttdc; |
49 |
|
|
TArrayI pmttdc; |
50 |
mocchiut |
1.8 |
TArrayI tdcflag; // gf: 30 Nov 2006 |
51 |
mocchiut |
1.4 |
Float_t beta[13]; |
52 |
|
|
// |
53 |
|
|
Int_t npmtadc; |
54 |
|
|
TArrayI pmtadc; |
55 |
mocchiut |
1.8 |
TArrayI adcflag; // gf: 30 Nov 2006 |
56 |
mocchiut |
1.4 |
TArrayF dedx; |
57 |
|
|
// |
58 |
|
|
Float_t xtofpos[3]; |
59 |
|
|
Float_t ytofpos[3]; |
60 |
mocchiut |
1.1 |
// |
61 |
|
|
ToFTrkVar(); |
62 |
|
|
ToFTrkVar(const ToFTrkVar&); |
63 |
|
|
|
64 |
|
|
ToFTrkVar* GetToFTrkVar(){return this;}; |
65 |
mocchiut |
1.4 |
void Clear(); |
66 |
|
|
|
67 |
mocchiut |
1.1 |
ClassDef(ToFTrkVar,1); |
68 |
|
|
// |
69 |
|
|
}; |
70 |
|
|
|
71 |
|
|
class ToFLevel2 : public TObject { |
72 |
|
|
private: |
73 |
|
|
|
74 |
|
|
public: |
75 |
mocchiut |
1.4 |
// |
76 |
|
|
TClonesArray *PMT; // class needed to store PMT hit informations |
77 |
|
|
TClonesArray *ToFTrk; // track related variable class |
78 |
mocchiut |
1.1 |
Int_t tof_j_flag[6]; |
79 |
mocchiut |
1.7 |
Int_t unpackError; |
80 |
mocchiut |
1.1 |
// |
81 |
mocchiut |
1.4 |
Float_t GetdEdx(Int_t notrack, Int_t plane); |
82 |
mocchiut |
1.1 |
// |
83 |
|
|
// methods to make life simplier during the analysis, returns a pointer to the ToFTrkVar class containing track related variables |
84 |
|
|
// |
85 |
|
|
Int_t ntrk(){return ToFTrk->GetEntries();}; |
86 |
mocchiut |
1.4 |
Int_t npmt(){return PMT->GetEntries();}; |
87 |
|
|
|
88 |
mocchiut |
1.1 |
// |
89 |
pam-fi |
1.6 |
void GetLevel2Struct(cToFLevel2 *) const; |
90 |
|
|
// |
91 |
mocchiut |
1.1 |
ToFTrkVar *GetToFTrkVar(Int_t notrack); |
92 |
mocchiut |
1.4 |
ToFPMT *GetToFPMT(Int_t nohit); |
93 |
|
|
Int_t GetPMTid(Int_t gg, Int_t hh); |
94 |
|
|
TString GetPMTName(Int_t ind); |
95 |
|
|
Int_t GetPlaneIndex(Int_t pmt_id); |
96 |
|
|
void GetMatrix(Int_t notrack, Float_t adc[4][12], Float_t tdc[4][12]); |
97 |
mocchiut |
1.5 |
void GetPMTIndex(Int_t pmt_id, Int_t &gg, Int_t &hh); |
98 |
mocchiut |
1.1 |
// |
99 |
|
|
// constructor |
100 |
|
|
// |
101 |
|
|
ToFLevel2(); |
102 |
|
|
// |
103 |
|
|
// |
104 |
|
|
ToFLevel2* GetToFLevel2(){return this;}; |
105 |
mocchiut |
1.4 |
Float_t GetZTOF(Int_t plane_id){ |
106 |
mocchiut |
1.1 |
switch(plane_id){ |
107 |
|
|
case 11: return ZTOF11; |
108 |
|
|
case 12: return ZTOF12; |
109 |
|
|
case 21: return ZTOF21; |
110 |
|
|
case 22: return ZTOF22; |
111 |
|
|
case 31: return ZTOF31; |
112 |
|
|
case 32: return ZTOF32; |
113 |
|
|
default: return 0.; |
114 |
|
|
}; |
115 |
mocchiut |
1.4 |
}; |
116 |
|
|
|
117 |
mocchiut |
1.1 |
// |
118 |
|
|
// Paddles position |
119 |
|
|
// |
120 |
|
|
/* |
121 |
|
|
S11 8 paddles 33.0 x 5.1 cm |
122 |
|
|
S12 6 paddles 40.8 x 5.5 cm |
123 |
|
|
S21 2 paddles 18.0 x 7.5 cm |
124 |
|
|
S22 2 paddles 15.0 x 9.0 cm |
125 |
|
|
S31 3 paddles 15.0 x 6.0 cm |
126 |
|
|
S32 3 paddles 18.0 x 5.0 cm |
127 |
|
|
*/ |
128 |
|
|
|
129 |
|
|
Int_t GetToFPlaneID(Int_t ip); |
130 |
|
|
Int_t GetToFPlaneIndex(Int_t plane_id); |
131 |
|
|
Bool_t HitPaddle(Int_t ,Int_t); |
132 |
|
|
Int_t GetNHitPaddles(Int_t plane); |
133 |
mocchiut |
1.3 |
void Clear(); |
134 |
mocchiut |
1.1 |
// |
135 |
mocchiut |
1.7 |
ClassDef(ToFLevel2,2); |
136 |
mocchiut |
1.1 |
}; |
137 |
|
|
|
138 |
|
|
#endif |