1 |
#ifndef DIGITIZER_H |
#ifndef DIGITIZER_H |
2 |
#define DIGITIZER_H |
#define DIGITIZER_H |
|
#define nspe 200 |
|
|
#define ntof 200 |
|
|
#define ncat 50 |
|
|
#define ncas 50 |
|
|
#define ncar 100 |
|
|
#define ncal 1000 |
|
|
#define nnd 200 |
|
|
#define nstr 1000 |
|
3 |
|
|
4 |
#include <iostream> |
#include <iostream> |
5 |
#include <fstream> |
#include <fstream> |
30 |
|
|
31 |
TTree* fhBookTree; |
TTree* fhBookTree; |
32 |
ofstream fOutputfile; |
ofstream fOutputfile; |
33 |
|
int nspe; |
34 |
|
int ntof; |
35 |
|
int ncat; |
36 |
|
int ncas; |
37 |
|
int ncar; |
38 |
|
int ncal; |
39 |
|
int nnd; |
40 |
|
int nstr; |
41 |
|
int *ntf; |
42 |
|
|
43 |
static const int fPSCUbuffer = 8; |
static const int fPSCUbuffer = 8; |
44 |
static const int fTRIGGERbuffer = 152; //(bytes) |
static const int fTRIGGERbuffer = 152; //(bytes) |
144 |
Float_t Phi; |
Float_t Phi; |
145 |
Float_t P0; |
Float_t P0; |
146 |
Int_t Nthtof; |
Int_t Nthtof; |
147 |
UChar_t Ipltof[ntof]; |
UChar_t *Ipltof; |
148 |
UChar_t Ipaddle[ntof]; |
UChar_t *Ipaddle; |
149 |
UChar_t Ipartof[ntof]; |
// UChar_t *Ipartof;//DPMJET |
150 |
Float_t Xintof[ntof]; |
UShort_t *Ipartof; |
151 |
Float_t Yintof[ntof]; |
Float_t *Xintof; |
152 |
Float_t Zintof[ntof]; |
Float_t *Yintof; |
153 |
Float_t Xouttof[ntof]; |
Float_t *Zintof; |
154 |
Float_t Youttof[ntof]; |
Float_t *Xouttof; |
155 |
Float_t Zouttof[ntof]; |
Float_t *Youttof; |
156 |
Float_t Ereltof[ntof]; |
Float_t *Zouttof; |
157 |
Float_t Timetof[ntof]; |
Float_t *Ereltof; |
158 |
Float_t Pathtof[ntof]; |
Float_t *Timetof; |
159 |
Float_t P0tof[ntof]; |
Float_t *Pathtof; |
160 |
|
Float_t *P0tof; |
161 |
Int_t Nthcat; |
Int_t Nthcat; |
162 |
UChar_t Iparcat[ncat]; |
UChar_t *Iparcat; |
163 |
UChar_t Icat[ncat]; |
UChar_t *Icat; |
164 |
Float_t Xincat[ncat]; |
Float_t *Xincat; |
165 |
Float_t Yincat[ncat]; |
Float_t *Yincat; |
166 |
Float_t Zincat[ncat]; |
Float_t *Zincat; |
167 |
Float_t Xoutcat[ncat]; |
Float_t *Xoutcat; |
168 |
Float_t Youtcat[ncat]; |
Float_t *Youtcat; |
169 |
Float_t Zoutcat[ncat]; |
Float_t *Zoutcat; |
170 |
Float_t Erelcat[ncat]; |
Float_t *Erelcat; |
171 |
Float_t Timecat[ncat]; |
Float_t *Timecat; |
172 |
Float_t Pathcat[ncat]; |
Float_t *Pathcat; |
173 |
Float_t P0cat[ncat]; |
Float_t *P0cat; |
174 |
Int_t Nthcas; |
Int_t Nthcas; |
175 |
UChar_t Iparcas[ncas]; |
UChar_t *Iparcas; |
176 |
UChar_t Icas[ncas]; |
UChar_t *Icas; |
177 |
Float_t Xincas[ncas]; |
Float_t *Xincas; |
178 |
Float_t Yincas[ncas]; |
Float_t *Yincas; |
179 |
Float_t Zincas[ncas]; |
Float_t *Zincas; |
180 |
Float_t Xoutcas[ncas]; |
Float_t *Xoutcas; |
181 |
Float_t Youtcas[ncas]; |
Float_t *Youtcas; |
182 |
Float_t Zoutcas[ncas]; |
Float_t *Zoutcas; |
183 |
Float_t Erelcas[ncas]; |
Float_t *Erelcas; |
184 |
Float_t Timecas[ncas]; |
Float_t *Timecas; |
185 |
Float_t Pathcas[ncas]; |
Float_t *Pathcas; |
186 |
Float_t P0cas[ncas]; |
Float_t *P0cas; |
187 |
Int_t Nthspe; |
Int_t Nthspe; |
188 |
UChar_t Iparspe[nspe]; |
// UChar_t *Iparspe;//DPMJET |
189 |
UChar_t Itrpb[nspe]; |
UShort_t *Iparspe; |
190 |
UChar_t Itrsl[nspe]; |
UChar_t *Itrpb; |
191 |
UChar_t Itspa[nspe]; |
UChar_t *Itrsl; |
192 |
Float_t Xinspe[nspe]; |
UChar_t *Itspa; |
193 |
Float_t Yinspe[nspe]; |
Float_t *Xinspe; |
194 |
Float_t Zinspe[nspe]; |
Float_t *Yinspe; |
195 |
Float_t Xoutspe[nspe]; |
Float_t *Zinspe; |
196 |
Float_t Youtspe[nspe]; |
Float_t *Xoutspe; |
197 |
Float_t Zoutspe[nspe]; |
Float_t *Youtspe; |
198 |
Float_t Xavspe[nspe]; |
Float_t *Zoutspe; |
199 |
Float_t Yavspe[nspe]; |
Float_t *Xavspe; |
200 |
Float_t Zavspe[nspe]; |
Float_t *Yavspe; |
201 |
Float_t Erelspe[nspe]; |
Float_t *Zavspe; |
202 |
Float_t Pathspe[nspe]; |
Float_t *Erelspe; |
203 |
Float_t P0spe[nspe]; |
Float_t *Pathspe; |
204 |
UChar_t Nxmult[nspe]; |
Float_t *P0spe; |
205 |
UChar_t Nymult[nspe]; |
UChar_t *Nxmult; |
206 |
|
UChar_t *Nymult; |
207 |
Int_t Nstrpx; |
Int_t Nstrpx; |
208 |
UChar_t Npstripx[nstr]; |
UChar_t *Npstripx; |
209 |
UChar_t Ntstripx[nstr]; |
UChar_t *Ntstripx; |
210 |
UShort_t Istripx[nstr]; |
UShort_t *Istripx; |
211 |
//UInt_t Istripx[nstr]; |
Float_t *Qstripx; |
212 |
Float_t Qstripx[nstr]; |
Float_t *Xstripx; |
|
Float_t Xstripx[nstr]; |
|
213 |
Int_t Nstrpy; |
Int_t Nstrpy; |
214 |
UChar_t Npstripy[nstr]; |
UChar_t *Npstripy; |
215 |
UChar_t Ntstripy[nstr]; |
UChar_t *Ntstripy; |
216 |
UShort_t Istripy[nstr]; |
UShort_t *Istripy; |
217 |
//UInt_t Istripy[nstr]; |
Float_t *Qstripy; |
218 |
Float_t Qstripy[nstr]; |
Float_t *Ystripy; |
|
Float_t Ystripy[nstr]; |
|
219 |
Int_t Nthcali; |
Int_t Nthcali; |
220 |
UChar_t Icaplane[4224]; |
UChar_t Icaplane[4224]; |
221 |
UChar_t Icastrip[4224]; |
UChar_t Icastrip[4224]; |
222 |
Int_t Icamod[4224]; |
Int_t Icamod[4224]; |
223 |
Float_t Enestrip[4224]; |
Float_t Enestrip[4224]; |
224 |
Int_t Nthcal; |
Int_t Nthcal; |
225 |
UChar_t Icapl[ncal]; |
UChar_t *Icapl; |
226 |
UChar_t Icasi[ncal]; |
UChar_t *Icasi; |
227 |
UChar_t Icast[ncal]; |
UChar_t *Icast; |
228 |
Float_t Xincal[ncal]; |
Float_t *Xincal; |
229 |
Float_t Yincal[ncal]; |
Float_t *Yincal; |
230 |
Float_t Zincal[ncal]; |
Float_t *Zincal; |
231 |
Float_t Erelcal[ncal]; |
Float_t *Erelcal; |
232 |
Int_t Nthnd; |
Int_t Nthnd; |
233 |
UChar_t Itubend[nnd]; |
UChar_t *Itubend; |
234 |
UChar_t Iparnd[nnd]; |
UChar_t *Iparnd; |
235 |
Float_t Xinnd[nnd]; |
Float_t *Xinnd; |
236 |
Float_t Yinnd[nnd]; |
Float_t *Yinnd; |
237 |
Float_t Zinnd[nnd]; |
Float_t *Zinnd; |
238 |
Float_t Xoutnd[nnd]; |
Float_t *Xoutnd; |
239 |
Float_t Youtnd[nnd]; |
Float_t *Youtnd; |
240 |
Float_t Zoutnd[nnd]; |
Float_t *Zoutnd; |
241 |
Float_t Erelnd[nnd]; |
Float_t *Erelnd; |
242 |
Float_t Timend[nnd]; |
Float_t *Timend; |
243 |
Float_t Pathnd[nnd]; |
Float_t *Pathnd; |
244 |
Float_t P0nd[nnd]; |
Float_t *P0nd; |
245 |
Int_t Nthcard; |
Int_t Nthcard; |
246 |
UChar_t Iparcard[ncar]; |
UChar_t *Iparcard; |
247 |
UChar_t Icard[ncar]; |
UChar_t *Icard; |
248 |
Float_t Xincard[ncar]; |
Float_t *Xincard; |
249 |
Float_t Yincard[ncar]; |
Float_t *Yincard; |
250 |
Float_t Zincard[ncar]; |
Float_t *Zincard; |
251 |
Float_t Xoutcard[ncar]; |
Float_t *Xoutcard; |
252 |
Float_t Youtcard[ncar]; |
Float_t *Youtcard; |
253 |
Float_t Zoutcard[ncar]; |
Float_t *Zoutcard; |
254 |
Float_t Erelcard[ncar]; |
Float_t *Erelcard; |
255 |
Float_t Timecard[ncar]; |
Float_t *Timecard; |
256 |
Float_t Pathcard[ncar]; |
Float_t *Pathcard; |
257 |
Float_t P0card[ncar]; |
Float_t *P0card; |
258 |
|
|
259 |
// List of branches |
// List of branches |
260 |
TBranch *b_Irun; //! |
TBranch *b_Irun; //! |
380 |
|
|
381 |
public: |
public: |
382 |
|
|
383 |
Digitizer(TTree *tree, char* &file_raw); // constructor |
Digitizer(TTree *tree, char* &file_raw,int nspe=200,int ntof=200,int ncat=50,int ncas=50,int ncar=100,int ncal=1000,int nnd=200,int nstr=1000); // constructor |
384 |
|
|
385 |
void Close(); |
void Close(); |
386 |
void SetTree(TTree *tree) {fhBookTree = tree;}; |
void SetTree(TTree *tree) {fhBookTree = tree;}; |