Changeset 9573 for trunk/MagicSoft/Mars/mmuon
- Timestamp:
- 04/19/10 13:40:16 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc
r9369 r9573 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHSingleMuon.cc,v 1. 19 2009-03-01 21:48:14tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHSingleMuon.cc,v 1.20 2010-04-19 12:40:16 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 84 84 85 85 #include <TF1.h> 86 #include <TMinuit.h>87 86 #include <TPad.h> 88 87 #include <TCanvas.h> … … 231 230 232 231 // use only the inner pixles. FIXME: This is geometry dependent 233 if (gpix.GetAidx()>0)232 if (gpix.GetAidx()>0) 234 233 continue; 235 234 236 235 fHistWidth.Fill(dist*fGeomCam->GetConvMm2Deg(), pix.GetNumPhotons()); 237 236 } 237 238 238 // Setup the function and perform the fit 239 239 TF1 g1("g1", "gaus");//, -fHistTime.GetXmin(), fHistTime.GetXmax()); … … 253 253 // R use the range specified in the function range 254 254 // Q quiet mode 255 fHistTime.Fit(&g1, "QNB");256 257 Double_t dummy; 258 gMinuit->GetParameter(1, fRelTimeMean, dummy); // get the mean value259 gMinuit->GetParameter(2, fRelTimeSigma, dummy); // get the sigma value255 if (fHistTime.Fit(&g1, "QNB")) 256 return kTRUE; 257 258 fRelTimeMean = g1.GetParameter(1); 259 fRelTimeSigma = g1.GetParameter(2); 260 260 261 261 // The mean arrival time which was subtracted before will … … 435 435 fHistWidth.Fit(&f1, "QRN"); 436 436 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); 441 442 442 443 return kTRUE;
Note:
See TracChangeset
for help on using the changeset viewer.