--- quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx 2006/10/18 15:43:37 1.17 +++ quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx 2007/03/08 01:41:02 1.28 @@ -2,7 +2,7 @@ * FTrkCalibQLookExpert.cxx * * autor: D.Fedele - * version v1r15 + * version v1r26 * Parameters: * file - the data file to analyze * step - select =1 in order to analyze one event at time @@ -77,7 +77,7 @@ Int_t nevents=0; Int_t minevent = 0; Int_t maxevent = 0; - ULong64_t FOBT[2]; + ULong_t FOBT[2]; FOBT[0]=0; FOBT[1]=0; @@ -188,7 +188,7 @@ Int_t hcevent=hotr->GetEntries(); Int_t tcevent=totr->GetEntries(); - ULong64_t HOBT[hcevent], TOBT[tcevent]; + ULong_t HOBT[hcevent], TOBT[tcevent]; for (Int_t i = 0; i < hcevent; i++){ hotr->GetEntry(i); ph = eh4->GetPscuHeader(); @@ -273,6 +273,7 @@ // // other variables definitions + Int_t risposta=0; stringstream fromfile; @@ -506,13 +507,16 @@ histoaped[nn]->Fill(1025,ctrk.ped2[n]); histoaped[nn]->Fill(2049,ctrk.ped3[n]); /******************************************************/ - - TLine li; + + TLine li,liva1; li.SetLineColor(38); - li.SetLineStyle(3); + li.SetLineStyle(4); li.SetLineWidth(2); - - Float_t maxhist=0; + liva1.SetLineColor(42); + liva1.SetLineStyle(3); + liva1.SetLineWidth(1); + + Float_t maxhist=0,va1x=0; TBox b; /* plot PEDESTAL */ c1->cd(); @@ -533,49 +537,74 @@ histoaped[nn]->SetLineWidth(1); // if(ctrk.good0[0]==1 && ctrk.good0[1]==1){ histoped[nn]->Draw("b"); - if(nn==1){ - maxhist=histoped[nn]->GetMaximum(); + maxhist=histoped[nn]->GetMaximum(); + if(nn==0){ + b.SetFillColor(107); + b.SetFillStyle(3945); + b.DrawBox(256.,2200.,384.,maxhist); + b.DrawBox(768.,2200.,2047.,maxhist); + } + else if(nn==1){ b.SetFillColor(6); b.SetFillStyle(3945); b.DrawBox(2944.,700.,3060.,maxhist); b.SetFillColor(107); b.SetFillStyle(3954); + b.DrawBox(384.,700.,512.,maxhist); + b.DrawBox(2048.,700.,2432.,maxhist); b.DrawBox(2816.,700.,2944.,maxhist); - b.DrawBox(2048.,700.,2176.,maxhist); + } + else if(nn==3){ + b.SetFillColor(107); + b.SetFillStyle(3954); + b.DrawBox(2816.,700.,3070.,maxhist); } else if(nn==4){ - maxhist=histoped[nn]->GetMaximum(); b.SetFillColor(107); b.SetFillStyle(3954); - b.DrawBox(384.,2200.,512.,maxhist); + b.DrawBox(256.,2200.,512.,maxhist); + b.DrawBox(2816.,2200.,3070.,maxhist); + } + else if(nn==5){ + b.SetFillColor(107); + b.SetFillStyle(3954); + b.DrawBox(896.,700.,1024.,maxhist); } else if(nn==6){ - maxhist=histoped[nn]->GetMaximum(); - b.SetFillColor(6); - b.SetFillStyle(3945); - b.DrawBox(2560.,2200.,2816.,maxhist); - b.DrawBox(1024.,2200.,1535.,maxhist); - b.SetFillColor(107); b.SetFillStyle(3954); b.DrawBox(512.,2200.,768.,maxhist); - b.DrawBox(1536.,2200.,1792.,maxhist); + b.DrawBox(1024.,2200.,1280.,maxhist); + b.DrawBox(1280.,2200.,1792.,maxhist); + b.DrawBox(2560.,2200.,2816.,maxhist); } else if(nn==7){ - maxhist=histoped[nn]->GetMaximum(); b.SetFillColor(107); b.SetFillStyle(3954); b.DrawBox(512.,700.,768.,maxhist); + b.DrawBox(896.,700.,1535.,maxhist); + b.DrawBox(2024.,700.,2280.,maxhist); + } + else if(nn==8){ + b.SetFillColor(107); + b.SetFillStyle(3954); + b.DrawBox(512.,2200.,768.,maxhist); } else if(nn==9){ - maxhist=histoped[nn]->GetMaximum(); b.SetFillColor(107); b.SetFillStyle(3954); b.DrawBox(256.,700.,384.,maxhist); + b.DrawBox(1280.,700.,1535.,maxhist); + b.DrawBox(1792.,700.,1920.,maxhist); + } + else if(nn==10){ + b.SetFillColor(107); + b.SetFillStyle(3954); + b.DrawBox(1024.,2200.,1152.,maxhist); + b.DrawBox(2048.,2200.,3070.,maxhist); } else if(nn==11){ - maxhist=histoped[nn]->GetMaximum(); b.SetFillColor(6); b.SetFillStyle(3945); b.DrawBox(768.,700.,1024.,maxhist); @@ -589,10 +618,18 @@ // else histoped[nn]->Draw("axis"); histoaped[nn]->Draw("same"); if((nn+1)%2==1) { - li.DrawLine(1024.5,2200,1024.5,3200); - li.DrawLine(2048.5,2200,2048.5,3200); + for(int va=1; va<24; va++){ + va1x=128*va; + liva1.DrawLine(va1x,2200.,va1x,3200.); + } + li.DrawLine(1024.5,2200.,1024.5,3200.); + li.DrawLine(2048.5,2200.,2048.5,3200.); } if((nn+1)%2==0) { + for(int va=1; va<24; va++){ + va1x=128*va; + liva1.DrawLine(va1x,700.,va1x,1700.); + } li.DrawLine(1024.5,700,1024.5,1700); li.DrawLine(2048.5,700,2048.5,1700); } @@ -620,50 +657,75 @@ histoasig[nn]->SetLineColor(5); histoasig[nn]->SetLineWidth(1); // if(ctrk.good0[0]==1 && ctrk.good0[1]==1){ - histosig[nn]->Draw("b"); - if(nn==1){ - maxhist=histosig[nn]->GetMaximum(); + histosig[nn]->Draw("b"); + maxhist=histosig[nn]->GetMaximum(); + if(nn==0){ + b.SetFillColor(107); + b.SetFillStyle(3945); + b.DrawBox(256.,0.,384.,maxhist); + b.DrawBox(768.,0.,2047.,maxhist); + } + else if(nn==1){ b.SetFillColor(6); b.SetFillStyle(3945); - b.DrawBox(2944.,0.,3060.,maxhist); + b.DrawBox(2944.,0.,3070.,maxhist); b.SetFillColor(107); b.SetFillStyle(3954); + b.DrawBox(384.,0.,512.,maxhist); + b.DrawBox(2048.,0.,2432.,maxhist); b.DrawBox(2816.,0.,2944.,maxhist); - b.DrawBox(2048.,0.,2176.,maxhist); + } + else if(nn==3){ + b.SetFillColor(107); + b.SetFillStyle(3954); + b.DrawBox(2816.,0.,3070.,maxhist); } else if(nn==4){ - maxhist=histosig[nn]->GetMaximum(); b.SetFillColor(107); b.SetFillStyle(3954); - b.DrawBox(384.,0.,512.,maxhist); + b.DrawBox(256.,0.,512.,maxhist); + b.DrawBox(2816.,0.,3070.,maxhist); + } + else if(nn==5){ + b.SetFillColor(107); + b.SetFillStyle(3954); + b.DrawBox(896.,0.,1024.,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.,1535.,maxhist); - b.SetFillColor(107); b.SetFillStyle(3954); b.DrawBox(512.,0.,768.,maxhist); - b.DrawBox(1536.,0.,1792.,maxhist); + b.DrawBox(1024.,0.,1280.,maxhist); + b.DrawBox(1280.,0.,1792.,maxhist); + b.DrawBox(2560.,0.,2816.,maxhist); } else if(nn==7){ - maxhist=histosig[nn]->GetMaximum(); + b.SetFillColor(107); + b.SetFillStyle(3954); + b.DrawBox(512.,0.,768.,maxhist); + b.DrawBox(896.,0.,1535.,maxhist); + b.DrawBox(2024.,0.,2280.,maxhist); + } + else if(nn==8){ b.SetFillColor(107); b.SetFillStyle(3954); b.DrawBox(512.,0.,768.,maxhist); } else if(nn==9){ - maxhist=histosig[nn]->GetMaximum(); b.SetFillColor(107); b.SetFillStyle(3954); b.DrawBox(256.,0.,384.,maxhist); + b.DrawBox(1280.,0.,1535.,maxhist); + b.DrawBox(1792.,0.,1920.,maxhist); + } + else if(nn==10){ + b.SetFillColor(107); + b.SetFillStyle(3954); + b.DrawBox(1024.,0.,1152.,maxhist); + b.DrawBox(2048.,0.,3070.,maxhist); } else if(nn==11){ - maxhist=histosig[nn]->GetMaximum(); b.SetFillColor(6); b.SetFillStyle(3945); b.DrawBox(768.,0.,1024.,maxhist); @@ -676,8 +738,13 @@ // } // else histosig[nn]->Draw("axis"); histoasig[nn]->Draw("same"); + for(int va=1; va<24; va++){ + va1x=128*va; + liva1.DrawLine(va1x,0.,va1x,max); + } li.DrawLine(1024.5,0,1024.5,max); li.DrawLine(2048.5,0,2048.5,max); + c2->Update();//draw pads in canvas for(int ii=0;ii<3;ii++){ sig->cd();