Changeset 4430


Ignore:
Timestamp:
07/28/04 11:27:02 (20 years ago)
Author:
jlopez
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4420 r4430  
    1919
    2020                                                 -*-*- END OF LINE -*-*-
     21
     22 2004/07/28: Javi Lopez
     23
     24   * mhist/MHCamera.[h,cc]
     25     - Added new argument to CntCamContent() funtion to select to count
     26       the events above or bellow a certain discriminator level.
    2127
    2228 2004/07/20: Florian Goebel
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r4322 r4430  
    12291229            Fill(idx);
    12301230        if (val<threshold && !isabove)
     1231            Fill(idx);
     1232    }
     1233    fEntries++;
     1234}
     1235
     1236// ------------------------------------------------------------------------
     1237//
     1238// Call this function to add a MCamEvent on top of the present contents.
     1239// 1 is added to each pixel if the contents of MCamEvent>threshold (in case isabove is set to kTRUE == default)
     1240// 1 is added to each pixel if the contents of MCamEvent<threshold (in case isabove is set to kFALSE)
     1241//
     1242void MHCamera::CntCamContent(const MCamEvent &event, TArrayD threshold, Int_t type, Bool_t isabove)
     1243{
     1244    if (fNcells<=1 || IsFreezed())
     1245        return;
     1246
     1247    // FIXME: Security check missing!
     1248    for (Int_t idx=0; idx<fNcells-2; idx++)
     1249    {
     1250        Double_t val=threshold[idx];
     1251        if (event.GetPixelContent(val, idx, *fGeomCam, type)/* && !IsUsed(idx)*/)
     1252            SetUsed(idx);
     1253
     1254        if (val>threshold[idx] && isabove)
     1255            Fill(idx);
     1256        if (val<threshold[idx] && !isabove)
    12311257            Fill(idx);
    12321258    }
  • trunk/MagicSoft/Mars/mhist/MHCamera.h

    r4322 r4430  
    1010#ifndef ROOT_TArrayI
    1111#include <TArrayI.h>
     12#endif
     13#ifndef ROOT_TArrayD
     14#include <TArrayD.h>
    1215#endif
    1316#ifndef ROOT_TClonesArray
     
    151154
    152155    virtual void     CntCamContent(const MCamEvent &evt, Double_t threshold, Int_t type=0, Bool_t isabove=kTRUE);
     156    virtual void     CntCamContent(const MCamEvent &evt, TArrayD threshold, Int_t type=0, Bool_t isabove=kTRUE);
    153157    virtual void     CntCamContent(const TArrayD &evt, Double_t threshold, Bool_t ispos=kTRUE);
    154158
Note: See TracChangeset for help on using the changeset viewer.