Ignore:
Timestamp:
11/21/03 17:01:15 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
5 edited

Legend:

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

    r2490 r2550  
    5454//
    5555MHCamEvent::MHCamEvent(const char *name, const char *title)
    56     : fSum(NULL), fEvt(NULL), fType(0)
     56    : fSum(NULL), fRms(NULL), fEvt(NULL), fType(0)
    5757{
    5858    //
     
    7171    if (fSum)
    7272        delete fSum;
     73    if (fRms)
     74        delete fRms;
    7375}
    7476
     
    99101    if (fSum)
    100102        delete (fSum);
     103    if (fRms)
     104        delete (fRms);
    101105
    102106    const TString name = fNameEvt.IsNull() ? fName : fNameEvt;
     
    105109    fSum->SetYTitle("a.u.");
    106110    fSum->SetBit(MHCamera::kProfile);
     111
     112    fRms = new MHCamera(*cam, name+";rms", fTitle);
     113    fRms->SetYTitle("a.u.");
    107114    return kTRUE;
    108115}
     
    131138Bool_t MHCamEvent::Finalize()
    132139{
    133     fSum->ResetBit(MHCamera::kProfile);
    134     if (fSum->GetEntries()>0)
    135         fSum->Scale(1./fSum->GetEntries());
     140    fRms->AddCamContent(*fSum, 1);
    136141    return kTRUE;
    137142}
    138143
     144// --------------------------------------------------------------------------
     145//
     146// Take the mean of the sum histogram and print all pixel indices
     147// which are above sum+s*rms
     148//
    139149void MHCamEvent::PrintOutliers(Float_t s) const
    140150{
     
    156166// --------------------------------------------------------------------------
    157167//
    158 // Return fSum.
     168// Return fSum for "sum" and fRms for "rms"
    159169//
    160170TH1 *MHCamEvent::GetHistByName(const TString name)
    161171{
    162     return fSum;
     172//    name.ToLower();
     173
     174    if (name=="sum")
     175        return fSum;
     176    if (name=="rms")
     177        return fRms;
     178
     179    return NULL;
    163180}
    164181
     
    171188
    172189    pad->cd(1);
     190    gPad->SetBorderMode(0);
     191    fSum->Draw("EPhist");
     192
     193    pad->cd(2);
     194    gPad->SetBorderMode(0);
     195    gPad->Divide(2, 1);
     196    pad = gPad;
     197
     198    pad->cd(1);
     199    gPad->SetBorderMode(0);
    173200    fSum->Draw();
    174201
    175202    pad->cd(2);
    176203    gPad->SetBorderMode(0);
    177     fSum->Draw("EPhist");
    178 }
     204    fRms->Draw();
     205}
  • trunk/MagicSoft/Mars/mhist/MHCamEvent.h

    r2416 r2550  
    1313private:
    1414    MHCamera  *fSum; // storing the sum
     15    MHCamera  *fRms; // storing the rms
    1516    MCamEvent *fEvt; //! the current event
    1617
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r2490 r2550  
    11311131    cout << "Software Pixel Index: " << idx << endl;
    11321132    cout << "Hardware Pixel Id:    " << idx+1 << endl;
    1133     cout << "Contents:             " << GetBinContent(idx+1) << "  <";
    1134     cout << (IsUsed(idx)?"on":"off");
    1135     cout << ">" << endl;
     1133    cout << "Contents:             " << GetBinContent(idx+1);
     1134    if (GetBinError(idx+1)>0)
     1135        cout << " +/- " << GetBinError(idx+1);
     1136    cout << "  <" << (IsUsed(idx)?"on":"off") << ">" << endl;
    11361137
    11371138    if (fNotify && fNotify->GetSize()>0)
  • trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc

    r2490 r2550  
    111111
    112112    fSum = new MHCamera(*cam, name+";avg", fTitle);
    113     fSum->SetYTitle("%");
     113    fSum->SetBit(MHCamera::kProfile);
     114    fSum->SetYTitle("% [1]");
    114115
    115116    return kTRUE;
     
    140141Bool_t MHTriggerLvl0::Finalize()
    141142{
    142     if (fSum->GetEntries()>0)
    143         fSum->Scale(100./fSum->GetEntries());
     143    //    if (fSum->GetEntries()>0)
     144    //        fSum->Scale(100);
    144145    return kTRUE;
    145146}
    146147
    147 void MHTriggerLvl0::PrintOutlayers(Float_t s) const
     148void MHTriggerLvl0::PrintOutliers(Float_t s) const
    148149{
    149150    const Double_t mean = fSum->GetMean();
  • trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.h

    r2416 r2550  
    3636    void Draw(Option_t * ="");
    3737
    38     void PrintOutlayers(Float_t s) const;
     38    void PrintOutliers(Float_t s) const;
    3939
    4040    ClassDef(MHTriggerLvl0, 1) // Histogram to count how often a pixel is above threshold
Note: See TracChangeset for help on using the changeset viewer.