Ignore:
Timestamp:
04/16/09 12:14:40 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msimcamera
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/msimcamera/MSimAPD.cc

    r9369 r9427  
    6666#include "MPhotonData.h"
    6767
     68#include "MPedestalCam.h"
     69#include "MPedestalPix.h"
     70
    6871#include "MAvalanchePhotoDiode.h"
    6972
     
    122125    }
    123126
     127    fRates = (MPedestalCam*)pList->FindObject("AccidentalPhotonRates", "MPedestalCam");
     128    if (!fRates)
     129    {
     130        *fLog << inf;
     131        *fLog << "AccidentalPhotonRates [MPedestalCam] not found..." << endl;
     132        *fLog << " using " << fFreq << " as default for all G-APDs." << endl;
     133    }
     134
    124135    return kTRUE;
    125136}
     
    197208
    198209    for (UInt_t idx=0; idx<npix; idx++)
    199         static_cast<APD*>(fAPDs.UncheckedAt(idx))->FillRandom(fFreq, fStat->GetTimeFirst());
     210    {
     211        const Double_t freq = fRates ? (*fRates)[idx].GetPedestal() : fFreq;
     212        static_cast<APD*>(fAPDs.UncheckedAt(idx))->FillRandom(freq, fStat->GetTimeFirst());
     213    }
    200214
    201215    // Get number of photons
  • trunk/MagicSoft/Mars/msimcamera/MSimAPD.h

    r9369 r9427  
    1414class MPhotonEvent;
    1515class MPhotonStatistics;
     16class MPedestalCam;
    1617
    1718class MSimAPD : public MTask
     
    2122    MPhotonEvent      *fEvt;     //! Event storing the photon information
    2223    MPhotonStatistics *fStat;    //! Storing event statistics (needed for the start-time)
     24    MPedestalCam      *fRates;   //! Accidental Photon Rates for all pixels
    2325
    2426    TObjArray fAPDs;             //! Array keeping the necessary number of APDs
Note: See TracChangeset for help on using the changeset viewer.