Changeset 4905


Ignore:
Timestamp:
09/09/04 17:43:22 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4904 r4905  
    2121
    2222 2004/09/09: Markus Gaug
     23 
     24   * mcalib/MCalibrationCam.[h,cc]
     25     - make default for GetNumUnsuitable and GetNumUnreliable
    2326
    2427   * mcalib/MCalibrationIntensityCam.[h,cc]
  • trunk/MagicSoft/Mars/manalysis/MHPedestalCam.cc

    r4317 r4905  
    2929//
    3030// Fills the extracted pedestals of MExtractedSignalCam into
    31 // the MHGausEvents-classes MHPedestalPix for every:
     31// the MHCalibrationPix-classes MHPedestalPix for every:
    3232//
    3333// - Pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray
     
    5555// the fit is declared valid.
    5656// Otherwise, the fit is repeated within ranges of the previous mean
    57 // +- MHGausEvents::fPickupLimit (default: 5) sigma (see MHGausEvents::RepeatFit())
     57// +- MHCalibrationPix::fPickupLimit (default: 5) sigma (see MHCalibrationPix::RepeatFit())
    5858// In case this does not make the fit valid, the histogram means and RMS's are
    59 // taken directly (see MHGausEvents::BypassFit()).
    60 //
    61 // Outliers of more than MHGausEvents::fPickupLimit (default: 5) sigmas
    62 // from the mean are counted as Pickup events (stored in MHGausEvents::fPickup)
     59// taken directly (see MHCalibrationPix::BypassFit()).
     60//
     61// Outliers of more than MHCalibrationPix::fPickupLimit (default: 5) sigmas
     62// from the mean are counted as Pickup events (stored in MHCalibrationPix::fPickup)
    6363//
    6464// The number of summed FADC slices is taken to re-normalize
     
    341341//
    342342// If MBadPixelsPix::IsBad():
    343 // - calls MHGausEvents::SetExcluded()
     343// - calls MHCalibrationPix::SetExcluded()
    344344//
    345345// Calls:
    346346// - MHGausEvents::InitBins()
    347 // - MHGausEvents::ChangeHistId(i)
    348 // - MHGausEvents::SetEventFrequency(fPulserFrequency)
     347// - MHCalibrationPix::ChangeHistId(i)
     348// - MHCalibrationPix::SetEventFrequency(fPulserFrequency)
    349349// - MHPedestalPix::SetNSlices(nslices)
    350350//
     
    401401  for (UInt_t i=0; i<npixels; i++)
    402402  {
    403       MHGausEvents &histhi = (*this)[i];
    404       MHGausEvents &histlo = (*this)(i);
     403      MHCalibrationPix &histhi = (*this)[i];
     404      MHCalibrationPix &histlo = (*this)(i);
    405405
    406406      if (histhi.IsExcluded())
     
    431431  for (UInt_t j=0; j<nareas; j++)
    432432    {
    433       MHGausEvents &histhi = GetAverageHiGainArea(j);
     433      MHCalibrationPix &histhi = GetAverageHiGainArea(j);
    434434      histhi.FillHistAndArray(numareahi[j] == 0 ? 0. : sumareahi[j]/numareahi[j]);
    435435
    436       MHGausEvents &histlo = GetAverageLoGainArea(j);
     436      MHCalibrationPix &histlo = GetAverageLoGainArea(j);
    437437      histlo.FillHistAndArray(numarealo[j] == 0 ? 0. : sumarealo[j]/numarealo[j]);
    438438    }
     
    440440  for (UInt_t j=0; j<nsectors; j++)
    441441    {
    442       MHGausEvents &histhi = GetAverageHiGainSector(j);
     442      MHCalibrationPix &histhi = GetAverageHiGainSector(j);
    443443      histhi.FillHistAndArray(numsectorhi[j] == 0 ? 0. : sumsectorhi[j]/numsectorhi[j]);
    444444
    445       MHGausEvents &histlo = GetAverageLoGainSector(j);
     445      MHCalibrationPix &histlo = GetAverageLoGainSector(j);
    446446      histlo.FillHistAndArray(numsectorlo[j] == 0 ? 0. : sumsectorlo[j]/numsectorlo[j]);
    447447    }
  • trunk/MagicSoft/Mars/manalysis/MHPedestalPix.cc

    r4317 r4905  
    3636// - Sigma Pedestal Error / slice = Sigma Pedestal Error / Sqrt (Number slices)
    3737//
    38 //  Derives from MHGausEvents, fits the pedestals to a Gaussian and performs
     38//  Derives from MHCalibrationPix, fits the pedestals to a Gaussian and performs
    3939//  a Fourier analysis.
    4040//
  • trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc

    r4855 r4905  
    266266// the area index exceeds the initialized array.
    267267//
    268 const Int_t MCalibrationCam::GetNumUnsuitable( Int_t aidx ) const
    269 {
    270   if (aidx < 0)
    271     return -1;
    272 
     268const Int_t MCalibrationCam::GetNumUnsuitable( const Int_t  aidx ) const
     269{
     270  if (aidx < 0)
     271    {
     272      Int_t num = 0;
     273      for (Int_t i=0;i<fNumUnsuitable.GetSize();i++)
     274        num += fNumUnsuitable[i];
     275      return num;
     276    }
     277 
    273278  return aidx > fNumUnsuitable.GetSize() ? -1 : fNumUnsuitable[aidx];
    274279}
     
    279284// the area index exceeds the initialized array.
    280285//
    281 const Int_t MCalibrationCam::GetNumUnreliable( Int_t aidx ) const
    282 {
    283   if (aidx < 0)
    284     return -1;
     286const Int_t MCalibrationCam::GetNumUnreliable( const Int_t  aidx ) const
     287{
     288  if (aidx < 0)
     289    {
     290      Int_t num = 0;
     291      for (Int_t i=0;i<fNumUnreliable.GetSize();i++)
     292        num += fNumUnreliable[i];
     293      return num;
     294    }
    285295
    286296  return aidx > fNumUnreliable.GetSize() ? -1 : fNumUnreliable[aidx];
     
    292302// the area index exceeds the initialized array.
    293303//
    294 const Float_t MCalibrationCam::GetNumHiGainFADCSlices( Int_t aidx ) const
     304const Float_t MCalibrationCam::GetNumHiGainFADCSlices( const Int_t aidx ) const
    295305{
    296306  if (aidx < 0)
     
    305315// the area index exceeds the initialized array.
    306316//
    307 const Float_t MCalibrationCam::GetNumLoGainFADCSlices( Int_t aidx ) const
     317const Float_t MCalibrationCam::GetNumLoGainFADCSlices( const Int_t aidx ) const
    308318{
    309319  if (aidx < 0)
     
    368378// Get i-th average pixel (area number)
    369379//
    370 MCalibrationPix &MCalibrationCam::GetAverageArea(UInt_t i)
     380MCalibrationPix &MCalibrationCam::GetAverageArea(const UInt_t i)
    371381{
    372382  return *static_cast<MCalibrationPix*>(fAverageAreas->UncheckedAt(i));
     
    377387// Get i-th average pixel (area number)
    378388//
    379 const MCalibrationPix &MCalibrationCam::GetAverageArea(UInt_t i) const
     389const MCalibrationPix &MCalibrationCam::GetAverageArea(const UInt_t i) const
    380390{
    381391  return *static_cast<MCalibrationPix*>(fAverageAreas->UncheckedAt(i));
     
    386396// Get i-th average pixel (sector number)
    387397//
    388 MCalibrationPix &MCalibrationCam::GetAverageSector(UInt_t i)
     398MCalibrationPix &MCalibrationCam::GetAverageSector(const UInt_t i)
    389399{
    390400  return *static_cast<MCalibrationPix*>(fAverageSectors->UncheckedAt(i));
     
    395405// Get i-th average pixel (sector number)
    396406//
    397 const MCalibrationPix &MCalibrationCam::GetAverageSector(UInt_t i) const
     407const MCalibrationPix &MCalibrationCam::GetAverageSector(const UInt_t i) const
    398408{
    399409  return *static_cast<MCalibrationPix*>(fAverageSectors->UncheckedAt(i));
     
    404414// Get i-th average pixel (area number)
    405415//
    406 MBadPixelsPix &MCalibrationCam::GetAverageBadArea(UInt_t i)
     416MBadPixelsPix &MCalibrationCam::GetAverageBadArea(const UInt_t i)
    407417{
    408418  return *static_cast<MBadPixelsPix*>(fAverageBadAreas->UncheckedAt(i));
     
    413423// Get i-th average pixel (area number)
    414424//
    415 const MBadPixelsPix &MCalibrationCam::GetAverageBadArea(UInt_t i) const
     425const MBadPixelsPix &MCalibrationCam::GetAverageBadArea(const UInt_t i) const
    416426{
    417427  return *static_cast<MBadPixelsPix*>(fAverageBadAreas->UncheckedAt(i));
     
    422432// Get i-th average pixel (sector number)
    423433//
    424 MBadPixelsPix &MCalibrationCam::GetAverageBadSector(UInt_t i)
     434MBadPixelsPix &MCalibrationCam::GetAverageBadSector(const UInt_t i)
    425435{
    426436  return *static_cast<MBadPixelsPix*>(fAverageBadSectors->UncheckedAt(i));
     
    431441// Get i-th average pixel (sector number)
    432442//
    433 const MBadPixelsPix &MCalibrationCam::GetAverageBadSector(UInt_t i) const
     443const MBadPixelsPix &MCalibrationCam::GetAverageBadSector(const UInt_t i) const
    434444{
    435445  return *static_cast<MBadPixelsPix*>(fAverageBadSectors->UncheckedAt(i));
  • trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h

    r4882 r4905  
    5656 
    5757  void Clear           ( Option_t *o="");
    58   void DrawPixelContent( Int_t num) const;
    5958  void Copy(TObject& object) const;
    6059 
     60  void DrawPixelContent( Int_t num) const;
     61
    6162  // Getters
    62   const Int_t            GetAverageAreas        ()             const;
    63         MCalibrationPix &GetAverageArea         ( UInt_t i );
    64   const MCalibrationPix &GetAverageArea         ( UInt_t i )  const;
    65         MBadPixelsPix   &GetAverageBadArea      ( UInt_t i );
    66   const MBadPixelsPix   &GetAverageBadArea      ( UInt_t i )  const;
    67         MBadPixelsPix   &GetAverageBadSector    ( UInt_t i );
    68   const MBadPixelsPix   &GetAverageBadSector    ( UInt_t i )   const;
    69         MCalibrationPix &GetAverageSector       ( UInt_t i );
    70   const Int_t            GetAverageSectors      ()             const; 
    71   const MCalibrationPix &GetAverageSector       ( UInt_t i   ) const;
    72   const Float_t          GetNumHiGainFADCSlices ( Int_t aidx=0 ) const;
    73   const Float_t          GetNumLoGainFADCSlices ( Int_t aidx=0 ) const;
    74   const Int_t            GetNumUnsuitable       ( Int_t aidx ) const;
    75   const Int_t            GetNumUnreliable       ( Int_t aidx ) const;
     63  const Int_t            GetAverageAreas        ()                     const;
     64        MCalibrationPix &GetAverageArea         ( const UInt_t i    );
     65  const MCalibrationPix &GetAverageArea         ( const UInt_t i     ) const;
     66        MBadPixelsPix   &GetAverageBadArea      ( const UInt_t i    );
     67  const MBadPixelsPix   &GetAverageBadArea      ( const UInt_t i     ) const;
     68  const Int_t            GetAverageSectors      ()                     const; 
     69        MCalibrationPix &GetAverageSector       ( const UInt_t i     );
     70  const MCalibrationPix &GetAverageSector       ( const UInt_t i     ) const; 
     71        MBadPixelsPix   &GetAverageBadSector    ( const UInt_t i     );
     72  const MBadPixelsPix   &GetAverageBadSector    ( const UInt_t i     ) const;
     73  const Float_t          GetNumHiGainFADCSlices ( const Int_t aidx=0 ) const;
     74  const Float_t          GetNumLoGainFADCSlices ( const Int_t aidx=0 ) const;
     75  const Int_t            GetNumUnsuitable       ( const Int_t aidx=-1) const;
     76  const Int_t            GetNumUnreliable       ( const Int_t aidx=-1) const;
    7677
    77   Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
    78   const PulserColor_t    GetPulserColor()                 const { return fPulserColor;         }
    79   const Int_t            GetSize()                        const;
     78        Bool_t           GetPixelContent        ( Double_t &val, Int_t idx, const MGeomCam &cam,
     79                                                  Int_t type=0       ) const;
     80  const PulserColor_t    GetPulserColor         ()                     const { return fPulserColor; }
     81  const Int_t            GetSize                ()                     const;
    8082
    81         MCalibrationPix &operator[]          ( UInt_t i );
    82   const MCalibrationPix &operator[]          ( UInt_t i ) const;
     83        MCalibrationPix &operator[]             ( UInt_t i );
     84  const MCalibrationPix &operator[]             ( UInt_t i )          const;
    8385
    8486  // Inits
    85   void  Init           ( const MGeomCam &geom         );
     87  void  Init                   ( const MGeomCam &geom         );
    8688  void  InitSize               ( const UInt_t i               );
    8789  void  InitAverageAreas       ( const UInt_t i               );
     
    9193  void  SetNumHiGainFADCSlices ( const Float_t f, const Int_t aidx=0 );
    9294  void  SetNumLoGainFADCSlices ( const Float_t f, const Int_t aidx=0 );
    93   void  SetNumUnsuitable       ( const UInt_t i,  const Int_t aidx ); 
    94   void  SetNumUnreliable       ( const UInt_t i,  const Int_t aidx );
     95  void  SetNumUnsuitable       ( const UInt_t i,  const Int_t aidx   ); 
     96  void  SetNumUnreliable       ( const UInt_t i,  const Int_t aidx   );
    9597  void  SetPulserColor         ( const PulserColor_t col=kCT1 )  { fPulserColor = col; }
    9698 
Note: See TracChangeset for help on using the changeset viewer.