Ignore:
Timestamp:
02/07/05 09:25:42 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHCamEvent.cc

    r6032 r6276  
    3333// =====
    3434//
    35 // To plot the variance instead of the rms use:
    36 //    MHCamEvent::SetBit(MHCamera::kVariance);
     35// To plot sqrt(variance) instead of the rms use:
     36//    MHCamEvent::SetBit(MHCamera::kSqrtVariance);
    3737//  or
    38 //    MHCamEvent::EnableVariance()
     38//    MHCamEvent::EnableSqrtVariance()
    3939//
    4040// To count how often a certain pixel is above or below a threshold do:
     
    127127// use this to display the variance instead of the rms.
    128128//
    129 void MHCamEvent::EnableVariance(Bool_t b)
    130 {
    131     b ? SetBit(MHCamera::kVariance) : ResetBit(MHCamera::kVariance);
     129void MHCamEvent::EnableSqrtVariance(Bool_t b)
     130{
     131    b ? SetBit(MHCamera::kSqrtVariance) : ResetBit(MHCamera::kSqrtVariance);
    132132}
    133133
     
    173173        fSum->SetYTitle("a.u.");
    174174    fSum->SetBit(MHCamera::kProfile);
    175     if (TestBit(MHCamera::kVariance))
    176         fSum->SetBit(MHCamera::kVariance);
     175    if (TestBit(MHCamera::kSqrtVariance))
     176        fSum->SetBit(MHCamera::kSqrtVariance);
    177177
    178178    fSum->SetXTitle("Pixel Idx");
     
    301301    MHCamera *cam = new MHCamera(*fSum->GetGeometry());
    302302    cam->SetName(Form("%s;err", fName.Data()));
    303     cam->SetTitle(fSum->TestBit(MHCamera::kVariance)?"Variance":"Root Mean Squared (rms)");
     303    cam->SetTitle(fSum->TestBit(MHCamera::kSqrtVariance)?"Sqrt(Variance)":"Root Mean Squared (rms)");
    304304    cam->SetYTitle(fSum->GetYaxis()->GetTitle());
    305305    cam->SetCamContent(*fSum, 1);
  • trunk/MagicSoft/Mars/mhist/MHCamEvent.h

    r5560 r6276  
    5050
    5151    void SetThreshold(Float_t f, Char_t direction=kIsLowerBound) { fThreshold = f; fUseThreshold=direction; }
    52     void EnableVariance(Bool_t b=kTRUE);
     52    void EnableSqrtVariance(Bool_t b=kTRUE);
    5353
    5454    ClassDef(MHCamEvent, 1) // Histogram to sum camera events
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r5807 r6276  
    329329// ------------------------------------------------------------------------
    330330//
    331 // Return the variance of all entries which are used if all=kFALSE and
     331// Return the sqrt variance of all entries which are used if all=kFALSE and
    332332// of all entries if all=kTRUE if sector<0. If sector>=0 only
    333333// entries with match the given sector are taken into account.
     
    11551155{
    11561156    Double_t rc = 0;
    1157     if (TestBit(kVariance) && GetEntries()>0) // error on the mean
     1157    if (TestBit(kSqrtVariance) && GetEntries()>0) // error on the mean
    11581158    {
    11591159        const Double_t error = fSumw2.fArray[bin]/GetEntries();
  • trunk/MagicSoft/Mars/mhist/MHCamera.h

    r6058 r6276  
    4040public:
    4141    enum {
    42         kProfile  = BIT(18), // FIXME: When changing change max/min!
    43         kFreezed  = BIT(19),
    44         kNoLegend = BIT(20),
    45         kVariance = BIT(21)
     42        kProfile      = BIT(18), // FIXME: When changing change max/min!
     43        kFreezed      = BIT(19),
     44        kNoLegend     = BIT(20),
     45        kSqrtVariance = BIT(21)
    4646    };
    4747private:
Note: See TracChangeset for help on using the changeset viewer.