Changeset 4838


Ignore:
Timestamp:
09/03/04 09:33:43 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4836 r4838  
    1919
    2020                                                 -*-*- END OF LINE -*-*-
     21 2004/09/03: Thomas Bretz
     22
     23   * manalysis/MCameraData.[h,cc], mimage/MImgCleanStd.[h,cc]:
     24     - implemeted cleaning in absolute number of photons
     25
     26
     27
    2128 2004/09/02: Thomas Bretz
    2229
  • trunk/MagicSoft/Mars/manalysis/MCameraData.cc

    r4716 r4838  
    374374// --------------------------------------------------------------------------
    375375//
     376// Function to calculate the cleaning level for all pixels in a given event.
     377// The level is the absolute number of photons times the area-ratio.
     378//
     379void MCameraData::CalcCleaningAbsolute(const MCerPhotEvt &evt, const MGeomCam &geom)
     380{
     381    const Int_t n = geom.GetNumPixels();
     382
     383    // Reset arrays
     384    fData.Set(n);
     385    fData.Reset();
     386
     387    fValidity.Set(n);
     388    fValidity.Reset();
     389
     390    const Int_t entries = evt.GetNumPixels();
     391
     392    // calculate cleaning levels
     393    for (Int_t i=0; i<entries; i++)
     394    {
     395        const MCerPhotPix &spix = evt[i];
     396
     397        const Int_t idx = spix.GetPixId();
     398
     399        // Set probability
     400        fData[idx]     = spix.GetNumPhotons() * geom.GetPixRatio(idx);
     401        fValidity[idx] = 1;
     402    }
     403}
     404
     405// --------------------------------------------------------------------------
     406//
    376407// Returns the contents of the pixel.
    377408//
  • trunk/MagicSoft/Mars/manalysis/MCameraData.h

    r4716 r4838  
    4545    void CalcCleaningProbability(const MCerPhotEvt &evt, const MPedPhotCam &pcam,
    4646                                 const MGeomCam &geom,   const MArrivalTime *tcam);
     47    void CalcCleaningAbsolute(const MCerPhotEvt &evt, const MGeomCam &geom);
    4748
    4849    const TArrayD &GetData() const { return fData; }
  • trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc

    r4826 r4838  
    211211//
    212212//
     213// ABSOLUTE CLEANING
     214// =================
     215// This method takes signal height (photons) times area ratio
     216// ad the cleaning levels.
     217//
     218// The cleaning now is done in these levels (eg. 16, 20)
     219// The meaning of the cleaning levels is essentially the same (the same cleaning
     220// algorithm is used) but the cleaning is not done in different 'units'
     221//
     222// Example:
     223//
     224// MImgCleanStd clean(20, 16);
     225// clean.SetMethod(MImgCleanStd::kAbsolulte);
     226//
     227//
    213228// Member Function:  SetMethod()
    214229// ============================
     
    579594        fData->CalcCleaningProbability(*fEvt, *fPed, *fCam, fTime);
    580595        break;
     596    case kAbsolute:
     597        fData->CalcCleaningAbsolute(*fEvt, *fCam);
     598        break;
    581599    default:
    582600        break;
     
    637655    case kProbability:
    638656        *fLog << "probability";
     657        break;
     658    case kAbsolute:
     659        *fLog << "absolute";
    639660        break;
    640661    }
     
    769790        case kDemocratic:  out << "Democratic";  break;
    770791        case kProbability: out << "Probability"; break;
     792        case kAbsolute:    out << "Absolute";    break;
    771793        default:
    772794            break;
     
    786808//   MImgCleanStd.CleanLevel1: 3.0
    787809//   MImgCleanStd.CleanLevel2: 2.5
    788 //   MImgCleanStd.CleanMethod: Standard, Scaled, Democratic, Probability
     810//   MImgCleanStd.CleanMethod: Standard, Scaled, Democratic, Probability, Absolute
    789811//   MImgCleanStd.CleanRings:  1
    790812//
     
    821843        if (s.BeginsWith("probability"))
    822844            SetMethod(kProbability);
     845        if (s.BeginsWith("absolute"))
     846            SetMethod(kAbsolute);
    823847    }
    824848
  • trunk/MagicSoft/Mars/mimage/MImgCleanStd.h

    r4702 r4838  
    2323        kScaled,
    2424        kDemocratic,
    25         kProbability
     25        kProbability,
     26        kAbsolute
    2627    } CleaningMethod_t;
    2728
Note: See TracChangeset for help on using the changeset viewer.