/[PAMELA software]/quicklook/tracker/flight/macros/FTrkQLook_EXPERT.cxx
ViewVC logotype

Diff of /quicklook/tracker/flight/macros/FTrkQLook_EXPERT.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by pam-fi, Mon Jun 5 08:37:53 2006 UTC revision 1.5 by pam-fi, Mon Jun 5 14:23:29 2006 UTC
# Line 219  void FTrkQLook_EXPERT(TString file,Int_t Line 219  void FTrkQLook_EXPERT(TString file,Int_t
219        alarm1 << "================================================="<< endl<<endl;        alarm1 << "================================================="<< endl<<endl;
220                    
221        alarm1 << "Alarm variables (range 0-1)"<<endl;        alarm1 << "Alarm variables (range 0-1)"<<endl;
222        alarm1 << " ALARM[1]= "<< hex<< (Int_t)al->ALARM[1]<<dec<<endl;        alarm1 << " ALARM[1]= 0x"<< hex << (Int_t)al->ALARM[1]<<endl;
223        alarm1 << " ALARM[2]= "<< hex<< (Int_t)al->ALARM[2]<<dec<<endl;        alarm1 << " ALARM[2]= 0x"<< (Int_t)al->ALARM[2]<<endl;
224        alarm1 << " CmdDuringTrig= "<< hex<<(Int_t)al->CmdDuringTrig<<endl;        alarm1 << " CmdDuringTrig= 0x"<< (Int_t)al->CmdDuringTrig<<endl;
225        alarm1 << " FinalCheck= "<< hex<<(Int_t)al->FinalCheck<<endl;        alarm1 << " FinalCheck= 0x"<< (Int_t)al->FinalCheck<<endl;
226        alarm1 << " FlashData= "<< hex<<(Int_t)al->FlashData<<endl;        alarm1 << " FlashData= 0x"<< (Int_t)al->FlashData<<endl;
227        alarm1 << " FlashShutdown= "<< hex<<(Int_t)al->FlashShutdown<<endl;        alarm1 << " FlashShutdown= 0x"<< (Int_t)al->FlashShutdown<<endl;
228        alarm1 << " FlashUpset= "<< hex<<(Int_t)al->FlashUpset<<endl;        alarm1 << " FlashUpset= 0x"<< (Int_t)al->FlashUpset<<endl;
229        alarm1 << " InterCheck= "<< hex<<(Int_t)al->InterCheck<<endl;        alarm1 << " InterCheck= 0x"<< (Int_t)al->InterCheck<<endl;
230        alarm1 << " UnknownCmd= "<< hex<<(Int_t)al->UnknownCmd<<endl<<endl;        alarm1 << " UnknownCmd= 0x"<<(Int_t)al->UnknownCmd<<endl<<endl;
231            
232        alarm1 << "Alarm variables (range 0-3F)"<<endl;        alarm1 << "Alarm variables (range 0-3F)"<<endl;
233        alarm1 << " CmdIDMA= "<< hex<<(Int_t)al->CmdIDMA<<endl;        alarm1 << " CmdIDMA= 0x"<< (Int_t)al->CmdIDMA<<endl;
234        alarm1 << " DSPSoft= "<< hex<<(Int_t)al->DSPSoft<<endl;        alarm1 << " DSPSoft= 0x"<< (Int_t)al->DSPSoft<<endl;
235        alarm1 << " TrigIDMA= "<< hex<<(Int_t)al->TrigIDMA<<endl<<endl;        alarm1 << " TrigIDMA= 0x"<< (Int_t)al->TrigIDMA<<endl<<endl;
236                  
237        alarm1 << "Alarm bits (range 0-1)"<<endl;        alarm1 << "Control variables (range 0-3F)"<<endl;
238        alarm1 << " Aswr= "<< hex<<(Int_t)al->Aswr<<endl;        alarm1 << " DSPBusy= 0x"<< (Int_t)al->DSPBusy<<endl;
239        alarm1 << " BID[1]= "<< hex<<(Int_t)al->BID[0]<<endl;        alarm1 << " DSPMask= 0x"<< (Int_t)al->DSPMask<<endl<<endl;
240        alarm1 << " BID[2]= "<< hex<<(Int_t)al->BID[1]<<endl;  
241        alarm1 << " BID[3]= "<< hex<<(Int_t)al->BID[2]<<endl;        alarm1 << "Control variables (range 0-1)"<<endl;
242        alarm1 << " BID[4]= "<< hex<<(Int_t)al->BID[3]<<endl;        alarm1 << " FlashOn= 0x"<< (Int_t)al->FlashOn<<endl<<endl;
243        alarm1 << " BID[5]= "<< hex<<(Int_t)al->BID[4]<<endl;  
244        alarm1 << " BID[6]= "<< hex<<(Int_t)al->BID[5]<<endl;        alarm1 << "Control variables (range 0-3)"<<endl;
245        alarm1 << " BID[7]= "<< hex<<(Int_t)al->BID[6]<<endl;        alarm1 << " TrigMask= 0x"<< (Int_t)al->TrigMask<<endl<<endl;
246        alarm1 << " CmdNum= "<< hex<<(Int_t)al->CmdNum<<endl;  
247        alarm1 << " DSPBusy= "<< hex<<(Int_t)al->DSPBusy<<endl;        alarm1 << "Control bits fixed"<<endl;
248        alarm1 << " DSPMask= "<< hex<<(Int_t)al->DSPMask<<endl;        alarm1 << " Aswr= 0x"<< (Int_t)al->Aswr<<endl;
249        alarm1 << " FlashOn= "<< hex<<(Int_t)al->FlashOn<<endl;        alarm1 << " BID[1]= 0x"<< (Int_t)al->BID[0]<<endl;
250        alarm1 << " PNum= "<< hex<<(Int_t)al->PNum<<endl;        alarm1 << " BID[2]= 0x"<< (Int_t)al->BID[1]<<endl;
251        alarm1 << " TrigMask= "<< hex<<(Int_t)al->TrigMask<<dec<<endl;        alarm1 << " BID[3]= 0x"<< (Int_t)al->BID[2]<<endl;
252          alarm1 << " BID[4]= 0x"<< (Int_t)al->BID[3]<<endl;
253          alarm1 << " BID[5]= 0x"<< (Int_t)al->BID[4]<<endl;
254          alarm1 << " BID[6]= 0x"<< (Int_t)al->BID[5]<<endl;
255          alarm1 << " BID[7]= 0x"<< (Int_t)al->BID[6]<<endl;
256          alarm1 << " CmdNum= 0x"<< (Int_t)al->CmdNum<<endl;
257          alarm1 << " PNum= 0x"<< (Int_t)al->PNum<< dec <<endl;
258    
259        alarm1 << "================================================="<< endl<<endl;        alarm1 << "================================================="<< endl<<endl;
260                
261      }      }
# Line 260  void FTrkQLook_EXPERT(TString file,Int_t Line 267  void FTrkQLook_EXPERT(TString file,Int_t
267    gStyle->SetStatFontSize(0.075);    gStyle->SetStatFontSize(0.075);
268    gStyle->SetOptStat(1110);    gStyle->SetOptStat(1110);
269    gStyle->SetFillColor(10);      gStyle->SetFillColor(10);  
270      gStyle->SetStatColor(10);
271    gStyle->SetTitleFillColor(10);      gStyle->SetTitleFillColor(10);  
272    gStyle->SetTitleFontSize(0.1);    gStyle->SetTitleFontSize(0.1);
273    gStyle->SetTitleOffset(0.8,"y");    gStyle->SetTitleOffset(0.8,"y");
# Line 278  void FTrkQLook_EXPERT(TString file,Int_t Line 286  void FTrkQLook_EXPERT(TString file,Int_t
286      printf("\n Scan of events from %i to %i ... \n",minevent+1,maxevent);      printf("\n Scan of events from %i to %i ... \n",minevent+1,maxevent);
287    
288    
289    Int_t minev=minevent,maxev=maxevent,countTEMP=0;    Int_t minev=minevent,maxev=maxevent,countTEMP=0,countHOBT=0;
290    TCanvas *CompTimeCanv[countrun],*EventNumCanv[countrun],*LandauCanv1[countrun],*LandauCanv2[countrun],*LandauCanv3[countrun];    TCanvas *CompTimeCanv[countrun],*EventNumCanv[countrun],*LandauCanv1[countrun],*LandauCanv2[countrun],*LandauCanv3[countrun];
291    TCanvas *IlluminaCanv[countrun],*TempCanv[countrun];    TCanvas *IlluminaCanv[countrun],*TempCanv[countrun];
292    TGraph *comprtime[12][countrun],*temp[5][countrun],*eventnumb[countrun];    TGraph *comprtime[12][countrun],*temp[5][countrun],*eventnumb[countrun];
# Line 536  void FTrkQLook_EXPERT(TString file,Int_t Line 544  void FTrkQLook_EXPERT(TString file,Int_t
544    
545        if((ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){        if((ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){
546          maxev=ev;          maxev=ev;
         //      printf("prova12  ev=%d\tev-minev=%d\n",ev,ev-minev);  
547          break;          break;
548        }        }
549        else{        else{
         //      if(ii==32)printf("\nprova1  %d\tev-minev=%d\n",ev,ev-minev);  
550          x[(ev-minev)]= ph->GetOrbitalTime();          x[(ev-minev)]= ph->GetOrbitalTime();
551          ALARM=0;          ALARM=0;
552                    
# Line 552  void FTrkQLook_EXPERT(TString file,Int_t Line 558  void FTrkQLook_EXPERT(TString file,Int_t
558            for(Int_t j=0;j<3;j++){            for(Int_t j=0;j<3;j++){
559              if(te->signcluster[i][j]!=0){              if(te->signcluster[i][j]!=0){
560                if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){                if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){
561          //      if((dsp==1 && te->addrcluster[i][2]>767 && te->addrcluster[i][2]<1024) || (dsp==6 && te->addrcluster[i][0]>511 && te->addrcluster[i][0]<769) ||(dsp==6 && te->addrcluster[i][1]>0 && te->addrcluster[i][1]<769) ||(dsp==6 && te->addrcluster[i][2]>511 && te->addrcluster[i][2]<769) ||(dsp==11 && te->addrcluster[i][0]>767 && te->addrcluster[i][0]<1024))           //     if((dsp==1 && te->addrcluster[i][2]>767 && te->addrcluster[i][2]<1024) || (dsp==6 && te->addrcluster[i][0]>511 && te->addrcluster[i][0]<769) ||(dsp==6 && te->addrcluster[i][1]>0 && te->addrcluster[i][1]<769) ||(dsp==6 && te->addrcluster[i][2]>511 && te->addrcluster[i][2]<769) ||(dsp==11 && te->addrcluster[i][0]>767 && te->addrcluster[i][0]<1024));
562  //                continue;  //              else
 //              else  
563                    illuminazione[dsp][ii]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j]));                    illuminazione[dsp][ii]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j]));
564                }                }
565              }              }
566            }            }
567            if(!(dsp%2)){            if(x[ev-minev]>HOBT[countHOBT+1])
568              if(te->signcluster[i][0]!=0) landau1[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][0]));              countHOBT+=1;
569              if(te->signcluster[i][1]!=0) landau2[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][1]));            if(trk_cal_us[countHOBT]!=104){
570              if(te->signcluster[i][2]!=0) landau3[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][2]));              if(!(dsp%2)){
571            }                if(te->signcluster[i][0]!=0) landau1[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][0]));
572            else{                if(te->signcluster[i][1]!=0) landau2[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][1]));
573              if(te->signcluster[i][0]!=0) landau1[dsp][ii]->Fill((Float_t)te->signcluster[i][0]);                if(te->signcluster[i][2]!=0) landau3[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][2]));
574              if(te->signcluster[i][1]!=0) landau2[dsp][ii]->Fill((Float_t)te->signcluster[i][1]);              }
575              if(te->signcluster[i][2]!=0) landau3[dsp][ii]->Fill((Float_t)te->signcluster[i][2]);              else{
576                  if(te->signcluster[i][0]!=0) landau1[dsp][ii]->Fill((Float_t)te->signcluster[i][0]);
577                  if(te->signcluster[i][1]!=0) landau2[dsp][ii]->Fill((Float_t)te->signcluster[i][1]);
578                  if(te->signcluster[i][2]!=0) landau3[dsp][ii]->Fill((Float_t)te->signcluster[i][2]);
579                }
580            }            }
581                        
582            WARNING[i]=0;            WARNING[i]=0;
# Line 649  void FTrkQLook_EXPERT(TString file,Int_t Line 658  void FTrkQLook_EXPERT(TString file,Int_t
658      if(ALARM==0) alarm << endl<< "------>  NO ALARM!!! <-------"<<endl;      if(ALARM==0) alarm << endl<< "------>  NO ALARM!!! <-------"<<endl;
659      if(warning_dspnumber==0) warning<<"NONE"<<endl;      if(warning_dspnumber==0) warning<<"NONE"<<endl;
660    
     //    printf("prova2\n");  
661    
662      Float_t maxhist=0;      Float_t maxhist=0;
663      TBox b;      TBox b;
# Line 662  void FTrkQLook_EXPERT(TString file,Int_t Line 670  void FTrkQLook_EXPERT(TString file,Int_t
670          yyc[v]=yc[v][i];          yyc[v]=yc[v][i];
671        }        }
672            
       //    printf("prova3\n");  
673        LandauCanv1[ii]->cd();        LandauCanv1[ii]->cd();
674        pad1[i]->SetFillColor(10);        pad1[i]->SetFillColor(10);
675        pad1[i]->SetFrameFillColor(10);        pad1[i]->SetFrameFillColor(10);
676        pad1[i]->Draw();        pad1[i]->Draw();
677        pad1[i]->cd();        pad1[i]->cd();
       landau1[i][ii]->SetLineColor(1);  
678        landau1[i][ii]->GetXaxis()->SetTitle("max signal");        landau1[i][ii]->GetXaxis()->SetTitle("max signal");
679        landau1[i][ii]->GetXaxis()->CenterTitle();        landau1[i][ii]->GetXaxis()->CenterTitle();
680        landau1[i][ii]->Draw("");        landau1[i][ii]->Draw("");
# Line 679  void FTrkQLook_EXPERT(TString file,Int_t Line 685  void FTrkQLook_EXPERT(TString file,Int_t
685        pad4[i]->SetFrameFillColor(10);        pad4[i]->SetFrameFillColor(10);
686        pad4[i]->Draw();        pad4[i]->Draw();
687        pad4[i]->cd();        pad4[i]->cd();
       landau2[i][ii]->SetLineColor(1);  
       landau2[i][ii]->SetFillColor(1);  
688        landau2[i][ii]->GetXaxis()->SetTitle("max signal");        landau2[i][ii]->GetXaxis()->SetTitle("max signal");
689        landau2[i][ii]->GetXaxis()->CenterTitle();        landau2[i][ii]->GetXaxis()->CenterTitle();
690        landau2[i][ii]->Draw("");        landau2[i][ii]->Draw("");
# Line 696  void FTrkQLook_EXPERT(TString file,Int_t Line 700  void FTrkQLook_EXPERT(TString file,Int_t
700        landau3[i][ii]->Draw("");        landau3[i][ii]->Draw("");
701        LandauCanv3[ii]->Update();        LandauCanv3[ii]->Update();
702    
       //     printf("prova4\n");  
703        IlluminaCanv[ii]->cd();        IlluminaCanv[ii]->cd();
704        pad2[i]->SetFillColor(10);        pad2[i]->SetFillColor(10);
705        pad2[i]->SetFrameFillColor(10);        pad2[i]->SetFrameFillColor(10);
706        pad2[i]->SetLogy();        pad2[i]->SetLogy();
707        pad2[i]->Draw();        pad2[i]->Draw();
708        pad2[i]->cd();        pad2[i]->cd();
       // illuminazione[i][ii]->SetStats(KFALSE);  
709        illuminazione[i][ii]->GetXaxis()->SetTitle("strip with max signal");        illuminazione[i][ii]->GetXaxis()->SetTitle("strip with max signal");
710        illuminazione[i][ii]->GetXaxis()->CenterTitle();        illuminazione[i][ii]->GetXaxis()->CenterTitle();
711        illuminazione[i][ii]->Draw("");        illuminazione[i][ii]->Draw("");
# Line 723  void FTrkQLook_EXPERT(TString file,Int_t Line 725  void FTrkQLook_EXPERT(TString file,Int_t
725        }        }
726        IlluminaCanv[ii]->Update();        IlluminaCanv[ii]->Update();
727    
       //     printf("prova5\n");  
   
728    
729        CompTimeCanv[ii]->cd();        CompTimeCanv[ii]->cd();
730        pad3[i]->SetFillColor(10);        pad3[i]->SetFillColor(10);
# Line 744  void FTrkQLook_EXPERT(TString file,Int_t Line 744  void FTrkQLook_EXPERT(TString file,Int_t
744        CompTimeCanv[ii]->Update();        CompTimeCanv[ii]->Update();
745      };      };
746        
     //  printf("prova6\n");  
747      EventNumCanv[ii]->cd();      EventNumCanv[ii]->cd();
748      pt0=new TPad("pt0"," ",0.704,0.004,0.996,0.98);      pt0=new TPad("pt0"," ",0.704,0.004,0.996,0.98);
749      pt1 = new TPaveText(0.004,0.004,0.986,0.996);      pt1 = new TPaveText(0.004,0.004,0.986,0.996);
# Line 782  void FTrkQLook_EXPERT(TString file,Int_t Line 781  void FTrkQLook_EXPERT(TString file,Int_t
781      eventnumb[ii]->Draw("ap");      eventnumb[ii]->Draw("ap");
782      EventNumCanv[ii]->Update();      EventNumCanv[ii]->Update();
783    
     //    printf("prova7\n");  
   
784      obt=0;      obt=0;
785      for(Int_t i=0; i<5; i++){      for(Int_t i=0; i<5; i++){
786        Int_t v=0;        Int_t v=0;
# Line 825  void FTrkQLook_EXPERT(TString file,Int_t Line 822  void FTrkQLook_EXPERT(TString file,Int_t
822        TempCanv[ii]->Update();        TempCanv[ii]->Update();
823      }      }
824            
     //    printf("prova8\n");  
825      minev=maxev;      minev=maxev;
     //    printf("\ncountrun=%d\n",ii);  
826      if(maxev==maxevent-1) {      if(maxev==maxevent-1) {
827        countrun=ii+1;        countrun=ii+1;
828        break;        break;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.23