Ignore:
Timestamp:
02/15/09 23:12:04 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhflux
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.cc

    r9303 r9343  
    8888//   +  Double_t fTotalTime;
    8989//
     90//  Class version 4:
     91//  ----------------
     92//   +  Double_t fEffOnTime;    //[s] On time as fitted from the DeltaT distribution
     93//   +  Double_t fEffOnTimeErr; //[s] On time error as fitted from the DeltaT distribution
    9094//
    9195// ==========================================================================
     
    301305MHEffectiveOnTime::MHEffectiveOnTime(const char *name, const char *title)
    302306    : fPointPos(0), fTime(0), fParam(0), fIsFinalized(kFALSE),
    303     fNumEvents(200*60), fFirstBin(3), fTotalTime(-1)
     307    fNumEvents(200*60), fFirstBin(3), fTotalTime(-1),
     308    fEffOnTime(-1), fEffOnTimeErr(0)
    304309    //fNumEvents(2*60), fFirstBin(1)
    305310{
     
    479484   fTotalTime = 0;
    480485
     486   fEffOnTime    = -1;
     487   fEffOnTimeErr =  0;
     488
    481489   return kTRUE;
    482490}
     
    714722    fTime->Plus1ns();
    715723
    716     *fLog << fLastTime << ":  Val=" << res[0] << "  Err=" << res[1] << endl;
     724    *fLog << inf2 << fLastTime << ":  Val=" << res[0] << "  Err=" << res[1] << endl;
    717725}
    718726
     
    780788    FitThetaBins();
    781789    FitTimeBin();
     790
     791
     792    TH1D *h = fH2DeltaT.ProjectionX("FinalizeProjDeltaT", -1, -1, "E");
     793    Double_t res[7];
     794    if (FitH(h, res))
     795    {
     796        fEffOnTime    = res[0];
     797        fEffOnTimeErr = res[1];
     798    }
     799    delete h;
     800
    782801
    783802    fIsFinalized = kTRUE;
  • trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.h

    r9153 r9343  
    5050    UInt_t fFirstBin;    // For bin for fit
    5151
    52     Double_t fTotalTime; //[s] Total time accumulated from run-header
     52    Double_t fTotalTime;    //[s] Total time accumulated from run-header
     53    Double_t fEffOnTime;    //[s] On time as fitted from the DeltaT distribution
     54    Double_t fEffOnTimeErr; //[s] On time error as fitted from the DeltaT distribution
    5355
    5456    // MHEffectiveOnTime
     
    8183    // Getter
    8284    Double_t GetTotalTime() const { return fTotalTime; }
     85    Double_t GetEffOnTime() const { return fEffOnTime; }
    8386
    8487    const TH1D &GetHEffOnTheta() const { return fHThetaEffOn; }
Note: See TracChangeset for help on using the changeset viewer.