Changeset 5300 for trunk/MagicSoft/Mars/mhflux
- Timestamp:
- 10/21/04 09:03:53 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhflux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r5100 r5300 299 299 return; 300 300 301 const Int_t steps = 6;301 const Int_t steps = 10; 302 302 303 303 static int rebin = steps; … … 398 398 void MHAlpha::PaintText(Double_t val, Double_t error) const 399 399 { 400 TLatex text(0.45, 0.94, Form("N_{exc} = %.1f s \\pm %.1fs", val, error));400 TLatex text(0.45, 0.94, Form("N_{exc} = %.1f \\pm %.1f", val, error)); 401 401 text.SetBit(TLatex::kTextNDC); 402 402 text.SetTextSize(0.04); … … 463 463 if (o==(TString)"energy") 464 464 { 465 if (fHEnergy.Get Entries()>10)465 if (fHEnergy.GetMaximum()>1) 466 466 { 467 467 gPad->SetLogx(); … … 542 542 // Store the final result in fFit 543 543 TH1D *h = fHAlpha.ProjectionZ("AlphaExc_px", -1, 9999, -1, 9999, "E"); 544 h->SetDirectory(0); 544 545 fFit.Print(); 545 546 Bool_t rc = fFit.Fit(*h); -
trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc
r5143 r5300 120 120 #include <TStyle.h> 121 121 #include <TCanvas.h> 122 #include <TRandom.h> 122 123 #include <TPaveText.h> 123 124 #include <TStopwatch.h> … … 146 147 using namespace std; 147 148 149 class MHillasExt; 150 148 151 // -------------------------------------------------------------------------- 149 152 // … … 152 155 MHFalseSource::MHFalseSource(const char *name, const char *title) 153 156 : fTime(0), fPointPos(0), fObservatory(0), fMm2Deg(-1), fAlphaCut(12.5), 154 fBgMean(55), fMinDist(-1), fMaxDist(-1), fMin LD(-1), fMaxLD(-1)157 fBgMean(55), fMinDist(-1), fMaxDist(-1), fMinDW(-1), fMaxDW(-1) 155 158 { 156 159 // … … 244 247 // 245 248 // Also search for MTime, MObservatory and MPointingPos 246 // 249 // 250 MHillasExt *ext=0; 247 251 Bool_t MHFalseSource::SetupFill(const MParList *plist) 248 252 { … … 251 255 { 252 256 *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; 253 263 return kFALSE; 254 264 } … … 355 365 356 366 // Source dependant hillas parameters 357 if (hsrc.Calc(*hil )>0)367 if (hsrc.Calc(*hil, ext)>0) 358 368 { 359 369 *fLog << warn << "Calculation of MHillasSrc failed for x=" << cx[ix] << " y=" << cy[iy] << endl; … … 369 379 continue; 370 380 371 if (fMax LD>0 && hil->GetLength()>fMaxLD*hsrc.GetDist())381 if (fMaxDW>0 && hsrc.GetDist()>fMaxDW*hil->GetWidth()) 372 382 continue; 373 if (fMin LD>0 && hil->GetLength()<fMinLD*hsrc.GetDist())383 if (fMinDW<0 && hsrc.GetDist()<fMinDW*hil->GetWidth()) 374 384 continue; 375 385 … … 462 472 463 473 // 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); 465 476 466 477 // Move contents from projection to h3
Note:
See TracChangeset
for help on using the changeset viewer.