Ignore:
Timestamp:
03/09/04 19:24:09 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
2 edited

Legend:

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

    r3445 r3446  
    235235    SETBIT(fFlags, kHiLoGainCalibration);
    236236
    237     fNumHiGainSamples  = 0;
    238     fNumLoGainSamples  = 0;
     237    fNumHiGainSamples  = 0.;
     238    fNumLoGainSamples  = 0.;
    239239    fConversionHiLo    = 0;
    240240
     
    336336  fNumHiGainSamples  =  fSignals->GetNumUsedHiGainFADCSlices();
    337337  fNumLoGainSamples  =  fSignals->GetNumUsedLoGainFADCSlices();
    338   fSqrtHiGainSamples =  TMath::Sqrt((Float_t)fNumHiGainSamples);
     338  fSqrtHiGainSamples =  TMath::Sqrt(fNumHiGainSamples);
     339  fSqrtLoGainSamples =  TMath::Sqrt(fNumLoGainSamples);
    339340 
    340341  UInt_t npixels     = fGeom->GetNumPixels();
     
    424425      {
    425426          pix.SetPedestal(ped  * fNumLoGainSamples,
    426                           prms * TMath::Sqrt((Float_t)fNumLoGainSamples),
     427                          prms * fSqrtLoGainSamples,
    427428                          prms * fNumLoGainSamples / num);
    428           pix.SetNumLoGainSamples((Float_t)fNumLoGainSamples);
     429          pix.SetNumLoGainSamples(fNumLoGainSamples);
    429430          pix.ApplyLoGainConversion();
    430431      }
     
    432433      {
    433434          pix.SetPedestal(ped  * fNumHiGainSamples,
    434                           prms * TMath::Sqrt((Float_t)fNumHiGainSamples),
     435                          prms * fSqrtHiGainSamples,
    435436                          prms * fNumHiGainSamples / num);
    436437      }
     
    471472  {
    472473      avinnerpix->SetPedestal(avinnerped/avinnernum  * fNumLoGainSamples,
    473                          avinnerprms/avinnernum * TMath::Sqrt((Float_t)fNumLoGainSamples),
    474                          avinnerprms/avinnernum * TMath::Sqrt((Float_t)fNumLoGainSamples/avinnernum));
    475       avinnerpix->SetNumLoGainSamples((Float_t)fNumLoGainSamples);
     474                              avinnerprms/avinnernum * fSqrtLoGainSamples,
     475                              avinnerprms/avinnernum * fSqrtLoGainSamples/avinnernum);
     476      avinnerpix->SetNumLoGainSamples(fNumLoGainSamples);
    476477      avinnerpix->ApplyLoGainConversion();
    477478  }
     
    479480  {
    480481      avinnerpix->SetPedestal(avinnerped/avinnernum  * fNumHiGainSamples,
    481                          avinnerprms/avinnernum * TMath::Sqrt((Float_t)fNumHiGainSamples),
    482                          avinnerprms/avinnernum * TMath::Sqrt((Float_t)fNumHiGainSamples/avinnernum));
     482                              avinnerprms/avinnernum * fSqrtHiGainSamples,
     483                              avinnerprms/avinnernum * fSqrtHiGainSamples/avinnernum);
    483484  }
    484485
     
    486487  {
    487488      avouterpix->SetPedestal(avouterped/avouternum  * fNumLoGainSamples,
    488                               avouterprms/avouternum * TMath::Sqrt((Float_t)fNumLoGainSamples),
    489                               avouterprms/avouternum * TMath::Sqrt((Float_t)fNumLoGainSamples/avouternum));
    490       avouterpix->SetNumLoGainSamples((Float_t)fNumLoGainSamples);
     489                              avouterprms/avouternum * fSqrtLoGainSamples,
     490                              avouterprms/avouternum * fSqrtLoGainSamples/avouternum);
     491      avouterpix->SetNumLoGainSamples(fNumLoGainSamples);
    491492      avouterpix->ApplyLoGainConversion();
    492493  }
     
    494495  {
    495496      avouterpix->SetPedestal(avouterped/avouternum  * fNumHiGainSamples,
    496                               avouterprms/avouternum * TMath::Sqrt((Float_t)fNumHiGainSamples),
    497                               avouterprms/avouternum * TMath::Sqrt((Float_t)fNumHiGainSamples/avouternum));
     497                              avouterprms/avouternum * fSqrtHiGainSamples,
     498                              avouterprms/avouternum * fSqrtHiGainSamples/avouternum);
    498499  }
    499500
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc

    r3429 r3446  
    317317                << "   Reduced Sigma: "        << pix->GetRSigmaCharge()
    318318                << "   Nr Phe's: "             << pix->GetPheFFactorMethod()
     319                << " Saturated? :" << pix->IsHiGainSaturation()
    319320                << endl;
    320321          id++;
     
    342343                << "   Reduced Sigma: "        << pix->GetRSigmaCharge()
    343344                << "   Nr Phe's: "             << pix->GetPheFFactorMethod()
     345                << " Saturated? :" << pix->IsHiGainSaturation()
    344346                << endl;
    345347            id++;
     
    366368                << "   Reduced Sigma: "        << pix->GetRSigmaCharge()
    367369                << "   Nr Phe's: "             << pix->GetPheFFactorMethod()
     370                << " Saturated? :" << pix->IsHiGainSaturation()
    368371                << endl;
    369372            id++;
     
    702705      break;
    703706    case 34:
    704       if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK())
    705         return kFALSE;
    706       if ((*this)[idx].IsHiGainSaturation())
    707         val = 1;
    708       else
    709         return kFALSE;
     707      if ((*this)[idx].IsExcluded())
     708        return kFALSE;
     709      val = (*this)[idx].IsHiGainSaturation();
    710710      break;
    711711    case 35:
Note: See TracChangeset for help on using the changeset viewer.