--- quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx 2006/09/19 15:15:42 1.14 +++ quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx 2006/10/12 16:58:34 1.16 @@ -2,7 +2,7 @@ * FTrkCalibQLookExpert.cxx * * autor: D.Fedele - * version v1r12 + * version v1r14 * Parameters: * file - the data file to analyze * step - select =1 in order to analyze one event at time @@ -87,7 +87,7 @@ ctrk.good0[1]=0; for(Int_t i=0;i<12;i++){ ctrk.daqmode[i]=0; - ctrk.dspnum[i]=0; + ctrk.dspnum[i]=100; ctrk.calibnum[i]=0; ctrk.ncalev[i]=0; ctrk.calfl[i]=0; @@ -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]>13) + 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,7 +531,7 @@ 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){ maxhist=histoped[nn]->GetMaximum(); @@ -566,6 +568,12 @@ b.SetFillStyle(3954); b.DrawBox(512.,700.,768.,maxhist); } + else if(nn==9){ + maxhist=histoped[nn]->GetMaximum(); + b.SetFillColor(107); + b.SetFillStyle(3954); + b.DrawBox(256.,700.,384.,maxhist); + } else if(nn==11){ maxhist=histoped[nn]->GetMaximum(); b.SetFillColor(6); @@ -575,11 +583,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); @@ -589,6 +596,7 @@ li.DrawLine(1024.5,700,1024.5,1700); li.DrawLine(2048.5,700,2048.5,1700); } + c1->Update();//draw pads in canvas @@ -611,7 +619,7 @@ 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){ maxhist=histosig[nn]->GetMaximum(); @@ -648,6 +656,12 @@ 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); + } else if(nn==11){ maxhist=histosig[nn]->GetMaximum(); b.SetFillColor(6); @@ -657,11 +671,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); @@ -679,8 +692,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