Changeset 3757


Ignore:
Timestamp:
04/15/04 17:13:25 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3756 r3757  
    3636     - added MArrivalTime::Init()
    3737
     38   * msignal/MArrivalTime.[h,cc]
     39     - added array fDataErr
    3840
    3941
  • trunk/MagicSoft/Mars/mcalib/MCalibrateRelTimes.cc

    r3752 r3757  
    174174     
    175175      Float_t signal;
     176      Float_t sigerr;
    176177           
    177178      if (sig.IsLoGainUsed())
    178         signal = sig.GetArrivalTimeLoGain();
     179        {
     180          signal = sig.GetArrivalTimeLoGain();
     181          sigerr = sig.GetArrivalTimeLoGainError();
     182        }
    179183      else
    180         signal = sig.GetArrivalTimeHiGain();
     184        {
     185          signal = sig.GetArrivalTimeHiGain();
     186          sigerr = sig.GetArrivalTimeHiGainError();
     187        }
    181188     
    182189      const Float_t time = signal - offset;
    183 
    184       //
    185       // The following part is the outcommented first version of the error calculation
    186       // Contact Markus Gaug for questions (or wait for the next documentation update...)
    187       //
    188       /*
    189         nphotErr = signal    > 0 ? signalErr*signalErr / (signal * signal)  : 0.
    190                  + calibConv > 0 ? calibConvVar  / (calibConv * calibConv ) : 0.
    191                  + calibQE   > 0 ? calibQEVar    / (calibQE   * calibQE   ) : 0.;
    192         nphotErr  = TMath::Sqrt(nphotErr) * nphot;
    193       */
     190      Float_t err        = sigerr*sigerr + precision*precision;
     191      if (err > 0)
     192        err = TMath::Sqrt(err);
    194193
    195194      fArrivalTime->SetTime(pixidx,time);
     195      fArrivalTime->SetTimeErr(pixidx,err);
    196196
    197197    } /* for (UInt_t pixidx=0; pixidx<npix; pixidx++) */
  • trunk/MagicSoft/Mars/msignal/MArrivalTime.cc

    r3306 r3757  
    1717!
    1818!   Author(s): Sebastian Raducci, 12/2003 <mailto:raducci@fisica.uniud.it>
     19!              Markus Gaug        04/2004 <mailto:markus@ifae.es>
    1920!
    2021!   Copyright: MAGIC Software Development, 2000-2004
     
    6263void MArrivalTime::Reset()
    6364{
    64     fData.Reset(-1);
     65  fData.Reset(-1);
     66  fDataErr.Reset(-1);
    6567}
    6668
    6769void MArrivalTime::InitSize(Int_t i)
    6870{
    69     fData.Set(i);
     71  fData.Set(i);
     72  fDataErr.Set(i);
    7073}
    7174
     
    7780{
    7881    fData[i] = t;
     82}
     83     
     84
     85// -------------------------------------------------------------------------
     86//
     87// Set the arrival time error in one pixel
     88//
     89void MArrivalTime::SetTimeErr(const Int_t i, const Float_t t)
     90{
     91    fDataErr[i] = t;
    7992}
    8093     
  • trunk/MagicSoft/Mars/msignal/MArrivalTime.h

    r3306 r3757  
    2020class MArrivalTime : public MParContainer, public MCamEvent
    2121{
    22  private:
    23     TArrayF fData;  // Stores the arrival times
     22private:
     23  TArrayF fData;     // Stores the calibrated arrival times
     24  TArrayF fDataErr;  // Stores the calibrated arrival time errors
    2425
    2526public:
     
    3435
    3536    void SetTime(const Int_t i, const Float_t time);
     37    void SetTimeErr(const Int_t i, const Float_t timeerr);   
    3638   
    3739    const TArrayF &GetData() const { return fData; }
     40    const TArrayF &GetDataErr() const { return fDataErr; }
    3841
    3942    Double_t operator[](int i) { return fData[i]; }
     43    Double_t operator()(int i) { return fDataErr[i]; }   
    4044
    4145    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
Note: See TracChangeset for help on using the changeset viewer.