- Timestamp:
- 04/30/06 21:20:56 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjtrain/MJTrainSeparation.cc
r7672 r7673 386 386 const Double_t N = num; //[#] 387 387 388 *fLog << "Events produced by MC inside the production area: " << num<< endl;388 *fLog << "Events produced by MC inside the production area: " << TMath::Nint(num) << endl; 389 389 390 390 // This correponds to an observation time T [s] … … 398 398 399 399 *fLog << "Events measured per second effective on time: " << r << "Hz" << endl; 400 *fLog << "Total effective on time: " << data/r << endl;400 *fLog << "Total effective on time: " << data/r << "s" << endl; 401 401 402 402 // this yields a number of n events to be read for training 403 403 const Double_t n = r*T; //[#] 404 404 405 *fLog << "Events to be read from the data sample: " << n<< endl;405 *fLog << "Events to be read from the data sample: " << TMath::Nint(n) << endl; 406 406 *fLog << "Events available in data sample: " << data << endl; 407 407 … … 421 421 on = TMath::Nint(nummc*data/n); 422 422 off = TMath::Nint(data); 423 *fLog << "Not enough data events available... scaling by " << data/n << endl;423 *fLog << warn << "Not enough data events available... scaling by " << data/n << endl; 424 424 } 425 425 else … … 529 529 return kFALSE; 530 530 531 const Int_t numgammas = train.GetNumRows();532 if (numgammas ==0)531 const Int_t numgammastrn = train.GetNumRows(); 532 if (numgammastrn==0) 533 533 { 534 534 *fLog << err << "ERROR - No gammas available for training... aborting." << endl; … … 544 544 return kFALSE; 545 545 546 const Int_t numbackgrnd = train.GetNumRows()-numgammas;547 if (numbackgrnd ==0)546 const Int_t numbackgrndtrn = train.GetNumRows()-numgammastrn; 547 if (numbackgrndtrn==0) 548 548 { 549 549 *fLog << err << "ERROR - No background available for training... aborting." << endl; … … 583 583 584 584 *fLog << all; 585 fLog->Separator( );585 fLog->Separator("The forest was tested with..."); 586 586 587 587 *fLog << "Training method:" << endl; … … 589 589 *fLog << endl; 590 590 *fLog << "Events used for training:" << endl; 591 *fLog << " * Gammas: " << numgammas << endl;592 *fLog << " * Background: " << numbackgrnd << endl;591 *fLog << " * Gammas: " << numgammastrn << endl; 592 *fLog << " * Background: " << numbackgrndtrn << endl; 593 593 *fLog << endl; 594 594 *fLog << "Gamma/Background ratio:" << endl; 595 595 *fLog << " * Requested: " << (float)fNumTrainOn/fNumTrainOff << endl; 596 *fLog << " * Result: " << (float)numgammas /numbackgrnd<< endl;596 *fLog << " * Result: " << (float)numgammastrn/numbackgrndtrn << endl; 597 597 598 598 if (!fDataSetTest.IsValid()) … … 684 684 return kFALSE; 685 685 686 *fLog << all; 687 fLog->Separator("The forest was tested with..."); 688 689 const Double_t numgammastst = h32.GetHist().GetEntries(); 690 const Double_t numbackgrndtst = h31.GetHist().GetEntries(); 691 692 *fLog << "Events used for test:" << endl; 693 *fLog << " * Gammas: " << numgammastst << endl; 694 *fLog << " * Background: " << numbackgrndtst << endl; 695 *fLog << endl; 696 *fLog << "Gamma/Background ratio:" << endl; 697 *fLog << " * Requested: " << (float)fNumTestOn/fNumTestOff << endl; 698 *fLog << " * Result: " << (float)numgammastst/numbackgrndtst << endl; 699 686 700 return kTRUE; 687 701 }
Note:
See TracChangeset
for help on using the changeset viewer.