Changeset 2983


Ignore:
Timestamp:
01/30/04 14:27:46 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2982 r2983  
    3939   * manalysis/MPedestalCam.cc, manalysis/MPedCalcPedRun.cc:
    4040     - include storage of number of used FADC slices to compare later
    41        the pedestal per slice ( and sigma per slice_
     41       the pedestal per slice ( and sigma per slice)
     42     - return relative differences in GetPixelContent
    4243
    4344   * mcalib/MCalibrationCalc.[h,cc]
  • trunk/MagicSoft/Mars/macros/calibration.C

    r2974 r2983  
    9595    MHCamera dispped7   (geomcam, "MPedestalPix;SigmaErr", "Fitted Error of Sigma per Slice");
    9696    MHCamera dispped8   (geomcam, "MPedestalPix;Prob", "Probability of Fit");
    97     MHCamera dispped9   (geomcam, "MPedestalPix;DeltaPedestalMean", "Pedestal minus Fitted Mean per Slice");
    98     MHCamera dispped10  (geomcam, "MPedestalPix;DeltaPedestalMeanError", "Pedestal minus Fitted Mean (Error)");
    99     MHCamera dispped11  (geomcam, "MPedestalPix;DeltaRmsSigma", "Pedestal RMS minus Fitted Sigma per Slice");
    100     MHCamera dispped12  (geomcam, "MPedestalPix;DeltaRmsSigmaError", "Pedestal RMS minus Fitted Sigma (Error)");
     97    MHCamera dispped9   (geomcam, "MPedestalPix;DeltaPedestalMean", "Rel. Diff. Mean per Slice (Calc.-Fitte)");
     98    MHCamera dispped11  (geomcam, "MPedestalPix;DeltaPedestalMeanError", "Rel. Diff. Mean Error per Slice (Calc.-Fitted)");
     99    MHCamera dispped12  (geomcam, "MPedestalPix;DeltaRmsSigma", "Rel. Diff. RMS per Slice (Calc.-Fitted)");
     100    MHCamera dispped14  (geomcam, "MPedestalPix;DeltaRmsSigmaError", "Rel. Diff. RMS Error per Slice (Calc.-Fitted)");
    101101
    102102    dispped0.SetCamContent(pedcam, 0);
     
    115115    dispped9.SetCamContent(pedcam, 9);
    116116    dispped9.SetCamError(pedcam, 10);
    117     dispped10.SetCamContent(pedcam, 10);
    118117    dispped11.SetCamContent(pedcam, 11);
    119     dispped11.SetCamError(pedcam, 12);
    120118    dispped12.SetCamContent(pedcam, 12);
    121 
    122     dispped0.SetYTitle("Pedestal per slice [FADC counts]");
    123     dispped1.SetYTitle("Pedestal Error per slice [FADC counts]");
    124     dispped2.SetYTitle("Pedestal RMS per slice [FADC counts]");
    125     dispped3.SetYTitle("Pedestal RMS Error per slice [FADC counts]");
    126     dispped4.SetYTitle("Mean Pedestal per slice [FADC counts]");
    127     dispped5.SetYTitle("Error of Mean Pedestal per slice [FADC counts]");
    128     dispped6.SetYTitle("Sigma Pedestal per slice [FADC counts]");
    129     dispped7.SetYTitle("Error of Sigma Pedestal per slice [FADC counts]");
     119    dispped12.SetCamError(pedcam, 13);
     120    dispped14.SetCamContent(pedcam, 14);
     121
     122    dispped0.SetYTitle("Calc. Pedestal per slice [FADC counts]");
     123    dispped1.SetYTitle("Calc. Pedestal Error per slice [FADC counts]");
     124    dispped2.SetYTitle("Calc. Pedestal RMS per slice [FADC counts]");
     125    dispped3.SetYTitle("Calc. Pedestal RMS Error per slice [FADC counts]");
     126    dispped4.SetYTitle("Fitted Mean per slice [FADC counts]");
     127    dispped5.SetYTitle("Error of Fitted Mean per slice [FADC counts]");
     128    dispped6.SetYTitle("Fitted Sigma per slice [FADC counts]");
     129    dispped7.SetYTitle("Error of Fitted Sigma per slice [FADC counts]");
    130130    dispped8.SetYTitle("Fit Probability [1]");
    131     dispped9.SetYTitle("Pedestal-Mean per slice [FADC counts]");
    132     dispped10.SetYTitle("Pedestal-Mean Error per slice [FADC counts]");
    133     dispped11.SetYTitle("RMS-Sigma per slice [FADC counts]");
    134     dispped12.SetYTitle("RMS-Sigma Error per slice [FADC counts]");
     131    dispped9.SetYTitle("Rel. Diff. Pedestal Calc.-Fitted per slice [1]");
     132    dispped11.SetYTitle("Rel. Diff. Pedestal Error Calc.-Fitted per slice [1]");
     133    dispped12.SetYTitle("Rel. Diff. Pedestal RMS Calc.-Fitted per slice [1]");
     134    dispped14.SetYTitle("Rel. Diff. Pedestal RMS Error Calc.-Fitted per slice [1]");
    135135
    136136    gStyle->SetOptStat(1111);
     
    138138   
    139139    // Histogram values
    140     TCanvas &b1 = d1->AddTab("Pedestals");
     140    TCanvas &b1 = d1->AddTab("Direct Calculation");
    141141    b1.Divide(4,3);
    142142
    143143    CamDraw(b1,dispped0,pedcam,1,4,0);
    144     CamDraw(b1,dispped1,pedcam,2,4,1);
    145     CamDraw(b1,dispped2,pedcam,3,4,1);
    146     CamDraw(b1,dispped3,pedcam,4,4,1);
     144    CamDraw(b1,dispped1,pedcam,2,4,2);
     145    CamDraw(b1,dispped2,pedcam,3,4,2);
     146    CamDraw(b1,dispped3,pedcam,4,4,2);
    147147
    148148    // Fitted values
    149     TCanvas &b2 = d1->AddTab("Means");
     149    TCanvas &b2 = d1->AddTab("Fits");
    150150    b2.Divide(4,3);
    151151
     
    163163
    164164    // Differences
    165     TCanvas &c4 = d1->AddTab("Differences");
     165    TCanvas &c4 = d1->AddTab("Relative Difference Calculation-Fits");
    166166    c4.Divide(4,3);
    167167
    168168    CamDraw(c4,dispped9,pedcam,1,4,1);
    169     CamDraw(c4,dispped10,pedcam,2,4,1);
    170     CamDraw(c4,dispped11,pedcam,3,4,1);
    171     CamDraw(c4,dispped12,pedcam,4,4,1);
     169    CamDraw(c4,dispped11,pedcam,2,4,1);
     170    CamDraw(c4,dispped12,pedcam,3,4,1);
     171    CamDraw(c4,dispped14,pedcam,4,4,1);
    172172
    173173    //
     
    247247    MCalibrationBlindPix *bp = calcam.GetBlindPixel();
    248248    //    bp->ChangeFitFunc(MHCalibrationBlindPixel::kEPolya);
    249     bp->ChangeFitFunc(MHCalibrationBlindPixel::kEPoisson5);
     249    //    bp->ChangeFitFunc(MHCalibrationBlindPixel::kEPoisson4);
    250250
    251251    tlist2.AddToList(&read2);
  • trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc

    r2970 r2983  
    193193    return kFALSE;
    194194
    195   const Float_t pederr   = (*this)[idx].GetPedestalRms()/TMath::Sqrt((Float_t)fNumTotSlices);
    196   const Float_t rmserr   = (*this)[idx].GetPedestalRms()/TMath::Sqrt((Float_t)fNumTotSlices/2.);
     195  const Float_t ped      = (*this)[idx].GetPedestal();
     196  const Float_t rms      = (*this)[idx].GetPedestalRms();
     197
     198  const Float_t pederr   = rms/TMath::Sqrt((Float_t)fNumTotSlices);
     199  const Float_t rmserr   = rms/TMath::Sqrt((Float_t)fNumTotSlices/2.);
    197200
    198201  const Float_t mean     = (*this)[idx].GetMean()     / (Float_t)fNumExtractSlices;
     
    204207    {
    205208    case 0:
    206       val = (*this)[idx].GetPedestal();
     209      val = ped;
    207210      break;
    208211    case 1:
     
    210213      break;
    211214    case 2:
    212       val = (*this)[idx].GetPedestalRms();
     215      val = rms;
    213216      break;
    214217    case 3:
     
    247250    case 9:
    248251      //      if ((*this)[idx].IsFitValid())
    249       val = ((*this)[idx].GetPedestal()-mean);
     252      val = 2.*(ped-mean)/(ped+mean);
    250253        //      else
    251254        //        return kFALSE;
    252255      break;
    253256    case 10:
    254       val = TMath::Sqrt(pederr*pederr + meanerr*meanerr);
     257      val = TMath::Sqrt((pederr*pederr + meanerr*meanerr) * (ped*ped + mean*mean))
     258            *2./(ped+mean)/(ped+mean);
    255259      break;
    256260    case 11:
    257       val = (*this)[idx].GetPedestalRms()-sigma;
     261      val = 2.*(pederr - meanerr)/(pederr + meanerr);
    258262      break;
    259263    case 12:
    260       val = TMath::Sqrt(rmserr*rmserr + sigmaerr*sigmaerr);
     264      val = 2.*(rms-sigma)/(rms+sigma);
     265      break;
     266    case 13:
     267      val = TMath::Sqrt((rmserr*rmserr + sigmaerr*sigmaerr) * (rms*rms + sigma*sigma))
     268            *2./(rms+sigma)/(rms+sigma);
     269      break;
     270    case 14:
     271      //      if ((*this)[idx].IsFitValid())
     272      val = 2.*(rmserr - sigmaerr)/(rmserr + sigmaerr);
     273              //      else
     274        //        return kFALSE;
    261275      break;
    262276    default:
Note: See TracChangeset for help on using the changeset viewer.