Changeset 4793


Ignore:
Timestamp:
08/29/04 17:04:39 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc

    r4679 r4793  
    616616// 21: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kRelTimeOscillating  )
    617617// 22: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kDeviatingNumPhots   )
     618// 23: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kHiGainOverFlow      )
     619// 24: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kLoGainOverFlow      )
    618620//
    619621Bool_t MBadPixelsCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
     
    739741      val = 1;
    740742      break;
     743    case 23:
     744      if  (!(*this)[idx].IsUncalibrated(MBadPixelsPix::kHiGainOverFlow    ))
     745        return kFALSE;
     746      val = 1;
     747      break;
     748    case 24:
     749      if  (!(*this)[idx].IsUncalibrated(MBadPixelsPix::kLoGainOverFlow   ))
     750        return kFALSE;
     751      val = 1;
     752      break;
    741753    default:
    742754      return kFALSE;
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsPix.h

    r4788 r4793  
    9090
    9191    Int_t  GetUnsuitableCalibration() const   {
    92       if (!IsUnsuitable()) return 0;
     92      if (!IsUnsuitable())                        return 0;
    9393      if (IsUncalibrated( kChargeIsPedestal    )) return 1;
    9494      if (IsUncalibrated( kChargeRelErrNotValid)) return 2;
     
    105105   
    106106    Int_t  GetUnreliableCalibration() const   {
    107       if (!IsUnreliable()) return 0;
     107      if (!IsUnreliable() || IsUnsuitable())      return 0;
    108108      if (IsUncalibrated( kChargeSigmaNotValid )) return 1;
    109109      if (IsUncalibrated( kHiGainNotFitted     )) return 2;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r4781 r4793  
    910910// - MBadPixelsPix::kMeanTimeInLast2Bins
    911911// - MBadPixelsPix::kDeviatingNumPhes
     912// - MBadPixelsPix::kHiGainOverFlow
     913// - MBadPixelsPix::kLoGainOverFlow
    912914//
    913915// - Call MCalibrationPix::SetExcluded() for the bad pixels
     
    941943
    942944      if (bad.IsUncalibrated( MBadPixelsPix::kDeviatingNumPhes ))
     945        bad.SetUnsuitable(   MBadPixelsPix::kUnsuitableRun    );
     946
     947      if (bad.IsUncalibrated( MBadPixelsPix::kHiGainOverFlow   ))
     948        bad.SetUnsuitable(   MBadPixelsPix::kUnsuitableRun    );
     949
     950      if (bad.IsUncalibrated( MBadPixelsPix::kLoGainOverFlow   ))
    943951        bad.SetUnsuitable(   MBadPixelsPix::kUnsuitableRun    );
    944952
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationCam.cc

    r4630 r4793  
    115115    SetPulserFrequency();
    116116
    117     fHiGainOverFlow = 0;
    118     fLoGainOverFlow = 0;
    119117}
    120118
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationCam.h

    r4630 r4793  
    6565  TArrayI    fAverageSectorNum;          // Number of pixels in average pixels per sector
    6666  TArrayI    fRunNumbers;                // Numbers of runs used
    67   UInt_t     fHiGainOverFlow;            // Number of times overflow occurred in whole run
    68   UInt_t     fLoGainOverFlow;            // Number of times overflow occurred in whole run
     67  TArrayI    fHiGainOverFlow;            // Number of times overflow occurred in whole run
     68  TArrayI    fLoGainOverFlow;            // Number of times overflow occurred in whole run
    6969
    7070  MCalibrationCam::PulserColor_t fColor; // Colour of the pulsed LEDs
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc

    r4658 r4793  
    154154using namespace std;
    155155
     156const Int_t   MHCalibrationChargeCam::fgAverageNbinsHiGain       = 3300;
     157const Int_t   MHCalibrationChargeCam::fgAverageNbinsLoGain       = 1950;
    156158const Float_t MHCalibrationChargeCam::fgNumHiGainSaturationLimit = 0.01;
    157159const Float_t MHCalibrationChargeCam::fgNumLoGainSaturationLimit = 0.005;
     
    175177// - fTimeLowerLimit           to fgTimeLowerLimit
    176178// - fTimeUpperLimit           to fgTimeUpperLimit
     179// - fAverageNbins             to fgAverageNbinsHiGain
    177180//
    178181MHCalibrationChargeCam::MHCalibrationChargeCam(const char *name, const char *title)
    179182    : fRawEvt(NULL)
    180183{
     184
    181185  fName  = name  ? name  : "MHCalibrationChargeCam";
    182186  fTitle = title ? title : "Class to fill the calibration histograms ";
     
    187191  SetTimeUpperLimit();
    188192
    189 
     193  SetAverageNbins(fgAverageNbinsHiGain);
    190194}
    191195
     
    220224// Initializes, if empty to MGeomCam::GetNumPixels():
    221225// - MHCalibrationCam::fHiGainArray, MHCalibrationCam::fLoGainArray
     226// - MHCalibrationCam::fHiGainOverflow, MHCalibrationCam::fLoGainOverflow
    222227//
    223228// Initializes, if empty to MGeomCam::GetNumAreas() for:
     
    243248{
    244249
    245   MExtractedSignalCam *signal = (MExtractedSignalCam*)pList->FindObject(AddSerialNumber("MExtractedSignalCam"));
     250  MExtractedSignalCam *signal =
     251    (MExtractedSignalCam*)pList->FindObject(AddSerialNumber("MExtractedSignalCam"));
    246252  if (!signal)
    247253  {
     
    301307        InitHists((*this)[i],(*fBadPixels)[i],i);
    302308      }
     309      fHiGainOverFlow.Set(npixels);
    303310  }
    304311
     
    310317      {
    311318          (*fLoGainArray)[i] = new MHCalibrationChargeLoGainPix;
    312           InitHists((*this)(i),(*fBadPixels)[i],i);
     319          MHGausEvents &lopix = (*this)(i);
     320          //
     321          // Adapt the range for the case, the intense blue is used:
     322          // FIXME: this is a nasty workaround, but for the moment necessary
     323          // in order to avoid default memory space.
     324          //
     325          if (fGeom->InheritsFrom("MGeomCamMagic"))
     326            {
     327              if ( fColor == MCalibrationCam::kBLUE)
     328                {
     329                  lopix.SetLast(999.5);
     330                  lopix.SetNbins(1150);
     331                }
     332            }
     333          InitHists(lopix,(*fBadPixels)[i],i);
    313334      }
    314      
     335      fLoGainOverFlow.Set(npixels); 
    315336  }
    316337
     
    357378
    358379        MHCalibrationChargePix &hist = (MHCalibrationChargePix&)GetAverageLoGainArea(j);
    359 
    360         hist.SetNbins(fAverageNbins);
     380        hist.SetNbins(fgAverageNbinsLoGain);
     381
     382        //
     383        // Adapt the range for the case, the intense blue is used:
     384        // FIXME: this is a nasty workaround, but for the moment necessary
     385        // in order to avoid default memory space.
     386        //
     387        if (fGeom->InheritsFrom("MGeomCamMagic"))
     388            {
     389              if ( fColor == MCalibrationCam::kBLUE)
     390                {
     391                  hist.SetFirst(-10.5);
     392                  hist.SetLast(999.5);
     393                  hist.SetNbins(3030);
     394                }
     395            }
     396
    361397        hist.GetHAbsTime()->SetTitle("Absolute Arrival Time average LoGain Area Idx ");
    362398
     
    410446
    411447          hist.GetHGausHist()->SetTitle("Summed FADC slices average LoGain Sector ");
    412           hist.SetNbins(fAverageNbins);
     448          hist.SetNbins(fgAverageNbinsLoGain);
     449         
     450          //
     451          // Adapt the range for the case, the intense blue is used:
     452          // FIXME: this is a nasty workaround, but for the moment necessary
     453          // in order to avoid default memory space.
     454          //
     455          if (fGeom->InheritsFrom("MGeomCamMagic"))
     456            {
     457              if ( fColor == MCalibrationCam::kBLUE)
     458                {
     459                  hist.SetFirst(-10.5);
     460                  hist.SetLast(999.5);
     461                  hist.SetNbins(3030);
     462                }
     463            }
     464         
    413465          hist.GetHAbsTime()->SetTitle("Absolute Arrival Time average LoGain Sector ");
    414466
    415467          InitHists(hist,fCam->GetAverageBadSector(j),j);
    416          
    417468      }
    418469  }
     
    494545
    495546      if (!histhi.FillHistAndArray(sumhi))
    496         fHiGainOverFlow++;
     547        fHiGainOverFlow[i]++;
     548
    497549      if (!histlo.FillHistAndArray(sumlo))
    498         fLoGainOverFlow++;
    499      
     550        fLoGainOverFlow[i]++;
     551
    500552      const Int_t sathi = (Int_t)pix.GetNumHiGainSaturated();
    501553      const Int_t satlo = (Int_t)pix.GetNumLoGainSaturated();
     
    615667  *fLog << endl;
    616668
    617   if (fHiGainOverFlow)
    618     *fLog << warn << GetDescriptor()
    619           << ": Histogram Overflow has occurred " << fHiGainOverFlow << " in the High-Gain! " << endl;
    620   if (fLoGainOverFlow)
    621     *fLog << warn << GetDescriptor()
    622           << ": Histogram Overflow has occurred " << fLoGainOverFlow << " in the Low-Gain! " << endl;
    623 
    624669  for (Int_t i=0; i<fHiGainArray->GetSize(); i++)
    625670    {
     
    639684        }
    640685
     686      if (fHiGainOverFlow[i])
     687        {
     688          *fLog << warn << GetDescriptor()
     689                << ": Hi-Gain Histogram Overflow occurred " << fHiGainOverFlow[i]
     690                << " times in pixel: " << i << " (without saturation!) " << endl;
     691          bad.SetUncalibrated( MBadPixelsPix::kHiGainOverFlow );
     692        }
     693     
    641694      FinalizeAbsTimes(histhi, pix, bad, fFirstHiGain, fLastHiGain);
    642695    }
     
    659712        }
    660713 
     714      if (fLoGainOverFlow[i])
     715        {
     716          *fLog << warn << GetDescriptor()
     717                << ": Lo-Gain Histogram Overflow occurred " << fLoGainOverFlow[i]
     718                << " times in pixel: " << i << " (without saturation!) " << endl;
     719          bad.SetUncalibrated( MBadPixelsPix::kLoGainOverFlow );
     720        }
     721
    661722      MCalibrationChargePix &pix    = (MCalibrationChargePix&)(*fCam)[i];
    662723     
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h

    r4602 r4793  
    1818{
    1919private:
     20
     21  static const Int_t   fgAverageNbinsHiGain;         //! The default for fAverageNbins HiGain (now set to: 3300)
     22  static const Int_t   fgAverageNbinsLoGain;         //! The default for fAverageNbins LoGain (now set to: 1950) 
    2023
    2124  static const Float_t fgNumHiGainSaturationLimit;   //! The default for fNumHiGainSaturationLimit (now at: 0.01)
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r4790 r4793  
    282282    MHCamera disp23(geomcam, "Excluded",          "Pixels previously excluded");
    283283    MHCamera disp24(geomcam, "UnSuitable",        "Pixels not suited for further analysis");
    284     MHCamera disp25(geomcam, "UnReliable",        "Pixels not reliable for further analysis");
     284    MHCamera disp25(geomcam, "UnReliable",        "Pixels suitable, but not reliable for further analysis");
    285285    MHCamera disp26(geomcam, "HiGainOscillating", "Oscillating Pixels High Gain");
    286286    MHCamera disp27(geomcam, "LoGainOscillating", "Oscillating Pixels Low Gain");
     
    778778      pave2->AddText("  ");
    779779      TText *t3 = pave2->AddText(Form("Signal Sigma smaller Pedestal RMS:      %3i pixels",
    780                                        CountBadPixels(&disp24,1)));
     780                                       CountBadPixels(&disp25,1)));
    781781      t3->SetTextColor(gStyle->GetColorPalette(Int_t(1./max*numcol + 1.)));
    782782      t3->SetTextAlign(12);
     
    801801      tt5->SetTextColor(gStyle->GetColorPalette(Int_t(6./max2*numcol + 1.)));
    802802      tt5->SetTextAlign(12);
    803       TText *tt6 = pave2->AddText(Form("Relative Arr. Times Oscillation:              %3i pixels",
     803      TText *tt6 = pave2->AddText(Form("Relative Arr. Times Oscillation:               %3i pixels",
    804804                                       CountBadPixels(&disp25,7)));
    805805      tt6->SetTextColor(gStyle->GetColorPalette(Int_t(7./max2*numcol + 1.)));
Note: See TracChangeset for help on using the changeset viewer.