Ignore:
Timestamp:
04/04/04 14:28:25 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
17 edited

Legend:

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

    r3637 r3639  
    2727//  MHCalibrationChargeBlindPix
    2828//
    29 //  Histogram container for the calibration Blind Pixel information
    30 //  Extracts the signal stored in MExtractedSignalBlindPixel , histograms and fits it.
    31 //  Performs the Single Photo-electron fit to extract the Poisson mean and its errors
    32 //
    33 //  Different fits can be chosen with the function ChangeFitFunc()
    34 //
    35 //  The fit result is accepted under condition that:
     29//  Histogram class for the charge calibration of the Blind Pixel.
     30//  Stores and fits the charges and stores the averaged assumed pedestal and
     31//  single-phe FADC slice entries. Charges are taken from MExtractedSignalBlindPix.
     32//  Performs the Single Photo-electron fit to extract the Poisson mean and its errors.
     33//
     34//  Different fits can be chosen with the function ChangeFitFunc().
     35//
     36//  The fit result is accepted under the condition that:
    3637//  1) the Probability is greater than fProbLimit (default 0.001 == 99.7%)
    3738//  2) at least fNumSinglePheLimit events are found in the single Photo-electron peak
     
    105106//
    106107// Sets:
    107 // - the default number for MHGausEvents::fNbins  (fgChargeNbins)
    108 // - the default number for MHGausEvents::fFirst  (fgChargeFirst)
    109 // - the default number for MHGausEvents::fLast   (fgChargeLast)
     108// - the default number for fNbins        (fgChargeNbins)
     109// - the default number for fFirst        (fgChargeFirst)
     110// - the default number for fLast         (fgChargeLast)
    110111// - the default number for fSinglePheCut (fgSingePheCut)
    111112// - the default number for fNumSinglePheLimit (fgNumSinglePheLimit)
     113// - the default number of bins after stripping (30)
    112114//
    113115// - the default name of the  fHGausHist ("HCalibrationChargeBlindPix")
     
    118120// Initializes:
    119121// - all pointers to NULL
    120 // - all variables to 0., except the fit result variables to -999.
    121 // - all flags to kFALSE
    122 // - the default Fit function to kEPoisson5
     122//
     123// Calls:
     124// - Clear()
    123125//
    124126MHCalibrationChargeBlindPix::MHCalibrationChargeBlindPix(const char *name, const char *title)
     
    130132
    131133    fName  = name  ? name  : "MHCalibrationChargeBlindPix";
    132     fTitle = title ? title : "Fill the accumulated charges and times of all Blind Pixel events and perform fits";
     134    fTitle = title ? title : "Statistics of the FADC sums of Blind Pixel calibration events";
    133135
    134136    SetNbins( fgChargeNbins );
     
    183185// - all flags to kFALSE
    184186// - all pointers to NULL
     187// - the default fit function (kEPoisson5)
    185188//
    186189// Deletes:
    187190// - all pointers unequal NULL
    188191//
    189 // Executes MHCalibrationChargePix::Clear()
     192// Calls:
     193// - MHCalibrationChargePix::Clear()
    190194//
    191195void MHCalibrationChargeBlindPix::Clear(Option_t *o)
     
    248252}
    249253
     254// --------------------------------------------------------------------------
     255//
     256// Set bit kSinglePheFitOK from outside
     257//
    250258void MHCalibrationChargeBlindPix::SetSinglePheFitOK (const Bool_t b)
    251259{
     
    253261}
    254262
     263// --------------------------------------------------------------------------
     264//
     265// Set bit kPedestalFitOK from outside
     266//
    255267void MHCalibrationChargeBlindPix::SetPedestalFitOK(const Bool_t b)
    256268{
     
    258270}
    259271
     272// --------------------------------------------------------------------------
     273//
     274// Ask for status of bit kSinglePheFitOK
     275//
    260276const Bool_t  MHCalibrationChargeBlindPix::IsSinglePheFitOK()     const
    261277{
     
    263279}
    264280
     281// --------------------------------------------------------------------------
     282//
     283// Ask for status of bit kPedestalFitOK
     284//
    265285const Bool_t  MHCalibrationChargeBlindPix::IsPedestalFitOK()  const
    266286{
     
    278298// - fAPedestalFADCSlices(0);
    279299//
    280 // Sets Binning of the fHGausHist
     300// Calls:
     301// - MHGausHist::InitBins()
    281302//
    282303Bool_t MHCalibrationChargeBlindPix::SetupFill(const MParList *pList)
     
    384405// Returns kFALSE, if empty
    385406//
    386 // - Creates the fourier spectrum and sets bit IsFourierSpectrumOK()
     407// - Creates the fourier spectrum and sets bit MHGausEvents::IsFourierSpectrumOK()
    387408// - Retrieves the pedestals from MExtractedSignalBlindPixel
    388409// - Normalizes fASinglePheFADCSlices and fAPedestalFADCSlices
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.h

    r3637 r3639  
    2727private:
    2828
    29   static const Int_t    fgChargeNbins;       //! Default for MHGausEvents::fNBins  (now set to: 5300   )
    30   static const Axis_t   fgChargeFirst;       //! Default for MHGausEvents::fFirst  (now set to: -100.5 )
    31   static const Axis_t   fgChargeLast;        //! Default for MHGausEvents::fLast   (now set to: 5199.5 )
     29  static const Int_t    fgChargeNbins;       //! Default for fNBins        (now set to: 5300   )
     30  static const Axis_t   fgChargeFirst;       //! Default for fFirst        (now set to: -100.5 )
     31  static const Axis_t   fgChargeLast;        //! Default for fLast         (now set to: 5199.5 )
    3232  static const Float_t  fgSinglePheCut;      //! Default for fSinglePheCut (now set to: 200   )
    3333  static const Float_t  fgNumSinglePheLimit; //! Default for fNumSinglePheLimit (now set to: 50  )
     
    502502
    503503 
    504   ClassDef(MHCalibrationChargeBlindPix, 1)  // Histogram class for the Calibration Blind Pixel
     504  ClassDef(MHCalibrationChargeBlindPix, 1)  // Histogram class for Charge Blind Pixel Calibration
    505505};
    506506
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc

    r3636 r3639  
    2929// MHCalibrationChargeHiGainPix and MHCalibrationChargeLoGainPix for every:
    3030//
    31 // - pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray and
     31// - Pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray and
    3232//   MHCalibrationCam::fLoGainArray
    3333//
    34 // - average pixel per area index (e.g. inner and outer for the MAGIC camera),
     34// - Average pixel per AREA index (e.g. inner and outer for the MAGIC camera),
    3535//   stored in the TObjArray's MHCalibrationCam::fAverageHiGainAreas and
    3636//   MHCalibrationCam::fAverageLoGainAreas
    3737//
    38 // - average pixel per camera sector (e.g. sectors 1-6 for the MAGIC camera),
     38// - Average pixel per camera SECTOR (e.g. sectors 1-6 for the MAGIC camera),
    3939//   stored in the TObjArray's MHCalibrationCam::fAverageHiGainSectors and
    4040//   MHCalibrationCam::fAverageLoGainSectors
    4141//
    42 // Every signal is filled into a Charge histogram and an array, in order to perform
    43 // a Fourier analysis (see MHGausEvents). The signals are moreover averaged on an
    44 // event-by-event basis and written into the corresponding average pixels
     42// Every signal is taken from MExtractedSignalCam and filled into a histogram and
     43// an array, in order to perform a Fourier analysis (see MHGausEvents).
     44// The signals are moreover averaged on an event-by-event basis and written into
     45// the corresponding average pixels.
    4546//
    4647// Additionally, the (FADC slice) position of the maximum is stored in an Absolute
     
    5051// The Charge histograms are fitted to a Gaussian, mean and sigma with its errors
    5152// and the fit probability are extracted. If none of these values are NaN's and
    52 // if the probability is bigger than fProbLimit (default: 0.5%), the fit is valid.
    53 // Otherwise, the fit is repeated within ranges of the previous mean +- 5 sigma.
     53// if the probability is bigger than MHGausEvents::fProbLimit (default: 0.5%),
     54// the fit is declared valid.
     55// Otherwise, the fit is repeated within ranges of the previous mean
     56// +- MHGausEvents::fPickupLimit (default: 5) sigma (see MHGausEvents::RepeatFit())
    5457// In case this does not make the fit valid, the histogram means and RMS's are
    55 // taken directly and the following flags are set:
     58// taken directly (see MHGausEvents::BypassFit()) and the following flags are set:
    5659// - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kHiGainNotFitted ) or 
    5760// - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kLoGainNotFitted ) and
    5861// - MBadPixelsPix::SetUnsuitable(   MBadPixelsPix::kUnreliableRun   )
    5962//
    60 // Outliers of more than MHCalibrationChargePix::fPickupLimit (default: 5) sigmas
    61 // from the mean are counted as PickUp events (stored in MHCalibrationChargePix::fPickup)
     63// Outliers of more than MHGausEvents::fPickupLimit (default: 5) sigmas
     64// from the mean are counted as Pickup events (stored in MHGausEvents::fPickup)
    6265//
    6366// Unless more than fNumHiGainSaturationLimit (default: 1%) of the overall FADC
     
    7477// spectrum and investigates if the projected fourier components follow an exponential
    7578// distribution. In case that the probability of the exponential fit is less than
    76 // fProbLimit (default: 0.5%), the following flags are set:
     79// MHGausEvents::fProbLimit (default: 0.5%), the following flags are set:
    7780// - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kHiGainOscillating ) or
    7881// - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kLoGainOscillating ) and
     
    8386// The following results are written into MCalibrationChargeCam:
    8487//
    85 // - MCalibrationChargePix::SetHiGainSaturation(Bool_t b)
    86 // - MCalibrationChargePix::SetHiGainMeanCharge()
    87 // - MCalibrationChargePix::SetHiGainMeanChargeErr()
    88 // - MCalibrationChargePix::SetHiGainSigmaCharge()
    89 // - MCalibrationChargePix::SetHiGainSigmaChargeErr()
    90 // - MCalibrationChargePix::SetHiGainChargeProb()
    91 // - MCalibrationChargePix::SetHiGainNumPickup()
    92 //
    93 // - MCalibrationChargePix::SetLoGainMeanCharge()
    94 // - MCalibrationChargePix::SetLoGainMeanChargeErr()
    95 // - MCalibrationChargePix::SetLoGainSigmaCharge()
    96 // - MCalibrationChargePix::SetLoGainSigmaChargeErr()
    97 // - MCalibrationChargePix::SetLoGainChargeProb()
    98 // - MCalibrationChargePix::SetLoGainNumPickup()
     88// - MCalibrationPix::SetHiGainSaturation()
     89// - MCalibrationPix::SetHiGainMean()
     90// - MCalibrationPix::SetHiGainMeanErr()
     91// - MCalibrationPix::SetHiGainSigma()
     92// - MCalibrationPix::SetHiGainSigmaErr()
     93// - MCalibrationPix::SetHiGainProb()
     94// - MCalibrationPix::SetHiGainNumPickup()
     95//
     96// - MCalibrationPix::SetLoGainMean()
     97// - MCalibrationPix::SetLoGainMeanErr()
     98// - MCalibrationPix::SetLoGainSigma()
     99// - MCalibrationPix::SetLoGainSigmaErr()
     100// - MCalibrationPix::SetLoGainProb()
     101// - MCalibrationPix::SetLoGainNumPickup()
    99102//
    100103// - MCalibrationChargePix::SetAbsTimeMean()
    101104// - MCalibrationChargePix::SetAbsTimeRms()
    102 //
    103 // The last two items are filled with the Hi-Gain or Lo-Gain result, depending on
    104 // the saturation status.
    105105//
    106106// For all averaged areas, the fitted sigma is multiplied with the square root of
     
    191191// - MExtractedSignalCam
    192192//
    193 // Calls InitializeHists() for every entry in:
     193// Initializes, if empty to MGeomCam::GetNumPixels():
     194// - MHCalibrationCam::fHiGainArray, MHCalibrationCam::fLoGainArray
     195//
     196// Initializes, if empty to MGeomCam::GetNumAreas() for:
     197// - MHCalibrationCam::fAverageHiGainAreas, MHCalibrationCam::fAverageLoGainAreas
     198//
     199// Initializes, if empty to MGeomCam::GetNumSectors() for:
     200// - MHCalibrationCam::fAverageHiGainSectors, MHCalibrationCam::fAverageLoGainSectors
     201//
     202// Calls MHCalibrationCam::InitHists() for every entry in:
    194203// - MHCalibrationCam::fHiGainArray, MHCalibrationCam::fLoGainArray
    195204// - MHCalibrationCam::fAverageHiGainAreas, MHCalibrationCam::fAverageLoGainAreas
    196205// - MHCalibrationCam::fAverageHiGainSectors, MHCalibrationCam::fAverageLoGainSectors
    197206//
    198 // Sets Titles and Names for the Charge Histograms and
     207// Sets Titles and Names for the Charge Histograms:
     208// - MHCalibrationCam::fAverageHiGainAreas
     209// - MHCalibrationCam::fAverageHiGainSectors
     210//
    199211// Sets number of bins to MHCalibrationCam::fAverageNbins for:
    200212// - MHCalibrationCam::fAverageHiGainAreas, MHCalibrationCam::fAverageLoGainAreas
     
    502514//    otherwise the Hi-Gain ones.
    503515// 4) Calls to MHCalibrationCam::FitHiGainArrays() and MCalibrationCam::FitLoGainArrays()
    504 //    and sets the flags (if  occurring):
     516//    with the flags:
    505517//    - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kHiGainNotFitted )
    506518//    - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kLoGainNotFitted )
    507519//    - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kHiGainOscillating )
    508520//    - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kLoGainOscillating )
    509 // 5) Retrieves the results and store them in MCalibrationChargePix
    510521//
    511522Bool_t MHCalibrationChargeCam::FinalizeHists()
     
    652663// --------------------------------------------------------------------------
    653664//
    654 // Takes the decisions under which conditions a pixel is declared:
    655 // MBadPixelsPix::kUnsuitableRun  or MBadPixelsPix::kUnreliableRun, namely:
    656 // * if MBadPixelsPix::kHiGainNotFitted   and !MCalibrationPix::IsHiGainSaturation()
    657 //   sets MBadPixelsPix::kUnreliableRun
    658 // * if MBadPixelsPix::kHiGainOscillating and !MCalibrationPix::IsHiGainSaturation()
    659 //   sets MBadPixelsPix::kUnreliableRun
    660 // * if MBadPixelsPix::kLoGainNotFitted   and  MCalibrationPix::IsLoGainSaturation()
    661 //   sets MBadPixelsPix::kUnreliableRun
    662 // * if MBadPixelsPix::kLoGainOscillating and  MCalibrationPix::IsLoGainSaturation()
    663 //   sets MBadPixelsPix::kUnreliableRun
    664 // * if MBadPixelsPix::kLoGainSaturation
    665 //   sets MBadPixelsPix::kUnsuitableRun
     665// Sets all pixels to MBadPixelsPix::kUnsuitableRun, if following flags are set:
     666// - MBadPixelsPix::kLoGainSaturation
     667//
     668// Sets all pixels to MBadPixelsPix::kUnreliableRun, if following flags are set:
     669// - if MBadPixelsPix::kHiGainNotFitted   and !MCalibrationPix::IsHiGainSaturation()
     670// - if MBadPixelsPix::kHiGainOscillating and !MCalibrationPix::IsHiGainSaturation()
     671// - if MBadPixelsPix::kLoGainNotFitted   and  MCalibrationPix::IsLoGainSaturation()
     672// - if MBadPixelsPix::kLoGainOscillating and  MCalibrationPix::IsLoGainSaturation()
    666673//
    667674void MHCalibrationChargeCam::FinalizeBadPixels()
     
    705712// --------------------------------------------------------------------------
    706713//
    707 // What MHCamera needs in order to draw an individual pixel in the camera
     714// Calls MHGausEvents::DrawClone() for pixel idx
    708715//
    709716void MHCalibrationChargeCam::DrawPixelContent(Int_t idx) const
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h

    r3636 r3639  
    4646  void   DrawPixelContent( Int_t num )  const;   
    4747
    48   ClassDef(MHCalibrationChargeCam, 1)   // Histogram class for camera charge calibration
     48  ClassDef(MHCalibrationChargeCam, 1)   // Histogram class for Charge Camera Calibration
    4949};
    5050
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeHiGainPix.cc

    r3636 r3639  
    2727//  MHCalibrationChargeHiGainPix
    2828//
    29 //  Store the histogrammed Hi Gain summed FADC slices and the arrival times
     29//  Histogram class for the charge High Gain FADC calibration.
     30//  Stores and fits the charges and stores the location of the maximum FADC
     31//  slice. Charges are taken from MExtractedSignalPix.
    3032//
    3133//////////////////////////////////////////////////////////////////////////////
     
    3335
    3436#include <TH1.h>
    35 #include <TPad.h>
    36 #include <TVirtualPad.h>
    37 #include <TCanvas.h>
    38 
    39 #include "MLog.h"
    40 #include "MLogManip.h"
    41 
    42 #include "MParList.h"
    43 
    44 #include "MExtractedSignalCam.h"
    45 
    4637
    4738ClassImp(MHCalibrationChargeHiGainPix);
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeHiGainPix.h

    r3636 r3639  
    1212private:
    1313
    14   static const Int_t   fgChargeNbins;     // Default for MHGausEvents::fNbins (now set to: 2000  )
    15   static const Axis_t  fgChargeFirst;     // Default for MHGausEvents::fFirst (now set to: -0.5  )
    16   static const Axis_t  fgChargeLast;      // Default for MHGausEvents::fLast  (now set to: 1999.5)
    17   static const Int_t   fgAbsTimeNbins;    // Default for fAbsTimeNbins        (now set to: 20    )
    18   static const Axis_t  fgAbsTimeFirst;    // Default for fAbsTimeFirst        (now set to: -0.5  )
    19   static const Axis_t  fgAbsTimeLast;     // Default for fAbsTimeLast         (now set to: 19.5  )
     14  static const Int_t   fgChargeNbins;     // Default for fNbins        (now set to: 2000  )
     15  static const Axis_t  fgChargeFirst;     // Default for fFirst        (now set to: -0.5  )
     16  static const Axis_t  fgChargeLast;      // Default for fLast         (now set to: 1999.5)
     17  static const Int_t   fgAbsTimeNbins;    // Default for fAbsTimeNbins (now set to: 20    )
     18  static const Axis_t  fgAbsTimeFirst;    // Default for fAbsTimeFirst (now set to: -0.5  )
     19  static const Axis_t  fgAbsTimeLast;     // Default for fAbsTimeLast  (now set to: 19.5  )
    2020
    2121public:
     
    2929  void SetAbsTimeLast (const Axis_t last =fgAbsTimeLast)         { fAbsTimeLast  = last;    }
    3030
    31   ClassDef(MHCalibrationChargeHiGainPix, 1)  // Histogram class for High Gain part of Calibration Pixel
     31  ClassDef(MHCalibrationChargeHiGainPix, 1)  // Histogram class for Charge High Gain Pixel Calibration
    3232};
    3333
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeLoGainPix.cc

    r3636 r3639  
    2727//  MHCalibrationChargeLoGainPix
    2828//
    29 //  Store the histogrammed Hi Gain summed FADC slices and the arrival times
     29//  Histogram class for the charge Low Gain FADC calibration.
     30//  Stores and fits the charges and stores the location of the maximum FADC
     31//  slice. Charges are taken from MExtractedSignalPix.
    3032//
    3133//////////////////////////////////////////////////////////////////////////////
     
    3335
    3436#include <TH1.h>
    35 #include <TPad.h>
    36 #include <TVirtualPad.h>
    37 #include <TCanvas.h>
    38 
    39 #include "MLog.h"
    40 #include "MLogManip.h"
    41 
    42 #include "MParList.h"
    43 
    44 #include "MExtractedSignalCam.h"
    45 
    4637
    4738ClassImp(MHCalibrationChargeLoGainPix);
     
    9990
    10091
    101 
    102 
    103 
    104 
    105 
    106 
    107 
    108 
    109 
    110 
    111 
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeLoGainPix.h

    r3636 r3639  
    1111private:
    1212
    13   static const Int_t   fgChargeNbins;      // Default for MHGausEvents::fNbins (now set to: 200   )
    14   static const Axis_t  fgChargeFirst;      // Default for MHGausEvents::fFirst (now set to: -0.5  )
    15   static const Axis_t  fgChargeLast;       // Default for MHGausEvents::fLast  (now set to: 199.5 )
    16   static const Int_t   fgAbsTimeNbins;     // Default for fAbsTimeNbins        (now set to: 15    )
    17   static const Axis_t  fgAbsTimeFirst;     // Default for fAbsTimeFirst        (now set to: -0.5  )
    18   static const Axis_t  fgAbsTimeLast;      // Default for fAbsTimeLast         (now set to: 14.5  )
     13  static const Int_t   fgChargeNbins;      // Default for fNbins        (now set to: 200   )
     14  static const Axis_t  fgChargeFirst;      // Default for fFirst        (now set to: -0.5  )
     15  static const Axis_t  fgChargeLast;       // Default for fLast         (now set to: 199.5 )
     16  static const Int_t   fgAbsTimeNbins;     // Default for fAbsTimeNbins (now set to: 15    )
     17  static const Axis_t  fgAbsTimeFirst;     // Default for fAbsTimeFirst (now set to: -0.5  )
     18  static const Axis_t  fgAbsTimeLast;      // Default for fAbsTimeLast  (now set to: 14.5  )
    1919
    2020public:
     
    2828  void SetAbsTimeLast (const Axis_t last =fgAbsTimeLast)         { fAbsTimeLast  = last;    }
    2929
    30   ClassDef(MHCalibrationChargeLoGainPix, 1)  // Histogram class for Low Gain Part of Calibration Pixel
     30  ClassDef(MHCalibrationChargeLoGainPix, 1)  // Histogram class for Charge Low Gain Pixel Calibration
    3131};
    3232
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePINDiode.cc

    r3637 r3639  
    2727//  MHCalibrationChargePINDiode
    2828//
    29 //  Histogram container for the calibration PIN Diode information
    30 //  Extracts the signal stored in MExtractedSignalPINDiode, histograms and fits it.
     29//  Histogram class for the charge calibration of the PIN Diode.
     30//  Stores and fits the charges, the RMS of the charges  and stores the
     31//  location of the maximum FADC slice. Charges are taken from MExtractedSignalPINDiode.
    3132//
    3233//////////////////////////////////////////////////////////////////////////////
     
    8889// - the default y-axis title for fHRmsCharge ("Nr. of events")
    8990// - the default directory of the fHRmsCharge (NULL)
     91// - the current style for fHRmsCharge (NULL)
    9092//
    9193// Initializes:
    9294// - fHRmsCharge()
    9395// - all pointers to NULL
    94 // - all variables to 0.
    95 // - all flags to kFALSE
     96//
     97// Calls:
     98// - Clear()
    9699//
    97100MHCalibrationChargePINDiode::MHCalibrationChargePINDiode(const char *name, const char *title)
     
    174177//
    175178// Retrieves from MExtractedSignalPINDiode:
    176 // - Number of used FADC samples
    177 // - Extracted signal
    178 // - Signal Rms
    179 // - Arrival Time
     179// - Number of used FADC samples via MExtractedSignalPINDiode::GetNumFADCSamples()
     180// - Extracted signal via            MExtractedSignalPINDiode::GetExtractedSignal()
     181// - Signal Rms                      MExtractedSignalPINDiode::GetExtractedRms()
     182// - Arrival Time                    MExtractedSignalPINDiode::GetExtractedTime()
    180183//
    181184// Fills the following histograms:
     
    217220// --------------------------------------------------------------------------
    218221//
    219 // Returns kFALSE, if empty
     222// Returns kTRUE, if empty
    220223//
    221224// Performs the following fits:
     
    223226// - FitRmsCharge()
    224227//
    225 // Creates the fourier spectrum and sets bit IsFourierSpectrumOK()
     228// Creates the fourier spectrum (MHGausEvents::CreateFourierSpectrum()
     229// and sets bit MCalibrationChargePINDiode::SetOscillating( MHGausEvents::IsFourierSpectrumOK() )
    226230// Retrieves the results of the following fits and stores them in MCalibrationChargePINDiode:
    227231// - Mean Charge and Error
    228232// - Sigma Charge and Error
     233// - Fit Probability
    229234// - Abs Time Mean
    230235// - Abs Time Rms
     
    244249  fPINDiode->SetOscillating  ( !IsFourierSpectrumOK() );
    245250
    246   fPINDiode->SetMeanCharge(     GetMean()     );
    247   fPINDiode->SetMeanChargeErr(  GetMeanErr()  );
    248   fPINDiode->SetSigmaCharge(    GetSigma()    );
    249   fPINDiode->SetSigmaChargeErr( GetSigmaErr() );
     251  fPINDiode->SetMean     (  GetMean()     );
     252  fPINDiode->SetMeanErr  (  GetMeanErr()  );
     253  fPINDiode->SetSigma    (  GetSigma()    );
     254  fPINDiode->SetSigmaErr (  GetSigmaErr() );
     255  fPINDiode->SetProb     (  GetProb()     );
    250256
    251257  fPINDiode->SetAbsTimeMean(    GetAbsTimeMean() );
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePINDiode.h

    r3637 r3639  
    1313private:
    1414
    15   static const Int_t   fgChargeNbins;     //! Default for MHGausEvents::fNBins  (now set to: 200   )
    16   static const Axis_t  fgChargeFirst;     //! Default for MHGausEvents::fFirst  (now set to: -0.5  )
    17   static const Axis_t  fgChargeLast;      //! Default for MHGausEvents::fLast   (now set to: 199.5 )
    18   static const Int_t   fgRmsChargeNbins;  //! Default for fRmsChargeNBins       (now set to: 100   )
    19   static const Axis_t  fgRmsChargeFirst;  //! Default for fRmsChargeFirst       (now set to: 0.    )
    20   static const Axis_t  fgRmsChargeLast;   //! Default for fRmsChargeLast        (now set to: 100.  )
    21   static const Int_t   fgAbsTimeNbins;    //! Default for fAbsTimeNBins         (now set to: 30    )
    22   static const Axis_t  fgAbsTimeFirst;    //! Default for fAbsTimeFirst         (now set to: -0.5  )
    23   static const Axis_t  fgAbsTimeLast;     //! Default for fAbsTimeLast          (now set to: 29.5  )
     15  static const Int_t   fgChargeNbins;     //! Default for fNBins           (now set to: 200   )
     16  static const Axis_t  fgChargeFirst;     //! Default for fFirst           (now set to: -0.5  )
     17  static const Axis_t  fgChargeLast;      //! Default for fLast            (now set to: 199.5 )
     18  static const Int_t   fgRmsChargeNbins;  //! Default for fRmsChargeNBins  (now set to: 100   )
     19  static const Axis_t  fgRmsChargeFirst;  //! Default for fRmsChargeFirst  (now set to: 0.    )
     20  static const Axis_t  fgRmsChargeLast;   //! Default for fRmsChargeLast   (now set to: 100.  )
     21  static const Int_t   fgAbsTimeNbins;    //! Default for fAbsTimeNBins    (now set to: 30    )
     22  static const Axis_t  fgAbsTimeFirst;    //! Default for fAbsTimeFirst    (now set to: -0.5  )
     23  static const Axis_t  fgAbsTimeLast;     //! Default for fAbsTimeLast     (now set to: 29.5  )
    2424
    2525  MCalibrationChargePINDiode *fPINDiode; //! Storage container of the results
     
    7373  void Draw(Option_t *opt="");
    7474 
    75   ClassDef(MHCalibrationChargePINDiode, 1)  // Histogram class for the Calibration PIN Diode
     75  ClassDef(MHCalibrationChargePINDiode, 1)  // Histogram class for Charge PIN Diode Calibration
    7676};
    7777
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePix.cc

    r3636 r3639  
    2626//  MHCalibrationChargePix
    2727//
    28 //  Histogram class for charge calibration analysis. Holds the histogrammed
    29 //  summed FADC slices and some rough absolute timing. Calculates the mean
    30 //  sum of FADC slices and its sigma and perform a Fourier analysis.
     28//  Histogram class for the charge calibration.
     29//  Stores and fits the charges and stores the location of the maximum FADC
     30//  slice. Charges are taken from MExtractedSignalPix.
    3131//
    3232//////////////////////////////////////////////////////////////////////////////
     
    6464// - the default number for fFirst        (fgChargeFirst)
    6565// - the default number for fLast         (fgChargeLast)
    66 // - the default number for fAbsTimeNbins (fgAbstTimeNbins)
     66// - the default number for fAbsTimeNbins (fgAbsTimeNbins)
    6767// - the default number for fAbsTimeFirst (fgAbsTimeFirst)
    6868// - the default number for fAbsTimeLast  (fgAbsTimeLast)
     
    7878// - the default y-axis title for fHAbsTime ("Nr. of events");
    7979// - the default directory of the fHAbsTime (NULL)
     80// - the current style for fHAbsTime
    8081//
    8182// Initializes:
    8283// - fHAbsTime()
    83 // - fPixId to -1
    84 // - all variables to 0.
    85 // - all flags to kFALSE
     84//
     85// Calls:
     86// - Clear();
    8687//
    8788MHCalibrationChargePix::MHCalibrationChargePix(const char *name, const char *title)
     
    132133//
    133134// Sets:
    134 // - all variables to 0.
     135// - fSaturated to 0.
    135136//
    136137// Executes:
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePix.h

    r3636 r3639  
    1212private:
    1313
    14   static const Int_t   fgChargeNbins;        // Default for MHGausEvents::fNBins (now set to: 2000  )
    15   static const Axis_t  fgChargeFirst;        // Default for MHGausEvents::fFirst (now set to: -0.5  )
    16   static const Axis_t  fgChargeLast;         // Default for MHGausEvents::fLast  (now set to: 1999.5)
    17   static const Int_t   fgAbsTimeNbins;       // Default for fAbsTimeNbins        (now set to: 15    )
    18   static const Axis_t  fgAbsTimeFirst;       // Default for fAbsTimeFirst        (now set to: -0.5  )
    19   static const Axis_t  fgAbsTimeLast;        // Default for fAbsTimeLast         (now set to: 14.5  )
     14  static const Int_t   fgChargeNbins;        // Default for fNBins          (now set to: 2000  )
     15  static const Axis_t  fgChargeFirst;        // Default for fFirst          (now set to: -0.5  )
     16  static const Axis_t  fgChargeLast;         // Default for fLast           (now set to: 1999.5)
     17  static const Int_t   fgAbsTimeNbins;       // Default for fAbsTimeNbins   (now set to: 15    )
     18  static const Axis_t  fgAbsTimeFirst;       // Default for fAbsTimeFirst   (now set to: -0.5  )
     19  static const Axis_t  fgAbsTimeLast;        // Default for fAbsTimeLast    (now set to: 14.5  )
    2020
    2121protected:
     
    6363  void ChangeHistId(Int_t id);
    6464 
    65   ClassDef(MHCalibrationChargePix, 1)     // Base Histogram class for a Charge Calibration Pixel
     65  ClassDef(MHCalibrationChargePix, 1)     // Base Histogram class for Charge Pixel Calibration
    6666};
    6767
  • 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}
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimeCam.h

    r3636 r3639  
    1515  Bool_t FillHists(const MParContainer *par, const Stat_t w=1);
    1616  Bool_t FinalizeHists();
    17   void   FinalizeBadPixels();
     17  void    FinalizeBadPixels();
    1818 
    1919public:
     
    2525  void DrawPixelContent(Int_t idx) const;
    2626 
    27   ClassDef(MHCalibrationRelTimeCam, 1)  // Histogram class for camera relative time calibration
     27  ClassDef(MHCalibrationRelTimeCam, 1)  // Histogram class for Relative Time Camera Calibration
    2828};
    2929
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimePix.cc

    r3636 r3639  
    2727//  MHCalibrationRelTimePix
    2828//
    29 //  Histogram class for the relative arrival time calibration.
    30 //  Holds the histogrammed arrival times,
    31 //  derives from MHGausEvents, perform Fourier analysis
     29//  Histogram class for the relative arrival time calibration. 
     30//  Stores and fits the relative arrival times between pixel fPixId and
     31//  pixel number 1 (hardware index: 2). Times are taken from MArrivalTimePix
    3232//
    3333//////////////////////////////////////////////////////////////////////////////
     
    5757// - the default y-axis title for fHGausHist ("Nr. of events")
    5858//
    59 // Initializes:
    60 // - fPixId to -1
    61 //
    6259// Executes:
    6360// - MHGausEvents::Clear()
     
    8380}
    8481
    85 // --------------------------------------------------------------------------
    86 //
    87 // Sets:
    88 // - fPixId to -1
    89 //
    90 // Executes:
    91 // - MHGausEvents::Clear()
    92 //
    93 void MHCalibrationRelTimePix::Clear(Option_t *o)
    94 {
    95 
    96   fPixId = -1;
    97 
    98   MHGausEvents::Clear();
    99   return;
    100 }
    101 
    10282
    10383// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimePix.h

    r3636 r3639  
    1111private:
    1212
    13   static const Int_t   fgRelTimeNbins;      //! Default for MHGausEvents::fNBins  (now set to: 900   )
    14   static const Axis_t  fgRelTimeFirst;      //! Default for MHGausEvents::fFirst  (now set to: -13.5 )
    15   static const Axis_t  fgRelTimeLast;       //! Default for MHGausEvents::fLast   (now set to:  13.5 )
     13  static const Int_t   fgRelTimeNbins;      //! Default for fNbins  (now set to: 900   )
     14  static const Axis_t  fgRelTimeFirst;      //! Default for fFirst  (now set to: -13.5 )
     15  static const Axis_t  fgRelTimeLast;       //! Default for fLast   (now set to:  13.5 )
    1616
    1717public:
     
    1919  MHCalibrationRelTimePix(const char *name=NULL, const char *title=NULL);
    2020  ~MHCalibrationRelTimePix() {}
    21  
    22   void Clear(Option_t *o="");
     21
    2322  void Reset();
    2423 
    25   ClassDef(MHCalibrationRelTimePix, 1)     // Histogram class for Relative Time Calibration pixel
     24  ClassDef(MHCalibrationRelTimePix, 1)     // Histogram class for Relative Time Pixel Calibration
    2625};
    2726
  • trunk/MagicSoft/Mars/mcalib/MHGausEvents.h

    r3636 r3639  
    5151protected:
    5252
    53   Int_t   fNbins;                      // Number histogram bins for fHGausHist (used by Init())
    54   Axis_t  fFirst;                      // Lower histogram edge  for fHGausHist (used by Init())
    55   Axis_t  fLast;                       // Upper histogram edge  for fHGausHist (used by Init())
    56   Int_t   fPixId;                      //  Pixel ID
     53  Int_t   fNbins;                      // Number histogram bins for fHGausHist (used by InitBins())
     54  Axis_t  fFirst;                      // Lower histogram edge  for fHGausHist (used by InitBins())
     55  Axis_t  fLast;                       // Upper histogram edge  for fHGausHist (used by InitBins())
     56  Int_t   fPixId;                      // Pixel ID
    5757 
    5858  TH1F    fHGausHist;                  // Histogram which should hold the Gaussian distribution
Note: See TracChangeset for help on using the changeset viewer.