- Timestamp:
- 08/16/04 17:55:36 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4634 r4636 46 46 - replace two gLog by *fLog 47 47 - add the pulser color (needed for the datacheck histograms) 48 - some modifications in the data-check display, discussed with Florian 48 49 49 50 * mjobs/MJCalibration.[h,cc] -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc
r4602 r4636 121 121 #include "MHCalibrationChargePix.h" 122 122 123 #include "MCalibrationCam.h" 124 123 125 #include "MCalibrationChargeCam.h" 124 126 #include "MCalibrationChargePix.h" … … 362 364 { 363 365 hist.GetHGausHist()->SetTitle(Form("%s%s%s","Signal averaged on event-by-event basis ", 364 j==0 ? "Inner Pixels " : "Outer Pixels "," HighGain Runs: "));366 j==0 ? "Inner Pixels " : "Outer Pixels ","Low Gain Runs: ")); 365 367 hist.InitBins(); 366 368 hist.SetEventFrequency(fPulserFrequency); … … 388 390 hist.GetHGausHist()->SetTitle("Summed FADC slices average HiGain Sector "); 389 391 hist.SetNbins(fAverageNbins); 390 hist.SetLast (2.*hist.GetLast());391 392 hist.GetHAbsTime()->SetTitle("Absolute Arrival Time average HiGain Sector "); 392 393 … … 550 551 const Int_t npix = fAverageAreaNum[j]; 551 552 553 if (npix == 0) 554 continue; 555 552 556 MHCalibrationChargePix &hipix = (MHCalibrationChargePix&)GetAverageHiGainArea(j); 553 557 MHCalibrationChargePix &lopix = (MHCalibrationChargePix&)GetAverageLoGainArea(j); … … 556 560 lopix.FillHistAndArray(sumloarea[j]/npix); 557 561 558 hipix.SetSaturated( (Float_t)sathiarea[j]/npix);559 lopix.SetSaturated( (Float_t)satloarea[j]/npix);562 hipix.SetSaturated(sathiarea[j]/npix); 563 lopix.SetSaturated(satloarea[j]/npix); 560 564 561 565 hipix.FillAbsTime(timehiarea[j]/npix); … … 569 573 const Int_t npix = fAverageSectorNum[j]; 570 574 575 if (npix == 0) 576 continue; 577 571 578 MHCalibrationChargePix &hipix = (MHCalibrationChargePix&)GetAverageHiGainSector(j); 572 579 MHCalibrationChargePix &lopix = (MHCalibrationChargePix&)GetAverageLoGainSector(j); … … 575 582 lopix.FillHistAndArray(sumlosector[j]/npix); 576 583 577 hipix.SetSaturated( (Float_t)sathisector[j]/npix);578 lopix.SetSaturated( (Float_t)satlosector[j]/npix);584 hipix.SetSaturated(sathisector[j]/npix); 585 lopix.SetSaturated(satlosector[j]/npix); 579 586 580 587 hipix.FillAbsTime(timehisector[j]/npix); … … 871 878 TVirtualPad *pad = gPad ? gPad : MH::MakeDefCanvas(this); 872 879 pad->SetBorderMode(0); 873 874 pad->Divide(2,nareas); 875 880 pad->Divide(1,nareas); 881 882 // 883 // Loop over inner and outer pixels 884 // 876 885 for (Int_t i=0; i<nareas;i++) 877 { 878 pad->cd(2*(i+1)-1); 879 MHCalibrationChargePix &hipix = (MHCalibrationChargePix&)GetAverageHiGainArea(i); 880 881 if (i==0) 882 DrawDataCheckPixel(hipix,gkHiGainInnerRefLines); 883 else 884 DrawDataCheckPixel(hipix,gkHiGainOuterRefLines); 885 886 pad->cd(2*(i+1)); 887 888 MHCalibrationChargePix &lopix = (MHCalibrationChargePix&)GetAverageLoGainArea(i); 889 890 if (i==0) 891 DrawDataCheckPixel(lopix,gkLoGainInnerRefLines); 892 else 893 DrawDataCheckPixel(lopix,gkLoGainOuterRefLines); 894 886 { 887 888 pad->cd(i+1); 889 890 MHCalibrationChargePix &hipix = (MHCalibrationChargePix&)GetAverageHiGainArea(i); 891 MHCalibrationChargePix &lopix = (MHCalibrationChargePix&)GetAverageLoGainArea(i); 892 // 893 // Ask for Hi-Gain saturation 894 // 895 if (hipix.GetSaturated() > fNumHiGainSaturationLimit*hipix.GetHGausHist()->GetEntries()) 896 DrawDataCheckPixel(lopix,i ? gkLoGainOuterRefLines : gkLoGainInnerRefLines); 897 else 898 DrawDataCheckPixel(hipix,i ? gkHiGainOuterRefLines : gkHiGainInnerRefLines); 895 899 } 896 900 } … … 928 932 929 933 for (int i=0; i<navhi; i++) 930 (*cam->fAverageHiGainAreas) [i] = (*fAverageHiGainAreas)[i]->Clone();934 (*cam->fAverageHiGainAreas) [i] = (*fAverageHiGainAreas) [i]->Clone(); 931 935 for (int i=0; i<navlo; i++) 932 (*cam->fAverageLoGainAreas) [i] = (*fAverageLoGainAreas)[i]->Clone();936 (*cam->fAverageLoGainAreas) [i] = (*fAverageLoGainAreas) [i]->Clone(); 933 937 for (int i=0; i<nsehi; i++) 934 938 (*cam->fAverageHiGainSectors)[i] = (*fAverageHiGainSectors)[i]->Clone(); … … 945 949 cam->fRunNumbers = fRunNumbers; 946 950 951 cam->fColor = fColor; 947 952 cam->fPulserFrequency = fPulserFrequency; 948 953 cam->fAverageNbins = fAverageNbins; … … 967 972 TH1F *hist = pix.GetHGausHist(); 968 973 969 970 TH2D *null = new TH2D("Null",hist->GetTitle(),100,pix.GetFirst(),pix.GetLast(), 974 TH2D *null = new TH2D("Null",hist->GetTitle(),100,pix.GetFirst() > -1. ? 0. : 100.,pix.GetLast()/2., 971 975 100,0.,hist->GetEntries()/10.); 972 976 973 977 null->SetDirectory(NULL); 974 978 null->SetBit(kCanDelete); 975 null->GetXaxis()->SetTitle(hist->GetXaxis()->GetTitle()); 976 null->GetYaxis()->SetTitle(hist->GetYaxis()->GetTitle()); 977 null->GetXaxis()->CenterTitle(); 978 null->GetYaxis()->CenterTitle(); 979 // 980 // set the labels bigger 981 // 982 TAxis *xaxe = null->GetXaxis(); 983 TAxis *yaxe = null->GetYaxis(); 984 xaxe->CenterTitle(); 985 yaxe->CenterTitle(); 986 xaxe->SetTitleSize(0.07); 987 yaxe->SetTitleSize(0.07); 988 xaxe->SetTitleOffset(0.7); 989 yaxe->SetTitleOffset(0.55); 990 xaxe->SetLabelSize(0.06); 991 yaxe->SetLabelSize(0.06); 992 993 xaxe->SetTitle(hist->GetXaxis()->GetTitle()); 994 yaxe->SetTitle(hist->GetYaxis()->GetTitle()); 979 995 null->Draw(); 980 996 hist->Draw("same"); … … 984 1000 if (pix.GetFGausFit()) 985 1001 { 986 pix.GetFGausFit()->SetLineColor(pix.IsGausFitOK() ? kGreen : kRed); 987 pix.GetFGausFit()->Draw("same"); 1002 switch ( fColor ) 1003 { 1004 case MCalibrationCam::kGREEN: 1005 pix.GetFGausFit()->SetLineColor(kGreen); 1006 break; 1007 case MCalibrationCam::kBLUE: 1008 pix.GetFGausFit()->SetLineColor(kBlue); 1009 break; 1010 case MCalibrationCam::kUV: 1011 pix.GetFGausFit()->SetLineColor(106); 1012 break; 1013 case MCalibrationCam::kCT1: 1014 pix.GetFGausFit()->SetLineColor(006); 1015 break; 1016 default: 1017 pix.GetFGausFit()->SetLineColor(kRed); 1018 } 1019 pix.GetFGausFit()->Draw("same"); 988 1020 } 989 1021 990 1022 DisplayRefLines(null,refline); 991 992 1023 993 1024 newpad->cd(2); … … 1019 1050 TLine *blue1 = new TLine(refline[1],0.,refline[1],hist->GetYaxis()->GetXmax()); 1020 1051 blue1->SetBit(kCanDelete); 1021 blue1->SetLineColor( 007);1052 blue1->SetLineColor(227); 1022 1053 blue1->SetLineStyle(2); 1023 1054 blue1->SetLineWidth(3); … … 1026 1057 TLine *blue5 = new TLine(refline[2],0.,refline[2],hist->GetYaxis()->GetXmax()); 1027 1058 blue5->SetBit(kCanDelete); 1028 blue5->SetLineColor( 062);1059 blue5->SetLineColor(68); 1029 1060 blue5->SetLineStyle(2); 1030 1061 blue5->SetLineWidth(3); … … 1033 1064 TLine *blue10 = new TLine(refline[3],0.,refline[3],hist->GetYaxis()->GetXmax()); 1034 1065 blue10->SetBit(kCanDelete); 1035 blue10->SetLineColor( 004);1066 blue10->SetLineColor(4); 1036 1067 blue10->SetLineStyle(2); 1037 1068 blue10->SetLineWidth(3); … … 1047 1078 TLine *ct1 = new TLine(refline[5],0.,refline[5],hist->GetYaxis()->GetXmax()); 1048 1079 ct1->SetBit(kCanDelete); 1049 ct1->SetLineColor( 006);1080 ct1->SetLineColor(6); 1050 1081 ct1->SetLineStyle(2); 1051 1082 ct1->SetLineWidth(3); 1052 1083 ct1->Draw(); 1053 1084 1054 TLegend *leg = new TLegend(0. 4,0.75,0.7,0.99);1085 TLegend *leg = new TLegend(0.7,0.35,0.9,0.99); 1055 1086 leg->SetBit(kCanDelete); 1056 1087 leg->AddEntry(green1,"1 Led GREEN","l"); -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePix.cc
r4582 r4636 128 128 MHGausEvents::InitBins(); 129 129 fHAbsTime.SetBins(fAbsTimeNbins,fAbsTimeFirst,fAbsTimeLast); 130 }131 132 // --------------------------------------------------------------------------133 //134 // Sets:135 // - fSaturated to 0.136 //137 // Executes:138 // - MHGausEvents::Clear()139 //140 void MHCalibrationChargePix::Clear(Option_t *o)141 {142 143 fSaturated = 0.;144 145 MHGausEvents::Clear();146 return;147 130 } 148 131 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePix.h
r4582 r4636 32 32 ~MHCalibrationChargePix() {} 33 33 34 virtual void Clear(Option_t *o="");35 34 virtual void Reset(); 36 35 virtual void InitBins(); -
trunk/MagicSoft/Mars/mcalib/MHGausEvents.cc
r4547 r4636 225 225 fSigmaErr = 0.; 226 226 fProb = 0.; 227 227 228 fSaturated = 0; 228 229 fCurrentSize = 0; 229 230 -
trunk/MagicSoft/Mars/mcalib/MHGausEvents.h
r4547 r4636 53 53 Int_t fNbins; // Number histogram bins for fHGausHist (used by InitBins()) 54 54 Int_t fNDFLimit; // NDF limit for judgement if fit is OK 55 Float_tfSaturated; // Number of events classified as saturated55 Int_t fSaturated; // Number of events classified as saturated 56 56 Double_t fSigma; // Sigma of the Gauss fit 57 57 Double_t fSigmaErr; // Error of the sigma of the Gauss fit … … 81 81 // Draws 82 82 virtual void Draw(Option_t *option=""); // Default Draw 83 void DrawEvents(); 83 void DrawEvents(); // Draw graph of fEvents 84 84 85 85 // Getters … … 136 136 const Double_t xmax=0.); // Fit the histogram HGausHist with a Gaussian 137 137 Bool_t RepeatFit(const Option_t *option="RQ0"); // Repeat fit within limits defined by fPickupLimit 138 void BypassFit();// Take mean and RMS from the histogram138 void BypassFit(); // Take mean and RMS from the histogram 139 139 140 140 // Prints … … 158 158 void SetProb ( const Double_t d ) { fProb = d; } 159 159 void SetProbLimit ( const Float_t lim=fgProbLimit ) { fProbLimit = lim; } 160 void SetSaturated ( const Float_t f ) { fSaturated += f; }160 void SetSaturated ( const Int_t i ) { fSaturated += i; } 161 161 void SetSigma ( const Double_t d ) { fSigma = d; } 162 162 void SetSigmaErr ( const Double_t d ) { fSigmaErr = d; } -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r4626 r4636 1433 1433 // As long as there are no DM's, have to colour by hand 1434 1434 // 1435 chargecam.SetColor (fColor); 1435 1436 calcalc.SetPulserColor(fColor); 1436 1437
Note:
See TracChangeset
for help on using the changeset viewer.