Ignore:
Timestamp:
04/04/04 14:28:25 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r3636 r3639  
    2323\* ======================================================================== */
    2424/////////////////////////////////////////////////////////////////////////////
    25 //                                                                         //
    26 // MHCalibrationRelTimeCam                                                 //
    27 //                                                                         //
     25//                                                                       
     26// MHCalibrationRelTimeCam                                               
     27//                                                                       
    2828// Fills the extracted relative arrival times of MArrivalTimeCam into
    2929// the MHGausEvents-classes MHCalibrationRelTimePix for every:
    3030//
    31 // - pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray
    32 //
    33 // - average pixel per area index (e.g. inner and outer for the MAGIC camera),
    34 //   stored in the TObjArray's MHCalibrationCam::fAverageHiGainAreas
    35 //
    36 // - average pixel per camera sector (e.g. sectors 1-6 for the MAGIC camera),
     31// - Pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray 
     32//   or MHCalibrationCam::fHiGainArray, respectively, depending if
     33//   MArrivalTimePix::IsLoGainUsed() is set.
     34//
     35// - Average pixel per AREA index (e.g. inner and outer for the MAGIC camera),
     36//   stored in the TObjArray's MHCalibrationCam::fAverageHiGainAreas and
     37//   MHCalibrationCam::fAverageHiGainAreas
     38//
     39// - Average pixel per camera SECTOR (e.g. sectors 1-6 for the MAGIC camera),
    3740//   stored in the TObjArray's MHCalibrationCam::fAverageHiGainSectors
    38 //
    39 // Every time is filled into a histogram and an array, in order to perform
     41//   and MHCalibrationCam::fAverageHiGainSectors
     42//
     43// Every relative time is calculated as the difference between the individual
     44// pixel arrival time and the one of pixel 1 (hardware number: 2).
     45// The relative times are filled into a histogram and an array, in order to perform
    4046// a Fourier analysis (see MHGausEvents). The signals are moreover averaged on an
    4147// event-by-event basis and written into the corresponding average pixels.
     
    4349// The histograms are fitted to a Gaussian, mean and sigma with its errors
    4450// and the fit probability are extracted. If none of these values are NaN's and
    45 // if the probability is bigger than fProbLimit (default: 0.5%), the fit is valid.
    46 // Otherwise, the fit is repeated within ranges of the previous mean +- 5 sigma.
     51// if the probability is bigger than MHGausEvents::fProbLimit (default: 0.5%),
     52// the fit is declared valid.
     53// Otherwise, the fit is repeated within ranges of the previous mean
     54// +- MHGausEvents::fPickupLimit (default: 5) sigma (see MHGausEvents::RepeatFit())
    4755// In case this does not make the fit valid, the histogram means and RMS's are
    48 // taken directly and the following flags are set:
     56// taken directly (see MHGausEvents::BypassFit()) and the following flags are set:
    4957// - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kRelTimeNotFitted ) and
    5058// - MBadPixelsPix::SetUnsuitable(   MBadPixelsPix::kUnreliableRun    )
    5159//
    52 // Outliers of more than MHCalibrationChargePix::fPickupLimit (default: 5) sigmas
    53 // from the mean are counted as PickUp events (stored in MHCalibrationRelTimePix::fPickup)
     60// Outliers of more than MHGausEvents::fPickupLimit (default: 5) sigmas
     61// from the mean are counted as Pickup events (stored in MHGausEvents::fPickup)
    5462//
    5563// The class also fills arrays with the signal vs. event number, creates a fourier
    56 // spectrum and investigates if the projected fourier components follow an exponential
    57 // distribution. In case that the probability of the exponential fit is less than
    58 // fProbLimit (default: 0.5%), the following flags are set:
     64// spectrum (see MHGausEvents::CreateFourierSpectrum()) and investigates if the
     65// projected fourier components follow an exponential distribution.
     66// In case that the probability of the exponential fit is less than
     67// MHGausEvents::fProbLimit (default: 0.5%), the following flags are set:
    5968// - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kRelTimeOscillating ) and
    6069// - MBadPixelsPix::SetUnsuitable(   MBadPixelsPix::kUnreliableRun      )
     
    119128// - MArrivalTimeCam
    120129//
    121 // Initializes, if empty to MArrivalTimeCam::GetSize() for:
     130// Initializes, if empty to MGeomCam::GetNumPixels():
    122131// - MHCalibrationCam::fHiGainArray, MHCalibrationCam::fLoGainArray
    123132//
     
    128137// - MHCalibrationCam::fAverageHiGainSectors, MHCalibrationCam::fAverageLoGainSectors
    129138//
    130 // Calls InitializeHists() for every entry in:
    131 // - MHCalibrationCam::fHiGainArray
    132 // - MHCalibrationCam::fAverageHiGainAreas
    133 // - MHCalibrationCam::fAverageHiGainSectors
     139// Calls MHCalibrationCam::InitHists() for every entry in:
     140// - MHCalibrationCam::fHiGainArray, MHCalibrationCam::fLoGainArray
     141// - MHCalibrationCam::fAverageHiGainAreas, MHCalibrationCam::fAverageLoGainAreas
     142// - MHCalibrationCam::fAverageHiGainSectors, MHCalibrationCam::fAverageLoGainSectors
    134143//
    135144// Sets Titles and Names for the Histograms
     
    249258
    250259
    251 //--------------------------------------------------------------------------------
     260// -------------------------------------------------------------------------------
    252261//
    253262// Retrieves pointer to MArrivalTimeCam:
     
    258267// - number of sectors
    259268//
    260 // Fill RelTimes histograms (MHGausEvents::FillHistAndArray()) with:
     269// Fills HiGain or LoGain histograms (MHGausEvents::FillHistAndArray()), respectively
     270// depending on MArrivalTimePix::IsLoGainUsed(), with:
    261271// - MArrivalTimePix::GetArrivalTime(pixid) - MArrivalTimePix::GetArrivalTime(1);
    262 //   (i.e. the time difference between pixel i and pixel 1 (hardware number: 2)
     272//   (i.e. the time difference between pixel i and pixel 1 (hardware number: 2) )
    263273//
    264274Bool_t MHCalibrationRelTimeCam::FillHists(const MParContainer *par, const Stat_t w)
     
    405415// ==============
    406416//
    407 // 0: Fitted Mean Relative Arrival Time
    408 // 1: Error of fitted Mean Relative Arrival Time
    409 // 2: Sigma of fitted Relative Arrival Time
    410 // 3: Error of Sigma of fitted Relative Arrival Time
     417// 0: Fitted Mean Relative Arrival Time              (calls: MHGausEvents::GetMean())
     418// 1: Error of fitted Mean Relative Arrival Time     (calls: MHGausEvents::GetMeanErr())
     419// 2: Sigma of fitted Relative Arrival Time          (calls: MHGausEvents::GetSigma())
     420// 3: Error of Sigma of fitted Relative Arrival Time (calls: MHGausEvents::GetSigmaErr())
    411421//
    412422//
     
    414424// =============================================
    415425//
    416 // 4: Returned probability of Gauss fit to RelTime distribution
     426// 4: Returned probability of Gauss fit              (calls: MHGausEvents::GetProb())
    417427//
    418428// Localized defects:
    419429// ==================
    420430//
    421 // 5: Gaus fit not OK
    422 // 6: Fourier spectrum not OK
     431// 5: Gaus fit not OK                               (calls: MHGausEvents::IsGausFitOK())
     432// 6: Fourier spectrum not OK                       (calls: MHGausEvents::IsFourierSpectrumOK())
    423433//
    424434Bool_t MHCalibrationRelTimeCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
     
    428438    return kFALSE;
    429439
    430   MHCalibrationRelTimePix &hist = (MHCalibrationRelTimePix&)(*this)[idx];     
    431 
    432440  switch (type)
    433441    {
    434442    case 0:
    435       val = hist.GetMean();
     443      val = (*this)[idx].GetMean();
    436444      break;
    437445    case 1:
    438       val = hist.GetMeanErr();
     446      val = (*this)[idx].GetMeanErr();
    439447      break;
    440448    case 2:
    441       val = hist.GetSigma();
     449      val = (*this)[idx].GetSigma();
    442450      break;
    443451    case 3:
    444       val = hist.GetSigmaErr();
     452      val = (*this)[idx].GetSigmaErr();
    445453      break;
    446454    case 4:
    447       val = hist.GetProb();
     455      val = (*this)[idx].GetProb();
    448456      break;
    449457    case 5:
    450       if (!hist.IsGausFitOK())
     458      if (!(*this)[idx].IsGausFitOK())
    451459        val = 1.;
    452460      break;
    453461    case 6:
    454       if (!hist.IsFourierSpectrumOK())
     462      if (!(*this)[idx].IsFourierSpectrumOK())
    455463        val = 1.;
    456464      break;
     
    461469}
    462470
     471// --------------------------------------------------------------------------
     472//
     473// Calls MHGausEvents::DrawClone() for pixel idx
     474//
    463475void MHCalibrationRelTimeCam::DrawPixelContent(Int_t idx) const
    464476{
    465   const MHCalibrationRelTimePix &hist = (MHCalibrationRelTimePix&)(*this)[idx];     
    466   hist.DrawClone();
    467 }
     477 (*this)[idx].DrawClone();
     478}
Note: See TracChangeset for help on using the changeset viewer.