Changeset 2731 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
12/20/03 16:44:42 (21 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2730 r2731  
    55                                                 -*-*- END OF LINE -*-*-
    66 2003/12/20: Abelardo Moralejo
     7
     8   * manalysis/MMcCalibration.[h,cc]
     9     - adapted to changes in calibration classes. Removed SetADC2PhOuter
     10       (ratio of inner to outer can be found from MMcFadcHeader).
     11
     12   * mananalysis/MCalibrate.cc
     13     - commented out check of sizes of MExtractedSignal and
     14       MCalibrationCam (they are different in MC when no noise is
     15       simulated).
    716
    817   * mmc/MMcFadcHeader.hxx
  • trunk/MagicSoft/Mars/manalysis/MCalibrate.cc

    r2728 r2731  
    114114Int_t MCalibrate::Process()
    115115{
     116  /*
    116117    if (fCalibrations->GetNumPixels() != (UInt_t)fSignals->GetSize())
    117118    {
     
    123124        return kFALSE;
    124125    }
     126  */
    125127
    126128    const UInt_t imaxnumpix = fSignals->GetSize();
     
    148150        }
    149151
    150         //      Float_t calibrationConvertionFactor = pix.GetMeanConversionFFactorMethod();
     152        //      Float_t calibrationConversionFactor = pix.GetMeanConversionFFactorMethod();
    151153        const Float_t calibrationConversionFactor      = pix.GetMeanConversionBlindPixelMethod();
    152154        const Float_t calibrationConversionFactorError = pix.GetErrorConversionBlindPixelMethod();
  • trunk/MagicSoft/Mars/manalysis/MMcCalibrationCalc.cc

    r2721 r2731  
    9393}
    9494
     95
     96//---------------------------------------------------------------------------
     97//
     98// Set ADC to photon conversion factors.
     99//
     100void MMcCalibrationCalc::SetADC2PhInner(Float_t x)
     101{
     102  fADC2PhInner = x;
     103  fADC2PhOuter = x *
     104    fHeaderFadc->GetAmplitud() / fHeaderFadc->GetAmplitudOuter();
     105
     106  return;
     107}
     108
    95109// --------------------------------------------------------------------------
    96110//
     
    176190    }
    177191
     192    fPedPhotCam->InitSize(fGeom->GetNumPixels());
     193
    178194    return kTRUE;
    179195}
     
    207223        calpix.SetPedestal(pedestmean, pedestrms);
    208224        calpix.SetBlindPixelMethodValid();
    209 
    210         if ( fGeom->GetPixRatio(i) > fGeom->GetPixRatio(0) )
    211           calpix.SetConversionBlindPixelMethod(fADC2PhOuter, 0., 0.);
     225        calpix.SetConversionHiLo(fConversionHiLo);
     226        calpix.SetConversionHiLoError(0.);         // FIXME ?
     227
     228        //
     229        // Write conversion factor ADC to photons (different for inner
     230        // and outer pixels).
     231        //
     232
     233        Float_t adc2phot = (fGeom->GetPixRatio(i) > fGeom->GetPixRatio(0))?
     234          fADC2PhOuter : fADC2PhInner;
     235
     236        calpix.SetConversionBlindPixelMethod(adc2phot, 0., 0.);
     237
     238        //
     239        // Write mean pedestal and pedestal rms per pixel
     240        // in number of photons:
     241        //
     242        MPedPhotPix &pedpix = (*fPedPhotCam)[i];
     243
     244        if (sigpix.IsLoGainUsed())
     245          pedpix.Set(adc2phot*fConversionHiLo*pedestmean,
     246                     adc2phot*fConversionHiLo*pedestrms);
    212247        else
    213           calpix.SetConversionBlindPixelMethod(fADC2PhInner, 0., 0.);
     248          pedpix.Set(adc2phot*pedestmean, adc2phot*pedestrms);
    214249
    215250    }
  • trunk/MagicSoft/Mars/manalysis/MMcCalibrationCalc.h

    r2722 r2731  
    2929    Float_t fADC2PhOuter; // for inner and outer pixels.
    3030
     31    Float_t fConversionHiLo;
     32
    3133public:
    3234    MMcCalibrationCalc(const char *name=NULL, const char *title=NULL);
    3335
    34     void SetADC2PhInner(Float_t x) {fADC2PhInner = x; }
    35     void SetADC2PhOuter(Float_t x) {fADC2PhOuter = x; }
     36    void SetADC2PhInner(Float_t x);
     37    void SetConversionHiLo(Float_t x) { fConversionHiLo = x; }
    3638
    3739    ClassDef(MMcCalibrationCalc, 0)   // Task which obtains, for MC files, the pedestal mean and rms, and the calibration factor from ADC counts to photons.
Note: See TracChangeset for help on using the changeset viewer.