Changeset 3115 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
02/12/04 12:42:48 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3112 r3115  
    44
    55                                                 -*-*- END OF LINE -*-*-
     6 2004/02/12: Markus Gaug
     7 
     8   * mbase/MArray.[h,cc]:
     9     - changed name of StripZeros
     10
     11   * mcalib/MHGausEvent.cc:
     12     - corrected call to StripZeros
     13
     14
    615 2004/02/12: Thomas Bretz
    716 
  • trunk/MagicSoft/Mars/mbase/MArray.cc

    r3112 r3115  
    4747//  Cuts the last entries of an array containing only zeros.
    4848//
    49 void MArray::CutEdges(TArrayD &arr)
     49void MArray::StripZeros(TArrayD &arr)
    5050{
    5151    const Int_t n = arr.GetSize();
     
    6363//  Cuts the last entries of an array containing only zeros.
    6464//
    65 void MArray::CutEdges(TArrayF &arr)
     65void MArray::StripZeros(TArrayF &arr)
    6666{
    6767    const Int_t n = arr.GetSize();
  • trunk/MagicSoft/Mars/mbase/MArray.h

    r3112 r3115  
    3232   virtual void Set(UInt_t n) = 0;
    3333
    34    static void  CutEdges(TArrayF &arr);
    35    static void  CutEdges(TArrayD &arr);
     34   static void  StripZeros(TArrayF &arr);
     35   static void  StripZeros(TArrayD &arr);       
    3636   
    3737   ClassDef(MArray, 1)  //Abstract array base class for TObject derived Arrays
  • trunk/MagicSoft/Mars/mcalib/MCalibrate.h

    r2949 r3115  
    3535public:
    3636
    37     enum CalibrationMode_t{kNone=0,kBlindPixel,kFfactor,kPinDiode,kCombined};
     37    enum CalibrationMode_t{kNone=0,kBlindPixel,kFfactor,kPinDiode,kCombined, kDummy};
    3838    static const CalibrationMode_t kDefault = kBlindPixel;
    3939
  • trunk/MagicSoft/Mars/mcalib/MCalibrationPix.cc

    r3065 r3115  
    113113  CLRBIT(fFlags, kFFactorMethodValid);
    114114  CLRBIT(fFlags, kPINDiodeMethodValid);
     115  CLRBIT(fFlags, kCombinedMethodValid);
    115116
    116117  fCharge                           =  -1.;
     
    143144  fMeanConversionBlindPixelMethod   =  -1.;
    144145  fMeanConversionPINDiodeMethod     =  -1.;
     146  fMeanConversionCombinedMethod     =  -1.;
    145147
    146148  fErrorConversionFFactorMethod     =  -1.;
    147149  fErrorConversionBlindPixelMethod  =  -1.;
    148150  fErrorConversionPINDiodeMethod    =  -1.;
     151  fErrorConversionCombinedMethod    =  -1.;
    149152
    150153  fSigmaConversionFFactorMethod     =  -1.;
    151154  fSigmaConversionBlindPixelMethod  =  -1.;
    152155  fSigmaConversionPINDiodeMethod    =  -1.;
     156  fSigmaConversionCombinedMethod    =  -1.;
    153157
    154158  fFactorCalculated = kFALSE;
     
    191195  fErrorConversionFFactorMethod = err;
    192196  fSigmaConversionFFactorMethod = sig;
     197}
     198
     199// --------------------------------------------------------------------------
     200//
     201// Set the conversion factors from outside (only for MC)
     202//
     203void MCalibrationPix::SetConversionCombinedMethod(Float_t c, Float_t err, Float_t sig)
     204{
     205  fMeanConversionCombinedMethod = c;
     206  fErrorConversionCombinedMethod = err;
     207  fSigmaConversionCombinedMethod = sig;
    193208}
    194209
     
    395410}
    396411
    397 
     412Float_t MCalibrationPix::GetTotalFFactorCombinedMethod()
     413{
     414  return 1.;
     415}
     416
     417Float_t MCalibrationPix::GetTotalFFactorErrorCombinedMethod()
     418{
     419
     420  return 1.;
     421}
    398422
    399423Float_t MCalibrationPix::GetMeanConversionFFactorMethod()
     
    485509{
    486510  return TESTBIT(fFlags, kPINDiodeMethodValid);   
     511}
     512
     513Bool_t MCalibrationPix::IsCombinedMethodValid()
     514{
     515  return TESTBIT(fFlags, kCombinedMethodValid);   
    487516}
    488517
  • trunk/MagicSoft/Mars/mcalib/MCalibrationPix.h

    r3065 r3115  
    5656  Float_t fMeanConversionBlindPixelMethod;  // The conversion factor to Ph's (Blind Pixel method)
    5757  Float_t fMeanConversionPINDiodeMethod;    // The conversion factor to Ph's (PIN Diode method)
     58  Float_t fMeanConversionCombinedMethod;    // The conversion factor to Ph's (all methods combined)
    5859
    5960  Float_t fErrorConversionFFactorMethod;    // The error of the conversion factor to Phe's (F-factor method)
    6061  Float_t fErrorConversionBlindPixelMethod; // The error of the conversion factor to Ph's (Blind Pixel method)
    6162  Float_t fErrorConversionPINDiodeMethod;   // The error of the conversion factor to Ph's (PIN Diode method)
     63  Float_t fErrorConversionCombinedMethod;   // The error of the conversion factor to Ph's (all methods combined)
    6264
    6365  Float_t fSigmaConversionFFactorMethod;    // The sigma of conversion factor to Phe's (F-factor method)
    6466  Float_t fSigmaConversionBlindPixelMethod; // The conversion factor to Ph's (Blind Pixel method)
    6567  Float_t fSigmaConversionPINDiodeMethod;   // The conversion factor to Ph's (PIN Diode method)
     68  Float_t fSigmaConversionCombinedMethod;   // The conversion factor to Ph's (all methods combined)
    6669
    6770  Float_t fTotalFFactor;                    // The F-Factor of the total readout system (Sigma(out)/mean(out)*Mean(in)/sigma(in)
     
    8083          kChargeValid, kTimeFitValid,
    8184          kFitted, kOscillating,
    82           kBlindPixelMethodValid, kFFactorMethodValid, kPINDiodeMethodValid };
     85          kBlindPixelMethodValid, kFFactorMethodValid, kPINDiodeMethodValid, kCombinedMethodValid };
    8386 
    8487  MHCalibrationPixel *fHist;                // Pointer to the histograms performing the fits, etc. 
     
    128131  Float_t GetSigmaConversionPINDiodeMethod()   const { return fSigmaConversionPINDiodeMethod ; }
    129132
     133  Float_t GetMeanConversionCombinedMethod()    const { return fMeanConversionCombinedMethod ;  }
     134  Float_t GetErrorConversionCombinedMethod()   const { return fErrorConversionCombinedMethod ; }
     135  Float_t GetSigmaConversionCombinedMethod()   const { return fSigmaConversionCombinedMethod ; }
     136
    130137  Float_t GetPheFFactorMethod();   
    131138  Float_t GetPheFFactorMethodError();
     
    144151  Float_t GetTotalFFactorPINDiodeMethod();
    145152  Float_t GetTotalFFactorErrorPINDiodeMethod();
     153
     154  Float_t GetTotalFFactorCombinedMethod();
     155  Float_t GetTotalFFactorErrorCombinedMethod();
    146156 
    147157  Bool_t IsExcluded()              const;
     
    154164  Bool_t IsPINDiodeMethodValid()   const;
    155165  Bool_t IsFFactorMethodValid();
     166  Bool_t IsCombinedMethodValid();
    156167
    157168  // Setter
     
    164175  void SetConversionBlindPixelMethod(Float_t c, Float_t err, Float_t sig);
    165176  void SetConversionPINDiodeMethod(Float_t c, Float_t err, Float_t sig);
     177  void SetConversionCombinedMethod(Float_t c, Float_t err, Float_t sig);
    166178
    167179  // Bit Setters
  • trunk/MagicSoft/Mars/mcalib/MHGausEvent.cc

    r3112 r3115  
    177177 
    178178  // This cuts only the non-used zero's, but MFFT will later cut the rest
    179   MArray::CutEdges(*fEvents);
     179  MArray::StripZeros(*fEvents);
    180180
    181181  MFFT fourier;
Note: See TracChangeset for help on using the changeset viewer.