Ignore:
Timestamp:
02/04/07 15:33:08 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhcalib
Files:
2 edited

Legend:

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

    r8279 r8304  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.49 2007-01-30 14:16:45 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.50 2007-02-04 15:29:09 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    114114//  + Float_t fNumLoGainBlackoutLimit; // Rel. amount blackout logain events until pixel is declared unsuitable
    115115//
     116// Class Version 3:
     117//  - Byte_t  fFirstHiGain;                              // First used slice High Gain
     118//  - Byte_t  fLastHiGain;                               // Last used slice High Gain
     119//  - Byte_t  fFirstLoGain;                              // First used slice Low Gain
     120//  - Byte_t  fLastLoGain;                               // Last used slice Low Gain
     121//
    116122/////////////////////////////////////////////////////////////////////////////
    117123#include "MHCalibrationChargeCam.h"
     
    219225//
    220226MHCalibrationChargeCam::MHCalibrationChargeCam(const char *name, const char *title)
    221     : fRawEvt(NULL)
     227    : fRawEvt(NULL), fSignal(NULL)
    222228{
    223229
     
    367373{
    368374
    369   MExtractedSignalCam *signal =
    370     (MExtractedSignalCam*)pList->FindObject(AddSerialNumber("MExtractedSignalCam"));
    371   if (!signal)
     375  fSignal = (MExtractedSignalCam*)pList->FindObject(AddSerialNumber("MExtractedSignalCam"));
     376  if (!fSignal)
    372377  {
    373378      *fLog << err << "MExtractedSignalCam not found... abort." << endl;
     
    377382  if (!InitCams(pList,"Charge"))
    378383    return kFALSE;
    379 
    380   fFirstHiGain = signal->GetFirstUsedSliceHiGain();
    381   fLastHiGain  = signal->GetLastUsedSliceHiGain();
    382   fFirstLoGain = signal->GetFirstUsedSliceLoGain();
    383   fLastLoGain  = signal->GetLastUsedSliceLoGain();
    384384
    385385  const Int_t npixels  = fGeom->GetNumPixels();
     
    900900  MBadPixelsCam   *badcam    = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
    901901
     902  const Int_t hifirst = fSignal->GetFirstUsedSliceHiGain();
     903  const Int_t hilast  = fSignal->GetLastUsedSliceHiGain();
     904  const Int_t lofirst = fSignal->GetFirstUsedSliceLoGain();
     905  const Int_t lolast  = fSignal->GetLastUsedSliceLoGain();
     906
    902907
    903908  for (Int_t i=0; i<fHiGainArray->GetSize(); i++)
     
    944949          bad.SetUncalibrated( MBadPixelsPix::kHiGainOverFlow );
    945950        }
    946      
    947       FinalizeAbsTimes(histhi, pix, bad, fFirstHiGain, fLastHiGain);
     951
     952      FinalizeAbsTimes(histhi, pix, bad, hifirst, hilast);
    948953    }
    949954
     
    991996          }
    992997       
    993         FinalizeAbsTimes(histlo, pix, bad, fFirstLoGain, fLastLoGain);
     998        FinalizeAbsTimes(histlo, pix, bad, lofirst, lolast);
    994999      }
    9951000
     
    10091014
    10101015      MBadPixelsPix &bad = chargecam->GetAverageBadArea(j);
    1011       FinalizeAbsTimes(histhi, pix, bad, fFirstHiGain, fLastHiGain);
     1016      FinalizeAbsTimes(histhi, pix, bad, hifirst, hilast);
    10121017   }
    10131018
     
    10311036          {
    10321037            MBadPixelsPix &bad = chargecam->GetAverageBadArea(j);
    1033             FinalizeAbsTimes(histlo, pix, bad, fFirstLoGain, fLastLoGain);
     1038            FinalizeAbsTimes(histlo, pix, bad, lofirst, lolast);
    10341039          }
    10351040       
     
    10511056
    10521057      MBadPixelsPix &bad = chargecam->GetAverageBadSector(j);
    1053       FinalizeAbsTimes(histhi, pix, bad, fFirstHiGain, fLastHiGain);
     1058      FinalizeAbsTimes(histhi, pix, bad, hifirst, hilast);
    10541059    }
    10551060 
     
    10731078
    10741079        if (pix.IsHiGainSaturation())
    1075           FinalizeAbsTimes(histlo, pix, bad, fFirstLoGain, fLastLoGain);
     1080          FinalizeAbsTimes(histlo, pix, bad, lofirst, lolast);
    10761081      }
    10771082 
     
    11311136//
    11321137void MHCalibrationChargeCam::FinalizeAbsTimes(MHCalibrationChargePix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad,
    1133                                               Byte_t first, Byte_t last)
     1138                                              Int_t first, Int_t last)
    11341139{
    11351140    const Float_t mean = hist.GetAbsTimeMean();
     
    11391144    pix.SetAbsTimeRms(rms);
    11401145
    1141     const Float_t lowerlimit = (Float_t)first;// + fTimeLowerLimit;
    1142     const Float_t upperlimit = (Float_t)last ;// - fTimeUpperLimit;
     1146    const Float_t lowerlimit = (Float_t)first+1;// + fTimeLowerLimit;
     1147    const Float_t upperlimit = (Float_t)last -1;// - fTimeUpperLimit;
    11431148
    11441149    // FIXME: instead of checking whether the maximum is in the first or
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.h

    r7188 r8304  
    8686  Float_t fTimeLowerLimit;                           // Limit dist. to first signal slice (in units of FADC slices)
    8787  Float_t fTimeUpperLimit;                           // Limit dist. to last signal slice  (in units of FADC slices)
    88   Byte_t  fFirstHiGain;                              // First used slice High Gain
    89   Byte_t  fLastHiGain;                               // Last used slice High Gain
    90   Byte_t  fFirstLoGain;                              // First used slice Low Gain
    91   Byte_t  fLastLoGain;                               // Last used slice Low Gain
    9288 
    9389  MRawEvtData         *fRawEvt;                      //!  Raw event data
     90  MExtractedSignalCam *fSignal;                      //!
    9491
    9592  Bool_t SetupHists(const MParList *pList);
     
    10198
    10299  void   FinalizeAbsTimes (MHCalibrationChargePix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad,
    103                            Byte_t first, Byte_t last); 
     100                           Int_t first, Int_t last);
    104101  Bool_t FinalizeHists();
    105102  void   FinalizeBadPixels();
     
    141138  void   DrawPixelContent( Int_t num )  const;   
    142139
    143   ClassDef(MHCalibrationChargeCam, 2)   // Histogram class for Charge Camera Calibration
     140  ClassDef(MHCalibrationChargeCam, 3)   // Histogram class for Charge Camera Calibration
    144141};
    145142
Note: See TracChangeset for help on using the changeset viewer.