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

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

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

revision 1.11 by pam-fi, Tue Aug 22 15:47:48 2006 UTC revision 1.33 by mocchiut, Fri Jan 17 15:10:39 2014 UTC
# Line 2  Line 2 
2   * FTrkCalibQLookExpert.cxx   * FTrkCalibQLookExpert.cxx
3   *   *
4   * autor: D.Fedele   * autor: D.Fedele
5   * version v1r10   * version v1r28
6   * Parameters:   * Parameters:
7   *      file - the data file to analyze   *      file - the data file to analyze
8   *      step - select =1 in order to analyze one event at time   *      step - select =1 in order to analyze one event at time
# Line 23  Line 23 
23  #include <TGraph.h>  #include <TGraph.h>
24  #include <TStyle.h>  #include <TStyle.h>
25  #include <TString.h>  #include <TString.h>
26    #include <TAxis.h>
27    #include <TH1F.h>
28    #include <TROOT.h>
29    #include <cstdlib>
30  //  //
31  #include <PscuHeader.h>  #include <PscuHeader.h>
32  #include <EventHeader.h>  #include <EventHeader.h>
# Line 30  Line 34 
34  #include <CalibTrk2Event.h>  #include <CalibTrk2Event.h>
35  //  //
36    
37  typedef struct caltrk_def{  struct caltrk_def{
38    Int_t good0[2];    Int_t good0[2];
39    Int_t daqmode[12];    Int_t daqmode[12];
40    Int_t dspnum[12];    Int_t dspnum[12];
# Line 77  void FTrkCalibQLook_EXPERT(TString file, Line 81  void FTrkCalibQLook_EXPERT(TString file,
81    Int_t nevents=0;    Int_t nevents=0;
82    Int_t minevent = 0;    Int_t minevent = 0;
83    Int_t maxevent = 0;    Int_t maxevent = 0;
84    ULong64_t FOBT[2];    ULong_t FOBT[2];
85        
86    FOBT[0]=0;    FOBT[0]=0;
87    FOBT[1]=0;    FOBT[1]=0;
# Line 176  void FTrkCalibQLook_EXPERT(TString file, Line 180  void FTrkCalibQLook_EXPERT(TString file,
180      } else if (toevent > nevents) {              } else if (toevent > nevents) {        
181        maxevent = nevents;        maxevent = nevents;
182      } else {            } else {      
183        maxevent = fromevent;        maxevent = nevents;
184      };      };
185    };    };
186            
# Line 188  void FTrkCalibQLook_EXPERT(TString file, Line 192  void FTrkCalibQLook_EXPERT(TString file,
192            
193    Int_t hcevent=hotr->GetEntries();    Int_t hcevent=hotr->GetEntries();
194    Int_t tcevent=totr->GetEntries();    Int_t tcevent=totr->GetEntries();
195    ULong64_t HOBT[hcevent], TOBT[tcevent];    ULong_t HOBT[hcevent], TOBT[tcevent];
196    for (Int_t i = 0; i < hcevent; i++){    for (Int_t i = 0; i < hcevent; i++){
197      hotr->GetEntry(i);      hotr->GetEntry(i);
198      ph = eh4->GetPscuHeader();      ph = eh4->GetPscuHeader();
# Line 212  void FTrkCalibQLook_EXPERT(TString file, Line 216  void FTrkCalibQLook_EXPERT(TString file,
216        ph = eh1->GetPscuHeader();        ph = eh1->GetPscuHeader();
217        cod = eh1->GetCounter();        cod = eh1->GetCounter();
218        FOBT[0]= ph->GetOrbitalTime();        FOBT[0]= ph->GetOrbitalTime();
219        ctrk.daqmode[trk1->DSPnumber[m]-1]=trk1->DAQmode[m];        if(trk1->DSPnumber[m]>0){
220        ctrk.dspnum[trk1->DSPnumber[m]-1]=trk1->DSPnumber[m];          if(trk1->DSPnumber[m]<13){
221        ctrk.calibnum[trk1->DSPnumber[m]-1]=trk1->calibnumber[m];            ctrk.daqmode[trk1->DSPnumber[m]-1]=trk1->DAQmode[m];
222        ctrk.ncalev[trk1->DSPnumber[m]-1]=trk1->ncalib_event[m];            ctrk.dspnum[trk1->DSPnumber[m]-1]=trk1->DSPnumber[m];
223        ctrk.ped1[trk1->DSPnumber[m]-1]=trk1->ped_l1[m];            ctrk.calibnum[trk1->DSPnumber[m]-1]=trk1->calibnumber[m];
224        ctrk.ped2[trk1->DSPnumber[m]-1]=trk1->ped_l2[m];            ctrk.ncalev[trk1->DSPnumber[m]-1]=trk1->ncalib_event[m];
225        ctrk.ped3[trk1->DSPnumber[m]-1]=trk1->ped_l3[m];            ctrk.ped1[trk1->DSPnumber[m]-1]=trk1->ped_l1[m];
226        ctrk.sig1[trk1->DSPnumber[m]-1]=trk1->sig_l1[m];            ctrk.ped2[trk1->DSPnumber[m]-1]=trk1->ped_l2[m];
227        ctrk.sig2[trk1->DSPnumber[m]-1]=trk1->sig_l2[m];            ctrk.ped3[trk1->DSPnumber[m]-1]=trk1->ped_l3[m];
228        ctrk.sig3[trk1->DSPnumber[m]-1]=trk1->sig_l3[m];            ctrk.sig1[trk1->DSPnumber[m]-1]=trk1->sig_l1[m];
229        ctrk.nbad1[trk1->DSPnumber[m]-1]=trk1->nbad_l1[m];            ctrk.sig2[trk1->DSPnumber[m]-1]=trk1->sig_l2[m];
230        ctrk.nbad2[trk1->DSPnumber[m]-1]=trk1->nbad_l2[m];            ctrk.sig3[trk1->DSPnumber[m]-1]=trk1->sig_l3[m];
231        ctrk.nbad3[trk1->DSPnumber[m]-1]=trk1->nbad_l3[m];            ctrk.nbad1[trk1->DSPnumber[m]-1]=trk1->nbad_l1[m];
232        ctrk.calfl[trk1->DSPnumber[m]-1]=trk1->cal_flag[m];            ctrk.nbad2[trk1->DSPnumber[m]-1]=trk1->nbad_l2[m];
233        ctrk.crc_c[trk1->DSPnumber[m]-1][0]=trk1->crc_cal[m][0];            ctrk.nbad3[trk1->DSPnumber[m]-1]=trk1->nbad_l3[m];
234        ctrk.crc_c[trk1->DSPnumber[m]-1][1]=trk1->crc_cal[m][1];            ctrk.calfl[trk1->DSPnumber[m]-1]=trk1->cal_flag[m];
235        ctrk.crc_c[trk1->DSPnumber[m]-1][2]=trk1->crc_cal[m][2];            ctrk.crc_c[trk1->DSPnumber[m]-1][0]=trk1->crc_cal[m][0];
236        ctrk.crc_hc[trk1->DSPnumber[m]-1]=trk1->crc_hcal[m];            ctrk.crc_c[trk1->DSPnumber[m]-1][1]=trk1->crc_cal[m][1];
237        for (Int_t j = 0; j < 3072; j++){            ctrk.crc_c[trk1->DSPnumber[m]-1][2]=trk1->crc_cal[m][2];
238          ctrk.dspped[trk1->DSPnumber[m]-1][j]=trk1->DSPped_par[m][j];            ctrk.crc_hc[trk1->DSPnumber[m]-1]=trk1->crc_hcal[m];
239          ctrk.dspsig[trk1->DSPnumber[m]-1][j]=trk1->DSPsig_par[m][j];            for (Int_t j = 0; j < 3072; j++){
240          ctrk.dspbad[trk1->DSPnumber[m]-1][j]=trk1->DSPbad_par[m][j];              ctrk.dspped[trk1->DSPnumber[m]-1][j]=trk1->DSPped_par[m][j];
241        };              ctrk.dspsig[trk1->DSPnumber[m]-1][j]=trk1->DSPsig_par[m][j];
242                ctrk.dspbad[trk1->DSPnumber[m]-1][j]=trk1->DSPbad_par[m][j];
243              };
244            }
245          }
246        ph = eh2->GetPscuHeader();        ph = eh2->GetPscuHeader();
247        FOBT[1]= ph->GetOrbitalTime();        FOBT[1]= ph->GetOrbitalTime();
248        ctrk.daqmode[trk2->DSPnumber[m]-1]=trk2->DAQmode[m];        if(trk2->DSPnumber[m]>0){
249        ctrk.dspnum[trk2->DSPnumber[m]-1]=trk2->DSPnumber[m];          if(trk2->DSPnumber[m]<13){
250        ctrk.calibnum[trk2->DSPnumber[m]-1]=trk2->calibnumber[m];            ctrk.daqmode[trk2->DSPnumber[m]-1]=trk2->DAQmode[m];
251        ctrk.ncalev[trk2->DSPnumber[m]-1]=trk2->ncalib_event[m];            ctrk.dspnum[trk2->DSPnumber[m]-1]=trk2->DSPnumber[m];
252        ctrk.ped1[trk2->DSPnumber[m]-1]=trk2->ped_l1[m];            ctrk.calibnum[trk2->DSPnumber[m]-1]=trk2->calibnumber[m];
253        ctrk.ped2[trk2->DSPnumber[m]-1]=trk2->ped_l2[m];            ctrk.ncalev[trk2->DSPnumber[m]-1]=trk2->ncalib_event[m];
254        ctrk.ped3[trk2->DSPnumber[m]-1]=trk2->ped_l3[m];            ctrk.ped1[trk2->DSPnumber[m]-1]=trk2->ped_l1[m];
255        ctrk.sig1[trk2->DSPnumber[m]-1]=trk2->sig_l1[m];            ctrk.ped2[trk2->DSPnumber[m]-1]=trk2->ped_l2[m];
256        ctrk.sig2[trk2->DSPnumber[m]-1]=trk2->sig_l2[m];            ctrk.ped3[trk2->DSPnumber[m]-1]=trk2->ped_l3[m];
257        ctrk.sig3[trk2->DSPnumber[m]-1]=trk2->sig_l3[m];            ctrk.sig1[trk2->DSPnumber[m]-1]=trk2->sig_l1[m];
258        ctrk.nbad1[trk2->DSPnumber[m]-1]=trk2->nbad_l1[m];            ctrk.sig2[trk2->DSPnumber[m]-1]=trk2->sig_l2[m];
259        ctrk.nbad2[trk2->DSPnumber[m]-1]=trk2->nbad_l2[m];            ctrk.sig3[trk2->DSPnumber[m]-1]=trk2->sig_l3[m];
260        ctrk.nbad3[trk2->DSPnumber[m]-1]=trk2->nbad_l3[m];            ctrk.nbad1[trk2->DSPnumber[m]-1]=trk2->nbad_l1[m];
261        ctrk.calfl[trk2->DSPnumber[m]-1]=trk2->cal_flag[m];            ctrk.nbad2[trk2->DSPnumber[m]-1]=trk2->nbad_l2[m];
262        ctrk.crc_c[trk1->DSPnumber[m]-1][0]=trk2->crc_cal[m][0];            ctrk.nbad3[trk2->DSPnumber[m]-1]=trk2->nbad_l3[m];
263        ctrk.crc_c[trk1->DSPnumber[m]-1][1]=trk2->crc_cal[m][1];            ctrk.calfl[trk2->DSPnumber[m]-1]=trk2->cal_flag[m];
264        ctrk.crc_c[trk1->DSPnumber[m]-1][2]=trk2->crc_cal[m][2];            ctrk.crc_c[trk1->DSPnumber[m]-1][0]=trk2->crc_cal[m][0];
265        ctrk.crc_hc[trk1->DSPnumber[m]-1]=trk2->crc_hcal[m];            ctrk.crc_c[trk1->DSPnumber[m]-1][1]=trk2->crc_cal[m][1];
266        for (Int_t j = 0; j < 3072; j++){            ctrk.crc_c[trk1->DSPnumber[m]-1][2]=trk2->crc_cal[m][2];
267          ctrk.dspped[trk2->DSPnumber[m]-1][j]=trk2->DSPped_par[m][j];            ctrk.crc_hc[trk1->DSPnumber[m]-1]=trk2->crc_hcal[m];
268          ctrk.dspsig[trk2->DSPnumber[m]-1][j]=trk2->DSPsig_par[m][j];            for (Int_t j = 0; j < 3072; j++){
269          ctrk.dspbad[trk2->DSPnumber[m]-1][j]=trk2->DSPbad_par[m][j];              ctrk.dspped[trk2->DSPnumber[m]-1][j]=trk2->DSPped_par[m][j];
270                ctrk.dspsig[trk2->DSPnumber[m]-1][j]=trk2->DSPsig_par[m][j];
271                ctrk.dspbad[trk2->DSPnumber[m]-1][j]=trk2->DSPbad_par[m][j];
272              }
273            }
274        }        }
275      }      }
276                                
277    
278      //      //
279      // other variables definitions      // other variables definitions
280    
281      Int_t risposta=0;      Int_t risposta=0;
282      stringstream fromfile;      stringstream fromfile,isfile;
283    
284      fromfile<<"FTrkCalibQLook_EXPERT      File: "<<ffile<<"        -- CalibHeader OBT= "<<HOBT[(cod->Get(pctp->CalibHeader))-1]<<" -- Calib pkt OBT= "<<FOBT[0]<<" -- CalibTrailer OBT= "<<TOBT[(cod->Get(pctp->CalibTrailer))]<<" --";      fromfile<<"FTrkCalibQLook_EXPERT      File: "<<ffile<<"        -- CalibHeader OBT= "<<HOBT[(cod->Get(pctp->CalibHeader))-1]<<" -- Calib pkt OBT= "<<FOBT[0]<<" -- CalibTrailer OBT= "<<TOBT[(cod->Get(pctp->CalibTrailer))]<<" --";
285            
# Line 296  void FTrkCalibQLook_EXPERT(TString file, Line 309  void FTrkCalibQLook_EXPERT(TString file,
309      Int_t canvasy=900;      Int_t canvasy=900;
310      TCanvas *c1 = new TCanvas("c1","FTrkCalibQLook_EXPERT_ped",canvasx,canvasy);      TCanvas *c1 = new TCanvas("c1","FTrkCalibQLook_EXPERT_ped",canvasx,canvasy);
311      c1->SetFillColor(10);      c1->SetFillColor(10);
312      tzz->DrawLatex(.01,0.98,fromfile.str().c_str());      tzz->DrawLatex(.01,.98,fromfile.str().c_str());
313      tzz->DrawLatex(.90,0.98,"PEDESTAL");      tzz->DrawLatex(.90,.98,"PEDESTAL");
314        
315        isfile<<"Chips with white line at least once showed anomalous behaviour";
316        tzz->SetTextColor(17);
317        tzz->SetTextSize(0.018);
318        tzz->DrawLatex(.01,.96,isfile.str().c_str());
319        isfile.str("");
320    
321        isfile<<"Boxes so colored point out anomalous chips (not necessarily broken)";
322        tzz->SetTextColor(107);
323        //    tzz->DrawLatex(.05,.96,isfile.str().c_str());
324        isfile.str("");
325    
326      TCanvas *c2 = new TCanvas("c2","FTrkCalibQLook_EXPERT_sig",canvasx,canvasy);      TCanvas *c2 = new TCanvas("c2","FTrkCalibQLook_EXPERT_sig",canvasx,canvasy);
327      c2->SetFillColor(10);      c2->SetFillColor(10);
328      tzz->DrawLatex(.01,0.98,fromfile.str().c_str());      tzz->SetTextColor(1);
329      tzz->DrawLatex(.90,0.98,"SIGMA");      tzz->DrawLatex(.01,.98,fromfile.str().c_str());
330        tzz->DrawLatex(.90,.98,"SIGMA");
331        
332        isfile<<"Chips with white line at least once showed anomalous behaviour";
333        tzz->SetTextColor(17);
334        tzz->SetTextSize(0.018);
335        tzz->DrawLatex(.01,.96,isfile.str().c_str());
336        isfile.str("");
337    
338        isfile<<"Boxes so colored point out anomalous chips (not necessarily broken)";
339        tzz->SetTextColor(107);
340        //    tzz->DrawLatex(.05,.96,isfile.str().c_str());
341        isfile.str("");
342    
343        
344      TCanvas *sig=new TCanvas("sig","FTrkCalibQLook_EXPERT_histosig",canvasx,canvasy);      TCanvas *sig=new TCanvas("sig","FTrkCalibQLook_EXPERT_histosig",canvasx,canvasy);
345      sig->SetFillColor(10);      sig->SetFillColor(10);
346      tzz->DrawLatex(.01,0.98,fromfile.str().c_str());      tzz->SetTextColor(1);
347      tzz->DrawLatex(.85,0.97,"Histograms of the sigmas");      tzz->DrawLatex(.01,.98,fromfile.str().c_str());
348        tzz->DrawLatex(.85,.97,"Histograms of the sigmas");
349            
350    
351    
# Line 410  void FTrkCalibQLook_EXPERT(TString file, Line 448  void FTrkCalibQLook_EXPERT(TString file,
448      for(Int_t n = 0; n<12; n++){      for(Int_t n = 0; n<12; n++){
449        if(ctrk.ncalev[n]==0 && ctrk.calfl[n]==0)calok = 1;//GOOD        if(ctrk.ncalev[n]==0 && ctrk.calfl[n]==0)calok = 1;//GOOD
450            
451                if(ctrk.dspnum[n]==0)
452            continue;
453    
454        nn=ctrk.dspnum[n]-1;        nn=ctrk.dspnum[n]-1;
455        /*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*        /*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*
456         *         *
# Line 483  void FTrkCalibQLook_EXPERT(TString file, Line 523  void FTrkCalibQLook_EXPERT(TString file,
523        /******************************************************/        /******************************************************/
524        /* fill histos */        /* fill histos */
525        for(Int_t j = 0; j < 3072; j++){        for(Int_t j = 0; j < 3072; j++){
526          histosig[nn]->Fill((Float_t)j,ctrk.dspsig[nn][j]);          histosig[nn]->Fill(j,ctrk.dspsig[n][j]);
527          histoped[nn]->Fill((Float_t)j,ctrk.dspped[nn][j]);          histoped[nn]->Fill(j,ctrk.dspped[n][j]);
528          if(j<1024) histosiglad[nn][0]->Fill(ctrk.dspsig[nn][j]);          if(j<1024) histosiglad[nn][0]->Fill(ctrk.dspsig[n][j]);
529          if(j>=1024 && j<2048) histosiglad[nn][1]->Fill(ctrk.dspsig[nn][j]);          if(j>=1024 && j<2048) histosiglad[nn][1]->Fill(ctrk.dspsig[n][j]);
530          if(j>=2048 && j<3072) histosiglad[nn][2]->Fill(ctrk.dspsig[nn][j]);          if(j>=2048 && j<3072) histosiglad[nn][2]->Fill(ctrk.dspsig[n][j]);
531        };        };
532        histoasig[nn]->Fill(1,ctrk.sig1[nn]);        histoasig[nn]->Fill(1,ctrk.sig1[n]);
533        histoasig[nn]->Fill(1025,ctrk.sig2[nn]);        histoasig[nn]->Fill(1025,ctrk.sig2[n]);
534        histoasig[nn]->Fill(2049,ctrk.sig3[nn]);        histoasig[nn]->Fill(2049,ctrk.sig3[n]);
535        histoaped[nn]->Fill(1,ctrk.ped1[nn]);        histoaped[nn]->Fill(1,ctrk.ped1[nn]);
536        histoaped[nn]->Fill(1025,ctrk.ped2[nn]);        histoaped[nn]->Fill(1025,ctrk.ped2[n]);
537        histoaped[nn]->Fill(2049,ctrk.ped3[nn]);        histoaped[nn]->Fill(2049,ctrk.ped3[n]);
538        /******************************************************/        /******************************************************/
539                    
540        TLine li;        TLine li,liva1;
541        li.SetLineColor(38);        li.SetLineColor(38);
542        li.SetLineStyle(3);        li.SetLineStyle(4);
543        li.SetLineWidth(2);        li.SetLineWidth(2);
544                liva1.SetLineColor(42);
545        Float_t maxhist=0;        liva1.SetLineStyle(3);
546          liva1.SetLineWidth(1);
547    
548          Float_t maxhist=0,va1x=0,minhist=0.;
549        TBox b;        TBox b;
550        /* plot PEDESTAL */        /* plot PEDESTAL */
551        c1->cd();        c1->cd();
# Line 521  void FTrkCalibQLook_EXPERT(TString file, Line 564  void FTrkCalibQLook_EXPERT(TString file,
564        if((nn+1)%2==0)  histoped[nn]->GetYaxis()->SetRangeUser(700,1700);        if((nn+1)%2==0)  histoped[nn]->GetYaxis()->SetRangeUser(700,1700);
565        histoaped[nn]->SetLineColor(5);        histoaped[nn]->SetLineColor(5);
566        histoaped[nn]->SetLineWidth(1);        histoaped[nn]->SetLineWidth(1);
567        if(ctrk.good0[0]==1 && ctrk.good0[1]==1){        //       if(ctrk.good0[0]==1 && ctrk.good0[1]==1){
568          histoped[nn]->Draw("b");        histoped[nn]->Draw("b");
569          if(nn==1){        maxhist=histoped[nn]->GetMaximum();
570            maxhist=histoped[nn]->GetMaximum();        if(nn%2==0) minhist=2200;
571            b.SetFillColor(6);        else minhist=700;
572            b.SetFillStyle(3945);        b.SetFillColor(19);
573            b.DrawBox(2944.,700.,3060.,maxhist);        b.SetFillStyle(3954);
574          if(nn==0){
575            b.SetFillColor(107);          b.DrawBox(0.,minhist,2047.,maxhist);
576            b.SetFillStyle(3954);        }
577            b.DrawBox(2816.,700.,2944.,maxhist);        else if(nn==1){
578            b.DrawBox(2048.,700.,2176.,maxhist);          b.DrawBox(128.,minhist,256.,maxhist);
579          }          b.DrawBox(384.,minhist,512.,maxhist);
580          else if(nn==4){          b.DrawBox(896.,minhist,1024.,maxhist);
581            maxhist=histoped[nn]->GetMaximum();          b.DrawBox(2048.,minhist,2432.,maxhist);
582            b.SetFillColor(107);          b.DrawBox(2816.,minhist,2944.,maxhist);
583            b.SetFillStyle(3954);          b.DrawBox(2944.,minhist,3070.,maxhist);
584            b.DrawBox(384.,2200.,512.,maxhist);        }
585          }        else if(nn==3){
586          else if(nn==6){          b.DrawBox(0.,minhist,256.,maxhist);
587            maxhist=histoped[nn]->GetMaximum();          b.DrawBox(2816.,minhist,3070.,maxhist);
588            b.SetFillColor(6);        }
589            b.SetFillStyle(3945);        else if(nn==4){
590            b.DrawBox(2560.,2200.,2816.,maxhist);          b.DrawBox(256.,minhist,512.,maxhist);
591            b.DrawBox(1024.,2200.,1792.,maxhist);          b.DrawBox(1792.,minhist,1920.,maxhist);
592                      b.DrawBox(2816.,minhist,3070.,maxhist);
593            b.SetFillColor(107);        }
594            b.SetFillStyle(3954);        else if(nn==5){
595            b.DrawBox(512.,2200.,768.,maxhist);          b.DrawBox(0.,minhist,256.,maxhist);
596          }          b.DrawBox(896.,minhist,1024.,maxhist);
597          else if(nn==7){          b.DrawBox(1664.,minhist,1792.,maxhist);      
           maxhist=histoped[nn]->GetMaximum();  
           b.SetFillColor(107);  
           b.SetFillStyle(3954);  
           b.DrawBox(512.,700.,768.,maxhist);  
         }  
         else if(nn==11){  
           maxhist=histoped[nn]->GetMaximum();  
           b.SetFillColor(6);  
           b.SetFillStyle(3945);  
           b.DrawBox(768.,700.,1024.,maxhist);  
             
           b.SetFillColor(107);  
           b.SetFillStyle(3954);  
           b.DrawBox(0.,700.,512.,maxhist);  
           b.DrawBox(1920.,700.,2048.,maxhist);  
         }  
598        }        }
599        else histoped[nn]->Draw("axis");        else if(nn==6){
600            b.DrawBox(512.,minhist,768.,maxhist);
601            b.DrawBox(1024.,minhist,1280.,maxhist);
602            b.DrawBox(1280.,minhist,1792.,maxhist);
603            b.DrawBox(2560.,minhist,2816.,maxhist);
604          }
605          else if(nn==7){
606            b.DrawBox(0.,minhist,1535.,maxhist);
607            b.DrawBox(2024.,minhist,2280.,maxhist);
608          }
609          else if(nn==8){
610            b.DrawBox(512.,minhist,768.,maxhist);
611          }
612          else if(nn==9){
613            b.DrawBox(0.,minhist,128.,maxhist);
614            b.DrawBox(256.,minhist,384.,maxhist);
615            b.DrawBox(512.,minhist,640.,maxhist);
616            b.DrawBox(896.,minhist,1152.,maxhist);
617            b.DrawBox(1280.,minhist,1535.,maxhist);
618            b.DrawBox(1664.,minhist,1920.,maxhist);
619            b.DrawBox(2048.,minhist,2304.,maxhist);
620          }
621          else if(nn==10){
622            b.DrawBox(0.,minhist,512.,maxhist);
623            b.DrawBox(1024.,minhist,3070.,maxhist);
624          }
625          else if(nn==11){
626            b.DrawBox(0.,minhist,512.,maxhist);
627            b.DrawBox(768.,minhist,1024.,maxhist);
628            b.DrawBox(1536.,minhist,1664.,maxhist);
629            b.DrawBox(1920.,minhist,2560.,maxhist);
630            b.DrawBox(2816.,minhist,3070.,maxhist);
631          }                                                    
632          //     }
633          //       else histoped[nn]->Draw("axis");
634        histoaped[nn]->Draw("same");        histoaped[nn]->Draw("same");
635        if((nn+1)%2==1) {        if((nn+1)%2==1) {
636          li.DrawLine(1024.5,2200,1024.5,3200);          for(int va=1; va<24; va++){
637          li.DrawLine(2048.5,2200,2048.5,3200);            va1x=128*va;
638              liva1.DrawLine(va1x,2200.,va1x,3200.);
639            }
640            li.DrawLine(1024.5,2200.,1024.5,3200.);
641            li.DrawLine(2048.5,2200.,2048.5,3200.);
642        }        }
643        if((nn+1)%2==0) {        if((nn+1)%2==0) {
644            for(int va=1; va<24; va++){
645              va1x=128*va;
646              liva1.DrawLine(va1x,700.,va1x,1700.);
647            }
648          li.DrawLine(1024.5,700,1024.5,1700);          li.DrawLine(1024.5,700,1024.5,1700);
649          li.DrawLine(2048.5,700,2048.5,1700);          li.DrawLine(2048.5,700,2048.5,1700);
650        }        }
651          c1->Update();//draw pads in canvas
652                
653    
654                
# Line 601  void FTrkCalibQLook_EXPERT(TString file, Line 671  void FTrkCalibQLook_EXPERT(TString file,
671        histosig[nn]->GetYaxis()->CenterTitle();        histosig[nn]->GetYaxis()->CenterTitle();
672        histoasig[nn]->SetLineColor(5);        histoasig[nn]->SetLineColor(5);
673        histoasig[nn]->SetLineWidth(1);        histoasig[nn]->SetLineWidth(1);
674        if(ctrk.good0[0]==1 && ctrk.good0[1]==1){        //      if(ctrk.good0[0]==1 && ctrk.good0[1]==1){
675          histosig[nn]->Draw("b");        histosig[nn]->Draw("b");
676          if(nn==1){        maxhist=histosig[nn]->GetMaximum();
677            maxhist=histosig[nn]->GetMaximum();        minhist=0.;
678            b.SetFillColor(6);        b.SetFillColor(19);
679            b.SetFillStyle(3945);        b.SetFillStyle(3945);
680            b.DrawBox(2944.,0.,3060.,maxhist);        if(nn==0){
681            b.DrawBox(0.,minhist,2047.,maxhist);
682            b.SetFillColor(107);        }
683            b.SetFillStyle(3954);        else if(nn==1){
684            b.DrawBox(2816.,0.,2944.,maxhist);          b.DrawBox(128.,minhist,256.,maxhist);
685            b.DrawBox(2048.,0.,2176.,maxhist);          b.DrawBox(384.,minhist,512.,maxhist);
686          }          b.DrawBox(896.,minhist,1024.,maxhist);
687          else if(nn==4){          b.DrawBox(2048.,minhist,2432.,maxhist);
688            maxhist=histosig[nn]->GetMaximum();          b.DrawBox(2816.,minhist,2944.,maxhist);
689            b.SetFillColor(107);          b.DrawBox(2944.,minhist,3070.,maxhist);
           b.SetFillStyle(3954);  
           b.DrawBox(384.,0.,512.,maxhist);  
         }  
         else if(nn==6){  
           maxhist=histosig[nn]->GetMaximum();  
           b.SetFillColor(6);  
           b.SetFillStyle(3945);  
           b.DrawBox(2560.,0.,2816.,maxhist);  
           b.DrawBox(1024.,0.,1792.,maxhist);  
             
           b.SetFillColor(107);  
           b.SetFillStyle(3954);  
           b.DrawBox(512.,0.,768.,maxhist);  
         }  
         else if(nn==7){  
           maxhist=histosig[nn]->GetMaximum();  
           b.SetFillColor(107);  
           b.SetFillStyle(3954);  
           b.DrawBox(512.,0.,768.,maxhist);  
         }  
         else if(nn==11){  
           maxhist=histosig[nn]->GetMaximum();  
           b.SetFillColor(6);  
           b.SetFillStyle(3945);  
           b.DrawBox(768.,0.,1024.,maxhist);  
             
           b.SetFillColor(107);  
           b.SetFillStyle(3954);  
           b.DrawBox(0.,0.,512.,maxhist);  
           b.DrawBox(1920.,0.,2048.,maxhist);  
         }  
690        }        }
691        else histosig[nn]->Draw("axis");        else if(nn==3){
692            b.DrawBox(0.,minhist,256.,maxhist);
693            b.DrawBox(2816.,minhist,3070.,maxhist);
694          }
695          else if(nn==4){
696            b.DrawBox(256.,minhist,512.,maxhist);
697            b.DrawBox(1792.,minhist,1920.,maxhist);
698            b.DrawBox(2816.,minhist,3070.,maxhist);
699          }
700          else if(nn==5){
701            b.DrawBox(0.,minhist,256.,maxhist);
702            b.DrawBox(896.,minhist,1024.,maxhist);
703            b.DrawBox(1664.,minhist,1792.,maxhist);      
704          }
705          else if(nn==6){
706            b.DrawBox(512.,minhist,768.,maxhist);
707            b.DrawBox(1024.,minhist,1280.,maxhist);
708            b.DrawBox(1280.,minhist,1792.,maxhist);
709            b.DrawBox(2560.,minhist,2816.,maxhist);
710          }
711          else if(nn==7){
712            b.DrawBox(0.,minhist,1535.,maxhist);
713            b.DrawBox(2024.,minhist,2280.,maxhist);
714          }
715          else if(nn==8){
716            b.DrawBox(512.,minhist,768.,maxhist);
717          }
718          else if(nn==9){
719            b.DrawBox(0.,minhist,128.,maxhist);
720            b.DrawBox(256.,minhist,384.,maxhist);
721            b.DrawBox(512.,minhist,640.,maxhist);
722            b.DrawBox(896.,minhist,1152.,maxhist);
723            b.DrawBox(1280.,minhist,1535.,maxhist);
724            b.DrawBox(1664.,minhist,1920.,maxhist);
725            b.DrawBox(2048.,minhist,2304.,maxhist);
726          }
727          else if(nn==10){
728            b.DrawBox(0.,minhist,512.,maxhist);
729            b.DrawBox(1024.,minhist,3070.,maxhist);
730          }
731          else if(nn==11){
732            b.DrawBox(0.,minhist,512.,maxhist);
733            b.DrawBox(768.,minhist,1024.,maxhist);
734            b.DrawBox(1536.,minhist,1664.,maxhist);
735            b.DrawBox(1920.,minhist,2560.,maxhist);
736            b.DrawBox(2816.,minhist,3070.,maxhist);
737          }                        
738          //       }
739          //       else histosig[nn]->Draw("axis");
740        histoasig[nn]->Draw("same");        histoasig[nn]->Draw("same");
741          for(int va=1; va<24; va++){
742            va1x=128*va;
743            liva1.DrawLine(va1x,0.,va1x,max);
744          }
745        li.DrawLine(1024.5,0,1024.5,max);        li.DrawLine(1024.5,0,1024.5,max);
746        li.DrawLine(2048.5,0,2048.5,max);        li.DrawLine(2048.5,0,2048.5,max);
747          c2->Update();//draw pads in canvas
748                
749        for(int ii=0;ii<3;ii++){        for(int ii=0;ii<3;ii++){
750          sig->cd();          sig->cd();
# Line 667  void FTrkCalibQLook_EXPERT(TString file, Line 759  void FTrkCalibQLook_EXPERT(TString file,
759          histosiglad[nn][ii]->GetXaxis()->SetTitle("SIG (ADC channels)");          histosiglad[nn][ii]->GetXaxis()->SetTitle("SIG (ADC channels)");
760          histosiglad[nn][ii]->GetXaxis()->CenterTitle();          histosiglad[nn][ii]->GetXaxis()->CenterTitle();
761          histosiglad[nn][ii]->Draw("");            histosiglad[nn][ii]->Draw("");  
762        }        }
763              
764      };//end loop on views      };//end loop on views
765      c1->Update();//draw pads in canvas      c1->Update();//draw pads in canvas
766      c2->Update();//draw pads in canvas      c2->Update();//draw pads in canvas

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.33

  ViewVC Help
Powered by ViewVC 1.1.23