--- quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx 2006/05/10 10:06:54 1.1 +++ quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx 2006/06/05 14:23:29 1.4 @@ -70,12 +70,13 @@ // // obtain information about the data file and select the output dir const string filepath=file.Data(); - Int_t dwpos = filepath.rfind("DW_"); - Int_t dwpos1 = filepath.find(".root"); + Int_t dwpos = filepath.rfind("/"); + Int_t dwpos1 = filepath.rfind(".root"); TString fpath=(filepath.c_str()); TString base,ffile; stringcopy(base,fpath,0,dwpos); - stringcopy(ffile,fpath,dwpos,dwpos1); + stringcopy(ffile,fpath,dwpos+1,dwpos1); + if(dwpos>0) base+="/"; TString out; if(outdir.Length()==0){ @@ -306,13 +307,13 @@ TH1F *histoasig[12]; //histos of sigma TH1F *histoaped[12]; //histos of pedestals - Double_t posy = 0.95; // up y-coord - top pads - Double_t hpad = 0.15; // pad height - Double_t posx1=0; // left x-coord - pad column - Double_t posx2=0; // right x-coord - pad olumn - Double_t posx0=0; // x-coord - column division - Double_t wrel = 0.6; // relative x size of first sub-column - Double_t marg = 0.004; // margin among pads + Float_t posy = 0.95; // up y-coord - top pads + Float_t hpad = 0.15; // pad height + Float_t posx1=0; // left x-coord - pad column + Float_t posx2=0; // right x-coord - pad olumn + Float_t posx0=0; // x-coord - column division + Float_t wrel = 0.6; // relative x size of first sub-column + Float_t marg = 0.004; // margin among pads stringstream title; stringstream hid; @@ -335,20 +336,20 @@ /* -----------> HISTOGRAMS */ /* calibration parameters */ title<<"DSP "<cd(); trkpadtext[nn]->Draw(); @@ -466,25 +470,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 +522,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