Ignore:
Timestamp:
04/19/10 13:40:16 (14 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc

    r9369 r9573  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHSingleMuon.cc,v 1.19 2009-03-01 21:48:14 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHSingleMuon.cc,v 1.20 2010-04-19 12:40:16 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    8484
    8585#include <TF1.h>
    86 #include <TMinuit.h>
    8786#include <TPad.h>
    8887#include <TCanvas.h>
     
    231230
    232231        // use only the inner pixles. FIXME: This is geometry dependent
    233         if(gpix.GetAidx()>0)
     232        if (gpix.GetAidx()>0)
    234233            continue;
    235234
    236235        fHistWidth.Fill(dist*fGeomCam->GetConvMm2Deg(), pix.GetNumPhotons());
    237236    }
     237
    238238    // Setup the function and perform the fit
    239239    TF1 g1("g1", "gaus");//, -fHistTime.GetXmin(), fHistTime.GetXmax());
     
    253253    //           R  use the range specified in the function range
    254254    //           Q  quiet mode
    255     fHistTime.Fit(&g1, "QNB");
    256 
    257     Double_t dummy;
    258     gMinuit->GetParameter(1, fRelTimeMean,   dummy);  // get the mean  value
    259     gMinuit->GetParameter(2, fRelTimeSigma,  dummy);  // get the sigma value
     255    if (fHistTime.Fit(&g1, "QNB"))
     256        return kTRUE;
     257
     258    fRelTimeMean  = g1.GetParameter(1);
     259    fRelTimeSigma = g1.GetParameter(2);
    260260
    261261    // The mean arrival time which was subtracted before will
     
    435435    fHistWidth.Fit(&f1, "QRN");
    436436
    437     chi = f1.GetChisquare()/f1.GetNDF();
    438 
    439     Double_t ferr;
    440     gMinuit->GetParameter(2, width, ferr); // get the sigma value
     437    if (!gMinuit)
     438        return kFALSE;
     439
     440    chi   = f1.GetChisquare()/f1.GetNDF();
     441    width = f1.GetParameter(2);
    441442
    442443    return kTRUE;
Note: See TracChangeset for help on using the changeset viewer.