Changeset 3578 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 03/22/04 16:59:44 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHFalseSource.cc
r3577 r3578 259 259 // ApJ 272 (1983) 317, Formula 17 260 260 // 261 // s // s: number of on events 262 // b // b: number of off events 263 // alpha = t_on/t_off; // t: observation time 264 // 261 265 Double_t MHFalseSource::SignificanceLiMa(Double_t s, Double_t b, Double_t alpha) 262 266 { 263 if (s+b<=0) 267 const Double_t sum = s+b; 268 269 if (sum<=0 || alpha<=0) 264 270 return 0; 265 271 266 const Double_t k = s/(s+b); 267 268 const Double_t a = s*TMath::Log(k*(alpha+1)/alpha); 269 const Double_t b = b*TMath::Log(k*(alpha+1) ); 270 271 return TMath::Sqrt((a+b)*2); 272 const Double_t l = s*TMath::Log(s/sum*(alpha+1)/alpha); 273 const Double_t m = b*TMath::Log(b/sum*(alpha+1) ); 274 275 return TMath::Sqrt((l+m)*2); 272 276 } 273 277 -
trunk/MagicSoft/Mars/mhist/MHFalseSource.h
r3568 r3578 66 66 67 67 static Double_t Significance(Double_t s, Double_t b); 68 static Double_t SignificanceLiMa(Double_t s, Double_t b, Double_t alpha=1); 68 69 69 70 ClassDef(MHFalseSource, 1) //3D-histogram in alpha, x and y
Note:
See TracChangeset
for help on using the changeset viewer.