Changeset 6276 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 02/07/05 09:25:42 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamEvent.cc
r6032 r6276 33 33 // ===== 34 34 // 35 // To plot the varianceinstead of the rms use:36 // MHCamEvent::SetBit(MHCamera::k Variance);35 // To plot sqrt(variance) instead of the rms use: 36 // MHCamEvent::SetBit(MHCamera::kSqrtVariance); 37 37 // or 38 // MHCamEvent::Enable Variance()38 // MHCamEvent::EnableSqrtVariance() 39 39 // 40 40 // To count how often a certain pixel is above or below a threshold do: … … 127 127 // use this to display the variance instead of the rms. 128 128 // 129 void MHCamEvent::Enable Variance(Bool_t b)130 { 131 b ? SetBit(MHCamera::k Variance) : ResetBit(MHCamera::kVariance);129 void MHCamEvent::EnableSqrtVariance(Bool_t b) 130 { 131 b ? SetBit(MHCamera::kSqrtVariance) : ResetBit(MHCamera::kSqrtVariance); 132 132 } 133 133 … … 173 173 fSum->SetYTitle("a.u."); 174 174 fSum->SetBit(MHCamera::kProfile); 175 if (TestBit(MHCamera::k Variance))176 fSum->SetBit(MHCamera::k Variance);175 if (TestBit(MHCamera::kSqrtVariance)) 176 fSum->SetBit(MHCamera::kSqrtVariance); 177 177 178 178 fSum->SetXTitle("Pixel Idx"); … … 301 301 MHCamera *cam = new MHCamera(*fSum->GetGeometry()); 302 302 cam->SetName(Form("%s;err", fName.Data())); 303 cam->SetTitle(fSum->TestBit(MHCamera::k Variance)?"Variance":"Root Mean Squared (rms)");303 cam->SetTitle(fSum->TestBit(MHCamera::kSqrtVariance)?"Sqrt(Variance)":"Root Mean Squared (rms)"); 304 304 cam->SetYTitle(fSum->GetYaxis()->GetTitle()); 305 305 cam->SetCamContent(*fSum, 1); -
trunk/MagicSoft/Mars/mhist/MHCamEvent.h
r5560 r6276 50 50 51 51 void SetThreshold(Float_t f, Char_t direction=kIsLowerBound) { fThreshold = f; fUseThreshold=direction; } 52 void Enable Variance(Bool_t b=kTRUE);52 void EnableSqrtVariance(Bool_t b=kTRUE); 53 53 54 54 ClassDef(MHCamEvent, 1) // Histogram to sum camera events -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r5807 r6276 329 329 // ------------------------------------------------------------------------ 330 330 // 331 // Return the variance of all entries which are used if all=kFALSE and331 // Return the sqrt variance of all entries which are used if all=kFALSE and 332 332 // of all entries if all=kTRUE if sector<0. If sector>=0 only 333 333 // entries with match the given sector are taken into account. … … 1155 1155 { 1156 1156 Double_t rc = 0; 1157 if (TestBit(k Variance) && GetEntries()>0) // error on the mean1157 if (TestBit(kSqrtVariance) && GetEntries()>0) // error on the mean 1158 1158 { 1159 1159 const Double_t error = fSumw2.fArray[bin]/GetEntries(); -
trunk/MagicSoft/Mars/mhist/MHCamera.h
r6058 r6276 40 40 public: 41 41 enum { 42 kProfile = BIT(18), // FIXME: When changing change max/min!43 kFreezed = BIT(19),44 kNoLegend = BIT(20),45 k Variance = BIT(21)42 kProfile = BIT(18), // FIXME: When changing change max/min! 43 kFreezed = BIT(19), 44 kNoLegend = BIT(20), 45 kSqrtVariance = BIT(21) 46 46 }; 47 47 private:
Note:
See TracChangeset
for help on using the changeset viewer.