1 |
|
|
2 |
/** |
/** |
3 |
* FTrkQLook_EXPERT.cxx |
* FTrkQLook_EXPERT.cxx |
4 |
* |
* |
5 |
* autor: D.Fedele |
* autor: D.Fedele |
6 |
* version v1r14 |
* version v1r27 |
7 |
* Parameters: |
* Parameters: |
8 |
* file - the data file to analyze |
* file - the data file to analyze |
9 |
* fromevent - first event to analyze |
* fromevent - first event to analyze |
23 |
#include <TFile.h> |
#include <TFile.h> |
24 |
#include <TTree.h> |
#include <TTree.h> |
25 |
#include <TStyle.h> |
#include <TStyle.h> |
26 |
|
#include <TAxis.h> |
27 |
|
#include <TH1F.h> |
28 |
|
#include <TROOT.h> |
29 |
|
#include <cstdlib> |
30 |
// |
// |
31 |
#include <physics/tracker/TrackerEvent.h> |
#include <physics/tracker/TrackerEvent.h> |
32 |
#include <PscuHeader.h> |
#include <PscuHeader.h> |
148 |
|
|
149 |
// |
// |
150 |
// information about the RunHeader |
// information about the RunHeader |
151 |
ULong64_t HOBT[neventH]; |
ULong_t HOBT[neventH]; |
152 |
Int_t trk_cal_us[neventH]; |
Int_t trk_cal_us[neventH]; |
153 |
|
ULong_t acq_info[neventH]; |
154 |
Int_t countnboot=1; |
Int_t countnboot=1; |
155 |
for (Int_t vi=0; vi<neventH;vi++){ |
for (Int_t vi=0; vi<neventH;vi++){ |
156 |
HOBT[vi]=0; |
HOBT[vi]=0; |
157 |
trk_cal_us[vi]=0; |
trk_cal_us[vi]=0; |
158 |
|
acq_info[vi]=0; |
159 |
} |
} |
160 |
for (Int_t ev=0; ev<neventH; ev++){ |
for (Int_t ev=0; ev<neventH; ev++){ |
161 |
otr->GetEntry(ev); |
otr->GetEntry(ev); |
162 |
pH = eH->GetPscuHeader(); |
pH = eH->GetPscuHeader(); |
163 |
HOBT[ev]= pH->GetOrbitalTime(); |
HOBT[ev]= pH->GetOrbitalTime(); |
164 |
trk_cal_us[ev]=reh->TRK_CALIB_USED; |
trk_cal_us[ev]=reh->TRK_CALIB_USED; |
165 |
|
acq_info[ev]=reh->ACQ_BUILD_INFO; |
166 |
if((HOBT[ev]<HOBT[ev-1]) && ev>0) |
if((HOBT[ev]<HOBT[ev-1]) && ev>0) |
167 |
countnboot+=1; |
countnboot+=1; |
168 |
} |
} |
185 |
} |
} |
186 |
const Int_t tsize=maxsize; |
const Int_t tsize=maxsize; |
187 |
Int_t tempt[tsize][5]; |
Int_t tempt[tsize][5]; |
188 |
ULong64_t xt[tsize]; |
ULong_t xt[tsize]; |
189 |
|
|
190 |
Int_t cntpgtemp=1,cntpgdat=0,cntpgmag=0; |
Int_t cntpgtemp=1,cntpgdat=0,cntpgmag=0; |
191 |
// |
// |
217 |
} |
} |
218 |
const Int_t bsize=maxsize; |
const Int_t bsize=maxsize; |
219 |
Int_t magt[bsize][5]; |
Int_t magt[bsize][5]; |
220 |
ULong64_t xb[bsize]; |
ULong_t xb[bsize]; |
221 |
siztmp=0; |
siztmp=0; |
222 |
// |
// |
223 |
// information about the magnetic field |
// information about the magnetic field |
254 |
// write the file for the TrkAlarm packet |
// write the file for the TrkAlarm packet |
255 |
if(alnevent==0) alarm1 <<endl<< "------> NO ALARM!!! <-------"<< endl; |
if(alnevent==0) alarm1 <<endl<< "------> NO ALARM!!! <-------"<< endl; |
256 |
else{ |
else{ |
257 |
Long64_t obt=0; |
ULong_t obt=0; |
258 |
for (Int_t ev=0; ev<alnevent; ev++){ |
for (Int_t ev=0; ev<alnevent; ev++){ |
259 |
altr->GetEntry(ev); |
altr->GetEntry(ev); |
260 |
ph = aleh->GetPscuHeader(); |
ph = aleh->GetPscuHeader(); |
261 |
|
|
262 |
if(ph->GetOrbitalTime()<obt && ev>0) |
if((ULong_t)ph->GetOrbitalTime()<obt && ev>0) |
263 |
alarm1<<endl<<"NEW CPU BOOT"<<endl; |
alarm1<<endl<<"NEW CPU BOOT"<<endl; |
264 |
obt=ph->GetOrbitalTime(); |
obt=ph->GetOrbitalTime(); |
265 |
|
|
266 |
alarm1 << "================================================="<< endl; |
alarm1 << "================================================="<< endl; |
267 |
alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ; |
268 |
alarm1 << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm1 << " - OBT "<< (ULong_t)ph->GetOrbitalTime() << " ms"<<endl; |
269 |
alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl; |
alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl; |
270 |
alarm1 << "================================================="<< endl<<endl; |
alarm1 << "================================================="<< endl<<endl; |
271 |
|
|
371 |
|
|
372 |
TLatex *t=new TLatex(); |
TLatex *t=new TLatex(); |
373 |
TLatex *t1=new TLatex(); |
TLatex *t1=new TLatex(); |
|
|
|
374 |
|
|
375 |
|
TLine li,liva1; |
376 |
|
|
377 |
Int_t minev=minevent,maxev=maxevent,countTEMP=0,countMAG=0; |
Int_t minev=minevent,maxev=maxevent,countTEMP=0,countMAG=0; |
378 |
ULong_t countALARMx=0,countALARMy=0; |
ULong_t countALARMx=0,countALARMy=0,countFC[12],countFL1[12],countFL2[12],countFL3[12],countFL4[12],countFL5[12],countFL6[12]; |
379 |
|
|
380 |
|
for(int i=0; i<12; i++){ |
381 |
|
countFC[i]=0; |
382 |
|
countFL1[i]=0; |
383 |
|
countFL2[i]=0; |
384 |
|
countFL3[i]=0; |
385 |
|
countFL4[i]=0; |
386 |
|
countFL5[i]=0; |
387 |
|
countFL6[i]=0; |
388 |
|
} |
389 |
|
|
390 |
// |
// |
391 |
// Fill temperature graphs |
// Fill temperature graphs |
461 |
break; |
break; |
462 |
} |
} |
463 |
else{ |
else{ |
464 |
tempt_tmp[v]=(Double_t)((Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231)); |
tempt_tmp[v]=(Double_t)((Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231)); |
465 |
if(tempt_tmp[v]>100) { |
if(tempt_tmp[v]>100) { |
466 |
tempt_tmp[v]=28.5; |
tempt_tmp[v]=28.5; |
467 |
tempt_tmpw[vv]=28.5; |
tempt_tmpw[vv]=28.5; |
468 |
xt_tmpw[vv++]=(Double_t)xt[ev]; |
xt_tmpw[vv++]=(Double_t)xt[ev]; |
469 |
} |
} |
470 |
else if(tempt_tmp[v]<0){ |
else if(tempt_tmp[v]<0){ |
471 |
tempt_tmp[v]=25.5; |
tempt_tmp[v]=25.5; |
472 |
tempt_tmpw[vv]=25.5; |
tempt_tmpw[vv]=25.5; |
473 |
xt_tmpw[vv++]=(Double_t)xt[ev]; |
xt_tmpw[vv++]=(Double_t)xt[ev]; |
474 |
} |
} |
475 |
xt_tmp[v++]=(Double_t)xt[ev]; |
xt_tmp[v++]=(Double_t)xt[ev]; |
476 |
} |
} |
477 |
} |
} |
478 |
TempCanv[ii]->cd(); |
TempCanv[ii]->cd(); |
482 |
pad6[i]->cd(); |
pad6[i]->cd(); |
483 |
temp[i][ii]= new TGraph(v,xt_tmp,tempt_tmp); |
temp[i][ii]= new TGraph(v,xt_tmp,tempt_tmp); |
484 |
temp[i][ii]->SetTitle(tit.str().c_str()); |
temp[i][ii]->SetTitle(tit.str().c_str()); |
485 |
if(v==1) temp[i][ii]->GetXaxis()->SetNdivisions(502,kTRUE); |
if(v==1) temp[i][ii]->GetXaxis()->SetNdivisions(-501); |
486 |
temp[i][ii]->GetXaxis()->SetLabelSize(0.04); |
temp[i][ii]->GetXaxis()->SetLabelSize(0.04); |
487 |
temp[i][ii]->GetXaxis()->SetTitleSize(0.04); |
temp[i][ii]->GetXaxis()->SetTitleSize(0.04); |
488 |
temp[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
temp[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
539 |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
540 |
isfile.str(""); |
isfile.str(""); |
541 |
|
|
|
TLine li; |
|
542 |
li.SetLineStyle(1); |
li.SetLineStyle(1); |
543 |
li.SetLineWidth(1); |
li.SetLineWidth(1); |
544 |
li.SetLineColor(190); |
li.SetLineColor(190); |
590 |
pad7[i]->cd(); |
pad7[i]->cd(); |
591 |
mag[i][ii]= new TGraph(v,xb_tmp,magt_tmp); |
mag[i][ii]= new TGraph(v,xb_tmp,magt_tmp); |
592 |
mag[i][ii]->SetTitle(tit.str().c_str()); |
mag[i][ii]->SetTitle(tit.str().c_str()); |
593 |
mag[i][ii]->GetXaxis()->SetNdivisions(502,kTRUE); |
if(v==1) mag[i][ii]->GetXaxis()->SetNdivisions(-501); |
594 |
mag[i][ii]->GetXaxis()->SetLabelSize(0.04); |
mag[i][ii]->GetXaxis()->SetLabelSize(0.04); |
595 |
mag[i][ii]->GetXaxis()->SetTitleSize(0.04); |
mag[i][ii]->GetXaxis()->SetTitleSize(0.04); |
596 |
mag[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
mag[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
597 |
mag[i][ii]->GetXaxis()->CenterTitle(); |
mag[i][ii]->GetXaxis()->CenterTitle(); |
598 |
mag[i][ii]->GetXaxis()->SetTitleOffset(0.85); |
mag[i][ii]->GetXaxis()->SetTitleOffset(0.85); |
599 |
if(i!=4) mag[i][ii]->GetYaxis()->SetRangeUser(2047,2058); |
if(i!=4) mag[i][ii]->GetYaxis()->SetRangeUser(2047,2058); |
600 |
else mag[i][ii]->GetYaxis()->SetRangeUser(2060,2067); |
else mag[i][ii]->GetYaxis()->SetRangeUser(2059,2067); |
601 |
mag[i][ii]->GetYaxis()->SetTitleOffset(1.2); |
mag[i][ii]->GetYaxis()->SetTitleOffset(1.2); |
602 |
mag[i][ii]->GetYaxis()->SetLabelOffset(0.001); |
mag[i][ii]->GetYaxis()->SetLabelOffset(0.001); |
603 |
mag[i][ii]->GetYaxis()->SetLabelSize(0.03); |
mag[i][ii]->GetYaxis()->SetLabelSize(0.03); |
616 |
ma<<"maximum recorded value"; |
ma<<"maximum recorded value"; |
617 |
t->SetTextSize(0.1); |
t->SetTextSize(0.1); |
618 |
switch(i){ |
switch(i){ |
619 |
case 0: |
case 0: |
620 |
li.DrawLine(min,2054.,max,2054.); |
li.DrawLine(min,2054.,max,2054.); |
621 |
li.DrawLine(min,2048.,max,2048.); |
li.DrawLine(min,2048.,max,2048.); |
622 |
t1->DrawLatex(xlat,2054.3,ma.str().c_str()); |
t1->DrawLatex(xlat,2054.3,ma.str().c_str()); |
623 |
t1->DrawLatex(xlat,2047.7,mi.str().c_str()); |
t1->DrawLatex(xlat,2047.7,mi.str().c_str()); |
624 |
break; |
break; |
625 |
|
|
626 |
case 1: |
case 1: |
627 |
li.DrawLine(min,2055.,max,2055.); |
li.DrawLine(min,2055.,max,2055.); |
628 |
li.DrawLine(min,2050.,max,2050.); |
li.DrawLine(min,2049.,max,2049.); |
629 |
t1->DrawLatex(xlat,2055.3,ma.str().c_str()); |
t1->DrawLatex(xlat,2055.3,ma.str().c_str()); |
630 |
t1->DrawLatex(xlat,2049.7,mi.str().c_str()); |
t1->DrawLatex(xlat,2048.7,mi.str().c_str()); |
631 |
break; |
break; |
632 |
|
|
633 |
case 2: |
case 2: |
634 |
li.DrawLine(min,2056.,max,2056.); |
li.DrawLine(min,2056.,max,2056.); |
635 |
li.DrawLine(min,2051.,max,2051.); |
li.DrawLine(min,2050.,max,2050.); |
636 |
t1->DrawLatex(xlat,2056.3,ma.str().c_str()); |
t1->DrawLatex(xlat,2056.3,ma.str().c_str()); |
637 |
t1->DrawLatex(xlat,2050.7,mi.str().c_str()); |
t1->DrawLatex(xlat,2049.7,mi.str().c_str()); |
638 |
break; |
break; |
639 |
|
|
640 |
case 3: |
case 3: |
641 |
li.DrawLine(min,2057.,max,2057.); |
li.DrawLine(min,2057.,max,2057.); |
642 |
li.DrawLine(min,2052.,max,2052.); |
li.DrawLine(min,2051.,max,2051.); |
643 |
t1->DrawLatex(xlat,2057.3,ma.str().c_str()); |
t1->DrawLatex(xlat,2057.3,ma.str().c_str()); |
644 |
t1->DrawLatex(xlat,2051.7,mi.str().c_str()); |
t1->DrawLatex(xlat,2050.7,mi.str().c_str()); |
645 |
break; |
break; |
646 |
|
|
647 |
case 4: |
case 4: |
648 |
li.DrawLine(min,2066.,max,2066.); |
li.DrawLine(min,2066.,max,2066.); |
649 |
li.DrawLine(min,2061.,max,2061.); |
li.DrawLine(min,2060.,max,2060.); |
650 |
t1->DrawLatex(xlat,2066.15,ma.str().c_str()); |
t1->DrawLatex(xlat,2066.2,ma.str().c_str()); |
651 |
t1->DrawLatex(xlat,2060.85,mi.str().c_str()); |
t1->DrawLatex(xlat,2059.8,mi.str().c_str()); |
652 |
break; |
break; |
653 |
|
|
654 |
} |
} |
655 |
BfieldCanv[ii]->Update(); |
BfieldCanv[ii]->Update(); |
742 |
// and fill graphs and histos |
// and fill graphs and histos |
743 |
|
|
744 |
Int_t al=0; |
Int_t al=0; |
745 |
|
ULong_t obtx=0; |
746 |
Double_t x[MAXSTORAGE]; |
Double_t x[MAXSTORAGE]; |
747 |
Float_t yc[MAXSTORAGE][12]; |
Float_t yc[MAXSTORAGE][12]; |
748 |
Double_t eventint[MAXSTORAGE]; |
Double_t eventint[MAXSTORAGE]; |
756 |
|
|
757 |
if(ev==maxevent-1) maxev=maxevent-1; |
if(ev==maxevent-1) maxev=maxevent-1; |
758 |
|
|
759 |
if((ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){ |
if(((ULong_t)ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){ |
760 |
maxev=ev; |
maxev=ev; |
761 |
break; |
break; |
762 |
} |
} |
763 |
else{ |
else{ |
764 |
x[(ev-minev)]= ph->GetOrbitalTime(); |
obtx = ph->GetOrbitalTime(); |
765 |
|
x[(ev-minev)]=(Double_t)obtx; |
766 |
ALARM=0; |
ALARM=0; |
|
|
|
767 |
Int_t dsp=0; |
Int_t dsp=0; |
768 |
for(Int_t i=0; i<12; i++){ |
Int_t noacq=0; |
769 |
if(te->DSPnumber[i]<1 || te->DSPnumber[i]>12) { |
// Int_t acq_dsp[12]; |
770 |
ALARM=1; |
ULong_t acq_info_tmp=0; |
771 |
break; |
if(cod->Get(pctp->RunHeader)>0) acq_info_tmp=acq_info[cod->Get(pctp->RunHeader)-1]; |
772 |
} |
else acq_info_tmp=acq_info[cod->Get(pctp->RunHeader)]; |
773 |
|
for(Int_t io=0;io<12;io++){ |
774 |
|
// acq_dsp[dsp]=(acq_info_tmp>>(12+io))&(~(~0<<1)); |
775 |
|
if(((acq_info_tmp>>(12+io))&(~(~0<<1)))==0) |
776 |
|
noacq+=1; |
777 |
|
WARNING[io]=0; |
778 |
|
} |
779 |
|
|
780 |
dsp=te->DSPnumber[i]-1; |
for(Int_t i=0; i<12; i++){ |
|
yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; |
|
781 |
|
|
782 |
// |
if(i<12-noacq){ |
783 |
// Fill Cluster Signal and Lighting of the view histos |
if(te->DSPnumber[i]<1 || te->DSPnumber[i]>12) { |
784 |
for(Int_t j=0;j<3;j++){ |
ALARM=1; |
785 |
if(te->signcluster[i][j]!=0){ |
break; |
786 |
if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ |
} |
787 |
illuminazione[dsp]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); |
|
788 |
|
dsp=te->DSPnumber[i]-1; |
789 |
|
yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; |
790 |
|
|
791 |
|
// |
792 |
|
// Fill Cluster Signal and Lighting of the view histos |
793 |
|
for(Int_t j=0;j<3;j++){ |
794 |
|
if(te->signcluster[i][j]!=0){ |
795 |
|
if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ |
796 |
|
illuminazione[dsp]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); |
797 |
|
} |
798 |
} |
} |
799 |
} |
} |
800 |
} |
if(trk_cal_us[cod->Get(pctp->RunHeader)]!=104){ |
801 |
if(trk_cal_us[cod->Get(pctp->RunHeader)]!=104){ |
if(!(dsp%2)){ |
802 |
if(!(dsp%2)){ |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)(1024.-te->signcluster[i][0])); |
803 |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)(1024.-te->signcluster[i][0])); |
if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)(1024.-te->signcluster[i][1])); |
804 |
if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)(1024.-te->signcluster[i][1])); |
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)(1024.-te->signcluster[i][2])); |
805 |
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)(1024.-te->signcluster[i][2])); |
} |
806 |
} |
else{ |
807 |
else{ |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)te->signcluster[i][0]); |
808 |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)te->signcluster[i][0]); |
if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)te->signcluster[i][1]); |
809 |
if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)te->signcluster[i][1]); |
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)te->signcluster[i][2]); |
810 |
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)te->signcluster[i][2]); |
} |
811 |
} |
} |
|
} |
|
812 |
|
|
813 |
WARNING[i]=0; |
WARNING[i]=0; |
814 |
if(te->fc[i]!=0 || te->fl1[i]!=0 || te->fl2[i]!=0 || te->fl3[i]!=0 || te->fl4[i]!=0 || te->fl5[i]!=0 || te->fl6[i]!=0){ |
if(te->fc[i]!=0){ |
815 |
ALARM = 1; //general alarm |
if(countFC[dsp]==0){ |
816 |
WARNING[i] = 1; // DSP warning |
ALARM = 1; //general alarm |
817 |
}; |
WARNING[i] = 1; // DSP warning |
818 |
|
} |
819 |
if(dsp%2==0 && te->alarm[i]!=0){ // hardware alarm |
countFC[dsp]+=1; |
820 |
if(countALARMy==0) |
}; |
821 |
ALARM = 1; |
|
822 |
countALARMy+=1; |
if(te->fl1[i]!=0){ |
823 |
}; |
if(countFL1[dsp]==0){ |
824 |
|
ALARM = 1; //general alarm |
825 |
if(dsp%2==1 && te->alarm[i]!=0){ // hardware alarm |
WARNING[i] = 1; // DSP warning |
826 |
if(countALARMx==0) |
} |
827 |
ALARM = 1; |
countFL1[dsp]+=1; |
828 |
countALARMx+=1; |
}; |
829 |
}; |
|
830 |
|
if(te->fl2[i]!=0){ |
831 |
|
if(countFL2[dsp]==0){ |
832 |
|
ALARM = 1; //general alarm |
833 |
|
WARNING[i] = 1; // DSP warning |
834 |
|
} |
835 |
|
countFL2[dsp]+=1; |
836 |
|
}; |
837 |
|
|
838 |
|
if(te->fl3[i]!=0){ |
839 |
|
if(countFL3[dsp]==0){ |
840 |
|
ALARM = 1; //general alarm |
841 |
|
WARNING[i] = 1; // DSP warning |
842 |
|
} |
843 |
|
countFL3[dsp]+=1; |
844 |
|
}; |
845 |
|
|
846 |
|
if(te->fl4[i]!=0){ |
847 |
|
if(countFL4[dsp]==0){ |
848 |
|
ALARM = 1; //general alarm |
849 |
|
WARNING[i] = 1; // DSP warning |
850 |
|
} |
851 |
|
countFL4[dsp]+=1; |
852 |
|
}; |
853 |
|
|
854 |
|
if(te->fl5[i]!=0){ |
855 |
|
if(countFL5[dsp]==0){ |
856 |
|
ALARM = 1; //general alarm |
857 |
|
WARNING[i] = 1; // DSP warning |
858 |
|
} |
859 |
|
countFL5[dsp]+=1; |
860 |
|
}; |
861 |
|
|
862 |
|
if(te->fl6[i]!=0){ |
863 |
|
if(countFL6[dsp]==0){ |
864 |
|
ALARM = 1; //general alarm |
865 |
|
WARNING[i] = 1; // DSP warning |
866 |
|
} |
867 |
|
countFL6[dsp]+=1; |
868 |
|
}; |
869 |
|
|
870 |
|
if(dsp%2==0 && te->alarm[i]!=0){ // hardware alarm |
871 |
|
if(countALARMy==0) |
872 |
|
ALARM = 1; |
873 |
|
countALARMy+=1; |
874 |
|
}; |
875 |
|
|
876 |
|
if(dsp%2==1 && te->alarm[i]!=0){ // hardware alarm |
877 |
|
if(countALARMx==0) |
878 |
|
ALARM = 1; |
879 |
|
countALARMx+=1; |
880 |
|
}; |
881 |
|
|
882 |
//************************************************************************************** |
//************************************************************************************** |
883 |
// warning for internal number |
// warning for internal number |
884 |
//************************************************************************************** |
//************************************************************************************** |
885 |
if(ev==minev && i<=10 && te->eventn[i]!=te->eventn[i+1]) ALARM=1; |
if(ev==minev && i<=10 && te->eventn[i]!=te->eventn[i+1]) ALARM=1; |
886 |
if((ev-minev)>=1 && eventn[i]+1!=te->eventn[i] && te->eventn[i]!=1) ALARM=1; |
if((ev-minev)>=1 && eventn[i]+1!=te->eventn[i] && te->eventn[i]!=1) ALARM=1; |
887 |
|
} |
888 |
} |
} |
889 |
eventint[(ev-minev)]=te->eventn[0]; |
eventint[(ev-minev)]=te->eventn[0]; |
890 |
|
|
896 |
al=1; |
al=1; |
897 |
alarm <<endl<< "================================================="<< endl; |
alarm <<endl<< "================================================="<< endl; |
898 |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
899 |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm << " - OBT "<< (ULong_t)ph->GetOrbitalTime() << " ms"<<endl; |
900 |
alarm << "Total events "<<nevent<<endl; |
alarm << "Total events "<<nevent<<endl; |
901 |
alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl; |
alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl; |
902 |
alarm << "================================================="<< endl; |
alarm << "================================================="<< endl; |
946 |
if(countALARMx%6!=0) alarm << endl<<endl<< "***** "<<countALARMx/6+1 <<" events with hardware alarm in X-view *****"<<endl; |
if(countALARMx%6!=0) alarm << endl<<endl<< "***** "<<countALARMx/6+1 <<" events with hardware alarm in X-view *****"<<endl; |
947 |
else alarm << endl<<endl<< "***** "<<countALARMx/6 <<" events with hardware alarm in X-view *****"<<endl; |
else alarm << endl<<endl<< "***** "<<countALARMx/6 <<" events with hardware alarm in X-view *****"<<endl; |
948 |
} |
} |
949 |
|
for(int p=0; p<12; p++){ |
950 |
|
if(countFC[p]!=0) alarm << endl<<endl<< "***** "<<countFC[p] <<" events with fc!=0 in DSP "<<p+1<<" *****"<<endl; |
951 |
|
if(countFL1[p]!=0) alarm << endl<<endl<< "***** "<<countFL1[p] <<" events with fl1!=0 in DSP "<<p+1<<" *****"<<endl; |
952 |
|
if(countFL2[p]!=0) alarm << endl<<endl<< "***** "<<countFL2[p] <<" events with fl2!=0 in DSP "<<p+1<<" *****"<<endl; |
953 |
|
if(countFL3[p]!=0) alarm << endl<<endl<< "***** "<<countFL3[p] <<" events with fl3!=0 in DSP "<<p+1<<" *****"<<endl; |
954 |
|
if(countFL4[p]!=0) alarm << endl<<endl<< "***** "<<countFL4[p] <<" events with fl4!=0 in DSP "<<p+1<<" *****"<<endl; |
955 |
|
if(countFL5[p]!=0) alarm << endl<<endl<< "***** "<<countFL5[p] <<" events with fl5!=0 in DSP "<<p+1<<" *****"<<endl; |
956 |
|
if(countFL6[p]!=0) alarm << endl<<endl<< "***** "<<countFL6[p] <<" events with fl6!=0 in DSP "<<p+1<<" *****"<<endl; |
957 |
|
} |
958 |
} |
} |
959 |
|
|
960 |
// |
// |
977 |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
978 |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
979 |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
980 |
|
if(maxev-minev==1) comprtime[i][ii]->GetXaxis()->SetNdivisions(-501); |
981 |
// comprtime[i][ii]->GetYaxis()->SetRangeUser(0,3); |
// comprtime[i][ii]->GetYaxis()->SetRangeUser(0,3); |
982 |
comprtime[i][ii]->Draw("ap"); |
comprtime[i][ii]->Draw("ap"); |
983 |
oss1.str(""); |
oss1.str(""); |
1003 |
eventnumb[ii]->GetYaxis()->SetTitleSize(0.03); |
eventnumb[ii]->GetYaxis()->SetTitleSize(0.03); |
1004 |
eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); |
eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); |
1005 |
eventnumb[ii]->GetYaxis()->CenterTitle(); |
eventnumb[ii]->GetYaxis()->CenterTitle(); |
1006 |
|
if(maxev-minev==1) eventnumb[ii]->GetXaxis()->SetNdivisions(-501); |
1007 |
eventnumb[ii]->GetYaxis()->SetTitleOffset(2.); |
eventnumb[ii]->GetYaxis()->SetTitleOffset(2.); |
1008 |
eventnumb[ii]->SetMarkerStyle(21); |
eventnumb[ii]->SetMarkerStyle(21); |
1009 |
eventnumb[ii]->SetMarkerColor(kBlue); |
eventnumb[ii]->SetMarkerColor(kBlue); |
1115 |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
1116 |
isfile.str(""); |
isfile.str(""); |
1117 |
|
|
1118 |
|
isfile<<"Chips with white line at least once showed anomalous behaviour"; |
1119 |
|
t->SetTextColor(17); |
1120 |
|
t->SetTextSize(0.018); |
1121 |
|
t->DrawLatex(.01,.96,isfile.str().c_str()); |
1122 |
|
isfile.str(""); |
1123 |
|
|
1124 |
|
isfile<<"Boxes so colored point out anomalous chips (not necessarily broken)"; |
1125 |
|
t->SetTextColor(107); |
1126 |
|
// t->DrawLatex(7.,95.7,isfile.str().c_str()); |
1127 |
|
isfile.str(""); |
1128 |
|
t->SetTextColor(1); |
1129 |
|
|
1130 |
// |
// |
1131 |
// Draw the histos |
// Draw the histos |
1132 |
for (Int_t i=0; i<12 ; i++){ |
for (Int_t nn=0; nn<12 ; nn++){ |
1133 |
|
|
1134 |
TBox b; |
TBox b; |
1135 |
|
|
1136 |
Float_t maxhist=0; |
Float_t maxhist=0.,va1x=0.,minhist=0.; |
1137 |
LandauCanv1->cd(); |
LandauCanv1->cd(); |
1138 |
pad1[i]->SetFillColor(10); |
pad1[nn]->SetFillColor(10); |
1139 |
pad1[i]->SetFrameFillColor(10); |
pad1[nn]->SetFrameFillColor(10); |
1140 |
pad1[i]->Draw(); |
pad1[nn]->Draw(); |
1141 |
pad1[i]->cd(); |
pad1[nn]->cd(); |
1142 |
landau1[i]->GetXaxis()->SetTitle("max signal"); |
landau1[nn]->GetXaxis()->SetTitle("max signal"); |
1143 |
landau1[i]->GetXaxis()->CenterTitle(); |
landau1[nn]->GetXaxis()->CenterTitle(); |
1144 |
landau1[i]->Draw(""); |
landau1[nn]->Draw(""); |
1145 |
LandauCanv1->Update(); |
LandauCanv1->Update(); |
1146 |
|
|
1147 |
LandauCanv2->cd(); |
LandauCanv2->cd(); |
1148 |
pad4[i]->SetFillColor(10); |
pad4[nn]->SetFillColor(10); |
1149 |
pad4[i]->SetFrameFillColor(10); |
pad4[nn]->SetFrameFillColor(10); |
1150 |
pad4[i]->Draw(); |
pad4[nn]->Draw(); |
1151 |
pad4[i]->cd(); |
pad4[nn]->cd(); |
1152 |
landau2[i]->GetXaxis()->SetTitle("max signal"); |
landau2[nn]->GetXaxis()->SetTitle("max signal"); |
1153 |
landau2[i]->GetXaxis()->CenterTitle(); |
landau2[nn]->GetXaxis()->CenterTitle(); |
1154 |
landau2[i]->Draw(""); |
landau2[nn]->Draw(""); |
1155 |
LandauCanv2->Update(); |
LandauCanv2->Update(); |
1156 |
|
|
1157 |
LandauCanv3->cd(); |
LandauCanv3->cd(); |
1158 |
pad5[i]->SetFillColor(10); |
pad5[nn]->SetFillColor(10); |
1159 |
pad5[i]->SetFrameFillColor(10); |
pad5[nn]->SetFrameFillColor(10); |
1160 |
pad5[i]->Draw(); |
pad5[nn]->Draw(); |
1161 |
pad5[i]->cd(); |
pad5[nn]->cd(); |
1162 |
landau3[i]->GetXaxis()->SetTitle("max signal"); |
landau3[nn]->GetXaxis()->SetTitle("max signal"); |
1163 |
landau3[i]->GetXaxis()->CenterTitle(); |
landau3[nn]->GetXaxis()->CenterTitle(); |
1164 |
landau3[i]->Draw(""); |
landau3[nn]->Draw(""); |
1165 |
LandauCanv3->Update(); |
LandauCanv3->Update(); |
1166 |
|
|
1167 |
|
|
1168 |
|
li.SetLineColor(38); |
1169 |
|
li.SetLineStyle(4); |
1170 |
|
li.SetLineWidth(2); |
1171 |
|
liva1.SetLineColor(42); |
1172 |
|
liva1.SetLineStyle(3); |
1173 |
|
liva1.SetLineWidth(1); |
1174 |
|
|
1175 |
IlluminaCanv->cd(); |
IlluminaCanv->cd(); |
1176 |
pad2[i]->SetFillColor(10); |
pad2[nn]->SetFillColor(10); |
1177 |
pad2[i]->SetFrameFillColor(10); |
pad2[nn]->SetFrameFillColor(10); |
1178 |
pad2[i]->SetLogy(); |
pad2[nn]->SetLogy(); |
1179 |
pad2[i]->Draw(); |
pad2[nn]->Draw(); |
1180 |
pad2[i]->cd(); |
pad2[nn]->cd(); |
1181 |
illuminazione[i]->GetXaxis()->SetTitle("strip with max signal"); |
illuminazione[nn]->GetXaxis()->SetTitle("strip with max signal"); |
1182 |
illuminazione[i]->GetXaxis()->CenterTitle(); |
illuminazione[nn]->GetXaxis()->CenterTitle(); |
1183 |
illuminazione[i]->Draw(""); |
illuminazione[nn]->Draw(""); |
1184 |
if(i==1){ |
maxhist= illuminazione[nn]->GetMaximum(); |
1185 |
maxhist= illuminazione[i]->GetMaximum(); |
minhist=0.; |
1186 |
b.SetFillColor(6); |
b.SetFillColor(19); |
1187 |
b.SetFillStyle(3945); |
b.SetFillStyle(3954); |
1188 |
b.DrawBox(2944.,0.,3060.,maxhist); |
if(nn==0){ |
1189 |
|
b.DrawBox(0.,minhist,2047.,maxhist); |
1190 |
b.SetFillColor(107); |
} |
1191 |
b.SetFillStyle(3954); |
else if(nn==1){ |
1192 |
b.DrawBox(2816.,0.,2944.,maxhist); |
b.DrawBox(128.,minhist,256.,maxhist); |
1193 |
b.DrawBox(2048.,0.,2176.,maxhist); |
b.DrawBox(384.,minhist,512.,maxhist); |
1194 |
} |
b.DrawBox(896.,minhist,1024.,maxhist); |
1195 |
else if(i==4){ |
b.DrawBox(2048.,minhist,2432.,maxhist); |
1196 |
maxhist=illuminazione[i]->GetMaximum(); |
b.DrawBox(2816.,minhist,2944.,maxhist); |
1197 |
b.SetFillColor(107); |
b.DrawBox(2944.,minhist,3070.,maxhist); |
1198 |
b.SetFillStyle(3954); |
} |
1199 |
b.DrawBox(384.,0.,512.,maxhist); |
else if(nn==3){ |
1200 |
} |
b.DrawBox(0.,minhist,256.,maxhist); |
1201 |
else if(i==6){ |
b.DrawBox(2816.,minhist,3070.,maxhist); |
1202 |
maxhist= illuminazione[i]->GetMaximum(); |
} |
1203 |
b.SetFillColor(6); |
else if(nn==4){ |
1204 |
b.SetFillStyle(3945); |
b.DrawBox(256.,minhist,512.,maxhist); |
1205 |
b.DrawBox(2560.,0.,2816.,maxhist); |
b.DrawBox(1792.,minhist,1920.,maxhist); |
1206 |
b.DrawBox(1024.,0.,1535.,maxhist); |
b.DrawBox(2816.,minhist,3070.,maxhist); |
1207 |
|
} |
1208 |
b.SetFillColor(107); |
else if(nn==5){ |
1209 |
b.SetFillStyle(3954); |
b.DrawBox(0.,minhist,256.,maxhist); |
1210 |
b.DrawBox(512.,0.,768.,maxhist); |
b.DrawBox(896.,minhist,1024.,maxhist); |
1211 |
b.DrawBox(1536.,0.,1792.,maxhist); |
b.DrawBox(1664.,minhist,1792.,maxhist); |
1212 |
} |
} |
1213 |
else if(i==7){ |
else if(nn==6){ |
1214 |
maxhist= illuminazione[i]->GetMaximum(); |
b.DrawBox(512.,minhist,768.,maxhist); |
1215 |
b.SetFillColor(107); |
b.DrawBox(1024.,minhist,1280.,maxhist); |
1216 |
b.SetFillStyle(3954); |
b.DrawBox(1280.,minhist,1792.,maxhist); |
1217 |
b.DrawBox(512.,0.,768.,maxhist); |
b.DrawBox(2560.,minhist,2816.,maxhist); |
1218 |
} |
} |
1219 |
else if(i==9){ |
else if(nn==7){ |
1220 |
maxhist=illuminazione[i]->GetMaximum(); |
b.DrawBox(0.,minhist,1535.,maxhist); |
1221 |
b.SetFillColor(107); |
b.DrawBox(2024.,minhist,2280.,maxhist); |
1222 |
b.SetFillStyle(3954); |
} |
1223 |
b.DrawBox(256.,0.,384.,maxhist); |
else if(nn==8){ |
1224 |
} |
b.DrawBox(512.,minhist,768.,maxhist); |
1225 |
else if(i==11){ |
} |
1226 |
maxhist= illuminazione[i]->GetMaximum(); |
else if(nn==9){ |
1227 |
b.SetFillColor(6); |
b.DrawBox(0.,minhist,128.,maxhist); |
1228 |
b.SetFillStyle(3945); |
b.DrawBox(256.,minhist,384.,maxhist); |
1229 |
b.DrawBox(768.,0.,1024.,maxhist); |
b.DrawBox(512.,minhist,640.,maxhist); |
1230 |
|
b.DrawBox(896.,minhist,1152.,maxhist); |
1231 |
b.SetFillColor(107); |
b.DrawBox(1280.,minhist,1535.,maxhist); |
1232 |
b.SetFillStyle(3954); |
b.DrawBox(1664.,minhist,1920.,maxhist); |
1233 |
b.DrawBox(0.,0.,512.,maxhist); |
b.DrawBox(2048.,minhist,2304.,maxhist); |
1234 |
b.DrawBox(1920.,0.,2048.,maxhist); |
} |
1235 |
b.DrawBox(2176.,0.,2304.,maxhist); |
else if(nn==10){ |
1236 |
|
b.DrawBox(0.,minhist,512.,maxhist); |
1237 |
|
b.DrawBox(1024.,minhist,3070.,maxhist); |
1238 |
|
} |
1239 |
|
else if(nn==11){ |
1240 |
|
b.DrawBox(0.,minhist,512.,maxhist); |
1241 |
|
b.DrawBox(768.,minhist,1024.,maxhist); |
1242 |
|
b.DrawBox(1536.,minhist,1664.,maxhist); |
1243 |
|
b.DrawBox(1920.,minhist,2560.,maxhist); |
1244 |
|
b.DrawBox(2816.,minhist,3070.,maxhist); |
1245 |
|
} |
1246 |
|
for(int va=1; va<24; va++){ |
1247 |
|
va1x=128*va; |
1248 |
|
liva1.DrawLine(va1x,minhist,va1x,maxhist); |
1249 |
} |
} |
1250 |
|
li.DrawLine(1024.5,minhist,1024.5,maxhist); |
1251 |
|
li.DrawLine(2048.5,minhist,2048.5,maxhist); |
1252 |
IlluminaCanv->Update(); |
IlluminaCanv->Update(); |
1253 |
} |
} |
1254 |
|
|