Changeset 5029


Ignore:
Timestamp:
09/15/04 14:27:20 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5028 r5029  
    2828     - set MBadPixelsPix::kLoGainNotFitted only if High-Gain Saturation
    2929       had occurred.
     30
     31   * mhcalib/MHCalibrationChargeCam.cc
     32     - simply calls to IntensityCam somewhat
    3033
    3134
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc

    r5026 r5029  
    12261226      {
    12271227        hist.BypassFit();
    1228         bad.SetUncalibrated( fittyp );
     1228        if (pix.IsHiGainSaturation())
     1229          bad.SetUncalibrated( fittyp );
    12291230      }
    12301231 
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc

    r5014 r5029  
    931931
    932932  TH1F *h = NULL;
     933
     934  MCalibrationCam *chargecam = fIntensCam ? fIntensCam->GetCam() : fCam;
     935  MBadPixelsCam   *badcam    = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
    933936     
    934937  for (Int_t i=0; i<fHiGainArray->GetSize(); i++)
     
    940943        continue;
    941944     
    942       MCalibrationChargePix  &pix    = fIntensCam
    943         ? (MCalibrationChargePix&)(*fIntensCam)[i]
    944         : (MCalibrationChargePix&)(*fCam)[i];
     945      MCalibrationChargePix  &pix = (MCalibrationChargePix&)(*chargecam)[i] ;
    945946
    946947      if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries())
     
    952953        }
    953954
    954       MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
     955      MBadPixelsPix &bad = (*badcam)[i];
    955956
    956957      h = histhi.GetHGausHist();
     
    982983       
    983984        MHCalibrationChargePix &histlo = (MHCalibrationChargePix&)(*this)(i);
    984         MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
     985        MBadPixelsPix          &bad    = (*badcam)[i];
    985986       
    986987        if (histlo.IsExcluded())
     
    10161017          }
    10171018       
    1018         MCalibrationChargePix &pix = fIntensCam
    1019           ? (MCalibrationChargePix&)(*fIntensCam)[i]
    1020           : (MCalibrationChargePix&)(*fCam)[i];
     1019        MCalibrationChargePix  &pix    = (MCalibrationChargePix&)(*chargecam)[i] ;
    10211020       
    10221021        if (pix.IsHiGainSaturation())
     
    10281027     
    10291028      MHCalibrationChargePix &histhi = (MHCalibrationChargePix&)GetAverageHiGainArea(j);     
    1030       MCalibrationChargePix  &pix    = fIntensCam
    1031         ? (MCalibrationChargePix&)fIntensCam->GetAverageArea(j)
    1032         : (MCalibrationChargePix&)fCam->GetAverageArea(j);
     1029      MCalibrationChargePix  &pix    = (MCalibrationChargePix&)chargecam->GetAverageArea(j);
    10331030
    10341031      if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries())
     
    10401037        }
    10411038
    1042       MBadPixelsPix &bad    = fIntensCam
    1043         ? fIntensCam->GetAverageBadArea(j)
    1044         : fCam->GetAverageBadArea(j);
    1045 
     1039      MBadPixelsPix &bad = chargecam->GetAverageBadArea(j);
    10461040      FinalizeAbsTimes(histhi, pix, bad, fFirstHiGain, fLastHiGain);
    10471041   }
     
    10601054          }
    10611055       
    1062         MCalibrationChargePix  &pix    = fIntensCam
    1063           ? (MCalibrationChargePix&)fIntensCam->GetAverageArea(j)
    1064           : (MCalibrationChargePix&)fCam->GetAverageArea(j) ;
     1056        MCalibrationChargePix  &pix    = (MCalibrationChargePix&)chargecam->GetAverageArea(j);
    10651057
    10661058        if (pix.IsHiGainSaturation())
    10671059          {
    1068             MBadPixelsPix &bad    = fIntensCam
    1069               ? fIntensCam->GetAverageBadArea(j) 
    1070               : fCam->GetAverageBadArea(j);     
     1060            MBadPixelsPix &bad = chargecam->GetAverageBadArea(j);
    10711061            FinalizeAbsTimes(histlo, pix, bad, fFirstLoGain, fLastLoGain);
    10721062          }
     
    10781068     
    10791069      MHCalibrationChargePix &histhi = (MHCalibrationChargePix&)GetAverageHiGainSector(j);     
    1080       MCalibrationChargePix  &pix    = fIntensCam
    1081         ? (MCalibrationChargePix&)fIntensCam->GetAverageSector(j) 
    1082         : (MCalibrationChargePix&)fCam->GetAverageSector(j);
     1070      MCalibrationChargePix  &pix    = (MCalibrationChargePix&)chargecam->GetAverageSector(j);
    10831071
    10841072      if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries())
     
    10901078        }
    10911079
    1092       MBadPixelsPix &bad = fIntensCam
    1093         ? fIntensCam->GetAverageBadSector(j)
    1094         : fCam->GetAverageBadSector(j);     
    1095 
     1080      MBadPixelsPix &bad = chargecam->GetAverageBadSector(j);
    10961081      FinalizeAbsTimes(histhi, pix, bad, fFirstHiGain, fLastHiGain);
    10971082    }
     
    11021087       
    11031088        MHCalibrationChargePix &histlo = (MHCalibrationChargePix&)GetAverageLoGainSector(j);     
    1104         MBadPixelsPix          &bad    = fIntensCam
    1105           ? fIntensCam->GetAverageBadSector(j)
    1106           : fCam->GetAverageBadSector(j);       
     1089        MBadPixelsPix          &bad    = chargecam->GetAverageBadSector(j);
    11071090       
    11081091        if (histlo.GetSaturated() > fNumLoGainSaturationLimit*histlo.GetHGausHist()->GetEntries())
     
    11151098          }
    11161099       
    1117         MCalibrationChargePix  &pix    = fIntensCam
    1118           ? (MCalibrationChargePix&)fIntensCam->GetAverageSector(j)
    1119           : (MCalibrationChargePix&)fCam->GetAverageSector(j);
     1100        MCalibrationChargePix  &pix    = (MCalibrationChargePix&)chargecam->GetAverageSector(j);
    11201101
    11211102        if (pix.IsHiGainSaturation())
     
    11261107  // Perform the fitting for the High Gain (done in MHCalibrationCam)
    11271108  //
    1128   FitHiGainArrays(fIntensCam ? (MCalibrationCam&)(*fIntensCam->GetCam()) : (MCalibrationCam&)(*fCam),
    1129                   fIntensBad ?                   (*fIntensBad->GetCam()) : *fBadPixels,
     1109  FitHiGainArrays(*chargecam, *badcam,
    11301110                  MBadPixelsPix::kHiGainNotFitted,
    11311111                  MBadPixelsPix::kHiGainOscillating);
     
    11351115  //
    11361116  if (IsLoGain())
    1137     FitLoGainArrays(fIntensCam ? (MCalibrationCam&)(*fIntensCam->GetCam()) : (MCalibrationCam&)(*fCam),
    1138                     fIntensBad ?                   (*fIntensBad->GetCam()) : *fBadPixels,
     1117    FitLoGainArrays(*chargecam, *badcam,
    11391118                    MBadPixelsPix::kLoGainNotFitted,
    11401119                    MBadPixelsPix::kLoGainOscillating);
     
    11951174{
    11961175
    1197   MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
     1176  MBadPixelsCam   *badcam    = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
     1177  MCalibrationCam *chargecam = fIntensCam ? fIntensCam->GetCam() : fCam;
    11981178     
    11991179  for (Int_t i=0; i<badcam->GetSize(); i++)
     
    12011181     
    12021182      MBadPixelsPix    &bad    = (*badcam)[i];
    1203       MCalibrationPix  &pix    = fIntensCam ? (*fIntensCam)[i] : (*fCam)[i];
     1183      MCalibrationPix  &pix    = (*chargecam)[i];
    12041184
    12051185      if (bad.IsUncalibrated( MBadPixelsPix::kHiGainNotFitted ))
     
    12101190        if (pix.IsHiGainSaturation())
    12111191          bad.SetUnsuitable(   MBadPixelsPix::kUnreliableRun    );
    1212  
     1192
    12131193      if (bad.IsUncalibrated( MBadPixelsPix::kLoGainSaturation ))
    12141194          bad.SetUnsuitable(   MBadPixelsPix::kUnsuitableRun    );
     
    12241204        }
    12251205    }
     1206
     1207
     1208     
    12261209}
    12271210
Note: See TracChangeset for help on using the changeset viewer.