Ignore:
Timestamp:
05/24/04 18:13:47 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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//
Note: See TracChangeset for help on using the changeset viewer.