Changeset 7384 for trunk/MagicSoft
- Timestamp:
- 10/10/05 12:26:49 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7381 r7384 19 19 -*-*- END OF LINE -*-*- 20 20 21 2005/10/10 Thomas Bretz 22 23 * mbase/MMath.[h,cc]: 24 - added new function SignificanceLiMaExc 25 26 * mbase/MTime.[h,cc]: 27 - added new Setter SetAxisTime 28 29 * mcalib/MCalibCalcFromPast.cc: 30 - fixed some format in output 31 32 * mhcalib/MHCalibrationCam.cc: 33 - fixed a typo 34 35 * mhflux/MAlphaFitter.[h,cc]: 36 - added new data member fSiginificanceExc 37 38 39 21 40 2005/10/01 Thomas Bretz 22 41 … … 30 49 31 50 * ganymed.cc: 32 - implemented two new options --ind and --ins51 - implemented two new options --ind and --ins 33 52 34 53 * datacenter/scripts/runganymed: -
trunk/MagicSoft/Mars/mbase/MMath.cc
r7181 r7384 133 133 // -------------------------------------------------------------------------- 134 134 // 135 // Return Li/Ma (5) for the error of the excess, under the assumption that 136 // the existance of a signal is already known. 137 // 138 Double_t MMath::SignificanceLiMaExc(Double_t s, Double_t b, Double_t alpha) 139 { 140 Double_t Ns = s - alpha*b; 141 Double_t sN = s - alpha*alpha*b; 142 143 return Ns<0 || sN<0 ? 0 : Ns/TMath::Sqrt(sN); 144 } 145 146 // -------------------------------------------------------------------------- 147 // 135 148 // Returns: 2/(sigma*sqrt(2))*integral[0,x](exp(-(x-mu)^2/(2*sigma^2))) 136 149 // -
trunk/MagicSoft/Mars/mbase/MMath.h
r7251 r7384 22 22 Double_t SignificanceLiMa(Double_t s, Double_t b, Double_t alpha=1); 23 23 Double_t SignificanceLiMaSigned(Double_t s, Double_t b, Double_t alpha=1); 24 Double_t SignificanceLiMaExc(Double_t s, Double_t b, Double_t alpha=1); 24 25 25 26 void ReducePrecision(Float_t &val); -
trunk/MagicSoft/Mars/mbase/MTime.cc
r7366 r7384 230 230 { 231 231 return (GetMjd()-49718)*kDay/1000; 232 } 233 234 // -------------------------------------------------------------------------- 235 // 236 // Counterpart of GetAxisTime 237 // 238 void MTime::SetAxisTime(Double_t time) 239 { 240 SetMjd(time*1000/kDay+49718); 232 241 } 233 242 -
trunk/MagicSoft/Mars/mbase/MTime.h
r7366 r7384 87 87 Bool_t SetMjd(UInt_t mjd, ULong_t ms, UInt_t ns=0); 88 88 void SetMjd(Double_t m); 89 void SetAxisTime(Double_t time); 89 90 90 91 // Getter functions -
trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc
r7292 r7384 438 438 *fLog << inf << endl; 439 439 *fLog << GetDescriptor() << " execution statistics:" << endl; 440 *fLog << " " << set w(7) << fNumFails << " (" << Form("%5.1f", 100.*fNumFails/fNumCam) << "%) updates failed." << endl;440 *fLog << " " << setfill(' ') << setw(7) << fNumFails << " (" << Form("%5.1f", 100.*fNumFails/fNumCam) << "%) updates failed." << endl; 441 441 *fLog << endl; 442 442 -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
r7288 r7384 967 967 return kTRUE; 968 968 969 *fLog << inf << GetDescriptor() << ": Number of event used to fill histograms == " << fCurrentNumEvts << endl;969 *fLog << inf << GetDescriptor() << ": Number of events used to fill histograms == " << fCurrentNumEvts << endl; 970 970 971 971 if (fHiGainArray->GetSize() == 0 && fLoGainArray->GetSize() == 0) -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
r7224 r7384 60 60 { 61 61 fSignificance=0; 62 fSignificanceExc=0; 62 63 fEventsExcess=0; 63 64 fEventsSignal=0; … … 216 217 fEventsExcess = fEventsSignal-fEventsBackground; 217 218 fSignificance = MMath::SignificanceLiMaSigned(fEventsSignal, fEventsBackground); 219 fSignificanceExc = MMath::SignificanceLiMaExc(fEventsSignal, fEventsBackground); 218 220 219 221 if (TMath::IsNaN(fSignificance)) … … 250 252 fScaleFactor = alpha; 251 253 fSignificance = MMath::SignificanceLiMaSigned(fEventsSignal, fEventsBackground/alpha, alpha); 254 fSignificanceExc = MMath::SignificanceLiMaExc(fEventsSignal, fEventsBackground/alpha, alpha); 252 255 253 256 if (TMath::IsNaN(fSignificance)) … … 304 307 // Result 305 308 f.fSignificance = fSignificance; 309 f.fSignificanceExc = fSignificanceExc; 306 310 f.fEventsExcess = fEventsExcess; 307 311 f.fEventsSignal = fEventsSignal; -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.h
r7185 r7384 54 54 // Result 55 55 Double_t fSignificance; // significance of signal 56 Double_t fSignificanceExc; // significance of excess 56 57 Double_t fEventsExcess; // calculated number of excess events (signal-bg) 57 58 Double_t fEventsSignal; // calculated number of signal events … … 154 155 155 156 Double_t GetSignificance() const { return fSignificance; } 157 Double_t GetSignificanceExc() const { return fSignificanceExc; } 156 158 Double_t GetChiSqSignal() const { return fChiSqSignal; } 157 159 Double_t GetChiSqBg() const { return fChiSqBg; }
Note:
See TracChangeset
for help on using the changeset viewer.