2 |
* FTrkQLook_EXPERT.cxx |
* FTrkQLook_EXPERT.cxx |
3 |
* |
* |
4 |
* autor: D.Fedele |
* autor: D.Fedele |
5 |
* version v1r08 |
* version v1r11 |
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 |
145 |
// information about the RunHeader |
// information about the RunHeader |
146 |
ULong64_t HOBT[neventH]; |
ULong64_t HOBT[neventH]; |
147 |
Int_t trk_cal_us[neventH]; |
Int_t trk_cal_us[neventH]; |
148 |
|
Int_t countnboot=1; |
149 |
for (Int_t vi=0; vi<neventH;vi++){ |
for (Int_t vi=0; vi<neventH;vi++){ |
150 |
HOBT[vi]=0; |
HOBT[vi]=0; |
151 |
trk_cal_us[vi]=0; |
trk_cal_us[vi]=0; |
155 |
pH = eH->GetPscuHeader(); |
pH = eH->GetPscuHeader(); |
156 |
HOBT[ev]= pH->GetOrbitalTime(); |
HOBT[ev]= pH->GetOrbitalTime(); |
157 |
trk_cal_us[ev]=reh->TRK_CALIB_USED; |
trk_cal_us[ev]=reh->TRK_CALIB_USED; |
158 |
|
if((HOBT[ev]<HOBT[ev-1]) && ev>0) |
159 |
|
countnboot+=1; |
160 |
} |
} |
161 |
|
countnboot+=(Int_t)(2*nevent/MAXSTORAGE); |
162 |
|
// printf("\ncountnboot=%d\n",countnboot); |
163 |
|
|
164 |
|
|
165 |
// |
// |
166 |
// other variables definitions |
// other variables definitions |
180 |
Int_t tempt[tsize][5]; |
Int_t tempt[tsize][5]; |
181 |
ULong64_t xt[tsize]; |
ULong64_t xt[tsize]; |
182 |
|
|
183 |
Int_t countnboot=1; |
Int_t cntpgtemp=1,cntpgdat=0,cntpgmag=0; |
|
Int_t cntpgtemp=0,cntpgdat=0,cntpgmag=0; |
|
184 |
// |
// |
185 |
// information about the temperatures |
// information about the temperatures |
186 |
for (Int_t ev=0; ev<tnevent; ev++){ |
for (Int_t ev=0; ev<tnevent; ev++){ |
190 |
record = (pamela::TsbTRecord*)event->Records->At(j); |
record = (pamela::TsbTRecord*)event->Records->At(j); |
191 |
xt[siztmp]=record->RECORD_OBT; |
xt[siztmp]=record->RECORD_OBT; |
192 |
if((xt[siztmp]<xt[siztmp-1]) && siztmp>0) |
if((xt[siztmp]<xt[siztmp-1]) && siztmp>0) |
193 |
countnboot+=1; |
cntpgtemp+=1; |
194 |
|
|
195 |
for (Int_t z = 0; z < 5; z++){ |
for (Int_t z = 0; z < 5; z++){ |
196 |
tempt[siztmp][z] = record->TEMPERATURES[z+1]; |
tempt[siztmp][z] = record->TEMPERATURES[z+1]; |
198 |
siztmp++; |
siztmp++; |
199 |
} |
} |
200 |
} |
} |
201 |
cntpgtemp=countnboot; |
|
|
countnboot+=2+(Int_t)nevent/MAXSTORAGE; |
|
|
// printf("\ncountnboot=%d\n",countnboot); |
|
|
|
|
202 |
// |
// |
203 |
// information about the entries for the magnetic field |
// information about the entries for the magnetic field |
204 |
if(bnevent>0) cntpgmag=1; |
if(bnevent>0) cntpgmag=1; |
263 |
alarm1 << "================================================="<< endl<<endl; |
alarm1 << "================================================="<< endl<<endl; |
264 |
|
|
265 |
alarm1 << "Alarm variables (range 0-1)"<<endl; |
alarm1 << "Alarm variables (range 0-1)"<<endl; |
266 |
alarm1 << " ALARM[1]= 0x"<< hex << (Int_t)al->ALARM[1]<<endl; |
alarm1 << " ALARM[1]= 0x"<< hex << (Int_t)al->ALARM[0]<<endl; |
267 |
alarm1 << " ALARM[2]= 0x"<< (Int_t)al->ALARM[2]<<endl; |
alarm1 << " ALARM[2]= 0x"<< (Int_t)al->ALARM[1]<<endl; |
268 |
alarm1 << " CmdDuringTrig= 0x"<< (Int_t)al->CmdDuringTrig<<endl; |
alarm1 << " CmdDuringTrig= 0x"<< (Int_t)al->CmdDuringTrig<<endl; |
269 |
alarm1 << " FinalCheck= 0x"<< (Int_t)al->FinalCheck<<endl; |
alarm1 << " FinalCheck= 0x"<< (Int_t)al->FinalCheck<<endl; |
270 |
alarm1 << " FlashData= 0x"<< (Int_t)al->FlashData<<endl; |
alarm1 << " FlashData= 0x"<< (Int_t)al->FlashData<<endl; |
436 |
Double_t xt_tmpw[tsize], tempt_tmpw[tsize]; |
Double_t xt_tmpw[tsize], tempt_tmpw[tsize]; |
437 |
for (Int_t ev=countTEMP; ev<tsize; ev++){ |
for (Int_t ev=countTEMP; ev<tsize; ev++){ |
438 |
|
|
439 |
if(ev==tsize-1 && i==4) countTEMP=tsize-1; |
if(ev==tsize-1 && i==4 && ii==cntpgtemp-1) countTEMP=tsize-1; |
440 |
if(xt[ev]<xt[ev-1] && ev>countTEMP){ |
if(xt[ev]<xt[ev-1] && ev>countTEMP){ |
441 |
if(i==4) countTEMP=ev; |
if(i==4) countTEMP=ev; |
442 |
break; |
break; |
463 |
pad6[i]->cd(); |
pad6[i]->cd(); |
464 |
temp[i][ii]= new TGraph(v,xt_tmp,tempt_tmp); |
temp[i][ii]= new TGraph(v,xt_tmp,tempt_tmp); |
465 |
temp[i][ii]->SetTitle(tit.str().c_str()); |
temp[i][ii]->SetTitle(tit.str().c_str()); |
466 |
|
if(v==1) temp[i][ii]->GetXaxis()->SetNdivisions(502,kTRUE); |
467 |
temp[i][ii]->GetXaxis()->SetLabelSize(0.04); |
temp[i][ii]->GetXaxis()->SetLabelSize(0.04); |
468 |
temp[i][ii]->GetXaxis()->SetTitleSize(0.04); |
temp[i][ii]->GetXaxis()->SetTitleSize(0.04); |
469 |
temp[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
temp[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
490 |
|
|
491 |
|
|
492 |
} |
} |
493 |
if(countTEMP==tsize-1){ |
if(countTEMP==tsize-1 && ii==cntpgtemp-1){ |
494 |
break; |
break; |
495 |
} |
} |
496 |
} |
} |
555 |
Double_t xb_tmp[bsize], magt_tmp[bsize]; |
Double_t xb_tmp[bsize], magt_tmp[bsize]; |
556 |
for (Int_t ev=countMAG; ev<bsize; ev++){ |
for (Int_t ev=countMAG; ev<bsize; ev++){ |
557 |
|
|
558 |
if(ev==bsize-1 && i==4) countMAG=bsize-1; |
if(ev==bsize-1 && i==4 && ii==cntpgmag-1) countMAG=bsize-1; |
559 |
if(xb[ev]<xb[ev-1] && ev>countMAG){ |
if(xb[ev]<xb[ev-1] && ev>countMAG){ |
560 |
if(i==4) countMAG=ev; |
if(i==4) countMAG=ev; |
561 |
break; |
break; |
579 |
mag[i][ii]->GetXaxis()->CenterTitle(); |
mag[i][ii]->GetXaxis()->CenterTitle(); |
580 |
mag[i][ii]->GetXaxis()->SetTitleOffset(0.85); |
mag[i][ii]->GetXaxis()->SetTitleOffset(0.85); |
581 |
if(i!=4) mag[i][ii]->GetYaxis()->SetRangeUser(2047,2058); |
if(i!=4) mag[i][ii]->GetYaxis()->SetRangeUser(2047,2058); |
582 |
else mag[i][ii]->GetYaxis()->SetRangeUser(2061,2066); |
else mag[i][ii]->GetYaxis()->SetRangeUser(2060,2067); |
583 |
mag[i][ii]->GetYaxis()->SetTitleOffset(1.2); |
mag[i][ii]->GetYaxis()->SetTitleOffset(1.2); |
584 |
mag[i][ii]->GetYaxis()->SetLabelOffset(0.001); |
mag[i][ii]->GetYaxis()->SetLabelOffset(0.001); |
585 |
mag[i][ii]->GetYaxis()->SetLabelSize(0.03); |
mag[i][ii]->GetYaxis()->SetLabelSize(0.03); |
607 |
|
|
608 |
case 1: |
case 1: |
609 |
li.DrawLine(min,2055.,max,2055.); |
li.DrawLine(min,2055.,max,2055.); |
610 |
li.DrawLine(min,2051.,max,2051.); |
li.DrawLine(min,2050.,max,2050.); |
611 |
t1->DrawLatex(xlat,2055.3,ma.str().c_str()); |
t1->DrawLatex(xlat,2055.3,ma.str().c_str()); |
612 |
t1->DrawLatex(xlat,2050.7,mi.str().c_str()); |
t1->DrawLatex(xlat,2049.7,mi.str().c_str()); |
613 |
break; |
break; |
614 |
|
|
615 |
case 2: |
case 2: |
616 |
li.DrawLine(min,2056.,max,2056.); |
li.DrawLine(min,2056.,max,2056.); |
617 |
li.DrawLine(min,2052.,max,2052.); |
li.DrawLine(min,2051.,max,2051.); |
618 |
t1->DrawLatex(xlat,2056.3,ma.str().c_str()); |
t1->DrawLatex(xlat,2056.3,ma.str().c_str()); |
619 |
t1->DrawLatex(xlat,2051.7,mi.str().c_str()); |
t1->DrawLatex(xlat,2050.7,mi.str().c_str()); |
620 |
break; |
break; |
621 |
|
|
622 |
case 3: |
case 3: |
623 |
li.DrawLine(min,2057.,max,2057.); |
li.DrawLine(min,2057.,max,2057.); |
624 |
li.DrawLine(min,2053.,max,2053.); |
li.DrawLine(min,2052.,max,2052.); |
625 |
t1->DrawLatex(xlat,2057.3,ma.str().c_str()); |
t1->DrawLatex(xlat,2057.3,ma.str().c_str()); |
626 |
t1->DrawLatex(xlat,2052.7,mi.str().c_str()); |
t1->DrawLatex(xlat,2051.7,mi.str().c_str()); |
627 |
break; |
break; |
628 |
|
|
629 |
case 4: |
case 4: |
630 |
li.DrawLine(min,2065.,max,2065.); |
li.DrawLine(min,2066.,max,2066.); |
631 |
li.DrawLine(min,2062.,max,2062.); |
li.DrawLine(min,2061.,max,2061.); |
632 |
t1->DrawLatex(xlat,2065.15,ma.str().c_str()); |
t1->DrawLatex(xlat,2066.15,ma.str().c_str()); |
633 |
t1->DrawLatex(xlat,2061.85,mi.str().c_str()); |
t1->DrawLatex(xlat,2060.85,mi.str().c_str()); |
634 |
break; |
break; |
635 |
|
|
636 |
} |
} |
637 |
BfieldCanv[ii]->Update(); |
BfieldCanv[ii]->Update(); |
638 |
tit.str(""); |
tit.str(""); |
639 |
} |
} |
640 |
if(countMAG==bsize-1){ |
if(countMAG==bsize-1 && ii==cntpgmag-1){ |
641 |
break; |
break; |
642 |
} |
} |
643 |
} |
} |
1049 |
b.DrawBox(2816.,0.,2944.,maxhist); |
b.DrawBox(2816.,0.,2944.,maxhist); |
1050 |
b.DrawBox(2048.,0.,2176.,maxhist); |
b.DrawBox(2048.,0.,2176.,maxhist); |
1051 |
} |
} |
1052 |
|
else if(i==4){ |
1053 |
|
maxhist=illuminazione[i]->GetMaximum(); |
1054 |
|
b.SetFillColor(107); |
1055 |
|
b.SetFillStyle(3954); |
1056 |
|
b.DrawBox(384.,0.,512.,maxhist); |
1057 |
|
} |
1058 |
else if(i==6){ |
else if(i==6){ |
1059 |
maxhist= illuminazione[i]->GetMaximum(); |
maxhist= illuminazione[i]->GetMaximum(); |
1060 |
b.SetFillColor(6); |
b.SetFillColor(6); |
1061 |
b.SetFillStyle(3945); |
b.SetFillStyle(3945); |
1062 |
b.DrawBox(2560.,0.,2816.,maxhist); |
b.DrawBox(2560.,0.,2816.,maxhist); |
1063 |
b.DrawBox(1024.,0.,1792.,maxhist); |
b.DrawBox(1024.,0.,1535.,maxhist); |
1064 |
|
|
1065 |
b.SetFillColor(107); |
b.SetFillColor(107); |
1066 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
1067 |
b.DrawBox(512.,0.,768.,maxhist); |
b.DrawBox(512.,0.,768.,maxhist); |
1068 |
|
b.DrawBox(1536.,0.,1792.,maxhist); |
1069 |
} |
} |
1070 |
else if(i==7){ |
else if(i==7){ |
1071 |
maxhist= illuminazione[i]->GetMaximum(); |
maxhist= illuminazione[i]->GetMaximum(); |