Changeset 2698
- Timestamp:
- 12/17/03 17:40:35 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2696 r2698 42 42 - tried to make fUseOrigDistrib-stuff working again 43 43 44 * mhist/MHCamera.[h,cc]: 45 - implemented kVariance 44 46 45 47 -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r2678 r2698 33 33 // To change the scale to a logarithmic scale SetLogy() of the Pad. 34 34 // 35 // Be carefull: Entries in this context means Entries/bin or Events 36 // 35 37 //////////////////////////////////////////////////////////////////////////// 36 38 #include "MHCamera.h" … … 288 290 sq /= n; 289 291 290 return Profile( sqrt(sq-sum*sum));292 return Profile(TMath::Sqrt(sq-sum*sum)); 291 293 } 292 294 … … 758 760 } 759 761 760 762 Stat_t MHCamera::GetBinError(Int_t bin) const 763 { 764 Double_t rc = 0; 765 if (TestBit(kVariance) && GetEntries()>0) // error on the mean 766 { 767 const Double_t error = fSumw2.fArray[bin]/GetEntries(); 768 const Double_t val = fArray[bin]/GetEntries(); 769 rc = TMath::Sqrt(error - val*val); 770 } 771 else 772 rc = TH1D::GetBinError(bin); 773 774 return Profile(rc); 775 } 761 776 762 777 // ------------------------------------------------------------------------ -
trunk/MagicSoft/Mars/mhist/MHCamera.h
r2642 r2698 32 32 kProfile = BIT(18), // FIXME: When changing change max/min! 33 33 kFreezed = BIT(19), 34 kNoLegend = BIT(20) 34 kNoLegend = BIT(20), 35 kVariance = BIT(21) 35 36 }; 36 37 private: … … 133 134 Stat_t GetBinContent(Int_t binx, Int_t biny) const { return GetBinContent(binx); } 134 135 Stat_t GetBinContent(Int_t binx, Int_t biny, Int_t binz) const { return GetBinContent(binx); } 135 Stat_t GetBinError(Int_t bin) const { return Profile(TH1D::GetBinError(bin)); }136 Stat_t GetBinError(Int_t bin) const; 136 137 Stat_t GetBinError(Int_t binx, Int_t biny) const { return GetBinError(binx); } 137 138 Stat_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const { return GetBinError(binx); }
Note:
See TracChangeset
for help on using the changeset viewer.