Changeset 8304 for trunk/MagicSoft


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

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8303 r8304  
    3939     - replaced GetMediandev by GetDev
    4040
     41   * callisto.rc, callisto_Dec04Jan05.rc:
     42     - changed ExtractWinLeft/Right according to new scheme
     43
     44   * mhcalib/MHCalibrationChargeCam.[h,cc]:
     45     - removed obsolete data members fFirstHiGain, etc and
     46       replaced by storage of fSignal
     47     - made sure that the average extracted signal position
     48       is at least one slice away from the edges of the
     49       extraction window
     50
     51   * mjobs/MJPedestal.cc:
     52     - reworked the pulse position check. It now better takes
     53       the properties of the extractors into account.
     54       Still to be done: relation between pulse position and
     55       extraction window!
     56
     57   * msignal/MExtractBlindPixel.[h,cc],
     58     msignal/MExtractPINDiode.[h,cc]:
     59     - fixed arguments type of SetRange
     60
     61   * msignal/MExtractTime.cc:
     62     - removed old obsolete code already in comments
     63
     64   * msignal/MExtractTimeAndCharge.h:
     65     - added getter for LoGainStartShift
     66
     67   * msignal/MExtractTimeAndChargeDigitalFilter.[h,cc],
     68     msignal/MExtractTimeAndChargeSpline.[h,cc],
     69     msignal/MExtractedSignalCam.[h,cc], msignal/MExtractor.[h,cc]:
     70     - changed the type of LoGainFirst from byte to int
     71     - if necessary increased class version
     72
    4173
    4274
  • trunk/MagicSoft/Mars/NEWS

    r8293 r8304  
    1717
    1818   - general: fixed a memory leak when reading many MStatusDisplays
     19
     20   - callisto: We have a new pulse position check which takes the properties
     21     of the extractor automatically into account. So no need to set
     22     ExtractWinLeft/Right anymore. Again a check for pulses too much to the
     23     left is done. If possible the lo-gain extraction start and hi-gain
     24     extraction end is changed accordingly. If no proper extraction range
     25     can be set (hi-gain too much to the left) an error is raised.
    1926
    2027   - callisto: Redone the signal extraction this includes:
  • trunk/MagicSoft/Mars/callisto.rc

    r8245 r8304  
    295295
    296296# -------------------------------------------------------------------------
    297 # Use Pulse Position check to define the extraction ranges for the data?
     297# When the starting pedestal is extracted from the first events of
     298# the data run also the average pulse position of these events
     299# is determined. If the pulse position check is switched on (default)
     300# the extraction window of the hi- and lo-gain extractor for the
     301# determined average pulse position is not allowed to exceed the
     302# extractors search region. In this scenario we assume that the
     303# start of the extraction window is at least similar to the
     304# rising edge of the pulse.
     305# To make sure that the search region and the extraction window
     306# does not touch increase the values.
    298307# -------------------------------------------------------------------------
    299308#MJPedestalY2.PulsePosCheck: yes
    300 MJPedestalY2.ExtractWinLeft:  4.0
    301 MJPedestalY2.ExtractWinRight: 4.5
     309#MJPedestalY2.ExtractWinLeft:  0.0
     310#MJPedestalY2.ExtractWinRight: 0.0
     311
    302312
    303313# -------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/callisto_Dec04Jan05.rc

    r8295 r8304  
    322322
    323323# -------------------------------------------------------------------------
    324 # Use Pulse Position check to define the extraction ranges for the data?
     324# When the starting pedestal is extracted from the first events of
     325# the data run also the average pulse position of these events
     326# is determined. If the pulse position check is switched on (default)
     327# the extraction window of the hi- and lo-gain extractor for the
     328# determined average pulse position is not allowed to exceed the
     329# extractors search region. In this scenario we assume that the
     330# start of the extraction window is at least similar to the
     331# rising edge of the pulse.
     332# To make sure that the search region and the extraction window
     333# does not touch increase the values.
    325334# -------------------------------------------------------------------------
    326335#MJPedestalY2.PulsePosCheck: yes
    327 MJPedestalY2.ExtractWinLeft:  3.5
    328 MJPedestalY2.ExtractWinRight: 2.5
    329 #MJCalibrateSignal.ModifiedExtractWin: yes
     336#MJPedestalY2.ExtractWinLeft:  0.0
     337#MJPedestalY2.ExtractWinRight: 0.0
     338
    330339# -------------------------------------------------------------------------
    331340# Define the Pulse Position check parameters:
  • 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
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r8301 r8304  
    102102const TString  MJPedestal::fgReferenceFile   = "mjobs/pedestalref.rc";
    103103const TString  MJPedestal::fgBadPixelsFile   = "mjobs/badpixels_0_559.rc";
    104 const Float_t  MJPedestal::fgExtractWinLeft  = 2.5;
    105 const Float_t  MJPedestal::fgExtractWinRight = 4.5;
     104const Float_t  MJPedestal::fgExtractWinLeft  = 0;
     105const Float_t  MJPedestal::fgExtractWinRight = 0;
    106106
    107107// --------------------------------------------------------------------------
     
    859859        return kTRUE;
    860860
    861     Int_t numhigainsamples = 0;
    862     Int_t numlogainsamples = 0;
    863 
    864     Float_t meanpulsetime  = 0.;
    865     Float_t rmspulsetime   = 0.;
    866 
    867     if (IsUseMC())
    868     {
    869         //
    870         // FIXME:
    871         // The MC cannot run over the first 2000 pedestal events since almost all
    872         // events are empty, therefore a pulse pos. check is not possible, either.
    873         // For the moment, have to fix the problem hardcoded...
    874         //
    875         //            MMcEvt *evt = (MMcEvt*)plist.FindObject("MMcEvt");
    876         //            const Float_t meanpulsetime = evt->GetFadcTimeJitter();
    877         meanpulsetime = 4.5;
    878         rmspulsetime  = 1.0;
    879 
    880         numhigainsamples = 15;
    881         numlogainsamples = 15;
    882 
    883     }
    884     else
     861    // FIXME:
     862    // The MC cannot run over the first 2000 pedestal events since almost all
     863    // events are empty, therefore a pulse pos. check is not possible, either.
     864    // For the moment, have to fix the problem hardcoded...
     865    //
     866    //            MMcEvt *evt = (MMcEvt*)plist.FindObject("MMcEvt");
     867    //            const Float_t meanpulsetime = evt->GetFadcTimeJitter();
     868    Float_t meanpulsetime  = 4.5;
     869    Float_t rmspulsetime   = 1.0;
     870
     871    if (!IsUseMC())
    885872    {
    886873        if (fIsPixelCheck)
     
    909896        meanpulsetime = cam->GetAverageArea(0).GetHiGainMean();
    910897        rmspulsetime  = cam->GetAverageArea(0).GetHiGainRms();
    911 
    912         MRawEvtData *data = (MRawEvtData*)plist.FindObject("MRawEvtData");
    913         if (!data)
    914         {
    915             *fLog << err << "MRawEvtData not found... abort." << endl;
    916             return kFALSE;
    917         }
    918 
    919         numhigainsamples = data->GetNumHiGainSamples();
    920         numlogainsamples = data->GetNumLoGainSamples();
    921898    }
    922899
     
    924901    *fLog << meanpulsetime << "+-" << rmspulsetime << endl;
    925902
    926     const MExtractTimeAndCharge *ext = dynamic_cast<MExtractTimeAndCharge*>(fExtractor);
    927 
    928     //
    929     // Get the ranges for the new extractor setting
    930     //
    931     const Int_t newfirst = TMath::Nint(meanpulsetime-fExtractWinLeft);
    932 
    933     Int_t wshigain = ext ? ext->GetWindowSizeHiGain() : 6;
    934     if (wshigain > 6)
    935         wshigain = 6;
    936 
    937     Int_t wslogain = ext ? ext->GetWindowSizeLoGain() : 4;
    938     if (wslogain > 4)
    939         wslogain = 4;
    940 
    941     const Int_t newlast  = TMath::Nint(meanpulsetime+fExtractWinRight);
    942 
    943     *fLog << underline;
    944     *fLog << "Try to set new range limits: (" << newfirst << "," << newlast;
    945     *fLog << "+" << wshigain << "," << newfirst-1 << "," << newlast << "+";
    946     *fLog << wslogain << ")" << endl;
    947 
    948     //
    949     // Check the ranges for the new extractor setting
    950     //
    951     if (newfirst < 0)
    952     {
    953         //*fLog << err << "Pulse is too much to the left, cannot go below 0!" << endl;
    954         //return -1;
    955     }
    956     if (newlast+wshigain > numhigainsamples+numlogainsamples-1)
    957     {
    958         *fLog << err << "Pulse is too much to the right, cannot go beyond limits: ";
    959         *fLog << numhigainsamples << "+" << numlogainsamples << "-1" << endl;
    960         *fLog << " Cannot extract at all!" << endl;
    961         return -3;
    962     }
    963     if (newlast+wslogain > numlogainsamples)
    964     {
    965         *fLog << err << "Pulse is too much to the right, cannot go beyond logain limits!" << endl;
    966         *fLog << endl;
    967         *fLog << "Try to use a different extractor (e.g. with a window size of only 4 sl.) or:" << endl;
    968         *fLog << "Set the limit to a lower value (callisto.rc):" << endl;
    969         *fLog << "    MJPedestalY2:ExtractWinRight: 4.5" << endl;
    970         *fLog << "(ATTENTION, you will lose late cosmics pulses!)" << endl;
     903    MExtractTimeAndCharge *ext = dynamic_cast<MExtractTimeAndCharge*>(fExtractor);
     904    if (!ext)
     905    {
     906        *fLog << warn << "WARNING - no extractor found inheriting from MExtractTimeAndCharge... no pulse position check." << endl;
     907        return kTRUE;
     908    }
     909
     910    const Int_t hi0 = ext->GetHiGainFirst();
     911    const Int_t lo1 = ext->GetLoGainLast();
     912    Int_t hi1 = ext->GetHiGainLast();
     913    Int_t lo0 = ext->GetLoGainFirst();
     914
     915    //
     916    // Get the ranges for the new extractor setting. The window
     917    // size is always rounded to the next higher integer.
     918    //
     919    const Int_t wshigain = ext->GetWindowSizeHiGain();
     920    const Int_t wslogain = ext->GetWindowSizeLoGain();
     921
     922    //
     923    // Here we calculate the end of the lo-gain range
     924    // as it is done in MExtractTimeAndCharge
     925    //
     926    const Double_t poshi  = meanpulsetime;
     927    const Double_t poslo  = poshi + ext->GetOffsetLoGain();
     928    const Double_t poslo2 = poslo + ext->GetLoGainStartShift();
     929
     930    //
     931    // Do the right side checks range checks
     932    //
     933    if (poshi+wshigain+fExtractWinRight > hi1-0.5)
     934    {
     935        *fLog << err;
     936        *fLog << "ERROR - Pulse is too much to the right, out of hi-gain range [";
     937        *fLog << hi0 << "," << hi1 << "]" << endl;
    971938        *fLog << endl;
    972939        return -2;
    973940    }
    974941
     942    if (poslo+wslogain+fExtractWinRight > lo1-0.5)
     943    {
     944        *fLog << err;
     945        *fLog << "ERROR - Pulse is too much to the right, out of lo-gain range [";
     946        *fLog << lo0 << "," << lo1 << "]" << endl;
     947        return -2;
     948    }
     949
     950    //
     951    // Do the left side checks range checks
     952    //
     953    if (poshi-fExtractWinLeft < hi0+0.5)
     954    {
     955        *fLog << err;
     956        *fLog << "ERROR - Pulse is too much to the left, out of hi-gain range [";
     957        *fLog << hi0 << "," << hi1 << "]" << endl;
     958        return -3;
     959    }
     960
     961    if (poslo2-fExtractWinLeft < lo0+0.5)
     962    {
     963        *fLog << warn;
     964        *fLog << "WARNING - Pulse is too much to the left, out of lo-gain range [";
     965        *fLog << lo0 << "," << lo1 << "]" << endl;
     966        *fLog << "Trying to match extraction window and pulse position..." << endl;
     967
     968        //
     969        // Set and store the new ranges
     970        //
     971        Int_t shift = 0;
     972        while (poslo2-fExtractWinLeft < lo0+0.5)
     973        {
     974            hi1--;
     975            lo0--;
     976
     977            if (poshi+wshigain+fExtractWinRight > hi1-0.5)
     978            {
     979                *fLog << err << "ERROR - No proper extraction window found.... abort." << endl;
     980                return -3;
     981            }
     982        }
     983
     984        *fLog << "Changed extraction window by " << shift;
     985        *fLog << "slices to hi-gain [" << hi0 << "," << hi1;
     986        *fLog << "] and lo-gain [" << lo0 << "," << lo1 << "]" << endl;
     987
     988        ext->SetRange(hi0, hi1, lo0, lo1);
     989    }
     990
    975991    return kTRUE;
    976 /*
    977     //
    978     // Set and store the new ranges
    979     //
    980     const Int_t hi0 = newfirst;
    981     const Int_t hi1 = newlast+wshigain;
    982 
    983     const Int_t lo0 = newfirst>0 ? newfirst-1 : newfirst;
    984     const Int_t lo1 = numlogainsamples-1;
    985 
    986     fExtractor->SetRange(hi0, hi1, lo0, lo1);
    987     return kTRUE;*/
    988992}
    989993
  • trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc

    r8158 r8304  
    150150}
    151151
    152 void MExtractBlindPixel::SetRange(Byte_t hifirst, Byte_t hilast, Byte_t lofirst, Byte_t lolast)
     152void MExtractBlindPixel::SetRange(Byte_t hifirst, Byte_t hilast, Int_t lofirst, Byte_t lolast)
    153153{
    154154
  • trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.h

    r8158 r8304  
    8888 
    8989  void SetRange         ( const Byte_t  hifirst=0, const Byte_t hilast=0,
    90                           const Byte_t  lofirst=0, const Byte_t lolast=0 );
     90                          const Int_t   lofirst=0, const Byte_t lolast=0 );
    9191  void SetResolution    ( const Float_t f=fgResolution       )  { fResolution     = f;     }
    9292 
  • trunk/MagicSoft/Mars/msignal/MExtractPINDiode.cc

    r8155 r8304  
    145145// - fSqrtLoGainSamples to: 0.
    146146// 
    147 void MExtractPINDiode::SetRange(Byte_t hifirst, Byte_t hilast, Byte_t lofirst, Byte_t lolast)
     147void MExtractPINDiode::SetRange(Byte_t hifirst, Byte_t hilast, Int_t lofirst, Byte_t lolast)
    148148{
    149149
  • trunk/MagicSoft/Mars/msignal/MExtractPINDiode.h

    r7043 r8304  
    5656
    5757  // Setters
    58   void SetRange(Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0);
     58  void SetRange(Byte_t hifirst=0, Byte_t hilast=0, Int_t lofirst=0, Byte_t lolast=0);
    5959  void SetPINDiodeIdx  ( const UInt_t idx=fgPINDiodeIdx    ) { fPINDiodeIdx   = idx; }
    6060  void SetLowerFitLimit( const Byte_t lim=fgLowerFitLimit  ) { fLowerFitLimit = lim; }
  • trunk/MagicSoft/Mars/msignal/MExtractTime.cc

    r8154 r8304  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MExtractTime.cc,v 1.22 2006-10-24 08:24:52 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MExtractTime.cc,v 1.23 2007-02-04 15:30:16 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    8686
    8787const TString MExtractTime::fgNameTimeCam   = "MArrivalTimeCam";
     88
    8889// --------------------------------------------------------------------------
    8990//
     
    109110}
    110111
    111 
    112 
    113112// --------------------------------------------------------------------------
    114113//
     
    132131}
    133132
    134 // --------------------------------------------------------------------------
    135 //
    136 // The ReInit calls:
    137 // -  MExtractor::ReInit()
    138 //
    139 // Call:
    140 // - MArrivalTimeCam::SetUsedFADCSlices(fHiGainFirst, fHiGainLast, fNumHiGainSamples,
    141 //                                      fLoGainFirst, fLoGainLast, fNumLoGainSamples);
    142 /*
    143 Bool_t MExtractTime::ReInit(MParList *pList)
    144 {
    145     if (!MExtractor::ReInit(pList))
    146         return kFALSE;
    147 
    148 //    if (fArrTime)
    149 //      fArrTime->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fLoGainFirst, fLoGainLast);
    150 
    151     return kTRUE;
    152 }
    153 */
    154 // --------------------------------------------------------------------------
    155 //
    156 // Calculate the integral of the FADC time slices and store them as a new
    157 // pixel in the MArrivalTimeCam container.
    158 /*
    159 Int_t MExtractTime::Process()
    160 {
    161 
    162 
    163   MRawEvtPixelIter pixel(fRawEvt);
    164 
    165   while (pixel.Next())
    166     {
    167       //
    168       // Find signal in hi- and lo-gain
    169       //
    170       Float_t timehi=0., deltatimehi=0.;
    171       Byte_t sathi=0;
    172 
    173       const Int_t pixid = pixel.GetPixelId();
    174       const MPedestalPix  &ped = (*fPedestals)[pixid];
    175       MArrivalTimePix &pix = (*fArrTime)[pixid];
    176 
    177       FindTimeHiGain(pixel.GetHiGainSamples()+fHiGainFirst, timehi, deltatimehi, sathi, ped);
    178 
    179       Float_t timelo=0., deltatimelo=0.;
    180       Byte_t satlo=0;
    181 
    182       if ((sathi)&&pixel.HasLoGain())
    183           FindTimeLoGain(pixel.GetLoGainSamples()+fLoGainFirst, timelo, deltatimelo, satlo, ped);
    184 
    185       pix.SetArrivalTime(timehi, deltatimehi, timelo-fOffsetLoGain, deltatimelo);
    186       pix.SetGainSaturation(sathi, satlo);
    187  
    188     }
    189 
    190     fArrTime->SetReadyToSave();
    191 
    192     return kTRUE;
    193 }*/
    194133
    195134void MExtractTime::Print(Option_t *o) const
    196135{
    197 //    if (IsA()==MExtractTime::Class())
    198 //        *fLog << GetDescriptor() << ":" << endl;
    199136    MExtractor::Print(o);
    200137    *fLog << " Offset Lo-Gain:     " << fOffsetLoGain << endl;
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.h

    r8297 r8304  
    3030  MExtractTimeAndCharge(const char *name=NULL, const char *title=NULL);
    3131 
    32   Int_t  GetWindowSizeHiGain  () const { return fWindowSizeHiGain; }
    33   Int_t  GetWindowSizeLoGain  () const { return fWindowSizeLoGain; }
    34   Byte_t GetLoGainSwitch      () const { return fLoGainSwitch;     }
     32  Int_t   GetWindowSizeHiGain  () const { return fWindowSizeHiGain; }
     33  Int_t   GetWindowSizeLoGain  () const { return fWindowSizeLoGain; }
     34  Float_t GetLoGainStartShift  () const { return fLoGainStartShift; }
     35  Byte_t  GetLoGainSwitch      () const { return fLoGainSwitch;     }
    3536
    3637  void SetLoGainStartShift( const Float_t f=fgLoGainStartShift ) { fLoGainStartShift = f + fOffsetLoGain;  }
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.cc

    r8260 r8304  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndChargeDigitalFilter.cc,v 1.76 2007-01-16 14:14:37 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndChargeDigitalFilter.cc,v 1.77 2007-02-04 15:30:16 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    8686const Byte_t  MExtractTimeAndChargeDigitalFilter::fgHiGainFirst             =  0;
    8787const Byte_t  MExtractTimeAndChargeDigitalFilter::fgHiGainLast              = 16;
    88 const Byte_t  MExtractTimeAndChargeDigitalFilter::fgLoGainFirst             =  1;
     88const Int_t   MExtractTimeAndChargeDigitalFilter::fgLoGainFirst             =  1;
    8989const Byte_t  MExtractTimeAndChargeDigitalFilter::fgLoGainLast              = 14;
    9090const Int_t   MExtractTimeAndChargeDigitalFilter::fgBinningResolutionHiGain = 10;
     
    137137    }
    138138
    139     if (windowl > fLoGainLast-fLoGainFirst+1)
     139    if (windowl > (int)fLoGainLast-fLoGainFirst+1)
    140140    {
    141141        *fLog << err << "ERROR - The new hi-gain window size exceeds the extraction range." << endl;
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.h

    r8278 r8304  
    1717    static const Byte_t  fgHiGainFirst;             //! Default for fHiGainFirst       (now set to: 0)
    1818    static const Byte_t  fgHiGainLast;              //! Default for fHiGainLast        (now set to:14)
    19     static const Byte_t  fgLoGainFirst;             //! Default for fLoGainFirst       (now set to: 3)
     19    static const Int_t   fgLoGainFirst;             //! Default for fLoGainFirst       (now set to: 3)
    2020    static const Byte_t  fgLoGainLast;              //! Default for fLoGainLast        (now set to:14)
    2121    static const Int_t   fgBinningResolutionHiGain; //! Default for fBinningResolutionHiGain (now set to: 10)
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc

    r8297 r8304  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndChargeSpline.cc,v 1.65 2007-02-03 20:07:52 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndChargeSpline.cc,v 1.66 2007-02-04 15:30:16 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    158158const Byte_t  MExtractTimeAndChargeSpline::fgHiGainFirst      = 0;
    159159const Byte_t  MExtractTimeAndChargeSpline::fgHiGainLast       = 14;
    160 const Byte_t  MExtractTimeAndChargeSpline::fgLoGainFirst      = 1;
     160const Int_t   MExtractTimeAndChargeSpline::fgLoGainFirst      = 1;
    161161const Byte_t  MExtractTimeAndChargeSpline::fgLoGainLast       = 14;
    162162const Float_t MExtractTimeAndChargeSpline::fgResolution       = 0.05;
     
    205205// explicit call to SetChargeType().
    206206//
    207 void MExtractTimeAndChargeSpline::SetRange(Byte_t hifirst, Byte_t hilast, Byte_t lofirst, Byte_t lolast)
    208 {
    209 
     207void MExtractTimeAndChargeSpline::SetRange(Byte_t hifirst, Byte_t hilast, Int_t lofirst, Byte_t lolast)
     208{
    210209  MExtractor::SetRange(hifirst, hilast, lofirst, lolast);
    211210
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.h

    r8165 r8304  
    1717    static const Byte_t  fgHiGainFirst;      //! Default for fHiGainFirst  (now set to: 2)
    1818    static const Byte_t  fgHiGainLast;       //! Default for fHiGainLast   (now set to: 14)
    19     static const Byte_t  fgLoGainFirst;      //! Default for fLoGainFirst  (now set to: 2)
     19    static const Int_t   fgLoGainFirst;      //! Default for fLoGainFirst  (now set to: 2)
    2020    static const Byte_t  fgLoGainLast;       //! Default for fLoGainLast   (now set to: 14)
    2121    static const Float_t fgResolution;       //! Default for fResolution   (now set to: 0.003)
     
    6060    Float_t GetFallTimeHiGain() const { return fFallTimeHiGain; }
    6161
    62     void SetRange(Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0 );
     62    void SetRange(Byte_t hifirst=0, Byte_t hilast=0, Int_t lofirst=0, Byte_t lolast=0 );
    6363
    6464    void SetResolution(const Float_t f=fgResolution)  { fResolution  = f;  }
  • trunk/MagicSoft/Mars/msignal/MExtractedSignalCam.cc

    r7876 r8304  
    3434//  - fNdf
    3535//
     36// Class Version 4:
     37// ----------------
     38//  - Byte_t fFirstUsedSliceLoGain;         // First Low Gain FADC used for extraction (incl.)
     39//  + Int_t  fFirstUsedSliceLoGain;         // First Low Gain FADC used for extraction (incl.)
     40//
    3641/////////////////////////////////////////////////////////////////////////////
    3742#include "MExtractedSignalCam.h"
  • trunk/MagicSoft/Mars/msignal/MExtractedSignalCam.h

    r7810 r8304  
    2020
    2121  Byte_t fFirstUsedSliceHiGain;        // First High Gain FADC used for extraction (incl.)
    22   Byte_t fFirstUsedSliceLoGain;        // First Low Gain FADC used for extraction (incl.)
     22  Int_t fFirstUsedSliceLoGain;        // First Low Gain FADC used for extraction (incl.)
    2323 
    2424  Byte_t fLastUsedSliceHiGain;         // Last High Gain FADC used for extraction (incl.)
     
    4040
    4141    Byte_t  GetFirstUsedSliceHiGain()    const { return fFirstUsedSliceHiGain; }
    42     Byte_t  GetFirstUsedSliceLoGain()    const { return fFirstUsedSliceLoGain; }
    43 
     42    Int_t   GetFirstUsedSliceLoGain()    const { return fFirstUsedSliceLoGain; }
    4443    Byte_t  GetLastUsedSliceHiGain()     const { return fLastUsedSliceHiGain;  }
    4544    Byte_t  GetLastUsedSliceLoGain()     const { return fLastUsedSliceLoGain;  }
     
    5049    void    SetLogStream     ( MLog *lg  );
    5150    void    SetUsedFADCSlices(Byte_t firsth, Byte_t lasth, Float_t winh,
    52                               Byte_t firstl, Byte_t lastl, Float_t winl)
     51                              Int_t firstl, Byte_t lastl, Float_t winl)
    5352    {
    5453      fFirstUsedSliceHiGain    = firsth;
     
    6665    void DrawPixelContent(Int_t num) const;
    6766
    68     ClassDef(MExtractedSignalCam, 3)    // Storage Container for extracted signals in the camera
     67    ClassDef(MExtractedSignalCam, 4)    // Storage Container for extracted signals in the camera
    6968};
    7069
  • trunk/MagicSoft/Mars/msignal/MExtractor.cc

    r8258 r8304  
    141141}
    142142
    143 void MExtractor::SetRange(Byte_t hifirst, Byte_t hilast, Byte_t lofirst, Byte_t lolast)
     143void MExtractor::SetRange(Byte_t hifirst, Byte_t hilast, Int_t lofirst, Byte_t lolast)
    144144{
    145145    fHiGainFirst = hifirst;
     
    397397{
    398398    Byte_t hf = fHiGainFirst;
    399     Byte_t lf = fLoGainFirst;
     399    Int_t lf = fLoGainFirst;
    400400    Byte_t hl = fHiGainLast;
    401401    Byte_t ll = fLoGainLast;
  • trunk/MagicSoft/Mars/msignal/MExtractor.h

    r8258 r8304  
    4848  Byte_t   fHiGainFirst;                   // First FADC slice nr. to extract the High Gain signal
    4949  Byte_t   fHiGainLast;                    // Last FADC slice nr. to extract the High Gain signal
    50   Byte_t   fLoGainFirst;                   // First FADC slice nr. to extract the Low Gain signal
     50  Int_t    fLoGainFirst;                   // First FADC slice nr. to extract the Low Gain signal
    5151  Byte_t   fLoGainLast;                    // Last FADC slice nr. to extract the Low Gain signal
    5252                                           
     
    8787  Byte_t  GetHiGainFirst()      const { return fHiGainFirst;      }
    8888  Byte_t  GetHiGainLast ()      const { return fHiGainLast ;      }
    89   Byte_t  GetLoGainFirst()      const { return fLoGainFirst;      }
     89  Int_t   GetLoGainFirst()      const { return fLoGainFirst;      }
    9090  Byte_t  GetLoGainLast ()      const { return fLoGainLast ;      }
    9191  Float_t GetNumHiGainSamples() const { return fNumHiGainSamples; }
     
    102102  Float_t SetResolutionPerPheLoGain() const { return fResolutionPerPheLoGain; }
    103103
    104   virtual void SetRange(Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0);
     104  virtual void SetRange(Byte_t hifirst=0, Byte_t hilast=0, Int_t lofirst=0, Byte_t lolast=0);
    105105
    106106  void SetOffsetLoGain    ( const Float_t  f=fgOffsetLoGain          ) { fOffsetLoGain     = f;    }
Note: See TracChangeset for help on using the changeset viewer.