Ignore:
Timestamp:
02/15/05 16:18:28 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc

    r4702 r6489  
    3131//       risk!
    3232//
     33// Class Version 4:
     34// ----------------
     35//  - added Short_t       fNumSinglePixels;
     36//  - added Float_t       fSizeSinglePixels;
     37//  - added Float_t       fSizeSubIslands;
     38//  - added Float_t       fSizeMainIsland;
     39//
    3340// Class Version 3:
    3441// ----------------
     
    102109void MCerPhotEvt::Reset()
    103110{
    104     fNumPixels  =  0;
    105     fMaxIndex   = -1;
    106     fNumIslands = -1;
     111    fNumPixels        =  0;
     112    fNumSinglePixels  =  0;
     113    fSizeSinglePixels =  0;
     114    fSizeSubIslands   =  0;
     115    fSizeMainIsland   =  0;
     116    fMaxIndex         = -1;
     117    fNumIslands       = -1;
    107118    fLut.Set(0);
    108119    // fPixels->Delete();
     
    516527
    517528    // Create a list to hold the sizes of the islands (The maximum
    518     // number of islands possible is rougly fNumPixels/4)
     529    // number of islands possible is roughly fNumPixels/4)
    519530    TArrayD size(fNumPixels/3);
    520531
    521532    // Calculate Islands
    522     Int_t n=0;
     533    Int_t   n=0;
     534    Float_t totsize = 0;
    523535
    524536    // We could loop over all indices which looks more straight
     
    535547        if (pix->GetIdxIsland()<0)
    536548        {
    537             Double_t sz = CalcIsland(geom, pix->GetPixId(), n);
     549            // Don't put this in one line! n is used twice...
     550            const Double_t sz = CalcIsland(geom, pix->GetPixId(), n);
    538551            size[n++] = sz;
     552            totsize += sz;
    539553        }
    540554    }
     
    563577
    564578    // Now assign number of islands found
    565     fNumIslands = n;
     579    fNumIslands     = n;
     580    fSizeSubIslands = n>0 ? totsize-size[idx[0]] : 0;
     581    fSizeMainIsland = n>0 ? size[idx[0]] : 0;
    566582
    567583    // return number of island
  • trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h

    r4732 r6489  
    2525    UInt_t        fNumPixels;
    2626    Short_t       fNumIslands;
     27    Short_t       fNumSinglePixels;
     28    Float_t       fSizeSinglePixels;
     29    Float_t       fSizeSubIslands;
     30    Float_t       fSizeMainIsland;
    2731     Int_t        fMaxIndex;
    2832    TArrayI       fLut;        // Lookup tabel to lookup pixel by index
     
    5862    UInt_t  GetNumPixels() const { return fNumPixels; }
    5963    Short_t GetNumIslands() const { return fNumIslands; };
     64    Short_t GetNumSinglePixels() const { return fNumSinglePixels; }
     65    Float_t GetSizeSinglePixels() const { return fSizeSinglePixels; }
     66    Float_t GetSizeSubIslands() const { return fSizeSubIslands; }
     67    Float_t GetSizeMainIsland() const { return fSizeMainIsland; }
     68
     69    // Setter functions for use in image cleaning classes only
     70    void SetSinglePixels(Short_t num, Float_t size) { fNumSinglePixels=num; fSizeSinglePixels=size; }
    6071
    6172    Bool_t  IsPixelExisting(Int_t id) const;
     
    103114    operator TIterator*() const;
    104115
    105     ClassDef(MCerPhotEvt, 3)    // class for an event containing cerenkov photons
     116    ClassDef(MCerPhotEvt, 4)    // class for an event containing cerenkov photons
    106117};
    107118
Note: See TracChangeset for help on using the changeset viewer.