Rev 180 | Rev 192 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 180 | Rev 182 | ||
---|---|---|---|
Line 91... | Line 91... | ||
91 | sprintf(histname,"letime_%02d",i); |
91 | sprintf(histname,"letime_%02d",i); |
92 | h1_letime[i]=new TH1F(histname,histname,500,d[i].twin[0],d[i].twin[1]); |
92 | h1_letime[i]=new TH1F(histname,histname,500,d[i].twin[0],d[i].twin[1]); |
93 | sprintf(histname,"cftime_%02d",i); |
93 | sprintf(histname,"cftime_%02d",i); |
94 | h1_cftime[i]=new TH1F(histname,histname,500,d[i].twin[0],d[i].twin[1]); |
94 | h1_cftime[i]=new TH1F(histname,histname,500,d[i].twin[0],d[i].twin[1]); |
95 | sprintf(histname,"cftdif_%02d",i); |
95 | sprintf(histname,"cftdif_%02d",i); |
96 | h1_cftdif[i]=new TH1F(histname,histname,2000,d[i].twin[0] |
96 | h1_cftdif[i]=new TH1F(histname,histname,2000,d[i].twin[0]-d[trgch].twin[0],d[i].twin[1]-d[trgch].twin[0]); |
97 | sprintf(histname,"qdc_%02d",i); |
97 | sprintf(histname,"qdc_%02d",i); |
98 | h1_qdc[i]=new TH1F(histname,histname,500,-0. |
98 | h1_qdc[i]=new TH1F(histname,histname,500,-0.5,4.5); |
99 | sprintf(histname,"dpo_%02d",i); |
99 | sprintf(histname,"dpo_%02d",i); |
100 | h2_dpo[i]=new TH2F(histname,histname,DWIDTH,-0.1,204.7,1100,-0.55,0.55); |
100 | h2_dpo[i]=new TH2F(histname,histname,DWIDTH,-0.1,204.7,1100,-0.55,0.55); |
101 | sprintf(histname,"tdcadc_%02d",i); |
101 | sprintf(histname,"tdcadc_%02d",i); |
102 | h2_tdcadc[i]=new TH2F(histname,histname,250, |
102 | h2_tdcadc[i]=new TH2F(histname,histname,250,-0.1,0.5,400,d[i].twin[0]-d[trgch].twin[0],d[i].twin[1]-d[trgch].twin[0]); |
103 | sprintf(histname,"ctdcadc_%02d",i); |
103 | sprintf(histname,"ctdcadc_%02d",i); |
104 | h2_ctdcadc[i]=new TH2F(histname,histname,250, |
104 | h2_ctdcadc[i]=new TH2F(histname,histname,250,-0.1,0.5,400,d[i].twin[0]-d[trgch].twin[0],d[i].twin[1]-d[trgch].twin[0]); |
105 | gr_wfm[i]=new TGraph(DWIDTH); |
105 | gr_wfm[i]=new TGraph(DWIDTH); |
106 | gr_wfm[i]->SetMinimum(-0.55); |
106 | gr_wfm[i]->SetMinimum(-0.55); |
107 | gr_wfm[i]->SetMaximum(0.55); |
107 | gr_wfm[i]->SetMaximum(0.55); |
108 | gr_wfm[i]->SetLineColor(i+1); |
108 | gr_wfm[i]->SetLineColor(i+1); |
109 | gr_wfm[i]->SetMarkerColor(i+1); |
109 | gr_wfm[i]->SetMarkerColor(i+1); |
Line 187... | Line 187... | ||
187 | 187 | ||
188 | 188 | ||
189 | if (recid[0] == 'E') { |
189 | if (recid[0] == 'E') { |
190 | for ( i=0; i<nch; i++) { |
190 | for ( i=0; i<nch; i++) { |
191 | if (!lwfm[i]) continue; |
191 | if (!lwfm[i]) continue; |
192 |
|
192 | double pulseheight = (d[i].edge)? chmax[i][0]: chmin[i][0]; |
- | 193 | ||
- | 194 | if ((pulseheight >d[i].vcut[0])&& |
|
- | 195 | (pulseheight <d[i].vcut[1]) ) { |
|
- | 196 | ||
193 | h1_cftdif[i]->Fill(cftime[i]-cftime[trgch] |
197 | h1_cftdif[i]->Fill(cftime[i]-cftime[trgch]); |
194 | } |
198 | } |
195 |
|
199 | if (!d[i].edge) pulseheight = - pulseheight; |
196 |
|
200 | h2_tdcadc[i] ->Fill(pulseheight,letime[i]-cftime[trgch]); |
197 |
|
201 | h2_ctdcadc[i]->Fill(pulseheight,cftime[i]-cftime[trgch]); |
- | 202 | ||
198 |
|
203 | //if (i==1) printf("ph=%f %f\n", pulseheight, letime[i]-cftime[trgch]); |
199 | } |
204 | } |
- | 205 | double ph0 = (d[0].edge)? chmax[0][0]: -chmin[0][0]; |
|
- | 206 | double ph1 = (d[1].edge)? chmax[1][0]: -chmin[1][0]; |
|
200 | h2_ctalk->Fill( |
207 | h2_ctalk->Fill(ph0,ph1); |
201 | } |
208 | } |
202 | if (event<1) continue; |
209 | if (event<1) continue; |
203 | if (recid[0]!='C') continue; |
210 | if (recid[0]!='C') continue; |
204 | if (ich>=nch) continue; |
211 | if (ich>=nch) continue; |
205 | 212 | ||
Line 255... | Line 262... | ||
255 | float t0 = t[i]; |
262 | float t0 = t[i]; |
256 | float t0p = t[i+1]; |
263 | float t0p = t[i+1]; |
257 | float t0n = t[i-1]; |
264 | float t0n = t[i-1]; |
258 | // charge in the range |
265 | // charge in the range |
259 | if ((t0>d[ich].adcgate[0])&&(t0<d[ich].adcgate[1])) { |
266 | if ((t0>d[ich].adcgate[0])&&(t0<d[ich].adcgate[1])) { |
260 |
|
267 | float sign = (d[ich].edge)? 1: -1; |
- | 268 | qdc[ich]+=sign*y[i]*(t0p-t0n)/2.; |
|
261 | } |
269 | } |
262 | } |
270 | } |
263 | 271 | ||
264 | for (i=1; i<DWIDTH-1; i++) { |
272 | for (i=1; i<DWIDTH-1; i++) { |
265 | float t0 = t[i]; |
273 | float t0 = t[i]; |
Line 327... | Line 335... | ||
327 | // float twin[nch][2]={{120.,130.},{100.,150.},{100.,150.},{70.,90.}}; |
335 | // float twin[nch][2]={{120.,130.},{100.,150.},{100.,150.},{70.,90.}}; |
328 | // float adcgate[nch][2]={{12nch.,136.},{120.,140.},{120.,140.},{70.,90.}}; |
336 | // float adcgate[nch][2]={{12nch.,136.},{120.,140.},{120.,140.},{70.,90.}}; |
329 | // float threshold[4][2]={{0.,-0.05},{0.,-0.05},{0.,-0.25},{0.,-0.25}}; |
337 | // float threshold[4][2]={{0.,-0.05},{0.,-0.05},{0.,-0.25},{0.,-0.25}}; |
330 | // float twin[4][2]={{80.,100.},{80.,100.},{90.,110.},{50.,70.}}; |
338 | // float twin[4][2]={{80.,100.},{80.,100.},{90.,110.},{50.,70.}}; |
331 | // float adcgate[4][2]={{80.,110.},{80.,110.},{90.,110.},{50.,70.}}; |
339 | // float adcgate[4][2]={{80.,110.},{80.,110.},{90.,110.},{50.,70.}}; |
332 |
|
340 | double threshold[4][2]={{0.,-0.05},{0.,-0.05},{0.,-0.25},{0.,-0.25}}; |
333 | float twin[4][2]={{100.,120.},{100.,120.},{110.,130.},{60.,80.}}; |
341 | float twin[4][2]={{100.,120.},{100.,120.},{110.,130.},{60.,80.}}; |
334 | float adcgate[4][2]={{105.,125.},{105.,125.},{110.,130.},{60.,80.}}; |
342 | float adcgate[4][2]={{105.,125.},{105.,125.},{110.,130.},{60.,80.}}; |
335 |
|
343 | double vcut[4][2]={{-0.49,-0.07},{-1,1},{-1,1},{-1,1}}; |
336 | int edge[4]={1,1,1,1};// 0 -- rising, 1 -- falling |
344 | int edge[4]={1,1,1,1};// 0 -- rising, 1 -- falling |
337 | 345 | ||
338 | DrsChannel c[2]; |
346 | DrsChannel c[2]; |
339 | 347 | ||
340 | c[0].cfrac = CFRAC; |
348 | c[0].cfrac = CFRAC; |