1 |
#ifndef DIGITIZER_H |
#ifndef DIGITIZER_H |
2 |
#define DIGITIZER_H |
#define DIGITIZER_H |
3 |
#include <iostream> |
#define nspe 200 |
4 |
#include <fstream> |
#define ntof 200 |
5 |
|
#define ncat 50 |
6 |
|
#define ncas 50 |
7 |
#include <stdlib.h> |
#define ncar 100 |
8 |
#include <string.h> |
#define ncal 1000 |
9 |
#include <ctype.h> |
#define nnd 200 |
10 |
|
#define nstr 1000 |
11 |
#include "Riostream.h" |
|
12 |
#include "TFile.h" |
#include <iostream> |
13 |
#include "TDirectory.h" |
#include <fstream> |
14 |
#include "TTree.h" |
|
15 |
#include "TLeafI.h" |
|
16 |
#include "TH1.h" |
#include <stdlib.h> |
17 |
#include "TH2.h" |
#include <string.h> |
18 |
#include "TMath.h" |
#include <ctype.h> |
19 |
#include "TSQLServer.h" |
|
20 |
// |
#include "Riostream.h" |
21 |
#include "CRC.h" |
#include "TFile.h" |
22 |
|
#include "TDirectory.h" |
23 |
class Digitizer{ |
#include "TTree.h" |
24 |
|
#include "TLeafI.h" |
25 |
|
#include "TH1.h" |
26 |
protected: |
#include "TH2.h" |
27 |
|
#include "TMath.h" |
28 |
// in and output data members |
#include "TSQLServer.h" |
29 |
|
// |
30 |
TTree* fhBookTree; |
#include "CRC.h" |
31 |
ofstream fOutputfile; |
|
32 |
|
class Digitizer{ |
33 |
|
|
34 |
static const int fPSCUbuffer = 8; |
|
35 |
static const int fTRIGGERbuffer = 153; //(bytes) |
protected: |
36 |
static const int fTOFbuffer = 276; //(bytes) |
|
37 |
static const int fACbuffer = 128; |
// in and output data members |
38 |
static const int fNDbuffer = 6; |
|
39 |
static const int fS4buffer = 3; |
TTree* fhBookTree; |
40 |
static const int fPADbuffer = 64; // changed from 32! |
ofstream fOutputfile; |
41 |
static const int fCALObuffer = 10000; |
|
42 |
static const float fCALOGeV2MIPratio = 0.0001059994; |
|
43 |
|
static const int fPSCUbuffer = 8; |
44 |
static const int fDummybuffer = 64; |
static const int fTRIGGERbuffer = 152; //(bytes) |
45 |
|
static const int fTOFbuffer = 276; //(bytes) |
46 |
// dimensions of vectors and buffer, parameter for tracker |
static const int fRunHeaderbuffer = 27; // ?? |
47 |
static const int fTRACKbuffer = 50000; // to be optimized |
static const int fRunTrailerbuffer = 17; |
48 |
static const int fNviews = 12; |
static const int fACbuffer = 128; |
49 |
static const int fNstrips_view = 3072; |
static const int fNDbuffer = 6; |
50 |
static const int fNladder=3; |
static const int fS4buffer = 3; |
51 |
static const int fNstrips_ladder = 1024; |
static const int fPADbuffer = 64; // changed from 32! |
52 |
static const int fCutzop= 4; |
static const int fCALObuffer = 10000; |
53 |
static const int fCutclu= 7; |
static const float fCALOGeV2MIPratio = 0.0001059994; |
54 |
static const int fNclst = 2; |
|
55 |
|
static const int fDummybuffer = 64; |
56 |
|
|
57 |
static const float fAvePedex = 1200.; // to be adjusted |
// dimensions of vectors and buffer, parameter for tracker |
58 |
static const float fSigmaPedex = 1.; // to be adjusted |
static const int fTRACKbuffer = 50000; // to be optimized |
59 |
static const float fAveSigmax = 4.3; // to be adjusted |
static const int fNviews = 12; |
60 |
static const float fSigmaSigmax =0.1; // to be adjusted |
static const int fNstrips_view = 3072; |
61 |
static const float fAvePedey = 2800.; // to be adjusted |
static const int fNladder=3; |
62 |
static const float fSigmaPedey = 1.; // to be adjusted |
static const int fNstrips_ladder = 1024; |
63 |
static const float fAveSigmay = 8.; // to be adjusted |
static const int fCutzop= 4; |
64 |
static const float fSigmaSigmay =0.1; // to be adjusted |
static const int fCutclu= 7; |
65 |
static const float fSigmaCommon = 25.; // to be adjusted |
static const int fNclst = 2; |
66 |
|
|
67 |
|
|
68 |
// end dimensions of vectors and buffer, parameter for tracker |
static const float fAvePedex = 1200.; // to be adjusted |
69 |
|
static const float fSigmaPedex = 1.; // to be adjusted |
70 |
UShort_t fDataPSCU[fPSCUbuffer]; |
static const float fAveSigmax = 4.3; // to be adjusted |
71 |
UInt_t fCounter; |
static const float fSigmaSigmax =0.1; // to be adjusted |
72 |
UInt_t fOBT; |
static const float fAvePedey = 2800.; // to be adjusted |
73 |
|
static const float fSigmaPedey = 1.; // to be adjusted |
74 |
UShort_t fDataPadding[fPADbuffer]; |
static const float fAveSigmay = 8.; // to be adjusted |
75 |
UInt_t fPadding; |
static const float fSigmaSigmay =0.1; // to be adjusted |
76 |
|
static const float fSigmaCommon = 25.; // to be adjusted |
77 |
UChar_t fDataTrigger[fTRIGGERbuffer]; |
|
78 |
|
|
79 |
UChar_t fDataTof[fTOFbuffer]; |
// end dimensions of vectors and buffer, parameter for tracker |
80 |
|
|
81 |
UShort_t fDataAC[fACbuffer]; |
UShort_t fDataPSCU[fPSCUbuffer]; |
82 |
UShort_t fDataND[fNDbuffer]; |
UInt_t fCounter; |
83 |
UShort_t fDataS4[fS4buffer]; |
UInt_t fCounterPhys; |
84 |
UShort_t fDataDummy[fDummybuffer]; |
UInt_t fOBT; |
85 |
|
|
86 |
UShort_t fDataCALO[fCALObuffer]; |
UShort_t fDataPadding[fPADbuffer]; |
87 |
UShort_t fSecCalo[4]; |
UInt_t fPadding; |
88 |
UShort_t fSecCALOLength[4]; |
|
89 |
UShort_t fCALOlength; |
UShort_t fDataRunHeader[fRunHeaderbuffer]; |
90 |
UShort_t fModCalo; |
UShort_t fDataRunTrailer[fRunTrailerbuffer]; |
91 |
Float_t fCalomip[2][22][96]; // ADC to MIP conversion values |
|
92 |
Float_t fcalped[4][11][96]; // pedestals |
UChar_t fDataTrigger[fTRIGGERbuffer]; |
93 |
Float_t fcalgood[4][11][96]; // used or not in the common noise calculation |
UChar_t fDataTof[fTOFbuffer]; |
94 |
Float_t fcalthr[4][11][6]; // thresholds |
|
95 |
Float_t fcalrms[4][11][96]; // rms |
UShort_t fDataAC[fACbuffer]; |
96 |
Float_t fcalbase[4][11][6]; // baselines (common noise) during calibration |
UShort_t fDataND[fNDbuffer]; |
97 |
Float_t fcalvar[4][11][6]; // variance |
UShort_t fDataS4[fS4buffer]; |
98 |
Float_t fcstwerr[4]; // status word |
UShort_t fDataDummy[fDummybuffer]; |
99 |
Float_t fcperror[4]; // unpacking error flag |
|
100 |
UInt_t fGivenCaloCalib; |
UShort_t fDataCALO[fCALObuffer]; |
101 |
|
UShort_t fSecCalo[4]; |
102 |
char* fFilename; |
UShort_t fSecCALOLength[4]; |
103 |
UInt_t fLen; |
UShort_t fCALOlength; |
104 |
|
UShort_t fModCalo; |
105 |
|
Float_t fCalomip[2][22][96]; // ADC to MIP conversion values |
106 |
// vectors, buffer, and variables for tracker |
Float_t fcalped[4][11][96]; // pedestals |
107 |
UShort_t fDataTrack[fTRACKbuffer]; |
Float_t fcalgood[4][11][96]; // used or not in the common noise calculation |
108 |
UInt_t fTracklength; // Actual length of buffer |
Float_t fcalthr[4][11][6]; // thresholds |
109 |
Float_t fPedeTrack[fNviews][fNstrips_view]; |
Float_t fcalrms[4][11][96]; // rms |
110 |
Float_t fSigmaTrack[fNviews][fNstrips_view]; |
Float_t fcalbase[4][11][6]; // baselines (common noise) during calibration |
111 |
Float_t fMipCor[fNladder][fNviews] ; |
Float_t fcalvar[4][11][6]; // variance |
112 |
// end vectors, buffer, and variables for tracker |
Float_t fcstwerr[4]; // status word |
113 |
|
Float_t fcperror[4]; // unpacking error flag |
114 |
|
UInt_t fGivenCaloCalib; |
115 |
|
|
116 |
// |
char* fFilename; |
117 |
// db variables |
UInt_t fLen; |
118 |
// |
|
119 |
TSQLServer *fDbc; |
|
120 |
// Declaration of leave types |
|
121 |
Int_t Irun; |
// vectors, buffer, and variables for tracker |
122 |
Int_t Ievnt; |
UShort_t fDataTrack[fTRACKbuffer]; |
123 |
Int_t Ipa; |
UInt_t fTracklength; // Actual length of buffer |
124 |
Float_t X0; |
Float_t fPedeTrack[fNviews][fNstrips_view]; |
125 |
Float_t Y0; |
Float_t fSigmaTrack[fNviews][fNstrips_view]; |
126 |
Float_t Z0; |
// UShort_t fBadTrack[fNviews][fNstrips_view]; |
127 |
Float_t Theta; |
Float_t fMipCor[fNladder][fNviews] ; |
128 |
Float_t Phi; |
// end vectors, buffer, and variables for tracker |
129 |
Float_t P0; |
|
130 |
Int_t Nthtof; |
|
131 |
UChar_t Ipltof[100]; //[Nthtof] |
|
132 |
UChar_t Ipaddle[100]; //[Nthtof] |
// |
133 |
UChar_t Ipartof[100]; //[Nthtof] |
// db variables |
134 |
Float_t Xintof[100]; //[Nthtof] |
// |
135 |
Float_t Yintof[100]; //[Nthtof] |
TSQLServer *fDbc; |
136 |
Float_t Zintof[100]; //[Nthtof] |
// Declaration of leave types |
137 |
Float_t Xouttof[100]; //[Nthtof] |
Int_t Irun; |
138 |
Float_t Youttof[100]; //[Nthtof] |
Int_t Ievnt; |
139 |
Float_t Zouttof[100]; //[Nthtof] |
Int_t Ipa; |
140 |
Float_t Ereltof[100]; //[Nthtof] |
Float_t X0; |
141 |
Float_t Timetof[100]; //[Nthtof] |
Float_t Y0; |
142 |
Float_t Pathtof[100]; //[Nthtof] |
Float_t Z0; |
143 |
Float_t P0tof[100]; //[Nthtof] |
Float_t Theta; |
144 |
Int_t Nthcat; |
Float_t Phi; |
145 |
UChar_t Iparcat[50]; //[Nthcat] |
Float_t P0; |
146 |
UChar_t Icat[50]; //[Nthcat] |
Int_t Nthtof; |
147 |
Float_t Xincat[50]; //[Nthcat] |
UChar_t Ipltof[ntof]; |
148 |
Float_t Yincat[50]; //[Nthcat] |
UChar_t Ipaddle[ntof]; |
149 |
Float_t Zincat[50]; //[Nthcat] |
UChar_t Ipartof[ntof]; |
150 |
Float_t Xoutcat[50]; //[Nthcat] |
Float_t Xintof[ntof]; |
151 |
Float_t Youtcat[50]; //[Nthcat] |
Float_t Yintof[ntof]; |
152 |
Float_t Zoutcat[50]; //[Nthcat] |
Float_t Zintof[ntof]; |
153 |
Float_t Erelcat[50]; //[Nthcat] |
Float_t Xouttof[ntof]; |
154 |
Float_t Timecat[50]; //[Nthcat] |
Float_t Youttof[ntof]; |
155 |
Float_t Pathcat[50]; //[Nthcat] |
Float_t Zouttof[ntof]; |
156 |
Float_t P0cat[50]; //[Nthcat] |
Float_t Ereltof[ntof]; |
157 |
Int_t Nthcas; |
Float_t Timetof[ntof]; |
158 |
UChar_t Iparcas[50]; //[Nthcas] |
Float_t Pathtof[ntof]; |
159 |
UChar_t Icas[50]; //[Nthcas] |
Float_t P0tof[ntof]; |
160 |
Float_t Xincas[50]; //[Nthcas] |
Int_t Nthcat; |
161 |
Float_t Yincas[50]; //[Nthcas] |
UChar_t Iparcat[ncat]; |
162 |
Float_t Zincas[50]; //[Nthcas] |
UChar_t Icat[ncat]; |
163 |
Float_t Xoutcas[50]; //[Nthcas] |
Float_t Xincat[ncat]; |
164 |
Float_t Youtcas[50]; //[Nthcas] |
Float_t Yincat[ncat]; |
165 |
Float_t Zoutcas[50]; //[Nthcas] |
Float_t Zincat[ncat]; |
166 |
Float_t Erelcas[50]; //[Nthcas] |
Float_t Xoutcat[ncat]; |
167 |
Float_t Timecas[50]; //[Nthcas] |
Float_t Youtcat[ncat]; |
168 |
Float_t Pathcas[50]; //[Nthcas] |
Float_t Zoutcat[ncat]; |
169 |
Float_t P0cas[50]; //[Nthcas] |
Float_t Erelcat[ncat]; |
170 |
Int_t Nthspe; |
Float_t Timecat[ncat]; |
171 |
UChar_t Iparspe[100]; //[Nthspe] |
Float_t Pathcat[ncat]; |
172 |
UChar_t Itrpb[100]; //[Nthspe] |
Float_t P0cat[ncat]; |
173 |
UChar_t Itrsl[100]; //[Nthspe] |
Int_t Nthcas; |
174 |
UChar_t Itspa[100]; //[Nthspe] |
UChar_t Iparcas[ncas]; |
175 |
Float_t Xinspe[100]; //[Nthspe] |
UChar_t Icas[ncas]; |
176 |
Float_t Yinspe[100]; //[Nthspe] |
Float_t Xincas[ncas]; |
177 |
Float_t Zinspe[100]; //[Nthspe] |
Float_t Yincas[ncas]; |
178 |
Float_t Xoutspe[100]; //[Nthspe] |
Float_t Zincas[ncas]; |
179 |
Float_t Youtspe[100]; //[Nthspe] |
Float_t Xoutcas[ncas]; |
180 |
Float_t Zoutspe[100]; //[Nthspe] |
Float_t Youtcas[ncas]; |
181 |
Float_t Xavspe[100]; //[Nthspe] |
Float_t Zoutcas[ncas]; |
182 |
Float_t Yavspe[100]; //[Nthspe] |
Float_t Erelcas[ncas]; |
183 |
Float_t Zavspe[100]; //[Nthspe] |
Float_t Timecas[ncas]; |
184 |
Float_t Erelspe[100]; //[Nthspe] |
Float_t Pathcas[ncas]; |
185 |
Float_t Pathspe[100]; //[Nthspe] |
Float_t P0cas[ncas]; |
186 |
Float_t P0spe[100]; //[Nthspe] |
Int_t Nthspe; |
187 |
UChar_t Nxmult[100]; //[Nthspe] |
UChar_t Iparspe[nspe]; |
188 |
UChar_t Nymult[100]; //[Nthspe] |
UChar_t Itrpb[nspe]; |
189 |
Int_t Nstrpx; |
UChar_t Itrsl[nspe]; |
190 |
UChar_t Npstripx[1000]; //[Nstrpx] |
UChar_t Itspa[nspe]; |
191 |
UChar_t Ntstripx[1000]; //[Nstrpx] |
Float_t Xinspe[nspe]; |
192 |
UShort_t Istripx[1000]; //[Nstrpx] |
Float_t Yinspe[nspe]; |
193 |
//UInt_t Istripx[1000]; //[Nstrpx] |
Float_t Zinspe[nspe]; |
194 |
Float_t Qstripx[1000]; //[Nstrpx] |
Float_t Xoutspe[nspe]; |
195 |
Float_t Xstripx[1000]; //[Nstrpx] |
Float_t Youtspe[nspe]; |
196 |
Int_t Nstrpy; |
Float_t Zoutspe[nspe]; |
197 |
UChar_t Npstripy[1000]; //[Nstrpy] |
Float_t Xavspe[nspe]; |
198 |
UChar_t Ntstripy[1000]; //[Nstrpy] |
Float_t Yavspe[nspe]; |
199 |
UShort_t Istripy[1000]; //[Nstrpy] |
Float_t Zavspe[nspe]; |
200 |
//UInt_t Istripy[1000]; //[Nstrpy] |
Float_t Erelspe[nspe]; |
201 |
Float_t Qstripy[1000]; //[Nstrpy] |
Float_t Pathspe[nspe]; |
202 |
Float_t Ystripy[1000]; //[Nstrpy] |
Float_t P0spe[nspe]; |
203 |
Int_t Nthcali; |
UChar_t Nxmult[nspe]; |
204 |
UChar_t Icaplane[4224]; //[Nthcali] |
UChar_t Nymult[nspe]; |
205 |
UChar_t Icastrip[4224]; //[Nthcali] |
Int_t Nstrpx; |
206 |
Int_t Icamod[4224]; //[Nthcali] |
UChar_t Npstripx[nstr]; |
207 |
Float_t Enestrip[4224]; //[Nthcali] |
UChar_t Ntstripx[nstr]; |
208 |
Int_t Nthcal; |
UShort_t Istripx[nstr]; |
209 |
UChar_t Icapl[1000]; //[Nthcal] |
//UInt_t Istripx[nstr]; |
210 |
UChar_t Icasi[1000]; //[Nthcal] |
Float_t Qstripx[nstr]; |
211 |
UChar_t Icast[1000]; //[Nthcal] |
Float_t Xstripx[nstr]; |
212 |
Float_t Xincal[1000]; //[Nthcal] |
Int_t Nstrpy; |
213 |
Float_t Yincal[1000]; //[Nthcal] |
UChar_t Npstripy[nstr]; |
214 |
Float_t Zincal[1000]; //[Nthcal] |
UChar_t Ntstripy[nstr]; |
215 |
Float_t Erelcal[1000]; //[Nthcal] |
UShort_t Istripy[nstr]; |
216 |
Int_t Nthnd; |
//UInt_t Istripy[nstr]; |
217 |
UChar_t Itubend[200]; //[Nthnd] |
Float_t Qstripy[nstr]; |
218 |
UChar_t Iparnd[200]; //[Nthnd] |
Float_t Ystripy[nstr]; |
219 |
Float_t Xinnd[200]; //[Nthnd] |
Int_t Nthcali; |
220 |
Float_t Yinnd[200]; //[Nthnd] |
UChar_t Icaplane[4224]; |
221 |
Float_t Zinnd[200]; //[Nthnd] |
UChar_t Icastrip[4224]; |
222 |
Float_t Xoutnd[200]; //[Nthnd] |
Int_t Icamod[4224]; |
223 |
Float_t Youtnd[200]; //[Nthnd] |
Float_t Enestrip[4224]; |
224 |
Float_t Zoutnd[200]; //[Nthnd] |
Int_t Nthcal; |
225 |
Float_t Erelnd[200]; //[Nthnd] |
UChar_t Icapl[ncal]; |
226 |
Float_t Timend[200]; //[Nthnd] |
UChar_t Icasi[ncal]; |
227 |
Float_t Pathnd[200]; //[Nthnd] |
UChar_t Icast[ncal]; |
228 |
Float_t P0nd[200]; //[Nthnd] |
Float_t Xincal[ncal]; |
229 |
Int_t Nthcard; |
Float_t Yincal[ncal]; |
230 |
UChar_t Iparcard[100]; //[Nthcard] |
Float_t Zincal[ncal]; |
231 |
UChar_t Icard[100]; //[Nthcard] |
Float_t Erelcal[ncal]; |
232 |
Float_t Xincard[100]; //[Nthcard] |
Int_t Nthnd; |
233 |
Float_t Yincard[100]; //[Nthcard] |
UChar_t Itubend[nnd]; |
234 |
Float_t Zincard[100]; //[Nthcard] |
UChar_t Iparnd[nnd]; |
235 |
Float_t Xoutcard[100]; //[Nthcard] |
Float_t Xinnd[nnd]; |
236 |
Float_t Youtcard[100]; //[Nthcard] |
Float_t Yinnd[nnd]; |
237 |
Float_t Zoutcard[100]; //[Nthcard] |
Float_t Zinnd[nnd]; |
238 |
Float_t Erelcard[100]; //[Nthcard] |
Float_t Xoutnd[nnd]; |
239 |
Float_t Timecard[100]; //[Nthcard] |
Float_t Youtnd[nnd]; |
240 |
Float_t Pathcard[100]; //[Nthcard] |
Float_t Zoutnd[nnd]; |
241 |
Float_t P0card[100]; //[Nthcard] |
Float_t Erelnd[nnd]; |
242 |
|
Float_t Timend[nnd]; |
243 |
// List of branches |
Float_t Pathnd[nnd]; |
244 |
TBranch *b_Irun; //! |
Float_t P0nd[nnd]; |
245 |
TBranch *b_Ievnt; //! |
Int_t Nthcard; |
246 |
TBranch *b_Ipa; //! |
UChar_t Iparcard[ncar]; |
247 |
TBranch *b_X0; //! |
UChar_t Icard[ncar]; |
248 |
TBranch *b_Y0; //! |
Float_t Xincard[ncar]; |
249 |
TBranch *b_Z0; //! |
Float_t Yincard[ncar]; |
250 |
TBranch *b_Theta; //! |
Float_t Zincard[ncar]; |
251 |
TBranch *b_Phi; //! |
Float_t Xoutcard[ncar]; |
252 |
TBranch *b_P0; //! |
Float_t Youtcard[ncar]; |
253 |
TBranch *b_Nthtof; //! |
Float_t Zoutcard[ncar]; |
254 |
TBranch *b_Ipltof; //! |
Float_t Erelcard[ncar]; |
255 |
TBranch *b_Ipaddle; //! |
Float_t Timecard[ncar]; |
256 |
TBranch *b_Ipartof; //! |
Float_t Pathcard[ncar]; |
257 |
TBranch *b_Xintof; //! |
Float_t P0card[ncar]; |
258 |
TBranch *b_Yintof; //! |
|
259 |
TBranch *b_Zintof; //! |
// List of branches |
260 |
TBranch *b_Xouttof; //! |
TBranch *b_Irun; //! |
261 |
TBranch *b_Youttof; //! |
TBranch *b_Ievnt; //! |
262 |
TBranch *b_Zouttof; //! |
TBranch *b_Ipa; //! |
263 |
TBranch *b_Ereltof; //! |
TBranch *b_X0; //! |
264 |
TBranch *b_Timetof; //! |
TBranch *b_Y0; //! |
265 |
TBranch *b_Pathtof; //! |
TBranch *b_Z0; //! |
266 |
TBranch *b_P0tof; //! |
TBranch *b_Theta; //! |
267 |
TBranch *b_Nthcat; //! |
TBranch *b_Phi; //! |
268 |
TBranch *b_Iparcat; //! |
TBranch *b_P0; //! |
269 |
TBranch *b_Icat; //! |
TBranch *b_Nthtof; //! |
270 |
TBranch *b_Xincat; //! |
TBranch *b_Ipltof; //! |
271 |
TBranch *b_Yincat; //! |
TBranch *b_Ipaddle; //! |
272 |
TBranch *b_Zincat; //! |
TBranch *b_Ipartof; //! |
273 |
TBranch *b_Xoutcat; //! |
TBranch *b_Xintof; //! |
274 |
TBranch *b_Youtcat; //! |
TBranch *b_Yintof; //! |
275 |
TBranch *b_Zoutcat; //! |
TBranch *b_Zintof; //! |
276 |
TBranch *b_Erelcat; //! |
TBranch *b_Xouttof; //! |
277 |
TBranch *b_Timecat; //! |
TBranch *b_Youttof; //! |
278 |
TBranch *b_Pathcat; //! |
TBranch *b_Zouttof; //! |
279 |
TBranch *b_P0cat; //! |
TBranch *b_Ereltof; //! |
280 |
TBranch *b_Nthcas; //! |
TBranch *b_Timetof; //! |
281 |
TBranch *b_Iparcas; //! |
TBranch *b_Pathtof; //! |
282 |
TBranch *b_Icas; //! |
TBranch *b_P0tof; //! |
283 |
TBranch *b_Xincas; //! |
TBranch *b_Nthcat; //! |
284 |
TBranch *b_Yincas; //! |
TBranch *b_Iparcat; //! |
285 |
TBranch *b_Zincas; //! |
TBranch *b_Icat; //! |
286 |
TBranch *b_Xoutcas; //! |
TBranch *b_Xincat; //! |
287 |
TBranch *b_Youtcas; //! |
TBranch *b_Yincat; //! |
288 |
TBranch *b_Zoutcas; //! |
TBranch *b_Zincat; //! |
289 |
TBranch *b_Erelcas; //! |
TBranch *b_Xoutcat; //! |
290 |
TBranch *b_Timecas; //! |
TBranch *b_Youtcat; //! |
291 |
TBranch *b_Pathcas; //! |
TBranch *b_Zoutcat; //! |
292 |
TBranch *b_P0cas; //! |
TBranch *b_Erelcat; //! |
293 |
TBranch *b_Nthspe; //! |
TBranch *b_Timecat; //! |
294 |
TBranch *b_Iparspe; //! |
TBranch *b_Pathcat; //! |
295 |
TBranch *b_Itrpb; //! |
TBranch *b_P0cat; //! |
296 |
TBranch *b_Itrsl; //! |
TBranch *b_Nthcas; //! |
297 |
TBranch *b_Itspa; //! |
TBranch *b_Iparcas; //! |
298 |
TBranch *b_Xinspe; //! |
TBranch *b_Icas; //! |
299 |
TBranch *b_Yinspe; //! |
TBranch *b_Xincas; //! |
300 |
TBranch *b_Zinspe; //! |
TBranch *b_Yincas; //! |
301 |
TBranch *b_Xoutspe; //! |
TBranch *b_Zincas; //! |
302 |
TBranch *b_Youtspe; //! |
TBranch *b_Xoutcas; //! |
303 |
TBranch *b_Zoutspe; //! |
TBranch *b_Youtcas; //! |
304 |
TBranch *b_Xavspe; //! |
TBranch *b_Zoutcas; //! |
305 |
TBranch *b_Yavspe; //! |
TBranch *b_Erelcas; //! |
306 |
TBranch *b_Zavspe; //! |
TBranch *b_Timecas; //! |
307 |
TBranch *b_Erelspe; //! |
TBranch *b_Pathcas; //! |
308 |
TBranch *b_Pathspe; //! |
TBranch *b_P0cas; //! |
309 |
TBranch *b_P0spe; //! |
TBranch *b_Nthspe; //! |
310 |
TBranch *b_Nxmult; //! |
TBranch *b_Iparspe; //! |
311 |
TBranch *b_Nymult; //! |
TBranch *b_Itrpb; //! |
312 |
TBranch *b_Nstrpx; //! |
TBranch *b_Itrsl; //! |
313 |
TBranch *b_Npstripx; //! |
TBranch *b_Itspa; //! |
314 |
TBranch *b_Ntstripx; //! |
TBranch *b_Xinspe; //! |
315 |
TBranch *b_Istripx; //! |
TBranch *b_Yinspe; //! |
316 |
TBranch *b_Qstripx; //! |
TBranch *b_Zinspe; //! |
317 |
TBranch *b_Xstripx; //! |
TBranch *b_Xoutspe; //! |
318 |
TBranch *b_Nstrpy; //! |
TBranch *b_Youtspe; //! |
319 |
TBranch *b_Npstripy; //! |
TBranch *b_Zoutspe; //! |
320 |
TBranch *b_Ntstripy; //! |
TBranch *b_Xavspe; //! |
321 |
TBranch *b_Istripy; //! |
TBranch *b_Yavspe; //! |
322 |
TBranch *b_Qstripy; //! |
TBranch *b_Zavspe; //! |
323 |
TBranch *b_Ystripy; //! |
TBranch *b_Erelspe; //! |
324 |
TBranch *b_Nthcali; //! |
TBranch *b_Pathspe; //! |
325 |
TBranch *b_Icaplane; //! |
TBranch *b_P0spe; //! |
326 |
TBranch *b_Icastrip; //! |
TBranch *b_Nxmult; //! |
327 |
TBranch *b_Icamod; //! |
TBranch *b_Nymult; //! |
328 |
TBranch *b_Enestrip; //! |
TBranch *b_Nstrpx; //! |
329 |
TBranch *b_Nthcal; //! |
TBranch *b_Npstripx; //! |
330 |
TBranch *b_Icapl; //! |
TBranch *b_Ntstripx; //! |
331 |
TBranch *b_Icasi; //! |
TBranch *b_Istripx; //! |
332 |
TBranch *b_Icast; //! |
TBranch *b_Qstripx; //! |
333 |
TBranch *b_Xincal; //! |
TBranch *b_Xstripx; //! |
334 |
TBranch *b_Yincal; //! |
TBranch *b_Nstrpy; //! |
335 |
TBranch *b_Zincal; //! |
TBranch *b_Npstripy; //! |
336 |
TBranch *b_Erelcal; //! |
TBranch *b_Ntstripy; //! |
337 |
TBranch *b_Nthnd; //! |
TBranch *b_Istripy; //! |
338 |
TBranch *b_Itubend; //! |
TBranch *b_Qstripy; //! |
339 |
TBranch *b_Iparnd; //! |
TBranch *b_Ystripy; //! |
340 |
TBranch *b_Xinnd; //! |
TBranch *b_Nthcali; //! |
341 |
TBranch *b_Yinnd; //! |
TBranch *b_Icaplane; //! |
342 |
TBranch *b_Zinnd; //! |
TBranch *b_Icastrip; //! |
343 |
TBranch *b_Xoutnd; //! |
TBranch *b_Icamod; //! |
344 |
TBranch *b_Youtnd; //! |
TBranch *b_Enestrip; //! |
345 |
TBranch *b_Zoutnd; //! |
TBranch *b_Nthcal; //! |
346 |
TBranch *b_Erelnd; //! |
TBranch *b_Icapl; //! |
347 |
TBranch *b_Timend; //! |
TBranch *b_Icasi; //! |
348 |
TBranch *b_Pathnd; //! |
TBranch *b_Icast; //! |
349 |
TBranch *b_P0nd; //! |
TBranch *b_Xincal; //! |
350 |
TBranch *b_Nthcard; //! |
TBranch *b_Yincal; //! |
351 |
TBranch *b_Iparcard; //! |
TBranch *b_Zincal; //! |
352 |
TBranch *b_Icard; //! |
TBranch *b_Erelcal; //! |
353 |
TBranch *b_Xincard; //! |
TBranch *b_Nthnd; //! |
354 |
TBranch *b_Yincard; //! |
TBranch *b_Itubend; //! |
355 |
TBranch *b_Zincard; //! |
TBranch *b_Iparnd; //! |
356 |
TBranch *b_Xoutcard; //! |
TBranch *b_Xinnd; //! |
357 |
TBranch *b_Youtcard; //! |
TBranch *b_Yinnd; //! |
358 |
TBranch *b_Zoutcard; //! |
TBranch *b_Zinnd; //! |
359 |
TBranch *b_Erelcard; //! |
TBranch *b_Xoutnd; //! |
360 |
TBranch *b_Timecard; //! |
TBranch *b_Youtnd; //! |
361 |
TBranch *b_Pathcard; //! |
TBranch *b_Zoutnd; //! |
362 |
TBranch *b_P0card; //! |
TBranch *b_Erelnd; //! |
363 |
// |
TBranch *b_Timend; //! |
364 |
|
TBranch *b_Pathnd; //! |
365 |
public: |
TBranch *b_P0nd; //! |
366 |
|
TBranch *b_Nthcard; //! |
367 |
Digitizer(TTree *tree, char* &file_raw); // constructor |
TBranch *b_Iparcard; //! |
368 |
|
TBranch *b_Icard; //! |
369 |
void Close(); |
TBranch *b_Xincard; //! |
370 |
|
TBranch *b_Yincard; //! |
371 |
void SetTree(TTree *tree) {fhBookTree = tree;}; |
TBranch *b_Zincard; //! |
372 |
|
TBranch *b_Xoutcard; //! |
373 |
|
TBranch *b_Youtcard; //! |
374 |
void Loop(); // does the looping over events |
TBranch *b_Zoutcard; //! |
375 |
|
TBranch *b_Erelcard; //! |
376 |
|
TBranch *b_Timecard; //! |
377 |
|
TBranch *b_Pathcard; //! |
378 |
void DigitizePSCU(UInt_t, UChar_t); // digitizes the CPU header |
TBranch *b_P0card; //! |
379 |
void AddPadding(); |
// |
380 |
void DigitizeTRIGGER(); // digitizes the trigger |
|
381 |
Int_t DigitizeTOF(); // digitizes the tof |
public: |
382 |
void DigitizeAC(); // digitizes the anti-counter |
|
383 |
void DigitizeND(); // digitizes the ND |
Digitizer(TTree *tree, char* &file_raw); // constructor |
384 |
void DigitizeS4(); // digitizes the S4 |
|
385 |
void DigitizeCALO(); // digitizes the calorimeter |
void Close(); |
386 |
void DigitizeCALOCALIB(); // digitizes the calorimeter calibration |
void SetTree(TTree *tree) {fhBookTree = tree;}; |
387 |
void DigitizeCALORAW(); // digitizes the calorimeter |
void Loop(); // does the looping over events |
388 |
void DigitizeCALOCOMPRESS(); // digitizes the calorimeter |
|
389 |
void DigitizeCALOFULL(); // digitizes the calorimeter |
void DigitizePSCU(UInt_t, UChar_t, UShort_t*); // digitizes the CPU header |
390 |
|
void AddPadding(); |
391 |
Float_t GetCALOen(Int_t sec, Int_t plane, Int_t strip); // retrieve calorimeter strip energy from the simulation |
void DigitizeRunHeader(); |
392 |
void ClearCaloCalib(Int_t s); // clear calorimeter calibration variables for section s |
void DigitizeRunTrailer(); |
393 |
Int_t CaloLoadCalib(Int_t s,TString fcalname, UInt_t calibno); // load calorimeter calibration variables for section s from file fcalname entry calibno |
// void DigitizeTRIGGER(); // SO nov'07: included in DigitizeTOF |
394 |
void CaloLoadCalib(); |
void DigitizeTOF(int np,float *atte1,float *atte2,float *lambda1,float *lambda2); // digitizes the tof |
395 |
|
void LoadTOFCalib(int np,float *atte1,float *atte2,float *lambda1,float *lambda2); //load TOF calibration |
396 |
void DigitizeDummy(); // digitizes the dummy detector |
void DigitizeAC(); // digitizes the anti-counter |
397 |
|
void DigitizeND(); // digitizes the ND |
398 |
// ToF methods: |
void DigitizeS4(); // digitizes the S4 |
399 |
UChar_t EvaluateCrcTof(UChar_t*); |
void DigitizeCALO(); // digitizes the calorimeter |
400 |
void Paddle2Pmt(Int_t, Int_t, Int_t*, Int_t*); |
void DigitizeCALOCALIB(); // digitizes the calorimeter calibration |
401 |
//void Paddle2Pmt(Int_t, Int_t, Int_t &pmtleft, Int_t &pmtright); |
void DigitizeCALORAW(); // digitizes the calorimeter |
402 |
UChar_t Bin2GrayTof(UChar_t, UChar_t); |
void DigitizeCALOCOMPRESS(); // digitizes the calorimeter |
403 |
void Crc8Tof(UChar_t*, UChar_t*); |
void DigitizeCALOFULL(); // digitizes the calorimeter |
404 |
|
|
405 |
UShort_t* GetDataAC(){return(fDataAC);}; // retrieve AC data (not used right now) |
Float_t GetCALOen(Int_t sec, Int_t plane, Int_t strip); // retrieve calorimeter strip energy from the simulation |
406 |
|
void ClearCaloCalib(Int_t s); // clear calorimeter calibration variables for section s |
407 |
UShort_t* GetDataCALO(){return(fDataCALO);}; // retrieve AC data (not used right now) |
Int_t CaloLoadCalib(Int_t s,TString fcalname, UInt_t calibno); // load calorimeter calibration variables for section s from file fcalname entry calibno |
408 |
|
void CaloLoadCalib(); |
409 |
// methods for Tracker |
|
410 |
void DigitizeTrack(); // digitizes the Tracker data |
void DigitizeDummy(); // digitizes the dummy detector |
411 |
void DigitizeTrackCalib(Int_t ii); // digitizes the Tracker calibration (x view or y view) |
|
412 |
void WriteTrackCalib(); // writes Tracker calibration to file |
// ToF methods: |
413 |
void ClearTrackCalib(); // clear tracker calibration |
UChar_t EvaluateCrcTof(UChar_t*); |
414 |
void LoadTrackCalib(); // load in memmory tracker calibration |
void Paddle2Pmt(Int_t, Int_t, Int_t*, Int_t*); |
415 |
void CompressTrackData(Float_t AdcTrack[fNviews][fNstrips_view]); // Compress and Digitize data of one Ladder in turn |
//void Paddle2Pmt(Int_t, Int_t, Int_t &pmtleft, Int_t &pmtright); |
416 |
void LoadMipCor(); // Load the strip calibration in memory |
UChar_t Bin2GrayTof(UChar_t, UChar_t); |
417 |
Float_t SaturationTrack(Float_t ADC); // Saturation simulation |
void Crc8Tof(UChar_t*, UChar_t*); |
418 |
// end methods for Tracker |
|
419 |
|
UChar_t EvaluateCrcTrigger(UChar_t*, Int_t); |
420 |
void WriteData(); // writes data to file |
|
421 |
void ReadData(); |
UShort_t* GetDataAC(){return(fDataAC);}; // retrieve AC data (not used right now) |
422 |
|
|
423 |
// |
UShort_t* GetDataCALO(){return(fDataCALO);}; // retrieve AC data (not used right now) |
424 |
|
|
425 |
}; |
// methods for Tracker |
426 |
|
void DigitizeTrack(); // digitizes the Tracker data |
427 |
#endif /* DIGITIZER_H */ |
void DigitizeTrackCalib(Int_t ii); // digitizes the Tracker calibration (x view or y view) |
428 |
|
void WriteTrackCalib(); // writes Tracker calibration to file |
429 |
|
void ClearTrackCalib(); // clear tracker calibration |
430 |
|
void LoadTrackCalib(); // load in memmory tracker calibration |
431 |
|
void CompressTrackData(Float_t AdcTrack[fNviews][fNstrips_view]); // Compress and Digitize data of one Ladder in turn |
432 |
|
void LoadMipCor(); // Load the strip calibration in memory |
433 |
|
Float_t SaturationTrackx(Float_t ADC); // Saturation simulation |
434 |
|
Float_t SaturationTracky(Float_t ADC); // Saturation simulation |
435 |
|
// end methods for Tracker |
436 |
|
|
437 |
|
void WriteRunHeader(); |
438 |
|
void WriteRunTrailer(); |
439 |
|
void WriteData(); // writes data to file |
440 |
|
void ReadData(); |
441 |
|
|
442 |
|
// |
443 |
|
|
444 |
|
}; |
445 |
|
|
446 |
|
#endif /* DIGITIZER_H */ |
447 |
|
|
448 |
|
|
449 |
|
|