Changeset 8155


Ignore:
Timestamp:
10/24/06 09:43:51 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8149 r8155  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
    20  2006/10/23
     20 2006/10/24 Thomas Bretz
     21
     22   * Makefile:
     23     - added mextralgo directory
     24
     25   * mextralgo/MExtralgoDigitalFilter.[h,cc]:
     26     - added code to calculate chisq
     27     - some small changes to calculating the weights
     28
     29   * mextralgo/MExtralgoSpline.[h,cc]:
     30     - removed the random iterator, use a random number instead
     31
     32   * mjobs/MJCalibrateSignal.cc, mjobs/MJCalibration.cc,
     33     mjobs/MJPedestal.cc:
     34     - introduced new MPedestalSubtract
     35     - changed the range for the pedestal extraction window
     36       (the window should be the same as the extractor search
     37        window, even if it need not to be used in the case of
     38        the random extractor)
     39
     40   * mpedestal/MExtractPedestal.[h,cc], mpedestal/MPedCalcPedRun.[h,cc],
     41     mpedestal/MPedCalcFromLoGain.[h,cc]:
     42     - removed a lot of obsolte code
     43     - unified and moved a lot of code to the base class
     44     - moved code used only in a single derived class to this class
     45     - changed and simplified the range check for the windows
     46     - removed memcpy stuff, instead use the output of MExtractPedestal
     47     - get the window size automatically from a possible extractor
     48
     49   * mpedestal/Makefile, mpedestal/PedestalLinkDef.h:
     50     - added MHPedestalCor
     51     - added MPedestalSubtract
     52     - added MPedestalSubtractedEvt
     53     - removed MPedCalcFromData
     54
     55   * msignal/MExtractTime.[h,cc]:
     56     - commented out some code which will become obsolete soon
     57     - improved Print() function
     58
     59   * msignal/MExtractTimeAndCharge.[h,cc]:
     60     - redesign to use the new extraction interface
     61     - changed from hi/lo-gain to one sample by using
     62       MPedestalSubtractedEvt
     63     - changed the lo-gain star shift default to -6.0
     64     - moved the determination of saturation and maxima into
     65       MPedestalSubtractedEvt
     66     - improved Print() function
     67     - removed obsolete data members
     68
     69   * msignal/MExtractTimeAndChargeDigitalFilter.[h,cc]:
     70     - changed to use the new MExtralgo class instead of its own
     71       algorithm
     72     - now read a third column from the weights files
     73     - improved Print() function
     74     - removed obsolete data members
     75     - added data member for pulse shape
     76
     77   * msignal/MExtractTimeAndChargeSpline.[h,cc]:
     78     - changed to use the new MExtralgo class instead of its own
     79       algorithm
     80     - changed rise-time from 0.5 to 0.7 and fall time from 0.5 to 1.0
     81     - removed obsolete data members
     82
     83   * msignal/MExtractedSignalPix.h:
     84     - changed some comments
     85
     86   * msignal/MExtractor.cc:
     87     - changed default saturation limit from 250 to 245 to be
     88       more than two times the ab-offset away from 255
     89     - small changes to the range checks
     90     - updated Print() function
     91     - removed fHiLoLast data member
     92
     93   * msignal/Makefile:
     94     - added mextralgo as include directory
     95
     96   * msignal/calibration_weights_UV46.dat, msignal/cosmics_weights46.dat:
     97     - added third column (now contains zeros)
     98
     99   * msignal/MExtractBlindPixel.cc:
     100     - replaced self allocated arrays by MArrays
     101     - added data member fHiLoLast (for the moment)
     102
     103   * msignal/MExtractPINDiode.cc:
     104     - removed printing of fHiLoLast (it wasn't used anyhow
     105
     106
     107
     108 2006/10/23 Thomas Bretz
    21109
    22110   * mbadpixels/MBadPixelsCam.cc:
  • trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc

    r5397 r8155  
    9292//
    9393MExtractBlindPixel::MExtractBlindPixel(const char *name, const char *title)
    94     : fHiGainSignal(NULL),
    95       fHiGainFirstDeriv(NULL),
    96       fHiGainSecondDeriv(NULL),
    97       fDataType(0)
     94    : fBlindPixel(0), fHiLoLast(0), fDataType(0)
    9895{
    9996 
     
    108105
    109106  Clear();
    110 
    111 }
    112 
    113 // --------------------------------------------------------------------------
    114 //
    115 // Destructor:
    116 //
    117 // - Deletes, (if not NULL):
    118 //   fHiGainSignal;
    119 //   fHiGainFirstDeriv;
    120 //   fHiGainSecondDeriv;
    121 //
    122 MExtractBlindPixel::~MExtractBlindPixel()
    123 {
    124 
    125   if (fHiGainSignal)
    126     delete [] fHiGainSignal;
    127   if (fHiGainFirstDeriv)
    128     delete [] fHiGainFirstDeriv;
    129   if (fHiGainSecondDeriv)
    130     delete [] fHiGainSecondDeriv;
    131107
    132108}
     
    150126void MExtractBlindPixel::Clear( const Option_t *o)
    151127{
    152 
    153   fExtractionType = 0;
    154 
    155   fBlindPixelIdx.Set(0);
    156   SetBlindPixelIdx();
    157 
    158   if (fHiGainSignal)
    159     {
    160       delete [] fHiGainSignal;
    161       fHiGainSignal = NULL;
    162     }
    163   if (fHiGainFirstDeriv)
    164     {
    165       delete [] fHiGainFirstDeriv;
    166       fHiGainFirstDeriv = NULL;
    167     }
    168   if (fHiGainSecondDeriv)
    169     {
    170       delete [] fHiGainSecondDeriv;
    171       fHiGainSecondDeriv = NULL;
    172     }
    173 
     128    fExtractionType = 0;
     129
     130    fBlindPixelIdx.Set(0);
     131    SetBlindPixelIdx();
    174132}
    175133
     
    246204{
    247205 
    248   if (fHiGainSignal)
    249     delete [] fHiGainSignal;
    250   if (fHiGainFirstDeriv)
    251     delete [] fHiGainFirstDeriv;
    252   if (fHiGainSecondDeriv)
    253     delete [] fHiGainSecondDeriv;
    254 
    255206  for (Int_t i=0;i<fNumBlindPixels;i++)
    256207    fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx.At(i),i);
     
    258209  fBlindPixel->SetExtractionType(fExtractionType);
    259210
    260   for (Int_t i=0;i<fBlindPixelIdx.GetSize();i++)
     211  for (UInt_t i=0;i<fBlindPixelIdx.GetSize();i++)
    261212  {
    262213
     
    317268  const Int_t range = fHiLoFirst ? fHiLoLast - fHiLoFirst + 1 : fHiGainLast - fHiGainFirst + fHiLoLast + 1;
    318269
    319   fHiGainSignal      = new Float_t[range];
    320   memset(fHiGainSignal,0,range*sizeof(Float_t));
    321   fHiGainFirstDeriv  = new Float_t[range];
    322   memset(fHiGainFirstDeriv,0,range*sizeof(Float_t));
    323   fHiGainSecondDeriv = new Float_t[range];
    324   memset(fHiGainSecondDeriv,0,range*sizeof(Float_t));
     270  fHiGainSignal.Set(range);
     271  fHiGainSignal.Reset();
     272
     273  fHiGainFirstDeriv.Set(range);
     274  fHiGainFirstDeriv.Reset();
     275
     276  fHiGainSecondDeriv.Set(range);
     277  fHiGainSecondDeriv.Reset();
    325278
    326279  *fLog << endl;
     
    670623  fBlindPixel->Clear();
    671624 
    672   for (Int_t id=0;id<fBlindPixelIdx.GetSize();id++)
     625  for (UInt_t id=0;id<fBlindPixelIdx.GetSize();id++)
    673626    {
    674627 
  • trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.h

    r5135 r8155  
    66#endif
    77
    8 #ifndef ROOT_TArrayI
    9 #include <TArrayI.h>
     8#ifndef MARS_MArrayI
     9#include "MArrayI.h"
     10#endif
     11#ifndef MARS_MArrayF
     12#include "MArrayF.h"
    1013#endif
    1114
    1215class MExtractedSignalBlindPixel;
     16
    1317class MExtractBlindPixel : public MExtractor
    1418{
     
    2731
    2832  Byte_t   fHiLoFirst;                     // If not zero, start extraction from fHiLoFirst slice of Low-Gain
     33  Byte_t   fHiLoLast;
    2934
    30   Float_t *fHiGainSignal;                  // Need fast access to the signals in a float way
    31   Float_t *fHiGainFirstDeriv;              // First derivative at intersection
    32   Float_t *fHiGainSecondDeriv;             // Second derivative at intersection
     35  MArrayF  fHiGainSignal;                  //! Need fast access to the signals in a float way
     36  MArrayF  fHiGainFirstDeriv;              //! First derivative at intersection
     37  MArrayF  fHiGainSecondDeriv;             //! Second derivative at intersection
    3338
    3439  Float_t fResolution;                     // The time resolution in FADC units
    35   TArrayI fBlindPixelIdx;                  // Array holding the IDs of the blind pixel(s)
     40  MArrayI fBlindPixelIdx;                  // Array holding the IDs of the blind pixel(s)
    3641  Int_t   fNSBFilterLimit;                 // Limit of sum of FADC slices for filter part
    3742
     
    5661
    5762  MExtractBlindPixel(const char *name=NULL, const char *title=NULL);
    58   ~MExtractBlindPixel();
    5963
    6064  void Clear( const Option_t *o ="");
     
    6569
    6670  // Setters
    67   void SetBlindPixelIdx(  const Int_t  idx=fgBlindPixelIdx, const Int_t nr=0 ) {
    68     if (nr>fBlindPixelIdx.GetSize()-1)
    69       fBlindPixelIdx.Set(nr+1);
    70     fBlindPixelIdx.AddAt(idx,nr); }
     71  void SetBlindPixelIdx(  const Int_t  idx=fgBlindPixelIdx, const UInt_t nr=0 )
     72  {
     73      if (nr>=fBlindPixelIdx.GetSize())
     74          fBlindPixelIdx.Set(nr+1);
     75      fBlindPixelIdx[nr] = idx;
     76  }
    7177  void SetExtractionType( const ExtractionType_t typ=kAmplitude );
    7278  void SetDataType    ( const DataType_t       typ=kRawEvt    ); 
  • trunk/MagicSoft/Mars/msignal/MExtractPINDiode.cc

    r7059 r8155  
    248248  *fLog << inf << "Taking " << fNumHiGainSamples
    249249        << " HiGain samples from slice " << (Int_t)fHiGainFirst
    250         << " to " << (Int_t)(fHiGainLast+fHiLoLast) << " incl" << endl;
     250        << " to " << (Int_t)(fHiGainLast/*+fHiLoLast*/) << " incl" << endl;
    251251
    252252  return kTRUE;
Note: See TracChangeset for help on using the changeset viewer.