Ignore:
Timestamp:
11/27/04 16:36:36 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.h

    r5219 r5487  
    22#define MARS_MPedCalcPedRun
    33
    4 #ifndef MARS_MExtractor
    5 #include "MExtractor.h"
     4#ifndef MARS_MExtractPedestal
     5#include "MExtractPedestal.h"
    66#endif
    77
    8 #ifndef ROOT_TArrayD
    9 #include <TArrayD.h>
     8#ifndef MARS_MArrayD
     9#include <MArrayD.h>
    1010#endif
    1111
    12 #ifndef ROOT_TArrayI
    13 #include <TArrayI.h>
     12#ifndef MARS_MArrayI
     13#include <MArrayI.h>
    1414#endif
    1515
    16 class MGeomCam;
    17 class MPedCalcPedRun : public MExtractor
     16class MRawEvtPixelIter;
     17class MPedestalPix;
     18class MPedCalcPedRun : public MExtractPedestal
    1819{
    1920
    20   static const Byte_t fgHiGainFirst;      // First FADC slice Hi-Gain (currently set to: 3)
    21   static const Byte_t fgHiGainLast;       // Last FADC slice Hi-Gain (currently set to: 14)
    22   static const Byte_t fgLoGainFirst;      // First FADC slice Lo-Gain (currently set to: 3)
    23   static const Byte_t fgLoGainLast;       // Last FADC slice Lo-Gain (currently set to: 14)
    24   static const Byte_t fgHiGainWindowSize; // The extraction window Hi-Gain
    25   static const Byte_t fgLoGainWindowSize; // The extraction window Lo-Gain
     21  static const UShort_t fgExtractWinFirst;  // First FADC slice Hi-Gain (currently set to: 3)
     22  static const UShort_t fgExtractWinSize;   // Extraction Size Hi-Gain (currently set to: 14)
     23  static const UInt_t   gkFirstRunWithFinalBits; // First Run with pedestal trigger bit at place 3
    2624 
    27   UInt_t  fNumSamplesTot;
    28   Byte_t  fWindowSizeHiGain; // Number of Hi Gain slices in window
    29   Byte_t  fWindowSizeLoGain; // Number of Lo Gain slices in window
     25  UShort_t fOverlap;         // Number of overlapping slices from High-Gain to Low-Gain
     26
     27  Bool_t  fFirstRun;         // Flag to tell if the first run out of many is used
     28  Bool_t  fSkip;             // Flag to tell if the Process has to be skipped
     29  ULong_t fUsedEvents;       // Number of used (not skipped) events
    3030 
    31   MGeomCam *fGeom;           // Camera geometry
     31  Bool_t IsPedBitSet();
    3232 
    33   TArrayD fSumx;             // sum of values
    34   TArrayD fSumx2;            // sum of squared values
    35   TArrayD fSumAB0;           // sum of ABFlag=0 slices
    36   TArrayD fSumAB1;           // sum of ABFlag=1 slices
    37   TArrayD fAreaSumx;         // averaged sum of values per area idx
    38   TArrayD fAreaSumx2;        // averaged sum of squared values per area idx
    39   TArrayD fAreaSumAB0;       // averaged sum of ABFlag=0 slices per area idx
    40   TArrayD fAreaSumAB1;       // averaged sum of ABFlag=1 slices per area idx
    41   TArrayI fAreaValid;        // number of valid pixel with area idx
    42   TArrayD fSectorSumx;       // averaged sum of values per sector
    43   TArrayD fSectorSumx2;      // averaged sum of squared values per sector
    44   TArrayD fSectorSumAB0;     // averaged sum of ABFlag=0 slices per sector
    45   TArrayD fSectorSumAB1;     // averaged sum of ABFlag=1 slices per sector
    46   TArrayI fSectorValid;      // number of valid pixel with sector idx
    47  
    48   Int_t  PreProcess (MParList *pList);
    4933  Bool_t ReInit     (MParList *pList);
    5034  Int_t  Process    ();
    5135  Int_t  PostProcess();
    52   Int_t  ReadEnv(const TEnv &env, TString prefix, Bool_t print);
     36 
     37  void ResetArrays();
     38  void CalcSums   ( MRawEvtPixelIter *pixel, Float_t &sum, UInt_t &ab0, UInt_t &ab1);
     39  void CalcExtractor( MRawEvtPixelIter *pixel, Float_t &sum, MPedestalPix &ped);
    5340 
    5441public:
     
    5643  MPedCalcPedRun(const char *name=NULL, const char *title=NULL);
    5744 
    58   void Clear(const Option_t *o="");
     45  Int_t CallPostProcess(); 
     46
     47  void Print(Option_t *o="") const;
    5948 
    60   void SetRange        ( const Byte_t hifirst=0, const Byte_t hilast=0,
    61                          const Byte_t lofirst=0, const Byte_t lolast=0  );
    62   void SetWindowSize   ( const Byte_t windowh=0, const Byte_t windowl=0 );
    63  
    64   ClassDef(MPedCalcPedRun, 0)   // Task to calculate pedestals from pedestal runs raw data
     49  ClassDef(MPedCalcPedRun, 1)   // Task to calculate pedestals from pedestal runs
    6550};
    6651
Note: See TracChangeset for help on using the changeset viewer.