Ignore:
Timestamp:
06/01/05 18:13:13 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhflux
Files:
3 edited

Legend:

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

    r7064 r7122  
    8383    : fNameParameter("MHillasSrc"), fParameter(0),
    8484    fOffData(0), fResult(0), /*fExcess(0),*/ fEnergy(0), fHillas(0),
    85     fPointPos(0), fTimeEffOn(0), fTime(0),
    86     fSkipHistTime(kFALSE), fSkipHistTheta(kFALSE), fSkipHistEnergy(kFALSE),
    87     fForceUsingSize(kFALSE), fNumTimeBins(10), fMatrix(0)
    88 
     85    fPointPos(0), fTimeEffOn(0), fTime(0), fNumTimeBins(10),
     86    fMatrix(0), fSkipHistTime(kFALSE), fSkipHistTheta(kFALSE),
     87    fSkipHistEnergy(kFALSE), fForceUsingSize(kFALSE)
    8988{
    9089    //
     
    449448    if (fMatrix)
    450449    {
    451         alpha  = (*fMatrix)[fMap[0]];
     450        alpha  = fMap[0]<0 ? GetVal() : (*fMatrix)[fMap[0]];
    452451        energy = fMap[1]<0 ? -1 : (*fMatrix)[fMap[1]];
    453452        size   = fMap[2]<0 ? -1 : (*fMatrix)[fMap[2]];
  • trunk/MagicSoft/Mars/mhflux/MHAlpha.h

    r7064 r7122  
    5252    MTime    fLastTime;         //! Last fTimeEffOn
    5353
     54    UShort_t fNumTimeBins;      // Number of time bins to fill together
     55    UShort_t fNumRebin;         //!
     56
     57    //const TString fNameProjAlpha;  //! This should make sure, that gROOT doen't confuse the projection with something else
     58protected:
     59    MHMatrix *fMatrix;          //!
     60    Int_t fMap[5];              //!
     61
    5462    Bool_t fSkipHistTime;
    5563    Bool_t fSkipHistTheta;
     
    5765    Bool_t fForceUsingSize;
    5866
    59     UShort_t fNumTimeBins;      // Number of time bins to fill together
    60     UShort_t fNumRebin;         //!
    61 
    62     //const TString fNameProjAlpha;  //! This should make sure, that gROOT doen't confuse the projection with something else
    63 
    64     MHMatrix *fMatrix;          //!
    65     Int_t fMap[5];              //!
    66 
    67     Float_t FitEnergyBins(Bool_t paint=kFALSE);
     67private:
     68     Float_t FitEnergyBins(Bool_t paint=kFALSE);
    6869    void FitThetaBins(Bool_t paint=kFALSE);
    6970
     
    127128    void DrawAll(); //*MENU*
    128129
    129     void InitMapping(MHMatrix *mat, Int_t type=0);
     130    virtual void InitMapping(MHMatrix *mat, Int_t type=0);
    130131    void StopMapping();
    131132
  • trunk/MagicSoft/Mars/mhflux/MHDisp.cc

    r7115 r7122  
    197197            return kFALSE;
    198198        }
    199         const Double_t m3l = fHilExt->GetM3Long()*TMath::Sign(1.0f, hsrc.GetCosDeltaAlpha())*fMm2Deg;
     199        const Double_t m3l = fHilExt->GetM3Long()*TMath::Sign(fMm2Deg, hsrc.GetCosDeltaAlpha());
    200200
    201201        gweight = m3l>fM3lCut ? 1 : 0;
     
    217217    }
    218218
    219     // Workaround: Number-of-entries
    220     if (gweight>0.25)
    221         fHist.Fill(pos1.X(), pos1.Y(), 0.0, w*gweight);
    222     if (gweight<0.75)
    223         fHist.Fill(pos2.X(), pos2.Y(), 0.0, w*(1-gweight));
     219    fHist.Fill(pos1.X(), pos1.Y(), 0.0, w*gweight);
     220    fHist.Fill(pos2.X(), pos2.Y(), 0.0, w*(1-gweight));
    224221
    225222    return kTRUE;
     
    273270        const Double_t x0 = h1->GetXaxis()->GetBinCenter(ix);
    274271        const Double_t y0 = h1->GetYaxis()->GetBinCenter(iy);
     272        const Double_t w0 = h1->GetXaxis()->GetBinWidth(1);
    275273
    276274        for (int x=0; x<h1->GetNbinsX(); x++)
     
    294292        h2->Fit(&func, "IMQ", "", 0, 1.0);
    295293
    296         const Double_t r0 = 2*func.GetParameter(2);
    297         const Double_t e  = func.Integral(0, r0)/h1->GetBinWidth(1);
    298         func.SetParameter(0, 0);
    299         const Double_t b  = func.Integral(0, r0)/h1->GetBinWidth(1);
     294        // No wintegrate the function f(x) per Delta Area
     295        // which is f(x)/(pi*delta r*(2*r+delta r))
     296        TF1 func2("fcn2", Form("(gaus + [3]*x*x + [4])/(2*x+%.5f)", w0));
     297        for (int i=0; i<5; i++)
     298            func2.SetParameter(i, func.GetParameter(i));
     299
     300        const Double_t r0 = 2*func2.GetParameter(2);
     301        const Double_t e  = func2.Integral(0, r0)/(w0*TMath::Pi());
     302        func2.SetParameter(0, 0);
     303        const Double_t b  = func2.Integral(0, r0)/(w0*TMath::Pi());
    300304        const Double_t s  = MMath::SignificanceLiMa(e, b);
    301305
Note: See TracChangeset for help on using the changeset viewer.