Ignore:
Timestamp:
03/19/04 16:56:19 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc

    r3511 r3551  
    6262// =============================================
    6363//
    64 // 9: Number of Photo-electrons obtained with the F-Factor method
     64//  9: Number of Photo-electrons obtained with the F-Factor method
    6565// 10: Error on Number of Photo-electrons obtained with the F-Factor method
    6666// 11: Mean conversion factor obtained with the F-Factor method
     
    6868// 13: Overall F-Factor of the readout obtained with the F-Factor method
    6969// 14: Error on Overall F-Factor of the readout obtained with the F-Factor method
    70 // 15: Number of Photons inside Plexiglass obtained with the Blind Pixel method
    71 // 16: Error on Number of Photons inside Plexiglass obtained with the Blind Pixel method
    72 // 17: Mean conversion factor obtained with the Blind Pixel method
    73 // 18: Error on the mean conversion factor obtained with the Blind Pixel method
    74 // 19: Overall F-Factor of the readout obtained with the Blind Pixel method
    75 // 20: Error on Overall F-Factor of the readout obtained with the Blind Pixel method
    76 // 21: Number of Photons outside Plexiglass obtained with the PIN Diode method
    77 // 22: Error on Number of Photons outside Plexiglass obtained with the PIN Diode method
    78 // 23: Mean conversion factor obtained with the PIN Diode method
    79 // 24: Error on the mean conversion factor obtained with the PIN Diode method
    80 // 25: Overall F-Factor of the readout obtained with the PIN Diode method
    81 // 26: Error on Overall F-Factor of the readout obtained with the PIN Diode method
     70// 15: Pixels with valid calibration by the F-Factor-Method
     71// 16: Mean conversion factor obtained with the Blind Pixel method
     72// 17: Error on the mean conversion factor obtained with the Blind Pixel method
     73// 18: Overall F-Factor of the readout obtained with the Blind Pixel method
     74// 19: Error on Overall F-Factor of the readout obtained with the Blind Pixel method
     75// 20: Pixels with valid calibration by the Blind Pixel-Method
     76// 21: Mean conversion factor obtained with the PIN Diode method
     77// 22: Error on the mean conversion factor obtained with the PIN Diode method
     78// 23: Overall F-Factor of the readout obtained with the PIN Diode method
     79// 24: Error on Overall F-Factor of the readout obtained with the PIN Diode method
     80// 25: Pixels with valid calibration by the PIN Diode-Method
    8281//
    8382// Localized defects:
    8483// ==================
    8584//
    86 // 27: Excluded Pixels
    87 // 28: Pixels where the fit did not succeed --> results obtained only from the histograms
    88 // 29: Number of probable pickup events in the Hi Gain
    89 // 30: Number of probable pickup events in the Lo Gain
     85// 26: Excluded Pixels
     86// 27: Pixels where the fit did not succeed --> results obtained only from the histograms
     87// 28: Number of probable pickup events in the Hi Gain
     88// 29: Number of probable pickup events in the Lo Gain
    9089//
    9190// Other classifications of pixels:
    9291// ================================
    9392//
    94 // 31: Pixels with saturated Hi-Gain
    95 //
    96 // Classification of validity of the calibrations:
    97 // ===============================================
    98 //
    99 // 32: Pixels with valid calibration by the F-Factor-Method
    100 // 33: Pixels with valid calibration by the Blind Pixel-Method
    101 // 34: Pixels with valid calibration by the PIN Diode-Method
     93// 30: Pixels with saturated Hi-Gain
    10294//
    10395// Used Pedestals:
    10496// ===============
    10597//
    106 // 35: Mean Pedestal over the entire range of signal extraction
    107 // 36: Error on the Mean Pedestal over the entire range of signal extraction
    108 // 37: Pedestal RMS over the entire range of signal extraction
    109 // 38: Error on the Pedestal RMS over the entire range of signal extraction
     98// 31: Mean Pedestal over the entire range of signal extraction
     99// 32: Error on the Mean Pedestal over the entire range of signal extraction
     100// 33: Pedestal RMS over the entire range of signal extraction
     101// 34: Error on the Pedestal RMS over the entire range of signal extraction
    110102//
    111103// Calculated absolute arrival times (very low precision!):
    112104// ========================================================
    113105//
    114 // 39: Absolute Arrival time of the signal
    115 // 40: RMS of the Absolute Arrival time of the signal
     106// 35: Absolute Arrival time of the signal
     107// 36: RMS of the Absolute Arrival time of the signal
    116108//
    117109/////////////////////////////////////////////////////////////////////////////
     
    422414// 8: Error of Reduced Sigma per Charge
    423415//
     416// Useful variables derived from the fit results:
     417// =============================================
     418//
     419// 4: Returned probability of Gauss fit to Charge distribution
     420// 5: Reduced Sigma of fitted Charge --> sqrt(sigma_Q^2 - PedRMS^2)
     421// 6: Error Reduced Sigma of fitted Charge
     422// 7: Reduced Sigma per Charge
     423// 8: Error of Reduced Sigma per Charge
     424//
    424425// Results of the different calibration methods:
    425426// =============================================
    426427//
    427 // 9: Number of Photo-electrons obtained with the F-Factor method
     428//  9: Number of Photo-electrons obtained with the F-Factor method
    428429// 10: Error on Number of Photo-electrons obtained with the F-Factor method
    429430// 11: Mean conversion factor obtained with the F-Factor method
     
    431432// 13: Overall F-Factor of the readout obtained with the F-Factor method
    432433// 14: Error on Overall F-Factor of the readout obtained with the F-Factor method
    433 // 15: Number of Photons inside Plexiglass obtained with the Blind Pixel method
    434 // 16: Error on Number of Photons inside Plexiglass obtained with the Blind Pixel method
    435 // 17: Mean conversion factor obtained with the Blind Pixel method
    436 // 18: Error on the mean conversion factor obtained with the Blind Pixel method
    437 // 19: Overall F-Factor of the readout obtained with the Blind Pixel method
    438 // 20: Error on Overall F-Factor of the readout obtained with the Blind Pixel method
    439 // 21: Number of Photons outside Plexiglass obtained with the PIN Diode method
    440 // 22: Error on Number of Photons outside Plexiglass obtained with the PIN Diode method
    441 // 23: Mean conversion factor obtained with the PIN Diode method
    442 // 24: Error on the mean conversion factor obtained with the PIN Diode method
    443 // 25: Overall F-Factor of the readout obtained with the PIN Diode method
    444 // 26: Error on Overall F-Factor of the readout obtained with the PIN Diode method
     434// 15: Pixels with valid calibration by the F-Factor-Method
     435// 16: Mean conversion factor obtained with the Blind Pixel method
     436// 17: Error on the mean conversion factor obtained with the Blind Pixel method
     437// 18: Overall F-Factor of the readout obtained with the Blind Pixel method
     438// 19: Error on Overall F-Factor of the readout obtained with the Blind Pixel method
     439// 20: Pixels with valid calibration by the Blind Pixel-Method
     440// 21: Mean conversion factor obtained with the PIN Diode method
     441// 22: Error on the mean conversion factor obtained with the PIN Diode method
     442// 23: Overall F-Factor of the readout obtained with the PIN Diode method
     443// 24: Error on Overall F-Factor of the readout obtained with the PIN Diode method
     444// 25: Pixels with valid calibration by the PIN Diode-Method
    445445//
    446446// Localized defects:
    447447// ==================
    448448//
    449 // 27: Excluded Pixels
    450 // 28: Pixels where the fit did not succeed --> results obtained only from the histograms
    451 // 29: Number of probable pickup events in the Hi Gain
    452 // 30: Number of probable pickup events in the Lo Gain
     449// 26: Excluded Pixels
     450// 27: Pixels where the fit did not succeed --> results obtained only from the histograms
     451// 28: Number of probable pickup events in the Hi Gain
     452// 29: Number of probable pickup events in the Lo Gain
    453453//
    454454// Other classifications of pixels:
    455455// ================================
    456456//
    457 // 31: Pixels with saturated Hi-Gain
    458 //
    459 // Classification of validity of the calibrations:
    460 // ===============================================
    461 //
    462 // 32: Pixels with valid calibration by the F-Factor-Method
    463 // 33: Pixels with valid calibration by the Blind Pixel-Method
    464 // 34: Pixels with valid calibration by the PIN Diode-Method
     457// 30: Pixels with saturated Hi-Gain
    465458//
    466459// Used Pedestals:
    467460// ===============
    468461//
    469 // 35: Mean Pedestal over the entire range of signal extraction
    470 // 36: Error on the Mean Pedestal over the entire range of signal extraction
    471 // 37: Pedestal RMS over the entire range of signal extraction
    472 // 38: Error on the Pedestal RMS over the entire range of signal extraction
     462// 31: Mean Pedestal over the entire range of signal extraction
     463// 32: Error on the Mean Pedestal over the entire range of signal extraction
     464// 33: Pedestal RMS over the entire range of signal extraction
     465// 34: Error on the Pedestal RMS over the entire range of signal extraction
    473466//
    474467// Calculated absolute arrival times (very low precision!):
    475468// ========================================================
    476469//
    477 // 39: Absolute Arrival time of the signal
    478 // 40: RMS of the Absolute Arrival time of the signal
     470// 35: Absolute Arrival time of the signal
     471// 36: RMS of the Absolute Arrival time of the signal
    479472//
    480473Bool_t MCalibrationChargeCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
     
    592585      break;
    593586    case 15:
    594       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsBlindPixelMethodValid())
    595         return kFALSE;
    596       //      val = fBlindPixel->GetMeanFluxInsidePlexiglass()*area;
    597       val = 1.;
     587      if ((*this)[idx].IsExcluded())
     588        return kFALSE;
     589      if ((*this)[idx].IsFFactorMethodValid())
     590        val = 1;
     591      else
     592        return kFALSE;
    598593      break;
    599594    case 16:
    600595      if ((*this)[idx].IsExcluded() || !(*this)[idx].IsBlindPixelMethodValid())
    601596        return kFALSE;
    602       //      val = fBlindPixel->GetMeanFluxErrInsidePlexiglass()*area;
    603       val = 1.;
     597      val = (*this)[idx].GetMeanConversionBlindPixelMethod();
    604598      break;
    605599    case 17:
    606600      if ((*this)[idx].IsExcluded() || !(*this)[idx].IsBlindPixelMethodValid())
    607601        return kFALSE;
    608       val = (*this)[idx].GetMeanConversionBlindPixelMethod();
     602      val = (*this)[idx].GetConversionBlindPixelMethodErr();
    609603      break;
    610604    case 18:
    611605      if ((*this)[idx].IsExcluded() || !(*this)[idx].IsBlindPixelMethodValid())
    612606        return kFALSE;
    613       val = (*this)[idx].GetConversionBlindPixelMethodErr();
     607      val = (*this)[idx].GetTotalFFactorBlindPixelMethod();
    614608      break;
    615609    case 19:
    616610      if ((*this)[idx].IsExcluded() || !(*this)[idx].IsBlindPixelMethodValid())
    617611        return kFALSE;
    618       val = (*this)[idx].GetTotalFFactorBlindPixelMethod();
     612      val = (*this)[idx].GetTotalFFactorBlindPixelMethodErr();
    619613      break;
    620614    case 20:
    621       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsBlindPixelMethodValid())
    622         return kFALSE;
    623       val = (*this)[idx].GetTotalFFactorBlindPixelMethodErr();
     615      if ((*this)[idx].IsExcluded())
     616        return kFALSE;
     617      if ((*this)[idx].IsBlindPixelMethodValid())
     618        val = 1;
     619      else
     620        return kFALSE;
    624621      break;
    625622    case 21:
    626623      if ((*this)[idx].IsExcluded() || !(*this)[idx].IsPINDiodeMethodValid())
    627624        return kFALSE;
    628       //      val = fPINDiode->GetMeanFluxOutsidePlexiglass()*area;
    629       val = 1.;
     625      val = (*this)[idx].GetMeanConversionPINDiodeMethod();
    630626      break;
    631627    case 22:
    632628      if ((*this)[idx].IsExcluded() || !(*this)[idx].IsPINDiodeMethodValid())
    633629        return kFALSE;
    634       //      val = fPINDiode->GetMeanFluxErrOutsidePlexiglass()*area;
    635       val = 1.;
     630      val = (*this)[idx].GetConversionPINDiodeMethodErr();
    636631      break;
    637632    case 23:
    638633      if ((*this)[idx].IsExcluded() || !(*this)[idx].IsPINDiodeMethodValid())
    639634        return kFALSE;
    640       val = (*this)[idx].GetMeanConversionPINDiodeMethod();
     635      val = (*this)[idx].GetTotalFFactorPINDiodeMethod();
    641636      break;
    642637    case 24:
    643638      if ((*this)[idx].IsExcluded() || !(*this)[idx].IsPINDiodeMethodValid())
    644639        return kFALSE;
    645       val = (*this)[idx].GetConversionPINDiodeMethodErr();
     640      val = (*this)[idx].GetTotalFFactorPINDiodeMethodErr();
    646641      break;
    647642    case 25:
    648       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsPINDiodeMethodValid())
    649         return kFALSE;
    650       val = (*this)[idx].GetTotalFFactorPINDiodeMethod();
     643      if ((*this)[idx].IsExcluded())
     644        return kFALSE;
     645      if ((*this)[idx].IsPINDiodeMethodValid())
     646        val = 1;
     647      else
     648        return kFALSE;
    651649      break;
    652650    case 26:
    653       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsPINDiodeMethodValid())
    654         return kFALSE;
    655       val = (*this)[idx].GetTotalFFactorPINDiodeMethodErr();
    656       break;
    657     case 27:
    658651      if ((*this)[idx].IsExcluded())
    659652        val = 1.;
     
    661654        return kFALSE;
    662655      break;
    663     case 28:
     656    case 27:
    664657      if ((*this)[idx].IsExcluded())
    665658        return kFALSE;
     
    669662        return kFALSE;
    670663      break;
     664    case 28:
     665      if ((*this)[idx].IsExcluded())
     666        return kFALSE;
     667      val = (*this)[idx].GetHiGainNumPickup();
     668      break;
    671669    case 29:
    672670      if ((*this)[idx].IsExcluded())
    673671        return kFALSE;
    674       val = (*this)[idx].GetHiGainNumPickup();
     672      val = (*this)[idx].GetLoGainNumPickup();
    675673      break;
    676674    case 30:
    677675      if ((*this)[idx].IsExcluded())
    678676        return kFALSE;
    679       val = (*this)[idx].GetLoGainNumPickup();
     677      val = (*this)[idx].IsHiGainSaturation();
    680678      break;
    681679    case 31:
    682680      if ((*this)[idx].IsExcluded())
    683681        return kFALSE;
    684       val = (*this)[idx].IsHiGainSaturation();
     682      val = (*this)[idx].GetPed();
    685683      break;
    686684    case 32:
    687685      if ((*this)[idx].IsExcluded())
    688686        return kFALSE;
    689       if ((*this)[idx].IsFFactorMethodValid())
    690         val = 1;
    691       else
    692         return kFALSE;
     687      val = (*this)[idx].GetPedErr();
    693688      break;
    694689    case 33:
    695690      if ((*this)[idx].IsExcluded())
    696691        return kFALSE;
    697       if ((*this)[idx].IsBlindPixelMethodValid())
    698         val = 1;
    699       else
    700         return kFALSE;
     692      val = (*this)[idx].GetPedRms();
    701693      break;
    702694    case 34:
    703695      if ((*this)[idx].IsExcluded())
    704696        return kFALSE;
    705       if ((*this)[idx].IsPINDiodeMethodValid())
    706         val = 1;
    707       else
    708         return kFALSE;
     697      val = (*this)[idx].GetPedErr()/2.;
    709698      break;
    710699    case 35:
    711700      if ((*this)[idx].IsExcluded())
    712701        return kFALSE;
    713       val = (*this)[idx].GetPed();
     702      val = (*this)[idx].GetAbsTimeMean();
    714703      break;
    715704    case 36:
    716       if ((*this)[idx].IsExcluded())
    717         return kFALSE;
    718       val = (*this)[idx].GetPedErr();
    719       break;
    720     case 37:
    721       if ((*this)[idx].IsExcluded())
    722         return kFALSE;
    723       val = (*this)[idx].GetPedRms();
    724       break;
    725     case 38:
    726       if ((*this)[idx].IsExcluded())
    727         return kFALSE;
    728       val = (*this)[idx].GetPedErr()/2.;
    729       break;
    730     case 39:
    731       if ((*this)[idx].IsExcluded())
    732         return kFALSE;
    733       val = (*this)[idx].GetAbsTimeMean();
    734       break;
    735     case 40:
    736705      if ((*this)[idx].IsExcluded())
    737706        return kFALSE;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc

    r3511 r3551  
    2020!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    22 !
    2322\* ======================================================================== */
    24 
    2523/////////////////////////////////////////////////////////////////////////////
    2624//                                                                         //
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc

    r3445 r3551  
    8989const Double_t MHCalibrationChargeBlindPix::gkElectronicAmpErr   = 0.002;
    9090
    91 const Int_t    MHCalibrationChargeBlindPix::fgChargeNbins        = 1400;
    92 const Axis_t   MHCalibrationChargeBlindPix::fgChargeFirst        = -200.5;
    93 const Axis_t   MHCalibrationChargeBlindPix::fgChargeLast         = 1199.5;
     91const Int_t    MHCalibrationChargeBlindPix::fgChargeNbins        = 5300;
     92const Axis_t   MHCalibrationChargeBlindPix::fgChargeFirst        = -100.5;
     93const Axis_t   MHCalibrationChargeBlindPix::fgChargeLast         = 5199.5;
    9494
    9595const Float_t  MHCalibrationChargeBlindPix::fgSinglePheCut       = 200.;
     
    116116    SetSinglePheCut();
    117117    SetNumSinglePheLimit();
     118
     119    SetBinsAfterStripping(30);
    118120
    119121    fHGausHist.SetName("HCalibrationChargeBlindPix");
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc

    r3496 r3551  
    6565#include <TCanvas.h>
    6666#include <TPad.h>
     67#include <TText.h>
     68#include <TPaveText.h>
    6769
    6870#include "MLog.h"
     
    151153    fNumOuterPixels = 0;
    152154    fNumExcluded    = 0;
     155
     156    fAverageInnerSat            = 0;
     157    fAverageOuterSat            = 0; 
     158    fAverageInnerPixSigma       = 0.;
     159    fAverageOuterPixSigma       = 0.; 
     160    fAverageInnerPixSigmaErr    = 0.;
     161    fAverageOuterPixSigmaErr    = 0.; 
     162    fAverageInnerPixRelSigma    = 0.;
     163    fAverageOuterPixRelSigma    = 0.; 
     164    fAverageInnerPixRelSigmaErr = 0.;
     165    fAverageOuterPixRelSigmaErr = 0.; 
     166
    153167}
    154168
     
    169183  delete fAverageHiGainOuterPix;
    170184  delete fAverageLoGainOuterPix;
     185
    171186}
    172187
     
    542557    FinalizeLoGainHists(*fAverageLoGainOuterPix,*fCam->GetAverageOuterPix(),*fCam->GetAverageOuterBadPix());
    543558
    544     fCam->GetAverageInnerPix()->SetSigmaCharge   (fCam->GetAverageInnerPix()->GetSigmaCharge() 
    545                                                   *TMath::Sqrt((Float_t)fNumInnerPixels));
    546     fCam->GetAverageOuterPix()->SetSigmaCharge   (fCam->GetAverageOuterPix()->GetSigmaCharge()   
    547                                                   *TMath::Sqrt((Float_t)fNumOuterPixels));
    548     fCam->GetAverageInnerPix()->SetSigmaChargeErr(fCam->GetAverageInnerPix()->GetSigmaChargeErr()
    549                                                   *TMath::Sqrt((Float_t)fNumInnerPixels));
    550     fCam->GetAverageOuterPix()->SetSigmaChargeErr(fCam->GetAverageOuterPix()->GetSigmaChargeErr()
    551                                                   *TMath::Sqrt((Float_t)fNumOuterPixels));
    552    
     559    FinalizeAveragePix(*fCam->GetAverageInnerPix(),fNumInnerPixels,
     560                       fAverageInnerPixSigma, fAverageInnerPixSigmaErr,
     561                       fAverageInnerPixRelSigma, fAverageInnerPixRelSigmaErr,
     562                       fAverageInnerSat);
     563    FinalizeAveragePix(*fCam->GetAverageOuterPix(),fNumOuterPixels,
     564                       fAverageOuterPixSigma, fAverageOuterPixSigmaErr,
     565                       fAverageOuterPixRelSigma, fAverageOuterPixRelSigmaErr,
     566                       fAverageOuterSat);
     567
    553568    return kTRUE;
    554569}
     
    693708      }
    694709}   
     710
     711void MHCalibrationChargeCam::FinalizeAveragePix(MCalibrationChargePix &pix, Int_t npix,
     712                                                Float_t &sigma, Float_t &sigmaerr,
     713                                                Float_t &relsigma, Float_t &relsigmaerr,
     714                                                Bool_t &b)
     715{
     716
     717  if (pix.IsHiGainSaturation())
     718    b = kTRUE;
     719
     720  sigma    = pix.GetSigmaCharge    () * TMath::Sqrt((Float_t)npix);
     721  sigmaerr = pix.GetSigmaChargeErr () * TMath::Sqrt((Float_t)npix);
     722
     723  relsigma     = sigma / pix.GetMeanCharge();
     724
     725  relsigmaerr  = sigmaerr*sigmaerr / sigma / sigma;
     726  relsigmaerr += pix.GetMeanChargeErr()*pix.GetMeanChargeErr() / pix.GetMeanCharge() / pix.GetMeanCharge();
     727
     728  relsigmaerr *= relsigma;
     729  relsigmaerr  = TMath::Sqrt(relsigmaerr);
     730
     731  pix.SetSigmaCharge   (sigma);
     732  pix.SetSigmaChargeErr(sigmaerr);
     733
     734}
     735
    695736
    696737Bool_t MHCalibrationChargeCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
     
    729770  pad->cd(1);
    730771
    731   if (!fAverageHiGainInnerPix->IsEmpty())
    732     gPad->SetLogy();
    733772  fAverageHiGainInnerPix->Draw(opt);
     773 
     774  if (!fAverageInnerSat)
     775    DrawAverageSigma(fAverageInnerSat, 1,
     776                     fAverageInnerPixSigma, fAverageInnerPixSigmaErr,
     777                     fAverageInnerPixRelSigma, fAverageInnerPixRelSigmaErr);
    734778
    735779  pad->cd(2);
    736780
    737   if (!fAverageLoGainInnerPix->IsEmpty())
    738     gPad->SetLogy();
    739781  fAverageLoGainInnerPix->Draw(opt);
    740782
     783  if (fAverageInnerSat)
     784    DrawAverageSigma(fAverageInnerSat, 1,
     785                     fAverageInnerPixSigma, fAverageInnerPixSigmaErr,
     786                     fAverageInnerPixRelSigma, fAverageInnerPixRelSigmaErr);
     787
    741788  pad->cd(3);
    742789
    743   if (!fAverageHiGainOuterPix->IsEmpty())
    744     gPad->SetLogy();
    745790  fAverageHiGainOuterPix->Draw(opt);
    746791
     792  if (!fAverageOuterSat)
     793    DrawAverageSigma(fAverageOuterSat, 0,
     794                     fAverageOuterPixSigma, fAverageOuterPixSigmaErr,
     795                     fAverageOuterPixRelSigma, fAverageOuterPixRelSigmaErr);
     796
    747797  pad->cd(4);
    748798
    749   if (!fAverageLoGainOuterPix->IsEmpty())
    750     gPad->SetLogy();
    751799  fAverageLoGainOuterPix->Draw(opt);
    752800
    753 }
     801  if (fAverageOuterSat)
     802    DrawAverageSigma(fAverageOuterSat, 0,
     803                     fAverageOuterPixSigma, fAverageOuterPixSigmaErr,
     804                     fAverageOuterPixRelSigma, fAverageOuterPixRelSigmaErr);
     805}
     806
     807void MHCalibrationChargeCam::DrawAverageSigma(Bool_t sat, Bool_t inner,
     808                                              Float_t sigma, Float_t sigmaerr,
     809                                              Float_t relsigma, Float_t relsigmaerr) const
     810{
     811 
     812  if (sigma != 0)
     813    {
     814     
     815      TPad *newpad = new TPad("newpad","transparent",0,0,1,1);
     816      newpad->SetFillStyle(4000);
     817      newpad->Draw();
     818      newpad->cd();
     819     
     820      TPaveText *text = new TPaveText(sat? 0.1 : 0.35,0.7,sat ? 0.4 : 0.7,1.0);
     821      text->SetTextSize(0.07);
     822      const TString line1 = Form("%s%s%s",inner ? "Inner" : "Outer",
     823                                 " Pixels ", sat ? "Low Gain" : "High Gain");
     824      TText *txt1 = text->AddText(line1.Data());
     825      const TString line2 = Form("Sigma per Pixel: %2.2f #pm %2.2f",sigma,sigmaerr);
     826      TText *txt2 = text->AddText(line2.Data());
     827      const TString line3 = Form("Rel. Sigma per Pixel: %2.2f #pm %2.2f",relsigma,relsigmaerr);
     828      TText *txt3 = text->AddText(line3.Data());
     829      text->Draw("");
     830     
     831      text->SetBit(kCanDelete);
     832      txt1->SetBit(kCanDelete);
     833      txt2->SetBit(kCanDelete);
     834      txt3->SetBit(kCanDelete);
     835      newpad->SetBit(kCanDelete);
     836    }
     837}
     838
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h

    r3429 r3551  
    1313#endif
    1414
     15class TText;
    1516class MRawEvtData;
    1617class MGeomCam;
     
    4748  Int_t fNumExcluded;
    4849
     50  Bool_t  fAverageInnerSat;
     51  Bool_t  fAverageOuterSat; 
     52 
     53  Float_t fAverageInnerPixSigma;
     54  Float_t fAverageOuterPixSigma; 
     55 
     56  Float_t fAverageInnerPixSigmaErr;
     57  Float_t fAverageOuterPixSigmaErr; 
     58
     59  Float_t fAverageInnerPixRelSigma;
     60  Float_t fAverageOuterPixRelSigma; 
     61 
     62  Float_t fAverageInnerPixRelSigmaErr;
     63  Float_t fAverageOuterPixRelSigmaErr; 
     64
    4965  void FinalizeHiGainHists(MHCalibrationChargeHiGainPix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad);
    5066  void FinalizeLoGainHists(MHCalibrationChargeLoGainPix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad);
    51 
     67  void FinalizeAveragePix (MCalibrationChargePix &pix, Int_t npix,
     68                           Float_t &sigma, Float_t &sigmaerr,
     69                           Float_t &relsigma, Float_t &relsigmaerr,
     70                           Bool_t &b);
     71  void DrawAverageSigma(Bool_t sat, Bool_t inner,
     72                        Float_t sigma, Float_t sigmaerr,
     73                        Float_t relsigma, Float_t relsigmaerr) const;
     74 
    5275public:
    5376
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePix.cc

    r3428 r3551  
    211211  gPad->SetTicks();
    212212
     213  fHGausHist.GetXaxis()->SetLabelSize(0.06);
     214  fHGausHist.GetYaxis()->SetLabelSize(0.07);
     215  fHGausHist.GetXaxis()->SetLabelOffset(0.01);
     216  fHGausHist.GetYaxis()->SetLabelOffset(0.01);
     217  fHGausHist.GetXaxis()->SetTitleSize(0.065);
     218  fHGausHist.GetYaxis()->SetTitleSize(0.07);
     219  fHGausHist.GetXaxis()->SetTitleOffset(0.6);
     220  fHGausHist.GetYaxis()->SetTitleOffset(0.6);
    213221  fHGausHist.Draw(opt);
    214222  if (fFGausFit)
     
    220228  pad->cd(2);
    221229  gPad->SetTicks();
     230
     231  fHAbsTime.GetXaxis()->SetLabelSize(0.06);
     232  fHAbsTime.GetYaxis()->SetLabelSize(0.07);
     233  fHAbsTime.GetXaxis()->SetLabelOffset(0.01);
     234  fHAbsTime.GetYaxis()->SetLabelOffset(0.01);
     235  fHAbsTime.GetXaxis()->SetTitleSize(0.065);
     236  fHAbsTime.GetYaxis()->SetTitleSize(0.07);
     237  fHAbsTime.GetXaxis()->SetTitleOffset(0.6);
     238  fHAbsTime.GetYaxis()->SetTitleOffset(0.6);
    222239  fHAbsTime.Draw(opt);
    223240
Note: See TracChangeset for help on using the changeset viewer.