--- quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx 2006/05/10 10:06:54 1.1 +++ quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx 2006/06/29 11:11:59 1.6 @@ -1,8 +1,8 @@ /** - * FTrkCalibQLookExpert.cpp + * FTrkCalibQLookExpert.cxx * * autor: D.Fedele - * version 2.0 + * version v1r04 * Parameters: * file - the data file to analyze * step - select =1 in order to analyze one event at time @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -29,19 +30,7 @@ #include // - -void stringcopy(TString& s1, const TString& s2, Int_t from=0, Int_t to=0){ - if ( to == 0 ){ - Int_t t2length = s2.Length(); - s1 = ""; - to = t2length; - }; - for (Int_t i = from; i0) base=file(0,dwpos); TString out; if(outdir.Length()==0){ @@ -83,6 +71,7 @@ }else{ out = outdir; } + if(out.Last('/')+1 HISTOGRAMS */ /* calibration parameters */ title<<"DSP "<cd(); trkpadtext[nn]->Draw(); @@ -466,25 +458,42 @@ histoped[nn]->SetLineWidth(1); histoped[nn]->GetYaxis()->SetTitle("PED (ADC channels)"); histoped[nn]->GetYaxis()->CenterTitle(); - if((nn+1)%2==1) histoped[nn]->GetYaxis()->SetRangeUser(2500,3200); - if((nn+1)%2==0) histoped[nn]->GetYaxis()->SetRangeUser(1000,1700); + if((nn+1)%2==1) histoped[nn]->GetYaxis()->SetRangeUser(2200,3200); + 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) histoped[nn]->Draw("b"); + if(ctrk.good0[0]==1 && ctrk.good0[1]==1){ + histoped[nn]->Draw("b"); + if(nn==1){ + maxhist=histoped[nn]->GetMaximum(); + b.DrawBox(2816.,700.,3060.,maxhist); + } + else if(nn==6){ + maxhist=histoped[nn]->GetMaximum(); + b.DrawBox(2560.,2200.,2816.,maxhist); + b.DrawBox(512.,2200.,768.,maxhist); + b.DrawBox(1024.,2200.,1792.,maxhist); + } + else if(nn==11){ + maxhist=histoped[nn]->GetMaximum(); + b.DrawBox(768.,700.,1024.,maxhist); + } + } else histoped[nn]->Draw("axis"); histoaped[nn]->Draw("same"); if((nn+1)%2==1) { - li.DrawLine(1024.5,2500,1024.5,3200); - li.DrawLine(2048.5,2500,2048.5,3200); + li.DrawLine(1024.5,2200,1024.5,3200); + li.DrawLine(2048.5,2200,2048.5,3200); } if((nn+1)%2==0) { - li.DrawLine(1024.5,1000,1024.5,1700); - li.DrawLine(2048.5,1000,2048.5,1700); + li.DrawLine(1024.5,700,1024.5,1700); + li.DrawLine(2048.5,700,2048.5,1700); } + /* plot SIGMA */ - Double_t max=500.; + Float_t max=500.; c2->cd(); trkpadtext[nn]->Draw(); trkpad2[nn]->SetLogy(); @@ -501,12 +510,30 @@ histosig[nn]->GetYaxis()->CenterTitle(); histoasig[nn]->SetLineColor(5); histoasig[nn]->SetLineWidth(1); - if(ctrk.good0[0]==1 && ctrk.good0[1]==1) histosig[nn]->Draw("b"); + if(ctrk.good0[0]==1 && ctrk.good0[1]==1){ + histosig[nn]->Draw("b"); + if(nn==1){ + maxhist=histosig[nn]->GetMaximum(); + b.DrawBox(2816.,0.,3060.,maxhist); + } + else if(nn==6){ + maxhist=histosig[nn]->GetMaximum(); + b.DrawBox(2560.,0.,2816.,maxhist); + b.DrawBox(512.,0.,768.,maxhist); + b.DrawBox(1024.,0.,1792.,maxhist); + } + else if(nn==11){ + maxhist=histosig[nn]->GetMaximum(); + b.DrawBox(768.,0.,1024.,maxhist); + } + } 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); - + + + };//end loop on views c1->Update();//draw pads in canvas