Changeset 3683


Ignore:
Timestamp:
04/08/04 19:56:26 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
4 edited

Legend:

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

    r3681 r3683  
    10091009  MCalibrationQEPix     &qepix = (MCalibrationQEPix&)  fQECam->GetAverageArea(0); 
    10101010
    1011   const Float_t avphotonflux = avpix.GetPheFFactorMethod()       
    1012                              / qepix.GetQEFFactor(fPulserColor)
    1013                              / fQECam->GetPlexiglassQE();
    1014 
    1015   const Float_t avfluxrelvar = avpix.GetPheFFactorMethodRelVar()
    1016                              + qepix.GetQEFFactorRelVar(fPulserColor)
    1017                              + fQECam->GetPlexiglassQERelVar();
     1011  const Float_t avphoton = avpix.GetPheFFactorMethod()       
     1012                           / qepix.GetQEFFactor(fPulserColor)
     1013                           / fQECam->GetPlexiglassQE();
     1014
     1015  const Float_t avphotrelvar = avpix.GetPheFFactorMethodRelVar()
     1016                            + qepix.GetQEFFactorRelVar(fPulserColor)
     1017                            + fQECam->GetPlexiglassQERelVar();
    10181018
    10191019  const UInt_t npixels  = fGeom->GetNumPixels();
     
    10311031        }
    10321032     
    1033       const Float_t photons = avphotonflux / fGeom->GetPixRatio(i);
     1033      const Float_t photons = avphotons / fGeom->GetPixRatio(i);
    10341034      const Float_t qe      = pix.GetPheFFactorMethod() / photons ;
    10351035
    1036       if (!pix.CalcMeanFFactor( photons , avfluxrelvar ))
     1036      if (!pix.CalcMeanFFactor( photons , avphotrelvar ))
    10371037        {
    10381038          pix.SetFFactorMethodValid(kFALSE);
     
    10411041        }
    10421042
    1043       const Float_t qerelvar = avfluxrelvar +  pix.GetPheFFactorMethodRelVar();
     1043      const Float_t qerelvar = avphotrelvar +  pix.GetPheFFactorMethodRelVar();
    10441044
    10451045      qepix.SetQEFFactor    ( qe            , fPulserColor );
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc

    r3678 r3683  
    497497      if (pix.IsExcluded() || !pix.IsFFactorMethodValid())
    498498        return kFALSE;
    499       val = pix.GetMeanFFactorFADC2Phot();
     499      val = pix.GetMeanFFactorFADC2PhotErr();
    500500      break;
    501501    case 15:
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc

    r3678 r3683  
    659659//
    660660// Calculate the total F-Factor with the formula:
    661 //   fMeanFFactorFADC2Phot = fRSigmaSquare / GetMeanSquare() * sqrt(photflux)
     661//   fMeanFFactorFADC2Phot = Sqrt ( fRSigmaSquare / GetMeanSquare() ) * nphotons
    662662//
    663663// Calculate the error of the total F-Factor
    664664//
    665 Bool_t MCalibrationChargePix::CalcMeanFFactor( const Float_t photflux, const Float_t photfluxrelvar )
    666 {
    667 
    668   if (photflux <= 0.)
     665Bool_t MCalibrationChargePix::CalcMeanFFactor( const Float_t nphotons, const Float_t nphotonsrelvar )
     666{
     667
     668  if (nphotons <= 0.)
    669669    {
    670670      *fLog << warn << GetDescriptor() << ": Assumed photon flux is smaller or equal 0." << endl;
     
    672672    }
    673673
    674   if (photfluxrelvar < 0.)
     674  if (nphotonsrelvar < 0.)
    675675    {
    676676      *fLog << warn << GetDescriptor() << ": Assumed photon flux variance is smaller than 0." << endl;
     
    678678    }
    679679
    680   fMeanFFactorFADC2Phot =  fRSigmaSquare / GetMeanSquare() * TMath::Sqrt(photflux);
     680  fMeanFFactorFADC2Phot =  TMath::Sqrt(fRSigmaSquare) / GetMean() * nphotons;
    681681 
    682682  if (fMeanFFactorFADC2Phot < 0.)
     
    686686    }
    687687 
    688   const Float_t ffactorrelvar = fRSigmaSquareVar / ( fRSigmaSquare * fRSigmaSquare)
    689                               + 4.   * GetMeanRelVar()
    690                               + 0.25 * photfluxrelvar;
     688  const Float_t ffactorrelvar = 0.25 * fRSigmaSquareVar / ( fRSigmaSquare * fRSigmaSquare)
     689                              + GetMeanRelVar()
     690                              + nphotonsrelvar;
    691691 
    692692  fMeanFFactorFADC2PhotVar    = ffactorrelvar * fMeanFFactorFADC2Phot * fMeanFFactorFADC2Phot;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h

    r3678 r3683  
    102102  Bool_t CalcReducedSigma  ();
    103103  Bool_t CalcFFactorMethod ();
    104   Bool_t CalcMeanFFactor   ( const Float_t photflux, const Float_t phtfluxrelvar );
     104  Bool_t CalcMeanFFactor   ( const Float_t nphotons, const Float_t nphotonsrelvar );
    105105 
    106106  ClassDef(MCalibrationChargePix, 1)    // Container Charge Calibration Results Pixel
Note: See TracChangeset for help on using the changeset viewer.