| 1 | #ifndef MARS_MHEffectiveOnTime
|
|---|
| 2 | #define MARS_MHEffectiveOnTime
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MH
|
|---|
| 5 | #include "MH.h"
|
|---|
| 6 | #endif
|
|---|
| 7 | #ifndef MARS_MTime
|
|---|
| 8 | #include "MTime.h"
|
|---|
| 9 | #endif
|
|---|
| 10 | #ifndef ROOT_TH1
|
|---|
| 11 | #include <TH1.h>
|
|---|
| 12 | #endif
|
|---|
| 13 | #ifndef ROOT_TH2
|
|---|
| 14 | #include <TH2.h>
|
|---|
| 15 | #endif
|
|---|
| 16 |
|
|---|
| 17 | class MTime;
|
|---|
| 18 | class MPointingPos;
|
|---|
| 19 | class MParameterDerr;
|
|---|
| 20 |
|
|---|
| 21 | class MParList;
|
|---|
| 22 |
|
|---|
| 23 | class MHEffectiveOnTime : public MH
|
|---|
| 24 | {
|
|---|
| 25 | private:
|
|---|
| 26 | MPointingPos *fPointPos; //! Container to get the zenith angle from
|
|---|
| 27 | MTime fLastTime; //! Time-Stamp of last event
|
|---|
| 28 |
|
|---|
| 29 | MTime *fTime; //! Time-Stamp of "effective on-time" event
|
|---|
| 30 | MParameterDerr *fParam; //! Output container for effective on-time
|
|---|
| 31 |
|
|---|
| 32 | TH2D fH2DeltaT; // Counts vs Delta T and Theta
|
|---|
| 33 | TH1D fH1DeltaT; //! Counts vs Delta T (for a time interval)
|
|---|
| 34 |
|
|---|
| 35 | TH1D fHEffOnTheta; // Effective On time versus Theta
|
|---|
| 36 | TH1D fHEffOnTime; // Effective On time versus Time
|
|---|
| 37 |
|
|---|
| 38 | TH1D fHProbTheta; // Chisq prob fit of Effective On time versus Theta
|
|---|
| 39 | TH1D fHProbTime; // Chisq prob fit of Effective On time versus Time
|
|---|
| 40 |
|
|---|
| 41 | TH1D fHN0;
|
|---|
| 42 | TH1D fHLambda;
|
|---|
| 43 |
|
|---|
| 44 | Bool_t fIsFinalized; // Flag telling you whether fHEffOnTheta is the final result
|
|---|
| 45 |
|
|---|
| 46 | Int_t fNumEvents; // Number of events to be used for a bin in time
|
|---|
| 47 |
|
|---|
| 48 | const TString fNameProjDeltaT; //! This should make sure, that gROOT doen't confuse the projection with something else
|
|---|
| 49 | const TString fNameProjTheta; //! This should make sure, that gROOT doen't confuse the projection with something else
|
|---|
| 50 |
|
|---|
| 51 | Bool_t FitH(TH1D *h, Double_t *res, Bool_t paint=kFALSE) const;
|
|---|
| 52 | void FitThetaBins();
|
|---|
| 53 | void FitTimeBin();
|
|---|
| 54 | void PaintText(Double_t val, Double_t error) const;
|
|---|
| 55 |
|
|---|
| 56 | public:
|
|---|
| 57 | MHEffectiveOnTime(const char *name=NULL, const char *title=NULL);
|
|---|
| 58 |
|
|---|
| 59 | void SetNumEvents(Int_t i) { fNumEvents=i; }
|
|---|
| 60 |
|
|---|
| 61 | Bool_t SetupFill(const MParList *pList);
|
|---|
| 62 | Bool_t Fill(const MParContainer *par, const Stat_t w=1);
|
|---|
| 63 | Bool_t Finalize();
|
|---|
| 64 |
|
|---|
| 65 | const TH1D &GetHEffOnTheta() const { return fHEffOnTheta; }
|
|---|
| 66 | const TH1D &GetHEffOnTime() const { return fHEffOnTime; }
|
|---|
| 67 |
|
|---|
| 68 | void Draw(Option_t *option="");
|
|---|
| 69 | void Paint(Option_t *opt="");
|
|---|
| 70 |
|
|---|
| 71 | ClassDef(MHEffectiveOnTime, 1) // Histogram to determin effective On-Time vs Time and Zenith Angle
|
|---|
| 72 | };
|
|---|
| 73 |
|
|---|
| 74 | #endif
|
|---|
| 75 |
|
|---|