2 |
* FTrkQLook_BASIC.cxx |
* FTrkQLook_BASIC.cxx |
3 |
* |
* |
4 |
* autor: D.Fedele |
* autor: D.Fedele |
5 |
* version v1r05 |
* version v1r07 |
6 |
* Parameters: |
* Parameters: |
7 |
* file - the data file to analyze |
* file - the data file to analyze |
8 |
* fromevent - first event to analyze |
* fromevent - first event to analyze |
103 |
} else if (toevent > nevent) { |
} else if (toevent > nevent) { |
104 |
maxevent = nevent; |
maxevent = nevent; |
105 |
} else { |
} else { |
106 |
maxevent = toevent+1; |
maxevent = nevent; |
107 |
} |
} |
108 |
nevent=maxevent-minevent ; |
nevent=maxevent-minevent ; |
109 |
} |
} |
113 |
stringstream oss,fromfile,isfile; |
stringstream oss,fromfile,isfile; |
114 |
// |
// |
115 |
// information about the RunHeader |
// information about the RunHeader |
116 |
Int_t HOBT[neventH]; |
ULong64_t HOBT[neventH]; |
117 |
Int_t trk_cal_us[neventH]; |
Int_t trk_cal_us[neventH]; |
118 |
for (Int_t vi=0; vi<neventH;vi++){ |
for (Int_t vi=0; vi<neventH;vi++){ |
119 |
HOBT[vi]=0; |
HOBT[vi]=0; |
131 |
if((HOBT[ev]<HOBT[ev-1]) && ev>0) |
if((HOBT[ev]<HOBT[ev-1]) && ev>0) |
132 |
countnboot+=1; |
countnboot+=1; |
133 |
} |
} |
134 |
countnboot+=2*(Int_t)nevent/MAXSTORAGE; |
countnboot+=(Int_t)(2*nevent/MAXSTORAGE); |
135 |
// printf("\ncountnboot=%d\n",countnboot); |
// printf("\ncountnboot=%d\n",countnboot); |
136 |
|
|
137 |
// |
// |
138 |
// information about calibration OBT |
// information about calibration OBT |
139 |
Int_t COBT[neventC]; |
ULong64_t COBT[neventC]; |
140 |
for (Int_t vi=0; vi<neventC;vi++){ |
for (Int_t vi=0; vi<neventC;vi++){ |
141 |
COBT[vi]=0; |
COBT[vi]=0; |
142 |
} |
} |
260 |
t2->SetTextSize(0.08); |
t2->SetTextSize(0.08); |
261 |
|
|
262 |
Int_t i=0; |
Int_t i=0; |
263 |
Float_t x[MAXSTORAGE], xb[MAXSTORAGE]; |
Long64_t x[MAXSTORAGE], xb[MAXSTORAGE]; |
264 |
Float_t yyd[MAXSTORAGE][12],yyb[MAXSTORAGE][12]; |
Float_t yyd[MAXSTORAGE][12],yyb[MAXSTORAGE][12]; |
265 |
Int_t countbad[12]; |
Int_t countbad[12]; |
266 |
Float_t perc=0,xMIN=0.,xMAX=0.; |
Float_t perc=0,xMIN=0.,xMAX=0.; |
337 |
// Draw Histos |
// Draw Histos |
338 |
for (Int_t i=0; i<12 ; i++){ |
for (Int_t i=0; i<12 ; i++){ |
339 |
|
|
340 |
Float_t y[maxev-minev],yb[maxev-minev]; |
Double_t yd[maxev-minev],ybd[maxev-minev]; |
341 |
|
Double_t xd[maxev-minev],xbd[maxev-minev]; |
342 |
|
|
343 |
for(Int_t v=0;v<maxev-minev;v++){ |
for(Int_t v=0;v<maxev-minev;v++){ |
344 |
y[v]=yyd[v][i]; |
yd[v]=(Double_t)yyd[v][i]; |
345 |
yb[v]=yyb[v][i]; |
ybd[v]=(Double_t)yyb[v][i]; |
346 |
|
xd[v]=(Double_t)x[v]; |
347 |
|
xbd[v]=(Double_t)xb[v]; |
348 |
} |
} |
349 |
|
|
350 |
if(xMAX<1000000){ |
if(xMAX<1000000){ |
351 |
x[maxev-minev-1]=0.; |
xd[maxev-minev-1]=0; |
352 |
y[maxev-minev-1]=0.; |
yd[maxev-minev-1]=0.; |
353 |
} |
} |
354 |
|
|
355 |
if((maxev-minev)>1000){ |
if((maxev-minev)>1000){ |
367 |
pad[i][ii]->SetFrameFillColor(10); |
pad[i][ii]->SetFrameFillColor(10); |
368 |
pad[i][ii]->Draw(); |
pad[i][ii]->Draw(); |
369 |
pad[i][ii]->cd(); |
pad[i][ii]->cd(); |
370 |
dataletime[i][ii]= new TGraph((maxev-minev),x,y); |
dataletime[i][ii]= new TGraph((maxev-minev),xd,yd); |
371 |
dataletime[i][ii]->SetTitle(oss.str().c_str()); |
dataletime[i][ii]->SetTitle(oss.str().c_str()); |
372 |
dataletime[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
dataletime[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
373 |
dataletime[i][ii]->GetXaxis()->CenterTitle(); |
dataletime[i][ii]->GetXaxis()->CenterTitle(); |
384 |
|
|
385 |
|
|
386 |
if((maxev-minev)>1000 && perc>10){ |
if((maxev-minev)>1000 && perc>10){ |
387 |
dataletime1[i][ii]= new TGraph(countbad[i],xb,yb); |
dataletime1[i][ii]= new TGraph(countbad[i],xbd,ybd); |
388 |
dataletime1[i][ii]->SetMarkerStyle(21); |
dataletime1[i][ii]->SetMarkerStyle(21); |
389 |
if((maxev-minev)<50) dataletime1[i][ii]->SetMarkerSize(0.5); |
if((maxev-minev)<50) dataletime1[i][ii]->SetMarkerSize(0.5); |
390 |
else dataletime1[i][ii]->SetMarkerSize(0.1); |
else dataletime1[i][ii]->SetMarkerSize(0.1); |
392 |
dataletime1[i][ii]->Draw("psame"); |
dataletime1[i][ii]->Draw("psame"); |
393 |
} |
} |
394 |
else if((maxev-minev)<1000 && countbad[i]>=100){ |
else if((maxev-minev)<1000 && countbad[i]>=100){ |
395 |
dataletime1[i][ii]= new TGraph(countbad[i],xb,yb); |
dataletime1[i][ii]= new TGraph(countbad[i],xbd,ybd); |
396 |
dataletime1[i][ii]->SetMarkerStyle(21); |
dataletime1[i][ii]->SetMarkerStyle(21); |
397 |
if((maxev-minev)<50) dataletime1[i][ii]->SetMarkerSize(0.5); |
if((maxev-minev)<50) dataletime1[i][ii]->SetMarkerSize(0.5); |
398 |
else dataletime1[i][ii]->SetMarkerSize(0.1); |
else dataletime1[i][ii]->SetMarkerSize(0.1); |