Ignore:
Timestamp:
04/18/07 16:34:51 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhcalib
Files:
7 edited

Legend:

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

    r8366 r8417  
    8282#include "MCalibrationPix.h"
    8383
    84 #include "MBadPixelsIntensityCam.h"
    8584#include "MBadPixelsCam.h"
    8685#include "MBadPixelsPix.h"
     
    144143    fHistName(gsHistName),fHistTitle(gsHistTitle),
    145144    fHistXTitle(gsHistXTitle),fHistYTitle(gsHistYTitle),
    146     fCurrentNumEvts(0),
    147     fColor(MCalibrationCam::kNONE), fIntensBad(NULL),
     145    fCurrentNumEvts(0), fColor(MCalibrationCam::kNONE),
    148146    fBadPixels(NULL), fIntensCam(NULL), fCam(NULL), fGeom(NULL),
    149147    fRunHeader(NULL)
     
    568566//
    569567// Gets or creates the pointers to:
    570 // - MBadPixelsIntensityCam
    571568// - MBadPixelsCam
    572569//
     
    606603  const Int_t nareas   = fGeom->GetNumAreas();
    607604
    608   fIntensBad = (MBadPixelsIntensityCam*)pList->FindObject(AddSerialNumber("MBadPixelsIntensityCam"));
    609   if (fIntensBad)
    610     *fLog << inf << "Found MBadPixelsIntensityCam ... " << endl;
    611   else
    612     {
    613       fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam");
     605  fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam");
     606  if (!fBadPixels)
     607  {
     608      fBadPixels = (MBadPixelsCam*)pList->FindCreateObj(AddSerialNumber("MBadPixelsCam"));
    614609      if (!fBadPixels)
    615         {
    616          
    617           fBadPixels = (MBadPixelsCam*)pList->FindCreateObj(AddSerialNumber("MBadPixelsCam"));
    618           if (!fBadPixels)
    619               return kFALSE;
    620 
    621           fBadPixels->InitSize(npixels);
    622         }
    623     }
    624  
     610          return kFALSE;
     611
     612      fBadPixels->InitSize(npixels);
     613  }
     614
    625615  if (IsAverageing())
    626616    {
     
    644634      for (Int_t i=0; i<npixels; i++)
    645635        {
    646          
    647           MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
    648           if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
     636
     637          if ((*fBadPixels)[i].IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
    649638            continue;
    650639         
     
    746735        pix.SetProbLimit(fProbLimit);
    747736       
    748         MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
    749         InitHists(pix,bad,i);
     737        InitHists(pix, (*fBadPixels)[i], i);
    750738
    751739        if (fCam)
     
    823811        pix.SetProbLimit(fProbLimit);
    824812       
    825         MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
    826         InitHists(pix,bad,i);
     813        InitHists(pix, (*fBadPixels)[i], i);
    827814      }
    828815  }
     
    12551242  {
    12561243      *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram empty." << endl;
     1244      bad.SetUncalibrated( fittyp );
    12571245      return;
    12581246  }
     
    12601248  {
    12611249      *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only overflows." << endl;
     1250      bad.SetUncalibrated( fittyp );
    12621251      return;
    12631252  }
     
    12651254  {
    12661255      *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only underflows." << endl;
     1256      bad.SetUncalibrated( fittyp );
    12671257      return;
    12681258  }
     
    13571347  {
    13581348      // *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram empty." << endl;
     1349      bad.SetUncalibrated( fittyp );
    13591350      return;
    13601351  }
     
    13621353  {
    13631354      *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only overflows." << endl;
     1355      bad.SetUncalibrated( fittyp );
    13641356      return;
    13651357  }
     
    13671359  {
    13681360      *fLog << warn << "Pixel  " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only underflows." << endl;
     1361      bad.SetUncalibrated( fittyp );
    13691362      return;
    13701363  }
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h

    r8366 r8417  
    3232class MCalibrationCam;
    3333class MCalibrationPix;
    34 class MBadPixelsIntensityCam;
    3534class MBadPixelsCam;
    3635class MBadPixelsPix;
     
    10099  MCalibrationCam::PulserColor_t fColor;  // Colour of the pulsed LEDs
    101100
    102   MBadPixelsIntensityCam *fIntensBad;     //! Bad Pixels intensity calibration storage container 
    103101  MBadPixelsCam    *fBadPixels;           //! Bad Pixels storage container
    104102  MCalibrationIntensityCam *fIntensCam;   //! Intensity Calibration Cam with the results
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc

    r8365 r8417  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.55 2007-03-04 14:46:44 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.56 2007-04-18 15:33:56 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    150150#include "MGeomPix.h"
    151151
    152 #include "MBadPixelsIntensityCam.h"
    153152#include "MBadPixelsCam.h"
    154153#include "MBadPixelsPix.h"
     
    429428{
    430429 
    431   MBadPixelsCam *badcam    = fIntensBad
    432     ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
    433 
    434430  TH1F *h;
    435431
     
    450446        pix.SetBinningAbsTime(higainsamples, -0.5, higainsamples-0.5);
    451447
    452         InitHists(pix,(*badcam)[i],i);
     448        InitHists(pix,(*fBadPixels)[i], i);
    453449
    454450        h = pix.GetHAbsTime();
     
    541537
    542538
    543   MBadPixelsCam *badcam    = fIntensBad
    544     ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
    545 
    546539  const Int_t logainsamples = fRunHeader->GetNumSamplesLoGain();
    547540
     
    564557          pix.SetBlackoutLimit(fgLoGainBlackoutLimit);
    565558
    566           InitHists(pix,(*badcam)[i],i);
     559          InitHists(pix,(*fBadPixels)[i], i);
    567560
    568561          h = pix.GetHAbsTime();
     
    870863
    871864  MCalibrationCam *chargecam = fIntensCam ? fIntensCam->GetCam() : fCam;
    872   MBadPixelsCam   *badcam    = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
    873865
    874866  const Int_t hifirst = fSignal->GetFirstUsedSliceHiGain();
     
    899891        }
    900892
    901       MBadPixelsPix &bad = (*badcam)[i];
     893      MBadPixelsPix &bad = (*fBadPixels)[i];
    902894
    903895      h = histhi.GetHGausHist();
     
    929921       
    930922        MHCalibrationChargePix &histlo = (MHCalibrationChargePix&)(*this)(i);
    931         MBadPixelsPix          &bad    = (*badcam)[i];
    932923       
    933924        if (histlo.IsExcluded())
    934925          continue;
    935926
     927        MBadPixelsPix &bad = (*fBadPixels)[i];
    936928        if (histlo.GetSaturated() > fNumLoGainSaturationLimit*histlo.GetHGausHist()->GetEntries())
    937929          {
     
    10551047  // Perform the fitting for the High Gain (done in MHCalibrationCam)
    10561048  //
    1057   FitHiGainArrays(*chargecam, *badcam,
     1049  FitHiGainArrays(*chargecam, *fBadPixels,
    10581050                  MBadPixelsPix::kHiGainNotFitted,
    10591051                  MBadPixelsPix::kHiGainOscillating);
     
    10631055  //
    10641056  if (IsLoGain())
    1065     FitLoGainArrays(*chargecam, *badcam,
     1057    FitLoGainArrays(*chargecam, *fBadPixels,
    10661058                    MBadPixelsPix::kLoGainNotFitted,
    10671059                    MBadPixelsPix::kLoGainOscillating);
     
    10901082          continue;
    10911083
    1092       MBadPixelsPix &bad = (*badcam)[i];
     1084      MBadPixelsPix &bad = (*fBadPixels)[i];
    10931085      bad.SetUnsuitable(MBadPixelsPix::kUnsuitableRun);
    10941086      bad.SetUncalibrated(MBadPixelsPix::kLoGainBlackout);
     
    11511143{
    11521144
    1153   MBadPixelsCam   *badcam    = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
    11541145  MCalibrationCam *chargecam = fIntensCam ? fIntensCam->GetCam() : fCam;
    11551146     
    1156   for (Int_t i=0; i<badcam->GetSize(); i++)
     1147  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
    11571148    {
    11581149     
    1159       MBadPixelsPix    &bad    = (*badcam)[i];
     1150      MBadPixelsPix    &bad    = (*fBadPixels)[i];
    11601151      MCalibrationPix  &pix    = (*chargecam)[i];
    11611152
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.cc

    r8132 r8417  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationHiLoCam.cc,v 1.20 2006-10-19 14:01:49 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCalibrationHiLoCam.cc,v 1.21 2007-04-18 15:33:56 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    116116#include "MGeomPix.h"
    117117
    118 #include "MBadPixelsIntensityCam.h"
    119118#include "MBadPixelsCam.h"
    120119#include "MBadPixelsPix.h"
     
    718717
    719718  MCalibrationCam *hilocam = fCam;
    720   MBadPixelsCam   *badcam  = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
    721719
    722720  const Int_t nareas   = fAverageHiGainAreas->GetSize();
     
    766764
    767765
    768   FitHiGainArrays(*hilocam,*badcam,
     766  FitHiGainArrays(*hilocam, *fBadPixels,
    769767                  MBadPixelsPix::kHiLoNotFitted,
    770768                  MBadPixelsPix::kHiLoOscillating);
     
    843841  }
    844842
    845   FitLoGainArrays(*hilocam,*badcam,
     843  FitLoGainArrays(*hilocam, *fBadPixels,
    846844                  MBadPixelsPix::kHiLoNotFitted,
    847845                  MBadPixelsPix::kHiLoOscillating);
     
    859857{
    860858
    861   MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
    862 
    863   for (Int_t i=0; i<badcam->GetSize(); i++)
    864     {
    865       MBadPixelsPix          &bad    = (*badcam)[i];
     859  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
     860    {
     861      MBadPixelsPix &bad = (*fBadPixels)[i];
    866862
    867863      if (bad.IsUncalibrated( MBadPixelsPix::kHiLoNotFitted ))
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.cc

    r8361 r8417  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.34 2007-03-04 11:55:55 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.35 2007-04-18 15:33:56 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    124124#include "MHCalibrationPix.h"
    125125#include "MCalibrationIntensityCam.h"
    126 #include "MBadPixelsIntensityCam.h"
    127126
    128127#include "MGeomCam.h"
     
    308307        pix.SetBinning(fNbins, fFirst, fLast);
    309308
    310         MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
    311         InitHists(pix,bad,i);
     309        InitHists(pix, (*fBadPixels)[i], i);
    312310
    313311        if (fCam)
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc

    r8359 r8417  
    107107#include "MGeomPix.h"
    108108
    109 #include "MBadPixelsIntensityCam.h"
    110109#include "MBadPixelsCam.h"
    111110#include "MBadPixelsPix.h"
     
    448447
    449448  MCalibrationCam *relcam = fIntensCam ? fIntensCam->GetCam() : fCam;
    450   MBadPixelsCam   *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
    451449
    452450  const Int_t nareas = fAverageHiGainAreas->GetSize();
     
    542540    }
    543541
    544   FitHiGainArrays(*relcam,*badcam,
     542  FitHiGainArrays(*relcam, *fBadPixels,
    545543                  MBadPixelsPix::kRelTimeNotFitted,
    546544                  MBadPixelsPix::kRelTimeOscillating);
    547545
    548546  if (IsLoGain())       
    549     FitLoGainArrays(*relcam,*badcam,
     547    FitLoGainArrays(*relcam, *fBadPixels,
    550548                    MBadPixelsPix::kRelTimeNotFitted,
    551549                    MBadPixelsPix::kRelTimeOscillating);
     
    563561{
    564562
    565   MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
    566 
    567   for (Int_t i=0; i<badcam->GetSize(); i++)
    568     {
    569       MBadPixelsPix          &bad    = (*badcam)[i];
     563  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
     564    {
     565      MBadPixelsPix &bad = (*fBadPixels)[i];
    570566
    571567      if (bad.IsUncalibrated( MBadPixelsPix::kRelTimeNotFitted ))
  • trunk/MagicSoft/Mars/mhcalib/MHPedestalCam.cc

    r8339 r8417  
    104104#include "MCalibrationPix.h"
    105105
    106 #include "MBadPixelsIntensityCam.h"
    107106#include "MBadPixelsCam.h"
    108107
     
    127126const TString MHPedestalCam::gsHistYTitle = "Nr. events";
    128127const TString MHPedestalCam::fgNamePedestalCam = "MPedestalCam";
     128
    129129// --------------------------------------------------------------------------
    130130//
     
    375375        pix.SetProbLimit(fProbLimit);
    376376
    377         MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
    378         InitHists(pix,bad,i);
     377        InitHists(pix, (*fBadPixels)[i], i);
    379378      }
    380379  }
Note: See TracChangeset for help on using the changeset viewer.