Changeset 1462 for trunk/WuerzburgSoft/Thomas/mphys
- Timestamp:
- 07/31/02 14:54:30 (22 years ago)
- Location:
- trunk/WuerzburgSoft/Thomas/mphys
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WuerzburgSoft/Thomas/mphys/Changelog
r1449 r1462 1 1 -*-*- END -*-*- 2 2002/06/29: Thomas Bretz 3 4 * MCascade.[h,cc]: 5 - replaces draw by fIsBatch, using gROOT->IsBatch in addition. 6 7 * MFit.h: 8 - added default=0 to SetParameter for min and max 9 10 11 2 12 2002/06/29: Thomas Bretz 3 13 -
trunk/WuerzburgSoft/Thomas/mphys/MCascade.cc
r1449 r1462 292 292 Esum += ProcessGammas(fListGammas, fListElectrons, weight); 293 293 294 fListGammas.ForEach(MPhoton, Fill)(fHist, fDisplayIndex, weight); 294 if (!fIsBatch) 295 fListGammas.ForEach(MPhoton, Fill)(fHist, fDisplayIndex, weight); 295 296 fListGammas.Delete(); 296 297 … … 355 356 void MCascade::Run(TString filename, Bool_t draw) 356 357 { 358 fIsBatch = gROOT->IsBatch() ? kFALSE : draw; 359 357 360 cout << "R = " << fSrcR << "kpc" << endl; 358 361 cout << "Z = " << fSrcZ << endl; … … 371 374 TCanvas *c=NULL; 372 375 373 if ( draw)376 if (!fIsBatch) 374 377 { 375 378 fHist.SetMinimum(pow(fELo, fSpectralIndex+fDisplayIndex)/100); … … 409 412 410 413 TTimer timer("gSystem->ProcessEvents();", 333, kFALSE); 411 if ( draw)414 if (!fIsBatch) 412 415 timer.TurnOn(); 413 416 … … 426 429 Double_t E = GetEnergy(); 427 430 Double_t weight = pow(E, fSpectralIndex); 428 histsrc.Fill(E, pow(E, fDisplayIndex) * weight); 431 432 if (!fIsBatch) 433 histsrc.Fill(E, pow(E, fDisplayIndex) * weight); 429 434 430 435 cout << "--> " << n << ". " << Form("%d: %3.1e", (int)(starttime+fRuntime-TStopwatch::GetRealTime()), E) << flush; … … 432 437 ProcessPrimaryGamma(E, weight); 433 438 434 if ( !draw)439 if (fIsBatch) 435 440 continue; 436 441 … … 458 463 // ------------------------------ 459 464 460 if ( draw)465 if (!fIsBatch) 461 466 { 462 467 c->Clear(); -
trunk/WuerzburgSoft/Thomas/mphys/MCascade.h
r1449 r1462 46 46 TH1D fHist; //! 47 47 48 Bool_t fIsBatch; //! 49 48 50 Double_t GetEnergy(); 49 51 TFile *OpenFile(TString fFilename); -
trunk/WuerzburgSoft/Thomas/mphys/MFit.h
r1449 r1462 89 89 90 90 void Print(Option_t *opt="") const; 91 void SetParameter(Int_t n, TString name, Double_t start, Double_t min , Double_t max);91 void SetParameter(Int_t n, TString name, Double_t start, Double_t min=0, Double_t max=0); 92 92 93 93 Double_t GetParameter(Int_t n) const;
Note:
See TracChangeset
for help on using the changeset viewer.