Ignore:
Timestamp:
04/27/07 11:05:11 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhcalib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc

    r8417 r8452  
    7878#include "MLogManip.h"
    7979
    80 #include "MCalibrationIntensityCam.h"
    8180#include "MCalibrationCam.h"
    8281#include "MCalibrationPix.h"
     
    144143    fHistXTitle(gsHistXTitle),fHistYTitle(gsHistYTitle),
    145144    fCurrentNumEvts(0), fColor(MCalibrationCam::kNONE),
    146     fBadPixels(NULL), fIntensCam(NULL), fCam(NULL), fGeom(NULL),
     145    fBadPixels(NULL), fCam(NULL), fGeom(NULL),
    147146    fRunHeader(NULL)
    148147{
     
    606605  if (!fBadPixels)
    607606  {
     607      /*
    608608      fBadPixels = (MBadPixelsCam*)pList->FindCreateObj(AddSerialNumber("MBadPixelsCam"));
    609609      if (!fBadPixels)
    610610          return kFALSE;
    611611
    612       fBadPixels->InitSize(npixels);
     612          fBadPixels->InitSize(npixels);
     613          */
     614      *fLog << err << "MBadPixelsCam not found... abort." << endl;
     615      return kFALSE;
    613616  }
    614617
     
    762765          }
    763766        else
    764           InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j);
     767          InitHists(pix, fCam->GetAverageBadArea(j),j);
    765768      }
    766769  }
     
    775778
    776779          pix.SetBinning(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nsectors), fFirst, fLast);
    777          
    778           InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
     780
     781          InitHists(pix, fCam->GetAverageBadSector(j),j);
    779782      }
    780783  }
     
    835838          }
    836839        else
    837           InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j);
     840          InitHists(pix, fCam->GetAverageBadArea(j),j);
    838841      }
    839842  }
     
    849852          pix.SetBinning(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nsectors), fFirst, fLast);
    850853         
    851           InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
     854          InitHists(pix, fCam->GetAverageBadSector(j),j);
    852855      }
    853856  }
     
    10341037// -------------------------------------------------------------
    10351038//
    1036 // - Searches for the CalibrationIntensity*Cam corresponding to 'name'.
    1037 // - In case, it does not exist in the parameter list, it searches
    1038 //   for the corresponding MCalibration*Cam.
     1039// - Searches for the Calibration*Cam corresponding to 'name'.
    10391040// - Initializes the MCalibration*Cam, if not yet done.
    10401041//
     
    10421043{
    10431044
    1044   TString intensname = "MCalibrationIntensity";
    1045   intensname += name;
    1046   intensname += "Cam";
    1047 
    1048   TString ordname    = "MCalibration";
    1049   ordname    += name;
    1050   ordname    += "Cam";
    1051 
    1052   fIntensCam = (MCalibrationIntensityCam*)plist->FindObject(AddSerialNumber(intensname));
    1053   if (fIntensCam)
    1054     *fLog << inf << "Found " << intensname << "... " << endl;
    1055   else
    1056     {
    1057       fCam = (MCalibrationCam*)plist->FindObject(AddSerialNumber(ordname));
     1045  TString ordname = "MCalibration";
     1046  ordname += name;
     1047  ordname += "Cam";
     1048
     1049  fCam = (MCalibrationCam*)plist->FindObject(AddSerialNumber(ordname));
     1050  if (!fCam)
     1051  {
     1052      fCam = (MCalibrationCam*)plist->FindCreateObj(AddSerialNumber(ordname));
    10581053      if (!fCam)
    1059         {
    1060           fCam = (MCalibrationCam*)plist->FindCreateObj(AddSerialNumber(ordname));
    1061           if (!fCam)
    1062               return kFALSE;
    1063 
    1064           fCam->Init(*fGeom);
    1065         }
    1066     }
     1054          return kFALSE;
     1055
     1056      fCam->Init(*fGeom);
     1057  }
     1058
    10671059  return kTRUE;
    10681060}
     
    11821174  if (!IsAverageing())
    11831175    return;
    1184  
    1185   MCalibrationCam *cam = fIntensCam ? fIntensCam->GetCam() : fCam;
     1176
     1177  MCalibrationCam *cam = fCam;
    11861178  if (!cam)
    11871179    return;
    1188  
     1180
    11891181  for (UInt_t j=0; j<fGeom->GetNumAreas(); j++)
    11901182    {
    1191  
     1183
    11921184      MCalibrationPix &pix    = cam->GetAverageArea(j);
    11931185
     
    12411233  if (hist.IsEmpty())
    12421234  {
    1243       *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram empty." << endl;
     1235      //*fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram empty." << endl;
     1236      //bad.SetUncalibrated( fittyp );
     1237      return;
     1238  }
     1239  if (hist.IsOnlyOverflow())
     1240  {
     1241      *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only overflows (Check Binning!)." << endl;
    12441242      bad.SetUncalibrated( fittyp );
    12451243      return;
    12461244  }
    1247   if (hist.IsOnlyOverflow())
    1248   {
    1249       *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only overflows." << endl;
    1250       bad.SetUncalibrated( fittyp );
    1251       return;
    1252   }
    12531245  if (hist.IsOnlyUnderflow())
    12541246  {
    1255       *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only underflows." << endl;
     1247      *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only underflows (Check Binning!)." << endl;
    12561248      bad.SetUncalibrated( fittyp );
    12571249      return;
     
    13461338  if (hist.IsEmpty())
    13471339  {
    1348       // *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram empty." << endl;
     1340      //*fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram empty." << endl;
     1341      //bad.SetUncalibrated( fittyp ); // FIXME: Combine with HiGain!
     1342      return;
     1343  }
     1344  if (hist.IsOnlyOverflow())
     1345  {
     1346      *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only overflows (Check Binning!)." << endl;
    13491347      bad.SetUncalibrated( fittyp );
    13501348      return;
    13511349  }
    1352   if (hist.IsOnlyOverflow())
    1353   {
    1354       *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only overflows." << endl;
    1355       bad.SetUncalibrated( fittyp );
    1356       return;
    1357   }
    13581350  if (hist.IsOnlyUnderflow())
    13591351  {
    1360       *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only underflows." << endl;
     1352      *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only underflows (Check Binning!)." << endl;
    13611353      bad.SetUncalibrated( fittyp );
    13621354      return;
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h

    r8417 r8452  
    2929class MGeomCam;
    3030class MRawRunHeader;
    31 class MCalibrationIntensityCam;
    3231class MCalibrationCam;
    3332class MCalibrationPix;
     
    10099
    101100  MBadPixelsCam    *fBadPixels;           //! Bad Pixels storage container
    102   MCalibrationIntensityCam *fIntensCam;   //! Intensity Calibration Cam with the results
    103101  MCalibrationCam  *fCam;                 //! Calibration Cam with the results
    104102  MGeomCam         *fGeom;                //! Camera geometry
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc

    r8446 r8452  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.57 2007-04-25 14:39:43 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.58 2007-04-27 10:04:47 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    143143#include "MHCalibrationPix.h"
    144144
    145 #include "MCalibrationIntensityCam.h"
    146145#include "MCalibrationChargeCam.h"
    147146#include "MCalibrationChargePix.h"
     
    339338// Gets or creates the pointers to:
    340339// - MExtractedSignalCam
    341 // - MCalibrationChargeCam or MCalibrationIntensityChargeCam
     340// - MCalibrationChargeCam
    342341// - MBadPixelsCam
    343342//
     
    472471        pix.SetBinningAbsTime(higainsamples, -0.5, higainsamples-0.5);
    473472
    474         InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j);
     473        InitHists(pix, fCam->GetAverageBadArea(j),j);
    475474
    476475        h =  pix.GetHAbsTime();
     
    498497          pix.SetBinningAbsTime(higainsamples, -0.5, higainsamples-0.5);
    499498
    500           InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
     499          InitHists(pix, fCam->GetAverageBadSector(j),j);
    501500
    502501          h =  pix.GetHAbsTime();
     
    582581          pix.SetBinningAbsTime(logainsamples, -0.5, logainsamples-0.5);
    583582         
    584           InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j);
     583          InitHists(pix, fCam->GetAverageBadArea(j),j);
    585584
    586585          h =  pix.GetHAbsTime();
     
    609608        pix.SetBinningAbsTime(logainsamples, -0.5, logainsamples-0.5);
    610609       
    611         InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
     610        InitHists(pix, fCam->GetAverageBadSector(j),j);
    612611
    613612        h =  pix.GetHAbsTime();
     
    862861  TH1F *h = NULL;
    863862
    864   MCalibrationCam *chargecam = fIntensCam ? fIntensCam->GetCam() : fCam;
    865 
    866863  const Int_t hifirst = fSignal->GetFirstUsedSliceHiGain();
    867864  const Int_t hilast  = fSignal->GetLastUsedSliceHiGain();
     
    871868  for (Int_t i=0; i<fHiGainArray->GetSize(); i++)
    872869    {
    873      
     870
    874871      MHCalibrationChargePix &histhi = (MHCalibrationChargePix&)(*this)[i];
    875      
    876872      if (histhi.IsExcluded())
    877873        continue;
    878874
    879       MCalibrationChargePix  &pix = (MCalibrationChargePix&)(*chargecam)[i] ;
     875      MCalibrationChargePix  &pix = (MCalibrationChargePix&)(*fCam)[i];
    880876
    881877      const Int_t numsat = histhi.GetSaturated();
     
    935931          }
    936932
    937         MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i] ;
     933        MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i] ;
    938934        if (!pix.IsHiGainSaturation())
    939935            continue;
     
    966962     
    967963      MHCalibrationChargePix &histhi = (MHCalibrationChargePix&)GetAverageHiGainArea(j);     
    968       MCalibrationChargePix  &pix    = (MCalibrationChargePix&)chargecam->GetAverageArea(j);
     964      MCalibrationChargePix  &pix    = (MCalibrationChargePix&)fCam->GetAverageArea(j);
    969965
    970966      if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries())
     
    976972        }
    977973
    978       MBadPixelsPix &bad = chargecam->GetAverageBadArea(j);
     974      MBadPixelsPix &bad = fCam->GetAverageBadArea(j);
    979975      FinalizeAbsTimes(histhi, pix, bad, hifirst, hilast);
    980976   }
     
    994990          }
    995991       
    996         MCalibrationChargePix  &pix    = (MCalibrationChargePix&)chargecam->GetAverageArea(j);
    997 
     992        MCalibrationChargePix &pix = (MCalibrationChargePix&)fCam->GetAverageArea(j);
    998993        if (pix.IsHiGainSaturation())
    999994          {
    1000             MBadPixelsPix &bad = chargecam->GetAverageBadArea(j);
     995            MBadPixelsPix &bad = fCam->GetAverageBadArea(j);
    1001996            FinalizeAbsTimes(histlo, pix, bad, lofirst, lolast);
    1002997          }
    1003        
     998
    1004999      }
    10051000 
     
    10081003     
    10091004      MHCalibrationChargePix &histhi = (MHCalibrationChargePix&)GetAverageHiGainSector(j);     
    1010       MCalibrationChargePix  &pix    = (MCalibrationChargePix&)chargecam->GetAverageSector(j);
     1005      MCalibrationChargePix  &pix    = (MCalibrationChargePix&)fCam->GetAverageSector(j);
    10111006
    10121007      if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries())
     
    10181013        }
    10191014
    1020       MBadPixelsPix &bad = chargecam->GetAverageBadSector(j);
     1015      MBadPixelsPix &bad = fCam->GetAverageBadSector(j);
    10211016      FinalizeAbsTimes(histhi, pix, bad, hifirst, hilast);
    10221017    }
     
    10251020    for (Int_t j=0; j<fAverageLoGainSectors->GetSize(); j++)
    10261021      {
    1027        
     1022
    10281023        MHCalibrationChargePix &histlo = (MHCalibrationChargePix&)GetAverageLoGainSector(j);     
    1029         MBadPixelsPix          &bad    = chargecam->GetAverageBadSector(j);
    1030        
     1024        MBadPixelsPix          &bad    = fCam->GetAverageBadSector(j);
     1025
    10311026        if (histlo.GetSaturated() > fNumLoGainSaturationLimit*histlo.GetHGausHist()->GetEntries())
    10321027          {
     
    10371032            continue;
    10381033          }
    1039        
    1040         MCalibrationChargePix  &pix    = (MCalibrationChargePix&)chargecam->GetAverageSector(j);
    1041 
     1034
     1035        MCalibrationChargePix &pix = (MCalibrationChargePix&)fCam->GetAverageSector(j);
    10421036        if (pix.IsHiGainSaturation())
    10431037          FinalizeAbsTimes(histlo, pix, bad, lofirst, lolast);
     
    10471041  // Perform the fitting for the High Gain (done in MHCalibrationCam)
    10481042  //
    1049   FitHiGainArrays(*chargecam, *fBadPixels,
     1043  FitHiGainArrays(*fCam, *fBadPixels,
    10501044                  MBadPixelsPix::kHiGainNotFitted,
    10511045                  MBadPixelsPix::kHiGainOscillating);
     
    10551049  //
    10561050  if (IsLoGain())
    1057     FitLoGainArrays(*chargecam, *fBadPixels,
     1051    FitLoGainArrays(*fCam, *fBadPixels,
    10581052                    MBadPixelsPix::kLoGainNotFitted,
    10591053                    MBadPixelsPix::kLoGainOscillating);
     
    10711065          continue;
    10721066
    1073       MCalibrationChargePix  &pix = (MCalibrationChargePix&)(*chargecam)[i] ;
     1067      MCalibrationChargePix  &pix = (MCalibrationChargePix&)(*fCam)[i];
    10741068      if (!pix.IsHiGainSaturation())
    10751069          continue;
     
    11431137{
    11441138
    1145   MCalibrationCam *chargecam = fIntensCam ? fIntensCam->GetCam() : fCam;
    1146      
    11471139  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
    11481140    {
    1149      
    1150       MBadPixelsPix    &bad    = (*fBadPixels)[i];
    1151       MCalibrationPix  &pix    = (*chargecam)[i];
     1141
     1142      MBadPixelsPix &bad = (*fBadPixels)[i];
     1143      MCalibrationPix &pix = (*fCam)[i];
    11521144
    11531145      if (bad.IsUncalibrated(MBadPixelsPix::kHiGainNotFitted))
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc

    r8428 r8452  
    125125
    126126const Float_t MHCalibrationRelTimeCam::fgNumHiGainSaturationLimit = 0.25;
    127 const UInt_t  MHCalibrationRelTimeCam::fgReferencePixel = 1;
     127//const UInt_t  MHCalibrationRelTimeCam::fgReferencePixel = 1;
    128128const Int_t   MHCalibrationRelTimeCam::fgNbins      = 400;
    129129const Axis_t  MHCalibrationRelTimeCam::fgFirst      = -9.975;
     
    141141//
    142142// Sets:
    143 // - fReferencePixel to fgReferencePixel
    144143// - fNbins to fgNbins
    145144// - fFirst to fgFirst
     
    159158  SetNumHiGainSaturationLimit(fgNumHiGainSaturationLimit);
    160159
    161   SetReferencePixel();
     160//  SetReferencePixel();
    162161
    163162  SetBinning(fgNbins, fgFirst, fgLast);
     
    263262    return kFALSE;
    264263
    265   MArrivalTimeCam *signal = (MArrivalTimeCam*)pList->FindObject("MArrivalTimeCam");
    266   if (!signal)
    267   {
    268       *fLog << err << "MArrivalTimeCam not found... abort." << endl;
    269       return kFALSE;
    270   }
    271 
    272264  const Int_t npixels  = fGeom->GetNumPixels();
    273265  const Int_t nsectors = fGeom->GetNumSectors();
     
    313305      return kFALSE;
    314306    }
    315  
     307
    316308  const Int_t npixels  = fGeom->GetNumPixels();
    317309  const Int_t nareas   = fGeom->GetNumAreas();
     
    327319  fNumsectorlo.Reset();
    328320
    329   const MArrivalTimePix &refpix = (*arrtime)[fReferencePixel];
    330   // FIXME: What do we do if pixel is invalid?
    331   if (!refpix.IsArrivalTimeValid())
     321  TArrayF arr(npixels);
     322  Int_t n = 0;
     323  for (Int_t i=0; i<npixels; i++)
    332324  {
    333       gLog << warn << "WARNING - Arrival time in refrence pixel " << fReferencePixel << " invalid." << endl;
    334       return kTRUE;
     325      if ((*fGeom)[i].GetAidx()>0)
     326          continue;
     327
     328      const MArrivalTimePix &pix = (*arrtime)[i];
     329      if (pix.IsHiGainValid() && !pix.IsHiGainSaturated())
     330          arr[n++] = pix.GetArrivalTimeHiGain();
    335331  }
    336332
    337   const Float_t reftime = refpix.GetArrivalTime();
    338 //      refpix.IsHiGainSaturated()
    339 //     ? refpix.GetArrivalTimeLoGain() : refpix.GetArrivalTimeHiGain();
     333  const Float_t reftime = TMath::Median(n, arr.GetArray());
    340334
    341335  for (Int_t i=0; i<npixels; i++)
     
    345339          continue;
    346340
    347       const Int_t aidx   = (*fGeom)[i].GetAidx();
    348       const Int_t sector = (*fGeom)[i].GetSector();
    349 
    350341      const MArrivalTimePix &pix = (*arrtime)[i];
    351342
     
    361352              histhi.FillHist(time-reftime);
    362353
     354          const Int_t aidx   = (*fGeom)[i].GetAidx();
     355          const Int_t sector = (*fGeom)[i].GetSector();
     356
    363357          fSumareahi  [aidx]   += time;
    364358          fNumareahi  [aidx]   ++;
     
    373367/*
    374368      // If lo-gain arrival time has been extracted successfully,
    375       // the hi-gain has saturateed and the lo-gain is switched on
     369      // the hi-gain has saturated and the lo-gain is switched on
    376370      // fill hi-gain histograms and arrays
    377371      if (pix.IsLoGainValid() && IsLoGain())
    378372      {
    379373          const Float_t time = pix.GetArrivalTimeLoGain();
     374
     375          // FIXME: We need the reference time of the lo-gains!
    380376
    381377          MHCalibrationPix &histlo = (*this)(i);
     
    393389
    394390  for (Int_t j=0; j<nareas; j++)
    395     {
    396       MHCalibrationPix &histhi = GetAverageHiGainArea(j);
    397       if (IsOscillations())
    398           histhi.FillHistAndArray(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]);
    399       else
    400           histhi.FillHist(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]);
    401 
    402       if (IsLoGain())
    403         {
     391  {
     392      if (fNumareahi[j]>0)
     393      {
     394          MHCalibrationPix &histhi = GetAverageHiGainArea(j);
     395          if (IsOscillations())
     396              histhi.FillHistAndArray(fSumareahi[j]/fNumareahi[j]);
     397          else
     398              histhi.FillHist(fSumareahi[j]/fNumareahi[j]);
     399      }
     400
     401      if (IsLoGain() && fNumarealo[j]>0)
     402      {
    404403          MHCalibrationPix &histlo = GetAverageLoGainArea(j);
    405           if (IsOscillations())
    406               histlo.FillHistAndArray(fNumarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]);
     404          if (IsOscillations())
     405              histlo.FillHistAndArray(fSumarealo[j]/fNumarealo[j]);
    407406          else
    408               histlo.FillHist(fNumarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]);
    409         }
    410     }
    411  
     407              histlo.FillHist(fSumarealo[j]/fNumarealo[j]);
     408      }
     409  }
     410
    412411  for (Int_t j=0; j<nsectors; j++)
    413     {
    414       MHCalibrationPix &histhi = GetAverageHiGainSector(j);
    415       if (IsOscillations())
    416           histhi.FillHistAndArray(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]);
    417       else
    418           histhi.FillHist(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]);
    419 
    420       if (IsLoGain())
    421         {
     412  {
     413      if (fNumsectorhi[j]>0)
     414      {
     415          MHCalibrationPix &histhi = GetAverageHiGainSector(j);
     416          if (IsOscillations())
     417              histhi.FillHistAndArray(fSumsectorhi[j]/fNumsectorhi[j]);
     418          else
     419              histhi.FillHist(fSumsectorhi[j]/fNumsectorhi[j]);
     420      }
     421
     422      if (IsLoGain() && fNumsectorlo[j]>0)
     423      {
    422424          MHCalibrationPix &histlo = GetAverageLoGainSector(j);
    423           if (IsOscillations())
    424               histlo.FillHistAndArray(fNumsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]);
     425          if (IsOscillations())
     426              histlo.FillHistAndArray(fSumsectorlo[j]/fNumsectorlo[j]);
    425427          else
    426               histlo.FillHist(fNumsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]);
    427         }
    428     }
     428              histlo.FillHist(fSumsectorlo[j]/fNumsectorlo[j]);
     429      }
     430  }
    429431
    430432  return kTRUE;
     
    459461      if (histhi.IsExcluded())
    460462        continue;
    461      
     463
    462464      const Int_t aidx   = (*fGeom)[i].GetAidx();
    463465      const Int_t sector = (*fGeom)[i].GetSector();
     
    562564
    563565      if (bad.IsUncalibrated( MBadPixelsPix::kRelTimeNotFitted ))
    564         bad.SetUnsuitable(   MBadPixelsPix::kUnreliableRun    );
     566          bad.SetUnsuitable(   MBadPixelsPix::kUnreliableRun    );
    565567
    566568      if (bad.IsUncalibrated( MBadPixelsPix::kRelTimeOscillating))
    567         bad.SetUnsuitable(   MBadPixelsPix::kUnreliableRun    );
    568      
     569          bad.SetUnsuitable(   MBadPixelsPix::kUnreliableRun    );
     570
    569571    }
    570572}
     
    577579// ==============
    578580//
    579 // 0: Fitted Mean Relative Arrival Time in FADC slices (MHGausEvents::GetMean()
    580 // 1: Error Mean Relative Arrival Time in FADC slices  (MHGausEvents::GetMeanErr()
     581// 0: Fitted Mean  Relative Arrival Time in FADC slices (MHGausEvents::GetMean()
     582// 1: Error  Mean  Relative Arrival Time in FADC slices (MHGausEvents::GetMeanErr()
    581583// 2: Sigma fitted Relative Arrival Time in FADC slices (MHGausEvents::GetSigma()
    582 // 3: Error Sigma Relative Arrival Time in FADC slices (MHGausEvents::GetSigmaErr()
     584// 3: Error Sigma  Relative Arrival Time in FADC slices (MHGausEvents::GetSigmaErr()
    583585//
    584586// Useful variables derived from the fit results:
    585587// =============================================
    586588//
    587 // 4: Returned probability of Gauss fit              (calls: MHGausEvents::GetProb())
     589// 4: Returned probability of Gauss fit  (MHGausEvents::GetProb())
    588590//
    589591// Localized defects:
    590592// ==================
    591593//
    592 // 5: Gaus fit not OK                               (calls: MHGausEvents::IsGausFitOK())
    593 // 6: Fourier spectrum not OK                       (calls: MHGausEvents::IsFourierSpectrumOK())
     594// 5: Gaus fit not OK                    (MHGausEvents::IsGausFitOK())
     595// 6: Fourier spectrum not OK            (MHGausEvents::IsFourierSpectrumOK())
    594596//
    595597Bool_t MHCalibrationRelTimeCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
     
    849851    }
    850852
    851     if (IsEnvDefined(env, prefix, "ReferencePixel", print))
    852     {
    853         SetReferencePixel(GetEnvValue(env, prefix, "ReferencePixel", (Int_t)fReferencePixel));
    854         rc = kTRUE;
    855     }
    856 
    857853    TEnv refenv(fReferenceFile);
    858854
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.h

    r8001 r8452  
    2222
    2323  static const Float_t fgNumHiGainSaturationLimit;   //! The default for fNumHiGainSaturationLimit (now at: 0.25)
    24   static const UInt_t  fgReferencePixel;             //! Default for fReferencePixel   (now set to: 1)
    2524  static const Int_t   fgNbins;                      //! Default number of bins        (now set to: 900   )
    2625  static const Axis_t  fgFirst;                      //! Default lower histogram limit (now set to: -13.5 )
     
    3534  static const TString fgReferenceFile;              //! default for fReferenceFile ("mjobs/calibrationref.rc")
    3635
    37   UInt_t  fReferencePixel;                           // The reference pixel for rel. times
    3836  Float_t fInnerRefTime;                             // The reference mean arrival time inner pixels
    3937  Float_t fOuterRefTime;                             // The reference mean arrival time outer pixels
     
    6664  ~MHCalibrationRelTimeCam() {}
    6765
    68   UInt_t GetReferencePixel() const { return fReferencePixel; }
    69 
    7066  // Clone
    7167  TObject *Clone(const char *name="") const;
    7268
    7369  // Setters
    74   void  SetReferencePixel( const UInt_t i=fgReferencePixel   ) { fReferencePixel = i;   }
    7570  void  SetReferenceFile ( const TString ref=fgReferenceFile ) { fReferenceFile  = ref; }
    7671
Note: See TracChangeset for help on using the changeset viewer.