Changeset 5014


Ignore:
Timestamp:
09/14/04 19:10:30 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5013 r5014  
    3232
    3333 2004/09/14: Markus Gaug
     34
     35   * mhcalib/MHCalibration*Cam.[h,cc]
     36     - added MBadpixelsIntenstiyCam
    3437
    3538   * mbadpixels/MBadPixelsIntensityCam.[h,cc]
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc

    r4985 r5014  
    6969#include "MCalibrationPix.h"
    7070
     71#include "MBadPixelsIntensityCam.h"
     72#include "MBadPixelsCam.h"
    7173#include "MBadPixelsPix.h"
    72 #include "MBadPixelsCam.h"
    7374
    7475#include "MGeomCam.h"
     
    112113    :  fHistName(gsHistName),fHistTitle(gsHistTitle),
    113114       fHistXTitle(gsHistXTitle),fHistYTitle(gsHistYTitle),
    114        fColor(MCalibrationCam::kNONE),
     115       fColor(MCalibrationCam::kNONE), fIntensBad(NULL),
    115116       fBadPixels(NULL), fIntensCam(NULL), fCam(NULL), fGeom(NULL), fRunHeader(NULL)
    116117{
     
    466467//
    467468// Gets or creates the pointers to:
     469// - MBadPixelsIntensityCam
    468470// - MBadPixelsCam
    469471//
     
    503505  const Int_t nareas   = fGeom->GetNumAreas();
    504506
    505   fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam");
    506   if (!fBadPixels)
    507     {
    508 
    509       fBadPixels = (MBadPixelsCam*)pList->FindCreateObj(AddSerialNumber("MBadPixelsCam"));
     507  fIntensBad = (MBadPixelsIntensityCam*)pList->FindObject(AddSerialNumber("MBadPixelsIntensityCam"));
     508  if (fIntensBad)
     509    *fLog << inf << "Found MBadPixelsIntensityCam ... " << endl;
     510  else
     511    {
     512      fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam");
    510513      if (!fBadPixels)
    511514        {
    512           *fLog << err << "Cannot find nor create MBadPixelsCam ... abort." << endl;
    513           return kFALSE;
     515         
     516          fBadPixels = (MBadPixelsCam*)pList->FindCreateObj(AddSerialNumber("MBadPixelsCam"));
     517          if (!fBadPixels)
     518            {
     519              *fLog << err << "Cannot find nor create MBadPixelsCam ... abort." << endl;
     520              return kFALSE;
     521            }
     522          else
     523            fBadPixels->InitSize(npixels);
    514524        }
    515       else
    516         fBadPixels->InitSize(npixels);
    517     }
    518 
     525    }
     526 
    519527  if (IsAverageing())
    520528    {
     
    538546      for (Int_t i=0; i<npixels; i++)
    539547        {
    540           if ((*fBadPixels)[i].IsBad())
     548         
     549          MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
     550          if (bad.IsBad())
    541551            continue;
    542552         
     
    647657        h->SetYTitle(fHistYTitle.Data());
    648658       
    649         InitHists(pix,(*fBadPixels)[i],i);
     659        MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
     660        InitHists(pix,bad,i);
    650661      }
    651662  }
     
    759770          h->SetYTitle(fHistYTitle.Data());
    760771
    761           InitHists(pix,(*fBadPixels)[i],i);
     772          MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
     773          InitHists(pix,bad,i);
    762774      }
    763775  }
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h

    r4974 r5014  
    3434class MCalibrationCam;
    3535class MCalibrationPix;
     36class MBadPixelsIntensityCam;
    3637class MBadPixelsCam;
    3738class MBadPixelsPix;
     
    7879
    7980  MCalibrationCam::PulserColor_t fColor; // Colour of the pulsed LEDs
    80  
     81
     82  MBadPixelsIntensityCam *fIntensBad;    //! Bad Pixels intensity calibration storage container 
    8183  MBadPixelsCam    *fBadPixels;          //! Bad Pixels storage container
    8284  MCalibrationIntensityCam *fIntensCam;  //! Intensity Calibration Cam with the results
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc

    r4983 r5014  
    127127#include "MGeomPix.h"
    128128
     129#include "MBadPixelsIntensityCam.h"
    129130#include "MBadPixelsCam.h"
    130131#include "MBadPixelsPix.h"
     
    430431        h->SetYTitle(fAbsHistYTitle.Data());
    431432
    432         InitHists((*this)[i],(*fBadPixels)[i],i);
     433        MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
     434        InitHists((*this)[i],bad,i);
    433435      }
    434436  }
     
    592594          h->SetYTitle(fAbsHistYTitle.Data());
    593595
    594           InitHists(pix,(*fBadPixels)[i],i);
     596          MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
     597          InitHists(pix,bad,i);
    595598      }
    596599  }
     
    949952        }
    950953
    951       MBadPixelsPix          &bad    = (*fBadPixels)[i];
     954      MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
    952955
    953956      h = histhi.GetHGausHist();
     
    979982       
    980983        MHCalibrationChargePix &histlo = (MHCalibrationChargePix&)(*this)(i);
    981         MBadPixelsPix          &bad    = (*fBadPixels)[i];
     984        MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
    982985       
    983986        if (histlo.IsExcluded())
     
    10371040        }
    10381041
    1039       MBadPixelsPix          &bad    = fIntensCam
     1042      MBadPixelsPix &bad    = fIntensCam
    10401043        ? fIntensCam->GetAverageBadArea(j)
    10411044        : fCam->GetAverageBadArea(j);
     
    10631066        if (pix.IsHiGainSaturation())
    10641067          {
    1065             MBadPixelsPix          &bad    = fIntensCam
     1068            MBadPixelsPix &bad    = fIntensCam
    10661069              ? fIntensCam->GetAverageBadArea(j) 
    10671070              : fCam->GetAverageBadArea(j);     
     
    10871090        }
    10881091
    1089       MBadPixelsPix          &bad    = fIntensCam
     1092      MBadPixelsPix &bad = fIntensCam
    10901093        ? fIntensCam->GetAverageBadSector(j)
    10911094        : fCam->GetAverageBadSector(j);     
     
    11241127  //
    11251128  FitHiGainArrays(fIntensCam ? (MCalibrationCam&)(*fIntensCam->GetCam()) : (MCalibrationCam&)(*fCam),
    1126                   *fBadPixels,
     1129                  fIntensBad ?                   (*fIntensBad->GetCam()) : *fBadPixels,
    11271130                  MBadPixelsPix::kHiGainNotFitted,
    11281131                  MBadPixelsPix::kHiGainOscillating);
     
    11331136  if (IsLoGain())
    11341137    FitLoGainArrays(fIntensCam ? (MCalibrationCam&)(*fIntensCam->GetCam()) : (MCalibrationCam&)(*fCam),
    1135                     *fBadPixels,
     1138                    fIntensBad ?                   (*fIntensBad->GetCam()) : *fBadPixels,
    11361139                    MBadPixelsPix::kLoGainNotFitted,
    11371140                    MBadPixelsPix::kLoGainOscillating);
     
    11911194void MHCalibrationChargeCam::FinalizeBadPixels()
    11921195{
    1193      
    1194   for (Int_t i=0; i<fBadPixels->GetSize(); i++)
    1195     {
    1196      
    1197       MBadPixelsPix    &bad    = (*fBadPixels)[i];
     1196
     1197  MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
     1198     
     1199  for (Int_t i=0; i<badcam->GetSize(); i++)
     1200    {
     1201     
     1202      MBadPixelsPix    &bad    = (*badcam)[i];
    11981203      MCalibrationPix  &pix    = fIntensCam ? (*fIntensCam)[i] : (*fCam)[i];
    11991204
     
    12191224        }
    12201225    }
    1221 }
    1222 
    1223 // --------------------------------------------------------------------------
    1224 //
    1225 // Dummy, needed by MCamEvent
    1226 //
    1227 Bool_t MHCalibrationChargeCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
    1228 {
    1229   return kTRUE;
    12301226}
    12311227
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.h

    r4983 r5014  
    119119  void SetAbsHistYTitle( const char *name )  { fAbsHistYTitle = name; }
    120120   
    121   Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
     121  Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const { return kTRUE; }
    122122  void   DrawPixelContent( Int_t num )  const;   
    123123
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc

    r4964 r5014  
    105105#include "MGeomPix.h"
    106106
     107#include "MBadPixelsIntensityCam.h"
    107108#include "MBadPixelsCam.h"
    108109#include "MBadPixelsPix.h"
     
    484485
    485486  FitHiGainArrays(fIntensCam ? (MCalibrationCam&)(*fIntensCam->GetCam()) : (MCalibrationCam&)(*fCam),
    486                   *fBadPixels,
     487                  fIntensBad ?                   (*fIntensBad->GetCam()) : *fBadPixels,
    487488                  MBadPixelsPix::kRelTimeNotFitted,
    488489                  MBadPixelsPix::kRelTimeOscillating);
     
    490491  if (IsLoGain())       
    491492    FitLoGainArrays(fIntensCam ? (MCalibrationCam&)(*fIntensCam->GetCam()) : (MCalibrationCam&)(*fCam),
    492                     *fBadPixels,
     493                    fIntensBad ?                   (*fIntensBad->GetCam()) : *fBadPixels,
    493494                    MBadPixelsPix::kRelTimeNotFitted,
    494495                    MBadPixelsPix::kRelTimeOscillating);
     
    506507{
    507508
    508   for (Int_t i=0; i<fBadPixels->GetSize(); i++)
    509     {
    510      
    511       MBadPixelsPix          &bad    = (*fBadPixels)[i];
     509  MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
     510
     511  for (Int_t i=0; i<badcam->GetSize(); i++)
     512    {
     513      MBadPixelsPix          &bad    = (*badcam)[i];
    512514
    513515      if (bad.IsUncalibrated( MBadPixelsPix::kRelTimeNotFitted ))
Note: See TracChangeset for help on using the changeset viewer.