Changeset 4152 for trunk


Ignore:
Timestamp:
05/24/04 18:13:47 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4150 r4152  
    2626       
    2727 2004/05/24: Markus Gaug
     28
     29   * mcalib/MHCalibrationTestCam.[h,cc]
     30     - number of photons/area are now stored in TArray's in order to
     31       retrieve them easier in later processing from stored files.
    2832
    2933   * mcalib/MCalibrationCam.cc
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationTestCam.cc

    r4151 r4152  
    263263      }
    264264  }
    265    
    266 
     265
     266
     267  fMeanMeanPhotPerArea.Set(nareas);   
     268  fRmsMeanPhotPerArea .Set(nareas);
     269  fMeanSigmaPhotPerArea.Set(nareas); 
     270  fRmsSigmaPhotPerArea.Set(nareas);
     271 
    267272  return kTRUE;
    268273}
     
    359364{
    360365
     366  TArrayI numaidx;
     367  numaidx.Set(fGeom->GetNumAreas());
     368
    361369  for (Int_t i=0; i<fHiGainArray->GetSize(); i++)
    362370    {
     
    378386      hist.CreateFourierSpectrum();
    379387     
    380     }
    381  
     388      const Float_t area = (*fGeom)[i].GetA();
     389      const Int_t   aidx = (*fGeom)[i].GetAidx();
     390
     391      fMeanMeanPhotPerArea[aidx]  += hist.GetMean() / area;
     392      fRmsMeanPhotPerArea [aidx]  += hist.GetMean() / area * hist.GetMean()  / area;
     393      fMeanSigmaPhotPerArea[aidx] += hist.GetSigma()/ area;
     394      fRmsSigmaPhotPerArea [aidx] += hist.GetSigma()/ area * hist.GetSigma() / area;
     395      numaidx[aidx]++;
     396    }
     397
     398
    382399  for (Int_t j=0; j<fAverageHiGainAreas->GetSize(); j++)
    383400    {
     
    395412      hist.CreateFourierSpectrum();
    396413     
    397 
     414      fRmsMeanPhotPerArea [j]  -= fMeanMeanPhotPerArea [j]*fMeanMeanPhotPerArea [j]/numaidx[j];
     415      fRmsSigmaPhotPerArea[j]  -= fMeanSigmaPhotPerArea[j]*fMeanSigmaPhotPerArea[j]/numaidx[j];
     416
     417      fMeanMeanPhotPerArea [j]  /=  numaidx[j];
     418      fMeanSigmaPhotPerArea[j]  /=  numaidx[j];
     419      fRmsMeanPhotPerArea  [j]  /=  numaidx[j]-1.;
     420      fRmsSigmaPhotPerArea [j]  /=  numaidx[j]-1.;
    398421  }
    399422
     
    455478// =================
    456479//
    457 // 7:  Fitted Mean Test Calibration (MHGausEvents::GetMean()) by MGeomPix::GetA()
    458 // 8:  Fitted Mean Error Calibration (MHGausEvents::GetMeanErr()) by MGeomPix::GetA()
    459 // 9:  Fitted Sigma Test Calibration (MHGausEvents::GetSigma()) by MGeomPix::GetA()
     480// 7:  Fitted Mean Test Calibration   (MHGausEvents::GetMean())    by MGeomPix::GetA()
     481// 8:  Fitted Mean Error Calibration  (MHGausEvents::GetMeanErr()) by MGeomPix::GetA()
     482// 9:  Fitted Sigma Test Calibration  (MHGausEvents::GetSigma())    by MGeomPix::GetA()
    460483// 10: Fitted Sigma Error Calibration (MHGausEvents::GetSigmaErr()) by MGeomPix::GetA()
    461484//
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationTestCam.h

    r3845 r4152  
    44#ifndef MARS_MHCalibrationCam
    55#include "MHCalibrationCam.h"
     6#endif
     7#ifndef ROOT_TArrayF
     8#include "TArrayF.h"
    69#endif
    710
     
    1215private:
    1316
     17  TArrayF fMeanMeanPhotPerArea;
     18  TArrayF fRmsMeanPhotPerArea   ;
     19  TArrayF fMeanSigmaPhotPerArea;
     20  TArrayF fRmsSigmaPhotPerArea   ;
     21 
    1422  Bool_t ReInitHists(MParList *pList);
    1523  Bool_t FillHists(const MParContainer *par, const Stat_t w=1);
     
    2533  void DrawPixelContent(Int_t idx) const;
    2634
     35  const Float_t GetMeanMeanPhotPerArea       ( const Int_t aidx ) const   { return fMeanMeanPhotPerArea [aidx]; }
     36  const Float_t GetRmsMeanPhotPerArea        ( const Int_t aidx ) const   { return fRmsMeanPhotPerArea  [aidx]; }
     37  const Float_t GetMeanSigmaPhotPerArea      ( const Int_t aidx ) const   { return fMeanSigmaPhotPerArea [aidx]; }
     38  const Float_t GetRmsSigmaPhotPerArea       ( const Int_t aidx ) const   { return fRmsSigmaPhotPerArea  [aidx]; }
     39
    2740  void CalcAverageSigma();
    2841 
Note: See TracChangeset for help on using the changeset viewer.