--- quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx 2006/10/02 13:05:39 1.15 +++ quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx 2006/10/30 17:45:36 1.18 @@ -2,7 +2,7 @@ * FTrkCalibQLookExpert.cxx * * autor: D.Fedele - * version v1r13 + * version v1r16 * Parameters: * file - the data file to analyze * step - select =1 in order to analyze one event at time @@ -418,7 +418,9 @@ for(Int_t n = 0; n<12; n++){ if(ctrk.ncalev[n]==0 && ctrk.calfl[n]==0)calok = 1;//GOOD - + if(ctrk.dspnum[n]==0) + continue; + nn=ctrk.dspnum[n]-1; /*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.* * @@ -491,18 +493,18 @@ /******************************************************/ /* fill histos */ for(Int_t j = 0; j < 3072; j++){ - histosig[nn]->Fill((Float_t)j,ctrk.dspsig[nn][j]); - histoped[nn]->Fill((Float_t)j,ctrk.dspped[nn][j]); - if(j<1024) histosiglad[nn][0]->Fill(ctrk.dspsig[nn][j]); - if(j>=1024 && j<2048) histosiglad[nn][1]->Fill(ctrk.dspsig[nn][j]); - if(j>=2048 && j<3072) histosiglad[nn][2]->Fill(ctrk.dspsig[nn][j]); + histosig[nn]->Fill(j,ctrk.dspsig[n][j]); + histoped[nn]->Fill(j,ctrk.dspped[n][j]); + if(j<1024) histosiglad[nn][0]->Fill(ctrk.dspsig[n][j]); + if(j>=1024 && j<2048) histosiglad[nn][1]->Fill(ctrk.dspsig[n][j]); + if(j>=2048 && j<3072) histosiglad[nn][2]->Fill(ctrk.dspsig[n][j]); }; - histoasig[nn]->Fill(1,ctrk.sig1[nn]); - histoasig[nn]->Fill(1025,ctrk.sig2[nn]); - histoasig[nn]->Fill(2049,ctrk.sig3[nn]); + histoasig[nn]->Fill(1,ctrk.sig1[n]); + histoasig[nn]->Fill(1025,ctrk.sig2[n]); + histoasig[nn]->Fill(2049,ctrk.sig3[n]); histoaped[nn]->Fill(1,ctrk.ped1[nn]); - histoaped[nn]->Fill(1025,ctrk.ped2[nn]); - histoaped[nn]->Fill(2049,ctrk.ped3[nn]); + histoaped[nn]->Fill(1025,ctrk.ped2[n]); + histoaped[nn]->Fill(2049,ctrk.ped3[n]); /******************************************************/ TLine li; @@ -529,9 +531,15 @@ if((nn+1)%2==0) histoped[nn]->GetYaxis()->SetRangeUser(700,1700); histoaped[nn]->SetLineColor(5); histoaped[nn]->SetLineWidth(1); - if(ctrk.good0[0]==1 && ctrk.good0[1]==1){ +// if(ctrk.good0[0]==1 && ctrk.good0[1]==1){ histoped[nn]->Draw("b"); - if(nn==1){ + if(nn==0){ + maxhist=histoped[nn]->GetMaximum(); + b.SetFillColor(107); + b.SetFillStyle(3945); + b.DrawBox(768.,700.,2047.,maxhist); + } + else if(nn==1){ maxhist=histoped[nn]->GetMaximum(); b.SetFillColor(6); b.SetFillStyle(3945); @@ -581,11 +589,10 @@ b.SetFillColor(107); b.SetFillStyle(3954); b.DrawBox(0.,700.,512.,maxhist); - b.DrawBox(1920.,700.,2048.,maxhist); - b.DrawBox(2176.,700.,2304.,maxhist); + b.DrawBox(1920.,700.,2560.,maxhist); } - } - else histoped[nn]->Draw("axis"); + // } +// else histoped[nn]->Draw("axis"); histoaped[nn]->Draw("same"); if((nn+1)%2==1) { li.DrawLine(1024.5,2200,1024.5,3200); @@ -595,6 +602,7 @@ li.DrawLine(1024.5,700,1024.5,1700); li.DrawLine(2048.5,700,2048.5,1700); } + c1->Update();//draw pads in canvas @@ -617,9 +625,15 @@ histosig[nn]->GetYaxis()->CenterTitle(); histoasig[nn]->SetLineColor(5); histoasig[nn]->SetLineWidth(1); - if(ctrk.good0[0]==1 && ctrk.good0[1]==1){ +// if(ctrk.good0[0]==1 && ctrk.good0[1]==1){ histosig[nn]->Draw("b"); - if(nn==1){ + if(nn==0){ + maxhist=histosig[nn]->GetMaximum(); + b.SetFillColor(107); + b.SetFillStyle(3945); + b.DrawBox(768.,0.,2047.,maxhist); + } + else if(nn==1){ maxhist=histosig[nn]->GetMaximum(); b.SetFillColor(6); b.SetFillStyle(3945); @@ -669,11 +683,10 @@ b.SetFillColor(107); b.SetFillStyle(3954); b.DrawBox(0.,0.,512.,maxhist); - b.DrawBox(1920.,0.,2048.,maxhist); - b.DrawBox(2176.,0.,2304.,maxhist); + b.DrawBox(1920.,0.,2560.,maxhist); } - } - else histosig[nn]->Draw("axis"); +// } +// else histosig[nn]->Draw("axis"); histoasig[nn]->Draw("same"); li.DrawLine(1024.5,0,1024.5,max); li.DrawLine(2048.5,0,2048.5,max); @@ -691,8 +704,8 @@ histosiglad[nn][ii]->GetXaxis()->SetTitle("SIG (ADC channels)"); histosiglad[nn][ii]->GetXaxis()->CenterTitle(); histosiglad[nn][ii]->Draw(""); - } - + } + };//end loop on views c1->Update();//draw pads in canvas c2->Update();//draw pads in canvas