Ignore:
Timestamp:
10/21/04 09:03:53 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhflux
Files:
2 edited

Legend:

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

    r5100 r5300  
    299299        return;
    300300
    301     const Int_t steps = 6;
     301    const Int_t steps = 10;
    302302
    303303    static int rebin = steps;
     
    398398void MHAlpha::PaintText(Double_t val, Double_t error) const
    399399{
    400     TLatex text(0.45, 0.94, Form("N_{exc} = %.1fs \\pm %.1fs", val, error));
     400    TLatex text(0.45, 0.94, Form("N_{exc} = %.1f \\pm %.1f", val, error));
    401401    text.SetBit(TLatex::kTextNDC);
    402402    text.SetTextSize(0.04);
     
    463463    if (o==(TString)"energy")
    464464    {
    465         if (fHEnergy.GetEntries()>10)
     465        if (fHEnergy.GetMaximum()>1)
    466466        {
    467467            gPad->SetLogx();
     
    542542    // Store the final result in fFit
    543543    TH1D *h = fHAlpha.ProjectionZ("AlphaExc_px", -1, 9999, -1, 9999, "E");
     544    h->SetDirectory(0);
    544545    fFit.Print();
    545546    Bool_t rc = fFit.Fit(*h);
  • trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc

    r5143 r5300  
    120120#include <TStyle.h>
    121121#include <TCanvas.h>
     122#include <TRandom.h>
    122123#include <TPaveText.h>
    123124#include <TStopwatch.h>
     
    146147using namespace std;
    147148
     149class MHillasExt;
     150
    148151// --------------------------------------------------------------------------
    149152//
     
    152155MHFalseSource::MHFalseSource(const char *name, const char *title)
    153156    : fTime(0), fPointPos(0), fObservatory(0), fMm2Deg(-1), fAlphaCut(12.5),
    154     fBgMean(55), fMinDist(-1), fMaxDist(-1), fMinLD(-1), fMaxLD(-1)
     157    fBgMean(55), fMinDist(-1), fMaxDist(-1), fMinDW(-1), fMaxDW(-1)
    155158{
    156159    //
     
    244247//
    245248// Also search for MTime, MObservatory and MPointingPos
    246 //
     249//
     250MHillasExt *ext=0;
    247251Bool_t MHFalseSource::SetupFill(const MParList *plist)
    248252{
     
    251255    {
    252256        *fLog << err << "MGeomCam not found... aborting." << endl;
     257        return kFALSE;
     258    }
     259    ext = (MHillasExt*)plist->FindObject("MHillasExt");
     260    if (!ext)
     261    {
     262        *fLog << err << "MHillasExt not found... aborting." << endl;
    253263        return kFALSE;
    254264    }
     
    355365
    356366            // Source dependant hillas parameters
    357             if (hsrc.Calc(*hil)>0)
     367            if (hsrc.Calc(*hil, ext)>0)
    358368            {
    359369                *fLog << warn << "Calculation of MHillasSrc failed for x=" << cx[ix] << " y=" << cy[iy] << endl;
     
    369379                continue;
    370380
    371             if (fMaxLD>0 && hil->GetLength()>fMaxLD*hsrc.GetDist())
     381            if (fMaxDW>0 && hsrc.GetDist()>fMaxDW*hil->GetWidth())
    372382                continue;
    373             if (fMinLD>0 && hil->GetLength()<fMinLD*hsrc.GetDist())
     383            if (fMinDW<0 && hsrc.GetDist()<fMinDW*hil->GetWidth())
    374384                continue;
    375385
     
    462472
    463473    // Get projection for range
    464     TH2D *p = (TH2D*)fHist.Project3D("yx_all");
     474    TH2D *p = (TH2D*)fHist.Project3D(Form("yx_%d", gRandom->Uniform(999999)));
     475    p->SetDirectory(0);
    465476
    466477    // Move contents from projection to h3
Note: See TracChangeset for help on using the changeset viewer.