Changeset 7672 for trunk/MagicSoft
- Timestamp:
- 04/30/06 21:01:33 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7665 r7672 25 25 - fixed the auto training (still far from working well) 26 26 - improved result plots 27 28 * mbase/MMath.cc: 29 - fixed SignificanceLiMa such that it allows basically zero 30 signal- and/or background events 27 31 28 32 -
trunk/MagicSoft/Mars/mbase/MMath.cc
r7410 r7672 78 78 // The significance has the same (positive!) value for s>b and b>s. 79 79 // 80 // Returns -1 if sum<0 or alpha<0 or the argument of sqrt<0 81 // Returns 0 if s+b==0, s==0 or b==0 80 // Returns -1 if s<0 or b<0 or alpha<0 or the argument of sqrt<0 82 81 // 83 82 // Here is some eMail written by Daniel Mazin about the meaning of the arguments: … … 107 106 const Double_t sum = s+b; 108 107 109 if (s==0 || b==0 || sum==0) 110 return 0; 111 112 if (sum<0 || alpha<=0) 108 if (s<0 || b<0 || alpha<=0) 113 109 return -1; 114 110 115 const Double_t l = s *TMath::Log(s/sum*(alpha+1)/alpha);116 const Double_t m = b *TMath::Log(b/sum*(alpha+1) );111 const Double_t l = s==0 ? 0 : s*TMath::Log(s/sum*(alpha+1)/alpha); 112 const Double_t m = b==0 ? 0 : b*TMath::Log(b/sum*(alpha+1) ); 117 113 118 114 return l+m<0 ? -1 : TMath::Sqrt((l+m)*2); -
trunk/MagicSoft/Mars/mjtrain/MJTrainSeparation.cc
r7671 r7672 370 370 // Target spectrum 371 371 TF1 flx("Flux", "[0]/1000*(x/1000)^(-2.6)", min, max); 372 flx.SetParameter(0, 1e-6);372 flx.SetParameter(0, 2e-7); 373 373 374 374 // Number n0 of events this spectrum would produce per s and m^2
Note:
See TracChangeset
for help on using the changeset viewer.