Ignore:
Timestamp:
04/05/04 16:48:56 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MGeomApply.cc

    r3638 r3651  
    7474#include "MCalibrationRelTimeCam.h"
    7575#include "MCalibrationQECam.h"
     76#include "MCalibrationPedCam.h"
    7677#include "MPedPhotCam.h"
    7778#include "MExtractedSignalCam.h"
     
    156157      (MCalibrationQECam*)pList->FindObject(AddSerialNumber("MCalibrationQECam"));
    157158    if (qe)
    158         qe->InitSize(cam->GetNumPixels());
    159 
     159      {
     160        qe->InitSize           ( cam->GetNumPixels()  );
     161        qe->InitAverageAreas   ( cam->GetNumAreas()   );
     162        qe->InitAverageSectors ( cam->GetNumSectors() );
     163      }
     164   
     165    MCalibrationPedCam *pcam =
     166      (MCalibrationPedCam*)pList->FindObject(AddSerialNumber("MCalibrationPedCam"));
     167    if (pcam)
     168      {
     169        pcam->InitSize           ( cam->GetNumPixels()  );
     170        pcam->InitAverageAreas   ( cam->GetNumAreas()   );
     171        pcam->InitAverageSectors ( cam->GetNumSectors() );
     172      }
     173   
    160174    MPedPhotCam *pedphot = (MPedPhotCam*)pList->FindObject(AddSerialNumber("MPedPhotCam"));
    161175    if (pedphot)
  • trunk/MagicSoft/Mars/manalysis/MHPedestalCam.cc

    r3649 r3651  
    9090/////////////////////////////////////////////////////////////////////////////
    9191#include "MHPedestalCam.h"
     92#include "MHPedestalPix.h"
    9293
    9394#include "MLog.h"
     
    9697#include "MParList.h"
    9798
    98 #include "MHPedestalPix.h"
    99 
    10099#include "MExtractedSignalCam.h"
    101100#include "MExtractedSignalPix.h"
     
    106105#include "MGeomCam.h"
    107106#include "MGeomPix.h"
     107
     108#include "MCalibrationPedCam.h"
    108109
    109110ClassImp(MHPedestalCam);
     
    133134// - MPedestalCam
    134135// - MExtractedSignalCam
     136//
     137// Searches or creates:
     138// - MCalibrationPedCam
    135139//
    136140// Retrieves from MExtractedSignalCam:
     
    179183    }
    180184
    181   Float_t sliceshi = signal->GetNumUsedHiGainFADCSlices();
    182   Float_t sliceslo = signal->GetNumUsedLoGainFADCSlices();
    183 
    184   if (sliceshi == 0.)
    185     {
    186       gLog << err << "Number of used signal slices in MExtractedSignalCam is zero  ... abort."
    187            << endl;
    188       return kFALSE;
    189     }
    190 
    191   if (fExtractHiGainSlices != 0. && sliceshi != fExtractHiGainSlices )
    192     {
    193       gLog << err << "Number of used High Gain signal slices changed in MExtractedSignalCam  ... abort."
    194            << endl;
    195       return kFALSE;
    196     }
    197 
    198   if (fExtractLoGainSlices != 0. && sliceslo != fExtractLoGainSlices )
    199     {
    200       gLog << err << "Number of used Low Gain signal slices changed in MExtractedSignalCam  ... abort."
    201            << endl;
    202       return kFALSE;
    203     }
    204 
    205   fExtractHiGainSlices = sliceshi;
    206   fExtractLoGainSlices = sliceslo;
    207 
    208185  const Int_t npixels  = fGeom->GetNumPixels();
    209186  const Int_t nsectors = fGeom->GetNumSectors();
    210187  const Int_t nareas   = fGeom->GetNumAreas();
     188
     189  fCam = (MCalibrationCam*)pList->FindObject("MCalibrationPedCam");
     190  if (!fCam)
     191    {
     192      fCam = (MCalibrationCam*)pList->FindCreateObj(AddSerialNumber("MCalibrationPedCam"));
     193      if (!fCam)
     194        {
     195          gLog << err << "Cannot find nor create MCalibrationPedCam ... abort." << endl;
     196          return kFALSE;
     197        }
     198      else
     199        {
     200          fCam->InitSize(npixels);
     201          fCam->InitAverageAreas(nareas);
     202          fCam->InitAverageSectors(nsectors);
     203        }
     204    }
     205 
     206  Float_t sliceshi = signal->GetNumUsedHiGainFADCSlices();
     207  Float_t sliceslo = signal->GetNumUsedLoGainFADCSlices();
     208
     209  if (sliceshi == 0.)
     210    {
     211      gLog << err << "Number of used signal slices in MExtractedSignalCam is zero  ... abort."
     212           << endl;
     213      return kFALSE;
     214    }
     215
     216  if (fExtractHiGainSlices != 0. && sliceshi != fExtractHiGainSlices )
     217    {
     218      gLog << err << "Number of used High Gain signal slices changed in MExtractedSignalCam  ... abort."
     219           << endl;
     220      return kFALSE;
     221    }
     222
     223  if (fExtractLoGainSlices != 0. && sliceslo != fExtractLoGainSlices )
     224    {
     225      gLog << err << "Number of used Low Gain signal slices changed in MExtractedSignalCam  ... abort."
     226           << endl;
     227      return kFALSE;
     228    }
     229
     230  fExtractHiGainSlices = sliceshi;
     231  fExtractLoGainSlices = sliceslo;
    211232
    212233  if (fHiGainArray->GetEntries()==0)
     
    431452{
    432453
    433   FitHiGainArrays((MCalibrationCam&)(*fCam),*fBadPixels,
     454  FitHiGainArrays((*fCam),*fBadPixels,
    434455                  MBadPixelsPix::kHiGainNotFitted,
    435456                  MBadPixelsPix::kHiGainOscillating);
    436   FitLoGainArrays((MCalibrationCam&)(*fCam),*fBadPixels,
     457  FitLoGainArrays((*fCam),*fBadPixels,
    437458                  MBadPixelsPix::kLoGainNotFitted,
    438459                  MBadPixelsPix::kLoGainOscillating);
  • trunk/MagicSoft/Mars/manalysis/MHPedestalPix.h

    r3643 r3651  
    1111private:
    1212
    13   static const Int_t   fgChargeNbins;        // Default for fNbins          (now set to: 450  )
    14   static const Axis_t  fgChargeFirst;        // Default for fFirst          (now set to: -0.5 )
    15   static const Axis_t  fgChargeLast;         // Default for fLast           (now set to: 449.5)
     13  static const Int_t   fgChargeNbins;        // Default for fNbins   (now set to: 450  )
     14  static const Axis_t  fgChargeFirst;        // Default for fFirst   (now set to: -0.5 )
     15  static const Axis_t  fgChargeLast;         // Default for fLast    (now set to: 449.5)
    1616
    1717  Float_t fNSlices;                         // Number of FADC slices summed in extraction
Note: See TracChangeset for help on using the changeset viewer.