Changeset 5198


Ignore:
Timestamp:
10/07/04 14:02:49 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5196 r5198  
    3030  * mcalib/MCalibrationChargeCalc.cc
    3131    - after talking with Florian, we reduced the electronic noise for the
    32       low-gain pedestal calculation from 1.5 to 0.8, independent from
     32      low-gain pedestal calculation from 1.5 to 1.0, independent from
    3333      inner or outer pixels.
     34    - additionally found a small bug in the calculation of the low-gain
     35      pedestal RMS which amounts to about the same size as the difference
     36      in the assumed electronic noise.
    3437
    3538  * mcalib/MCalibrationChargeCalc.cc
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc

    r5197 r5198  
    989989//
    990990// Convert the NSB ped. RMS contribution to the low-gain with the formula:
    991 // - LoGain NSB square      = - HiGain NSB square / (fConversionHiLo*fConversionHiLo)
     991// - LoGain NSB square      = HiGain NSB square / (fConversionHiLo*fConversionHiLo)
    992992// - Var(LoGain NSB square) = ( Var(HiGain NSB square) / (HiGain NSB square * HiGain NSB square)
    993993//                              + GetConversionHiLoRelVar()   
     
    10061006    return;
    10071007
    1008   const Float_t elecPedRms     = gkElectronicPedRms * TMath::Sqrt(logainsamples) / fConversionHiLo;
    1009   const Float_t elecPedRmsVar  = ( GetElectronicPedRmsRelVar() + GetConversionHiLoRelVar() )
    1010                                * elecPedRms * elecPedRms;
    1011  
    1012   Float_t pedRmsSquare      = fPedRms * fPedRms;
    1013   Float_t pedRmsSquareVar   = fPedVar * pedRmsSquare; // fPedRmsErr = fPedErr/2.
    1014  
    1015   //
    1016   // We do not know the Lo Gain Pedestal RMS, so we have to retrieve it
    1017   // from the HI GAIN (all calculation per slice up to now): 
     1008  const Float_t elecPedRms     = gkElectronicPedRms * TMath::Sqrt(logainsamples);
     1009  const Float_t elecPedRmsVar  = GetElectronicPedRmsRelVar() * elecPedRms * elecPedRms;
     1010 
     1011  Float_t pedRmsSquare         = fPedRms * fPedRms;
     1012  Float_t pedRmsSquareVar      = fPedVar * pedRmsSquare; // fPedRmsErr = fPedErr/2.
     1013 
     1014  //
     1015  // We do not know the Low Gain Pedestal RMS, so we have to retrieve it
     1016  // from the High Gain: 
    10181017  //
    10191018  // We extract the pure NSB contribution:
     
    10331032 
    10341033
    1035   Float_t higainNsbSquare        =  pedRmsSquare    - elecRmsSquare;
    1036   Float_t higainNsbSquareRelVar  = (pedRmsSquareVar + elecRmsSquareVar);
    1037 
     1034  Float_t higainNsbSquare     =  pedRmsSquare    - elecRmsSquare;
     1035  Float_t higainNsbSquareVar  = (pedRmsSquareVar + elecRmsSquareVar);
    10381036
    10391037  if (higainNsbSquare < 0.001)
    10401038    higainNsbSquare = 0.;
    1041   else
    1042     higainNsbSquareRelVar  /= (higainNsbSquare * higainNsbSquare) ;
    10431039 
    10441040  if (IsDebug())
     
    10461042      *fLog << dbginf << "ID: " << GetPixId()
    10471043            << " HiGain NSB Square:  " << higainNsbSquare
    1048             << " Rel.Var.HiGain NSB Square:  " << higainNsbSquareRelVar
     1044            << " Var.HiGain NSB Square:  " << higainNsbSquareVar
    10491045            << endl;
    10501046    }
     
    10581054
    10591055  const Float_t logainNsbSquare         =   higainNsbSquare       / conversionSquare;
    1060   const Float_t logainNsbSquareVar      = ( higainNsbSquareRelVar + conversionSquareRelVar )
    1061                                           * logainNsbSquare * logainNsbSquare;
     1056  //
     1057  // Calculation of variance of: c = a/b
     1058  //                    Delta(c)^2 = ( Delta(a)^2 + a^2/b^2*(Delta(b)^2 )  / b^2
     1059  //
     1060  const Float_t logainNsbSquareVar      = ( higainNsbSquareVar
     1061                                         + conversionSquareRelVar * higainNsbSquare * higainNsbSquare )
     1062                                          / conversionSquare / conversionSquare;
    10621063   
    10631064  fLoGainPedRmsSquare    = logainNsbSquare    + elecRmsSquare;
Note: See TracChangeset for help on using the changeset viewer.