Ignore:
Timestamp:
04/06/04 16:54:53 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r3648 r3671  
    127127// --------------------------------------------------------------------------
    128128//
     129// Get the Relative Variance of either High Gain or Low Gain Mean
     130// depending on IsHighGainSaturation()
     131//
     132// If variance is smaller than 0. return -1.
     133//
     134Float_t MCalibrationPix::GetMeanRelVar()  const
     135{
     136
     137  if (IsHiGainSaturation())
     138    if (fLoGainMeanVar < 0.)
     139      return -1.;
     140    else
     141      return fLoGainMeanVar / (fLoGainMean * fLoGainMean);
     142  else
     143    if (fHiGainMeanVar < 0.)
     144      return -1.;
     145    else
     146      return fHiGainMeanVar / (fHiGainMean * fHiGainMean);
     147}
     148
     149// --------------------------------------------------------------------------
     150//
     151// Get the Relative Variance of either High Gain or Low Gain Sigma
     152// depending on IsHighGainSaturation()
     153//
     154// If variance is smaller than 0. return -1.
     155//
     156Float_t MCalibrationPix::GetSigmaRelVar()  const
     157{
     158
     159  if (IsHiGainSaturation())
     160    if (fLoGainSigmaVar < 0.)
     161      return -1.;
     162    else
     163      return fLoGainSigmaVar / (fLoGainSigma * fLoGainSigma);
     164  else
     165    if (fHiGainSigmaVar < 0.)
     166      return -1.;
     167    else
     168      return fHiGainSigmaVar / (fHiGainSigma * fHiGainSigma);
     169}
     170
     171// --------------------------------------------------------------------------
     172//
    129173// Get the High Gain Mean Error: Takes square root of fHiGainMeanVar
    130174//
    131175Float_t MCalibrationPix::GetHiGainMeanErr()  const
    132176{
    133   return TMath::Sqrt(fHiGainMeanVar);
    134 }
     177  if (fLoGainMeanVar < 0.)
     178    return -1.;
     179
     180  return TMath::Sqrt(fLoGainMeanVar);
     181}
     182
    135183
    136184// --------------------------------------------------------------------------
     
    140188Float_t MCalibrationPix::GetHiGainSigmaErr()  const
    141189{
     190  if (fHiGainSigmaVar < 0.)
     191    return -1.;
     192
    142193  return TMath::Sqrt(fHiGainSigmaVar);
    143194}
     
    145196// --------------------------------------------------------------------------
    146197//
    147 // Get the Low Gain Mean Error: Takes square root of fHiGainMeanVar
     198// Get the Low Gain Mean Error: Takes square root of fLoGainMeanVar
    148199//
    149200Float_t MCalibrationPix::GetLoGainMeanErr()  const
    150201{
     202  if (fLoGainMeanVar < 0.)
     203    return -1.;
     204
    151205  return TMath::Sqrt(fLoGainMeanVar);
    152206}
    153207
    154 
    155208// --------------------------------------------------------------------------
    156209//
     
    159212Float_t MCalibrationPix::GetLoGainSigmaErr()  const
    160213{
     214  if (fLoGainSigmaVar < 0.)
     215    return -1.;
     216
    161217  return TMath::Sqrt(fLoGainSigmaVar);
    162218}
     
    168224Bool_t MCalibrationPix::IsHiGainSaturation()    const
    169225{
    170    return TESTBIT(fFlags,kHiGainSaturation); 
     226  return TESTBIT(fFlags,kHiGainSaturation); 
    171227}
    172228
Note: See TracChangeset for help on using the changeset viewer.