--- quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx 2007/05/28 10:27:51 1.29 +++ quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx 2014/01/17 15:10:39 1.33 @@ -2,7 +2,7 @@ * FTrkCalibQLookExpert.cxx * * autor: D.Fedele - * version v1r27 + * version v1r28 * Parameters: * file - the data file to analyze * step - select =1 in order to analyze one event at time @@ -23,6 +23,10 @@ #include #include #include +#include +#include +#include +#include // #include #include @@ -30,7 +34,7 @@ #include // -typedef struct caltrk_def{ +struct caltrk_def{ Int_t good0[2]; Int_t daqmode[12]; Int_t dspnum[12]; @@ -275,7 +279,7 @@ // other variables definitions Int_t risposta=0; - stringstream fromfile; + stringstream fromfile,isfile; fromfile<<"FTrkCalibQLook_EXPERT File: "<SetFillColor(10); - tzz->DrawLatex(.01,0.98,fromfile.str().c_str()); - tzz->DrawLatex(.90,0.98,"PEDESTAL"); + tzz->DrawLatex(.01,.98,fromfile.str().c_str()); + tzz->DrawLatex(.90,.98,"PEDESTAL"); + + isfile<<"Chips with white line at least once showed anomalous behaviour"; + tzz->SetTextColor(17); + tzz->SetTextSize(0.018); + tzz->DrawLatex(.01,.96,isfile.str().c_str()); + isfile.str(""); + + isfile<<"Boxes so colored point out anomalous chips (not necessarily broken)"; + tzz->SetTextColor(107); + // tzz->DrawLatex(.05,.96,isfile.str().c_str()); + isfile.str(""); + TCanvas *c2 = new TCanvas("c2","FTrkCalibQLook_EXPERT_sig",canvasx,canvasy); c2->SetFillColor(10); - tzz->DrawLatex(.01,0.98,fromfile.str().c_str()); - tzz->DrawLatex(.90,0.98,"SIGMA"); + tzz->SetTextColor(1); + tzz->DrawLatex(.01,.98,fromfile.str().c_str()); + tzz->DrawLatex(.90,.98,"SIGMA"); + + isfile<<"Chips with white line at least once showed anomalous behaviour"; + tzz->SetTextColor(17); + tzz->SetTextSize(0.018); + tzz->DrawLatex(.01,.96,isfile.str().c_str()); + isfile.str(""); + + isfile<<"Boxes so colored point out anomalous chips (not necessarily broken)"; + tzz->SetTextColor(107); + // tzz->DrawLatex(.05,.96,isfile.str().c_str()); + isfile.str(""); TCanvas *sig=new TCanvas("sig","FTrkCalibQLook_EXPERT_histosig",canvasx,canvasy); sig->SetFillColor(10); - tzz->DrawLatex(.01,0.98,fromfile.str().c_str()); - tzz->DrawLatex(.85,0.97,"Histograms of the sigmas"); + tzz->SetTextColor(1); + tzz->DrawLatex(.01,.98,fromfile.str().c_str()); + tzz->DrawLatex(.85,.97,"Histograms of the sigmas"); @@ -516,7 +545,7 @@ liva1.SetLineStyle(3); liva1.SetLineWidth(1); - Float_t maxhist=0,va1x=0; + Float_t maxhist=0,va1x=0,minhist=0.; TBox b; /* plot PEDESTAL */ c1->cd(); @@ -535,92 +564,73 @@ 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"); - 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); - } - else if(nn==3){ - b.SetFillColor(107); - b.SetFillStyle(3954); - b.DrawBox(2816.,700.,3070.,maxhist); - } - else if(nn==4){ - b.SetFillColor(107); - b.SetFillStyle(3954); - 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){ - b.SetFillColor(107); - b.SetFillStyle(3954); - b.DrawBox(512.,2200.,768.,maxhist); - b.DrawBox(1024.,2200.,1280.,maxhist); - b.DrawBox(1280.,2200.,1792.,maxhist); - b.DrawBox(2560.,2200.,2816.,maxhist); - } - else if(nn==7){ - 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){ - b.SetFillColor(107); - b.SetFillStyle(3954); - b.DrawBox(0.,700.,128.,maxhist); - b.DrawBox(256.,700.,384.,maxhist); - b.DrawBox(512.,700.,640.,maxhist); - b.DrawBox(896.,700.,1024.,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(0.,2200.,256.,maxhist); - b.DrawBox(1024.,2200.,1152.,maxhist); - b.DrawBox(1768.,2200.,3070.,maxhist); - } - else if(nn==11){ - b.SetFillColor(6); - b.SetFillStyle(3945); - b.DrawBox(768.,700.,1024.,maxhist); - - b.SetFillColor(107); - b.SetFillStyle(3954); - b.DrawBox(0.,700.,512.,maxhist); - b.DrawBox(1920.,700.,2560.,maxhist); - b.DrawBox(2816.,700.,3070.,maxhist); - } -// } -// else histoped[nn]->Draw("axis"); + // if(ctrk.good0[0]==1 && ctrk.good0[1]==1){ + histoped[nn]->Draw("b"); + maxhist=histoped[nn]->GetMaximum(); + if(nn%2==0) minhist=2200; + else minhist=700; + b.SetFillColor(19); + b.SetFillStyle(3954); + if(nn==0){ + b.DrawBox(0.,minhist,2047.,maxhist); + } + else if(nn==1){ + b.DrawBox(128.,minhist,256.,maxhist); + b.DrawBox(384.,minhist,512.,maxhist); + b.DrawBox(896.,minhist,1024.,maxhist); + b.DrawBox(2048.,minhist,2432.,maxhist); + b.DrawBox(2816.,minhist,2944.,maxhist); + b.DrawBox(2944.,minhist,3070.,maxhist); + } + else if(nn==3){ + b.DrawBox(0.,minhist,256.,maxhist); + b.DrawBox(2816.,minhist,3070.,maxhist); + } + else if(nn==4){ + b.DrawBox(256.,minhist,512.,maxhist); + b.DrawBox(1792.,minhist,1920.,maxhist); + b.DrawBox(2816.,minhist,3070.,maxhist); + } + else if(nn==5){ + b.DrawBox(0.,minhist,256.,maxhist); + b.DrawBox(896.,minhist,1024.,maxhist); + b.DrawBox(1664.,minhist,1792.,maxhist); + } + else if(nn==6){ + b.DrawBox(512.,minhist,768.,maxhist); + b.DrawBox(1024.,minhist,1280.,maxhist); + b.DrawBox(1280.,minhist,1792.,maxhist); + b.DrawBox(2560.,minhist,2816.,maxhist); + } + else if(nn==7){ + b.DrawBox(0.,minhist,1535.,maxhist); + b.DrawBox(2024.,minhist,2280.,maxhist); + } + else if(nn==8){ + b.DrawBox(512.,minhist,768.,maxhist); + } + else if(nn==9){ + b.DrawBox(0.,minhist,128.,maxhist); + b.DrawBox(256.,minhist,384.,maxhist); + b.DrawBox(512.,minhist,640.,maxhist); + b.DrawBox(896.,minhist,1152.,maxhist); + b.DrawBox(1280.,minhist,1535.,maxhist); + b.DrawBox(1664.,minhist,1920.,maxhist); + b.DrawBox(2048.,minhist,2304.,maxhist); + } + else if(nn==10){ + b.DrawBox(0.,minhist,512.,maxhist); + b.DrawBox(1024.,minhist,3070.,maxhist); + } + else if(nn==11){ + b.DrawBox(0.,minhist,512.,maxhist); + b.DrawBox(768.,minhist,1024.,maxhist); + b.DrawBox(1536.,minhist,1664.,maxhist); + b.DrawBox(1920.,minhist,2560.,maxhist); + b.DrawBox(2816.,minhist,3070.,maxhist); + } + // } + // else histoped[nn]->Draw("axis"); histoaped[nn]->Draw("same"); if((nn+1)%2==1) { for(int va=1; va<24; va++){ @@ -661,92 +671,72 @@ 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"); - 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.,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); - } - else if(nn==3){ - b.SetFillColor(107); - b.SetFillStyle(3954); - b.DrawBox(2816.,0.,3070.,maxhist); - } - else if(nn==4){ - b.SetFillColor(107); - b.SetFillStyle(3954); - 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){ - b.SetFillColor(107); - b.SetFillStyle(3954); - b.DrawBox(512.,0.,768.,maxhist); - b.DrawBox(1024.,0.,1280.,maxhist); - b.DrawBox(1280.,0.,1792.,maxhist); - b.DrawBox(2560.,0.,2816.,maxhist); - } - else if(nn==7){ - 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){ - b.SetFillColor(107); - b.SetFillStyle(3954); - b.DrawBox(0.,0.,128.,maxhist); - b.DrawBox(256.,0.,384.,maxhist); - b.DrawBox(512.,0.,640.,maxhist); - b.DrawBox(896.,0.,1024.,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(0.,0.,256.,maxhist); - b.DrawBox(1024.,0.,1152.,maxhist); - b.DrawBox(1768.,0.,3070.,maxhist); - } - else if(nn==11){ - b.SetFillColor(6); - b.SetFillStyle(3945); - b.DrawBox(768.,0.,1024.,maxhist); - - b.SetFillColor(107); - b.SetFillStyle(3954); - b.DrawBox(0.,0.,512.,maxhist); - b.DrawBox(1920.,0.,2560.,maxhist); - b.DrawBox(2816.,0.,3070.,maxhist); - } -// } -// else histosig[nn]->Draw("axis"); + // if(ctrk.good0[0]==1 && ctrk.good0[1]==1){ + histosig[nn]->Draw("b"); + maxhist=histosig[nn]->GetMaximum(); + minhist=0.; + b.SetFillColor(19); + b.SetFillStyle(3945); + if(nn==0){ + b.DrawBox(0.,minhist,2047.,maxhist); + } + else if(nn==1){ + b.DrawBox(128.,minhist,256.,maxhist); + b.DrawBox(384.,minhist,512.,maxhist); + b.DrawBox(896.,minhist,1024.,maxhist); + b.DrawBox(2048.,minhist,2432.,maxhist); + b.DrawBox(2816.,minhist,2944.,maxhist); + b.DrawBox(2944.,minhist,3070.,maxhist); + } + else if(nn==3){ + b.DrawBox(0.,minhist,256.,maxhist); + b.DrawBox(2816.,minhist,3070.,maxhist); + } + else if(nn==4){ + b.DrawBox(256.,minhist,512.,maxhist); + b.DrawBox(1792.,minhist,1920.,maxhist); + b.DrawBox(2816.,minhist,3070.,maxhist); + } + else if(nn==5){ + b.DrawBox(0.,minhist,256.,maxhist); + b.DrawBox(896.,minhist,1024.,maxhist); + b.DrawBox(1664.,minhist,1792.,maxhist); + } + else if(nn==6){ + b.DrawBox(512.,minhist,768.,maxhist); + b.DrawBox(1024.,minhist,1280.,maxhist); + b.DrawBox(1280.,minhist,1792.,maxhist); + b.DrawBox(2560.,minhist,2816.,maxhist); + } + else if(nn==7){ + b.DrawBox(0.,minhist,1535.,maxhist); + b.DrawBox(2024.,minhist,2280.,maxhist); + } + else if(nn==8){ + b.DrawBox(512.,minhist,768.,maxhist); + } + else if(nn==9){ + b.DrawBox(0.,minhist,128.,maxhist); + b.DrawBox(256.,minhist,384.,maxhist); + b.DrawBox(512.,minhist,640.,maxhist); + b.DrawBox(896.,minhist,1152.,maxhist); + b.DrawBox(1280.,minhist,1535.,maxhist); + b.DrawBox(1664.,minhist,1920.,maxhist); + b.DrawBox(2048.,minhist,2304.,maxhist); + } + else if(nn==10){ + b.DrawBox(0.,minhist,512.,maxhist); + b.DrawBox(1024.,minhist,3070.,maxhist); + } + else if(nn==11){ + b.DrawBox(0.,minhist,512.,maxhist); + b.DrawBox(768.,minhist,1024.,maxhist); + b.DrawBox(1536.,minhist,1664.,maxhist); + b.DrawBox(1920.,minhist,2560.,maxhist); + b.DrawBox(2816.,minhist,3070.,maxhist); + } + // } + // else histosig[nn]->Draw("axis"); histoasig[nn]->Draw("same"); for(int va=1; va<24; va++){ va1x=128*va;